diff --git a/packages/react/lib/Abstract/index.d.ts b/packages/react/lib/Abstract/index.d.ts deleted file mode 100644 index b17ce53d5..000000000 --- a/packages/react/lib/Abstract/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ComponentPropsWithoutRef, ReactNode } from 'react'; -declare interface AbstractProps extends ComponentPropsWithoutRef { - className?: string; - children?: ReactNode | JSX.Element; -} -declare const Abstract: { - ({ className, ...rest }: AbstractProps): import("react").JSX.Element; - displayName: string; -}; -export default Abstract; diff --git a/packages/react/lib/Alert/index.d.ts b/packages/react/lib/Alert/index.d.ts deleted file mode 100644 index fe33e5882..000000000 --- a/packages/react/lib/Alert/index.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { MutableRefObject, ReactNode, ComponentPropsWithRef, ElementType } from 'react'; - -import { ForwardedProps } from '../utils'; - -declare type AlertRef = { - isJunipero: boolean; - innerRef: MutableRefObject; -}; -declare interface AlertProps extends ComponentPropsWithRef { - animationTimeout?: number; - children?: ReactNode | JSX.Element; - className?: string; - icon?: ReactNode | JSX.Element; - index?: string | number; - lifespan?: number; - tag?: string | ElementType; - animate?(alert: ReactNode | JSX.Element, opts: { - opened: boolean; - index: string | number; - }): ReactNode | JSX.Element; - onDismiss?(index?: string | number): void; - ref?: MutableRefObject; -} -export declare interface AlertObject { - id?: number | string; - animationTimeout?: number; - content?: ReactNode | JSX.Element; - icon?: ReactNode | JSX.Element; - index?: string | number; - title?: ReactNode | JSX.Element; - duration?: number; - type?: string; - lifespan?: number; - animate?(alert: ReactNode | JSX.Element, opts: { - opened: boolean; - index: string | number; - }): ReactNode | JSX.Element; - onDismiss?(index?: string | number): void; -} -declare const Alert: ForwardedProps; -export default Alert; diff --git a/packages/react/lib/Alerts/index.d.ts b/packages/react/lib/Alerts/index.d.ts deleted file mode 100644 index 745c2b022..000000000 --- a/packages/react/lib/Alerts/index.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { ComponentPropsWithRef, MutableRefObject, ReactNode } from 'react'; -import { AlertObject } from '../Alert'; -import { ForwardedProps } from '../utils'; -export declare type AlertsRef = { - alerts: Array; - isJunipero: boolean; - innerRef: MutableRefObject; -}; -declare interface AlertsProps extends ComponentPropsWithRef { - animationTimeout?: number; - className?: string; - icons?: { - danger?: ReactNode | JSX.Element; - default?: ReactNode | JSX.Element; - primary?: ReactNode | JSX.Element; - success?: ReactNode | JSX.Element; - warning?: ReactNode | JSX.Element; - }; - animateAlert?(alert: ReactNode | JSX.Element, opts: { - opened: boolean; - index: string | number; - }): ReactNode | JSX.Element; - ref?: MutableRefObject; -} -declare const Alerts: ForwardedProps; -export default Alerts; diff --git a/packages/react/lib/AlertsControl/index.d.ts b/packages/react/lib/AlertsControl/index.d.ts deleted file mode 100644 index 9b66f0196..000000000 --- a/packages/react/lib/AlertsControl/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { ComponentPropsWithRef, MutableRefObject } from 'react'; -import { AlertObject } from '../Alert'; -import { ForwardedProps } from '../utils'; -export declare type AlertsControlRef = { - alerts: Array; - isJunipero: boolean; - add(alert: AlertObject): void; - dismiss(alert: AlertObject): void; -} | React.RefAttributes; -declare interface AlertsControlProps extends ComponentPropsWithRef { - alerts?: Array; - generateId?: (alert: AlertObject) => string | number; - ref?: MutableRefObject; - children?: React.ReactNode; -} -declare const AlertsControl: ForwardedProps; -export default AlertsControl; diff --git a/packages/react/lib/Badge/index.d.ts b/packages/react/lib/Badge/index.d.ts deleted file mode 100644 index f7f936f1d..000000000 --- a/packages/react/lib/Badge/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { ComponentPropsWithRef, ElementType, MutableRefObject, ReactNode } from 'react'; -import { ForwardedProps } from '../utils'; -export declare type BadgeRef = { - isJunipero: boolean; - innerRef: MutableRefObject; -}; -declare interface BadgeProps extends ComponentPropsWithRef { - children?: ReactNode | JSX.Element; - className?: string; - tag?: string | ElementType; - ref?: MutableRefObject; -} -declare const Badge: ForwardedProps; -export default Badge; diff --git a/packages/react/lib/BreadCrumb/index.d.ts b/packages/react/lib/BreadCrumb/index.d.ts deleted file mode 100644 index c5ba978c0..000000000 --- a/packages/react/lib/BreadCrumb/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { MutableRefObject, ComponentPropsWithRef } from 'react'; -import { ForwardedProps } from '../utils'; -export declare type BreadCrumbRef = { - items: Array | Array; - isJunipero: boolean; - innerRef: MutableRefObject; -}; -declare interface BreadCrumbProps extends ComponentPropsWithRef { - children?: JSX.Element | Array; - className?: string; - items?: Array | Array; - maxItems?: number; - filterItem?(children: JSX.Element): boolean; - ref?: MutableRefObject; -} -declare const BreadCrumb: ForwardedProps; -export default BreadCrumb; diff --git a/packages/react/lib/BreadCrumbItem/index.d.ts b/packages/react/lib/BreadCrumbItem/index.d.ts deleted file mode 100644 index 264a699d8..000000000 --- a/packages/react/lib/BreadCrumbItem/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { ComponentPropsWithRef, ElementType, MutableRefObject, ReactNode } from 'react'; -export declare type BreadCrumbItemRef = { - isJunipero: boolean; - innerRef: MutableRefObject; -}; -declare interface BreadCrumbItemProps extends ComponentPropsWithRef { - className?: string; - children?: ReactNode | JSX.Element; - tag?: string | ElementType; - animate?(item: ReactNode | JSX.Element): ReactNode | JSX.Element; - ref?: MutableRefObject; -} -declare const BreadCrumbItem: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; -export default BreadCrumbItem; diff --git a/packages/react/lib/Button/index.d.ts b/packages/react/lib/Button/index.d.ts deleted file mode 100644 index 8cbf7a56e..000000000 --- a/packages/react/lib/Button/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ComponentPropsWithRef, ElementType, MutableRefObject, ReactNode } from 'react'; -export declare type ButtonRef = { - isJunipero: boolean; - innerRef: MutableRefObject; -}; -declare interface ButtonProps extends ComponentPropsWithRef { - className?: string; - children?: ReactNode | JSX.Element; - disabled?: boolean; - tag?: string | ElementType; - onClick?(e: Event): void; - ref?: MutableRefObject; -} -declare const Button: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; -export default Button; diff --git a/packages/react/lib/Calendar/index.d.ts b/packages/react/lib/Calendar/index.d.ts deleted file mode 100644 index bf7ff4175..000000000 --- a/packages/react/lib/Calendar/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { ComponentPropsWithRef, MutableRefObject } from 'react'; -import { FixedArray } from '../utils'; -export declare type CalendarRef = { - value: Date; - isJunipero: boolean; - innerRef: MutableRefObject; -}; -declare interface CalendarProps extends ComponentPropsWithRef { - active?: Date; - className?: string; - disabled?: boolean; - max?: Date; - min?: Date; - monthNames?: FixedArray; - weekDaysName?: FixedArray; - onSelect?(value: Date): void; - ref?: MutableRefObject; -} -declare const Calendar: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; -export default Calendar; diff --git a/packages/react/lib/Card/index.d.ts b/packages/react/lib/Card/index.d.ts deleted file mode 100644 index a43c8e046..000000000 --- a/packages/react/lib/Card/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { ComponentPropsWithRef, ElementType, MutableRefObject, ReactNode } from 'react'; -export declare type CardRef = { - isJunipero: boolean; - innerRef: MutableRefObject; -}; -declare interface CardProps extends ComponentPropsWithRef { - children?: ReactNode | JSX.Element; - className?: string; - tag?: string | ElementType; - ref?: MutableRefObject; -} -declare const Card: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; -export default Card; diff --git a/packages/react/lib/Card/index.stories.d.ts b/packages/react/lib/Card/index.stories.d.ts deleted file mode 100644 index 2fcbca31a..000000000 --- a/packages/react/lib/Card/index.stories.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/// -declare const _default: { - title: string; -}; -export default _default; -export declare const basic: () => import("react").JSX.Element; diff --git a/packages/react/lib/CheckboxField/index.d.ts b/packages/react/lib/CheckboxField/index.d.ts deleted file mode 100644 index 80fd44e74..000000000 --- a/packages/react/lib/CheckboxField/index.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { MutableRefObject, ReactNode, ComponentPropsWithRef } from 'react'; -export declare type CheckboxFieldRef = { - checked: boolean; - isJunipero: boolean; - innerRef: MutableRefObject; - inputRef: MutableRefObject; -}; -declare interface CheckboxFieldProps extends ComponentPropsWithRef { - checked?: boolean; - children?: ReactNode | JSX.Element; - className?: string; - disabled?: boolean; - id?: string; - name?: string; - required?: boolean; - valid?: boolean; - value?: any; - onChange?(changeEvent: { - value: any; - checked: boolean; - }): void; - onValidate?(value: any, { dirty, required }: { - dirty?: boolean; - required?: boolean; - }): boolean; - ref?: MutableRefObject; -} -declare const CheckboxField: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; -export default CheckboxField; diff --git a/packages/react/lib/CodeField/index.d.ts b/packages/react/lib/CodeField/index.d.ts deleted file mode 100644 index af44f6a95..000000000 --- a/packages/react/lib/CodeField/index.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { MutableRefObject, ComponentPropsWithRef } from 'react'; -export declare type CodeFieldRef = { - dirty: boolean; - isJunipero: boolean; - valid: boolean; - value: string; - focus(index: number): void; - blur(index: number): void; - reset(): void; - innerRef: MutableRefObject; - inputsRef: MutableRefObject>; -}; -declare interface CodeFieldProps extends ComponentPropsWithRef { - autoFocus?: boolean; - disabled?: boolean; - className?: string; - id?: string; - name?: string; - required?: boolean; - size?: number; - valid?: boolean; - value?: string; - onValidate?(value: string, { dirty, required }: { - dirty?: boolean; - required?: boolean; - }): boolean; - onChange?(changeProps: { - value?: string; - valid: boolean; - }): void; - onPaste?(e: Event): void; - onFocus?(e: Event): void; - onBlur?(e: Event): void; - ref?: MutableRefObject; -} -declare const CodeField: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; -export default CodeField; diff --git a/packages/react/lib/ColorField/index.d.ts b/packages/react/lib/ColorField/index.d.ts deleted file mode 100644 index 973bc1edd..000000000 --- a/packages/react/lib/ColorField/index.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { ReactNode, ComponentPropsWithRef, MutableRefObject } from 'react'; -import { UseDismissProps } from '@floating-ui/react'; -export declare type ColorFieldRef = { - dirty: boolean; - isJunipero: boolean; - valid: boolean; - value: string; - blur(): void; - close(): void; - focus(): void; - open(): void; - reset(): void; - toggle(): void; - colorAlphaRef: MutableRefObject; - colorHueRef: MutableRefObject; - colorLightnessRef: MutableRefObject; - innerRef: MutableRefObject; - textFieldRef: MutableRefObject; -}; -declare interface ColorFieldProps extends ComponentPropsWithRef { - autoFocus?: boolean; - className?: string; - disabled?: boolean; - dismissOptions?: UseDismissProps; - format?: 'auto' | 'hex' | 'rgb' | 'rgba' | 'hsla'; - globalEventsTarget: EventTarget; - id?: string; - name?: string; - opened?: boolean; - placeholder?: string; - required?: boolean; - tabIndex?: number; - trigger?: 'click' | 'hover' | 'manual' | 'focus'; - valid?: boolean; - value?: string; - animateMenu?(menu: ReactNode | JSX.Element, opts: { - opened: boolean; - }): ReactNode | JSX.Element; - onBlur?(e: Event): void; - onChange?(props: { - value: string; - valid: boolean; - }): void; - onFocus?(e: Event): void; - onToggle?({ opened }: { - opened: boolean; - }): void; - onValidate?(value: string, { dirty, required }: { - dirty?: boolean; - required?: boolean; - }): boolean; - ref?: MutableRefObject; -} -declare const ColorField: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; -export default ColorField; diff --git a/packages/react/lib/DateField/index.d.ts b/packages/react/lib/DateField/index.d.ts deleted file mode 100644 index 6fd32fdef..000000000 --- a/packages/react/lib/DateField/index.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { MutableRefObject, ComponentPropsWithRef, ReactNode } from 'react'; -import { FixedArray } from '../utils'; -export declare type DateFieldRef = { - dirty: boolean; - focused: boolean; - isJunipero: boolean; - opened: boolean; - valid: boolean; - value: Date; - blur(): void; - focus(): void; - reset(): void; - open(): void; - close(): void; - toggle(): void; - innerRef: MutableRefObject; - inputRef: MutableRefObject; - timeInputRef: MutableRefObject; -}; -export declare interface DateFieldProps extends ComponentPropsWithRef { - autoFocus?: boolean; - className?: string; - clearable?: boolean; - disabled?: boolean; - id?: string; - max?: Date; - min?: Date; - monthNames?: FixedArray; - name?: string; - opened?: boolean; - placeholder?: string; - required?: boolean; - time?: boolean; - timePlaceholder?: string; - trigger?: 'click' | 'hover' | 'manual'; - valid?: boolean; - value?: Date; - weekDaysName?: FixedArray; - animateMenu?(menu: ReactNode | JSX.Element, opts: { - opened: boolean; - }): ReactNode | JSX.Element; - onBlur?(e: Event): void; - onChange?(props: { - value: Date; - valid: boolean; - }): void; - onFocus?(e: Event): void; - onToggle?(props: { - opened: boolean; - }): void; - onValidate?(value: Date, options: { - required?: boolean; - dirty?: boolean; - }): boolean; - parseTime?(time: string): FixedArray; - parseTitle?(value: Date, options?: { - time?: boolean; - isValue?: boolean; - }): string; - parseValue?(value: Date, options?: { - required?: boolean; - }): Date; - ref?: MutableRefObject; -} -declare const DateField: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; -export default DateField; diff --git a/packages/react/lib/Draggable/index.d.ts b/packages/react/lib/Draggable/index.d.ts deleted file mode 100644 index 00fc7d7ef..000000000 --- a/packages/react/lib/Draggable/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { DragEvent, ComponentPropsWithRef } from 'react'; -declare interface DraggableProps extends ComponentPropsWithRef { - children?: JSX.Element; - className?: string; - data?: any; - disabled?: boolean; - dragImage?: Element; - dragImageOffset?: { - x: number; - y: number; - }; - onDrag?(e: Event): void; - onBeforeDragStart?(e: DragEvent): void; - onDragStart?(e: DragEvent, target?: DOMRect): void; - onDragEnd?(e: DragEvent): void; -} -declare const Draggable: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; -export default Draggable; diff --git a/packages/react/lib/Dropdown/index.d.ts b/packages/react/lib/Dropdown/index.d.ts deleted file mode 100644 index 7c7cfc290..000000000 --- a/packages/react/lib/Dropdown/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { MutableRefObject, ComponentPropsWithRef } from 'react'; -import { UseClickProps, UseDismissProps, UseHoverProps, Placement } from '@floating-ui/react'; -export declare type DropdownRef = { - isJunipero: boolean; - opened: boolean; - toggle(): void; - open(): void; - close(): void; - innerRef: MutableRefObject; -}; -declare interface DropdownProps extends ComponentPropsWithRef { - clickOptions?: UseClickProps; - className?: string; - container?: string | Element | DocumentFragment; - disabled?: boolean; - dismissOptions?: UseDismissProps; - floatingOptions?: { - middleware?: any[]; - }; - hoverOptions?: UseHoverProps; - openend?: boolean; - placement?: Placement; - trigger?: 'click' | 'hover' | 'manual'; - onToggle?(props: { - opened: boolean; - }): void; - ref?: MutableRefObject; -} -declare const Dropdown: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; -export default Dropdown; diff --git a/packages/react/lib/DropdownGroup/index.d.ts b/packages/react/lib/DropdownGroup/index.d.ts deleted file mode 100644 index 0235c5035..000000000 --- a/packages/react/lib/DropdownGroup/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { ComponentPropsWithoutRef, ReactNode } from 'react'; -declare interface DropdownGroupProps extends ComponentPropsWithoutRef { - children?: JSX.Element | ReactNode; - className?: string; - title?: ReactNode | JSX.Element; -} -declare const DropdownGroup: { - ({ children, title, className }: DropdownGroupProps): import("react").JSX.Element; - displayName: string; - propTypes: { - title: any; - }; -}; -export default DropdownGroup; diff --git a/packages/react/lib/DropdownItem/index.d.ts b/packages/react/lib/DropdownItem/index.d.ts deleted file mode 100644 index adfc8125f..000000000 --- a/packages/react/lib/DropdownItem/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ComponentPropsWithoutRef, ReactNode } from 'react'; -declare interface DropdownItemProps extends ComponentPropsWithoutRef { - children?: ReactNode | JSX.Element; - className?: string; -} -declare const DropdownItem: { - ({ className, ...rest }: DropdownItemProps): import("react").JSX.Element; - displayName: string; -}; -export default DropdownItem; diff --git a/packages/react/lib/DropdownMenu/index.d.ts b/packages/react/lib/DropdownMenu/index.d.ts deleted file mode 100644 index a7243883f..000000000 --- a/packages/react/lib/DropdownMenu/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { ComponentPropsWithRef, MutableRefObject, ReactNode } from 'react'; -export declare type DropdownMenuRef = { - isJunipero: boolean; - innerRef: MutableRefObject; -}; -declare interface DropdownMenuProps extends ComponentPropsWithRef { - apparition?: string; - children?: ReactNode | JSX.Element; - className?: string; - animate?(menu: ReactNode | JSX.Element, opts: { - opened: boolean; - onExited: (opened: boolean) => void; - }): ReactNode | JSX.Element; - ref?: MutableRefObject; -} -declare const DropdownMenu: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; -export default DropdownMenu; diff --git a/packages/react/lib/DropdownToggle/index.d.ts b/packages/react/lib/DropdownToggle/index.d.ts deleted file mode 100644 index ec68e6284..000000000 --- a/packages/react/lib/DropdownToggle/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { MutableRefObject, ComponentPropsWithRef } from 'react'; -export declare type DropdownToggleRef = { - isJunipero: boolean; - innerRef: MutableRefObject; -}; -declare interface DropdownToggleProps extends ComponentPropsWithRef { - children?: JSX.Element; - ref?: MutableRefObject; -} -declare const DropdownToggle: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; -export default DropdownToggle; diff --git a/packages/react/lib/Droppable/index.d.ts b/packages/react/lib/Droppable/index.d.ts deleted file mode 100644 index 7be1ce3ea..000000000 --- a/packages/react/lib/Droppable/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ComponentPropsWithoutRef } from 'react'; -import { ForwardedProps } from '../utils'; -declare interface DroppableProps extends ComponentPropsWithoutRef { - className?: string; - children?: JSX.Element; - disabled?: boolean; - onDrop?(data: any, direction: 'before' | 'after', e: Event): void; - onDragOver?(e: Event, direction: 'before' | 'after'): void; - onDragLeave?(e: Event): void; -} -declare const Droppable: ForwardedProps; -export default Droppable; diff --git a/packages/react/lib/FieldAddon/index.d.ts b/packages/react/lib/FieldAddon/index.d.ts deleted file mode 100644 index 108b81f44..000000000 --- a/packages/react/lib/FieldAddon/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { ComponentPropsWithRef, ElementType, MutableRefObject, ReactNode } from 'react'; -import { ForwardedProps } from '../utils'; -export declare type FieldAddonRef = { - isJunipero: boolean; - innerRef: MutableRefObject; -}; -declare interface FieldAddonProps extends ComponentPropsWithRef { - className?: string; - children?: ReactNode | JSX.Element; - tag?: (string | ElementType); - ref?: MutableRefObject; -} -declare const FieldAddon: ForwardedProps; -export default FieldAddon; diff --git a/packages/react/lib/Slider/index.d.ts b/packages/react/lib/Slider/index.d.ts deleted file mode 100644 index 234c7e7fb..000000000 --- a/packages/react/lib/Slider/index.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { ComponentPropsWithRef, MutableRefObject, ReactNode } from 'react'; -import { ForwardedProps } from '../utils'; -export declare type SliderRef = { - isJunipero: boolean; - moving: boolean; - precision: number; - value: number; - reset: () => void; - fillRef: MutableRefObject; - handleRef: MutableRefObject; - innerRef: MutableRefObject; - slideRef: MutableRefObject; - tooltipRef: MutableRefObject; -}; -export declare interface SliderProps extends ComponentPropsWithRef { - children?: ReactNode | JSX.Element; - className?: string; - disabled?: boolean; - max?: number; - min?: number; - maxValue?: number; - minValue?: number; - step?: number; - tooltipEnabled?: boolean; - value?: number; - animateTooltip?(tooltip: ReactNode | JSX.Element, opts: { - opened: boolean; - }): ReactNode | JSX.Element; - onMove?(value: number): void; - parseTitle?(value: number): ReactNode | JSX.Element; - ref?: MutableRefObject; -} -declare const Slider: ForwardedProps; -export default Slider; diff --git a/packages/react/lib/Spinner/index.d.ts b/packages/react/lib/Spinner/index.d.ts deleted file mode 100644 index 61b903e9e..000000000 --- a/packages/react/lib/Spinner/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ComponentPropsWithoutRef } from 'react'; -export declare interface SpinnerProps extends ComponentPropsWithoutRef { - className?: string; -} -declare const Spinner: { - ({ className, ...rest }: SpinnerProps): import("react").JSX.Element; - displayName: string; -}; -export default Spinner; diff --git a/packages/react/lib/Step/index.d.ts b/packages/react/lib/Step/index.d.ts deleted file mode 100644 index bf5b5b46b..000000000 --- a/packages/react/lib/Step/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ComponentPropsWithRef, MutableRefObject, ReactNode } from 'react'; -import { ForwardedProps } from '../utils'; -export declare interface StepObject { - title: ReactNode | JSX.Element; - content: ReactNode | JSX.Element; - icon?: ReactNode | JSX.Element; -} -export declare type StepRef = { - isJunipero: boolean; - innerRef: MutableRefObject; -}; -export declare interface StepProps extends ComponentPropsWithRef { - title?: ReactNode | JSX.Element; - icon?: ReactNode | JSX.Element; - ref?: MutableRefObject; -} -declare const Step: ForwardedProps; -export default Step; diff --git a/packages/react/lib/Stepper/index.d.ts b/packages/react/lib/Stepper/index.d.ts deleted file mode 100644 index ad5633377..000000000 --- a/packages/react/lib/Stepper/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { MutableRefObject, ComponentPropsWithRef, ReactNode } from 'react'; -import { StepObject } from '../Step'; -import { ForwardedProps } from '../utils'; -export declare type StepperRef = { - active: number; - steps: Array; - isJunipero: boolean; - innerRef: MutableRefObject; -}; -export declare interface StepperProps extends ComponentPropsWithRef { - active?: number; - steps?: Array; - icon?: ReactNode | JSX.Element; - ref?: MutableRefObject; -} -declare const Stepper: ForwardedProps; -export default Stepper; diff --git a/packages/react/lib/Tab/index.d.ts b/packages/react/lib/Tab/index.d.ts deleted file mode 100644 index cfb22ae4c..000000000 --- a/packages/react/lib/Tab/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ReactNode, MutableRefObject, ComponentPropsWithRef, ElementType } from 'react'; -import { ForwardedProps } from '../utils'; -export declare interface TabObject { - title: ReactNode | JSX.Element; - content: ReactNode | JSX.Element; -} -export declare type TabRef = { - isJunipero: boolean; - innerRef: MutableRefObject; -}; -export declare interface TabProps extends ComponentPropsWithRef { - className?: string; - tag?: string | ElementType; - title?: JSX.Element | ReactNode; - ref?: MutableRefObject; -} -declare const Tab: ForwardedProps; -export default Tab; diff --git a/packages/react/lib/Tabs/index.d.ts b/packages/react/lib/Tabs/index.d.ts deleted file mode 100644 index 34e43c932..000000000 --- a/packages/react/lib/Tabs/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { MutableRefObject, ComponentPropsWithRef, ReactNode } from 'react'; -import { TabObject } from '../Tab'; -import { ForwardedProps } from '../utils'; -export declare type TabsRef = { - activeTab: number; - tabs: Array; - isJunipero: boolean; - innerRef: MutableRefObject; -}; -export declare interface TabsProps extends ComponentPropsWithRef { - active?: number; - children?: ReactNode | JSX.Element; - className?: string; - disabled?: boolean; - tabs?: Array; - filterTab?(child: ReactNode | JSX.Element): boolean; - onToggle?(index: number): void; - ref?: MutableRefObject; -} -declare const Tabs: ForwardedProps; -export default Tabs; diff --git a/packages/react/lib/Tag/index.d.ts b/packages/react/lib/Tag/index.d.ts deleted file mode 100644 index efb92b12c..000000000 --- a/packages/react/lib/Tag/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ComponentPropsWithRef, ElementType, MutableRefObject, ReactNode } from 'react'; -import { ForwardedProps } from '../utils'; -export declare type TagRef = { - isJunipero: boolean; - innerRef: MutableRefObject; -}; -export declare interface TagProps extends ComponentPropsWithRef { - children?: ReactNode | JSX.Element; - className?: string; - tag?: string | ElementType; - onDelete?: () => void; - ref?: MutableRefObject; -} -declare const Tag: ForwardedProps; -export default Tag; diff --git a/packages/react/lib/TextField/index.d.ts b/packages/react/lib/TextField/index.d.ts deleted file mode 100644 index 696764daf..000000000 --- a/packages/react/lib/TextField/index.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { ComponentPropsWithRef, MutableRefObject, ReactNode, WheelEvent } from 'react'; -export declare type TextFieldRef = { - dirty: boolean; - focused: boolean; - isJunipero: boolean; - valid: boolean; - value: string | number; - blur(): void; - focus(): void; - reset(): void; - setDirty(dirty: boolean): void; - innerRef: MutableRefObject; - inputRef: MutableRefObject; -}; -export declare interface TextFieldProps extends ComponentPropsWithRef { - autoFocus?: boolean; - children?: ReactNode | JSX.Element; - className?: string; - disabled?: boolean; - required?: boolean; - type?: string; - valid?: boolean; - value?: string | number; - onBlur?(event: Event): void; - onChange?(field: { - value: string | number; - valid: boolean; - dirty: boolean; - }): void; - onFocus?(event: Event): void; - onWheel?(event: WheelEvent): void; - onValidate?(val: string | number, flags: { - required: boolean; - dirty: boolean; - }): boolean; - ref?: MutableRefObject; -} -declare const TextField: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; -export default TextField; diff --git a/packages/react/lib/Toast/index.d.ts b/packages/react/lib/Toast/index.d.ts deleted file mode 100644 index 717b90dc2..000000000 --- a/packages/react/lib/Toast/index.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { ReactNode, ComponentPropsWithRef, ElementType, MutableRefObject } from 'react'; -import { ForwardedProps } from '../utils'; -export declare type ToastRef = { - enabled: boolean; - isJunipero: boolean; - paused: boolean; - remaining: number; - innerRef: MutableRefObject; -}; -export declare interface ToastObject { - animationTimeout?: number; - content?: ReactNode | JSX.Element; - duration?: number; - index?: string | number; - lifespan?: number; - animate?(alert: ReactNode | JSX.Element, opts: { - opened: boolean; - index: string | number; - }): JSX.Element; - onDismiss?(index?: string | number): any; -} -export declare interface ToastProps extends ComponentPropsWithRef { - animationTimeout?: number; - children?: ReactNode | JSX.Element; - className?: string; - index?: string | number; - lifespan?: number; - tag?: string | ElementType; - animate?(alert: ReactNode | JSX.Element, opts?: { - opened: boolean; - index: string | number; - }): JSX.Element; - onDismiss?(index?: string | number): any; - ref?: MutableRefObject; -} -declare const Toast: ForwardedProps; -export default Toast; diff --git a/packages/react/lib/Toasts/index.d.ts b/packages/react/lib/Toasts/index.d.ts deleted file mode 100644 index 4609a5782..000000000 --- a/packages/react/lib/Toasts/index.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { ComponentPropsWithRef, MutableRefObject } from 'react'; -import { ToastObject } from '../Toast'; -import { ForwardedProps } from '../utils'; -export declare type ToastsRef = { - isJunipero: boolean; - toasts: Array; - innerRef: MutableRefObject; -}; -export declare interface ToastsProps extends ComponentPropsWithRef { - animationTimeout?: number; - className?: string; - animateToast?(toast: JSX.Element, opts: { - opened: boolean; - index: string | number; - }): JSX.Element; - ref?: MutableRefObject; -} -declare const Toasts: ForwardedProps; -export default Toasts; diff --git a/packages/react/lib/ToastsControl/index.d.ts b/packages/react/lib/ToastsControl/index.d.ts deleted file mode 100644 index b36f62a32..000000000 --- a/packages/react/lib/ToastsControl/index.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { ComponentPropsWithoutRef, MutableRefObject } from 'react'; -import { ToastObject } from '../Toast'; -import { ForwardedProps } from '../utils'; -export declare type ToastsControlRef = { - isJunipero: boolean; - toasts: Array; - add(toast: ToastObject): void; - dismiss(toast: ToastObject, index: string | number): void; -}; -export declare interface ToastsControlProps extends ComponentPropsWithoutRef { - toasts?: Array; - generateId?(toast: ToastObject): string | number; - ref?: MutableRefObject; -} -declare const ToastsControl: ForwardedProps; -export default ToastsControl; diff --git a/packages/react/lib/Toggle/index.d.ts b/packages/react/lib/Toggle/index.d.ts deleted file mode 100644 index f172e9062..000000000 --- a/packages/react/lib/Toggle/index.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentPropsWithRef, MutableRefObject, ReactNode } from 'react'; -import { ForwardedProps } from '../utils'; -export declare type ToggleRef = { - checked: boolean; - isJunipero: boolean; - innerRef: MutableRefObject; - inputRef: MutableRefObject; -}; -declare interface ToggleProps extends ComponentPropsWithRef { - checked?: boolean; - children?: ReactNode | JSX.Element; - className?: string; - disabled?: boolean; - tabIndex?: number; - value?: any; - onChange?(field: { - value: any; - checked: boolean; - }): void; - ref?: MutableRefObject; -} -declare const Toggle: ForwardedProps; -export default Toggle; diff --git a/packages/react/lib/Tooltip/index.d.ts b/packages/react/lib/Tooltip/index.d.ts deleted file mode 100644 index b49f136e0..000000000 --- a/packages/react/lib/Tooltip/index.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { MutableRefObject, ComponentPropsWithRef, ReactNode } from 'react'; -import { UseDismissProps, UseClickProps, UseHoverProps, Placement } from '@floating-ui/react'; -import { ForwardedProps } from '../utils'; -export declare type TooltipRef = { - opened: boolean; - open(): void; - close(): void; - toggle(): void; - update(): void; - innerRef: MutableRefObject; - handleRef: MutableRefObject; - isJunipero: boolean; -}; -export declare interface TooltipProps extends ComponentPropsWithRef { - apparition?: string; - children?: ReactNode | JSX.Element; - className?: string; - clickOptions?: UseClickProps; - container?: Element | DocumentFragment; - disabled?: boolean; - dismissOptions?: UseDismissProps; - floatingOptions?: any; - hoverOptions?: UseHoverProps; - opened?: boolean; - text?: string | ReactNode | JSX.Element; - placement?: Placement; - trigger?: string; - animate?(tooltipInner: ReactNode | JSX.Element, opts?: { - opened?: boolean; - onExited?: () => void; - }): JSX.Element | ReactNode; - onToggle?(props: { - opened: boolean; - }): void; - ref?: MutableRefObject; -} -declare const Tooltip: ForwardedProps; -export default Tooltip; diff --git a/packages/react/lib/TouchableZone/index.d.ts b/packages/react/lib/TouchableZone/index.d.ts deleted file mode 100644 index 15d65d8cd..000000000 --- a/packages/react/lib/TouchableZone/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ComponentPropsWithRef, ElementType, ReactNode } from 'react'; -import { ForwardedProps } from '../utils'; -declare interface TouchableZoneProps extends ComponentPropsWithRef { - children?: ReactNode | JSX.Element; - className?: string; - tag?: string | ElementType; -} -declare const TouchableZone: ForwardedProps; -export default TouchableZone; diff --git a/packages/react/lib/Transition/index.d.ts b/packages/react/lib/Transition/index.d.ts deleted file mode 100644 index 17a9bf0f0..000000000 --- a/packages/react/lib/Transition/index.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { ComponentPropsWithRef } from 'react'; -declare type TimeoutObject = { - enter?: number; - exit?: number; -}; -declare interface TransitionProps extends ComponentPropsWithRef { - children?: JSX.Element; - in: boolean; - mounterOnEnter?: boolean; - name?: string; - timeout?: number | TimeoutObject; - unmountOnExit?: boolean; - onEnter?(): void; - onEntering?(): void; - onEntered?(): void; - onExit?(): void; - onExiting?(): void; - onExited?(): void; -} -declare const Transition: { - ({ children, in: inProp, name, timeout, mountOnEnter, unmountOnExit, onEnter, onEntering, onEntered, onExit, onExiting, onExited, ...rest }: TransitionProps): import("react").FunctionComponentElement; - displayName: string; - propTypes: { - in: any; - name: any; - timeout: any; - mountOnEnter: any; - unmountOnExit: any; - onEnter: any; - onEntering: any; - onEntered: any; - onExit: any; - onExiting: any; - onExited: any; - }; -}; -export default Transition; diff --git a/packages/react/rollup.config.mjs b/packages/react/rollup.config.mjs index d170df36d..32249f62a 100644 --- a/packages/react/rollup.config.mjs +++ b/packages/react/rollup.config.mjs @@ -29,8 +29,8 @@ const defaultPlugins = [ }), alias({ entries: { - '@junipero/core': path.resolve('../core/lib'), - '@junipero/hooks': path.resolve('../hooks/lib'), + '@junipero/core': path.resolve('../core/dist/esm'), // TODO rework aliases + '@junipero/hooks': path.resolve('../hooks/dist/esm'), }, }), resolve({ @@ -44,10 +44,10 @@ export default [ input, plugins: [ typescript({ - rootDir: path.resolve('./lib'), emitDeclarationOnly: true, declaration: true, project: path.resolve('./tsconfig.build.json'), + declarationDir: path.resolve('./@types'), ...f === 'esm' ? { declarationDir: path.resolve('./dist/esm') } : {}, }), @@ -82,7 +82,7 @@ export default [ } : {}), }, })), { - input: './dist/dts/index.d.ts', + input: './dist/@types/index.d.ts', output: [{ file: `dist/${name}.d.ts`, format: 'es' }], plugins: [dts()], }, diff --git a/packages/react/tsconfig.build.json b/packages/react/tsconfig.build.json index 2bce44cc4..4c0e44199 100644 --- a/packages/react/tsconfig.build.json +++ b/packages/react/tsconfig.build.json @@ -5,6 +5,7 @@ "emitDeclarationOnly": true, "declaration": true, "jsx": "react-jsx", - "allowJs": false + "allowJs": false, + "rootDir": "./" } } \ No newline at end of file diff --git a/packages/react/tsconfig.json b/packages/react/tsconfig.json index c563b4a90..d7c3c106a 100644 --- a/packages/react/tsconfig.json +++ b/packages/react/tsconfig.json @@ -2,6 +2,6 @@ "extends": "../../tsconfig.json", "include": ["./lib/**/*"], "compilerOptions": { - "declarationDir": "dist/dts", + "declarationDir": "./dist/@types", } } \ No newline at end of file