@foundrykit/components 2.1.4 → 2.2.1

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 (107) hide show
  1. package/dist/chunk-4WYKNDYY.js +91 -0
  2. package/dist/chunk-4WYKNDYY.js.map +1 -0
  3. package/dist/chunk-5CXNMTIN.js +84 -0
  4. package/dist/chunk-5CXNMTIN.js.map +1 -0
  5. package/dist/chunk-B5ZTF5MZ.js +203 -0
  6. package/dist/chunk-B5ZTF5MZ.js.map +1 -0
  7. package/dist/chunk-EDNWBEKV.js +51 -0
  8. package/dist/chunk-EDNWBEKV.js.map +1 -0
  9. package/dist/chunk-ID7BFTID.js +248 -0
  10. package/dist/chunk-ID7BFTID.js.map +1 -0
  11. package/dist/chunk-IYBHXVCH.js +181 -0
  12. package/dist/chunk-IYBHXVCH.js.map +1 -0
  13. package/dist/chunk-KQZEF7PS.js +71 -0
  14. package/dist/chunk-KQZEF7PS.js.map +1 -0
  15. package/dist/chunk-P3GSYR7O.js +889 -0
  16. package/dist/chunk-P3GSYR7O.js.map +1 -0
  17. package/dist/chunk-PKSRYDN4.js +168 -0
  18. package/dist/chunk-PKSRYDN4.js.map +1 -0
  19. package/dist/chunk-SFM7ZMG2.js +104 -0
  20. package/dist/chunk-SFM7ZMG2.js.map +1 -0
  21. package/dist/chunk-TLQQZJUR.js +126 -0
  22. package/dist/chunk-TLQQZJUR.js.map +1 -0
  23. package/dist/chunk-UE7CDYEN.js +59 -0
  24. package/dist/chunk-UE7CDYEN.js.map +1 -0
  25. package/dist/chunk-UG7YS3D5.js +198 -0
  26. package/dist/chunk-UG7YS3D5.js.map +1 -0
  27. package/dist/components/advanced-search-bar/index.d.ts +308 -0
  28. package/dist/components/advanced-search-bar/index.js +34 -0
  29. package/dist/components/advanced-search-bar/index.js.map +1 -0
  30. package/dist/components/calendar/index.d.ts +20 -0
  31. package/dist/components/calendar/index.js +11 -0
  32. package/dist/components/calendar/index.js.map +1 -0
  33. package/dist/components/carousel/index.d.ts +40 -0
  34. package/dist/components/carousel/index.js +17 -0
  35. package/dist/components/carousel/index.js.map +1 -0
  36. package/dist/components/chart/index.d.ts +59 -0
  37. package/dist/components/chart/index.js +21 -0
  38. package/dist/components/chart/index.js.map +1 -0
  39. package/dist/components/combobox/index.d.ts +33 -0
  40. package/dist/components/combobox/index.js +10 -0
  41. package/dist/components/combobox/index.js.map +1 -0
  42. package/dist/components/command/index.d.ts +33 -0
  43. package/dist/components/command/index.js +25 -0
  44. package/dist/components/command/index.js.map +1 -0
  45. package/dist/components/data-table/index.d.ts +17 -0
  46. package/dist/components/data-table/index.js +9 -0
  47. package/dist/components/data-table/index.js.map +1 -0
  48. package/dist/components/date-picker/index.d.ts +17 -0
  49. package/dist/components/date-picker/index.js +9 -0
  50. package/dist/components/date-picker/index.js.map +1 -0
  51. package/dist/components/form/index.d.ts +37 -0
  52. package/dist/components/form/index.js +23 -0
  53. package/dist/components/form/index.js.map +1 -0
  54. package/dist/components/input-otp/index.d.ts +30 -0
  55. package/dist/components/input-otp/index.js +15 -0
  56. package/dist/components/input-otp/index.js.map +1 -0
  57. package/dist/components/pagination/index.d.ts +26 -0
  58. package/dist/components/pagination/index.js +20 -0
  59. package/dist/components/pagination/index.js.map +1 -0
  60. package/dist/components/search-bar/index.d.ts +17 -0
  61. package/dist/components/search-bar/index.js +9 -0
  62. package/dist/components/search-bar/index.js.map +1 -0
  63. package/dist/components/sidebar/index.d.ts +70 -0
  64. package/dist/components/sidebar/index.js +652 -0
  65. package/dist/components/sidebar/index.js.map +1 -0
  66. package/dist/components/theme-toggle/index.d.ts +20 -0
  67. package/dist/components/theme-toggle/index.js +9 -0
  68. package/dist/components/theme-toggle/index.js.map +1 -0
  69. package/dist/index.d.ts +27 -582
  70. package/dist/index.js +74 -2280
  71. package/dist/index.js.map +1 -1
  72. package/package.json +15 -8
  73. package/.turbo/turbo-build.log +0 -17
  74. package/.turbo/turbo-type-check.log +0 -4
  75. package/CHANGELOG.md +0 -351
  76. package/src/components/advanced-search-bar/config.ts +0 -223
  77. package/src/components/advanced-search-bar/index.tsx +0 -1415
  78. package/src/components/calendar/config.ts +0 -51
  79. package/src/components/calendar/index.tsx +0 -225
  80. package/src/components/carousel/config.ts +0 -28
  81. package/src/components/carousel/index.tsx +0 -258
  82. package/src/components/chart/config.ts +0 -28
  83. package/src/components/chart/index.tsx +0 -365
  84. package/src/components/combobox/config.ts +0 -28
  85. package/src/components/combobox/index.tsx +0 -101
  86. package/src/components/command/config.ts +0 -804
  87. package/src/components/command/index.tsx +0 -195
  88. package/src/components/data-table/config.ts +0 -28
  89. package/src/components/data-table/index.tsx +0 -124
  90. package/src/components/date-picker/config.ts +0 -55
  91. package/src/components/date-picker/index.tsx +0 -207
  92. package/src/components/form/config.ts +0 -21
  93. package/src/components/form/index.tsx +0 -150
  94. package/src/components/input-otp/config.ts +0 -28
  95. package/src/components/input-otp/index.tsx +0 -92
  96. package/src/components/pagination/config.ts +0 -367
  97. package/src/components/pagination/index.tsx +0 -135
  98. package/src/components/search-bar/config.ts +0 -58
  99. package/src/components/search-bar/index.tsx +0 -70
  100. package/src/components/sidebar/config.ts +0 -29
  101. package/src/components/sidebar/index.tsx +0 -723
  102. package/src/components/theme-toggle/config.ts +0 -58
  103. package/src/components/theme-toggle/index.tsx +0 -35
  104. package/src/index.ts +0 -82
  105. package/tsconfig.json +0 -12
  106. package/tsconfig.lint.json +0 -8
  107. package/tsup.config.ts +0 -11
