@true-tech-team/react-components 0.0.4 → 0.0.6

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 (213) hide show
  1. package/index.css +1 -1
  2. package/index.d.ts +10 -0
  3. package/index.js +1 -1
  4. package/index.mjs +15961 -6871
  5. package/lib/components/buttons/ButtonToggleGroup/ButtonToggleGroup.d.ts +79 -0
  6. package/lib/components/buttons/ButtonToggleGroup/ButtonToggleGroupContext.d.ts +38 -0
  7. package/lib/components/buttons/ButtonToggleGroup/ButtonToggleGroupItem.d.ts +37 -0
  8. package/lib/components/buttons/ButtonToggleGroup/index.d.ts +7 -0
  9. package/lib/components/buttons/ToggleButton/ToggleButton.d.ts +96 -0
  10. package/lib/components/buttons/ToggleButton/index.d.ts +3 -0
  11. package/lib/components/display/Icon/icons/BookmarkFilled.d.ts +3 -0
  12. package/lib/components/display/Icon/icons/ChevronsLeft.d.ts +3 -0
  13. package/lib/components/display/Icon/icons/ChevronsRight.d.ts +3 -0
  14. package/lib/components/display/Icon/icons/HeartFilled.d.ts +3 -0
  15. package/lib/components/display/Icon/icons/More.d.ts +3 -0
  16. package/lib/components/display/Icon/icons/StarFilled.d.ts +3 -0
  17. package/lib/components/display/Icon/icons/ThumbsUpFilled.d.ts +3 -0
  18. package/lib/components/display/Icon/icons/index.d.ts +15 -1
  19. package/lib/components/display/List/List.d.ts +6 -0
  20. package/lib/components/display/List/ListContext.d.ts +15 -0
  21. package/lib/components/display/List/ListEmpty.d.ts +25 -0
  22. package/lib/components/display/List/ListGroup.d.ts +36 -0
  23. package/lib/components/display/List/ListHeader.d.ts +62 -0
  24. package/lib/components/display/List/ListItem.d.ts +19 -0
  25. package/lib/components/display/List/ListSearch.d.ts +32 -0
  26. package/lib/components/display/List/ListSkeleton.d.ts +27 -0
  27. package/lib/components/display/List/hooks/index.d.ts +5 -0
  28. package/lib/components/display/List/hooks/useListExpand.d.ts +6 -0
  29. package/lib/components/display/List/hooks/useListFilter.d.ts +6 -0
  30. package/lib/components/display/List/hooks/useListGroups.d.ts +6 -0
  31. package/lib/components/display/List/hooks/useListKeyboardNav.d.ts +6 -0
  32. package/lib/components/display/List/hooks/useListSelection.d.ts +6 -0
  33. package/lib/components/display/List/index.d.ts +11 -0
  34. package/lib/components/display/List/types.d.ts +485 -0
  35. package/lib/components/display/List/utils.d.ts +47 -0
  36. package/lib/components/display/OverflowText/OverflowText.d.ts +81 -0
  37. package/lib/components/display/OverflowText/index.d.ts +2 -0
  38. package/lib/components/display/ScrollArea/ScrollArea.d.ts +112 -0
  39. package/lib/components/display/ScrollArea/index.d.ts +3 -0
  40. package/lib/components/display/Table/Table.d.ts +6 -0
  41. package/lib/components/display/Table/TableBody.d.ts +4 -0
  42. package/lib/components/display/Table/TableCell.d.ts +12 -0
  43. package/lib/components/display/Table/TableContext.d.ts +10 -0
  44. package/lib/components/display/Table/TableHeader.d.ts +4 -0
  45. package/lib/components/display/Table/TableRow.d.ts +9 -0
  46. package/lib/components/display/Table/TableSearch.d.ts +32 -0
  47. package/lib/components/display/Table/TableSkeleton.d.ts +12 -0
  48. package/lib/components/display/Table/hooks/index.d.ts +10 -0
  49. package/lib/components/display/Table/hooks/useInfiniteScroll.d.ts +11 -0
  50. package/lib/components/display/Table/hooks/useTableExpand.d.ts +10 -0
  51. package/lib/components/display/Table/hooks/useTableFilter.d.ts +22 -0
  52. package/lib/components/display/Table/hooks/useTableSelection.d.ts +16 -0
  53. package/lib/components/display/Table/hooks/useTableSort.d.ts +11 -0
  54. package/lib/components/display/Table/index.d.ts +13 -0
  55. package/lib/components/display/Table/types.d.ts +295 -0
  56. package/lib/components/display/Table/utils.d.ts +37 -0
  57. package/lib/components/display/Tabs/Tab.d.ts +41 -0
  58. package/lib/components/display/Tabs/TabList.d.ts +27 -0
  59. package/lib/components/display/Tabs/TabPanel.d.ts +31 -0
  60. package/lib/components/display/Tabs/Tabs.d.ts +90 -0
  61. package/lib/components/display/Tabs/TabsContext.d.ts +63 -0
  62. package/lib/components/display/Tabs/index.d.ts +11 -0
  63. package/lib/components/display/TruncatedList/TruncatedList.d.ts +69 -0
  64. package/lib/components/display/TruncatedList/index.d.ts +2 -0
  65. package/lib/components/display/index.d.ts +4 -0
  66. package/lib/components/dnd/DndProvider/DndContext.d.ts +91 -0
  67. package/lib/components/dnd/DndProvider/DndProvider.d.ts +37 -0
  68. package/lib/components/dnd/DndProvider/index.d.ts +3 -0
  69. package/lib/components/dnd/DragHandle/DragHandle.d.ts +41 -0
  70. package/lib/components/dnd/DragHandle/index.d.ts +2 -0
  71. package/lib/components/dnd/DragOverlay/DragOverlay.d.ts +39 -0
  72. package/lib/components/dnd/DragOverlay/index.d.ts +2 -0
  73. package/lib/components/dnd/KanbanBoard/KanbanBoard.d.ts +126 -0
  74. package/lib/components/dnd/KanbanBoard/KanbanBoardContext.d.ts +62 -0
  75. package/lib/components/dnd/KanbanBoard/KanbanCard.d.ts +76 -0
  76. package/lib/components/dnd/KanbanBoard/KanbanColumn.d.ts +43 -0
  77. package/lib/components/dnd/KanbanBoard/index.d.ts +5 -0
  78. package/lib/components/dnd/ResizablePanels/ResizablePanel.d.ts +53 -0
  79. package/lib/components/dnd/ResizablePanels/ResizablePanels.d.ts +43 -0
  80. package/lib/components/dnd/ResizablePanels/ResizablePanelsContext.d.ts +64 -0
  81. package/lib/components/dnd/ResizablePanels/ResizeHandle.d.ts +28 -0
  82. package/lib/components/dnd/ResizablePanels/index.d.ts +5 -0
  83. package/lib/components/dnd/SortableGrid/SortableGrid.d.ts +76 -0
  84. package/lib/components/dnd/SortableGrid/SortableGridItem.d.ts +47 -0
  85. package/lib/components/dnd/SortableGrid/index.d.ts +3 -0
  86. package/lib/components/dnd/SortableList/SortableItem.d.ts +76 -0
  87. package/lib/components/dnd/SortableList/SortableList.d.ts +98 -0
  88. package/lib/components/dnd/SortableList/SortableListContext.d.ts +42 -0
  89. package/lib/components/dnd/SortableList/index.d.ts +4 -0
  90. package/lib/components/dnd/hooks/index.d.ts +3 -0
  91. package/lib/components/dnd/hooks/useDraggable.d.ts +66 -0
  92. package/lib/components/dnd/hooks/useDroppable.d.ts +73 -0
  93. package/lib/components/dnd/hooks/useSortable.d.ts +94 -0
  94. package/lib/components/dnd/index.d.ts +8 -0
  95. package/lib/components/filters/FilterContext.d.ts +34 -0
  96. package/lib/components/filters/core/ActiveFilters/ActiveFilters.d.ts +16 -0
  97. package/lib/components/filters/core/ActiveFilters/index.d.ts +2 -0
  98. package/lib/components/filters/core/FilterField/FilterField.d.ts +17 -0
  99. package/lib/components/filters/core/FilterField/index.d.ts +2 -0
  100. package/lib/components/filters/core/FilterProvider/FilterProvider.d.ts +4 -0
  101. package/lib/components/filters/core/FilterProvider/index.d.ts +2 -0
  102. package/lib/components/filters/core/FilterSection/FilterSection.d.ts +16 -0
  103. package/lib/components/filters/core/FilterSection/index.d.ts +2 -0
  104. package/lib/components/filters/core/index.d.ts +7 -0
  105. package/lib/components/filters/fields/CheckboxFilter.d.ts +17 -0
  106. package/lib/components/filters/fields/DateFilter.d.ts +21 -0
  107. package/lib/components/filters/fields/DateRangeFilter.d.ts +19 -0
  108. package/lib/components/filters/fields/ListSelectFilter.d.ts +19 -0
  109. package/lib/components/filters/fields/MultiSelectFilter.d.ts +19 -0
  110. package/lib/components/filters/fields/NumberFilter.d.ts +19 -0
  111. package/lib/components/filters/fields/NumberRangeFilter.d.ts +19 -0
  112. package/lib/components/filters/fields/RatingFilter.d.ts +19 -0
  113. package/lib/components/filters/fields/SelectFilter.d.ts +21 -0
  114. package/lib/components/filters/fields/TextFilter.d.ts +21 -0
  115. package/lib/components/filters/fields/ToggleFilter.d.ts +17 -0
  116. package/lib/components/filters/fields/index.d.ts +25 -0
  117. package/lib/components/filters/hooks/index.d.ts +9 -0
  118. package/lib/components/filters/hooks/useFilter.d.ts +57 -0
  119. package/lib/components/filters/hooks/useFilterDependencies.d.ts +40 -0
  120. package/lib/components/filters/hooks/useFilterOptions.d.ts +70 -0
  121. package/lib/components/filters/index.d.ts +43 -0
  122. package/lib/components/filters/layouts/FilterAccordion/FilterAccordion.d.ts +15 -0
  123. package/lib/components/filters/layouts/FilterAccordion/index.d.ts +2 -0
  124. package/lib/components/filters/layouts/FilterBar/FilterBar.d.ts +18 -0
  125. package/lib/components/filters/layouts/FilterBar/index.d.ts +2 -0
  126. package/lib/components/filters/layouts/FilterModal/FilterModal.d.ts +24 -0
  127. package/lib/components/filters/layouts/FilterModal/index.d.ts +2 -0
  128. package/lib/components/filters/layouts/FilterPopover/FilterPopover.d.ts +19 -0
  129. package/lib/components/filters/layouts/FilterPopover/index.d.ts +2 -0
  130. package/lib/components/filters/layouts/FilterSidebar/FilterSidebar.d.ts +20 -0
  131. package/lib/components/filters/layouts/FilterSidebar/index.d.ts +2 -0
  132. package/lib/components/filters/layouts/index.d.ts +8 -0
  133. package/lib/components/filters/types.d.ts +937 -0
  134. package/lib/components/index.d.ts +52 -0
  135. package/lib/components/inputs/Checkbox/Checkbox.d.ts +2 -2
  136. package/lib/components/inputs/CheckboxGroup/CheckboxGroup.d.ts +122 -0
  137. package/lib/components/inputs/CheckboxGroup/CheckboxGroupContext.d.ts +42 -0
  138. package/lib/components/inputs/CheckboxGroup/CheckboxGroupItem.d.ts +50 -0
  139. package/lib/components/inputs/CheckboxGroup/index.d.ts +7 -0
  140. package/lib/components/inputs/NumberInput/NumberInput.d.ts +3 -1
  141. package/lib/components/layout/AdaptiveGrid/AdaptiveGrid.d.ts +100 -0
  142. package/lib/components/layout/AdaptiveGrid/index.d.ts +2 -0
  143. package/lib/components/layout/MasonryLayout/MasonryLayout.d.ts +74 -0
  144. package/lib/components/layout/MasonryLayout/index.d.ts +2 -0
  145. package/lib/components/layout/Panes/Pane.d.ts +72 -0
  146. package/lib/components/layout/Panes/Panes.d.ts +75 -0
  147. package/lib/components/layout/Panes/PanesContext.d.ts +60 -0
  148. package/lib/components/layout/Panes/index.d.ts +6 -0
  149. package/lib/components/layout/ResponsiveStack/ResponsiveStack.d.ts +99 -0
  150. package/lib/components/layout/ResponsiveStack/index.d.ts +2 -0
  151. package/lib/components/layout/index.d.ts +4 -0
  152. package/lib/components/navigation/BottomNavigation/BottomNavigation.d.ts +53 -0
  153. package/lib/components/navigation/BottomNavigation/BottomNavigationContext.d.ts +27 -0
  154. package/lib/components/navigation/BottomNavigation/BottomNavigationItem.d.ts +59 -0
  155. package/lib/components/navigation/BottomNavigation/index.d.ts +7 -0
  156. package/lib/components/navigation/Breadcrumbs/BreadcrumbItem.d.ts +37 -0
  157. package/lib/components/navigation/Breadcrumbs/BreadcrumbSeparator.d.ts +22 -0
  158. package/lib/components/navigation/Breadcrumbs/Breadcrumbs.d.ts +96 -0
  159. package/lib/components/navigation/Breadcrumbs/index.d.ts +9 -0
  160. package/lib/components/navigation/Breadcrumbs/useBreadcrumbsFromPath.d.ts +73 -0
  161. package/lib/components/navigation/CollapsibleSidebar/CollapsibleSidebar.d.ts +113 -0
  162. package/lib/components/navigation/CollapsibleSidebar/index.d.ts +2 -0
  163. package/lib/components/navigation/NavLink/NavLink.d.ts +74 -0
  164. package/lib/components/navigation/NavLink/index.d.ts +3 -0
  165. package/lib/components/navigation/Navbar/Navbar.d.ts +81 -0
  166. package/lib/components/navigation/Navbar/NavbarActions.d.ts +21 -0
  167. package/lib/components/navigation/Navbar/NavbarBrand.d.ts +29 -0
  168. package/lib/components/navigation/Navbar/NavbarCollapse.d.ts +26 -0
  169. package/lib/components/navigation/Navbar/NavbarContext.d.ts +50 -0
  170. package/lib/components/navigation/Navbar/NavbarNav.d.ts +22 -0
  171. package/lib/components/navigation/Navbar/NavbarToggle.d.ts +21 -0
  172. package/lib/components/navigation/Navbar/index.d.ts +15 -0
  173. package/lib/components/navigation/Pagination/Pagination.d.ts +99 -0
  174. package/lib/components/navigation/Pagination/index.d.ts +3 -0
  175. package/lib/components/navigation/SideNav/SideNav.d.ts +89 -0
  176. package/lib/components/navigation/SideNav/SideNavContext.d.ts +43 -0
  177. package/lib/components/navigation/SideNav/SideNavDivider.d.ts +22 -0
  178. package/lib/components/navigation/SideNav/SideNavGroup.d.ts +44 -0
  179. package/lib/components/navigation/SideNav/SideNavItem.d.ts +71 -0
  180. package/lib/components/navigation/SideNav/index.d.ts +11 -0
  181. package/lib/components/navigation/Stepper/Step.d.ts +57 -0
  182. package/lib/components/navigation/Stepper/Stepper.d.ts +80 -0
  183. package/lib/components/navigation/Stepper/StepperContext.d.ts +58 -0
  184. package/lib/components/navigation/Stepper/index.d.ts +7 -0
  185. package/lib/components/navigation/index.d.ts +16 -0
  186. package/lib/components/overlays/Alert/Alert.d.ts +102 -0
  187. package/lib/components/overlays/Alert/AlertContext.d.ts +94 -0
  188. package/lib/components/overlays/Alert/AlertPresets.d.ts +42 -0
  189. package/lib/components/overlays/Alert/AlertProvider.d.ts +40 -0
  190. package/lib/components/overlays/Alert/index.d.ts +11 -0
  191. package/lib/components/overlays/Dialog/Dialog.d.ts +197 -0
  192. package/lib/components/overlays/Dialog/DialogContext.d.ts +75 -0
  193. package/lib/components/overlays/Dialog/DialogProvider.d.ts +30 -0
  194. package/lib/components/overlays/Dialog/index.d.ts +9 -0
  195. package/lib/components/overlays/Toast/Toast.d.ts +103 -0
  196. package/lib/components/overlays/Toast/ToastContainer.d.ts +37 -0
  197. package/lib/components/overlays/Toast/ToastContext.d.ts +126 -0
  198. package/lib/components/overlays/Toast/ToastProvider.d.ts +71 -0
  199. package/lib/components/overlays/Toast/index.d.ts +11 -0
  200. package/lib/hooks/index.d.ts +10 -0
  201. package/lib/hooks/useAlert/index.d.ts +2 -0
  202. package/lib/hooks/useAlert/useAlert.d.ts +99 -0
  203. package/lib/hooks/useAsyncToast/index.d.ts +2 -0
  204. package/lib/hooks/useAsyncToast/useAsyncToast.d.ts +93 -0
  205. package/lib/hooks/useDialog/index.d.ts +2 -0
  206. package/lib/hooks/useDialog/useDialog.d.ts +58 -0
  207. package/lib/hooks/useResizeObserver/index.d.ts +2 -0
  208. package/lib/hooks/useResizeObserver/useResizeObserver.d.ts +69 -0
  209. package/lib/hooks/useToast/index.d.ts +2 -0
  210. package/lib/hooks/useToast/useToast.d.ts +97 -0
  211. package/lib/providers/GlobalProvider/GlobalProvider.d.ts +16 -1
  212. package/package.json +1 -1
  213. package/README.md +0 -688
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ import { BaseComponentProps, ComponentSize } from '../../../types';
3
+ export interface MultiSelectFilterProps extends BaseComponentProps {
4
+ /** Filter ID from FilterDefinition */
5
+ filterId: string;
6
+ /** Override label */
7
+ label?: string;
8
+ /** Show label */
9
+ showLabel?: boolean;
10
+ /** Size variant */
11
+ size?: ComponentSize;
12
+ /** Additional props */
13
+ componentProps?: Record<string, unknown>;
14
+ }
15
+ /**
16
+ * MultiSelectFilter wraps CheckboxGroup for multi-value selection
17
+ */
18
+ export declare const MultiSelectFilter: React.ForwardRefExoticComponent<MultiSelectFilterProps & React.RefAttributes<HTMLDivElement>>;
19
+ export default MultiSelectFilter;
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ import { BaseComponentProps, ComponentSize } from '../../../types';
3
+ export interface NumberFilterProps extends BaseComponentProps {
4
+ /** Filter ID from FilterDefinition */
5
+ filterId: string;
6
+ /** Override label */
7
+ label?: string;
8
+ /** Show label */
9
+ showLabel?: boolean;
10
+ /** Size variant */
11
+ size?: ComponentSize;
12
+ /** Additional props for NumberInput component */
13
+ numberInputProps?: Record<string, unknown>;
14
+ }
15
+ /**
16
+ * NumberFilter wraps the NumberInput component for numeric filters
17
+ */
18
+ export declare const NumberFilter: React.ForwardRefExoticComponent<NumberFilterProps & React.RefAttributes<HTMLDivElement>>;
19
+ export default NumberFilter;
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ import { BaseComponentProps, ComponentSize } from '../../../types';
3
+ export interface NumberRangeFilterProps extends BaseComponentProps {
4
+ /** Filter ID from FilterDefinition */
5
+ filterId: string;
6
+ /** Override label */
7
+ label?: string;
8
+ /** Show label */
9
+ showLabel?: boolean;
10
+ /** Size variant */
11
+ size?: ComponentSize;
12
+ /** Additional props */
13
+ componentProps?: Record<string, unknown>;
14
+ }
15
+ /**
16
+ * NumberRangeFilter provides min/max number filtering with slider or inputs
17
+ */
18
+ export declare const NumberRangeFilter: React.ForwardRefExoticComponent<NumberRangeFilterProps & React.RefAttributes<HTMLDivElement>>;
19
+ export default NumberRangeFilter;
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ import { BaseComponentProps, ComponentSize } from '../../../types';
3
+ export interface RatingFilterProps extends BaseComponentProps {
4
+ /** Filter ID from FilterDefinition */
5
+ filterId: string;
6
+ /** Override label */
7
+ label?: string;
8
+ /** Show label */
9
+ showLabel?: boolean;
10
+ /** Size variant */
11
+ size?: ComponentSize;
12
+ /** Additional props for Rating component */
13
+ ratingProps?: Record<string, unknown>;
14
+ }
15
+ /**
16
+ * RatingFilter wraps the Rating component for star-based filters
17
+ */
18
+ export declare const RatingFilter: React.ForwardRefExoticComponent<RatingFilterProps & React.RefAttributes<HTMLDivElement>>;
19
+ export default RatingFilter;
@@ -0,0 +1,21 @@
1
+ import { default as React } from 'react';
2
+ import { BaseComponentProps, ComponentSize } from '../../../types';
3
+ export interface SelectFilterProps extends BaseComponentProps {
4
+ /** Filter ID from FilterDefinition */
5
+ filterId: string;
6
+ /** Override label */
7
+ label?: string;
8
+ /** Override placeholder */
9
+ placeholder?: string;
10
+ /** Show label */
11
+ showLabel?: boolean;
12
+ /** Size variant */
13
+ size?: ComponentSize;
14
+ /** Additional props for Select component */
15
+ selectProps?: Record<string, unknown>;
16
+ }
17
+ /**
18
+ * SelectFilter wraps the Select component for use in filter systems
19
+ */
20
+ export declare const SelectFilter: React.ForwardRefExoticComponent<SelectFilterProps & React.RefAttributes<HTMLDivElement>>;
21
+ export default SelectFilter;
@@ -0,0 +1,21 @@
1
+ import { default as React } from 'react';
2
+ import { BaseComponentProps, ComponentSize } from '../../../types';
3
+ export interface TextFilterProps extends BaseComponentProps {
4
+ /** Filter ID from FilterDefinition */
5
+ filterId: string;
6
+ /** Override label */
7
+ label?: string;
8
+ /** Override placeholder */
9
+ placeholder?: string;
10
+ /** Show label */
11
+ showLabel?: boolean;
12
+ /** Size variant */
13
+ size?: ComponentSize;
14
+ /** Additional props for Input component */
15
+ inputProps?: Record<string, unknown>;
16
+ }
17
+ /**
18
+ * TextFilter wraps the Input component for text/search filters
19
+ */
20
+ export declare const TextFilter: React.ForwardRefExoticComponent<TextFilterProps & React.RefAttributes<HTMLDivElement>>;
21
+ export default TextFilter;
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ import { BaseComponentProps, ComponentSize } from '../../../types';
3
+ export interface ToggleFilterProps extends BaseComponentProps {
4
+ /** Filter ID from FilterDefinition */
5
+ filterId: string;
6
+ /** Override label */
7
+ label?: string;
8
+ /** Size variant */
9
+ size?: ComponentSize;
10
+ /** Additional props for Toggle component */
11
+ toggleProps?: Record<string, unknown>;
12
+ }
13
+ /**
14
+ * ToggleFilter wraps the Toggle component for boolean switch filters
15
+ */
16
+ export declare const ToggleFilter: React.ForwardRefExoticComponent<ToggleFilterProps & React.RefAttributes<HTMLDivElement>>;
17
+ export default ToggleFilter;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Filter field components exports
3
+ */
4
+ export { SelectFilter } from './SelectFilter';
5
+ export type { SelectFilterProps } from './SelectFilter';
6
+ export { MultiSelectFilter } from './MultiSelectFilter';
7
+ export type { MultiSelectFilterProps } from './MultiSelectFilter';
8
+ export { CheckboxFilter } from './CheckboxFilter';
9
+ export type { CheckboxFilterProps } from './CheckboxFilter';
10
+ export { ToggleFilter } from './ToggleFilter';
11
+ export type { ToggleFilterProps } from './ToggleFilter';
12
+ export { TextFilter } from './TextFilter';
13
+ export type { TextFilterProps } from './TextFilter';
14
+ export { DateFilter } from './DateFilter';
15
+ export type { DateFilterProps } from './DateFilter';
16
+ export { DateRangeFilter } from './DateRangeFilter';
17
+ export type { DateRangeFilterProps } from './DateRangeFilter';
18
+ export { NumberFilter } from './NumberFilter';
19
+ export type { NumberFilterProps } from './NumberFilter';
20
+ export { NumberRangeFilter } from './NumberRangeFilter';
21
+ export type { NumberRangeFilterProps } from './NumberRangeFilter';
22
+ export { RatingFilter } from './RatingFilter';
23
+ export type { RatingFilterProps } from './RatingFilter';
24
+ export { ListSelectFilter } from './ListSelectFilter';
25
+ export type { ListSelectFilterProps } from './ListSelectFilter';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Filter hooks exports
3
+ */
4
+ export { useFilter } from './useFilter';
5
+ export type { UseFilterOptions, UseFilterReturn } from './useFilter';
6
+ export { useFilterDependencies, getDependencyValues } from './useFilterDependencies';
7
+ export type { UseFilterDependenciesOptions, UseFilterDependenciesReturn, } from './useFilterDependencies';
8
+ export { useFilterOptions, clearOptionsCache } from './useFilterOptions';
9
+ export type { UseFilterOptionsOptions, UseFilterOptionsReturn } from './useFilterOptions';
@@ -0,0 +1,57 @@
1
+ import { FilterValue, FilterValueWithMeta, FilterDefinition, FilterOptionsState } from '../types';
2
+ export interface UseFilterOptions {
3
+ filterId: string;
4
+ }
5
+ export interface UseFilterReturn<T extends FilterValue = FilterValue> {
6
+ /** Filter definition */
7
+ filter: FilterDefinition<T> | undefined;
8
+ /** Current value */
9
+ value: T | undefined;
10
+ /** Value with metadata */
11
+ valueMeta: FilterValueWithMeta<T> | undefined;
12
+ /** Whether filter has a non-empty value */
13
+ isActive: boolean;
14
+ /** Whether filter is visible (considering dependencies) */
15
+ isVisible: boolean;
16
+ /** Whether filter is enabled (considering dependencies) */
17
+ isEnabled: boolean;
18
+ /** Whether options are loading */
19
+ isLoading: boolean;
20
+ /** Whether filter has been interacted with */
21
+ isTouched: boolean;
22
+ /** Validation error message */
23
+ error: string | null;
24
+ /** Options state for select-based filters */
25
+ options: FilterOptionsState;
26
+ /** Set the filter value */
27
+ setValue: (value: T) => void;
28
+ /** Clear the filter (reset to default) */
29
+ clear: () => void;
30
+ /** Mark filter as touched */
31
+ touch: () => void;
32
+ /** Validate the filter value */
33
+ validate: () => boolean;
34
+ }
35
+ /**
36
+ * Hook to access a single filter's state and actions
37
+ *
38
+ * @param options - Hook options with filterId
39
+ * @returns Filter state and actions
40
+ *
41
+ * @example
42
+ * ```tsx
43
+ * function StatusFilter() {
44
+ * const { value, setValue, options, isLoading } = useFilter({ filterId: 'status' });
45
+ *
46
+ * return (
47
+ * <Select
48
+ * value={value as string}
49
+ * onChange={setValue}
50
+ * options={options.items}
51
+ * loading={isLoading}
52
+ * />
53
+ * );
54
+ * }
55
+ * ```
56
+ */
57
+ export declare function useFilter<T extends FilterValue = FilterValue>(options: UseFilterOptions): UseFilterReturn<T>;
@@ -0,0 +1,40 @@
1
+ import { FilterDefinition, FilterValue } from '../types';
2
+ export interface UseFilterDependenciesOptions {
3
+ /** The filter definition */
4
+ filter: FilterDefinition;
5
+ /** All current filter values */
6
+ allValues: Record<string, FilterValue>;
7
+ /** Callback when options should be reloaded */
8
+ onReloadOptions?: () => void;
9
+ /** Callback when value should be reset */
10
+ onResetValue?: () => void;
11
+ }
12
+ export interface UseFilterDependenciesReturn {
13
+ /** Whether the filter should be visible */
14
+ isVisible: boolean;
15
+ /** Whether the filter should be enabled */
16
+ isEnabled: boolean;
17
+ /** Whether options should be reloaded */
18
+ shouldReloadOptions: boolean;
19
+ }
20
+ /**
21
+ * Hook to evaluate filter dependencies and manage cascading behavior
22
+ *
23
+ * @param options - Hook options
24
+ * @returns Dependency evaluation results
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * const { isVisible, isEnabled } = useFilterDependencies({
29
+ * filter: subcategoryFilter,
30
+ * allValues: filterValues,
31
+ * onReloadOptions: () => reloadSubcategories(),
32
+ * onResetValue: () => clearSubcategory(),
33
+ * });
34
+ * ```
35
+ */
36
+ export declare function useFilterDependencies(options: UseFilterDependenciesOptions): UseFilterDependenciesReturn;
37
+ /**
38
+ * Get the dependency values for a filter
39
+ */
40
+ export declare function getDependencyValues(filter: FilterDefinition, allValues: Record<string, FilterValue>): Record<string, FilterValue>;
@@ -0,0 +1,70 @@
1
+ import { FilterOption, FilterOptionsLoader, FilterValue } from '../types';
2
+ export interface UseFilterOptionsOptions<T = string> {
3
+ /** Static options (takes precedence if provided) */
4
+ staticOptions?: Array<FilterOption<T>>;
5
+ /** Async options loader configuration */
6
+ loader?: FilterOptionsLoader<T>;
7
+ /** Current search query */
8
+ searchQuery?: string;
9
+ /** Dependency values (for cascading filters) */
10
+ dependencyValues?: Record<string, FilterValue>;
11
+ /** Whether to load options immediately
12
+ * @default true
13
+ */
14
+ loadOnMount?: boolean;
15
+ /** Filter ID (used for cache key) */
16
+ filterId?: string;
17
+ }
18
+ export interface UseFilterOptionsReturn<T = string> {
19
+ /** Current options */
20
+ options: Array<FilterOption<T>>;
21
+ /** Whether options are loading */
22
+ loading: boolean;
23
+ /** Error message if loading failed */
24
+ error: string | null;
25
+ /** Whether more options are available */
26
+ hasMore: boolean;
27
+ /** Total count of options (if known) */
28
+ totalCount: number | undefined;
29
+ /** Load more options (pagination) */
30
+ loadMore: () => void;
31
+ /** Reload options from scratch */
32
+ reload: () => void;
33
+ /** Update search query */
34
+ search: (query: string) => void;
35
+ }
36
+ /**
37
+ * Hook to manage filter options with async loading, caching, and pagination
38
+ *
39
+ * @param options - Hook options
40
+ * @returns Options state and actions
41
+ *
42
+ * @example
43
+ * ```tsx
44
+ * // Static options
45
+ * const { options } = useFilterOptions({
46
+ * staticOptions: [
47
+ * { value: 'active', label: 'Active' },
48
+ * { value: 'inactive', label: 'Inactive' },
49
+ * ],
50
+ * });
51
+ *
52
+ * // Async options with pagination
53
+ * const { options, loading, hasMore, loadMore, search } = useFilterOptions({
54
+ * loader: {
55
+ * load: async ({ searchQuery, page, pageSize }) => {
56
+ * const response = await fetch(`/api/items?q=${searchQuery}&page=${page}`);
57
+ * const data = await response.json();
58
+ * return { options: data.items, hasMore: data.hasMore };
59
+ * },
60
+ * paginated: true,
61
+ * debounceMs: 300,
62
+ * },
63
+ * });
64
+ * ```
65
+ */
66
+ export declare function useFilterOptions<T = string>(options: UseFilterOptionsOptions<T>): UseFilterOptionsReturn<T>;
67
+ /**
68
+ * Clear the options cache for a specific filter or all filters
69
+ */
70
+ export declare function clearOptionsCache(filterId?: string): void;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Filter component system - Main exports
3
+ *
4
+ * A highly configurable filter component system supporting multiple filter types,
5
+ * cascading dependencies, lazy-loaded options, and various UI layouts.
6
+ *
7
+ * @example Basic usage
8
+ * ```tsx
9
+ * import {
10
+ * FilterProvider,
11
+ * FilterSidebar,
12
+ * FilterSection,
13
+ * FilterField,
14
+ * ActiveFilters,
15
+ * } from '@ui-components';
16
+ *
17
+ * const filters = [
18
+ * { id: 'status', type: 'select', label: 'Status', options: [...] },
19
+ * { id: 'date', type: 'date-range', label: 'Date Range' },
20
+ * ];
21
+ *
22
+ * <FilterProvider filters={filters} onChange={handleChange}>
23
+ * <FilterSidebar>
24
+ * <FilterSection title="Filters">
25
+ * <FilterField filterId="status" />
26
+ * <FilterField filterId="date" />
27
+ * </FilterSection>
28
+ * </FilterSidebar>
29
+ * <ActiveFilters />
30
+ * </FilterProvider>
31
+ * ```
32
+ */
33
+ export type { FilterType, FilterValue, FilterValueWithMeta, FilterOption, FilterOptionsLoader, FilterOptionsLoaderParams, FilterOptionsLoadResult, FilterDependency, FilterDependencyAction, FilterDefinition, FilterGroup, FilterState, FilterActions, FilterContextValue, FilterOptionsState, NumberRangeValue, DateRangeValue, SelectFilterConfig, MultiSelectFilterConfig, MultiSelectDisplayMode, TextFilterConfig, NumberFilterConfig, NumberRangeFilterConfig, NumberRangeDisplayMode, DateFilterConfig, DateRangeFilterConfig, DateRangePreset, RatingFilterConfig, ListSelectFilterConfig, FilterTypeConfig, FilterProviderProps, FilterFieldProps, FilterSectionProps, ActiveFiltersProps, FilterLayoutProps, FilterSidebarProps, FilterBarProps, FilterPopoverProps, FilterModalProps, FilterAccordionProps, } from './types';
34
+ export { FilterContext, useFilterContext, useFilterContextStrict, } from './FilterContext';
35
+ export { useFilter, useFilterDependencies, useFilterOptions, getDependencyValues, clearOptionsCache, } from './hooks';
36
+ export type { UseFilterOptions, UseFilterReturn, UseFilterDependenciesOptions, UseFilterDependenciesReturn, UseFilterOptionsOptions, UseFilterOptionsReturn, } from './hooks';
37
+ export { FilterProvider } from './core/FilterProvider';
38
+ export { FilterField } from './core/FilterField';
39
+ export { FilterSection } from './core/FilterSection';
40
+ export { ActiveFilters } from './core/ActiveFilters';
41
+ export { SelectFilter, MultiSelectFilter, CheckboxFilter, ToggleFilter, TextFilter, DateFilter, DateRangeFilter, NumberFilter, NumberRangeFilter, RatingFilter, ListSelectFilter, } from './fields';
42
+ export type { SelectFilterProps, MultiSelectFilterProps, CheckboxFilterProps, ToggleFilterProps, TextFilterProps, DateFilterProps, DateRangeFilterProps, NumberFilterProps, NumberRangeFilterProps, RatingFilterProps, ListSelectFilterProps, } from './fields';
43
+ export { FilterSidebar, FilterBar, FilterPopover, FilterModal, FilterAccordion, } from './layouts';
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ import { FilterAccordionProps } from '../../types';
3
+ /**
4
+ * FilterAccordion automatically groups filters by their group property
5
+ * and displays them in an accordion layout.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <FilterProvider filters={filters} groups={groups}>
10
+ * <FilterAccordion mode="multiple" showGroupCounts />
11
+ * </FilterProvider>
12
+ * ```
13
+ */
14
+ export declare const FilterAccordion: React.ForwardRefExoticComponent<FilterAccordionProps & React.RefAttributes<HTMLDivElement>>;
15
+ export default FilterAccordion;
@@ -0,0 +1,2 @@
1
+ export { FilterAccordion } from './FilterAccordion';
2
+ export { default } from './FilterAccordion';
@@ -0,0 +1,18 @@
1
+ import { default as React } from 'react';
2
+ import { FilterBarProps } from '../../types';
3
+ /**
4
+ * FilterBar provides a horizontal layout for inline filters.
5
+ * Supports overflow handling with a "More Filters" dropdown.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <FilterProvider filters={filters}>
10
+ * <FilterBar visibleFilters={['status', 'date']}>
11
+ * <FilterField filterId="status" showLabel={false} />
12
+ * <FilterField filterId="date" showLabel={false} />
13
+ * </FilterBar>
14
+ * </FilterProvider>
15
+ * ```
16
+ */
17
+ export declare const FilterBar: React.ForwardRefExoticComponent<FilterBarProps & React.RefAttributes<HTMLDivElement>>;
18
+ export default FilterBar;
@@ -0,0 +1,2 @@
1
+ export { FilterBar } from './FilterBar';
2
+ export { default } from './FilterBar';
@@ -0,0 +1,24 @@
1
+ import { default as React } from 'react';
2
+ import { FilterModalProps } from '../../types';
3
+ /**
4
+ * FilterModal provides a full modal dialog for complex filter interfaces.
5
+ * Useful for advanced filters with many options.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <FilterProvider filters={filters}>
10
+ * <FilterModal
11
+ * title="Advanced Filters"
12
+ * renderTrigger={({ onClick, activeCount }) => (
13
+ * <Button onClick={onClick}>
14
+ * Filters {activeCount > 0 && `(${activeCount})`}
15
+ * </Button>
16
+ * )}
17
+ * >
18
+ * <FilterAccordion>...</FilterAccordion>
19
+ * </FilterModal>
20
+ * </FilterProvider>
21
+ * ```
22
+ */
23
+ export declare const FilterModal: React.ForwardRefExoticComponent<FilterModalProps & React.RefAttributes<HTMLDivElement>>;
24
+ export default FilterModal;
@@ -0,0 +1,2 @@
1
+ export { FilterModal } from './FilterModal';
2
+ export { default } from './FilterModal';
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ import { FilterPopoverProps } from '../../types';
3
+ /**
4
+ * FilterPopover provides a trigger-based dropdown for filter controls.
5
+ * Shows a badge with active filter count on the trigger button.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <FilterProvider filters={filters}>
10
+ * <FilterPopover triggerLabel="Filters">
11
+ * <FilterSection title="Status">
12
+ * <FilterField filterId="status" />
13
+ * </FilterSection>
14
+ * </FilterPopover>
15
+ * </FilterProvider>
16
+ * ```
17
+ */
18
+ export declare const FilterPopover: React.ForwardRefExoticComponent<FilterPopoverProps & React.RefAttributes<HTMLDivElement>>;
19
+ export default FilterPopover;
@@ -0,0 +1,2 @@
1
+ export { FilterPopover } from './FilterPopover';
2
+ export { default } from './FilterPopover';
@@ -0,0 +1,20 @@
1
+ import { default as React } from 'react';
2
+ import { FilterSidebarProps } from '../../types';
3
+ /**
4
+ * FilterSidebar provides a vertical sidebar layout for filter controls.
5
+ * Supports collapsible behavior, header/footer slots, and active filters display.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <FilterProvider filters={filters}>
10
+ * <FilterSidebar width={280} header={<h3>Filters</h3>}>
11
+ * <FilterSection title="Status">
12
+ * <FilterField filterId="status" />
13
+ * </FilterSection>
14
+ * </FilterSidebar>
15
+ * <main>Content</main>
16
+ * </FilterProvider>
17
+ * ```
18
+ */
19
+ export declare const FilterSidebar: React.ForwardRefExoticComponent<FilterSidebarProps & React.RefAttributes<HTMLDivElement>>;
20
+ export default FilterSidebar;
@@ -0,0 +1,2 @@
1
+ export { FilterSidebar } from './FilterSidebar';
2
+ export { default } from './FilterSidebar';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Filter layout components exports
3
+ */
4
+ export { FilterSidebar } from './FilterSidebar';
5
+ export { FilterBar } from './FilterBar';
6
+ export { FilterPopover } from './FilterPopover';
7
+ export { FilterModal } from './FilterModal';
8
+ export { FilterAccordion } from './FilterAccordion';