@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
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Options for media query hook
3
+ */
4
+ export interface UseMediaQueryOptions {
5
+ /**
6
+ * Default value for SSR or when media query can't be evaluated
7
+ * @default false
8
+ */
9
+ defaultValue?: boolean;
10
+ /**
11
+ * Callback when media query match changes
12
+ */
13
+ onChange?: (matches: boolean) => void;
14
+ }
15
+ /**
16
+ * Return type for media query hook
17
+ */
18
+ export interface UseMediaQueryReturn {
19
+ /**
20
+ * Whether the media query currently matches
21
+ */
22
+ matches: boolean;
23
+ }
24
+ /**
25
+ * Hook that reacts to CSS media query changes
26
+ *
27
+ * @example
28
+ * ```tsx
29
+ * // Responsive breakpoints
30
+ * const { matches: isMobile } = useMediaQuery('(max-width: 768px)');
31
+ * const { matches: isTablet } = useMediaQuery('(min-width: 769px) and (max-width: 1024px)');
32
+ * const { matches: isDesktop } = useMediaQuery('(min-width: 1025px)');
33
+ *
34
+ * // User preferences
35
+ * const { matches: prefersDark } = useMediaQuery('(prefers-color-scheme: dark)');
36
+ * const { matches: prefersReducedMotion } = useMediaQuery('(prefers-reduced-motion: reduce)');
37
+ *
38
+ * // With callback
39
+ * const { matches } = useMediaQuery('(max-width: 768px)', {
40
+ * onChange: (isMobile) => console.log('Mobile:', isMobile),
41
+ * });
42
+ * ```
43
+ */
44
+ export declare function useMediaQuery(query: string, options?: UseMediaQueryOptions): UseMediaQueryReturn;
45
+ export default useMediaQuery;
@@ -1,2 +1,2 @@
1
1
  export { usePopoverPosition } from './usePopoverPosition';
