@classytic/fluid 0.2.1 → 0.3.2

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 (69) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +149 -62
  3. package/dist/api-pagination-CJ0vR_w6.d.mts +34 -0
  4. package/dist/api-pagination-DBTE0yk4.mjs +190 -0
  5. package/dist/chunk-DQk6qfdC.mjs +18 -0
  6. package/dist/client/calendar.d.mts +105 -0
  7. package/dist/client/calendar.mjs +202 -0
  8. package/dist/client/core.d.mts +1614 -0
  9. package/dist/client/core.mjs +2779 -0
  10. package/dist/client/error.d.mts +125 -0
  11. package/dist/client/error.mjs +166 -0
  12. package/dist/client/hooks.d.mts +162 -0
  13. package/dist/client/hooks.mjs +447 -0
  14. package/dist/client/table.d.mts +84 -0
  15. package/dist/client/table.mjs +373 -0
  16. package/dist/client/theme.d.mts +6 -0
  17. package/dist/client/theme.mjs +65 -0
  18. package/dist/command.d.mts +134 -0
  19. package/dist/command.mjs +132 -0
  20. package/dist/compact.d.mts +359 -0
  21. package/dist/compact.mjs +892 -0
  22. package/dist/dashboard.d.mts +778 -0
  23. package/dist/dashboard.mjs +1617 -0
  24. package/dist/filter-utils-DqMmy_v-.mjs +72 -0
  25. package/dist/filter-utils-IZ0GtuPo.d.mts +40 -0
  26. package/dist/forms.d.mts +1549 -0
  27. package/dist/forms.mjs +3740 -0
  28. package/dist/index.d.mts +296 -0
  29. package/dist/index.mjs +432 -0
  30. package/dist/layouts.d.mts +215 -0
  31. package/dist/layouts.mjs +460 -0
  32. package/dist/search-context-DR7DBs7S.mjs +19 -0
  33. package/dist/search.d.mts +254 -0
  34. package/dist/search.mjs +523 -0
  35. package/dist/sheet-wrapper-CWNCvYMD.mjs +211 -0
  36. package/dist/use-base-search-BGgWnWaF.d.mts +35 -0
  37. package/dist/use-debounce-xmZucz5e.mjs +53 -0
  38. package/dist/use-keyboard-shortcut-Bl6YM5Q7.mjs +82 -0
  39. package/dist/use-keyboard-shortcut-_mRCh3QO.d.mts +24 -0
  40. package/dist/use-media-query-BnVNIKT4.mjs +17 -0
  41. package/dist/use-mobile-BX3SQVo2.mjs +20 -0
  42. package/dist/use-scroll-detection-CsgsQYvy.mjs +43 -0
  43. package/dist/utils-CDue7cEt.d.mts +6 -0
  44. package/dist/utils-DQ5SCVoW.mjs +10 -0
  45. package/package.json +85 -45
  46. package/styles.css +2 -2
  47. package/dist/chunk-GUHK2DTW.js +0 -15
  48. package/dist/chunk-GUHK2DTW.js.map +0 -1
  49. package/dist/chunk-H3NFL3GJ.js +0 -57
  50. package/dist/chunk-H3NFL3GJ.js.map +0 -1
  51. package/dist/chunk-J2YRTQE4.js +0 -293
  52. package/dist/chunk-J2YRTQE4.js.map +0 -1
  53. package/dist/compact.d.ts +0 -217
  54. package/dist/compact.js +0 -986
  55. package/dist/compact.js.map +0 -1
  56. package/dist/dashboard.d.ts +0 -386
  57. package/dist/dashboard.js +0 -1032
  58. package/dist/dashboard.js.map +0 -1
  59. package/dist/index.d.ts +0 -2141
  60. package/dist/index.js +0 -6460
  61. package/dist/index.js.map +0 -1
  62. package/dist/layout.d.ts +0 -25
  63. package/dist/layout.js +0 -4
  64. package/dist/layout.js.map +0 -1
  65. package/dist/search.d.ts +0 -172
  66. package/dist/search.js +0 -341
  67. package/dist/search.js.map +0 -1
  68. package/dist/use-base-search-AS5Z3SAy.d.ts +0 -64
  69. package/dist/utils-Cbsgs0XP.d.ts +0 -5
