@true-tech-team/react-components 0.0.9 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/README.md +0 -1
  2. package/index.css +1 -1
  3. package/index.d.ts +15 -0
  4. package/index.js +1 -1
  5. package/index.mjs +16311 -14302
  6. package/lib/components/buttons/Button/Button.d.ts +3 -1
  7. package/lib/components/buttons/ButtonToggleGroup/ButtonToggleGroup.d.ts +3 -1
  8. package/lib/components/buttons/ButtonToggleGroup/ButtonToggleGroupItem.d.ts +3 -1
  9. package/lib/components/buttons/IconButton/IconButton.d.ts +3 -1
  10. package/lib/components/buttons/ToggleButton/ToggleButton.d.ts +3 -1
  11. package/lib/components/display/Accordion/Accordion.d.ts +3 -1
  12. package/lib/components/display/Accordion/index.d.ts +1 -1
  13. package/lib/components/display/Avatar/Avatar.d.ts +3 -1
  14. package/lib/components/display/Badge/Badge.d.ts +3 -1
  15. package/lib/components/display/Card/Card.d.ts +3 -1
  16. package/lib/components/display/Carousel/Carousel.d.ts +3 -1
  17. package/lib/components/display/Chip/Chip.d.ts +3 -1
  18. package/lib/components/display/CircularProgress/CircularProgress.d.ts +3 -1
  19. package/lib/components/display/Collapse/Collapse.d.ts +3 -1
  20. package/lib/components/display/CountUp/CountUp.d.ts +3 -1
  21. package/lib/components/display/FlipCard/FlipCard.d.ts +3 -1
  22. package/lib/components/display/KPI/KPI.d.ts +3 -1
  23. package/lib/components/display/List/List.d.ts +2 -2
  24. package/lib/components/display/List/ListEmpty.d.ts +0 -3
  25. package/lib/components/display/List/ListGroup.d.ts +2 -5
  26. package/lib/components/display/List/ListHeader.d.ts +0 -3
  27. package/lib/components/display/List/ListItem.d.ts +1 -1
  28. package/lib/components/display/List/ListSearch.d.ts +0 -3
  29. package/lib/components/display/List/ListSkeleton.d.ts +0 -3
  30. package/lib/components/display/OverflowText/OverflowText.d.ts +3 -1
  31. package/lib/components/display/PageMessages/PageMessages.d.ts +3 -1
  32. package/lib/components/display/Pill/Pill.d.ts +3 -1
  33. package/lib/components/display/ProgressBar/ProgressBar.d.ts +3 -1
  34. package/lib/components/display/Reveal/Reveal.d.ts +3 -1
  35. package/lib/components/display/ScrollArea/ScrollArea.d.ts +3 -1
  36. package/lib/components/display/Skeleton/Skeleton.d.ts +3 -1
  37. package/lib/components/display/Spinner/Spinner.d.ts +3 -1
  38. package/lib/components/display/StatusIndicator/StatusIndicator.d.ts +3 -1
  39. package/lib/components/display/Table/Table.d.ts +2 -2
  40. package/lib/components/display/Table/TableBody.d.ts +0 -3
  41. package/lib/components/display/Table/TableCell.d.ts +0 -3
  42. package/lib/components/display/Table/TableHeader.d.ts +0 -3
  43. package/lib/components/display/Table/TableRow.d.ts +1 -4
  44. package/lib/components/display/Table/TableSearch.d.ts +0 -3
  45. package/lib/components/display/Table/TableSkeleton.d.ts +0 -3
  46. package/lib/components/display/Table/hooks/useInfiniteScroll.d.ts +1 -1
  47. package/lib/components/display/Tabs/Tab.d.ts +3 -1
  48. package/lib/components/display/Tabs/TabList.d.ts +3 -1
  49. package/lib/components/display/Tabs/TabPanel.d.ts +3 -1
  50. package/lib/components/display/Tabs/Tabs.d.ts +3 -1
  51. package/lib/components/display/Tabs/index.d.ts +1 -1
  52. package/lib/components/display/Tag/Tag.d.ts +3 -1
  53. package/lib/components/display/TruncatedList/TruncatedList.d.ts +1 -1
  54. package/lib/components/dnd/DragHandle/DragHandle.d.ts +3 -1
  55. package/lib/components/dnd/DragOverlay/DragOverlay.d.ts +1 -1
  56. package/lib/components/dnd/KanbanBoard/KanbanBoard.d.ts +0 -3
  57. package/lib/components/dnd/KanbanBoard/KanbanCard.d.ts +3 -1
  58. package/lib/components/dnd/KanbanBoard/KanbanColumn.d.ts +3 -1
  59. package/lib/components/dnd/KanbanBoard/index.d.ts +1 -1
  60. package/lib/components/dnd/ResizablePanels/ResizablePanel.d.ts +6 -1
  61. package/lib/components/dnd/ResizablePanels/ResizeHandle.d.ts +3 -1
  62. package/lib/components/dnd/SortableGrid/SortableGrid.d.ts +0 -3
  63. package/lib/components/dnd/SortableGrid/SortableGridItem.d.ts +3 -1
  64. package/lib/components/dnd/SortableList/SortableItem.d.ts +3 -1
  65. package/lib/components/dnd/SortableList/SortableList.d.ts +0 -3
  66. package/lib/components/filters/core/ActiveFilters/ActiveFilters.d.ts +3 -1
  67. package/lib/components/filters/core/FilterField/FilterField.d.ts +3 -1
  68. package/lib/components/filters/core/FilterSection/FilterSection.d.ts +3 -1
  69. package/lib/components/filters/fields/CheckboxFilter.d.ts +3 -1
  70. package/lib/components/filters/fields/DateFilter.d.ts +3 -1
  71. package/lib/components/filters/fields/DateRangeFilter.d.ts +3 -1
  72. package/lib/components/filters/fields/ListSelectFilter.d.ts +3 -1
  73. package/lib/components/filters/fields/MultiSelectFilter.d.ts +3 -1
  74. package/lib/components/filters/fields/NumberFilter.d.ts +3 -1
  75. package/lib/components/filters/fields/NumberRangeFilter.d.ts +3 -1
  76. package/lib/components/filters/fields/RatingFilter.d.ts +3 -1
  77. package/lib/components/filters/fields/SelectFilter.d.ts +3 -1
  78. package/lib/components/filters/fields/TextFilter.d.ts +3 -1
  79. package/lib/components/filters/fields/ToggleFilter.d.ts +3 -1
  80. package/lib/components/filters/index.d.ts +2 -2
  81. package/lib/components/filters/layouts/FilterAccordion/FilterAccordion.d.ts +3 -1
  82. package/lib/components/filters/layouts/FilterBar/FilterBar.d.ts +3 -1
  83. package/lib/components/filters/layouts/FilterModal/FilterModal.d.ts +3 -1
  84. package/lib/components/filters/layouts/FilterPopover/FilterPopover.d.ts +3 -1
  85. package/lib/components/filters/layouts/FilterSidebar/FilterSidebar.d.ts +3 -1
  86. package/lib/components/forms/FormBuilder/FormBuilder.d.ts +3 -1
  87. package/lib/components/forms/FormBuilder/hooks/useFormValidation.d.ts +2 -2
  88. package/lib/components/forms/FormBuilder/types.d.ts +3 -0
  89. package/lib/components/inputs/Autocomplete/Autocomplete.d.ts +1 -1
  90. package/lib/components/inputs/Checkbox/Checkbox.d.ts +3 -1
  91. package/lib/components/inputs/CheckboxGroup/CheckboxGroup.d.ts +3 -1
  92. package/lib/components/inputs/CheckboxGroup/CheckboxGroupItem.d.ts +3 -1
  93. package/lib/components/inputs/ColorPicker/ColorPicker.d.ts +3 -1
  94. package/lib/components/inputs/DatePicker/DatePicker.d.ts +3 -1
  95. package/lib/components/inputs/DateRangePicker/DateRangePicker.d.ts +3 -1
  96. package/lib/components/inputs/FilePicker/FilePicker.d.ts +3 -1
  97. package/lib/components/inputs/Input/Input.d.ts +3 -1
  98. package/lib/components/inputs/Input/index.d.ts +1 -1
  99. package/lib/components/inputs/NumberInput/NumberInput.d.ts +3 -1
  100. package/lib/components/inputs/PhoneInput/PhoneInput.d.ts +3 -1
  101. package/lib/components/inputs/Radio/Radio.d.ts +3 -1
  102. package/lib/components/inputs/Radio/RadioGroup.d.ts +3 -1
  103. package/lib/components/inputs/Rating/Rating.d.ts +3 -1
  104. package/lib/components/inputs/Select/Select.d.ts +3 -1
  105. package/lib/components/inputs/Slider/Slider.d.ts +3 -1
  106. package/lib/components/inputs/TagInput/TagInput.d.ts +3 -1
  107. package/lib/components/inputs/Textarea/Textarea.d.ts +3 -1
  108. package/lib/components/inputs/Toggle/Toggle.d.ts +3 -1
  109. package/lib/components/layout/AdaptiveGrid/AdaptiveGrid.d.ts +3 -1
  110. package/lib/components/layout/MasonryLayout/MasonryLayout.d.ts +3 -1
  111. package/lib/components/layout/Panes/Pane.d.ts +3 -1
  112. package/lib/components/layout/Panes/Panes.d.ts +3 -1
  113. package/lib/components/layout/ResponsiveStack/ResponsiveStack.d.ts +3 -1
  114. package/lib/components/navigation/BottomNavigation/BottomNavigation.d.ts +3 -1
  115. package/lib/components/navigation/BottomNavigation/BottomNavigationItem.d.ts +3 -1
  116. package/lib/components/navigation/Breadcrumbs/BreadcrumbItem.d.ts +3 -1
  117. package/lib/components/navigation/Breadcrumbs/BreadcrumbSeparator.d.ts +3 -1
  118. package/lib/components/navigation/Breadcrumbs/Breadcrumbs.d.ts +3 -1
  119. package/lib/components/navigation/CollapsibleSidebar/CollapsibleSidebar.d.ts +3 -1
  120. package/lib/components/navigation/NavLink/NavLink.d.ts +3 -1
  121. package/lib/components/navigation/Navbar/Navbar.d.ts +3 -1
  122. package/lib/components/navigation/Navbar/NavbarActions.d.ts +3 -1
  123. package/lib/components/navigation/Navbar/NavbarBrand.d.ts +3 -1
  124. package/lib/components/navigation/Navbar/NavbarCollapse.d.ts +3 -1
  125. package/lib/components/navigation/Navbar/NavbarNav.d.ts +3 -1
  126. package/lib/components/navigation/Navbar/NavbarToggle.d.ts +3 -1
  127. package/lib/components/navigation/Pagination/Pagination.d.ts +3 -1
  128. package/lib/components/navigation/SideNav/SideNav.d.ts +3 -1
  129. package/lib/components/navigation/SideNav/SideNavDivider.d.ts +3 -1
  130. package/lib/components/navigation/SideNav/SideNavGroup.d.ts +3 -1
  131. package/lib/components/navigation/SideNav/SideNavItem.d.ts +3 -1
  132. package/lib/components/navigation/Stepper/Step.d.ts +3 -1
  133. package/lib/components/navigation/Stepper/Stepper.d.ts +3 -1
  134. package/lib/components/overlays/Alert/Alert.d.ts +3 -1
  135. package/lib/components/overlays/Alert/AlertProvider.d.ts +1 -4
  136. package/lib/components/overlays/Alert/index.d.ts +4 -4
  137. package/lib/components/overlays/Dialog/Dialog.d.ts +3 -1
  138. package/lib/components/overlays/Dialog/DialogProvider.d.ts +1 -4
  139. package/lib/components/overlays/Dialog/index.d.ts +3 -3
  140. package/lib/components/overlays/LoadingOverlay/LoadingOverlay.d.ts +3 -1
  141. package/lib/components/overlays/Popover/Popover.d.ts +1 -1
  142. package/lib/components/overlays/Toast/ToastProvider.d.ts +0 -3
  143. package/lib/components/overlays/Toast/index.d.ts +2 -2
  144. package/lib/decorators/ComponentDecorator/ComponentDecorator.d.ts +7 -2
  145. package/lib/hooks/index.d.ts +16 -1
  146. package/lib/hooks/useClickOutside/useClickOutside.d.ts +1 -1
  147. package/lib/hooks/useClipboard/index.d.ts +2 -0
  148. package/lib/hooks/useClipboard/useClipboard.d.ts +67 -0
  149. package/lib/hooks/useFocusTrap/useFocusTrap.d.ts +1 -1
  150. package/lib/hooks/useIntersectionObserver/index.d.ts +2 -0
  151. package/lib/hooks/useIntersectionObserver/useIntersectionObserver.d.ts +103 -0
  152. package/lib/hooks/useInterval/index.d.ts +2 -0
  153. package/lib/hooks/useInterval/useInterval.d.ts +82 -0
  154. package/lib/hooks/useLocalStorage/index.d.ts +2 -0
  155. package/lib/hooks/useLocalStorage/useLocalStorage.d.ts +56 -0
  156. package/lib/hooks/useMediaQuery/index.d.ts +2 -0
  157. package/lib/hooks/useMediaQuery/useMediaQuery.d.ts +45 -0
  158. package/lib/hooks/usePopoverPosition/index.d.ts +1 -1
  159. package/lib/hooks/usePopoverPosition/usePopoverPosition.d.ts +2 -2
  160. package/lib/hooks/usePrevious/index.d.ts +1 -0
  161. package/lib/hooks/usePrevious/usePrevious.d.ts +35 -0
  162. package/lib/hooks/useTimeout/index.d.ts +2 -0
  163. package/lib/hooks/useTimeout/useTimeout.d.ts +70 -0
  164. package/lib/hooks/useUrlState/index.d.ts +2 -0
  165. package/lib/hooks/useUrlState/useUrlState.d.ts +83 -0
  166. package/lib/types/component.types.d.ts +1 -1
  167. package/lib/utils/index.d.ts +2 -2
  168. package/lib/utils/validation.d.ts +3 -3
  169. package/package.json +3 -4