2
- export type { UsePopoverPositionOptions, UsePopoverPositionReturn, } from './usePopoverPosition';
2
+ export type { UsePopoverPositionOptions, UsePopoverPositionReturn } from './usePopoverPosition';
@@ -36,11 +36,11 @@ export interface UsePopoverPositionReturn {
36
36
  /**
37
37
  * Ref to attach to popover element
38
38
  */
39
- popoverRef: RefObject<HTMLDivElement>;
39
+ popoverRef: RefObject<HTMLDivElement | null>;
40
40
  /**
41
41
  * Ref to attach to trigger element
42
42
  */
43
- triggerRef: RefObject<HTMLElement>;
43
+ triggerRef: RefObject<HTMLElement | null>;
44
44
  /**
45
45
  * Style object to apply to popover
46
46
  */
@@ -0,0 +1 @@
1
+ export { usePrevious, default } from './usePrevious';
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Hook that returns the previous value of a state or prop
3
+ *
4
+ * @example
5
+ * ```tsx
6
+ * function Counter({ count }: { count: number }) {
7
+ * const prevCount = usePrevious(count);
8
+ *
9
+ * return (
10
+ * <div>
11
+ * Current: {count}, Previous: {prevCount ?? 'N/A'}
12
+ * {prevCount !== undefined && count > prevCount && ' (increased)'}
13
+ * </div>
14
+ * );
15
+ * }
16
+ * ```
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * function UserProfile({ userId }: { userId: string }) {
21
+ * const prevUserId = usePrevious(userId);
22
+ *
23
+ * useEffect(() => {
24
+ * if (prevUserId && prevUserId !== userId) {
25
+ * // User changed, reset form or fetch new data
26
+ * resetForm();
27
+ * }
28
+ * }, [userId, prevUserId]);
29
+ *
30
+ * return <Profile userId={userId} />;
31
+ * }
32
+ * ```
33
+ */
34
+ export declare function usePrevious<T>(value: T): T | undefined;
35
+ export default usePrevious;
@@ -0,0 +1,2 @@
1
+ export { useTimeout, default } from './useTimeout';
2
+ export type { UseTimeoutOptions, UseTimeoutReturn } from './useTimeout';
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Options for timeout hook
3
+ */
4
+ export interface UseTimeoutOptions {
5
+ /**
6
+ * Callback to execute after delay
7
+ */
8
+ callback: () => void;
9
+ /**
10
+ * Delay in milliseconds (null to pause/disable)
11
+ */
12
+ delay: number | null;
13
+ }
14
+ /**
15
+ * Return type for timeout hook
16
+ */
17
+ export interface UseTimeoutReturn {
18
+ /**
19
+ * Reset the timeout (restart from beginning)
20
+ */
21
+ reset: () => void;
22
+ /**
23
+ * Clear the timeout (stop without executing)
24
+ */
25
+ clear: () => void;
26
+ }
27
+ /**
28
+ * Declarative timeout hook with cleanup
29
+ *
30
+ * @example
31
+ * ```tsx
32
+ * // Auto-hide notification
33
+ * function Notification({ message, onClose }: Props) {
34
+ * useTimeout({
35
+ * callback: onClose,
36
+ * delay: 5000,
37
+ * });
38
+ *
39
+ * return <div>{message}</div>;
40
+ * }
41
+ * ```
42
+ *
43
+ * @example
44
+ * ```tsx
45
+ * // Conditional timeout
46
+ * const [showHint, setShowHint] = useState(false);
47
+ *
48
+ * useTimeout({
49
+ * callback: () => setShowHint(true),
50
+ * delay: isNewUser ? 3000 : null, // null disables
51
+ * });
52
+ * ```
53
+ *
54
+ * @example
55
+ * ```tsx
56
+ * // With controls
57
+ * const { reset, clear } = useTimeout({
58
+ * callback: () => setIdle(true),
59
+ * delay: 30000,
60
+ * });
61
+ *
62
+ * // Reset on user activity
63
+ * useEffect(() => {
64
+ * window.addEventListener('mousemove', reset);
65
+ * return () => window.removeEventListener('mousemove', reset);
66
+ * }, [reset]);
67
+ * ```
68
+ */
69
+ export declare function useTimeout(options: UseTimeoutOptions): UseTimeoutReturn;
70
+ export default useTimeout;
@@ -0,0 +1,2 @@
1
+ export { useUrlState, urlStateSerializers, default } from './useUrlState';
2
+ export type { UseUrlStateOptions, UseUrlStateReturn, UrlStateSerializer } from './useUrlState';
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Serializer/deserializer for URL state values
3
+ */
4
+ export interface UrlStateSerializer<T> {
5
+ /**
6
+ * Serialize value to URL string
7
+ */
8
+ serialize: (value: T) => string;
9
+ /**
10
+ * Deserialize URL string to value
11
+ */
12
+ deserialize: (value: string | null, defaultValue: T) => T;
13
+ }
14
+ /**
15
+ * Options for URL state hook
16
+ */
17
+ export interface UseUrlStateOptions<T> {
18
+ /**
19
+ * Default value when parameter is not present in URL
20
+ */
21
+ defaultValue: T;
22
+ /**
23
+ * Custom serializer/deserializer for the value
24
+ * @default Inferred from defaultValue type
25
+ */
26
+ serializer?: UrlStateSerializer<T>;
27
+ /**
28
+ * Whether to replace history entry instead of push
29
+ * @default false
30
+ */
31
+ replace?: boolean;
32
+ /**
33
+ * Debounce delay for URL updates (ms)
34
+ * @default 0
35
+ */
36
+ debounce?: number;
37
+ }
38
+ /**
39
+ * Return type for URL state hook
40
+ */
41
+ export type UseUrlStateReturn<T> = [
42
+ /** Current value */
43
+ T,
44
+ /** Setter function (like useState) */
45
+ (value: T | ((prev: T) => T)) => void,
46
+ /** Clear the parameter from URL */
47
+ () => void
48
+ ];
49
+ /**
50
+ * Built-in serializers for common types
51
+ */
52
+ export declare const urlStateSerializers: {
53
+ string: UrlStateSerializer<string>;
54
+ number: UrlStateSerializer<number>;
55
+ boolean: UrlStateSerializer<boolean>;
56
+ json: <T>() => UrlStateSerializer<T>;
57
+ array: <T extends string>() => UrlStateSerializer<T[]>;
58
+ numberArray: () => UrlStateSerializer<number[]>;
59
+ };
60
+ /**
61
+ * Hook that synchronizes React state with URL search parameters
62
+ *
63
+ * @example
64
+ * ```tsx
65
+ * // Basic string parameter
66
+ * const [search, setSearch] = useUrlState('q', { defaultValue: '' });
67
+ *
68
+ * // Number parameter with debounce
69
+ * const [page, setPage] = useUrlState('page', {
70
+ * defaultValue: 1,
71
+ * serializer: urlStateSerializers.number,
72
+ * debounce: 300,
73
+ * });
74
+ *
75
+ * // Array parameter
76
+ * const [tags, setTags] = useUrlState('tags', {
77
+ * defaultValue: [],
78
+ * serializer: urlStateSerializers.array(),
79
+ * });
80
+ * ```
81
+ */
82
+ export declare function useUrlState<T>(paramName: string, options: UseUrlStateOptions<T>): UseUrlStateReturn<T>;
83
+ export default useUrlState;
@@ -1,4 +1,4 @@
1
- import { ReactNode, CSSProperties } from 'react';
1
+ import { ReactNode, CSSProperties, JSX } from 'react';
2
2
  /**
3
3
  * Base props that all components should accept
4
4
  */
@@ -1,5 +1,5 @@
1
1
  export { getThemeValue, getColorValue, setThemeValue, applyThemeValues, pxToRem, gridSpacing, isDarkMode, getThemeMode, } from './theme-utils';
2
- export { getElementBounds, getViewportSize, getScrollPosition, isElementInViewport, } from './dom';
2
+ export { getElementBounds, getViewportSize, getScrollPosition, isElementInViewport } from './dom';
3
3
  export type { ElementBounds, ViewportSize, ScrollPosition } from './dom';
4
- export { calculatePopoverPosition, findBestPosition, } from './positioning';
4
+ export { calculatePopoverPosition, findBestPosition } from './positioning';
5
5
  export type { PopoverPosition, PositionCoordinates, PositionOptions, PopoverSize, PopoverWidth, } from './positioning';
@@ -73,7 +73,7 @@ export declare const validators: {
73
73
  * @param otherValue Value to match against
74
74
  * @param message Custom error message
75
75
  */
76
- matches: (otherValue: any, message?: string) => Validator;
76
+ matches: (otherValue: unknown, message?: string) => Validator;
77
77
  /**
78
78
  * Validates file size
79
79
  * @param maxSize Maximum size in bytes
@@ -99,14 +99,14 @@ export declare const combineValidators: (...validators: Validator[]) => Validato
99
99
  * @param validator Single validator or array of validators
100
100
  * @returns ValidationResult object
101
101
  */
102
- export declare const validate: (value: any, validator: Validator | Validator[]) => ValidationResult;
102
+ export declare const validate: (value: unknown, validator: Validator | Validator[]) => ValidationResult;
103
103
  /**
104
104
  * Validates multiple fields
105
105
  * @param values Object with field values
106
106
  * @param validators Object with field validators
107
107
  * @returns Object with validation results
108
108
  */
109
- export declare const validateForm: (values: Record<string, any>, validators: Record<string, Validator | Validator[]>) => Record<string, ValidationResult>;
109
+ export declare const validateForm: (values: Record<string, unknown>, validators: Record<string, Validator | Validator[]>) => Record<string, ValidationResult>;
110
110
  /**
111
111
  * Checks if all validation results are valid
112
112
  * @param results Validation results object
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@true-tech-team/react-components",
3
- "version": "0.0.9",
3
+ "version": "1.0.0",
4
4
  "description": "React TypeScript component library",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -23,8 +23,8 @@
23
23
  "typecheck": "tsc --noEmit -p tsconfig.lib.json"
24
24
  },
25
25
  "peerDependencies": {
26
- "react": ">=18.0.0",
27
- "react-dom": ">=18.0.0"
26
+ "react": "^18.0.0 || ^19.0.0",
27
+ "react-dom": "^18.0.0 || ^19.0.0"
28
28
  },
29
29
  "files": [
30
30
  "index.js",
@@ -52,4 +52,3 @@
52
52
  ],
53
53
  "license": "MIT"
54
54
  }
55
-