@@ -0,0 +1,254 @@
1
+ import { n as UseBaseSearchReturn } from "./use-base-search-BGgWnWaF.mjs";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+ import { KeyboardEvent, ReactNode } from "react";
4
+
5
+ //#region src/components/search/search-root.d.ts
6
+ interface SearchRootProps {
7
+ children: ReactNode;
8
+ hook: UseBaseSearchReturn;
9
+ className?: string;
10
+ /**
11
+ * When true, automatically triggers `handleSearch` (debounced) whenever
12
+ * `searchValue` or `filters` change. Removes the need for a manual
13
+ * "Search" button — useful for DataTableToolbar-style UIs.
14
+ */
15
+ autoSearch?: boolean;
16
+ /** Debounce delay in ms for auto-search (default: 300) */
17
+ autoSearchDelay?: number;
18
+ }
19
+ /**
20
+ * Root search component that provides context to all child components
21
+ *
22
+ * @example
23
+ * // Manual mode (default)
24
+ * <Search.Root hook={useMySearch()}>
25
+ * <Search.Input />
26
+ * <Search.Actions />
27
+ * </Search.Root>
28
+ *
29
+ * @example
30
+ * // Auto-search mode — no Search button needed
31
+ * <Search.Root hook={useMySearch()} autoSearch>
32
+ * <Search.Input />
33
+ * <Search.ActiveFilters />
34
+ * </Search.Root>
35
+ */
36
+ declare function SearchRoot({
37
+ children,
38
+ hook,
39
+ className,
40
+ autoSearch,
41
+ autoSearchDelay
42
+ }: SearchRootProps): react_jsx_runtime0.JSX.Element;
43
+ //#endregion
44
+ //#region src/components/search/search-input.d.ts
45
+ interface SearchInputProps {
46
+ placeholder?: string;
47
+ className?: string;
48
+ disabled?: boolean;
49
+ showIcon?: boolean;
50
+ showClearButton?: boolean;
51
+ onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;
52
+ }
53
+ /**
54
+ * Search input component using modern shadcn InputGroup pattern
55
+ *
56
+ * @example
57
+ * <Search.Input placeholder="Search..." />
58
+ */
59
+ declare function SearchInput({
60
+ placeholder,
61
+ className,
62
+ disabled,
63
+ showIcon,
64
+ showClearButton,
65
+ onKeyDown,
66
+ ...props
67
+ }: SearchInputProps): react_jsx_runtime0.JSX.Element;
68
+ //#endregion
69
+ //#region src/components/search/search-type-input.d.ts
70
+ interface SearchTypeOption {
71
+ value: string;
72
+ label: string;
73
+ }
74
+ interface SearchTypeInputProps {
75
+ placeholder?: string;
76
+ className?: string;
77
+ disabled?: boolean;
78
+ showIcon?: boolean;
79
+ showClearButton?: boolean;
80
+ searchTypeOptions?: SearchTypeOption[];
81
+ onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;
82
+ }
83
+ /**
84
+ * Search input component with type selector using InputGroup pattern
85
+ *
86
+ * @example
87
+ * <Search.TypeInput
88
+ * placeholder="Search..."
89
+ * searchTypeOptions={[
90
+ * { value: "_id", label: "ID" },
91
+ * { value: "customerPhone", label: "Phone" },
92
+ * { value: "customerEmail", label: "Email" },
93
+ * ]}
94
+ * />
95
+ */
96
+ declare function SearchTypeInput({
97
+ placeholder,
98
+ className,
99
+ disabled,
100
+ showIcon,
101
+ showClearButton,
102
+ searchTypeOptions,
103
+ onKeyDown,
104
+ ...props
105
+ }: SearchTypeInputProps): react_jsx_runtime0.JSX.Element;
106
+ //#endregion
107
+ //#region src/components/search/search-filters.d.ts
108
+ interface SearchFiltersProps {
109
+ children: ReactNode;
110
+ title?: string;
111
+ description?: string;
112
+ disabled?: boolean;
113
+ className?: string;
114
+ }
115
+ /**
116
+ * Search filters component with mobile sheet support
117
+ *
118
+ * @example
119
+ * <Search.Filters>
120
+ * <TagChoiceInput label="Category" ... />
121
+ * <SelectInput label="Status" ... />
122
+ * </Search.Filters>
123
+ */
124
+ declare function SearchFilters({
125
+ children,
126
+ title,
127
+ description,
128
+ disabled,
129
+ className
130
+ }: SearchFiltersProps): react_jsx_runtime0.JSX.Element;
131
+ //#endregion
132
+ //#region src/components/search/search-actions.d.ts
133
+ interface SearchActionsProps {
134
+ showSearchButton?: boolean;
135
+ showClearButton?: boolean;
136
+ searchButtonText?: string;
137
+ clearButtonText?: string;
138
+ /**
139
+ * "combined" (default): single Clear button that clears everything.
140
+ * "split": separate Clear Search and Clear Filters buttons.
141
+ */
142
+ clearMode?: "combined" | "split";
143
+ disabled?: boolean;
144
+ className?: string;
145
+ }
146
+ /**
147
+ * Search action buttons
148
+ *
149
+ * @example
150
+ * // Combined clear (default)
151
+ * <Search.Actions />
152
+ *
153
+ * @example
154
+ * // Split clear — separate buttons for search text vs filters
155
+ * <Search.Actions clearMode="split" />
156
+ */
157
+ declare function SearchActions({
158
+ showSearchButton,
159
+ showClearButton,
160
+ searchButtonText,
161
+ clearButtonText,
162
+ clearMode,
163
+ disabled,
164
+ className
165
+ }: SearchActionsProps): react_jsx_runtime0.JSX.Element;
166
+ //#endregion
167
+ //#region src/components/search/search-container.d.ts
168
+ interface SearchContainerProps {
169
+ children: ReactNode;
170
+ className?: string;
171
+ }
172
+ /**
173
+ * Container for search input and action buttons
174
+ * Provides responsive layout
175
+ *
176
+ * @example
177
+ * <Search.Container>
178
+ * <Search.Input />
179
+ * <Search.Filters />
180
+ * <Search.Actions />
181
+ * </Search.Container>
182
+ */
183
+ declare function SearchContainer({
184
+ children,
185
+ className
186
+ }: SearchContainerProps): react_jsx_runtime0.JSX.Element;
187
+ //#endregion
188
+ //#region src/components/search/search-filter-actions.d.ts
189
+ interface SearchFilterActionsProps {
190
+ onClose?: () => void;
191
+ disabled?: boolean;
192
+ }
193
+ /**
194
+ * Filter actions component (Reset/Apply buttons)
195
+ * Used inside filter popovers/sheets
196
+ */
197
+ declare function SearchFilterActions({
198
+ onClose,
199
+ disabled
200
+ }: SearchFilterActionsProps): react_jsx_runtime0.JSX.Element;
201
+ //#endregion
202
+ //#region src/components/search/search-active-filters.d.ts
203
+ interface SearchActiveFiltersProps {
204
+ /** Override labels for filter keys (falls back to FilterConfig.label, then capitalized key) */
205
+ labels?: Record<string, string>;
206
+ /** Map filter values to display text, per filter key */
207
+ valueLabels?: Record<string, Record<string, string>>;
208
+ /** Custom formatter — return null to hide a filter pill */
209
+ formatValue?: (key: string, value: unknown) => string | null;
210
+ /** Show "Clear all" link when multiple filters active */
211
+ showClearAll?: boolean;
212
+ className?: string;
213
+ }
214
+ /**
215
+ * Renders active filters as removable pills below the search bar.
216
+ *
217
+ * @example
218
+ * ```tsx
219
+ * <Search.Root hook={searchHook}>
220
+ * <Search.Container>
221
+ * <Search.Input />
222
+ * <Search.Filters>{...}</Search.Filters>
223
+ * <Search.Actions />
224
+ * </Search.Container>
225
+ * <Search.ActiveFilters
226
+ * labels={{ status: "Status", role: "Role" }}
227
+ * valueLabels={{ status: { active: "Active", inactive: "Inactive" } }}
228
+ * />
229
+ * </Search.Root>
230
+ * ```
231
+ */
232
+ declare function SearchActiveFilters({
233
+ labels,
234
+ valueLabels,
235
+ formatValue: customFormat,
236
+ showClearAll,
237
+ className
238
+ }: SearchActiveFiltersProps): react_jsx_runtime0.JSX.Element | null;
239
+ //#endregion
240
+ //#region src/components/search/search-context.d.ts
241
+ interface SearchProviderProps {
242
+ children: ReactNode;
243
+ value: UseBaseSearchReturn;
244
+ }
245
+ declare function SearchProvider({
246
+ children,
247
+ value
248
+ }: SearchProviderProps): react_jsx_runtime0.JSX.Element;
249
+ declare function useSearch(): UseBaseSearchReturn;
250
+ declare namespace index_d_exports {
251
+ export { SearchActions as Actions, SearchActiveFilters as ActiveFilters, SearchContainer as Container, SearchFilterActions as FilterActions, SearchFilters as Filters, SearchInput as Input, SearchRoot as Root, SearchActionsProps, SearchActiveFiltersProps, SearchContainerProps, SearchFilterActionsProps, SearchFiltersProps, SearchInputProps, SearchProvider, SearchProviderProps, SearchRootProps, SearchTypeInputProps, SearchTypeOption, SearchTypeInput as TypeInput, useSearch };
252
+ }
253
+ //#endregion
254
+ export { index_d_exports as Search, type SearchActionsProps, type SearchActiveFiltersProps, type SearchContainerProps, type SearchFilterActionsProps, type SearchFiltersProps, type SearchInputProps, SearchProvider, type SearchProviderProps, type SearchRootProps, type SearchTypeInputProps, type SearchTypeOption, useSearch };