From d06f2fa353f09fe9df439fbd5686cd79dee94b3e Mon Sep 17 00:00:00 2001 From: Ugo Stephant Date: Thu, 28 Sep 2023 13:55:21 +0200 Subject: [PATCH] fix(react): a lot ofmissing type exports --- packages/react/lib/Abstract/index.d.ts | 2 +- packages/react/lib/Alert/index.d.ts | 2 +- packages/react/lib/Alerts/index.d.ts | 2 +- packages/react/lib/AlertsControl/index.d.ts | 3 +- packages/react/lib/Badge/index.d.ts | 2 +- packages/react/lib/BreadCrumb/index.d.ts | 2 +- packages/react/lib/BreadCrumbItem/index.d.ts | 3 +- packages/react/lib/Button/index.d.ts | 2 +- packages/react/lib/Calendar/index.d.ts | 2 +- packages/react/lib/Card/index.d.ts | 2 +- packages/react/lib/CheckboxField/index.d.ts | 2 +- packages/react/lib/CodeField/index.d.ts | 2 +- packages/react/lib/ColorField/index.d.ts | 2 +- packages/react/lib/DateField/index.d.ts | 2 +- packages/react/lib/Draggable/index.d.ts | 2 +- packages/react/lib/Dropdown/index.d.ts | 2 +- packages/react/lib/DropdownGroup/index.d.ts | 3 +- packages/react/lib/DropdownItem/index.d.ts | 3 +- packages/react/lib/DropdownMenu/index.d.ts | 2 +- packages/react/lib/DropdownToggle/index.d.ts | 3 +- packages/react/lib/Droppable/index.d.ts | 2 +- packages/react/lib/FieldAddon/index.d.ts | 2 +- packages/react/lib/FieldGroup/index.d.ts | 2 +- packages/react/lib/Label/index.d.ts | 2 +- packages/react/lib/List/index.d.ts | 2 +- packages/react/lib/ListCell/index.d.ts | 2 +- packages/react/lib/ListColumn/index.d.ts | 2 +- packages/react/lib/ListItem/index.d.ts | 2 +- packages/react/lib/Modal/index.d.ts | 2 +- packages/react/lib/RadioField/index.d.ts | 2 +- packages/react/lib/SelectField/index.d.ts | 2 +- packages/react/lib/Slider/index.d.ts | 2 +- packages/react/lib/Spinner/index.d.ts | 2 +- packages/react/lib/Step/index.d.ts | 3 +- packages/react/lib/Stepper/index.d.ts | 2 +- packages/react/lib/Tab/index.d.ts | 3 +- packages/react/lib/Tabs/index.d.ts | 2 +- packages/react/lib/Tag/index.d.ts | 2 +- packages/react/lib/TextField/index.d.ts | 2 +- packages/react/lib/Toast/index.d.ts | 2 +- packages/react/lib/Toasts/index.d.ts | 2 +- packages/react/lib/ToastsControl/index.d.ts | 3 +- packages/react/lib/Toggle/index.d.ts | 2 +- packages/react/lib/Tooltip/index.d.ts | 4 +- packages/react/lib/TouchableZone/index.d.ts | 2 +- packages/react/lib/Transition/index.d.ts | 2 +- packages/react/lib/hooks.d.ts | 30 +- packages/react/lib/index.d.ts | 279 +++++++++++++++---- 48 files changed, 305 insertions(+), 106 deletions(-) diff --git a/packages/react/lib/Abstract/index.d.ts b/packages/react/lib/Abstract/index.d.ts index 7ed418efe..14672d8b9 100644 --- a/packages/react/lib/Abstract/index.d.ts +++ b/packages/react/lib/Abstract/index.d.ts @@ -1,6 +1,6 @@ import { ReactNode, ComponentPropsWithoutRef } from 'react'; -declare interface AbstractProps extends ComponentPropsWithoutRef { +export declare interface AbstractProps extends ComponentPropsWithoutRef { className?: string; children?: ReactNode | JSX.Element; } diff --git a/packages/react/lib/Alert/index.d.ts b/packages/react/lib/Alert/index.d.ts index 6aa2cc08f..3beeecf12 100644 --- a/packages/react/lib/Alert/index.d.ts +++ b/packages/react/lib/Alert/index.d.ts @@ -10,7 +10,7 @@ export declare type AlertRef = { innerRef: MutableRefObject; }; -declare interface AlertProps extends ComponentPropsWithRef { +export declare interface AlertProps extends ComponentPropsWithRef { animationTimeout?: number; children?: ReactNode | JSX.Element; className?: string; diff --git a/packages/react/lib/Alerts/index.d.ts b/packages/react/lib/Alerts/index.d.ts index 00ced5395..dff2ca594 100644 --- a/packages/react/lib/Alerts/index.d.ts +++ b/packages/react/lib/Alerts/index.d.ts @@ -8,7 +8,7 @@ export declare type AlertsRef = { innerRef: MutableRefObject; }; -declare interface AlertsProps extends ComponentPropsWithRef { +export declare interface AlertsProps extends ComponentPropsWithRef { animationTimeout?: number; className?: string; icons?: { diff --git a/packages/react/lib/AlertsControl/index.d.ts b/packages/react/lib/AlertsControl/index.d.ts index c71dcab42..f0f3fb249 100644 --- a/packages/react/lib/AlertsControl/index.d.ts +++ b/packages/react/lib/AlertsControl/index.d.ts @@ -9,7 +9,8 @@ export declare type AlertsControlRef = { dismiss(alert: AlertObject): void; }; -declare interface AlertsControlProps extends ComponentPropsWithoutRef { +export declare interface AlertsControlProps + extends ComponentPropsWithoutRef { alerts?: Array; generateId(alert: AlertObject): string | number; ref?: MutableRefObject; diff --git a/packages/react/lib/Badge/index.d.ts b/packages/react/lib/Badge/index.d.ts index fe758634e..ed93b764e 100644 --- a/packages/react/lib/Badge/index.d.ts +++ b/packages/react/lib/Badge/index.d.ts @@ -10,7 +10,7 @@ export declare type BadgeRef = { innerRef: MutableRefObject; }; -declare interface BadgeProps extends ComponentPropsWithRef { +export declare interface BadgeProps extends ComponentPropsWithRef { children?: ReactNode | JSX.Element; className?: string; tag?: string | ElementType; diff --git a/packages/react/lib/BreadCrumb/index.d.ts b/packages/react/lib/BreadCrumb/index.d.ts index 81866859e..79d65d6a4 100644 --- a/packages/react/lib/BreadCrumb/index.d.ts +++ b/packages/react/lib/BreadCrumb/index.d.ts @@ -6,7 +6,7 @@ export declare type BreadCrumbRef = { innerRef: MutableRefObject; }; -declare interface BreadCrumbProps extends ComponentPropsWithRef { +export declare interface BreadCrumbProps extends ComponentPropsWithRef { children?: ReactNode | JSX.Element; className?: string; items?: Array; diff --git a/packages/react/lib/BreadCrumbItem/index.d.ts b/packages/react/lib/BreadCrumbItem/index.d.ts index 74589e644..b7de2dc81 100644 --- a/packages/react/lib/BreadCrumbItem/index.d.ts +++ b/packages/react/lib/BreadCrumbItem/index.d.ts @@ -10,7 +10,8 @@ export declare type BreadCrumbItemRef = { innerRef: MutableRefObject; }; -declare interface BreadCrumbItemProps extends ComponentPropsWithRef { +export declare interface BreadCrumbItemProps + extends ComponentPropsWithRef { className?: string; children?: ReactNode | JSX.Element; tag?: string | ElementType; diff --git a/packages/react/lib/Button/index.d.ts b/packages/react/lib/Button/index.d.ts index 3d26a4b86..31128dc05 100644 --- a/packages/react/lib/Button/index.d.ts +++ b/packages/react/lib/Button/index.d.ts @@ -10,7 +10,7 @@ export declare type ButtonRef = { innerRef: MutableRefObject; }; -declare interface ButtonProps extends ComponentPropsWithRef { +export declare interface ButtonProps extends ComponentPropsWithRef { className?: string; children?: ReactNode | JSX.Element; disabled?: boolean; diff --git a/packages/react/lib/Calendar/index.d.ts b/packages/react/lib/Calendar/index.d.ts index d2c94554e..5b8bd7904 100644 --- a/packages/react/lib/Calendar/index.d.ts +++ b/packages/react/lib/Calendar/index.d.ts @@ -8,7 +8,7 @@ export declare type CalendarRef = { innerRef: MutableRefObject; }; -declare interface CalendarProps extends ComponentPropsWithRef { +export declare interface CalendarProps extends ComponentPropsWithRef { active?: Date; className?: string; disabled?: boolean; diff --git a/packages/react/lib/Card/index.d.ts b/packages/react/lib/Card/index.d.ts index e9470dd5c..534092927 100644 --- a/packages/react/lib/Card/index.d.ts +++ b/packages/react/lib/Card/index.d.ts @@ -10,7 +10,7 @@ export declare type CardRef = { innerRef: MutableRefObject; }; -declare interface CardProps extends ComponentPropsWithRef { +export declare interface CardProps extends ComponentPropsWithRef { children?: ReactNode | JSX.Element; className?: string; tag?: string | ElementType; diff --git a/packages/react/lib/CheckboxField/index.d.ts b/packages/react/lib/CheckboxField/index.d.ts index f99ea623d..6d43643d1 100644 --- a/packages/react/lib/CheckboxField/index.d.ts +++ b/packages/react/lib/CheckboxField/index.d.ts @@ -7,7 +7,7 @@ export declare type CheckboxFieldRef = { inputRef: MutableRefObject; }; -declare interface CheckboxFieldProps extends ComponentPropsWithRef { +export declare interface CheckboxFieldProps extends ComponentPropsWithRef { checked?: boolean; children?: ReactNode | JSX.Element; className?: string; diff --git a/packages/react/lib/CodeField/index.d.ts b/packages/react/lib/CodeField/index.d.ts index e55a4d793..c4531569e 100644 --- a/packages/react/lib/CodeField/index.d.ts +++ b/packages/react/lib/CodeField/index.d.ts @@ -12,7 +12,7 @@ export declare type CodeFieldRef = { inputsRef: Array>; }; -declare interface CodeFieldProps extends ComponentPropsWithRef { +export declare interface CodeFieldProps extends ComponentPropsWithRef { autoFocus?: boolean; disabled?: boolean; className?: string; diff --git a/packages/react/lib/ColorField/index.d.ts b/packages/react/lib/ColorField/index.d.ts index af0260dae..d696cb971 100644 --- a/packages/react/lib/ColorField/index.d.ts +++ b/packages/react/lib/ColorField/index.d.ts @@ -19,7 +19,7 @@ export declare type ColorFieldRef = { textFieldRef: MutableRefObject; }; -declare interface ColorFieldProps extends ComponentPropsWithRef { +export declare interface ColorFieldProps extends ComponentPropsWithRef { autoFocus?: boolean; className?: string; disabled?: boolean; diff --git a/packages/react/lib/DateField/index.d.ts b/packages/react/lib/DateField/index.d.ts index 200386a03..ef48cebb9 100644 --- a/packages/react/lib/DateField/index.d.ts +++ b/packages/react/lib/DateField/index.d.ts @@ -20,7 +20,7 @@ export declare type DateFieldRef = { timeInputRef: MutableRefObject; }; -declare interface DateFieldProps extends ComponentPropsWithRef { +export declare interface DateFieldProps extends ComponentPropsWithRef { autoFocus?: boolean; className?: string; clearable?: boolean; diff --git a/packages/react/lib/Draggable/index.d.ts b/packages/react/lib/Draggable/index.d.ts index 36781ae4b..11972cc38 100644 --- a/packages/react/lib/Draggable/index.d.ts +++ b/packages/react/lib/Draggable/index.d.ts @@ -1,6 +1,6 @@ import { ComponentPropsWithRef, ReactNode } from 'react'; -declare interface DraggableProps extends ComponentPropsWithRef { +export declare interface DraggableProps extends ComponentPropsWithRef { children?: ReactNode | JSX.Element; className?: string; data?: any; diff --git a/packages/react/lib/Dropdown/index.d.ts b/packages/react/lib/Dropdown/index.d.ts index 364646fb9..8e17353c3 100644 --- a/packages/react/lib/Dropdown/index.d.ts +++ b/packages/react/lib/Dropdown/index.d.ts @@ -15,7 +15,7 @@ export declare type DropdownRef = { innerRef: MutableRefObject; }; -declare interface DropdownProps extends ComponentPropsWithRef { +export declare interface DropdownProps extends ComponentPropsWithRef { clickOptions?: UseClickProps; className?: string; container?: string | Element | DocumentFragment; diff --git a/packages/react/lib/DropdownGroup/index.d.ts b/packages/react/lib/DropdownGroup/index.d.ts index f705c6fca..97fb2be4c 100644 --- a/packages/react/lib/DropdownGroup/index.d.ts +++ b/packages/react/lib/DropdownGroup/index.d.ts @@ -1,6 +1,7 @@ import { ReactNode, ComponentPropsWithoutRef } from 'react'; -declare interface DropdownGroupProps extends ComponentPropsWithoutRef { +export declare interface DropdownGroupProps + extends ComponentPropsWithoutRef { children?: ReactNode | JSX.Element; className?: string; title?: ReactNode | JSX.Element; diff --git a/packages/react/lib/DropdownItem/index.d.ts b/packages/react/lib/DropdownItem/index.d.ts index b79e19c45..a72905a5a 100644 --- a/packages/react/lib/DropdownItem/index.d.ts +++ b/packages/react/lib/DropdownItem/index.d.ts @@ -1,6 +1,7 @@ import { ReactNode, ComponentPropsWithoutRef } from 'react'; -declare interface DropdownItemProps extends ComponentPropsWithoutRef { +export declare interface DropdownItemProps + extends ComponentPropsWithoutRef { children?: ReactNode | JSX.Element; className?: string; } diff --git a/packages/react/lib/DropdownMenu/index.d.ts b/packages/react/lib/DropdownMenu/index.d.ts index 6374f5540..7ddc3fef1 100644 --- a/packages/react/lib/DropdownMenu/index.d.ts +++ b/packages/react/lib/DropdownMenu/index.d.ts @@ -5,7 +5,7 @@ export declare type DropdownMenuRef = { innerRef: MutableRefObject; }; -declare interface DropdownMenuProps extends ComponentPropsWithRef { +export declare interface DropdownMenuProps extends ComponentPropsWithRef { apparition?: string; children?: ReactNode | JSX.Element; className?: string; diff --git a/packages/react/lib/DropdownToggle/index.d.ts b/packages/react/lib/DropdownToggle/index.d.ts index f4695a2d5..7a738b443 100644 --- a/packages/react/lib/DropdownToggle/index.d.ts +++ b/packages/react/lib/DropdownToggle/index.d.ts @@ -5,7 +5,8 @@ export declare type DropdownToggleRef = { innerRef: MutableRefObject; }; -declare interface DropdownToggleProps extends ComponentPropsWithRef { +export declare interface DropdownToggleProps + extends ComponentPropsWithRef { children?: ReactNode | JSX.Element; ref?: MutableRefObject; } diff --git a/packages/react/lib/Droppable/index.d.ts b/packages/react/lib/Droppable/index.d.ts index 173aeba74..f7c76255a 100644 --- a/packages/react/lib/Droppable/index.d.ts +++ b/packages/react/lib/Droppable/index.d.ts @@ -1,6 +1,6 @@ import { ComponentPropsWithoutRef, ReactNode } from 'react'; -declare interface DroppableProps extends ComponentPropsWithoutRef { +export declare interface DroppableProps extends ComponentPropsWithoutRef { className?: string; children?: ReactNode | JSX.Element; disabled?: boolean; diff --git a/packages/react/lib/FieldAddon/index.d.ts b/packages/react/lib/FieldAddon/index.d.ts index cb8329165..4a7997b03 100644 --- a/packages/react/lib/FieldAddon/index.d.ts +++ b/packages/react/lib/FieldAddon/index.d.ts @@ -10,7 +10,7 @@ export declare type FieldAddonRef = { innerRef: MutableRefObject; }; -declare interface FieldAddonProps extends ComponentPropsWithRef { +export declare interface FieldAddonProps extends ComponentPropsWithRef { className?: string; children?: ReactNode | JSX.Element; tag?: string | ElementType; diff --git a/packages/react/lib/FieldGroup/index.d.ts b/packages/react/lib/FieldGroup/index.d.ts index edb18dc24..9c5c8b5dc 100644 --- a/packages/react/lib/FieldGroup/index.d.ts +++ b/packages/react/lib/FieldGroup/index.d.ts @@ -10,7 +10,7 @@ export declare type FieldGroupRef = { innerRef: MutableRefObject; }; -declare interface FieldGroupProps extends ComponentPropsWithRef { +export declare interface FieldGroupProps extends ComponentPropsWithRef { className?: string; children?: ReactNode | JSX.Element; tag?: string | ElementType; diff --git a/packages/react/lib/Label/index.d.ts b/packages/react/lib/Label/index.d.ts index 70638e3e3..f44b9c114 100644 --- a/packages/react/lib/Label/index.d.ts +++ b/packages/react/lib/Label/index.d.ts @@ -1,6 +1,6 @@ import { ReactNode, ComponentPropsWithoutRef } from 'react'; -declare interface LabelProps extends ComponentPropsWithoutRef { +export declare interface LabelProps extends ComponentPropsWithoutRef { className?: string; } diff --git a/packages/react/lib/List/index.d.ts b/packages/react/lib/List/index.d.ts index 402a6b006..3977c62ac 100644 --- a/packages/react/lib/List/index.d.ts +++ b/packages/react/lib/List/index.d.ts @@ -11,7 +11,7 @@ export declare type ListRef = { innerRef: MutableRefObject; }; -declare interface ListProps extends ComponentPropsWithRef { +export declare interface ListProps extends ComponentPropsWithRef { columns?: Array; onOrder?(order: { column: string | number; asc: boolean | null }): void; ref?: MutableRefObject; diff --git a/packages/react/lib/ListCell/index.d.ts b/packages/react/lib/ListCell/index.d.ts index 9bcbfc967..6d525d2ef 100644 --- a/packages/react/lib/ListCell/index.d.ts +++ b/packages/react/lib/ListCell/index.d.ts @@ -5,7 +5,7 @@ export declare type ListCellRef = { innerRef: MutableRefObject; }; -declare interface ListCellProps extends ComponentPropsWithRef { +export declare interface ListCellProps extends ComponentPropsWithRef { ref?: MutableRefObject; } diff --git a/packages/react/lib/ListColumn/index.d.ts b/packages/react/lib/ListColumn/index.d.ts index 5e23083c2..aca3456d7 100644 --- a/packages/react/lib/ListColumn/index.d.ts +++ b/packages/react/lib/ListColumn/index.d.ts @@ -10,7 +10,7 @@ export declare type ListColumnRef = { isJunipero: boolean; }; -declare interface ListColumnProps extends ComponentPropsWithRef { +export declare interface ListColumnProps extends ComponentPropsWithRef { id: string | number; children?: ReactNode | JSX.Element; ref?: MutableRefObject; diff --git a/packages/react/lib/ListItem/index.d.ts b/packages/react/lib/ListItem/index.d.ts index 1cebbe427..aece68944 100644 --- a/packages/react/lib/ListItem/index.d.ts +++ b/packages/react/lib/ListItem/index.d.ts @@ -5,7 +5,7 @@ export declare type ListItemRef = { innerRef: MutableRefObject; }; -declare interface ListItemProps extends ComponentPropsWithRef { +export declare interface ListItemProps extends ComponentPropsWithRef { item?: Array; children?: ReactNode | JSX.Element; ref?: MutableRefObject; diff --git a/packages/react/lib/Modal/index.d.ts b/packages/react/lib/Modal/index.d.ts index 17ad1d45d..eb924bcbd 100644 --- a/packages/react/lib/Modal/index.d.ts +++ b/packages/react/lib/Modal/index.d.ts @@ -12,7 +12,7 @@ export declare type ModalRef = { wrapperRef: MutableRefObject; }; -declare interface ModalProps extends ComponentPropsWithRef { +export declare interface ModalProps extends ComponentPropsWithRef { apparition?: string; children?: ReactNode | JSX.Element; className?: string; diff --git a/packages/react/lib/RadioField/index.d.ts b/packages/react/lib/RadioField/index.d.ts index 35a29406f..4f7b65df2 100644 --- a/packages/react/lib/RadioField/index.d.ts +++ b/packages/react/lib/RadioField/index.d.ts @@ -10,7 +10,7 @@ export declare type RadioFieldRef = { optionRefs: Array>; }; -declare interface RadioFieldProps extends ComponentPropsWithRef { +export declare interface RadioFieldProps extends ComponentPropsWithRef { className?: string; disabled?: boolean; name?: string; diff --git a/packages/react/lib/SelectField/index.d.ts b/packages/react/lib/SelectField/index.d.ts index 07f01292c..4a731a9ea 100644 --- a/packages/react/lib/SelectField/index.d.ts +++ b/packages/react/lib/SelectField/index.d.ts @@ -14,7 +14,7 @@ export declare type SelectFieldRef = { searchInputRef: MutableRefObject; }; -declare interface SelectFieldProps extends ComponentPropsWithRef { +export declare interface SelectFieldProps extends ComponentPropsWithRef { allowArbitraryItems?: boolean; autoFocus?: boolean; className?: string; diff --git a/packages/react/lib/Slider/index.d.ts b/packages/react/lib/Slider/index.d.ts index 554c0a7d8..2baa6ff80 100644 --- a/packages/react/lib/Slider/index.d.ts +++ b/packages/react/lib/Slider/index.d.ts @@ -13,7 +13,7 @@ export declare type SliderRef = { tooltipRef: MutableRefObject; }; -declare interface SliderProps extends ComponentPropsWithRef { +export declare interface SliderProps extends ComponentPropsWithRef { children?: ReactNode | JSX.Element; className?: string; disabled: boolean; diff --git a/packages/react/lib/Spinner/index.d.ts b/packages/react/lib/Spinner/index.d.ts index a0656e4a3..64950bc4f 100644 --- a/packages/react/lib/Spinner/index.d.ts +++ b/packages/react/lib/Spinner/index.d.ts @@ -1,6 +1,6 @@ import { ReactNode, ComponentPropsWithoutRef } from 'react'; -declare interface SpinnerProps extends ComponentPropsWithoutRef { +export declare interface SpinnerProps extends ComponentPropsWithoutRef { className?: string; } diff --git a/packages/react/lib/Step/index.d.ts b/packages/react/lib/Step/index.d.ts index 14381754d..69a1c93c7 100644 --- a/packages/react/lib/Step/index.d.ts +++ b/packages/react/lib/Step/index.d.ts @@ -15,11 +15,12 @@ export declare type StepRef = { innerRef: MutableRefObject; }; -declare interface StepProps extends ComponentPropsWithRef { +export declare interface StepProps extends ComponentPropsWithRef { title?: string; icon?: ReactNode | JSX.Element; ref?: MutableRefObject; } + declare function Step(props: StepProps): ReactNode | JSX.Element; export default Step; diff --git a/packages/react/lib/Stepper/index.d.ts b/packages/react/lib/Stepper/index.d.ts index 6c5db60ba..f0c52e00a 100644 --- a/packages/react/lib/Stepper/index.d.ts +++ b/packages/react/lib/Stepper/index.d.ts @@ -9,7 +9,7 @@ export declare type StepperRef = { innerRef: MutableRefObject; }; -declare interface StepperProps extends ComponentPropsWithRef { +export declare interface StepperProps extends ComponentPropsWithRef { active?: number; steps?: Array; icon: ReactNode | JSX.Element; diff --git a/packages/react/lib/Tab/index.d.ts b/packages/react/lib/Tab/index.d.ts index 00fd0105b..762e05ee1 100644 --- a/packages/react/lib/Tab/index.d.ts +++ b/packages/react/lib/Tab/index.d.ts @@ -15,12 +15,13 @@ export declare type TabRef = { innerRef: MutableRefObject; }; -declare interface TabProps extends ComponentPropsWithRef { +export declare interface TabProps extends ComponentPropsWithRef { className?: string; tag?: string | ElementType; title?: string; ref?: MutableRefObject; } + declare function Tab(props: TabProps): ReactNode | JSX.Element; export default Tab; diff --git a/packages/react/lib/Tabs/index.d.ts b/packages/react/lib/Tabs/index.d.ts index 367cdd909..f0e0069b5 100644 --- a/packages/react/lib/Tabs/index.d.ts +++ b/packages/react/lib/Tabs/index.d.ts @@ -9,7 +9,7 @@ export declare type TabsRef = { innerRef: MutableRefObject; }; -declare interface TabsProps extends ComponentPropsWithRef { +export declare interface TabsProps extends ComponentPropsWithRef { active?: number; children?: ReactNode | JSX.Element; className?: string; diff --git a/packages/react/lib/Tag/index.d.ts b/packages/react/lib/Tag/index.d.ts index 5f5d961dd..77882222d 100644 --- a/packages/react/lib/Tag/index.d.ts +++ b/packages/react/lib/Tag/index.d.ts @@ -10,7 +10,7 @@ export declare type TagRef = { innerRef: MutableRefObject; }; -declare interface TagProps extends ComponentPropsWithRef { +export declare interface TagProps extends ComponentPropsWithRef { children?: ReactNode | JSX.Element; className?: string; tag?: string | ElementType; diff --git a/packages/react/lib/TextField/index.d.ts b/packages/react/lib/TextField/index.d.ts index a38ac76ef..afb3c2689 100644 --- a/packages/react/lib/TextField/index.d.ts +++ b/packages/react/lib/TextField/index.d.ts @@ -14,7 +14,7 @@ export declare type TextFieldRef = { inputRef: MutableRefObject; }; -declare interface TextFieldProps extends ComponentPropsWithRef { +export declare interface TextFieldProps extends ComponentPropsWithRef { autoFocus?: boolean; children?: ReactNode | JSX.Element; className?: string; diff --git a/packages/react/lib/Toast/index.d.ts b/packages/react/lib/Toast/index.d.ts index 2ec5a90b4..612ac2f81 100644 --- a/packages/react/lib/Toast/index.d.ts +++ b/packages/react/lib/Toast/index.d.ts @@ -26,7 +26,7 @@ export declare interface ToastObject { onDismiss?(index?: string | number): any; } -declare interface ToastProps extends ComponentPropsWithRef { +export declare interface ToastProps extends ComponentPropsWithRef { animationTimeout?: number; children?: ReactNode | JSX.Element; className?: string; diff --git a/packages/react/lib/Toasts/index.d.ts b/packages/react/lib/Toasts/index.d.ts index 1db0fdc39..2e56f5196 100644 --- a/packages/react/lib/Toasts/index.d.ts +++ b/packages/react/lib/Toasts/index.d.ts @@ -8,7 +8,7 @@ export declare type ToastsRef = { innerRef: MutableRefObject; }; -declare interface ToastsProps extends ComponentPropsWithRef { +export declare interface ToastsProps extends ComponentPropsWithRef { animationTimeout?: number; className?: string; animateToast?( diff --git a/packages/react/lib/ToastsControl/index.d.ts b/packages/react/lib/ToastsControl/index.d.ts index 5da82d554..81c5af60f 100644 --- a/packages/react/lib/ToastsControl/index.d.ts +++ b/packages/react/lib/ToastsControl/index.d.ts @@ -9,7 +9,8 @@ export declare type ToastsControlRef = { dismiss(toast: ToastObject, index: string | number): void; }; -declare interface ToastsControlProps extends ComponentPropsWithoutRef { +export declare interface ToastsControlProps + extends ComponentPropsWithoutRef { toasts?: Array; generateId?(toast: ToastObject): string | number; ref?: MutableRefObject; diff --git a/packages/react/lib/Toggle/index.d.ts b/packages/react/lib/Toggle/index.d.ts index bf3dfc1f8..ebc63df3a 100644 --- a/packages/react/lib/Toggle/index.d.ts +++ b/packages/react/lib/Toggle/index.d.ts @@ -7,7 +7,7 @@ export declare type ToggleRef = { inputRef: MutableRefObject; }; -declare interface ToggleProps extends ComponentPropsWithRef { +export declare interface ToggleProps extends ComponentPropsWithRef { checked?: boolean; children?: ReactNode | JSX.Element; className?: string; diff --git a/packages/react/lib/Tooltip/index.d.ts b/packages/react/lib/Tooltip/index.d.ts index 19179f3e2..2aae0c46f 100644 --- a/packages/react/lib/Tooltip/index.d.ts +++ b/packages/react/lib/Tooltip/index.d.ts @@ -4,7 +4,7 @@ import { UseClickProps, UseDismissProps, UseHoverProps, - UseFloatingProps, + UseFloatingOptions, } from '@floating-ui/react'; export declare type TooltipRef = { @@ -26,7 +26,7 @@ export declare interface TooltipProps extends ComponentPropsWithRef { container?: string | Element | DocumentFragment; disabled?: boolean; dismissOptions?: UseDismissProps; - floatingOptions?: UseFloatingProps; + floatingOptions?: UseFloatingOptions; hoverOptions?: UseHoverProps; opened?: boolean; text?: string; diff --git a/packages/react/lib/TouchableZone/index.d.ts b/packages/react/lib/TouchableZone/index.d.ts index eb41d17c8..ab1e9deb8 100644 --- a/packages/react/lib/TouchableZone/index.d.ts +++ b/packages/react/lib/TouchableZone/index.d.ts @@ -1,6 +1,6 @@ import { ReactNode, ComponentPropsWithRef, ElementType } from 'react'; -declare interface TouchableZoneProps extends ComponentPropsWithRef { +export declare interface TouchableZoneProps extends ComponentPropsWithRef { children?: ReactNode | JSX.Element; className?: string tag?: string | ElementType; diff --git a/packages/react/lib/Transition/index.d.ts b/packages/react/lib/Transition/index.d.ts index d1cb1208a..1014184e3 100644 --- a/packages/react/lib/Transition/index.d.ts +++ b/packages/react/lib/Transition/index.d.ts @@ -1,6 +1,6 @@ import { ReactNode, ComponentPropsWithRef } from 'react'; -declare interface TransitionProps extends ComponentPropsWithRef { +export declare interface TransitionProps extends ComponentPropsWithRef { children?: ReactNode | JSX.Element; in: boolean; mounterOnEnter?: boolean; diff --git a/packages/react/lib/hooks.d.ts b/packages/react/lib/hooks.d.ts index 5dd834fdc..862be146d 100644 --- a/packages/react/lib/hooks.d.ts +++ b/packages/react/lib/hooks.d.ts @@ -3,14 +3,15 @@ import { UseFloatingReturn } from '@floating-ui/react'; import { AlertObject } from './Alert'; import { ToastObject } from './Toast'; +import { ListColumnObject } from './ListColumn'; -declare interface AlertsContext { +export declare interface AlertsContext { alerts: Array; add(alert: AlertObject): void; dismiss(index: number): void; } -declare interface ToastContext { +export declare interface ToastContext { toasts: Array; add(toast: ToastObject): void; dismiss(toast: ToastObject, index: string | number): void; @@ -22,11 +23,18 @@ declare interface ModalContext { close(): void; } -declare type DropdownContext = Pick< +export declare interface ListContext { + active: string | number, + asc: boolean | null, + orderable: boolean, + registerColumn(column: string | ListColumnObject): void; +} + +export declare type DropdownContext = Pick< UseFloatingReturn, 'x'| 'y'| - 'reference'| + 'refs'| 'strategy' > & { opened: boolean; @@ -42,7 +50,7 @@ declare type DropdownContext = Pick< toggle(): void; }; -declare interface FieldControlContext { +export declare interface FieldControlContext { dirty: boolean; focused: boolean; valid: boolean; @@ -53,14 +61,14 @@ declare interface FieldControlContext { }): void; } -declare function useAlerts(): AlertsContext; +export declare function useList(): ListContext; -declare function useToasts(): ToastContext; +export declare function useAlerts(): AlertsContext; -declare function useDropdown(): DropdownContext; +export declare function useToasts(): ToastContext; -declare function useFieldControl(): FieldControlContext; +export declare function useDropdown(): DropdownContext; -declare function useModal(): ModalContext; +export declare function useFieldControl(): FieldControlContext; -export { useAlerts, useToasts, useDropdown, useFieldControl, useModal }; +export declare function useModal(): ModalContext; diff --git a/packages/react/lib/index.d.ts b/packages/react/lib/index.d.ts index 503424519..a8de2d009 100644 --- a/packages/react/lib/index.d.ts +++ b/packages/react/lib/index.d.ts @@ -54,37 +54,145 @@ export { useLayoutEffectAfterMount, } from '@junipero/hooks'; -export { default as Abstract } from './Abstract'; -export { default as Alert, AlertRef } from './Alert'; -export { default as Alerts, AlertsRef } from './Alerts'; -export { default as AlertsControl, AlertsControlRef } from './AlertsControl'; -export { default as Badge, BadgeRef } from './Badge'; -export { default as BreadCrumb, BreadCrumbRef } from './BreadCrumb'; -export { default as BreadCrumbItem, BreadCrumbItemRef } from './BreadCrumbItem'; -export { default as Button, ButtonRef } from './Button'; -export { default as Calendar, CalendarRef } from './Calendar'; -export { default as Card, CardRef } from './Card'; -export { default as CheckboxField, CheckboxFieldRef } from './CheckboxField'; -export { default as CodeField, CodeFieldRef } from './CodeField'; -export { default as ColorField, ColorFieldRef } from './ColorField'; -export { default as DateField, DateFieldRef } from './DateField'; -export { default as Draggable } from './Draggable'; -export { default as Dropdown, DropdownRef } from './Dropdown'; -export { default as DropdownGroup } from './DropdownGroup'; -export { default as DropdownItem } from './DropdownItem'; -export { default as DropdownMenu, DropdownMenuRef } from './DropdownMenu'; -export { default as DropdownToggle } from './DropdownToggle'; -export { default as Droppable } from './Droppable'; -export { default as FieldAddon, FieldAddonRef } from './FieldAddon'; -export { default as FieldControl } from './FieldControl'; -export { default as FieldGroup, FieldGroupRef } from './FieldGroup'; -export { default as Label } from './Label'; -export { default as List, ListRef } from './List'; -export { default as ListCell, ListCellRef } from './ListCell'; -export { default as ListColumn, ListColumnRef } from './ListColumn'; -export { default as ListItem, ListItemRef } from './ListItem'; -export { default as Modal, ModalRef } from './Modal'; -export { default as ModalControl, ModalControlRef } from './ModalControl'; +export { + default as Abstract, + AbstractProps, +} from './Abstract'; +export { + default as Alert, + AlertRef, + AlertProps, + AlertObject, +} from './Alert'; +export { + default as Alerts, + AlertsRef, + AlertsProps, +} from './Alerts'; +export { + default as AlertsControl, + AlertsControlRef, + AlertsControlProps, +} from './AlertsControl'; +export { + default as Badge, + BadgeRef, + BadgeProps, +} from './Badge'; +export { + default as BreadCrumb, + BreadCrumbRef, + BreadCrumbProps, +} from './BreadCrumb'; +export { + default as BreadCrumbItem, + BreadCrumbItemRef, + BreadCrumbItemProps, +} from './BreadCrumbItem'; +export { + default as Button, + ButtonRef, + ButtonProps, +} from './Button'; +export { + default as Calendar, + CalendarRef, + CalendarProps, +} from './Calendar'; +export { + default as Card, + CardRef, + CardProps, +} from './Card'; +export { + default as CheckboxField, + CheckboxFieldRef, + CheckboxFieldProps, +} from './CheckboxField'; +export { + default as CodeField, + CodeFieldRef, + CodeFieldProps, +} from './CodeField'; +export { + default as ColorField, + ColorFieldRef, + ColorFieldProps, +} from './ColorField'; +export { + default as DateField, + DateFieldRef, + DateFieldProps, +} from './DateField'; +export { + default as Draggable, + DraggableProps, +} from './Draggable'; +export { + default as Dropdown, + DropdownRef, + DropdownProps, +} from './Dropdown'; +export { + default as DropdownGroup, + DropdownGroupProps, +} from './DropdownGroup'; +export { + default as DropdownItem, + DropdownItemProps, +} from './DropdownItem'; +export { + default as DropdownMenu, + DropdownMenuRef, + DropdownMenuProps, +} from './DropdownMenu'; +export { + default as DropdownToggle, + DropdownToggleRef, + DropdownToggleProps, +} from './DropdownToggle'; +export { + default as Droppable, + DroppableProps, +} from './Droppable'; +export { + default as FieldAddon, + FieldAddonRef, + FieldAddonProps, +} from './FieldAddon'; +export { + default as FieldControl, +} from './FieldControl'; +export { + default as FieldGroup, + FieldGroupRef, + FieldGroupProps, +} from './FieldGroup'; +export { + default as Label, + LabelProps, +} from './Label'; +export { + default as List, + ListRef, + ListProps, +} from './List'; +export { + default as ListCell, + ListCellRef, + ListCellProps, +} from './ListCell'; +export { + default as ListColumn, + ListColumnRef, + ListColumnProps, + ListColumnObject, +} from './ListColumn'; +export { + default as ListItem, + ListItemRef, + ListItemProps, +} from './ListItem'; export { PooolLogo, PooolIconLogo, @@ -99,25 +207,100 @@ export { FlowLogo, JuniperoLogo, } from './Logo'; -export { default as RadioField, RadioFieldRef } from './RadioField'; -export { default as SelectField, SelectFieldRef } from './SelectField'; -export { default as Slider, SliderRef } from './Slider'; -export { default as Spinner } from './Spinner'; -export { default as Step, StepRef } from './Step'; -export { default as Stepper, StepperRef } from './Stepper'; -export { default as Tab, TabRef } from './Tab'; -export { default as Tabs, TabsRef } from './Tabs'; -export { default as Tag, TagRef } from './Tag'; -export { default as TextField, TextFieldRef } from './TextField'; -export { default as Toast, ToastRef } from './Toast'; -export { default as Toasts, ToastsRef } from './Toasts'; -export { default as ToastsControl, ToastsControlRef } from './ToastsControl'; -export { default as Toggle, ToggleRef } from './Toggle'; -export { default as Tooltip, TooltipRef, TooltipProps } from './Tooltip'; -export { default as TouchableZone } from './TouchableZone'; -export { default as Transition } from './Transition'; +export { + default as RadioField, + RadioFieldRef, + RadioFieldProps, +} from './RadioField'; +export { + default as SelectField, + SelectFieldRef, + SelectFieldProps, +} from './SelectField'; +export { + default as Slider, + SliderRef, + SliderProps, +} from './Slider'; +export { + default as Spinner, + SpinnerProps, +} from './Spinner'; +export { + default as Step, + StepRef, + StepProps, + StepObject, +} from './Step'; +export { + default as Stepper, + StepperRef, + StepperProps, +} from './Stepper'; +export { + default as Tab, + TabRef, + TabProps, + TabObject, +} from './Tab'; +export { + default as Tabs, + TabsRef, + TabsProps, +} from './Tabs'; +export { + default as Tag, + TagRef, + TagProps, +} from './Tag'; +export { + default as TextField, + TextFieldRef, + TextFieldProps, +} from './TextField'; +export { + default as Toast, + ToastRef, + ToastProps, + ToastObject, +} from './Toast'; +export { + default as Toasts, + ToastsRef, + ToastsProps, +} from './Toasts'; +export { + default as ToastsControl, + ToastsControlRef, + ToastsControlProps, +} from './ToastsControl'; +export { + default as Toggle, + ToggleRef, + ToggleProps, +} from './Toggle'; +export { + default as Tooltip, + TooltipRef, + TooltipProps, +} from './Tooltip'; +export { + default as TouchableZone, + TouchableZoneProps, +} from './TouchableZone'; +export { + default as Transition, + TransitionProps, +} from './Transition'; export { + ListContext, + AlertsContext, + ToastContext, + DropdownContext, + FieldControlContext, + ModalContext, + useList, useAlerts, useToasts, useDropdown,