package/dist/index.d.ts CHANGED
@@ -1,585 +1,30 @@
1
- import { SearchResult, SearchSection as SearchSection$1 } from '@foundrykit/types';
2
1
  export { SearchResult, SearchSection as SearchSectionType } from '@foundrykit/types';
3
2
  export { cn } from '@foundrykit/utils';
4
- import * as class_variance_authority_types from 'class-variance-authority/types';
5
- import * as react_jsx_runtime from 'react/jsx-runtime';
6
- import { EmptyStateBehavior } from '@foundrykit/hooks';
3
+ export { Root as AdvancedSearchBar, AdvancedSearchBarWrapper, Provider as AdvancedSearchProvider, Input as SearchInput, Item as SearchItem, Results as SearchResults, Section as SearchSection, Trigger as SearchTrigger } from './components/advanced-search-bar/index.js';
4
+ export { Calendar } from './components/calendar/index.js';
5
+ export { Carousel, CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from './components/carousel/index.js';
6
+ export { ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, useChart } from './components/chart/index.js';
7
+ export { Combobox } from './components/combobox/index.js';
8
+ export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from './components/command/index.js';
9
+ export { DataTable } from './components/data-table/index.js';
10
+ export { DatePicker } from './components/date-picker/index.js';
11
+ export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from './components/form/index.js';
12
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from './components/input-otp/index.js';
13
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from './components/pagination/index.js';
14
+ export { SearchBar } from './components/search-bar/index.js';
15
+ export { ThemeToggle } from './components/theme-toggle/index.js';
7
16
  export { useFormField } from '@foundrykit/hooks';
8
- import { VariantProps } from 'class-variance-authority';
9
- import * as React from 'react';
10
- import { Button, Dialog } from '@foundrykit/primitives';
11
- import { DayPicker } from 'react-day-picker';
12
- import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
13
- import * as RechartsPrimitive from 'recharts';
14
- import { Command as Command$1 } from 'cmdk';
15
- import { ColumnDef } from '@tanstack/react-table';
16
- import * as react_hook_form from 'react-hook-form';
17
- import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
18
- import * as LabelPrimitive from '@radix-ui/react-label';
19
- import { Slot } from '@radix-ui/react-slot';
20
- import { OTPInput } from 'input-otp';
21
-
22
- /**
23
- * Props for the AdvancedSearchProvider component.
24
- * This provider manages the search state and behaviour for all child components.
25
- */
26
- interface AdvancedSearchProviderProps {
27
- /** Child components that will have access to the search context */
28
- children: React.ReactNode;
29
- /**
30
- * Function called when user types in the search input.
31
- * Should return a Promise or array of SearchResult objects.
32
- * @param query - The search query string
33
- * @returns Promise<SearchResult[]> | SearchResult[] - Array of search results
34
- */
35
- onSearch?: (query: string) => Promise<SearchResult[]> | SearchResult[];
36
- /**
37
- * Function called when user selects a result from the dropdown.
38
- * @param result - The selected SearchResult object
39
- */
40
- onResultSelect?: (result: SearchResult) => void;
41
- /**
42
- * Debounce delay in milliseconds for search requests.
43
- * @default 300
44
- */
45
- debounceMs?: number;
46
- /**
47
- * Minimum number of characters required before triggering search.
48
- * @default 1
49
- */
50
- minQueryLength?: number;
51
- /**
52
- * Behavior when search results are empty or query is too short.
53
- * - 'show-empty-message': Show "No results found" message
54
- * - 'hide-until-min-chars': Hide results until minimum characters typed
55
- * - 'show-all-results': Show initial results when empty
56
- * @default 'show-empty-message'
57
- */
58
- emptyStateBehaviour?: EmptyStateBehavior;
59
- /**
60
- * Initial results to show when component first loads.
61
- * Useful for showing popular/recent searches.
62
- */
63
- initialResults?: SearchResult[];
64
- /**
65
- * Custom styles for different parts of the search component.
66
- */
67
- styles?: {
68
- /** CSS properties for the results dropdown */
69
- results?: React.CSSProperties;
70
- width?: string | number;
71
- };
72
- }
73
- /**
74
- * AdvancedSearchProvider component that manages search state and provides context to child components.
75
- *
76
- * @example
77
- * ```tsx
78
- * <AdvancedSearchProvider
79
- * onSearch={async (query) => {
80
- * const results = await searchAPI(query);
81
- * return results;
82
- * }}
83
- * onResultSelect={(result) => {
84
- * console.log('Selected:', result);
85
- * }}
86
- * emptyStateBehaviour="show-all-results"
87
- * initialResults={popularDestinations}
88
- * >
89
- * <AdvancedSearchBar>
90
- * <SearchInput placeholder="Search destinations..." />
91
- * <SearchResults />
92
- * </AdvancedSearchBar>
93
- * </AdvancedSearchProvider>
94
- * ```
95
- */
96
- declare function AdvancedSearchProvider({ children, onSearch, onResultSelect, debounceMs, minQueryLength, emptyStateBehaviour, initialResults, styles, }: AdvancedSearchProviderProps): react_jsx_runtime.JSX.Element;
97
- /**
98
- * Variant styles for the search input wrapper.
99
- * Controls the size and visual appearance of the search input container.
100
- */
101
- declare const searchInputWrapperVariants: (props?: ({
102
- size?: "sm" | "md" | "lg" | "xl" | null | undefined;
103
- variant?: "default" | "ghost" | "filled" | null | undefined;
104
- } & class_variance_authority_types.ClassProp) | undefined) => string;
105
- /**
106
- * Variant styles for the search results container.
107
- * Controls the maximum width of the search results dropdown.
108
- */
109
- declare const searchResultsVariants: (props?: ({
110
- size?: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | null | undefined;
111
- } & class_variance_authority_types.ClassProp) | undefined) => string;
112
- /**
113
- * Props for the SearchInput component.
114
- * Extends standard input props with search-specific functionality.
115
- */
116
- interface SearchInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof searchInputWrapperVariants> {
117
- /** Placeholder text shown when input is empty */
118
- placeholder?: string;
119
- /** Whether to show the search icon on the left side */
120
- showSearchIcon?: boolean;
121
- /** Whether to show the clear button when there's text */
122
- showClearButton?: boolean;
123
- /** Callback function called when clear button is clicked */
124
- onClear?: () => void;
125
- /** Whether to render as a child component using Slot */
126
- asChild?: boolean;
127
- }
128
- /**
129
- * SearchInput component that provides a search input field with optional search icon and clear button.
130
- * Automatically integrates with the search context to handle query state and search triggering.
131
- *
132
- * @example
133
- * ```tsx
134
- * <SearchInput
135
- * placeholder="Search destinations..."
136
- * size="lg"
137
- * variant="default"
138
- * showSearchIcon={true}
139
- * showClearButton={true}
140
- * />
141
- * ```
142
- */
143
- declare const SearchInput: React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLInputElement>>;
144
- /**
145
- * Props for the SearchTrigger component.
146
- * Used to create custom trigger buttons that open the search dropdown.
147
- */
148
- interface SearchTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
149
- /** Whether to render as a child component using Slot */
150
- asChild?: boolean;
151
- }
152
- /**
153
- * SearchTrigger component that creates a button to open/close the search dropdown.
154
- * Can be used with asChild to wrap custom button components.
155
- *
156
- * @example
157
- * ```tsx
158
- * <SearchTrigger asChild>
159
- * <Button variant="outline" className="w-full justify-start">
160
- * <Search className="mr-2 h-4 w-4" />
161
- * Click to search...
162
- * </Button>
163
- * </SearchTrigger>
164
- * ```
165
- */
166
- declare const SearchTrigger: React.ForwardRefExoticComponent<SearchTriggerProps & React.RefAttributes<HTMLButtonElement>>;
167
- /**
168
- * Props for the SearchResults component.
169
- * Displays the search results in a scrollable dropdown with customizable sections.
170
- */
171
- interface SearchResultsProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof searchResultsVariants> {
172
- /** Custom sections to display instead of default results */
173
- sections?: SearchSection$1[];
174
- /** Whether to show empty state message when no results */
175
- showEmptyState?: boolean;
176
- /** Custom message to show when no results are found */
177
- emptyStateMessage?: string;
178
- /** Whether to show loading state while searching */
179
- showLoadingState?: boolean;
180
- /** Whether loading replaces results or keeps previous results visible */
181
- loadingBehaviour?: 'replace-results' | 'preserve-results';
182
- /** Custom loading state rendered instead of loadingMessage */
183
- loadingState?: React.ReactNode;
184
- /** Custom message to show while loading */
185
- loadingMessage?: string;
186
- }
187
- /**
188
- * SearchResults component that displays search results in a scrollable dropdown.
189
- * Automatically handles loading states, empty states, and result selection.
190
- *
191
- * @example
192
- * ```tsx
193
- * <SearchResults
194
- * size="lg"
195
- * showEmptyState={true}
196
- * emptyStateMessage="No destinations found."
197
- * showLoadingState={true}
198
- * loadingMessage="Searching destinations..."
199
- * />
200
- * ```
201
- */
202
- declare const SearchResults: React.ForwardRefExoticComponent<SearchResultsProps & React.RefAttributes<HTMLDivElement>>;
203
- /**
204
- * Props for the AdvancedSearchBar component.
205
- * Main container component that orchestrates the search input and results dropdown.
206
- */
207
- interface AdvancedSearchBarProps extends React.HTMLAttributes<HTMLDivElement> {
208
- /** Controlled open state of the results dropdown */
209
- open?: boolean;
210
- /** Callback function called when open state changes */
211
- onOpenChange?: (open: boolean) => void;
212
- /**
213
- * Layout mode for the results panel.
214
- * - `"popover"` (default): absolutely positioned dropdown below the input.
215
- * - `"inline"`: normal document flow, rendered inside the same root element.
216
- */
217
- resultsMode?: 'popover' | 'inline';
218
- /** Extra classes applied to the trigger/input wrapper div. */
219
- triggerClassName?: string;
220
- /** Extra classes applied to the results panel wrapper div. */
221
- resultsClassName?: string;
222
- }
223
- /**
224
- * AdvancedSearchBar component that provides the main search interface.
225
- * Combines search input with results dropdown in a compound pattern.
226
- *
227
- * @example
228
- * ```tsx
229
- * <AdvancedSearchBar>
230
- * <SearchInput placeholder="Search destinations..." />
231
- * <SearchResults />
232
- * </AdvancedSearchBar>
233
- * ```
234
- */
235
- declare const AdvancedSearchBar: React.ForwardRefExoticComponent<AdvancedSearchBarProps & React.RefAttributes<HTMLDivElement>>;
236
- /**
237
- * Props for the SearchSection component.
238
- * Used in compound pattern to create organized sections of search results.
239
- */
240
- interface SearchSectionProps extends React.HTMLAttributes<HTMLDivElement> {
241
- /** Title displayed above the section results */
242
- title?: string;
243
- /** Maximum number of results to show in this section */
244
- maxResults?: number;
245
- /** Whether to show a "Show more" button */
246
- showMore?: boolean;
247
- /** Callback function called when "Show more" is clicked */
248
- onShowMore?: () => void;
249
- }
250
- /**
251
- * SearchSection component for organizing search results into sections.
252
- * Used in compound pattern to create structured result displays.
253
- *
254
- * @example
255
- * ```tsx
256
- * <SearchSection title="Popular Searches" showMore={true} onShowMore={handleShowMore}>
257
- * <SearchItem result={popularResult1} />
258
- * <SearchItem result={popularResult2} />
259
- * </SearchSection>
260
- * ```
261
- */
262
- declare const SearchSection: React.ForwardRefExoticComponent<SearchSectionProps & React.RefAttributes<HTMLDivElement>>;
263
- /**
264
- * Props for the SearchItem component.
265
- * Used in compound pattern to render individual search result items.
266
- */
267
- interface SearchItemProps extends React.HTMLAttributes<HTMLDivElement> {
268
- /** The search result data to display */
269
- result?: SearchResult;
270
- /** Callback function called when the item is clicked */
271
- onClick?: () => void;
272
- }
273
- /**
274
- * SearchItem component for rendering individual search result items.
275
- * Can be used with result data or custom children in compound pattern.
276
- *
277
- * @example
278
- * ```tsx
279
- * <SearchItem result={searchResult} />
280
- *
281
- * // Or with custom children
282
- * <SearchItem onClick={handleClick}>
283
- * <div>Custom result display</div>
284
- * </SearchItem>
285
- * ```
286
- */
287
- declare const SearchItem: React.ForwardRefExoticComponent<SearchItemProps & React.RefAttributes<HTMLDivElement>>;
288
-
289
- /**
290
- * Wrapper component for documentation and preview purposes.
291
- * Provides a complete search implementation with mock data for testing and demos.
292
- *
293
- * @deprecated Demo-only helper. Prefer composing AdvancedSearchProvider,
294
- * AdvancedSearchBar, SearchInput, and SearchResults in application code.
295
- *
296
- * @param props - Configuration props for the search wrapper
297
- * @returns Complete search component with mock functionality
298
- *
299
- * @example
300
- * ```tsx
301
- * <AdvancedSearchBarWrapper
302
- * emptyStateBehaviour="show-all-results"
303
- * size="lg"
304
- * variant="default"
305
- * useCustomTrigger={false}
306
- * />
307
- * ```
308
- */
309
- declare function AdvancedSearchBarWrapper(props?: {
310
- /** Minimum number of characters required before triggering search */
311
- minQueryLength?: number;
312
- /** Behaviour when search results are empty or query is too short */
313
- emptyStateBehaviour?: 'show-empty-message' | 'hide-until-min-chars' | 'show-all-results';
314
- /** Size variant for the search input */
315
- size?: 'sm' | 'md' | 'lg' | 'xl';
316
- /** Visual variant for the search input */
317
- variant?: 'default' | 'ghost' | 'filled';
318
- /** Whether to use a custom trigger button instead of input */
319
- useCustomTrigger?: boolean;
320
- }): react_jsx_runtime.JSX.Element;
321
-
322
- /**
323
- * Themed wrapper around `react-day-picker`'s `DayPicker`, styled with FoundryKit
324
- * design tokens. Accepts all `DayPicker` props (`mode`, `selected`, `onSelect`,
325
- * etc.) plus `buttonVariant` to control the nav button style.
326
- */
327
- declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
328
- buttonVariant?: React.ComponentProps<typeof Button>['variant'];
329
- }): react_jsx_runtime.JSX.Element;
330
-
331
- type CarouselApi = UseEmblaCarouselType[1];
332
- type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
333
- type CarouselOptions = UseCarouselParameters[0];
334
- type CarouselPlugin = UseCarouselParameters[1];
335
- type CarouselProps = {
336
- opts?: CarouselOptions;
337
- plugins?: CarouselPlugin;
338
- orientation?: 'horizontal' | 'vertical';
339
- setApi?: (api: CarouselApi) => void;
340
- };
341
- /**
342
- * Carousel root that provides Embla state to its parts.
343
- *
344
- * @example
345
- * ```tsx
346
- * <Carousel>
347
- * <CarouselContent>
348
- * <CarouselItem>Slide 1</CarouselItem>
349
- * </CarouselContent>
350
- * <CarouselPrevious />
351
- * <CarouselNext />
352
- * </Carousel>
353
- * ```
354
- */
355
- declare function Carousel({ orientation, opts, setApi, plugins, className, children, ...props }: React.ComponentProps<'div'> & CarouselProps): react_jsx_runtime.JSX.Element;
356
- /** Scrollable track that holds the carousel items. */
357
- declare function CarouselContent({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
358
- /** A single slide within a {@link CarouselContent}. */
359
- declare function CarouselItem({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
360
- /** Button that scrolls the carousel to the previous slide. */
361
- declare function CarouselPrevious({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
362
- /** Button that scrolls the carousel to the next slide. */
363
- declare function CarouselNext({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
364
-
365
- declare const THEMES: {
366
- readonly light: "";
367
- readonly dark: ".dark";
368
- };
369
- type ChartConfig = {
370
- [k in string]: {
371
- label?: React.ReactNode;
372
- icon?: React.ComponentType;
373
- } & ({
374
- color?: string;
375
- theme?: never;
376
- } | {
377
- color?: never;
378
- theme: Record<keyof typeof THEMES, string>;
379
- });
380
- };
381
- type ChartContextProps = {
382
- config: ChartConfig;
383
- };
384
- declare function useChart(): ChartContextProps;
385
- /**
386
- * Responsive chart wrapper that shares config (labels, colors) with its parts.
387
- *
388
- * @example
389
- * ```tsx
390
- * <ChartContainer config={config}>
391
- * <BarChart data={data}>
392
- * <Bar dataKey='total' fill='var(--color-total)' />
393
- * </BarChart>
394
- * </ChartContainer>
395
- * ```
396
- */
397
- declare function ChartContainer({ id, className, children, config, ...props }: React.ComponentProps<'div'> & {
398
- config: ChartConfig;
399
- children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];
400
- }): react_jsx_runtime.JSX.Element;
401
- declare function ChartStyle({ id, config }: {
402
- id: string;
403
- config: ChartConfig;
404
- }): react_jsx_runtime.JSX.Element | null;
405
- declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
406
- declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: React.ComponentProps<typeof RechartsPrimitive.Tooltip> & React.ComponentProps<'div'> & {
407
- hideLabel?: boolean;
408
- hideIndicator?: boolean;
409
- indicator?: 'line' | 'dot' | 'dashed';
410
- nameKey?: string;
411
- labelKey?: string;
412
- }): react_jsx_runtime.JSX.Element | null;
413
- declare const ChartLegend: typeof RechartsPrimitive.Legend;
414
- declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: React.ComponentProps<'div'> & Pick<RechartsPrimitive.LegendProps, 'payload' | 'verticalAlign'> & {
415
- hideIcon?: boolean;
416
- nameKey?: string;
417
- }): react_jsx_runtime.JSX.Element | null;
418
-
419
- type ComboboxOption = {
420
- value: string;
421
- label: string;
422
- };
423
- /**
424
- * Searchable single-select combobox composed from `Popover` and `Command`.
425
- *
426
- * @example
427
- * ```tsx
428
- * <Combobox
429
- * options={[{ value: 'next', label: 'Next.js' }]}
430
- * value={value}
431
- * onValueChange={setValue}
432
- * placeholder='Select framework...'
433
- * />
434
- * ```
435
- */
436
- declare function Combobox({ options, value, onValueChange, placeholder, }: {
437
- options: ComboboxOption[];
438
- value?: string;
439
- onValueChange?: (value: string) => void;
440
- placeholder?: string;
441
- }): react_jsx_runtime.JSX.Element;
442
-
443
- /** Styled `cmdk` command menu — the root container for a command palette. */
444
- declare function Command({ className, ...props }: React.ComponentProps<typeof Command$1>): react_jsx_runtime.JSX.Element;
445
- /**
446
- * Command menu rendered inside a modal dialog. `title` and `description` are
447
- * visually hidden but read by assistive technology.
448
- */
449
- declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React.ComponentProps<typeof Dialog> & {
450
- title?: string;
451
- description?: string;
452
- className?: string;
453
- showCloseButton?: boolean;
454
- }): react_jsx_runtime.JSX.Element;
455
- /** Search input for a command menu, with a leading search icon. */
456
- declare function CommandInput({ className, ...props }: React.ComponentProps<typeof Command$1.Input>): react_jsx_runtime.JSX.Element;
457
- /** Scrollable list containing command groups and items. */
458
- declare function CommandList({ className, ...props }: React.ComponentProps<typeof Command$1.List>): react_jsx_runtime.JSX.Element;
459
- /** Message shown when no command items match the current query. */
460
- declare function CommandEmpty({ ...props }: React.ComponentProps<typeof Command$1.Empty>): react_jsx_runtime.JSX.Element;
461
- /** Labelled group of related command items. */
462
- declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof Command$1.Group>): react_jsx_runtime.JSX.Element;
463
- /** Horizontal divider between command groups or items. */
464
- declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof Command$1.Separator>): react_jsx_runtime.JSX.Element;
465
- /** Selectable command item within a {@link CommandList} or {@link CommandGroup}. */
466
- declare function CommandItem({ className, ...props }: React.ComponentProps<typeof Command$1.Item>): react_jsx_runtime.JSX.Element;
467
- /** Right-aligned keyboard-shortcut hint shown inside a command item. */
468
- declare function CommandShortcut({ className, ...props }: React.ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
469
-
470
- /**
471
- * Generic, paginated, sortable data table driven by TanStack Table column defs.
472
- *
473
- * @example
474
- * ```tsx
475
- * <DataTable columns={columns} data={data} />
476
- * ```
477
- */
478
- declare function DataTable<TData, TValue>({ columns, data, }: {
479
- columns: ColumnDef<TData, TValue>[];
480
- data: TData[];
481
- }): react_jsx_runtime.JSX.Element;
482
-
483
- interface DatePickerProps {
484
- value?: Date;
485
- onValueChange?: (date: Date | undefined) => void;
486
- placeholder?: string;
487
- className?: string;
488
- disabled?: boolean;
489
- }
490
- /**
491
- * Date picker pairing a native date input with a pop-up month grid. Controlled
492
- * via `value`/`onValueChange`; the calendar closes on selection, outside click,
493
- * or Escape and returns focus to the toggle button.
494
- */
495
- declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLDivElement>>;
496
-
497
- /** Form context provider — re-export of react-hook-form's `FormProvider`. */
498
- declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
499
- /**
500
- * Connects a single field to react-hook-form via a `Controller` and exposes the
501
- * field name to the surrounding form components through context.
502
- */
503
- declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
504
-
505
- /**
506
- * Wrapper for a single form field that generates a unique id shared by its
507
- * label, control, description, and message for accessible associations.
508
- */
509
- declare function FormItem({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
510
- /** Label bound to the field's control; styled as an error when the field is invalid. */
511
- declare function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): react_jsx_runtime.JSX.Element;
512
- /**
513
- * Wires the field's control element with the correct `id`, `aria-describedby`,
514
- * and `aria-invalid` attributes. Render the input as its single child.
515
- */
516
- declare function FormControl({ ...props }: React.ComponentProps<typeof Slot>): react_jsx_runtime.JSX.Element;
517
- /** Helper text describing the field, linked to the control via `aria-describedby`. */
518
- declare function FormDescription({ className, ...props }: React.ComponentProps<'p'>): react_jsx_runtime.JSX.Element;
519
- /**
520
- * Displays the field's validation error message, or its children when there is
521
- * no error. Renders nothing when there is no content to show.
522
- */
523
- declare function FormMessage({ className, ...props }: React.ComponentProps<'p'>): react_jsx_runtime.JSX.Element | null;
524
-
525
- /**
526
- * Accessible one-time-password input with individually styled character slots.
527
- *
528
- * @example
529
- * ```tsx
530
- * <InputOTP maxLength={6}>
531
- * <InputOTPGroup>
532
- * <InputOTPSlot index={0} />
533
- * <InputOTPSlot index={1} />
534
- * </InputOTPGroup>
535
- * </InputOTP>
536
- * ```
537
- */
538
- declare function InputOTP({ className, containerClassName, ...props }: React.ComponentProps<typeof OTPInput> & {
539
- containerClassName?: string;
540
- }): react_jsx_runtime.JSX.Element;
541
- /** Groups related OTP slots together with a shared border. */
542
- declare function InputOTPGroup({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
543
- /** A single character slot, driven by the OTP input context. */
544
- declare function InputOTPSlot({ index, className, ...props }: React.ComponentProps<'div'> & {
545
- index: number;
546
- }): react_jsx_runtime.JSX.Element;
547
- /** Visual separator rendered between OTP groups. */
548
- declare function InputOTPSeparator({ ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
549
-
550
- /** Navigation landmark that wraps a set of pagination controls. */
551
- declare function Pagination({ className, ...props }: React.ComponentProps<'nav'>): react_jsx_runtime.JSX.Element;
552
- /** Horizontal list container for pagination items. */
553
- declare function PaginationContent({ className, ...props }: React.ComponentProps<'ul'>): react_jsx_runtime.JSX.Element;
554
- /** List item wrapping a single pagination control. */
555
- declare function PaginationItem({ ...props }: React.ComponentProps<'li'>): react_jsx_runtime.JSX.Element;
556
- type PaginationLinkProps = {
557
- isActive?: boolean;
558
- } & Pick<React.ComponentProps<typeof Button>, 'size'> & React.ComponentProps<'a'>;
559
- /**
560
- * Anchor styled as a page-number button. Set `isActive` to mark the current
561
- * page (applies `aria-current="page"` and an outlined style).
562
- */
563
- declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): react_jsx_runtime.JSX.Element;
564
- /** Pagination link for navigating to the previous page. */
565
- declare function PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>): react_jsx_runtime.JSX.Element;
566
- /** Pagination link for navigating to the next page. */
567
- declare function PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>): react_jsx_runtime.JSX.Element;
568
- /** Non-interactive ellipsis indicating skipped page numbers. */
569
- declare function PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
570
-
571
- interface SearchBarProps extends React.InputHTMLAttributes<HTMLInputElement> {
572
- onSearch?: (query: string) => void;
573
- placeholder?: string;
574
- className?: string;
575
- value?: string;
576
- onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
577
- }
578
- /**
579
- * Search input with a leading search icon. Works uncontrolled or controlled
580
- * (pass `value`/`onChange`); `onSearch` is called with the current query text on
581
- * every change.
582
- */
583
- declare const SearchBar: React.ForwardRefExoticComponent<SearchBarProps & React.RefAttributes<HTMLInputElement>>;
584
-
585
- export { AdvancedSearchBar, AdvancedSearchBarWrapper, AdvancedSearchProvider, Calendar, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DataTable, DatePicker, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, SearchBar, SearchInput, SearchItem, SearchResults, SearchSection, SearchTrigger, useChart };
17
+ import 'class-variance-authority/types';
18
+ import 'react/jsx-runtime';
19
+ import 'class-variance-authority';
20
+ import 'react';
21
+ import '@foundrykit/primitives';
22
+ import 'react-day-picker';
23
+ import 'embla-carousel-react';
24
+ import 'recharts';
25
+ import 'cmdk';
26
+ import '@tanstack/react-table';
27
+ import 'react-hook-form';
28
+ import '@radix-ui/react-label';
29
+ import '@radix-ui/react-slot';
30
+ import 'input-otp';