@classytic/fluid 0.1.1 → 0.2.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.
- package/README.md +63 -18
- package/animations.css +74 -0
- package/dist/chunk-GUHK2DTW.js +15 -0
- package/dist/chunk-GUHK2DTW.js.map +1 -0
- package/dist/chunk-H3NFL3GJ.js +57 -0
- package/dist/chunk-H3NFL3GJ.js.map +1 -0
- package/dist/chunk-J2YRTQE4.js +293 -0
- package/dist/chunk-J2YRTQE4.js.map +1 -0
- package/dist/compact.d.ts +217 -0
- package/dist/compact.js +986 -0
- package/dist/compact.js.map +1 -0
- package/dist/dashboard.d.ts +38 -1
- package/dist/dashboard.js +65 -25
- package/dist/dashboard.js.map +1 -1
- package/dist/index.d.ts +622 -527
- package/dist/index.js +1840 -2348
- package/dist/index.js.map +1 -1
- package/dist/layout.js +2 -60
- package/dist/layout.js.map +1 -1
- package/dist/search.d.ts +172 -0
- package/dist/search.js +341 -0
- package/dist/search.js.map +1 -0
- package/dist/use-base-search-AS5Z3SAy.d.ts +64 -0
- package/package.json +32 -19
- package/styles.css +3 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,88 +1,166 @@
|
|
|
1
1
|
export { c as cn } from './utils-Cbsgs0XP.js';
|
|
2
|
-
|
|
3
|
-
import
|
|
2
|
+
export { F as FilterConfig, S as SearchConfig, e as UseBaseSearchConfig, U as UseBaseSearchReturn, b as buildFilterParams, c as buildListingStatusParams, a as buildSearchParams, d as clearSearchAndFilterParams, g as getApiParams, u as useBaseSearch } from './use-base-search-AS5Z3SAy.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import React__default, { RefObject, ReactNode, ElementType, ComponentType, InputHTMLAttributes, Ref } from 'react';
|
|
4
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
-
import { ColumnDef } from '@tanstack/react-table';
|
|
6
6
|
import { LucideIcon, LucideProps } from 'lucide-react';
|
|
7
|
+
import { ColumnDef } from '@tanstack/react-table';
|
|
7
8
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
8
9
|
import { VariantProps } from 'class-variance-authority';
|
|
9
|
-
import { FieldValues, Control, FieldPath, FieldError
|
|
10
|
+
import { FieldValues, Control, FieldPath, FieldError } from 'react-hook-form';
|
|
11
|
+
export { Container, ContainerProps, Section, SectionProps } from './layout.js';
|
|
10
12
|
import 'clsx';
|
|
11
13
|
|
|
12
14
|
/**
|
|
13
|
-
*
|
|
14
|
-
* Simplified approach since backend handles all operator parsing
|
|
15
|
+
* A utility module for handling localStorage operations with error handling and SSR safety
|
|
15
16
|
*/
|
|
16
|
-
interface FilterConfig {
|
|
17
|
-
paramName: string;
|
|
18
|
-
type?: "array" | "string" | "number" | "boolean";
|
|
19
|
-
defaultValue?: unknown;
|
|
20
|
-
}
|
|
21
|
-
interface SearchConfig {
|
|
22
|
-
basePath: string;
|
|
23
|
-
searchFields?: Record<string, string>;
|
|
24
|
-
filterFields?: Record<string, FilterConfig>;
|
|
25
|
-
defaultSearchType?: string;
|
|
26
|
-
}
|
|
27
17
|
/**
|
|
28
|
-
*
|
|
18
|
+
* Gets an item from localStorage with parsing and expiry check
|
|
19
|
+
* @param {string} key - The key to retrieve from localStorage
|
|
20
|
+
* @param {any} defaultValue - Default value to return if key doesn't exist or on error
|
|
21
|
+
* @returns {any} The parsed value or defaultValue
|
|
29
22
|
*/
|
|
30
|
-
declare
|
|
23
|
+
declare const getStorageItem: <T>(key: string, defaultValue?: T | null) => T | null;
|
|
31
24
|
/**
|
|
32
|
-
*
|
|
25
|
+
* Sets an item in localStorage with serialization and optional expiry
|
|
26
|
+
* @param {string} key - The key to set in localStorage
|
|
27
|
+
* @param {any} value - The value to serialize and store
|
|
28
|
+
* @param {number} [ttl] - Time to live in milliseconds (optional)
|
|
29
|
+
* @returns {boolean} Success status
|
|
33
30
|
*/
|
|
34
|
-
declare
|
|
31
|
+
declare const setStorageItem: <T>(key: string, value: T, ttl?: number | null) => boolean;
|
|
35
32
|
/**
|
|
36
|
-
*
|
|
33
|
+
* Removes an item from localStorage
|
|
34
|
+
* @param {string} key - The key to remove from localStorage
|
|
35
|
+
* @returns {boolean} Success status
|
|
37
36
|
*/
|
|
38
|
-
declare
|
|
37
|
+
declare const removeStorageItem: (key: string) => boolean;
|
|
39
38
|
/**
|
|
40
|
-
*
|
|
39
|
+
* Clears all items from localStorage
|
|
40
|
+
* @returns {boolean} Success status
|
|
41
41
|
*/
|
|
42
|
-
declare
|
|
42
|
+
declare const clearStorage: () => boolean;
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Checks if localStorage is empty for a specific key
|
|
45
|
+
* @param {string} key - The key to check in localStorage
|
|
46
|
+
* @returns {boolean} True if empty or doesn't exist
|
|
45
47
|
*/
|
|
46
|
-
declare
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
updateFilter: (key: string, value: unknown) => void;
|
|
64
|
-
handleSearch: () => void;
|
|
65
|
-
clearSearch: () => void;
|
|
66
|
-
getSearchParams: () => Record<string, string>;
|
|
67
|
-
hasActiveSearch: boolean;
|
|
68
|
-
hasActiveFilters: boolean;
|
|
69
|
-
}
|
|
48
|
+
declare const isStorageEmpty: (key: string) => boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Generates a UUID (v4)
|
|
51
|
+
* Uses crypto.randomUUID() when available, with a fallback for older environments.
|
|
52
|
+
* @returns {string} A random UUID
|
|
53
|
+
*/
|
|
54
|
+
declare const generateUUID: () => string;
|
|
55
|
+
/**
|
|
56
|
+
* Common expiry durations in milliseconds
|
|
57
|
+
*/
|
|
58
|
+
declare const TTL: {
|
|
59
|
+
readonly MINUTE: number;
|
|
60
|
+
readonly HOUR: number;
|
|
61
|
+
readonly DAY: number;
|
|
62
|
+
readonly WEEK: number;
|
|
63
|
+
readonly MONTH: number;
|
|
64
|
+
};
|
|
70
65
|
/**
|
|
71
|
-
*
|
|
72
|
-
* Can be extended by specific search hooks for different entities
|
|
73
|
-
* Supports bracket syntax: field[operator]=value
|
|
66
|
+
* Shorthand object for all localStorage operations
|
|
74
67
|
*/
|
|
75
|
-
declare
|
|
68
|
+
declare const storage: {
|
|
69
|
+
get: <T>(key: string, defaultValue?: T | null) => T | null;
|
|
70
|
+
set: <T>(key: string, value: T, ttl?: number | null) => boolean;
|
|
71
|
+
remove: (key: string) => boolean;
|
|
72
|
+
clear: () => boolean;
|
|
73
|
+
isEmpty: (key: string) => boolean;
|
|
74
|
+
generateUUID: () => string;
|
|
75
|
+
TTL: {
|
|
76
|
+
readonly MINUTE: number;
|
|
77
|
+
readonly HOUR: number;
|
|
78
|
+
readonly DAY: number;
|
|
79
|
+
readonly WEEK: number;
|
|
80
|
+
readonly MONTH: number;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
declare function useIsMobile(): boolean;
|
|
76
85
|
|
|
77
86
|
declare function useMediaQuery(query: string, defaultValue?: boolean): boolean;
|
|
78
87
|
|
|
79
88
|
declare const useScrollDetection: (ref: RefObject<HTMLDivElement | null>, delay?: number) => {
|
|
80
|
-
checkScroll: () =>
|
|
89
|
+
checkScroll: () => void;
|
|
81
90
|
canScrollLeft: boolean;
|
|
82
91
|
canScrollRight: boolean;
|
|
83
92
|
isScrollable: boolean;
|
|
84
93
|
};
|
|
85
94
|
|
|
95
|
+
/**
|
|
96
|
+
* useDebounce — Returns a debounced version of the input value.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```tsx
|
|
100
|
+
* const [search, setSearch] = useState("");
|
|
101
|
+
* const debouncedSearch = useDebounce(search, 300);
|
|
102
|
+
*
|
|
103
|
+
* useEffect(() => {
|
|
104
|
+
* fetchResults(debouncedSearch);
|
|
105
|
+
* }, [debouncedSearch]);
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
declare function useDebounce<T>(value: T, delay?: number): T;
|
|
109
|
+
/**
|
|
110
|
+
* useDebouncedCallback — Returns a debounced version of a callback function.
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```tsx
|
|
114
|
+
* const debouncedSave = useDebouncedCallback((value: string) => {
|
|
115
|
+
* saveToApi(value);
|
|
116
|
+
* }, 500);
|
|
117
|
+
*
|
|
118
|
+
* <Input onChange={(e) => debouncedSave(e.target.value)} />
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
declare function useDebouncedCallback<T extends (...args: any[]) => any>(callback: T, delay?: number): (...args: Parameters<T>) => void;
|
|
122
|
+
|
|
123
|
+
interface UseCopyToClipboardReturn {
|
|
124
|
+
/** Copy text to clipboard */
|
|
125
|
+
copy: (text: string) => Promise<boolean>;
|
|
126
|
+
/** Whether text was recently copied (resets after timeout) */
|
|
127
|
+
copied: boolean;
|
|
128
|
+
/** Any error that occurred during copy */
|
|
129
|
+
error: Error | null;
|
|
130
|
+
/** Reset the copied state manually */
|
|
131
|
+
reset: () => void;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* useCopyToClipboard — Copy text to clipboard with status tracking.
|
|
135
|
+
*
|
|
136
|
+
* @param resetDelay - How long (ms) the `copied` state stays true. Default: 2000
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* ```tsx
|
|
140
|
+
* const { copy, copied } = useCopyToClipboard();
|
|
141
|
+
*
|
|
142
|
+
* <Button onClick={() => copy(apiKey)}>
|
|
143
|
+
* {copied ? "Copied!" : "Copy API Key"}
|
|
144
|
+
* </Button>
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
declare function useCopyToClipboard(resetDelay?: number): UseCopyToClipboardReturn;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* useLocalStorage — Persist state in localStorage with type safety and optional expiry.
|
|
151
|
+
*
|
|
152
|
+
* @param key - The localStorage key
|
|
153
|
+
* @param initialValue - Default value if no stored value exists
|
|
154
|
+
* @param ttl - Time to live in milliseconds (optional)
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* ```tsx
|
|
158
|
+
* const [theme, setTheme] = useLocalStorage("theme", "light");
|
|
159
|
+
* const [cache, setCache] = useLocalStorage("api-cache", {}, 60000); // 1 min TTL
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
162
|
+
declare function useLocalStorage<T>(key: string, initialValue: T, ttl?: number): [T, (value: T | ((prev: T) => T)) => void, () => void];
|
|
163
|
+
|
|
86
164
|
interface AccordionSectionProps {
|
|
87
165
|
title: string;
|
|
88
166
|
icon?: ReactNode;
|
|
@@ -101,7 +179,7 @@ interface AccordionSectionProps {
|
|
|
101
179
|
* </AccordionSection>
|
|
102
180
|
* ```
|
|
103
181
|
*/
|
|
104
|
-
declare const AccordionSection: React
|
|
182
|
+
declare const AccordionSection: React.NamedExoticComponent<AccordionSectionProps>;
|
|
105
183
|
interface FaqItem {
|
|
106
184
|
id: string;
|
|
107
185
|
question: string;
|
|
@@ -112,7 +190,7 @@ interface FaqAccordionProps {
|
|
|
112
190
|
defaultOpen?: string;
|
|
113
191
|
className?: string;
|
|
114
192
|
/** Allow multiple items to be open at once */
|
|
115
|
-
|
|
193
|
+
multiple?: boolean;
|
|
116
194
|
}
|
|
117
195
|
/**
|
|
118
196
|
* FaqAccordion - FAQ-style accordion where only one item can be open by default
|
|
@@ -127,7 +205,7 @@ interface FaqAccordionProps {
|
|
|
127
205
|
* />
|
|
128
206
|
* ```
|
|
129
207
|
*/
|
|
130
|
-
declare const FaqAccordion: React
|
|
208
|
+
declare const FaqAccordion: React.NamedExoticComponent<FaqAccordionProps>;
|
|
131
209
|
|
|
132
210
|
interface DisplayHeadingProps {
|
|
133
211
|
children: ReactNode;
|
|
@@ -180,6 +258,23 @@ interface ApiPaginationProps extends Partial<ApiPaginationData> {
|
|
|
180
258
|
*/
|
|
181
259
|
declare function ApiPagination({ total, limit, pages, page, hasNext, hasPrev, onPageChange, className, showInfo, infoPosition, }: ApiPaginationProps): react_jsx_runtime.JSX.Element;
|
|
182
260
|
|
|
261
|
+
declare const CARD_VARIANTS: {
|
|
262
|
+
readonly default: "";
|
|
263
|
+
readonly outline: "border-2";
|
|
264
|
+
readonly ghost: "border-0 shadow-none bg-transparent";
|
|
265
|
+
readonly elevated: "shadow-lg border-0";
|
|
266
|
+
readonly primary: "border-primary/20 bg-primary/5";
|
|
267
|
+
readonly secondary: "border-secondary/20 bg-secondary/5";
|
|
268
|
+
readonly destructive: "border-destructive/20 bg-destructive/5";
|
|
269
|
+
readonly success: "border-green-500/20 bg-green-500/5";
|
|
270
|
+
readonly warning: "border-yellow-500/20 bg-yellow-500/5";
|
|
271
|
+
};
|
|
272
|
+
declare const CARD_SIZES: {
|
|
273
|
+
readonly sm: "p-3";
|
|
274
|
+
readonly default: "p-6";
|
|
275
|
+
readonly lg: "p-8";
|
|
276
|
+
readonly xl: "p-10";
|
|
277
|
+
};
|
|
183
278
|
interface CardWrapperProps {
|
|
184
279
|
title?: ReactNode;
|
|
185
280
|
description?: ReactNode;
|
|
@@ -189,12 +284,13 @@ interface CardWrapperProps {
|
|
|
189
284
|
headerClassName?: string;
|
|
190
285
|
contentClassName?: string;
|
|
191
286
|
footerClassName?: string;
|
|
192
|
-
variant?:
|
|
193
|
-
size?:
|
|
287
|
+
variant?: keyof typeof CARD_VARIANTS;
|
|
288
|
+
size?: keyof typeof CARD_SIZES;
|
|
194
289
|
hideHeader?: boolean;
|
|
195
290
|
}
|
|
196
291
|
declare function CardWrapper({ title, description, children, footer, className, headerClassName, contentClassName, footerClassName, variant, size, hideHeader, ...props }: CardWrapperProps): react_jsx_runtime.JSX.Element;
|
|
197
292
|
interface DataCardProps extends Omit<CardWrapperProps, "children"> {
|
|
293
|
+
/** Each item's `color` should be a complete Tailwind class (e.g. "text-green-600") */
|
|
198
294
|
data: Array<{
|
|
199
295
|
label: string;
|
|
200
296
|
value: ReactNode;
|
|
@@ -362,7 +458,7 @@ interface ConfirmDialogProps {
|
|
|
362
458
|
open: boolean;
|
|
363
459
|
onOpenChange: (open: boolean) => void;
|
|
364
460
|
/** Trigger element that opens the dialog */
|
|
365
|
-
trigger?: React
|
|
461
|
+
trigger?: React.ReactElement;
|
|
366
462
|
title?: string;
|
|
367
463
|
description?: string;
|
|
368
464
|
confirmText?: string;
|
|
@@ -453,6 +549,230 @@ interface ErrorStateInlineProps {
|
|
|
453
549
|
*/
|
|
454
550
|
declare function ErrorStateInline({ error, onRetry, className, icon, }: ErrorStateInlineProps): react_jsx_runtime.JSX.Element;
|
|
455
551
|
|
|
552
|
+
interface EmptyStateProps {
|
|
553
|
+
/** Title text */
|
|
554
|
+
title?: string;
|
|
555
|
+
/** Description / subtitle */
|
|
556
|
+
description?: string;
|
|
557
|
+
/** Icon to display — pass a LucideIcon or ReactNode */
|
|
558
|
+
icon?: LucideIcon | React.ReactNode;
|
|
559
|
+
/** Primary action button */
|
|
560
|
+
action?: React.ReactNode;
|
|
561
|
+
/** Secondary action button */
|
|
562
|
+
secondaryAction?: React.ReactNode;
|
|
563
|
+
/** Visual variant */
|
|
564
|
+
variant?: "default" | "compact" | "card";
|
|
565
|
+
/** Additional className */
|
|
566
|
+
className?: string;
|
|
567
|
+
/** Children rendered below the description */
|
|
568
|
+
children?: React.ReactNode;
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* EmptyState — Shown when content is empty, search has no results, etc.
|
|
572
|
+
*
|
|
573
|
+
* @example Default
|
|
574
|
+
* ```tsx
|
|
575
|
+
* <EmptyState
|
|
576
|
+
* title="No projects yet"
|
|
577
|
+
* description="Create your first project to get started."
|
|
578
|
+
* icon={FolderPlus}
|
|
579
|
+
* action={<Button>Create Project</Button>}
|
|
580
|
+
* />
|
|
581
|
+
* ```
|
|
582
|
+
*
|
|
583
|
+
* @example Compact (inline)
|
|
584
|
+
* ```tsx
|
|
585
|
+
* <EmptyState variant="compact" title="No items" />
|
|
586
|
+
* ```
|
|
587
|
+
*
|
|
588
|
+
* @example With preset
|
|
589
|
+
* ```tsx
|
|
590
|
+
* <EmptyStateNoResults action={<Button onClick={clearFilters}>Clear filters</Button>} />
|
|
591
|
+
* ```
|
|
592
|
+
*/
|
|
593
|
+
declare function EmptyState({ title, description, icon: IconProp, action, secondaryAction, variant, className, children, }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
594
|
+
type EmptyStatePresetProps = Omit<EmptyStateProps, "icon" | "title" | "description"> & {
|
|
595
|
+
title?: string;
|
|
596
|
+
description?: string;
|
|
597
|
+
};
|
|
598
|
+
/** No search results — with search icon */
|
|
599
|
+
declare function EmptyStateNoResults(props: EmptyStatePresetProps): react_jsx_runtime.JSX.Element;
|
|
600
|
+
/** No data — with inbox icon */
|
|
601
|
+
declare function EmptyStateNoData(props: EmptyStatePresetProps): react_jsx_runtime.JSX.Element;
|
|
602
|
+
/** Not found — with file-x icon */
|
|
603
|
+
declare function EmptyStateNotFound(props: EmptyStatePresetProps): react_jsx_runtime.JSX.Element;
|
|
604
|
+
|
|
605
|
+
interface LoadingStateProps {
|
|
606
|
+
/** Loading message text */
|
|
607
|
+
text?: string;
|
|
608
|
+
/** Visual variant */
|
|
609
|
+
variant?: "default" | "inline" | "overlay" | "minimal";
|
|
610
|
+
/** Spinner size */
|
|
611
|
+
size?: "sm" | "md" | "lg";
|
|
612
|
+
/** Additional className */
|
|
613
|
+
className?: string;
|
|
614
|
+
}
|
|
615
|
+
interface LoadingOverlayProps {
|
|
616
|
+
/** Loading message text */
|
|
617
|
+
text?: string;
|
|
618
|
+
/** Whether the overlay is visible */
|
|
619
|
+
visible?: boolean;
|
|
620
|
+
/** Additional className */
|
|
621
|
+
className?: string;
|
|
622
|
+
/** Children to render behind the overlay */
|
|
623
|
+
children?: React.ReactNode;
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* LoadingState — Versatile loading indicator
|
|
627
|
+
*
|
|
628
|
+
* @example Default (centered, full area)
|
|
629
|
+
* ```tsx
|
|
630
|
+
* <LoadingState text="Loading projects..." />
|
|
631
|
+
* ```
|
|
632
|
+
*
|
|
633
|
+
* @example Inline (in a row)
|
|
634
|
+
* ```tsx
|
|
635
|
+
* <LoadingState variant="inline" text="Saving..." size="sm" />
|
|
636
|
+
* ```
|
|
637
|
+
*
|
|
638
|
+
* @example Minimal (just the spinner)
|
|
639
|
+
* ```tsx
|
|
640
|
+
* <LoadingState variant="minimal" />
|
|
641
|
+
* ```
|
|
642
|
+
*/
|
|
643
|
+
declare function LoadingState({ text, variant, size, className, }: LoadingStateProps): react_jsx_runtime.JSX.Element;
|
|
644
|
+
/**
|
|
645
|
+
* LoadingOverlay — Renders children with an overlay spinner on top
|
|
646
|
+
*
|
|
647
|
+
* @example
|
|
648
|
+
* ```tsx
|
|
649
|
+
* <LoadingOverlay visible={isSaving} text="Saving changes...">
|
|
650
|
+
* <MyFormContent />
|
|
651
|
+
* </LoadingOverlay>
|
|
652
|
+
* ```
|
|
653
|
+
*/
|
|
654
|
+
declare function LoadingOverlay({ text, visible, className, children, }: LoadingOverlayProps): react_jsx_runtime.JSX.Element;
|
|
655
|
+
|
|
656
|
+
type StatusBannerVariant = "info" | "warning" | "success" | "error";
|
|
657
|
+
interface StatusBannerProps {
|
|
658
|
+
/** The banner variant/severity */
|
|
659
|
+
variant?: StatusBannerVariant;
|
|
660
|
+
/** Main message text or node */
|
|
661
|
+
children: React.ReactNode;
|
|
662
|
+
/** Optional custom icon */
|
|
663
|
+
icon?: LucideIcon;
|
|
664
|
+
/** Whether the banner can be dismissed */
|
|
665
|
+
dismissible?: boolean;
|
|
666
|
+
/** Callback when dismissed */
|
|
667
|
+
onDismiss?: () => void;
|
|
668
|
+
/** Optional action element (e.g. a link or button) */
|
|
669
|
+
action?: React.ReactNode;
|
|
670
|
+
/** Additional className */
|
|
671
|
+
className?: string;
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* StatusBanner — A persistent info/warning/success/error banner.
|
|
675
|
+
*
|
|
676
|
+
* @example
|
|
677
|
+
* ```tsx
|
|
678
|
+
* <StatusBanner variant="warning" dismissible>
|
|
679
|
+
* Your trial expires in 3 days. <a href="/pricing">Upgrade now</a>
|
|
680
|
+
* </StatusBanner>
|
|
681
|
+
*
|
|
682
|
+
* <StatusBanner variant="success" action={<Button size="sm">View</Button>}>
|
|
683
|
+
* Your project was deployed successfully.
|
|
684
|
+
* </StatusBanner>
|
|
685
|
+
* ```
|
|
686
|
+
*/
|
|
687
|
+
declare function StatusBanner({ variant, children, icon: CustomIcon, dismissible, onDismiss, action, className, }: StatusBannerProps): react_jsx_runtime.JSX.Element | null;
|
|
688
|
+
|
|
689
|
+
interface StepperStep {
|
|
690
|
+
/** Step label */
|
|
691
|
+
label: string;
|
|
692
|
+
/** Optional description shown below the label */
|
|
693
|
+
description?: string;
|
|
694
|
+
/** Optional icon for the step (replaces the number) */
|
|
695
|
+
icon?: React.ReactNode;
|
|
696
|
+
/** Whether this step is optional */
|
|
697
|
+
optional?: boolean;
|
|
698
|
+
}
|
|
699
|
+
interface StepperProps {
|
|
700
|
+
/** Array of step definitions */
|
|
701
|
+
steps: (string | StepperStep)[];
|
|
702
|
+
/** Active step index (0-based) */
|
|
703
|
+
currentStep: number;
|
|
704
|
+
/** Variant */
|
|
705
|
+
variant?: "default" | "compact";
|
|
706
|
+
/** Orientation */
|
|
707
|
+
orientation?: "horizontal" | "vertical";
|
|
708
|
+
/** Additional className */
|
|
709
|
+
className?: string;
|
|
710
|
+
/** Callback when a completed step is clicked */
|
|
711
|
+
onStepClick?: (stepIndex: number) => void;
|
|
712
|
+
/** Children (StepContent panels) */
|
|
713
|
+
children?: React.ReactNode;
|
|
714
|
+
}
|
|
715
|
+
interface StepContentProps {
|
|
716
|
+
/** Step index this content belongs to (0-based) */
|
|
717
|
+
step: number;
|
|
718
|
+
/** Currently active step */
|
|
719
|
+
currentStep: number;
|
|
720
|
+
/** Children to render */
|
|
721
|
+
children: React.ReactNode;
|
|
722
|
+
/** Additional className */
|
|
723
|
+
className?: string;
|
|
724
|
+
/** Keep mounted when inactive (useful for forms) */
|
|
725
|
+
keepMounted?: boolean;
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* Stepper — Multi-step progress indicator
|
|
729
|
+
*
|
|
730
|
+
* Features:
|
|
731
|
+
* - Horizontal layout: circles in a row with labels below, proper connectors
|
|
732
|
+
* - Vertical layout: circles on the left with labels to the right
|
|
733
|
+
* - Compact variant for tight spaces
|
|
734
|
+
* - Handles many steps gracefully without scrollbars
|
|
735
|
+
* - Clickable completed steps for navigation
|
|
736
|
+
* - Accessible: role="list", aria-current="step"
|
|
737
|
+
*
|
|
738
|
+
* @example Basic
|
|
739
|
+
* ```tsx
|
|
740
|
+
* const [step, setStep] = useState(0);
|
|
741
|
+
*
|
|
742
|
+
* <Stepper steps={["Details", "Config", "Review"]} currentStep={step}>
|
|
743
|
+
* <StepContent step={0} currentStep={step}>
|
|
744
|
+
* <DetailsForm onNext={() => setStep(1)} />
|
|
745
|
+
* </StepContent>
|
|
746
|
+
* </Stepper>
|
|
747
|
+
* ```
|
|
748
|
+
*
|
|
749
|
+
* @example With step objects
|
|
750
|
+
* ```tsx
|
|
751
|
+
* <Stepper
|
|
752
|
+
* steps={[
|
|
753
|
+
* { label: "Account", description: "Set up your account" },
|
|
754
|
+
* { label: "Profile", description: "Add your details", optional: true },
|
|
755
|
+
* { label: "Complete", description: "Review and submit" },
|
|
756
|
+
* ]}
|
|
757
|
+
* currentStep={1}
|
|
758
|
+
* onStepClick={(i) => setStep(i)}
|
|
759
|
+
* />
|
|
760
|
+
* ```
|
|
761
|
+
*/
|
|
762
|
+
declare function Stepper({ steps, currentStep, variant, orientation, className, onStepClick, children, ...props }: StepperProps): react_jsx_runtime.JSX.Element;
|
|
763
|
+
/**
|
|
764
|
+
* StepContent — Renders content for a specific step.
|
|
765
|
+
* Only visible when `step === currentStep`.
|
|
766
|
+
*
|
|
767
|
+
* @example
|
|
768
|
+
* ```tsx
|
|
769
|
+
* <StepContent step={0} currentStep={current}>
|
|
770
|
+
* <MyForm />
|
|
771
|
+
* </StepContent>
|
|
772
|
+
* ```
|
|
773
|
+
*/
|
|
774
|
+
declare function StepContent({ step, currentStep, children, className, keepMounted, }: StepContentProps): react_jsx_runtime.JSX.Element | null;
|
|
775
|
+
|
|
456
776
|
interface CopyButtonProps {
|
|
457
777
|
value: string;
|
|
458
778
|
className?: string;
|
|
@@ -510,16 +830,20 @@ interface DataTableProps<TData, TValue> {
|
|
|
510
830
|
enableRowSelection?: boolean;
|
|
511
831
|
onRowSelectionChange?: (selectedRows: TData[]) => void;
|
|
512
832
|
className?: string;
|
|
833
|
+
/** Custom loading state renderer */
|
|
834
|
+
loadingState?: React__default.ReactNode;
|
|
835
|
+
/** Custom empty state renderer */
|
|
836
|
+
emptyState?: React__default.ReactNode;
|
|
513
837
|
}
|
|
514
|
-
declare function DataTable<TData, TValue>({ columns, data, isLoading, pagination, enableSorting, enableRowSelection, onRowSelectionChange, className, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
838
|
+
declare function DataTable<TData, TValue>({ columns, data, isLoading, pagination, enableSorting, enableRowSelection, onRowSelectionChange, className, loadingState: customLoadingState, emptyState: customEmptyState, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
515
839
|
|
|
516
840
|
declare const SIZE_VARIANTS$1: {
|
|
517
|
-
readonly sm: "sm
|
|
518
|
-
readonly default: "sm
|
|
519
|
-
readonly lg: "sm
|
|
520
|
-
readonly xl: "sm
|
|
521
|
-
readonly "2xl": "sm
|
|
522
|
-
readonly full: "
|
|
841
|
+
readonly sm: "sm:max-w-sm";
|
|
842
|
+
readonly default: "sm:max-w-md";
|
|
843
|
+
readonly lg: "sm:max-w-lg md:max-w-2xl";
|
|
844
|
+
readonly xl: "sm:max-w-2xl md:max-w-4xl";
|
|
845
|
+
readonly "2xl": "sm:max-w-4xl md:max-w-6xl";
|
|
846
|
+
readonly full: "max-w-[95vw] h-[95vh]";
|
|
523
847
|
};
|
|
524
848
|
type SizeVariant$1 = keyof typeof SIZE_VARIANTS$1;
|
|
525
849
|
interface DialogWrapperProps {
|
|
@@ -542,7 +866,7 @@ interface DialogWrapperProps {
|
|
|
542
866
|
}
|
|
543
867
|
declare function DialogWrapper({ open, onOpenChange, title, description, children, footer, trigger, size, className, headerClassName, contentClassName, footerClassName, hideHeader, hideTitle, hideDescription, hideCloseButton, ...props }: DialogWrapperProps): react_jsx_runtime.JSX.Element;
|
|
544
868
|
interface FormDialogProps extends Omit<DialogWrapperProps, "footer"> {
|
|
545
|
-
onSubmit?: () => void;
|
|
869
|
+
onSubmit?: (e: React.FormEvent<HTMLFormElement>) => void;
|
|
546
870
|
onCancel?: () => void;
|
|
547
871
|
submitText?: string;
|
|
548
872
|
cancelText?: string;
|
|
@@ -552,8 +876,8 @@ interface FormDialogProps extends Omit<DialogWrapperProps, "footer"> {
|
|
|
552
876
|
declare function FormDialog({ open, onOpenChange, title, description, children, onSubmit, onCancel, submitText, cancelText, isLoading, submitDisabled, ...props }: FormDialogProps): react_jsx_runtime.JSX.Element;
|
|
553
877
|
|
|
554
878
|
interface DropdownWrapperProps {
|
|
555
|
-
trigger: React
|
|
556
|
-
children: React
|
|
879
|
+
trigger: React.ReactNode;
|
|
880
|
+
children: React.ReactNode;
|
|
557
881
|
align?: "start" | "center" | "end";
|
|
558
882
|
side?: "top" | "right" | "bottom" | "left";
|
|
559
883
|
sideOffset?: number;
|
|
@@ -566,7 +890,7 @@ interface ActionDropdownItem {
|
|
|
566
890
|
key?: string;
|
|
567
891
|
label?: string | (() => string);
|
|
568
892
|
icon?: LucideIcon;
|
|
569
|
-
onClick?: (e: React
|
|
893
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
570
894
|
disabled?: boolean;
|
|
571
895
|
hidden?: boolean;
|
|
572
896
|
variant?: "default" | "destructive";
|
|
@@ -640,36 +964,68 @@ declare const iconItemMediaVariants: (props?: ({
|
|
|
640
964
|
iconBg?: "primary" | "gradient" | "none" | "gold" | "muted" | null | undefined;
|
|
641
965
|
iconSize?: "lg" | "xl" | "sm" | "md" | null | undefined;
|
|
642
966
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
643
|
-
interface IconItemMediaProps extends React
|
|
644
|
-
icon?: React
|
|
645
|
-
children?: React
|
|
967
|
+
interface IconItemMediaProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof iconItemMediaVariants> {
|
|
968
|
+
icon?: React.ReactNode;
|
|
969
|
+
children?: React.ReactNode;
|
|
646
970
|
}
|
|
647
|
-
declare const IconItemMedia: React
|
|
971
|
+
declare const IconItemMedia: React.NamedExoticComponent<IconItemMediaProps>;
|
|
648
972
|
interface FeatureItemProps {
|
|
649
|
-
icon?: React
|
|
973
|
+
icon?: React.ReactNode;
|
|
650
974
|
iconBg?: "primary" | "gold" | "muted" | "gradient" | "none";
|
|
651
975
|
iconSize?: "sm" | "md" | "lg" | "xl";
|
|
652
|
-
title?: React
|
|
653
|
-
description?: React
|
|
976
|
+
title?: React.ReactNode;
|
|
977
|
+
description?: React.ReactNode;
|
|
654
978
|
variant?: "default" | "outline" | "ghost" | "gradient-light" | "gradient";
|
|
655
979
|
size?: "sm" | "default" | "lg";
|
|
656
980
|
layout?: "vertical" | "horizontal";
|
|
657
|
-
titleAs?: React
|
|
981
|
+
titleAs?: React.ElementType;
|
|
658
982
|
className?: string;
|
|
659
983
|
titleClassName?: string;
|
|
660
984
|
descriptionClassName?: string;
|
|
661
985
|
iconClassName?: string;
|
|
662
|
-
children?: React
|
|
986
|
+
children?: React.ReactNode;
|
|
987
|
+
}
|
|
988
|
+
declare const FeatureItem: React.NamedExoticComponent<FeatureItemProps>;
|
|
989
|
+
interface FeatureListItem {
|
|
990
|
+
id?: string;
|
|
991
|
+
icon?: React.ReactNode;
|
|
992
|
+
iconBg?: "primary" | "gold" | "muted" | "gradient" | "none";
|
|
993
|
+
iconSize?: "sm" | "md" | "lg" | "xl";
|
|
994
|
+
title: string;
|
|
995
|
+
description?: string;
|
|
996
|
+
}
|
|
997
|
+
interface FeatureListProps {
|
|
998
|
+
items?: FeatureListItem[];
|
|
999
|
+
columns?: 2 | 3 | 4;
|
|
1000
|
+
variant?: "default" | "outline" | "ghost" | "gradient-light" | "gradient";
|
|
1001
|
+
iconBg?: "primary" | "gold" | "muted" | "gradient" | "none";
|
|
1002
|
+
iconSize?: "sm" | "md" | "lg" | "xl";
|
|
1003
|
+
layout?: "vertical" | "horizontal";
|
|
1004
|
+
className?: string;
|
|
1005
|
+
itemClassName?: string;
|
|
1006
|
+
}
|
|
1007
|
+
declare function FeatureList({ items, columns, variant, iconBg, iconSize, layout, className, itemClassName, ...props }: FeatureListProps): react_jsx_runtime.JSX.Element;
|
|
1008
|
+
declare namespace FeatureList {
|
|
1009
|
+
var displayName: string;
|
|
663
1010
|
}
|
|
664
|
-
declare const FeatureItem: React$1.NamedExoticComponent<FeatureItemProps>;
|
|
665
1011
|
|
|
666
1012
|
declare function ModeToggle(): react_jsx_runtime.JSX.Element;
|
|
667
1013
|
|
|
668
|
-
interface
|
|
1014
|
+
interface PhoneCountry {
|
|
1015
|
+
code: string;
|
|
1016
|
+
name: string;
|
|
1017
|
+
dialCode: string;
|
|
1018
|
+
flag: string;
|
|
1019
|
+
}
|
|
1020
|
+
declare const DEFAULT_COUNTRIES: PhoneCountry[];
|
|
1021
|
+
interface PhoneInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange"> {
|
|
669
1022
|
onChange?: (value: string) => void;
|
|
670
1023
|
defaultCountry?: string;
|
|
1024
|
+
/** Custom list of countries to show. Defaults to a built-in list of ~50 countries. */
|
|
1025
|
+
countries?: PhoneCountry[];
|
|
1026
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
671
1027
|
}
|
|
672
|
-
declare
|
|
1028
|
+
declare function PhoneInput({ className, onChange, value, defaultCountry, countries, disabled, placeholder, ref, ...props }: PhoneInputProps): react_jsx_runtime.JSX.Element;
|
|
673
1029
|
|
|
674
1030
|
interface PillProps {
|
|
675
1031
|
variant?: "default" | "secondary" | "destructive" | "outline";
|
|
@@ -774,7 +1130,7 @@ interface SheetWrapperProps {
|
|
|
774
1130
|
hideCloseButton?: boolean;
|
|
775
1131
|
disableContentPadding?: boolean;
|
|
776
1132
|
}
|
|
777
|
-
declare const SheetWrapper: React
|
|
1133
|
+
declare const SheetWrapper: React.NamedExoticComponent<SheetWrapperProps>;
|
|
778
1134
|
interface FormSheetProps extends Omit<SheetWrapperProps, "footer"> {
|
|
779
1135
|
onSubmit?: () => void;
|
|
780
1136
|
onCancel?: () => void;
|
|
@@ -784,7 +1140,7 @@ interface FormSheetProps extends Omit<SheetWrapperProps, "footer"> {
|
|
|
784
1140
|
submitLoading?: boolean;
|
|
785
1141
|
formId?: string;
|
|
786
1142
|
}
|
|
787
|
-
declare const FormSheet: React
|
|
1143
|
+
declare const FormSheet: React.NamedExoticComponent<FormSheetProps>;
|
|
788
1144
|
interface ConfirmSheetProps extends Omit<SheetWrapperProps, "footer"> {
|
|
789
1145
|
onConfirm?: () => void;
|
|
790
1146
|
onCancel?: () => void;
|
|
@@ -794,7 +1150,7 @@ interface ConfirmSheetProps extends Omit<SheetWrapperProps, "footer"> {
|
|
|
794
1150
|
confirmDisabled?: boolean;
|
|
795
1151
|
confirmLoading?: boolean;
|
|
796
1152
|
}
|
|
797
|
-
declare const ConfirmSheet: React
|
|
1153
|
+
declare const ConfirmSheet: React.NamedExoticComponent<ConfirmSheetProps>;
|
|
798
1154
|
|
|
799
1155
|
interface TableWrapperColumn {
|
|
800
1156
|
key?: string;
|
|
@@ -842,7 +1198,7 @@ interface TabsWrapperProps {
|
|
|
842
1198
|
withScrollArea?: boolean;
|
|
843
1199
|
scrollAreaClassName?: string;
|
|
844
1200
|
}
|
|
845
|
-
declare const TabsWrapper: React
|
|
1201
|
+
declare const TabsWrapper: React.NamedExoticComponent<TabsWrapperProps>;
|
|
846
1202
|
interface TabTriggerProps {
|
|
847
1203
|
value: string;
|
|
848
1204
|
children: ReactNode;
|
|
@@ -852,7 +1208,7 @@ interface TabTriggerProps {
|
|
|
852
1208
|
hideTextOnMobile?: boolean;
|
|
853
1209
|
disabled?: boolean;
|
|
854
1210
|
}
|
|
855
|
-
declare const TabTrigger: React
|
|
1211
|
+
declare const TabTrigger: React.NamedExoticComponent<TabTriggerProps>;
|
|
856
1212
|
interface TabContentProps {
|
|
857
1213
|
value: string;
|
|
858
1214
|
children: ReactNode;
|
|
@@ -862,7 +1218,7 @@ interface TabContentProps {
|
|
|
862
1218
|
padding?: boolean;
|
|
863
1219
|
keepMounted?: boolean;
|
|
864
1220
|
}
|
|
865
|
-
declare const TabContent: React
|
|
1221
|
+
declare const TabContent: React.NamedExoticComponent<TabContentProps>;
|
|
866
1222
|
interface DynamicTabItem {
|
|
867
1223
|
value: string;
|
|
868
1224
|
label: ReactNode;
|
|
@@ -884,7 +1240,7 @@ interface DynamicTabsProps {
|
|
|
884
1240
|
contentClassName?: string;
|
|
885
1241
|
scrollable?: boolean;
|
|
886
1242
|
}
|
|
887
|
-
declare const DynamicTabs: React
|
|
1243
|
+
declare const DynamicTabs: React.NamedExoticComponent<DynamicTabsProps>;
|
|
888
1244
|
|
|
889
1245
|
interface TooltipWrapperProps {
|
|
890
1246
|
children: ReactNode;
|
|
@@ -943,10 +1299,6 @@ interface FormInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
|
943
1299
|
labelClassName?: string;
|
|
944
1300
|
inputClassName?: string;
|
|
945
1301
|
inputGroupClassName?: string;
|
|
946
|
-
IconLeft?: ReactNode;
|
|
947
|
-
IconRight?: ReactNode;
|
|
948
|
-
AddonLeft?: ReactNode;
|
|
949
|
-
AddonRight?: ReactNode;
|
|
950
1302
|
iconLeft?: ReactNode;
|
|
951
1303
|
iconRight?: ReactNode;
|
|
952
1304
|
addonLeft?: ReactNode;
|
|
@@ -991,12 +1343,12 @@ interface FormInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
|
991
1343
|
* <FormInput
|
|
992
1344
|
* control={form.control}
|
|
993
1345
|
* name="search"
|
|
994
|
-
*
|
|
1346
|
+
* iconLeft={<SearchIcon />}
|
|
995
1347
|
* placeholder="Search..."
|
|
996
1348
|
* />
|
|
997
1349
|
* ```
|
|
998
1350
|
*/
|
|
999
|
-
declare function FormInput<TFieldValues extends FieldValues = FieldValues>({ control, name, label, placeholder, description, helperText, required, disabled, readOnly, type, className, labelClassName, inputClassName, inputGroupClassName,
|
|
1351
|
+
declare function FormInput<TFieldValues extends FieldValues = FieldValues>({ control, name, label, placeholder, description, helperText, required, disabled, readOnly, type, className, labelClassName, inputClassName, inputGroupClassName, iconLeft, iconRight, addonLeft, addonRight, onValueChange, transform, value, onChange, min, max, step, minLength, maxLength, pattern, autoComplete, autoFocus, inputMode, enterKeyHint, }: FormInputProps<TFieldValues>): react_jsx_runtime.JSX.Element;
|
|
1000
1352
|
|
|
1001
1353
|
interface FormTextareaProps<TFieldValues extends FieldValues = FieldValues> {
|
|
1002
1354
|
control?: Control<TFieldValues>;
|
|
@@ -1016,14 +1368,10 @@ interface FormTextareaProps<TFieldValues extends FieldValues = FieldValues> {
|
|
|
1016
1368
|
labelClassName?: string;
|
|
1017
1369
|
textareaClassName?: string;
|
|
1018
1370
|
inputGroupClassName?: string;
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
iconLeft?: React$1.ReactNode;
|
|
1024
|
-
iconRight?: React$1.ReactNode;
|
|
1025
|
-
addonLeft?: React$1.ReactNode;
|
|
1026
|
-
addonRight?: React$1.ReactNode;
|
|
1371
|
+
iconLeft?: React.ReactNode;
|
|
1372
|
+
iconRight?: React.ReactNode;
|
|
1373
|
+
addonLeft?: React.ReactNode;
|
|
1374
|
+
addonRight?: React.ReactNode;
|
|
1027
1375
|
minLength?: number;
|
|
1028
1376
|
maxLength?: number;
|
|
1029
1377
|
autoComplete?: string;
|
|
@@ -1043,16 +1391,16 @@ interface FormTextareaProps<TFieldValues extends FieldValues = FieldValues> {
|
|
|
1043
1391
|
* />
|
|
1044
1392
|
* ```
|
|
1045
1393
|
*/
|
|
1046
|
-
declare function FormTextarea<TFieldValues extends FieldValues = FieldValues>({ control, name, label, description, helperText, required, disabled, readOnly, placeholder, value: propValue, onChange: propOnChange, onValueChange, className, labelClassName, textareaClassName, inputGroupClassName,
|
|
1394
|
+
declare function FormTextarea<TFieldValues extends FieldValues = FieldValues>({ control, name, label, description, helperText, required, disabled, readOnly, placeholder, value: propValue, onChange: propOnChange, onValueChange, className, labelClassName, textareaClassName, inputGroupClassName, iconLeft, iconRight, addonLeft, addonRight, rows, minLength, maxLength, autoComplete, autoFocus, }: FormTextareaProps<TFieldValues>): react_jsx_runtime.JSX.Element;
|
|
1047
1395
|
|
|
1048
|
-
interface SelectOption
|
|
1396
|
+
interface SelectOption {
|
|
1049
1397
|
value: string | number;
|
|
1050
1398
|
label: string;
|
|
1051
1399
|
disabled?: boolean;
|
|
1052
1400
|
}
|
|
1053
1401
|
interface SelectOptionGroup {
|
|
1054
1402
|
label: string;
|
|
1055
|
-
items: SelectOption
|
|
1403
|
+
items: SelectOption[];
|
|
1056
1404
|
}
|
|
1057
1405
|
interface SelectInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
1058
1406
|
control?: Control<TFieldValues>;
|
|
@@ -1063,9 +1411,9 @@ interface SelectInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
|
1063
1411
|
helperText?: string;
|
|
1064
1412
|
required?: boolean;
|
|
1065
1413
|
disabled?: boolean;
|
|
1066
|
-
items?: SelectOption
|
|
1414
|
+
items?: SelectOption[];
|
|
1067
1415
|
groups?: SelectOptionGroup[];
|
|
1068
|
-
allOption?: SelectOption
|
|
1416
|
+
allOption?: SelectOption;
|
|
1069
1417
|
valueKey?: string;
|
|
1070
1418
|
displayKey?: string;
|
|
1071
1419
|
value?: string | number;
|
|
@@ -1075,7 +1423,7 @@ interface SelectInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
|
1075
1423
|
triggerClassName?: string;
|
|
1076
1424
|
contentClassName?: string;
|
|
1077
1425
|
itemClassName?: string;
|
|
1078
|
-
Icon?: React
|
|
1426
|
+
Icon?: React.ComponentType<{
|
|
1079
1427
|
className?: string;
|
|
1080
1428
|
}>;
|
|
1081
1429
|
defaultOpen?: boolean;
|
|
@@ -1247,9 +1595,9 @@ interface SwitchInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
|
1247
1595
|
declare function SwitchInput<TFieldValues extends FieldValues = FieldValues>({ control, name, label, description, helperText, required, disabled, orientation, value: propValue, onChange: propOnChange, onValueChange, className, labelClassName, switchClassName, }: SwitchInputProps<TFieldValues>): react_jsx_runtime.JSX.Element;
|
|
1248
1596
|
|
|
1249
1597
|
type DateValue = Date | string | null | undefined;
|
|
1250
|
-
interface DateInputProps {
|
|
1251
|
-
control?: Control<
|
|
1252
|
-
name: string;
|
|
1598
|
+
interface DateInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
1599
|
+
control?: Control<TFieldValues>;
|
|
1600
|
+
name: FieldPath<TFieldValues> | string;
|
|
1253
1601
|
label?: string;
|
|
1254
1602
|
placeholder?: string;
|
|
1255
1603
|
description?: string;
|
|
@@ -1264,7 +1612,7 @@ interface DateInputProps {
|
|
|
1264
1612
|
className?: string;
|
|
1265
1613
|
labelClassName?: string;
|
|
1266
1614
|
inputClassName?: string;
|
|
1267
|
-
Icon?: React
|
|
1615
|
+
Icon?: React.ComponentType<{
|
|
1268
1616
|
className?: string;
|
|
1269
1617
|
}>;
|
|
1270
1618
|
allowClear?: boolean;
|
|
@@ -1283,7 +1631,7 @@ interface DateInputProps {
|
|
|
1283
1631
|
* />
|
|
1284
1632
|
* ```
|
|
1285
1633
|
*/
|
|
1286
|
-
declare function DateInput({ control, name, label, description, helperText, placeholder, required, disabled, className, labelClassName, inputClassName, minDate, maxDate, onValueChange, value: propValue, onChange: propOnChange, Icon, allowClear, }: DateInputProps): react_jsx_runtime.JSX.Element;
|
|
1634
|
+
declare function DateInput<TFieldValues extends FieldValues = FieldValues>({ control, name, label, description, helperText, placeholder, required, disabled, className, labelClassName, inputClassName, minDate, maxDate, onValueChange, value: propValue, onChange: propOnChange, Icon, allowClear, }: DateInputProps<TFieldValues>): react_jsx_runtime.JSX.Element;
|
|
1287
1635
|
|
|
1288
1636
|
interface TagInputProps {
|
|
1289
1637
|
control?: Control<FieldValues>;
|
|
@@ -1332,9 +1680,9 @@ interface TagChoiceItem {
|
|
|
1332
1680
|
label: string;
|
|
1333
1681
|
disabled?: boolean;
|
|
1334
1682
|
}
|
|
1335
|
-
interface TagChoiceInputProps {
|
|
1336
|
-
control?: Control<
|
|
1337
|
-
name
|
|
1683
|
+
interface TagChoiceInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
1684
|
+
control?: Control<TFieldValues>;
|
|
1685
|
+
name: FieldPath<TFieldValues> | string;
|
|
1338
1686
|
label?: string;
|
|
1339
1687
|
placeholder?: string;
|
|
1340
1688
|
description?: string;
|
|
@@ -1362,7 +1710,7 @@ interface TagChoiceInputProps {
|
|
|
1362
1710
|
* />
|
|
1363
1711
|
* ```
|
|
1364
1712
|
*/
|
|
1365
|
-
declare function TagChoiceInput({ control, name, label, description, helperText, placeholder, required, disabled, className, items, value: propValue, onValueChange, }: TagChoiceInputProps): react_jsx_runtime.JSX.Element;
|
|
1713
|
+
declare function TagChoiceInput<TFieldValues extends FieldValues = FieldValues>({ control, name, label, description, helperText, placeholder, required, disabled, className, items, value: propValue, onValueChange, }: TagChoiceInputProps<TFieldValues>): react_jsx_runtime.JSX.Element;
|
|
1366
1714
|
declare namespace TagChoiceInput {
|
|
1367
1715
|
var displayName: string;
|
|
1368
1716
|
}
|
|
@@ -1372,12 +1720,11 @@ interface ComboboxOption {
|
|
|
1372
1720
|
label: string;
|
|
1373
1721
|
disabled?: boolean;
|
|
1374
1722
|
}
|
|
1375
|
-
interface ComboboxInputProps {
|
|
1376
|
-
control?: Control<
|
|
1377
|
-
name: string;
|
|
1723
|
+
interface ComboboxInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
1724
|
+
control?: Control<TFieldValues>;
|
|
1725
|
+
name: FieldPath<TFieldValues> | string;
|
|
1378
1726
|
label?: string;
|
|
1379
1727
|
placeholder?: string;
|
|
1380
|
-
searchPlaceholder?: string;
|
|
1381
1728
|
emptyText?: string;
|
|
1382
1729
|
description?: string;
|
|
1383
1730
|
helperText?: string;
|
|
@@ -1389,14 +1736,21 @@ interface ComboboxInputProps {
|
|
|
1389
1736
|
onValueChange?: (value: string) => void;
|
|
1390
1737
|
className?: string;
|
|
1391
1738
|
labelClassName?: string;
|
|
1392
|
-
|
|
1739
|
+
inputClassName?: string;
|
|
1393
1740
|
renderOption?: (option: ComboboxOption) => ReactNode;
|
|
1394
1741
|
}
|
|
1395
1742
|
/**
|
|
1396
|
-
* ComboboxInput - Searchable select with react-hook-form integration
|
|
1743
|
+
* ComboboxInput - Searchable select with react-hook-form integration using Base UI
|
|
1744
|
+
*
|
|
1745
|
+
* Features:
|
|
1746
|
+
* - Works with react-hook-form Controller
|
|
1747
|
+
* - Supports Base UI Combobox primitives
|
|
1748
|
+
* - Custom option rendering
|
|
1749
|
+
* - Can be used standalone without form
|
|
1397
1750
|
*
|
|
1398
1751
|
* @example
|
|
1399
1752
|
* ```tsx
|
|
1753
|
+
* // With react-hook-form
|
|
1400
1754
|
* <ComboboxInput
|
|
1401
1755
|
* control={form.control}
|
|
1402
1756
|
* name="country"
|
|
@@ -1405,11 +1759,20 @@ interface ComboboxInputProps {
|
|
|
1405
1759
|
* { value: "us", label: "United States" },
|
|
1406
1760
|
* { value: "uk", label: "United Kingdom" },
|
|
1407
1761
|
* ]}
|
|
1408
|
-
*
|
|
1762
|
+
* placeholder="Select a country..."
|
|
1763
|
+
* />
|
|
1764
|
+
*
|
|
1765
|
+
* // Standalone
|
|
1766
|
+
* <ComboboxInput
|
|
1767
|
+
* name="country"
|
|
1768
|
+
* label="Country"
|
|
1769
|
+
* items={items}
|
|
1770
|
+
* value={selectedCountry}
|
|
1771
|
+
* onValueChange={setSelectedCountry}
|
|
1409
1772
|
* />
|
|
1410
1773
|
* ```
|
|
1411
1774
|
*/
|
|
1412
|
-
declare function ComboboxInput({ control, name, label, placeholder,
|
|
1775
|
+
declare function ComboboxInput<TFieldValues extends FieldValues = FieldValues>({ control, name, label, placeholder, emptyText, description, helperText, required, disabled, items, className, labelClassName, inputClassName, onValueChange, renderOption, value: propValue, onChange: propOnChange, }: ComboboxInputProps<TFieldValues>): react_jsx_runtime.JSX.Element;
|
|
1413
1776
|
|
|
1414
1777
|
interface SlugFieldProps {
|
|
1415
1778
|
control?: Control<FieldValues>;
|
|
@@ -1433,11 +1796,12 @@ interface SlugFieldProps {
|
|
|
1433
1796
|
labelClassName?: string;
|
|
1434
1797
|
inputClassName?: string;
|
|
1435
1798
|
error?: FieldError;
|
|
1799
|
+
ref?: Ref<HTMLInputElement>;
|
|
1436
1800
|
}
|
|
1437
1801
|
/**
|
|
1438
1802
|
* Generates a URL-friendly slug from a string
|
|
1439
1803
|
*/
|
|
1440
|
-
declare function generateSlug
|
|
1804
|
+
declare function generateSlug(text: string | undefined): string;
|
|
1441
1805
|
/**
|
|
1442
1806
|
* SlugField - URL slug input with auto-generation
|
|
1443
1807
|
*
|
|
@@ -1453,7 +1817,7 @@ declare function generateSlug$1(text: string | undefined): string;
|
|
|
1453
1817
|
* />
|
|
1454
1818
|
* ```
|
|
1455
1819
|
*/
|
|
1456
|
-
declare
|
|
1820
|
+
declare function SlugField({ control, name, description, helperText, required, label, placeholder, disabled, sourceValue, onGenerate, className, inputClassName, labelClassName, onValueChange, value, onChange, error, ref, }: SlugFieldProps): react_jsx_runtime.JSX.Element;
|
|
1457
1821
|
|
|
1458
1822
|
interface FormErrorSummaryProps {
|
|
1459
1823
|
/** Form errors object from react-hook-form */
|
|
@@ -1514,11 +1878,11 @@ interface DateRangeValue {
|
|
|
1514
1878
|
from?: Date | string;
|
|
1515
1879
|
to?: Date | string;
|
|
1516
1880
|
}
|
|
1517
|
-
interface DateRangeInputProps {
|
|
1881
|
+
interface DateRangeInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
1518
1882
|
/** React Hook Form control */
|
|
1519
|
-
control?: Control<
|
|
1883
|
+
control?: Control<TFieldValues>;
|
|
1520
1884
|
/** Field name for form registration */
|
|
1521
|
-
name
|
|
1885
|
+
name: FieldPath<TFieldValues> | string;
|
|
1522
1886
|
/** Field label */
|
|
1523
1887
|
label?: string;
|
|
1524
1888
|
/** Description text below the input */
|
|
@@ -1578,399 +1942,7 @@ interface DateRangeInputProps {
|
|
|
1578
1942
|
* />
|
|
1579
1943
|
* ```
|
|
1580
1944
|
*/
|
|
1581
|
-
declare function DateRangeInput({ control, name, label, description, placeholder, required, disabled, className, labelClassName, buttonClassName, calendarClassName, minDate, maxDate, disabledDates, disabledDays, onValueChange, validateDateRange, clearErrors, descriptionComponent, allowClear, showBadge, Icon, transform, }: DateRangeInputProps): react_jsx_runtime.JSX.Element;
|
|
1582
|
-
|
|
1583
|
-
interface SearchRootProps {
|
|
1584
|
-
children: ReactNode;
|
|
1585
|
-
hook: UseBaseSearchReturn;
|
|
1586
|
-
className?: string;
|
|
1587
|
-
}
|
|
1588
|
-
/**
|
|
1589
|
-
* Root search component that provides context to all child components
|
|
1590
|
-
*
|
|
1591
|
-
* @example
|
|
1592
|
-
* <Search.Root hook={useMySearch()}>
|
|
1593
|
-
* <Search.Input />
|
|
1594
|
-
* <Search.Filters />
|
|
1595
|
-
* <Search.Actions />
|
|
1596
|
-
* </Search.Root>
|
|
1597
|
-
*/
|
|
1598
|
-
declare function SearchRoot({ children, hook, className }: SearchRootProps): react_jsx_runtime.JSX.Element;
|
|
1599
|
-
|
|
1600
|
-
interface SearchInputProps {
|
|
1601
|
-
placeholder?: string;
|
|
1602
|
-
className?: string;
|
|
1603
|
-
disabled?: boolean;
|
|
1604
|
-
showIcon?: boolean;
|
|
1605
|
-
showClearButton?: boolean;
|
|
1606
|
-
onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
1607
|
-
}
|
|
1608
|
-
/**
|
|
1609
|
-
* Search input component using modern shadcn InputGroup pattern
|
|
1610
|
-
*
|
|
1611
|
-
* @example
|
|
1612
|
-
* <Search.Input placeholder="Search..." />
|
|
1613
|
-
*/
|
|
1614
|
-
declare function SearchInput({ placeholder, className, disabled, showIcon, showClearButton, onKeyDown, ...props }: SearchInputProps): react_jsx_runtime.JSX.Element;
|
|
1615
|
-
|
|
1616
|
-
interface SearchTypeOption {
|
|
1617
|
-
value: string;
|
|
1618
|
-
label: string;
|
|
1619
|
-
}
|
|
1620
|
-
interface SearchTypeInputProps {
|
|
1621
|
-
placeholder?: string;
|
|
1622
|
-
className?: string;
|
|
1623
|
-
disabled?: boolean;
|
|
1624
|
-
showIcon?: boolean;
|
|
1625
|
-
showClearButton?: boolean;
|
|
1626
|
-
searchTypeOptions?: SearchTypeOption[];
|
|
1627
|
-
onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
1628
|
-
}
|
|
1629
|
-
/**
|
|
1630
|
-
* Search input component with type selector using InputGroup pattern
|
|
1631
|
-
*
|
|
1632
|
-
* @example
|
|
1633
|
-
* <Search.TypeInput
|
|
1634
|
-
* placeholder="Search..."
|
|
1635
|
-
* searchTypeOptions={[
|
|
1636
|
-
* { value: "_id", label: "ID" },
|
|
1637
|
-
* { value: "customerPhone", label: "Phone" },
|
|
1638
|
-
* { value: "customerEmail", label: "Email" },
|
|
1639
|
-
* ]}
|
|
1640
|
-
* />
|
|
1641
|
-
*/
|
|
1642
|
-
declare function SearchTypeInput({ placeholder, className, disabled, showIcon, showClearButton, searchTypeOptions, onKeyDown, ...props }: SearchTypeInputProps): react_jsx_runtime.JSX.Element;
|
|
1643
|
-
|
|
1644
|
-
interface SearchFiltersProps {
|
|
1645
|
-
children: ReactNode;
|
|
1646
|
-
title?: string;
|
|
1647
|
-
description?: string;
|
|
1648
|
-
disabled?: boolean;
|
|
1649
|
-
className?: string;
|
|
1650
|
-
}
|
|
1651
|
-
/**
|
|
1652
|
-
* Search filters component with mobile sheet support
|
|
1653
|
-
*
|
|
1654
|
-
* @example
|
|
1655
|
-
* <Search.Filters>
|
|
1656
|
-
* <TagChoiceInput label="Category" ... />
|
|
1657
|
-
* <SelectInput label="Status" ... />
|
|
1658
|
-
* </Search.Filters>
|
|
1659
|
-
*/
|
|
1660
|
-
declare function SearchFilters({ children, title, description, disabled, className, }: SearchFiltersProps): react_jsx_runtime.JSX.Element;
|
|
1661
|
-
|
|
1662
|
-
interface SearchActionsProps {
|
|
1663
|
-
showSearchButton?: boolean;
|
|
1664
|
-
showClearButton?: boolean;
|
|
1665
|
-
searchButtonText?: string;
|
|
1666
|
-
clearButtonText?: string;
|
|
1667
|
-
disabled?: boolean;
|
|
1668
|
-
className?: string;
|
|
1669
|
-
}
|
|
1670
|
-
/**
|
|
1671
|
-
* Search action buttons
|
|
1672
|
-
*/
|
|
1673
|
-
declare function SearchActions({ showSearchButton, showClearButton, searchButtonText, clearButtonText, disabled, className, }: SearchActionsProps): react_jsx_runtime.JSX.Element;
|
|
1674
|
-
|
|
1675
|
-
interface SearchContainerProps {
|
|
1676
|
-
children: ReactNode;
|
|
1677
|
-
className?: string;
|
|
1678
|
-
}
|
|
1679
|
-
/**
|
|
1680
|
-
* Container for search input and action buttons
|
|
1681
|
-
* Provides responsive layout
|
|
1682
|
-
*
|
|
1683
|
-
* @example
|
|
1684
|
-
* <Search.Container>
|
|
1685
|
-
* <Search.Input />
|
|
1686
|
-
* <Search.Filters />
|
|
1687
|
-
* <Search.Actions />
|
|
1688
|
-
* </Search.Container>
|
|
1689
|
-
*/
|
|
1690
|
-
declare function SearchContainer({ children, className }: SearchContainerProps): react_jsx_runtime.JSX.Element;
|
|
1691
|
-
|
|
1692
|
-
interface SearchFilterActionsProps {
|
|
1693
|
-
onClose?: () => void;
|
|
1694
|
-
disabled?: boolean;
|
|
1695
|
-
}
|
|
1696
|
-
/**
|
|
1697
|
-
* Filter actions component (Reset/Apply buttons)
|
|
1698
|
-
* Used inside filter popovers/sheets
|
|
1699
|
-
*/
|
|
1700
|
-
declare function SearchFilterActions({ onClose, disabled }: SearchFilterActionsProps): react_jsx_runtime.JSX.Element;
|
|
1701
|
-
|
|
1702
|
-
interface SearchProviderProps {
|
|
1703
|
-
children: ReactNode;
|
|
1704
|
-
value: UseBaseSearchReturn;
|
|
1705
|
-
}
|
|
1706
|
-
declare function SearchProvider({ children, value }: SearchProviderProps): react_jsx_runtime.JSX.Element;
|
|
1707
|
-
declare function useSearch(): UseBaseSearchReturn;
|
|
1708
|
-
|
|
1709
|
-
/**
|
|
1710
|
-
* Composable Search Component System
|
|
1711
|
-
*
|
|
1712
|
-
* @example
|
|
1713
|
-
* ```tsx
|
|
1714
|
-
* import { Search } from "@classytic/fluid";
|
|
1715
|
-
*
|
|
1716
|
-
* function MySearch() {
|
|
1717
|
-
* const searchHook = useMySearch();
|
|
1718
|
-
*
|
|
1719
|
-
* return (
|
|
1720
|
-
* <Search.Root hook={searchHook}>
|
|
1721
|
-
* <Search.Container>
|
|
1722
|
-
* <Search.Input placeholder="Search..." />
|
|
1723
|
-
* <Search.Filters>
|
|
1724
|
-
* <SelectInput ... />
|
|
1725
|
-
* <TagChoiceInput ... />
|
|
1726
|
-
* </Search.Filters>
|
|
1727
|
-
* <Search.Actions />
|
|
1728
|
-
* </Search.Container>
|
|
1729
|
-
* </Search.Root>
|
|
1730
|
-
* );
|
|
1731
|
-
* }
|
|
1732
|
-
* ```
|
|
1733
|
-
*/
|
|
1734
|
-
|
|
1735
|
-
type index_SearchActionsProps = SearchActionsProps;
|
|
1736
|
-
type index_SearchContainerProps = SearchContainerProps;
|
|
1737
|
-
type index_SearchFilterActionsProps = SearchFilterActionsProps;
|
|
1738
|
-
type index_SearchFiltersProps = SearchFiltersProps;
|
|
1739
|
-
type index_SearchInputProps = SearchInputProps;
|
|
1740
|
-
declare const index_SearchProvider: typeof SearchProvider;
|
|
1741
|
-
type index_SearchProviderProps = SearchProviderProps;
|
|
1742
|
-
type index_SearchRootProps = SearchRootProps;
|
|
1743
|
-
type index_SearchTypeInputProps = SearchTypeInputProps;
|
|
1744
|
-
type index_SearchTypeOption = SearchTypeOption;
|
|
1745
|
-
declare const index_useSearch: typeof useSearch;
|
|
1746
|
-
declare namespace index {
|
|
1747
|
-
export { SearchActions as Actions, SearchContainer as Container, SearchFilterActions as FilterActions, SearchFilters as Filters, SearchInput as Input, SearchRoot as Root, type index_SearchActionsProps as SearchActionsProps, type index_SearchContainerProps as SearchContainerProps, type index_SearchFilterActionsProps as SearchFilterActionsProps, type index_SearchFiltersProps as SearchFiltersProps, type index_SearchInputProps as SearchInputProps, index_SearchProvider as SearchProvider, type index_SearchProviderProps as SearchProviderProps, type index_SearchRootProps as SearchRootProps, type index_SearchTypeInputProps as SearchTypeInputProps, type index_SearchTypeOption as SearchTypeOption, SearchTypeInput as TypeInput, index_useSearch as useSearch };
|
|
1748
|
-
}
|
|
1749
|
-
|
|
1750
|
-
interface FieldRootProps {
|
|
1751
|
-
children: ReactNode;
|
|
1752
|
-
className?: string;
|
|
1753
|
-
disabled?: boolean;
|
|
1754
|
-
invalid?: boolean;
|
|
1755
|
-
}
|
|
1756
|
-
interface FieldLabelProps {
|
|
1757
|
-
children: ReactNode;
|
|
1758
|
-
className?: string;
|
|
1759
|
-
}
|
|
1760
|
-
interface FieldErrorProps {
|
|
1761
|
-
children?: ReactNode;
|
|
1762
|
-
className?: string;
|
|
1763
|
-
}
|
|
1764
|
-
interface FieldIconProps {
|
|
1765
|
-
children: ReactNode;
|
|
1766
|
-
className?: string;
|
|
1767
|
-
}
|
|
1768
|
-
declare const Field: {
|
|
1769
|
-
Root: React__default.NamedExoticComponent<FieldRootProps>;
|
|
1770
|
-
Label: React__default.NamedExoticComponent<FieldLabelProps>;
|
|
1771
|
-
Error: React__default.NamedExoticComponent<FieldErrorProps>;
|
|
1772
|
-
Icon: React__default.NamedExoticComponent<FieldIconProps>;
|
|
1773
|
-
};
|
|
1774
|
-
|
|
1775
|
-
interface CompactInputProps<T extends FieldValues = FieldValues> extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChange"> {
|
|
1776
|
-
control?: Control<T>;
|
|
1777
|
-
name?: Path<T>;
|
|
1778
|
-
description?: string;
|
|
1779
|
-
required?: boolean;
|
|
1780
|
-
label?: string;
|
|
1781
|
-
placeholder?: string;
|
|
1782
|
-
disabled?: boolean;
|
|
1783
|
-
type?: string;
|
|
1784
|
-
AddonLeft?: ReactNode;
|
|
1785
|
-
AddonRight?: ReactNode;
|
|
1786
|
-
inputClassName?: string;
|
|
1787
|
-
onValueChange?: (value: string) => void;
|
|
1788
|
-
value?: string;
|
|
1789
|
-
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
1790
|
-
error?: string;
|
|
1791
|
-
}
|
|
1792
|
-
/**
|
|
1793
|
-
* CompactInput - Enhanced form input with InputGroup support
|
|
1794
|
-
*
|
|
1795
|
-
* Features:
|
|
1796
|
-
* - Floating label design
|
|
1797
|
-
* - InputGroup support with icons, buttons, and text addons
|
|
1798
|
-
* - Controller integration for react-hook-form
|
|
1799
|
-
* - Direct usage without form
|
|
1800
|
-
*/
|
|
1801
|
-
declare const CompactInput: React$1.ForwardRefExoticComponent<CompactInputProps<FieldValues> & React$1.RefAttributes<HTMLInputElement>>;
|
|
1802
|
-
|
|
1803
|
-
interface CompactTextareaProps<T extends FieldValues = FieldValues> extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange"> {
|
|
1804
|
-
control?: Control<T>;
|
|
1805
|
-
name?: Path<T>;
|
|
1806
|
-
description?: string;
|
|
1807
|
-
required?: boolean;
|
|
1808
|
-
label?: string;
|
|
1809
|
-
placeholder?: string;
|
|
1810
|
-
disabled?: boolean;
|
|
1811
|
-
rows?: number;
|
|
1812
|
-
AddonLeft?: ReactNode;
|
|
1813
|
-
AddonRight?: ReactNode;
|
|
1814
|
-
inputClassName?: string;
|
|
1815
|
-
onValueChange?: (value: string) => void;
|
|
1816
|
-
value?: string;
|
|
1817
|
-
onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void;
|
|
1818
|
-
error?: string;
|
|
1819
|
-
}
|
|
1820
|
-
/**
|
|
1821
|
-
* CompactTextarea - Enhanced textarea with InputGroup support
|
|
1822
|
-
*
|
|
1823
|
-
* Features:
|
|
1824
|
-
* - Floating label design
|
|
1825
|
-
* - InputGroup support with addons
|
|
1826
|
-
* - Character counter with maxLength
|
|
1827
|
-
* - Controller integration for react-hook-form
|
|
1828
|
-
* - Direct usage without form
|
|
1829
|
-
*/
|
|
1830
|
-
declare const CompactTextarea: React$1.ForwardRefExoticComponent<CompactTextareaProps<FieldValues> & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
1831
|
-
|
|
1832
|
-
interface SelectOption {
|
|
1833
|
-
value: string;
|
|
1834
|
-
label: string;
|
|
1835
|
-
}
|
|
1836
|
-
interface CompactSelectProps<T extends FieldValues = FieldValues> {
|
|
1837
|
-
control?: Control<T>;
|
|
1838
|
-
name?: Path<T>;
|
|
1839
|
-
description?: string;
|
|
1840
|
-
required?: boolean;
|
|
1841
|
-
label?: string;
|
|
1842
|
-
placeholder?: string;
|
|
1843
|
-
disabled?: boolean;
|
|
1844
|
-
items?: SelectOption[];
|
|
1845
|
-
className?: string;
|
|
1846
|
-
onValueChange?: (value: string) => void;
|
|
1847
|
-
value?: string;
|
|
1848
|
-
error?: string;
|
|
1849
|
-
}
|
|
1850
|
-
/**
|
|
1851
|
-
* CompactSelect - Simple, clean select dropdown
|
|
1852
|
-
*
|
|
1853
|
-
* @example
|
|
1854
|
-
* <CompactSelect
|
|
1855
|
-
* label="Status"
|
|
1856
|
-
* items={[
|
|
1857
|
-
* { value: "active", label: "Active" },
|
|
1858
|
-
* { value: "inactive", label: "Inactive" }
|
|
1859
|
-
* ]}
|
|
1860
|
-
* />
|
|
1861
|
-
*/
|
|
1862
|
-
declare const CompactSelect: React$1.ForwardRefExoticComponent<CompactSelectProps<FieldValues> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1863
|
-
|
|
1864
|
-
interface CompactNumberInputProps<T extends FieldValues = FieldValues> {
|
|
1865
|
-
control?: Control<T>;
|
|
1866
|
-
name?: Path<T>;
|
|
1867
|
-
description?: string;
|
|
1868
|
-
required?: boolean;
|
|
1869
|
-
label?: string;
|
|
1870
|
-
placeholder?: string;
|
|
1871
|
-
disabled?: boolean;
|
|
1872
|
-
min?: number;
|
|
1873
|
-
max?: number;
|
|
1874
|
-
step?: number;
|
|
1875
|
-
prefix?: ReactNode;
|
|
1876
|
-
suffix?: ReactNode;
|
|
1877
|
-
showButtons?: boolean;
|
|
1878
|
-
buttonVariant?: "ghost" | "outline" | "default";
|
|
1879
|
-
className?: string;
|
|
1880
|
-
inputClassName?: string;
|
|
1881
|
-
labelClassName?: string;
|
|
1882
|
-
containerClassName?: string;
|
|
1883
|
-
onValueChange?: (value: number | string) => void;
|
|
1884
|
-
value?: number | string;
|
|
1885
|
-
defaultValue?: number | string;
|
|
1886
|
-
onChange?: (value: number | string) => void;
|
|
1887
|
-
error?: string;
|
|
1888
|
-
}
|
|
1889
|
-
/**
|
|
1890
|
-
* CompactNumberInput - A space-efficient number input with optional increment/decrement buttons
|
|
1891
|
-
*
|
|
1892
|
-
* Features:
|
|
1893
|
-
* - Floating label design
|
|
1894
|
-
* - Optional increment/decrement buttons
|
|
1895
|
-
* - Support for min/max/step values
|
|
1896
|
-
* - Prefix/suffix support
|
|
1897
|
-
* - Form integration via control prop
|
|
1898
|
-
* - Direct usage without form
|
|
1899
|
-
*/
|
|
1900
|
-
declare const CompactNumberInput: React$1.ForwardRefExoticComponent<CompactNumberInputProps<FieldValues> & React$1.RefAttributes<HTMLInputElement>>;
|
|
1901
|
-
|
|
1902
|
-
interface Choice {
|
|
1903
|
-
value: string;
|
|
1904
|
-
label: string;
|
|
1905
|
-
}
|
|
1906
|
-
interface CompactTagChoiceProps<T extends FieldValues = FieldValues> {
|
|
1907
|
-
control?: Control<T>;
|
|
1908
|
-
name?: Path<T>;
|
|
1909
|
-
label?: string;
|
|
1910
|
-
description?: string;
|
|
1911
|
-
placeholder?: string;
|
|
1912
|
-
required?: boolean;
|
|
1913
|
-
disabled?: boolean;
|
|
1914
|
-
choices?: Choice[];
|
|
1915
|
-
maxSelections?: number;
|
|
1916
|
-
className?: string;
|
|
1917
|
-
containerClassName?: string;
|
|
1918
|
-
labelClassName?: string;
|
|
1919
|
-
inputClassName?: string;
|
|
1920
|
-
value?: string[];
|
|
1921
|
-
onChange?: (value: string[]) => void;
|
|
1922
|
-
onValueChange?: (value: string[]) => void;
|
|
1923
|
-
error?: string;
|
|
1924
|
-
}
|
|
1925
|
-
/**
|
|
1926
|
-
* CompactTagChoice - A compact tag selection input
|
|
1927
|
-
*
|
|
1928
|
-
* Features:
|
|
1929
|
-
* - Multi-select tag interface
|
|
1930
|
-
* - Maximum selection limit
|
|
1931
|
-
* - Popover for selecting options
|
|
1932
|
-
* - Form integration via control prop
|
|
1933
|
-
* - Direct usage without form
|
|
1934
|
-
*/
|
|
1935
|
-
declare const CompactTagChoice: React$1.ForwardRefExoticComponent<CompactTagChoiceProps<FieldValues> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1936
|
-
|
|
1937
|
-
/**
|
|
1938
|
-
* Generates a URL-friendly slug from a string
|
|
1939
|
-
*/
|
|
1940
|
-
declare function generateSlug(text: string): string;
|
|
1941
|
-
interface CompactSlugFieldProps<T extends FieldValues = FieldValues> {
|
|
1942
|
-
control?: Control<T>;
|
|
1943
|
-
name?: Path<T>;
|
|
1944
|
-
description?: string;
|
|
1945
|
-
required?: boolean;
|
|
1946
|
-
label?: string;
|
|
1947
|
-
placeholder?: string;
|
|
1948
|
-
disabled?: boolean;
|
|
1949
|
-
icon?: ReactNode;
|
|
1950
|
-
sourceValue?: string;
|
|
1951
|
-
onGenerate?: (source: string) => string;
|
|
1952
|
-
className?: string;
|
|
1953
|
-
inputClassName?: string;
|
|
1954
|
-
onValueChange?: (value: string) => void;
|
|
1955
|
-
value?: string;
|
|
1956
|
-
onChange?: (e: ChangeEvent<HTMLInputElement> | {
|
|
1957
|
-
target: {
|
|
1958
|
-
value: string;
|
|
1959
|
-
};
|
|
1960
|
-
}) => void;
|
|
1961
|
-
error?: string;
|
|
1962
|
-
}
|
|
1963
|
-
/**
|
|
1964
|
-
* CompactSlugField - Compact slug input with auto-generation
|
|
1965
|
-
*
|
|
1966
|
-
* Features:
|
|
1967
|
-
* - Compact design with floating label
|
|
1968
|
-
* - Auto-generate slug from source field
|
|
1969
|
-
* - Manual editing support
|
|
1970
|
-
* - InputGroup with generate button
|
|
1971
|
-
* - Form integration via control prop
|
|
1972
|
-
*/
|
|
1973
|
-
declare const CompactSlugField: React$1.ForwardRefExoticComponent<CompactSlugFieldProps<FieldValues> & React$1.RefAttributes<HTMLInputElement>>;
|
|
1945
|
+
declare function DateRangeInput<TFieldValues extends FieldValues = FieldValues>({ control, name, label, description, placeholder, required, disabled, className, labelClassName, buttonClassName, calendarClassName, minDate, maxDate, disabledDates, disabledDays, onValueChange, validateDateRange, clearErrors, descriptionComponent, allowClear, showBadge, Icon, transform, }: DateRangeInputProps<TFieldValues>): react_jsx_runtime.JSX.Element;
|
|
1974
1946
|
|
|
1975
1947
|
interface CalendarEvent {
|
|
1976
1948
|
id: string;
|
|
@@ -2043,4 +2015,127 @@ interface CalendarWithDetailProps<T extends CalendarEvent> extends Omit<EventCal
|
|
|
2043
2015
|
}
|
|
2044
2016
|
declare function CalendarWithDetail<T extends CalendarEvent>({ renderDetail, detailTitle, detailEmptyMessage, layout, detailPosition, onDateSelect, ...calendarProps }: CalendarWithDetailProps<T>): react_jsx_runtime.JSX.Element;
|
|
2045
2017
|
|
|
2046
|
-
|
|
2018
|
+
/** Available entrance animation types */
|
|
2019
|
+
type Animation = "fadeIn" | "fadeInUp" | "scaleIn" | "slideInLeft" | "slideInRight" | "slideInUp" | "slideInDown";
|
|
2020
|
+
/** Slide direction for SlideIn component */
|
|
2021
|
+
type SlideDirection = "left" | "right" | "up" | "down";
|
|
2022
|
+
/** Options for the useInView hook */
|
|
2023
|
+
interface UseInViewOptions {
|
|
2024
|
+
/** IntersectionObserver rootMargin (default: "0px") */
|
|
2025
|
+
margin?: string;
|
|
2026
|
+
/** Trigger only once (default: true) */
|
|
2027
|
+
once?: boolean;
|
|
2028
|
+
/** Enable/disable observation (default: true) */
|
|
2029
|
+
enabled?: boolean;
|
|
2030
|
+
}
|
|
2031
|
+
/** Shared base props for animation components */
|
|
2032
|
+
interface AnimateBaseProps {
|
|
2033
|
+
children?: ReactNode;
|
|
2034
|
+
/** Delay in ms before animation starts */
|
|
2035
|
+
delay?: number;
|
|
2036
|
+
/** Animation duration in ms */
|
|
2037
|
+
duration?: number;
|
|
2038
|
+
/** Only animate when element scrolls into viewport */
|
|
2039
|
+
inView?: boolean;
|
|
2040
|
+
/** IntersectionObserver rootMargin for inView trigger */
|
|
2041
|
+
inViewMargin?: string;
|
|
2042
|
+
/** Fire animation only once (default: true) */
|
|
2043
|
+
once?: boolean;
|
|
2044
|
+
/** Disable animation entirely — renders children immediately */
|
|
2045
|
+
disabled?: boolean;
|
|
2046
|
+
className?: string;
|
|
2047
|
+
/** HTML element to render as (default: "div") */
|
|
2048
|
+
as?: ElementType;
|
|
2049
|
+
}
|
|
2050
|
+
interface SlideInProps extends AnimateBaseProps {
|
|
2051
|
+
/** Direction to slide from */
|
|
2052
|
+
direction?: SlideDirection;
|
|
2053
|
+
}
|
|
2054
|
+
interface StaggerChildrenProps {
|
|
2055
|
+
children?: ReactNode;
|
|
2056
|
+
/** Animation type for each child */
|
|
2057
|
+
animation?: Animation;
|
|
2058
|
+
/** Delay between each child in ms */
|
|
2059
|
+
staggerDelay?: number;
|
|
2060
|
+
/** Initial delay before first child animates */
|
|
2061
|
+
initialDelay?: number;
|
|
2062
|
+
/** Duration per child animation */
|
|
2063
|
+
duration?: number;
|
|
2064
|
+
inView?: boolean;
|
|
2065
|
+
inViewMargin?: string;
|
|
2066
|
+
once?: boolean;
|
|
2067
|
+
disabled?: boolean;
|
|
2068
|
+
className?: string;
|
|
2069
|
+
/** Extra classes applied to each child wrapper div */
|
|
2070
|
+
childClassName?: string;
|
|
2071
|
+
as?: ElementType;
|
|
2072
|
+
}
|
|
2073
|
+
interface AnimatedTextProps {
|
|
2074
|
+
/** The text string to animate */
|
|
2075
|
+
text: string;
|
|
2076
|
+
as?: ElementType;
|
|
2077
|
+
animation?: Animation;
|
|
2078
|
+
/** Split text by word or character */
|
|
2079
|
+
splitBy?: "word" | "character";
|
|
2080
|
+
/** Delay between each segment in ms */
|
|
2081
|
+
staggerDelay?: number;
|
|
2082
|
+
delay?: number;
|
|
2083
|
+
duration?: number;
|
|
2084
|
+
inView?: boolean;
|
|
2085
|
+
inViewMargin?: string;
|
|
2086
|
+
once?: boolean;
|
|
2087
|
+
disabled?: boolean;
|
|
2088
|
+
className?: string;
|
|
2089
|
+
/** Extra classes on each animated text segment */
|
|
2090
|
+
segmentClassName?: string;
|
|
2091
|
+
}
|
|
2092
|
+
interface AnimatedCounterProps {
|
|
2093
|
+
/** Start value (default: 0) */
|
|
2094
|
+
from?: number;
|
|
2095
|
+
/** Target value to count to */
|
|
2096
|
+
to: number;
|
|
2097
|
+
/** Count-up duration in ms (default: 2000) */
|
|
2098
|
+
duration?: number;
|
|
2099
|
+
/** Delay before counting starts in ms */
|
|
2100
|
+
delay?: number;
|
|
2101
|
+
/** Intl.NumberFormat locale for number formatting (e.g. "en-US") */
|
|
2102
|
+
locale?: string;
|
|
2103
|
+
/** Text rendered before the number */
|
|
2104
|
+
prefix?: string;
|
|
2105
|
+
/** Text rendered after the number */
|
|
2106
|
+
suffix?: string;
|
|
2107
|
+
/** Decimal places (default: 0) */
|
|
2108
|
+
decimals?: number;
|
|
2109
|
+
/** Custom number formatter — overrides locale/decimals */
|
|
2110
|
+
formatter?: (value: number) => string;
|
|
2111
|
+
inView?: boolean;
|
|
2112
|
+
inViewMargin?: string;
|
|
2113
|
+
once?: boolean;
|
|
2114
|
+
disabled?: boolean;
|
|
2115
|
+
className?: string;
|
|
2116
|
+
as?: ElementType;
|
|
2117
|
+
}
|
|
2118
|
+
/**
|
|
2119
|
+
* useInView — observe when an element enters the viewport.
|
|
2120
|
+
*
|
|
2121
|
+
* @example
|
|
2122
|
+
* ```tsx
|
|
2123
|
+
* const ref = useRef<HTMLDivElement>(null);
|
|
2124
|
+
* const isInView = useInView(ref, { once: true, margin: "-100px" });
|
|
2125
|
+
* return <div ref={ref}>{isInView ? "Visible!" : "Hidden"}</div>;
|
|
2126
|
+
* ```
|
|
2127
|
+
*/
|
|
2128
|
+
declare function useInView(ref: RefObject<Element | null>, options?: UseInViewOptions): boolean;
|
|
2129
|
+
/** Fade in with opacity transition */
|
|
2130
|
+
declare function FadeIn(props: AnimateBaseProps): react_jsx_runtime.JSX.Element;
|
|
2131
|
+
/** Fade in with upward motion */
|
|
2132
|
+
declare function FadeInUp(props: AnimateBaseProps): react_jsx_runtime.JSX.Element;
|
|
2133
|
+
/** Scale up into view */
|
|
2134
|
+
declare function ScaleIn(props: AnimateBaseProps): react_jsx_runtime.JSX.Element;
|
|
2135
|
+
/** Slide in from a specified direction */
|
|
2136
|
+
declare function SlideIn({ direction, ...props }: SlideInProps): react_jsx_runtime.JSX.Element;
|
|
2137
|
+
declare function StaggerChildren({ children, animation, staggerDelay, initialDelay, duration, inView, inViewMargin, once, disabled, className, childClassName, as, }: StaggerChildrenProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
2138
|
+
declare function AnimatedText({ text, as, animation, splitBy, staggerDelay, delay, duration, inView, inViewMargin, once, disabled, className, segmentClassName, }: AnimatedTextProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
2139
|
+
declare function AnimatedCounter({ from, to, duration, delay, locale, prefix, suffix, decimals, formatter, inView, inViewMargin, once, disabled, className, as, }: AnimatedCounterProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
2140
|
+
|
|
2141
|
+
export { AccordionSection, type AccordionSectionProps, ActionDropdown, type ActionDropdownItem, type ActionDropdownProps, ActionTooltip, type ActionTooltipProps, type AnimateBaseProps, AnimatedCounter, type AnimatedCounterProps, AnimatedText, type AnimatedTextProps, type Animation, ApiPagination, type ApiPaginationData, type ApiPaginationProps, ButtonTooltip, type ButtonTooltipProps, CalendarDayDetail, type CalendarDayDetailProps, type CalendarEvent, CalendarWithDetail, type CalendarWithDetailProps, CardWrapper, type CardWrapperProps, CheckboxDropdown, type CheckboxDropdownProps, CheckboxInput, type CheckboxInputProps, type CheckboxItem, ClientSubmitButton, type ClientSubmitButtonProps, CollapsibleCard, type CollapsibleCardProps, CollapsibleSection, type CollapsibleSectionProps, CollapsibleWrapper, type CollapsibleWrapperProps, ComboboxInput, type ComboboxInputProps, type ComboboxOption, ConfirmDialog, type ConfirmDialogProps, ConfirmSheet, type ConfirmSheetProps, CopyButton, type CopyButtonProps, CopyCodeBlock, type CopyCodeBlockProps, CopyText, type CopyTextProps, CustomPagination, type CustomPaginationProps, DEFAULT_COUNTRIES, DataCard, type DataCardProps, DataTable, type DataTablePaginationProps, type DataTableProps, DateInput, type DateInputProps, type DateRange, DateRangeFilter, type DateRangeFilterProps, DateRangeInput, type DateRangeInputProps, type DateRangeValue, DeleteConfirmDialog, type DeleteConfirmDialogProps, DialogWrapper, type DialogWrapperProps, DisplayHeading, type DisplayHeadingProps, DraggableCard, type DraggableCardProps, DropdownWrapper, type DropdownWrapperProps, type DynamicTabItem, DynamicTabs, type DynamicTabsProps, EmptyState, EmptyStateNoData, EmptyStateNoResults, EmptyStateNotFound, type EmptyStatePresetProps, type EmptyStateProps, ErrorState, ErrorStateInline, type ErrorStateInlineProps, type ErrorStateProps, EventCalendar, type EventCalendarProps, FacebookIcon, FadeIn, FadeInUp, FaqAccordion, type FaqAccordionProps, type FaqItem, FeatureItem, type FeatureItemProps, FeatureList, type FeatureListItem, type FeatureListProps, FormDialog, type FormDialogProps, FormErrorSummary, type FormErrorSummaryProps, FormInput, type FormInputProps, FormSheet, type FormSheetProps, FormTextarea, type FormTextareaProps, GoogleIcon, IconItemMedia, type IconItemMediaProps, IconTooltip, type IconTooltipProps, InfoAlert, type InfoAlertProps, InfoRow, type InfoRowProps, InfoTooltip, type InfoTooltipProps, InstagramIcon, LoadingCard, type LoadingCardProps, LoadingOverlay, type LoadingOverlayProps, LoadingState, type LoadingStateProps, ModeToggle, PaginationInfo, type PaginationInfoProps, type PhoneCountry, PhoneInput, type PhoneInputProps, Pill, PillAvatar, PillAvatarGroup, type PillAvatarGroupProps, type PillAvatarProps, PillButton, type PillButtonProps, PillDelta, type PillDeltaProps, PillIcon, type PillIconProps, PillIndicator, type PillIndicatorProps, type PillProps, PillStatus, type PillStatusProps, type RadioChoice, RadioDropdown, type RadioDropdownProps, RadioInput, type RadioInputProps, ResponsiveSplitLayout, type ResponsiveSplitLayoutProps, ScaleIn, SelectDropdown, type SelectDropdownOption, type SelectDropdownProps, SelectInput, type SelectInputProps, type SelectOption, type SelectOptionGroup, SheetWrapper, type SheetWrapperProps, SimpleTable, type SimpleTableProps, SkeletonCard, type SkeletonCardProps, SkeletonGrid, type SkeletonGridProps, SkeletonList, type SkeletonListProps, SkeletonTable, type SkeletonTableProps, type SlideDirection, SlideIn, type SlideInProps, SlugField, type SlugFieldProps, StaggerChildren, type StaggerChildrenProps, StatsCard, type StatsCardProps, StatusBanner, type StatusBannerProps, type StatusBannerVariant, StepContent, type StepContentProps, Stepper, type StepperProps, type StepperStep, SwitchInput, type SwitchInputProps, TTL, TabContent, type TabContentProps, TabTrigger, type TabTriggerProps, TableWrapper, type TableWrapperColumn, type TableWrapperEmptyState, type TableWrapperProps, TabsWrapper, type TabsWrapperProps, TagChoiceInput, type TagChoiceInputProps, type TagChoiceItem, TagInput, type TagInputProps, Thumbnail, type ThumbnailProps, TooltipWrapper, type TooltipWrapperProps, TwitterXIcon, type UseCopyToClipboardReturn, type UseInViewOptions, WhatsAppIcon, clearStorage, generateSlug, generateUUID, getStorageItem, isStorageEmpty, removeStorageItem, setStorageItem, storage, useCopyToClipboard, useDebounce, useDebouncedCallback, useInView, useIsMobile, useLocalStorage, useMediaQuery, useScrollDetection };
|