@@ -25,5 +25,7 @@ export interface NavbarBrandProps extends BaseComponentProps {
25
25
  * </NavbarBrand>
26
26
  * ```
27
27
  */
28
- export declare const NavbarBrand: React.ForwardRefExoticComponent<NavbarBrandProps & React.RefAttributes<HTMLDivElement>>;
28
+ export declare const NavbarBrand: ({ ref, children, href, onClick, className, "data-testid": testId, style, ...restProps }: NavbarBrandProps & {
29
+ ref?: React.Ref<HTMLDivElement>;
30
+ }) => import("react/jsx-runtime").JSX.Element;
29
31
  export default NavbarBrand;
@@ -22,5 +22,7 @@ export interface NavbarCollapseProps extends BaseComponentProps {
22
22
  * </NavbarCollapse>
23
23
  * ```
24
24
  */
25
- export declare const NavbarCollapse: React.ForwardRefExoticComponent<NavbarCollapseProps & React.RefAttributes<HTMLDivElement>>;
25
+ export declare const NavbarCollapse: ({ ref, children, className, "data-testid": testId, style, ...restProps }: NavbarCollapseProps & {
26
+ ref?: React.Ref<HTMLDivElement>;
27
+ }) => import("react/jsx-runtime").JSX.Element;
26
28
  export default NavbarCollapse;
@@ -18,5 +18,7 @@ export interface NavbarNavProps extends BaseComponentProps {
18
18
  * </NavbarNav>
19
19
  * ```
20
20
  */
21
- export declare const NavbarNav: React.ForwardRefExoticComponent<NavbarNavProps & React.RefAttributes<HTMLElement>>;
21
+ export declare const NavbarNav: ({ ref, children, className, "data-testid": testId, style, ...restProps }: NavbarNavProps & {
22
+ ref?: React.Ref<HTMLElement>;
23
+ }) => import("react/jsx-runtime").JSX.Element;
22
24
  export default NavbarNav;
@@ -17,5 +17,7 @@ export interface NavbarToggleProps extends BaseComponentProps {
17
17
  * <NavbarToggle icon={<CustomIcon />} />
18
18
  * ```
19
19
  */
20
- export declare const NavbarToggle: React.ForwardRefExoticComponent<NavbarToggleProps & React.RefAttributes<HTMLButtonElement>>;
20
+ export declare const NavbarToggle: ({ ref, icon, className, "data-testid": testId, "aria-label": ariaLabel, style, ...restProps }: NavbarToggleProps & {
21
+ ref?: React.Ref<HTMLButtonElement>;
22
+ }) => import("react/jsx-runtime").JSX.Element;
21
23
  export default NavbarToggle;
@@ -95,5 +95,7 @@ export interface PaginationProps extends BaseComponentProps {
95
95
  * />
96
96
  * ```
97
97
  */
98
- export declare const Pagination: React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLElement>>;
98
+ export declare const Pagination: ({ ref, totalPages, currentPage, onPageChange, siblingCount, boundaryCount, showFirstLast, showPrevNext, size, variant, shape, disabled, labels, className, "data-testid": testId, "aria-label": ariaLabel, style, ...restProps }: PaginationProps & {
99
+ ref?: React.Ref<HTMLElement>;
100
+ }) => import("react/jsx-runtime").JSX.Element | null;
99
101
  export default Pagination;
@@ -85,5 +85,7 @@ export interface SideNavProps extends BaseComponentProps {
85
85
  * </SideNav>
86
86
  * ```
87
87
  */
88
- export declare const SideNav: React.ForwardRefExoticComponent<SideNavProps & React.RefAttributes<HTMLElement>>;
88
+ export declare const SideNav: ({ ref, position, collapsed: controlledCollapsed, defaultCollapsed, onCollapsedChange, expandedWidth, collapsedWidth, selectedValue: controlledSelectedValue, defaultSelectedValue, onSelect, header, footer, children, className, "data-testid": testId, "aria-label": ariaLabel, style, ...restProps }: SideNavProps & {
89
+ ref?: React.Ref<HTMLElement>;
90
+ }) => import("react/jsx-runtime").JSX.Element;
89
91
  export default SideNav;
@@ -18,5 +18,7 @@ export interface SideNavDividerProps extends Omit<BaseComponentProps, 'children'
18
18
  * <SideNavDivider label="Settings" />
19
19
  * ```
20
20
  */
21
- export declare const SideNavDivider: React.ForwardRefExoticComponent<SideNavDividerProps & React.RefAttributes<HTMLDivElement>>;
21
+ export declare const SideNavDivider: ({ ref, label, className, "data-testid": testId, style, ...restProps }: SideNavDividerProps & {
22
+ ref?: React.Ref<HTMLDivElement>;
23
+ }) => import("react/jsx-runtime").JSX.Element;
22
24
  export default SideNavDivider;
@@ -40,5 +40,7 @@ export interface SideNavGroupProps extends BaseComponentProps {
40
40
  * </SideNavGroup>
41
41
  * ```
42
42
  */
43
- export declare const SideNavGroup: React.ForwardRefExoticComponent<SideNavGroupProps & React.RefAttributes<HTMLDivElement>>;
43
+ export declare const SideNavGroup: ({ ref, groupId, label, icon, expanded: controlledExpanded, defaultExpanded, children, className, "data-testid": testId, style, ...restProps }: SideNavGroupProps & {
44
+ ref?: React.Ref<HTMLDivElement>;
45
+ }) => import("react/jsx-runtime").JSX.Element;
44
46
  export default SideNavGroup;
@@ -67,5 +67,7 @@ export interface SideNavItemProps extends BaseComponentProps {
67
67
  * />
68
68
  * ```
69
69
  */
70
- export declare const SideNavItem: React.ForwardRefExoticComponent<SideNavItemProps & React.RefAttributes<HTMLElement>>;
70
+ export declare const SideNavItem: ({ ref, value, icon, label, tooltip, disabled, href, onClick, badge, endAdornment, level, className, "data-testid": testId, style, ...restProps }: SideNavItemProps & {
71
+ ref?: React.Ref<HTMLElement>;
72
+ }) => import("react/jsx-runtime").JSX.Element;
71
73
  export default SideNavItem;
@@ -53,5 +53,7 @@ export interface StepProps extends BaseComponentProps {
53
53
  * <Step title="Payment" error errorMessage="Please fix payment details" />
54
54
  * ```
55
55
  */
56
- export declare const Step: React.ForwardRefExoticComponent<StepProps & React.RefAttributes<HTMLDivElement>>;
56
+ export declare const Step: ({ ref, title, description, icon, optional, error, errorMessage, children, className, "data-testid": testId, style, _stepIndex, ...restProps }: StepProps & {
57
+ ref?: React.Ref<HTMLDivElement>;
58
+ }) => import("react/jsx-runtime").JSX.Element;
57
59
  export default Step;
@@ -76,5 +76,7 @@ export interface StepperProps extends BaseComponentProps {
76
76
  * </Stepper>
77
77
  * ```
78
78
  */
79
- export declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLDivElement>>;
79
+ export declare const Stepper: ({ ref, currentStep, onStepChange, orientation, variant, size, allowStepClick, onlyPreviousClickable, completedSteps, children, className, "data-testid": testId, "aria-label": ariaLabel, style, ...restProps }: StepperProps & {
80
+ ref?: React.Ref<HTMLDivElement>;
81
+ }) => import("react/jsx-runtime").JSX.Element;
80
82
  export default Stepper;
@@ -98,5 +98,7 @@ export interface AlertProps extends Omit<DialogProps, 'actions' | 'renderHeader'
98
98
  * />
99
99
  * ```
100
100
  */
101
- export declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
101
+ export declare const Alert: ({ ref, variant, icon, hideIcon, title, description, children, confirmText, cancelText, onConfirm, onCancel, loading, confirmDisabled, confirmVariant, extraActions, size, showCancel, onClose, className, "data-testid": testId, ...restProps }: AlertProps & {
102
+ ref?: React.Ref<HTMLDivElement>;
103
+ }) => import("react/jsx-runtime").JSX.Element;
102
104
  export default Alert;
@@ -34,7 +34,4 @@ export interface AlertProviderProps {
34
34
  * };
35
35
  * ```
36
36
  */
37
- export declare function AlertProvider({ children, defaultAlertProps, }: AlertProviderProps): import("react/jsx-runtime").JSX.Element;
38
- export declare namespace AlertProvider {
39
- var displayName: string;
40
- }
37
+ export declare function AlertProvider({ children, defaultAlertProps }: AlertProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -5,7 +5,7 @@ export { Alert } from './Alert';
5
5
  export type { AlertProps } from './Alert';
6
6
  export { AlertProvider } from './AlertProvider';
7
7
  export type { AlertProviderProps } from './AlertProvider';
8
- export { AlertContext, useAlertContext, useAlertContextStrict, } from './AlertContext';
9
- export type { AlertContextValue, AlertQueueItem, } from './AlertContext';
10
- export { ALERT_PRESETS, getAlertPreset, } from './AlertPresets';
11
- export type { AlertVariant, AlertPreset, } from './AlertPresets';
8
+ export { AlertContext, useAlertContext, useAlertContextStrict } from './AlertContext';
9
+ export type { AlertContextValue, AlertQueueItem } from './AlertContext';
10
+ export { ALERT_PRESETS, getAlertPreset } from './AlertPresets';
11
+ export type { AlertVariant, AlertPreset } from './AlertPresets';
@@ -193,5 +193,7 @@ export declare const DialogFooter: React.FC<DialogFooterProps>;
193
193
  * Dialog component
194
194
  * Modal dialog for user interactions with customizable content
195
195
  */
196
- export declare const Dialog: React.ForwardRefExoticComponent<DialogProps & React.RefAttributes<HTMLDivElement>>;
196
+ export declare const Dialog: ({ ref, isOpen: controlledIsOpen, defaultOpen, onOpenChange, onClose, title, children, actions, size, width, maxHeight, closeOnBackdropClick, closeOnEscape, showCloseButton, trapFocus, blockScroll, blurBackdrop, backdropOpacity, zIndex, animationDuration, role, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, modal, renderHeader, renderFooter, backdropClassName, contentClassName, onOpenComplete, onCloseComplete, className, "data-testid": testId, style: customStyle, ...restProps }: DialogProps & {
197
+ ref?: React.Ref<HTMLDivElement>;
198
+ }) => import("react/jsx-runtime").JSX.Element | null;
197
199
  export default Dialog;
@@ -24,7 +24,4 @@ export interface DialogProviderProps {
24
24
  * </DialogProvider>
25
25
  * ```
26
26
  */
27
- export declare function DialogProvider({ children, defaultDialogProps, }: DialogProviderProps): import("react/jsx-runtime").JSX.Element;
28
- export declare namespace DialogProvider {
29
- var displayName: string;
30
- }
27
+ export declare function DialogProvider({ children, defaultDialogProps }: DialogProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Dialog component exports
3
3
  */
4
- export { Dialog, DialogHeader, DialogBody, DialogFooter, } from './Dialog';
4
+ export { Dialog, DialogHeader, DialogBody, DialogFooter } from './Dialog';
5
5
  export type { DialogProps, DialogSize, DialogHeaderProps, DialogBodyProps, DialogFooterProps, } from './Dialog';
6
6
  export { DialogProvider } from './DialogProvider';
7
7
  export type { DialogProviderProps } from './DialogProvider';
8
- export { DialogContext, useDialogContext, useDialogContextStrict, } from './DialogContext';
9
- export type { DialogContextValue, DialogStackItem, } from './DialogContext';
8
+ export { DialogContext, useDialogContext, useDialogContextStrict } from './DialogContext';
9
+ export type { DialogContextValue, DialogStackItem } from './DialogContext';
@@ -97,5 +97,7 @@ export interface LoadingOverlayProps extends BaseComponentProps {
97
97
  * </LoadingOverlay>
98
98
  * ```
99
99
  */
100
- export declare const LoadingOverlay: React.ForwardRefExoticComponent<LoadingOverlayProps & React.RefAttributes<HTMLDivElement>>;
100
+ export declare const LoadingOverlay: ({ ref, children, visible, mode, spinnerStyle, spinnerSize, spinnerVariant, spinnerSpeed, message, blur, backdropOpacity, zIndex, transitionDuration, customSpinner, borderRadius, className, "data-testid": testId, style, ...restProps }: LoadingOverlayProps & {
101
+ ref?: React.Ref<HTMLDivElement>;
102
+ }) => import("react/jsx-runtime").JSX.Element | null;
101
103
  export default LoadingOverlay;
@@ -47,7 +47,7 @@ export interface PopoverProps extends Omit<BaseComponentProps, 'children'> {
47
47
  * Trigger element (render prop or ReactNode)
48
48
  */
49
49
  trigger: ReactNode | ((props: {
50
- ref: RefObject<HTMLElement>;
50
+ ref: RefObject<HTMLElement | null>;
51
51
  }) => ReactNode);
52
52
  /**
53
53
  * Popover content
@@ -66,6 +66,3 @@ export interface ToastProviderProps {
66
66
  * ```
67
67
  */
68
68
  export declare function ToastProvider({ children, position, maxVisible, gap, offset, defaultDuration, animationDuration, defaultToastProps, zIndex, }: ToastProviderProps): import("react/jsx-runtime").JSX.Element;
69
- export declare namespace ToastProvider {
70
- var displayName: string;
71
- }
@@ -2,10 +2,10 @@
2
2
  * Toast component exports
3
3
  */
4
4
  export { Toast } from './Toast';
5
- export type { ToastProps, ToastPosition, ToastVariant, ToastAnimationState, } from './Toast';
5
+ export type { ToastProps, ToastPosition, ToastVariant, ToastAnimationState } from './Toast';
6
6
  export { ToastContainer } from './ToastContainer';
7
7
  export type { ToastContainerProps } from './ToastContainer';
8
8
  export { ToastProvider } from './ToastProvider';
9
9
  export type { ToastProviderProps } from './ToastProvider';
10
- export { ToastContext, useToastContext, useToastContextStrict, } from './ToastContext';
10
+ export { ToastContext, useToastContext, useToastContextStrict } from './ToastContext';
11
11
  export type { ToastContextValue, ToastData, ToastInstance, PromiseToastOptions, } from './ToastContext';
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React, JSX } from 'react';
2
2
  import { CSSVariables } from '../../types';
3
3
  export interface ComponentDecoratorProps {
4
4
  /**
@@ -53,5 +53,10 @@ export interface ComponentDecoratorProps {
53
53
  * );
54
54
  * ```
55
55
  */
56
- export declare function withComponentDecorator<P extends object>(Component: React.ComponentType<P>, componentName: string, defaultClassName?: string): React.ForwardRefExoticComponent<React.PropsWithoutRef<P & Omit<ComponentDecoratorProps, "componentName">> & React.RefAttributes<HTMLDivElement>>;
56
+ export declare function withComponentDecorator<P extends object>(Component: React.ComponentType<P>, componentName: string, defaultClassName?: string): {
57
+ ({ ref, ...props }: P & Omit<ComponentDecoratorProps, "componentName"> & {
58
+ ref?: React.Ref<HTMLDivElement>;
59
+ }): import("react/jsx-runtime").JSX.Element;
60
+ displayName: string;
61
+ };
57
62
  export default withComponentDecorator;
@@ -5,7 +5,7 @@ export { useClickOutside } from './useClickOutside';
5
5
  export { useEscapeKey } from './useEscapeKey';
6
6
  export { useFocusTrap } from './useFocusTrap';
7
7
  export { usePopoverPosition } from './usePopoverPosition';
8
- export type { UsePopoverPositionOptions, UsePopoverPositionReturn, } from './usePopoverPosition';
8
+ export type { UsePopoverPositionOptions, UsePopoverPositionReturn } from './usePopoverPosition';
9
9
  export { useHover } from './useHover';
10
10
  export type { UseHoverOptions, UseHoverReturn, HoverProps } from './useHover';
11
11
  export { useDebounce } from './useDebounce';
@@ -19,3 +19,18 @@ export { useAsyncToast } from './useAsyncToast';
19
19
  export type { UseAsyncToastReturn, AsyncToastConfig } from './useAsyncToast';
20
20
  export { useResizeObserver } from './useResizeObserver';
21
21
  export type { UseResizeObserverOptions, UseResizeObserverReturn } from './useResizeObserver';
22
+ export { useUrlState, urlStateSerializers } from './useUrlState';
23
+ export type { UseUrlStateOptions, UseUrlStateReturn, UrlStateSerializer } from './useUrlState';
24
+ export { useIntersectionObserver } from './useIntersectionObserver';
25
+ export type { UseIntersectionObserverOptions, UseIntersectionObserverReturn, } from './useIntersectionObserver';
26
+ export { useLocalStorage } from './useLocalStorage';
27
+ export type { UseLocalStorageOptions, UseLocalStorageReturn, LocalStorageSerializer, } from './useLocalStorage';
28
+ export { useMediaQuery } from './useMediaQuery';
29
+ export type { UseMediaQueryOptions, UseMediaQueryReturn } from './useMediaQuery';
30
+ export { usePrevious } from './usePrevious';
31
+ export { useClipboard } from './useClipboard';
32
+ export type { UseClipboardOptions, UseClipboardReturn } from './useClipboard';
33
+ export { useTimeout } from './useTimeout';
34
+ export type { UseTimeoutOptions, UseTimeoutReturn } from './useTimeout';
35
+ export { useInterval } from './useInterval';
36
+ export type { UseIntervalOptions, UseIntervalReturn } from './useInterval';
@@ -6,4 +6,4 @@ import { RefObject } from 'react';
6
6
  * @param enabled - Whether the hook is active
7
7
  * @param excludeRefs - Additional refs to exclude from outside click detection (e.g., trigger elements)
8
8
  */
9
- export declare function useClickOutside<T extends HTMLElement>(ref: RefObject<T>, handler: (event: MouseEvent | TouchEvent) => void, enabled?: boolean, excludeRefs?: Array<RefObject<HTMLElement>>): void;
9
+ export declare function useClickOutside<T extends HTMLElement>(ref: RefObject<T | null>, handler: (event: MouseEvent | TouchEvent) => void, enabled?: boolean, excludeRefs?: Array<RefObject<HTMLElement | null>>): void;
@@ -0,0 +1,2 @@
1
+ export { useClipboard, default } from './useClipboard';
2
+ export type { UseClipboardOptions, UseClipboardReturn } from './useClipboard';
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Options for clipboard hook
3
+ */
4
+ export interface UseClipboardOptions {
5
+ /**
6
+ * Duration to show success state (ms)
7
+ * @default 2000
8
+ */
9
+ successDuration?: number;
10
+ /**
11
+ * Callback on successful copy
12
+ */
13
+ onSuccess?: (text: string) => void;
14
+ /**
15
+ * Callback on copy error
16
+ */
17
+ onError?: (error: Error) => void;
18
+ }
19
+ /**
20
+ * Return type for clipboard hook
21
+ */
22
+ export interface UseClipboardReturn {
23
+ /**
24
+ * Copy text to clipboard
25
+ */
26
+ copy: (text: string) => Promise<boolean>;
27
+ /**
28
+ * Whether copy was recently successful
29
+ */
30
+ copied: boolean;
31
+ /**
32
+ * Error if copy failed
33
+ */
34
+ error: Error | null;
35
+ /**
36
+ * Reset copied state
37
+ */
38
+ reset: () => void;
39
+ }
40
+ /**
41
+ * Hook for copying text to clipboard with feedback
42
+ *
43
+ * @example
44
+ * ```tsx
45
+ * function CopyButton({ text }: { text: string }) {
46
+ * const { copy, copied } = useClipboard();
47
+ *
48
+ * return (
49
+ * <Button onClick={() => copy(text)}>
50
+ * {copied ? 'Copied!' : 'Copy'}
51
+ * </Button>
52
+ * );
53
+ * }
54
+ * ```
55
+ *
56
+ * @example
57
+ * ```tsx
58
+ * // With callbacks
59
+ * const { copy, copied, error } = useClipboard({
60
+ * successDuration: 3000,
61
+ * onSuccess: () => toast.success('Copied!'),
62
+ * onError: (err) => toast.error(err.message),
63
+ * });
64
+ * ```
65
+ */
66
+ export declare function useClipboard(options?: UseClipboardOptions): UseClipboardReturn;
67
+ export default useClipboard;
@@ -5,4 +5,4 @@ import { RefObject } from 'react';
5
5
  * @param enabled - Whether the focus trap is active
6
6
  * @param autoFocus - Whether to automatically focus the first element on mount
7
7
  */
8
- export declare function useFocusTrap<T extends HTMLElement>(ref: RefObject<T>, enabled?: boolean, autoFocus?: boolean): void;
8
+ export declare function useFocusTrap<T extends HTMLElement>(ref: RefObject<T | null>, enabled?: boolean, autoFocus?: boolean): void;
@@ -0,0 +1,2 @@
1
+ export { useIntersectionObserver, default } from './useIntersectionObserver';
2
+ export type { UseIntersectionObserverOptions, UseIntersectionObserverReturn, } from './useIntersectionObserver';
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Options for intersection observer hook
3
+ */
4
+ export interface UseIntersectionObserverOptions {
5
+ /**
6
+ * Element that is used as the viewport for checking visibility
7
+ * @default null (browser viewport)
8
+ */
9
+ root?: Element | null;
10
+ /**
11
+ * Margin around the root element
12
+ * @default '0px'
13
+ */
14
+ rootMargin?: string;
15
+ /**
16
+ * Threshold(s) at which to trigger callback (0-1)
17
+ * @default 0
18
+ */
19
+ threshold?: number | number[];
20
+ /**
21
+ * Callback when intersection changes
22
+ */
23
+ onChange?: (entry: IntersectionObserverEntry) => void;
24
+ /**
25
+ * Whether to disconnect after first intersection
26
+ * Useful for lazy loading
27
+ * @default false
28
+ */
29
+ triggerOnce?: boolean;
30
+ /**
31
+ * Whether the observer is disabled
32
+ * @default false
33
+ */
34
+ disabled?: boolean;
35
+ /**
36
+ * Initial value for isIntersecting before observation starts
37
+ * @default false
38
+ */
39
+ initialIsIntersecting?: boolean;
40
+ }
41
+ /**
42
+ * Return type for intersection observer hook
43
+ */
44
+ export interface UseIntersectionObserverReturn {
45
+ /**
46
+ * Ref callback to attach to observed element
47
+ */
48
+ ref: (node: Element | null) => void;
49
+ /**
50
+ * Whether element is currently intersecting
51
+ */
52
+ isIntersecting: boolean;
53
+ /**
54
+ * The full IntersectionObserverEntry (null before first observation)
55
+ */
56
+ entry: IntersectionObserverEntry | null;
57
+ /**
58
+ * The observed element
59
+ */
60
+ element: Element | null;
61
+ }
62
+ /**
63
+ * Hook that observes element intersection using IntersectionObserver
64
+ *
65
+ * @example
66
+ * ```tsx
67
+ * // Basic visibility detection
68
+ * const { ref, isIntersecting } = useIntersectionObserver();
69
+ *
70
+ * return (
71
+ * <div ref={ref}>
72
+ * {isIntersecting ? 'Visible!' : 'Not visible'}
73
+ * </div>
74
+ * );
75
+ * ```
76
+ *
77
+ * @example
78
+ * ```tsx
79
+ * // Lazy loading with triggerOnce
80
+ * const { ref, isIntersecting } = useIntersectionObserver({
81
+ * triggerOnce: true,
82
+ * rootMargin: '100px',
83
+ * });
84
+ *
85
+ * return (
86
+ * <div ref={ref}>
87
+ * {isIntersecting ? <img src={src} /> : <Skeleton />}
88
+ * </div>
89
+ * );
90
+ * ```
91
+ *
92
+ * @example
93
+ * ```tsx
94
+ * // Multiple thresholds for scroll animations
95
+ * const { ref, entry } = useIntersectionObserver({
96
+ * threshold: [0, 0.25, 0.5, 0.75, 1],
97
+ * });
98
+ *
99
+ * const opacity = entry?.intersectionRatio ?? 0;
100
+ * ```
101
+ */
102
+ export declare function useIntersectionObserver(options?: UseIntersectionObserverOptions): UseIntersectionObserverReturn;
103
+ export default useIntersectionObserver;
@@ -0,0 +1,2 @@
1
+ export { useInterval, default } from './useInterval';
2
+ export type { UseIntervalOptions, UseIntervalReturn } from './useInterval';
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Options for interval hook
3
+ */
4
+ export interface UseIntervalOptions {
5
+ /**
6
+ * Callback to execute on each interval
7
+ */
8
+ callback: () => void;
9
+ /**
10
+ * Interval in milliseconds (null to pause/disable)
11
+ */
12
+ delay: number | null;
13
+ /**
14
+ * Whether to run callback immediately on start
15
+ * @default false
16
+ */
17
+ immediate?: boolean;
18
+ }
19
+ /**
20
+ * Return type for interval hook
21
+ */
22
+ export interface UseIntervalReturn {
23
+ /**
24
+ * Reset the interval (restart timing)
25
+ */
26
+ reset: () => void;
27
+ /**
28
+ * Clear the interval (stop)
29
+ */
30
+ clear: () => void;
31
+ }
32
+ /**
33
+ * Declarative interval hook with cleanup
34
+ *
35
+ * @example
36
+ * ```tsx
37
+ * // Auto-refresh data
38
+ * function Dashboard() {
39
+ * const [data, setData] = useState(null);
40
+ *
41
+ * useInterval({
42
+ * callback: async () => {
43
+ * const fresh = await fetchData();
44
+ * setData(fresh);
45
+ * },
46
+ * delay: 30000, // Every 30 seconds
47
+ * immediate: true, // Fetch immediately on mount
48
+ * });
49
+ *
50
+ * return <DataDisplay data={data} />;
51
+ * }
52
+ * ```
53
+ *
54
+ * @example
55
+ * ```tsx
56
+ * // Countdown timer
57
+ * function Countdown({ seconds }: { seconds: number }) {
58
+ * const [remaining, setRemaining] = useState(seconds);
59
+ *
60
+ * useInterval({
61
+ * callback: () => setRemaining(r => r - 1),
62
+ * delay: remaining > 0 ? 1000 : null, // Stop at 0
63
+ * });
64
+ *
65
+ * return <span>{remaining}s</span>;
66
+ * }
67
+ * ```
68
+ *
69
+ * @example
70
+ * ```tsx
71
+ * // Pausable animation
72
+ * const [isPaused, setIsPaused] = useState(false);
73
+ * const [frame, setFrame] = useState(0);
74
+ *
75
+ * const { reset } = useInterval({
76
+ * callback: () => setFrame(f => f + 1),
77
+ * delay: isPaused ? null : 16, // ~60fps when not paused
78
+ * });
79
+ * ```
80
+ */
81
+ export declare function useInterval(options: UseIntervalOptions): UseIntervalReturn;
82
+ export default useInterval;
@@ -0,0 +1,2 @@
1
+ export { useLocalStorage, default } from './useLocalStorage';
2
+ export type { UseLocalStorageOptions, UseLocalStorageReturn, LocalStorageSerializer, } from './useLocalStorage';
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Serializer for localStorage values
3
+ */
4
+ export interface LocalStorageSerializer<T> {
5
+ /**
6
+ * Serialize value to string
7
+ */
8
+ serialize: (value: T) => string;
9
+ /**
10
+ * Deserialize string to value
11
+ */
12
+ deserialize: (value: string) => T;
13
+ }
14
+ /**
15
+ * Options for localStorage hook
16
+ */
17
+ export interface UseLocalStorageOptions<T> {
18
+ /**
19
+ * Custom serializer/deserializer
20
+ * @default JSON.stringify/parse
21
+ */
22
+ serializer?: LocalStorageSerializer<T>;
23
+ /**
24
+ * Sync value across browser tabs
25
+ * @default true
26
+ */
27
+ syncTabs?: boolean;
28
+ }
29
+ /**
30
+ * Return type for localStorage hook
31
+ */
32
+ export type UseLocalStorageReturn<T> = [
33
+ /** Current value */
34
+ T,
35
+ /** Setter function (like useState) */
36
+ (value: T | ((prev: T) => T)) => void,
37
+ /** Remove from localStorage */
38
+ () => void
39
+ ];
40
+ /**
41
+ * Hook that persists state to localStorage with cross-tab synchronization
42
+ *
43
+ * @example
44
+ * ```tsx
45
+ * // Basic usage
46
+ * const [theme, setTheme] = useLocalStorage('theme', 'light');
47
+ *
48
+ * // With object
49
+ * const [user, setUser, clearUser] = useLocalStorage<User | null>('user', null);
50
+ *
51
+ * // Disable cross-tab sync
52
+ * const [draft, setDraft] = useLocalStorage('draft', '', { syncTabs: false });
53
+ * ```
54
+ */
55
+ export declare function useLocalStorage<T>(key: string, defaultValue: T, options?: UseLocalStorageOptions<T>): UseLocalStorageReturn<T>;
56
+ export default useLocalStorage;
@@ -0,0 +1,2 @@
1
+ export { useMediaQuery, default } from './useMediaQuery';
2
+ export type { UseMediaQueryOptions, UseMediaQueryReturn } from './useMediaQuery';