@classytic/fluid 0.1.2 → 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 +586 -507
- package/dist/index.js +1656 -2211
- 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,89 +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';
|
|
10
11
|
export { Container, ContainerProps, Section, SectionProps } from './layout.js';
|
|
11
12
|
import 'clsx';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
|
-
*
|
|
15
|
-
* Simplified approach since backend handles all operator parsing
|
|
15
|
+
* A utility module for handling localStorage operations with error handling and SSR safety
|
|
16
16
|
*/
|
|
17
|
-
interface FilterConfig {
|
|
18
|
-
paramName: string;
|
|
19
|
-
type?: "array" | "string" | "number" | "boolean";
|
|
20
|
-
defaultValue?: unknown;
|
|
21
|
-
}
|
|
22
|
-
interface SearchConfig {
|
|
23
|
-
basePath: string;
|
|
24
|
-
searchFields?: Record<string, string>;
|
|
25
|
-
filterFields?: Record<string, FilterConfig>;
|
|
26
|
-
defaultSearchType?: string;
|
|
27
|
-
}
|
|
28
17
|
/**
|
|
29
|
-
*
|
|
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
|
|
30
22
|
*/
|
|
31
|
-
declare
|
|
23
|
+
declare const getStorageItem: <T>(key: string, defaultValue?: T | null) => T | null;
|
|
32
24
|
/**
|
|
33
|
-
*
|
|
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
|
|
34
30
|
*/
|
|
35
|
-
declare
|
|
31
|
+
declare const setStorageItem: <T>(key: string, value: T, ttl?: number | null) => boolean;
|
|
36
32
|
/**
|
|
37
|
-
*
|
|
33
|
+
* Removes an item from localStorage
|
|
34
|
+
* @param {string} key - The key to remove from localStorage
|
|
35
|
+
* @returns {boolean} Success status
|
|
38
36
|
*/
|
|
39
|
-
declare
|
|
37
|
+
declare const removeStorageItem: (key: string) => boolean;
|
|
40
38
|
/**
|
|
41
|
-
*
|
|
39
|
+
* Clears all items from localStorage
|
|
40
|
+
* @returns {boolean} Success status
|
|
42
41
|
*/
|
|
43
|
-
declare
|
|
42
|
+
declare const clearStorage: () => boolean;
|
|
44
43
|
/**
|
|
45
|
-
*
|
|
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
|
|
46
47
|
*/
|
|
47
|
-
declare
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
updateFilter: (key: string, value: unknown) => void;
|
|
65
|
-
handleSearch: () => void;
|
|
66
|
-
clearSearch: () => void;
|
|
67
|
-
getSearchParams: () => Record<string, string>;
|
|
68
|
-
hasActiveSearch: boolean;
|
|
69
|
-
hasActiveFilters: boolean;
|
|
70
|
-
}
|
|
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
|
+
};
|
|
71
65
|
/**
|
|
72
|
-
*
|
|
73
|
-
* Can be extended by specific search hooks for different entities
|
|
74
|
-
* Supports bracket syntax: field[operator]=value
|
|
66
|
+
* Shorthand object for all localStorage operations
|
|
75
67
|
*/
|
|
76
|
-
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;
|
|
77
85
|
|
|
78
86
|
declare function useMediaQuery(query: string, defaultValue?: boolean): boolean;
|
|
79
87
|
|
|
80
88
|
declare const useScrollDetection: (ref: RefObject<HTMLDivElement | null>, delay?: number) => {
|
|
81
|
-
checkScroll: () =>
|
|
89
|
+
checkScroll: () => void;
|
|
82
90
|
canScrollLeft: boolean;
|
|
83
91
|
canScrollRight: boolean;
|
|
84
92
|
isScrollable: boolean;
|
|
85
93
|
};
|
|
86
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
|
+
|
|
87
164
|
interface AccordionSectionProps {
|
|
88
165
|
title: string;
|
|
89
166
|
icon?: ReactNode;
|
|
@@ -102,7 +179,7 @@ interface AccordionSectionProps {
|
|
|
102
179
|
* </AccordionSection>
|
|
103
180
|
* ```
|
|
104
181
|
*/
|
|
105
|
-
declare const AccordionSection: React
|
|
182
|
+
declare const AccordionSection: React.NamedExoticComponent<AccordionSectionProps>;
|
|
106
183
|
interface FaqItem {
|
|
107
184
|
id: string;
|
|
108
185
|
question: string;
|
|
@@ -113,7 +190,7 @@ interface FaqAccordionProps {
|
|
|
113
190
|
defaultOpen?: string;
|
|
114
191
|
className?: string;
|
|
115
192
|
/** Allow multiple items to be open at once */
|
|
116
|
-
|
|
193
|
+
multiple?: boolean;
|
|
117
194
|
}
|
|
118
195
|
/**
|
|
119
196
|
* FaqAccordion - FAQ-style accordion where only one item can be open by default
|
|
@@ -128,7 +205,7 @@ interface FaqAccordionProps {
|
|
|
128
205
|
* />
|
|
129
206
|
* ```
|
|
130
207
|
*/
|
|
131
|
-
declare const FaqAccordion: React
|
|
208
|
+
declare const FaqAccordion: React.NamedExoticComponent<FaqAccordionProps>;
|
|
132
209
|
|
|
133
210
|
interface DisplayHeadingProps {
|
|
134
211
|
children: ReactNode;
|
|
@@ -181,6 +258,23 @@ interface ApiPaginationProps extends Partial<ApiPaginationData> {
|
|
|
181
258
|
*/
|
|
182
259
|
declare function ApiPagination({ total, limit, pages, page, hasNext, hasPrev, onPageChange, className, showInfo, infoPosition, }: ApiPaginationProps): react_jsx_runtime.JSX.Element;
|
|
183
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
|
+
};
|
|
184
278
|
interface CardWrapperProps {
|
|
185
279
|
title?: ReactNode;
|
|
186
280
|
description?: ReactNode;
|
|
@@ -190,12 +284,13 @@ interface CardWrapperProps {
|
|
|
190
284
|
headerClassName?: string;
|
|
191
285
|
contentClassName?: string;
|
|
192
286
|
footerClassName?: string;
|
|
193
|
-
variant?:
|
|
194
|
-
size?:
|
|
287
|
+
variant?: keyof typeof CARD_VARIANTS;
|
|
288
|
+
size?: keyof typeof CARD_SIZES;
|
|
195
289
|
hideHeader?: boolean;
|
|
196
290
|
}
|
|
197
291
|
declare function CardWrapper({ title, description, children, footer, className, headerClassName, contentClassName, footerClassName, variant, size, hideHeader, ...props }: CardWrapperProps): react_jsx_runtime.JSX.Element;
|
|
198
292
|
interface DataCardProps extends Omit<CardWrapperProps, "children"> {
|
|
293
|
+
/** Each item's `color` should be a complete Tailwind class (e.g. "text-green-600") */
|
|
199
294
|
data: Array<{
|
|
200
295
|
label: string;
|
|
201
296
|
value: ReactNode;
|
|
@@ -363,7 +458,7 @@ interface ConfirmDialogProps {
|
|
|
363
458
|
open: boolean;
|
|
364
459
|
onOpenChange: (open: boolean) => void;
|
|
365
460
|
/** Trigger element that opens the dialog */
|
|
366
|
-
trigger?: React
|
|
461
|
+
trigger?: React.ReactElement;
|
|
367
462
|
title?: string;
|
|
368
463
|
description?: string;
|
|
369
464
|
confirmText?: string;
|
|
@@ -454,6 +549,230 @@ interface ErrorStateInlineProps {
|
|
|
454
549
|
*/
|
|
455
550
|
declare function ErrorStateInline({ error, onRetry, className, icon, }: ErrorStateInlineProps): react_jsx_runtime.JSX.Element;
|
|
456
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
|
+
|
|
457
776
|
interface CopyButtonProps {
|
|
458
777
|
value: string;
|
|
459
778
|
className?: string;
|
|
@@ -511,16 +830,20 @@ interface DataTableProps<TData, TValue> {
|
|
|
511
830
|
enableRowSelection?: boolean;
|
|
512
831
|
onRowSelectionChange?: (selectedRows: TData[]) => void;
|
|
513
832
|
className?: string;
|
|
833
|
+
/** Custom loading state renderer */
|
|
834
|
+
loadingState?: React__default.ReactNode;
|
|
835
|
+
/** Custom empty state renderer */
|
|
836
|
+
emptyState?: React__default.ReactNode;
|
|
514
837
|
}
|
|
515
|
-
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;
|
|
516
839
|
|
|
517
840
|
declare const SIZE_VARIANTS$1: {
|
|
518
|
-
readonly sm: "sm
|
|
519
|
-
readonly default: "sm
|
|
520
|
-
readonly lg: "sm
|
|
521
|
-
readonly xl: "sm
|
|
522
|
-
readonly "2xl": "sm
|
|
523
|
-
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]";
|
|
524
847
|
};
|
|
525
848
|
type SizeVariant$1 = keyof typeof SIZE_VARIANTS$1;
|
|
526
849
|
interface DialogWrapperProps {
|
|
@@ -543,7 +866,7 @@ interface DialogWrapperProps {
|
|
|
543
866
|
}
|
|
544
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;
|
|
545
868
|
interface FormDialogProps extends Omit<DialogWrapperProps, "footer"> {
|
|
546
|
-
onSubmit?: () => void;
|
|
869
|
+
onSubmit?: (e: React.FormEvent<HTMLFormElement>) => void;
|
|
547
870
|
onCancel?: () => void;
|
|
548
871
|
submitText?: string;
|
|
549
872
|
cancelText?: string;
|
|
@@ -553,8 +876,8 @@ interface FormDialogProps extends Omit<DialogWrapperProps, "footer"> {
|
|
|
553
876
|
declare function FormDialog({ open, onOpenChange, title, description, children, onSubmit, onCancel, submitText, cancelText, isLoading, submitDisabled, ...props }: FormDialogProps): react_jsx_runtime.JSX.Element;
|
|
554
877
|
|
|
555
878
|
interface DropdownWrapperProps {
|
|
556
|
-
trigger: React
|
|
557
|
-
children: React
|
|
879
|
+
trigger: React.ReactNode;
|
|
880
|
+
children: React.ReactNode;
|
|
558
881
|
align?: "start" | "center" | "end";
|
|
559
882
|
side?: "top" | "right" | "bottom" | "left";
|
|
560
883
|
sideOffset?: number;
|
|
@@ -567,7 +890,7 @@ interface ActionDropdownItem {
|
|
|
567
890
|
key?: string;
|
|
568
891
|
label?: string | (() => string);
|
|
569
892
|
icon?: LucideIcon;
|
|
570
|
-
onClick?: (e: React
|
|
893
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
571
894
|
disabled?: boolean;
|
|
572
895
|
hidden?: boolean;
|
|
573
896
|
variant?: "default" | "destructive";
|
|
@@ -641,36 +964,68 @@ declare const iconItemMediaVariants: (props?: ({
|
|
|
641
964
|
iconBg?: "primary" | "gradient" | "none" | "gold" | "muted" | null | undefined;
|
|
642
965
|
iconSize?: "lg" | "xl" | "sm" | "md" | null | undefined;
|
|
643
966
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
644
|
-
interface IconItemMediaProps extends React
|
|
645
|
-
icon?: React
|
|
646
|
-
children?: React
|
|
967
|
+
interface IconItemMediaProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof iconItemMediaVariants> {
|
|
968
|
+
icon?: React.ReactNode;
|
|
969
|
+
children?: React.ReactNode;
|
|
647
970
|
}
|
|
648
|
-
declare const IconItemMedia: React
|
|
971
|
+
declare const IconItemMedia: React.NamedExoticComponent<IconItemMediaProps>;
|
|
649
972
|
interface FeatureItemProps {
|
|
650
|
-
icon?: React
|
|
973
|
+
icon?: React.ReactNode;
|
|
651
974
|
iconBg?: "primary" | "gold" | "muted" | "gradient" | "none";
|
|
652
975
|
iconSize?: "sm" | "md" | "lg" | "xl";
|
|
653
|
-
title?: React
|
|
654
|
-
description?: React
|
|
976
|
+
title?: React.ReactNode;
|
|
977
|
+
description?: React.ReactNode;
|
|
655
978
|
variant?: "default" | "outline" | "ghost" | "gradient-light" | "gradient";
|
|
656
979
|
size?: "sm" | "default" | "lg";
|
|
657
980
|
layout?: "vertical" | "horizontal";
|
|
658
|
-
titleAs?: React
|
|
981
|
+
titleAs?: React.ElementType;
|
|
659
982
|
className?: string;
|
|
660
983
|
titleClassName?: string;
|
|
661
984
|
descriptionClassName?: string;
|
|
662
985
|
iconClassName?: string;
|
|
663
|
-
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;
|
|
664
1010
|
}
|
|
665
|
-
declare const FeatureItem: React$1.NamedExoticComponent<FeatureItemProps>;
|
|
666
1011
|
|
|
667
1012
|
declare function ModeToggle(): react_jsx_runtime.JSX.Element;
|
|
668
1013
|
|
|
669
|
-
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"> {
|
|
670
1022
|
onChange?: (value: string) => void;
|
|
671
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>;
|
|
672
1027
|
}
|
|
673
|
-
declare
|
|
1028
|
+
declare function PhoneInput({ className, onChange, value, defaultCountry, countries, disabled, placeholder, ref, ...props }: PhoneInputProps): react_jsx_runtime.JSX.Element;
|
|
674
1029
|
|
|
675
1030
|
interface PillProps {
|
|
676
1031
|
variant?: "default" | "secondary" | "destructive" | "outline";
|
|
@@ -775,7 +1130,7 @@ interface SheetWrapperProps {
|
|
|
775
1130
|
hideCloseButton?: boolean;
|
|
776
1131
|
disableContentPadding?: boolean;
|
|
777
1132
|
}
|
|
778
|
-
declare const SheetWrapper: React
|
|
1133
|
+
declare const SheetWrapper: React.NamedExoticComponent<SheetWrapperProps>;
|
|
779
1134
|
interface FormSheetProps extends Omit<SheetWrapperProps, "footer"> {
|
|
780
1135
|
onSubmit?: () => void;
|
|
781
1136
|
onCancel?: () => void;
|
|
@@ -785,7 +1140,7 @@ interface FormSheetProps extends Omit<SheetWrapperProps, "footer"> {
|
|
|
785
1140
|
submitLoading?: boolean;
|
|
786
1141
|
formId?: string;
|
|
787
1142
|
}
|
|
788
|
-
declare const FormSheet: React
|
|
1143
|
+
declare const FormSheet: React.NamedExoticComponent<FormSheetProps>;
|
|
789
1144
|
interface ConfirmSheetProps extends Omit<SheetWrapperProps, "footer"> {
|
|
790
1145
|
onConfirm?: () => void;
|
|
791
1146
|
onCancel?: () => void;
|
|
@@ -795,7 +1150,7 @@ interface ConfirmSheetProps extends Omit<SheetWrapperProps, "footer"> {
|
|
|
795
1150
|
confirmDisabled?: boolean;
|
|
796
1151
|
confirmLoading?: boolean;
|
|
797
1152
|
}
|
|
798
|
-
declare const ConfirmSheet: React
|
|
1153
|
+
declare const ConfirmSheet: React.NamedExoticComponent<ConfirmSheetProps>;
|
|
799
1154
|
|
|
800
1155
|
interface TableWrapperColumn {
|
|
801
1156
|
key?: string;
|
|
@@ -843,7 +1198,7 @@ interface TabsWrapperProps {
|
|
|
843
1198
|
withScrollArea?: boolean;
|
|
844
1199
|
scrollAreaClassName?: string;
|
|
845
1200
|
}
|
|
846
|
-
declare const TabsWrapper: React
|
|
1201
|
+
declare const TabsWrapper: React.NamedExoticComponent<TabsWrapperProps>;
|
|
847
1202
|
interface TabTriggerProps {
|
|
848
1203
|
value: string;
|
|
849
1204
|
children: ReactNode;
|
|
@@ -853,7 +1208,7 @@ interface TabTriggerProps {
|
|
|
853
1208
|
hideTextOnMobile?: boolean;
|
|
854
1209
|
disabled?: boolean;
|
|
855
1210
|
}
|
|
856
|
-
declare const TabTrigger: React
|
|
1211
|
+
declare const TabTrigger: React.NamedExoticComponent<TabTriggerProps>;
|
|
857
1212
|
interface TabContentProps {
|
|
858
1213
|
value: string;
|
|
859
1214
|
children: ReactNode;
|
|
@@ -863,7 +1218,7 @@ interface TabContentProps {
|
|
|
863
1218
|
padding?: boolean;
|
|
864
1219
|
keepMounted?: boolean;
|
|
865
1220
|
}
|
|
866
|
-
declare const TabContent: React
|
|
1221
|
+
declare const TabContent: React.NamedExoticComponent<TabContentProps>;
|
|
867
1222
|
interface DynamicTabItem {
|
|
868
1223
|
value: string;
|
|
869
1224
|
label: ReactNode;
|
|
@@ -885,7 +1240,7 @@ interface DynamicTabsProps {
|
|
|
885
1240
|
contentClassName?: string;
|
|
886
1241
|
scrollable?: boolean;
|
|
887
1242
|
}
|
|
888
|
-
declare const DynamicTabs: React
|
|
1243
|
+
declare const DynamicTabs: React.NamedExoticComponent<DynamicTabsProps>;
|
|
889
1244
|
|
|
890
1245
|
interface TooltipWrapperProps {
|
|
891
1246
|
children: ReactNode;
|
|
@@ -944,10 +1299,6 @@ interface FormInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
|
944
1299
|
labelClassName?: string;
|
|
945
1300
|
inputClassName?: string;
|
|
946
1301
|
inputGroupClassName?: string;
|
|
947
|
-
IconLeft?: ReactNode;
|
|
948
|
-
IconRight?: ReactNode;
|
|
949
|
-
AddonLeft?: ReactNode;
|
|
950
|
-
AddonRight?: ReactNode;
|
|
951
1302
|
iconLeft?: ReactNode;
|
|
952
1303
|
iconRight?: ReactNode;
|
|
953
1304
|
addonLeft?: ReactNode;
|
|
@@ -992,12 +1343,12 @@ interface FormInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
|
992
1343
|
* <FormInput
|
|
993
1344
|
* control={form.control}
|
|
994
1345
|
* name="search"
|
|
995
|
-
*
|
|
1346
|
+
* iconLeft={<SearchIcon />}
|
|
996
1347
|
* placeholder="Search..."
|
|
997
1348
|
* />
|
|
998
1349
|
* ```
|
|
999
1350
|
*/
|
|
1000
|
-
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;
|
|
1001
1352
|
|
|
1002
1353
|
interface FormTextareaProps<TFieldValues extends FieldValues = FieldValues> {
|
|
1003
1354
|
control?: Control<TFieldValues>;
|
|
@@ -1017,14 +1368,10 @@ interface FormTextareaProps<TFieldValues extends FieldValues = FieldValues> {
|
|
|
1017
1368
|
labelClassName?: string;
|
|
1018
1369
|
textareaClassName?: string;
|
|
1019
1370
|
inputGroupClassName?: string;
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
iconLeft?: React$1.ReactNode;
|
|
1025
|
-
iconRight?: React$1.ReactNode;
|
|
1026
|
-
addonLeft?: React$1.ReactNode;
|
|
1027
|
-
addonRight?: React$1.ReactNode;
|
|
1371
|
+
iconLeft?: React.ReactNode;
|
|
1372
|
+
iconRight?: React.ReactNode;
|
|
1373
|
+
addonLeft?: React.ReactNode;
|
|
1374
|
+
addonRight?: React.ReactNode;
|
|
1028
1375
|
minLength?: number;
|
|
1029
1376
|
maxLength?: number;
|
|
1030
1377
|
autoComplete?: string;
|
|
@@ -1044,16 +1391,16 @@ interface FormTextareaProps<TFieldValues extends FieldValues = FieldValues> {
|
|
|
1044
1391
|
* />
|
|
1045
1392
|
* ```
|
|
1046
1393
|
*/
|
|
1047
|
-
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;
|
|
1048
1395
|
|
|
1049
|
-
interface SelectOption
|
|
1396
|
+
interface SelectOption {
|
|
1050
1397
|
value: string | number;
|
|
1051
1398
|
label: string;
|
|
1052
1399
|
disabled?: boolean;
|
|
1053
1400
|
}
|
|
1054
1401
|
interface SelectOptionGroup {
|
|
1055
1402
|
label: string;
|
|
1056
|
-
items: SelectOption
|
|
1403
|
+
items: SelectOption[];
|
|
1057
1404
|
}
|
|
1058
1405
|
interface SelectInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
1059
1406
|
control?: Control<TFieldValues>;
|
|
@@ -1064,9 +1411,9 @@ interface SelectInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
|
1064
1411
|
helperText?: string;
|
|
1065
1412
|
required?: boolean;
|
|
1066
1413
|
disabled?: boolean;
|
|
1067
|
-
items?: SelectOption
|
|
1414
|
+
items?: SelectOption[];
|
|
1068
1415
|
groups?: SelectOptionGroup[];
|
|
1069
|
-
allOption?: SelectOption
|
|
1416
|
+
allOption?: SelectOption;
|
|
1070
1417
|
valueKey?: string;
|
|
1071
1418
|
displayKey?: string;
|
|
1072
1419
|
value?: string | number;
|
|
@@ -1076,7 +1423,7 @@ interface SelectInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
|
1076
1423
|
triggerClassName?: string;
|
|
1077
1424
|
contentClassName?: string;
|
|
1078
1425
|
itemClassName?: string;
|
|
1079
|
-
Icon?: React
|
|
1426
|
+
Icon?: React.ComponentType<{
|
|
1080
1427
|
className?: string;
|
|
1081
1428
|
}>;
|
|
1082
1429
|
defaultOpen?: boolean;
|
|
@@ -1265,7 +1612,7 @@ interface DateInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
|
1265
1612
|
className?: string;
|
|
1266
1613
|
labelClassName?: string;
|
|
1267
1614
|
inputClassName?: string;
|
|
1268
|
-
Icon?: React
|
|
1615
|
+
Icon?: React.ComponentType<{
|
|
1269
1616
|
className?: string;
|
|
1270
1617
|
}>;
|
|
1271
1618
|
allowClear?: boolean;
|
|
@@ -1449,11 +1796,12 @@ interface SlugFieldProps {
|
|
|
1449
1796
|
labelClassName?: string;
|
|
1450
1797
|
inputClassName?: string;
|
|
1451
1798
|
error?: FieldError;
|
|
1799
|
+
ref?: Ref<HTMLInputElement>;
|
|
1452
1800
|
}
|
|
1453
1801
|
/**
|
|
1454
1802
|
* Generates a URL-friendly slug from a string
|
|
1455
1803
|
*/
|
|
1456
|
-
declare function generateSlug
|
|
1804
|
+
declare function generateSlug(text: string | undefined): string;
|
|
1457
1805
|
/**
|
|
1458
1806
|
* SlugField - URL slug input with auto-generation
|
|
1459
1807
|
*
|
|
@@ -1469,7 +1817,7 @@ declare function generateSlug$1(text: string | undefined): string;
|
|
|
1469
1817
|
* />
|
|
1470
1818
|
* ```
|
|
1471
1819
|
*/
|
|
1472
|
-
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;
|
|
1473
1821
|
|
|
1474
1822
|
interface FormErrorSummaryProps {
|
|
1475
1823
|
/** Form errors object from react-hook-form */
|
|
@@ -1596,398 +1944,6 @@ interface DateRangeInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
|
1596
1944
|
*/
|
|
1597
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;
|
|
1598
1946
|
|
|
1599
|
-
interface SearchRootProps {
|
|
1600
|
-
children: ReactNode;
|
|
1601
|
-
hook: UseBaseSearchReturn;
|
|
1602
|
-
className?: string;
|
|
1603
|
-
}
|
|
1604
|
-
/**
|
|
1605
|
-
* Root search component that provides context to all child components
|
|
1606
|
-
*
|
|
1607
|
-
* @example
|
|
1608
|
-
* <Search.Root hook={useMySearch()}>
|
|
1609
|
-
* <Search.Input />
|
|
1610
|
-
* <Search.Filters />
|
|
1611
|
-
* <Search.Actions />
|
|
1612
|
-
* </Search.Root>
|
|
1613
|
-
*/
|
|
1614
|
-
declare function SearchRoot({ children, hook, className }: SearchRootProps): react_jsx_runtime.JSX.Element;
|
|
1615
|
-
|
|
1616
|
-
interface SearchInputProps {
|
|
1617
|
-
placeholder?: string;
|
|
1618
|
-
className?: string;
|
|
1619
|
-
disabled?: boolean;
|
|
1620
|
-
showIcon?: boolean;
|
|
1621
|
-
showClearButton?: boolean;
|
|
1622
|
-
onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
1623
|
-
}
|
|
1624
|
-
/**
|
|
1625
|
-
* Search input component using modern shadcn InputGroup pattern
|
|
1626
|
-
*
|
|
1627
|
-
* @example
|
|
1628
|
-
* <Search.Input placeholder="Search..." />
|
|
1629
|
-
*/
|
|
1630
|
-
declare function SearchInput({ placeholder, className, disabled, showIcon, showClearButton, onKeyDown, ...props }: SearchInputProps): react_jsx_runtime.JSX.Element;
|
|
1631
|
-
|
|
1632
|
-
interface SearchTypeOption {
|
|
1633
|
-
value: string;
|
|
1634
|
-
label: string;
|
|
1635
|
-
}
|
|
1636
|
-
interface SearchTypeInputProps {
|
|
1637
|
-
placeholder?: string;
|
|
1638
|
-
className?: string;
|
|
1639
|
-
disabled?: boolean;
|
|
1640
|
-
showIcon?: boolean;
|
|
1641
|
-
showClearButton?: boolean;
|
|
1642
|
-
searchTypeOptions?: SearchTypeOption[];
|
|
1643
|
-
onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
1644
|
-
}
|
|
1645
|
-
/**
|
|
1646
|
-
* Search input component with type selector using InputGroup pattern
|
|
1647
|
-
*
|
|
1648
|
-
* @example
|
|
1649
|
-
* <Search.TypeInput
|
|
1650
|
-
* placeholder="Search..."
|
|
1651
|
-
* searchTypeOptions={[
|
|
1652
|
-
* { value: "_id", label: "ID" },
|
|
1653
|
-
* { value: "customerPhone", label: "Phone" },
|
|
1654
|
-
* { value: "customerEmail", label: "Email" },
|
|
1655
|
-
* ]}
|
|
1656
|
-
* />
|
|
1657
|
-
*/
|
|
1658
|
-
declare function SearchTypeInput({ placeholder, className, disabled, showIcon, showClearButton, searchTypeOptions, onKeyDown, ...props }: SearchTypeInputProps): react_jsx_runtime.JSX.Element;
|
|
1659
|
-
|
|
1660
|
-
interface SearchFiltersProps {
|
|
1661
|
-
children: ReactNode;
|
|
1662
|
-
title?: string;
|
|
1663
|
-
description?: string;
|
|
1664
|
-
disabled?: boolean;
|
|
1665
|
-
className?: string;
|
|
1666
|
-
}
|
|
1667
|
-
/**
|
|
1668
|
-
* Search filters component with mobile sheet support
|
|
1669
|
-
*
|
|
1670
|
-
* @example
|
|
1671
|
-
* <Search.Filters>
|
|
1672
|
-
* <TagChoiceInput label="Category" ... />
|
|
1673
|
-
* <SelectInput label="Status" ... />
|
|
1674
|
-
* </Search.Filters>
|
|
1675
|
-
*/
|
|
1676
|
-
declare function SearchFilters({ children, title, description, disabled, className, }: SearchFiltersProps): react_jsx_runtime.JSX.Element;
|
|
1677
|
-
|
|
1678
|
-
interface SearchActionsProps {
|
|
1679
|
-
showSearchButton?: boolean;
|
|
1680
|
-
showClearButton?: boolean;
|
|
1681
|
-
searchButtonText?: string;
|
|
1682
|
-
clearButtonText?: string;
|
|
1683
|
-
disabled?: boolean;
|
|
1684
|
-
className?: string;
|
|
1685
|
-
}
|
|
1686
|
-
/**
|
|
1687
|
-
* Search action buttons
|
|
1688
|
-
*/
|
|
1689
|
-
declare function SearchActions({ showSearchButton, showClearButton, searchButtonText, clearButtonText, disabled, className, }: SearchActionsProps): react_jsx_runtime.JSX.Element;
|
|
1690
|
-
|
|
1691
|
-
interface SearchContainerProps {
|
|
1692
|
-
children: ReactNode;
|
|
1693
|
-
className?: string;
|
|
1694
|
-
}
|
|
1695
|
-
/**
|
|
1696
|
-
* Container for search input and action buttons
|
|
1697
|
-
* Provides responsive layout
|
|
1698
|
-
*
|
|
1699
|
-
* @example
|
|
1700
|
-
* <Search.Container>
|
|
1701
|
-
* <Search.Input />
|
|
1702
|
-
* <Search.Filters />
|
|
1703
|
-
* <Search.Actions />
|
|
1704
|
-
* </Search.Container>
|
|
1705
|
-
*/
|
|
1706
|
-
declare function SearchContainer({ children, className }: SearchContainerProps): react_jsx_runtime.JSX.Element;
|
|
1707
|
-
|
|
1708
|
-
interface SearchFilterActionsProps {
|
|
1709
|
-
onClose?: () => void;
|
|
1710
|
-
disabled?: boolean;
|
|
1711
|
-
}
|
|
1712
|
-
/**
|
|
1713
|
-
* Filter actions component (Reset/Apply buttons)
|
|
1714
|
-
* Used inside filter popovers/sheets
|
|
1715
|
-
*/
|
|
1716
|
-
declare function SearchFilterActions({ onClose, disabled }: SearchFilterActionsProps): react_jsx_runtime.JSX.Element;
|
|
1717
|
-
|
|
1718
|
-
interface SearchProviderProps {
|
|
1719
|
-
children: ReactNode;
|
|
1720
|
-
value: UseBaseSearchReturn;
|
|
1721
|
-
}
|
|
1722
|
-
declare function SearchProvider({ children, value }: SearchProviderProps): react_jsx_runtime.JSX.Element;
|
|
1723
|
-
declare function useSearch(): UseBaseSearchReturn;
|
|
1724
|
-
|
|
1725
|
-
/**
|
|
1726
|
-
* Composable Search Component System
|
|
1727
|
-
*
|
|
1728
|
-
* @example
|
|
1729
|
-
* ```tsx
|
|
1730
|
-
* import { Search } from "@classytic/fluid";
|
|
1731
|
-
*
|
|
1732
|
-
* function MySearch() {
|
|
1733
|
-
* const searchHook = useMySearch();
|
|
1734
|
-
*
|
|
1735
|
-
* return (
|
|
1736
|
-
* <Search.Root hook={searchHook}>
|
|
1737
|
-
* <Search.Container>
|
|
1738
|
-
* <Search.Input placeholder="Search..." />
|
|
1739
|
-
* <Search.Filters>
|
|
1740
|
-
* <SelectInput ... />
|
|
1741
|
-
* <TagChoiceInput ... />
|
|
1742
|
-
* </Search.Filters>
|
|
1743
|
-
* <Search.Actions />
|
|
1744
|
-
* </Search.Container>
|
|
1745
|
-
* </Search.Root>
|
|
1746
|
-
* );
|
|
1747
|
-
* }
|
|
1748
|
-
* ```
|
|
1749
|
-
*/
|
|
1750
|
-
|
|
1751
|
-
type index_SearchActionsProps = SearchActionsProps;
|
|
1752
|
-
type index_SearchContainerProps = SearchContainerProps;
|
|
1753
|
-
type index_SearchFilterActionsProps = SearchFilterActionsProps;
|
|
1754
|
-
type index_SearchFiltersProps = SearchFiltersProps;
|
|
1755
|
-
type index_SearchInputProps = SearchInputProps;
|
|
1756
|
-
declare const index_SearchProvider: typeof SearchProvider;
|
|
1757
|
-
type index_SearchProviderProps = SearchProviderProps;
|
|
1758
|
-
type index_SearchRootProps = SearchRootProps;
|
|
1759
|
-
type index_SearchTypeInputProps = SearchTypeInputProps;
|
|
1760
|
-
type index_SearchTypeOption = SearchTypeOption;
|
|
1761
|
-
declare const index_useSearch: typeof useSearch;
|
|
1762
|
-
declare namespace index {
|
|
1763
|
-
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 };
|
|
1764
|
-
}
|
|
1765
|
-
|
|
1766
|
-
interface FieldRootProps {
|
|
1767
|
-
children: ReactNode;
|
|
1768
|
-
className?: string;
|
|
1769
|
-
disabled?: boolean;
|
|
1770
|
-
invalid?: boolean;
|
|
1771
|
-
}
|
|
1772
|
-
interface FieldLabelProps {
|
|
1773
|
-
children: ReactNode;
|
|
1774
|
-
className?: string;
|
|
1775
|
-
}
|
|
1776
|
-
interface FieldErrorProps {
|
|
1777
|
-
children?: ReactNode;
|
|
1778
|
-
className?: string;
|
|
1779
|
-
}
|
|
1780
|
-
interface FieldIconProps {
|
|
1781
|
-
children: ReactNode;
|
|
1782
|
-
className?: string;
|
|
1783
|
-
}
|
|
1784
|
-
declare const Field: {
|
|
1785
|
-
Root: React__default.NamedExoticComponent<FieldRootProps>;
|
|
1786
|
-
Label: React__default.NamedExoticComponent<FieldLabelProps>;
|
|
1787
|
-
Error: React__default.NamedExoticComponent<FieldErrorProps>;
|
|
1788
|
-
Icon: React__default.NamedExoticComponent<FieldIconProps>;
|
|
1789
|
-
};
|
|
1790
|
-
|
|
1791
|
-
interface CompactInputProps<T extends FieldValues = FieldValues> extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChange"> {
|
|
1792
|
-
control?: Control<T>;
|
|
1793
|
-
name?: Path<T>;
|
|
1794
|
-
description?: string;
|
|
1795
|
-
required?: boolean;
|
|
1796
|
-
label?: string;
|
|
1797
|
-
placeholder?: string;
|
|
1798
|
-
disabled?: boolean;
|
|
1799
|
-
type?: string;
|
|
1800
|
-
AddonLeft?: ReactNode;
|
|
1801
|
-
AddonRight?: ReactNode;
|
|
1802
|
-
inputClassName?: string;
|
|
1803
|
-
onValueChange?: (value: string) => void;
|
|
1804
|
-
value?: string;
|
|
1805
|
-
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
1806
|
-
error?: string;
|
|
1807
|
-
}
|
|
1808
|
-
/**
|
|
1809
|
-
* CompactInput - Enhanced form input with InputGroup support
|
|
1810
|
-
*
|
|
1811
|
-
* Features:
|
|
1812
|
-
* - Floating label design
|
|
1813
|
-
* - InputGroup support with icons, buttons, and text addons
|
|
1814
|
-
* - Controller integration for react-hook-form
|
|
1815
|
-
* - Direct usage without form
|
|
1816
|
-
*/
|
|
1817
|
-
declare const CompactInput: React$1.ForwardRefExoticComponent<CompactInputProps<FieldValues> & React$1.RefAttributes<HTMLInputElement>>;
|
|
1818
|
-
|
|
1819
|
-
interface CompactTextareaProps<T extends FieldValues = FieldValues> extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange"> {
|
|
1820
|
-
control?: Control<T>;
|
|
1821
|
-
name?: Path<T>;
|
|
1822
|
-
description?: string;
|
|
1823
|
-
required?: boolean;
|
|
1824
|
-
label?: string;
|
|
1825
|
-
placeholder?: string;
|
|
1826
|
-
disabled?: boolean;
|
|
1827
|
-
rows?: number;
|
|
1828
|
-
AddonLeft?: ReactNode;
|
|
1829
|
-
AddonRight?: ReactNode;
|
|
1830
|
-
inputClassName?: string;
|
|
1831
|
-
onValueChange?: (value: string) => void;
|
|
1832
|
-
value?: string;
|
|
1833
|
-
onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void;
|
|
1834
|
-
error?: string;
|
|
1835
|
-
}
|
|
1836
|
-
/**
|
|
1837
|
-
* CompactTextarea - Enhanced textarea with InputGroup support
|
|
1838
|
-
*
|
|
1839
|
-
* Features:
|
|
1840
|
-
* - Floating label design
|
|
1841
|
-
* - InputGroup support with addons
|
|
1842
|
-
* - Character counter with maxLength
|
|
1843
|
-
* - Controller integration for react-hook-form
|
|
1844
|
-
* - Direct usage without form
|
|
1845
|
-
*/
|
|
1846
|
-
declare const CompactTextarea: React$1.ForwardRefExoticComponent<CompactTextareaProps<FieldValues> & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
1847
|
-
|
|
1848
|
-
interface SelectOption {
|
|
1849
|
-
value: string;
|
|
1850
|
-
label: string;
|
|
1851
|
-
}
|
|
1852
|
-
interface CompactSelectProps<T extends FieldValues = FieldValues> {
|
|
1853
|
-
control?: Control<T>;
|
|
1854
|
-
name?: Path<T>;
|
|
1855
|
-
description?: string;
|
|
1856
|
-
required?: boolean;
|
|
1857
|
-
label?: string;
|
|
1858
|
-
placeholder?: string;
|
|
1859
|
-
disabled?: boolean;
|
|
1860
|
-
items?: SelectOption[];
|
|
1861
|
-
className?: string;
|
|
1862
|
-
onValueChange?: (value: string) => void;
|
|
1863
|
-
value?: string;
|
|
1864
|
-
error?: string;
|
|
1865
|
-
}
|
|
1866
|
-
/**
|
|
1867
|
-
* CompactSelect - Simple, clean select dropdown
|
|
1868
|
-
*
|
|
1869
|
-
* @example
|
|
1870
|
-
* <CompactSelect
|
|
1871
|
-
* label="Status"
|
|
1872
|
-
* items={[
|
|
1873
|
-
* { value: "active", label: "Active" },
|
|
1874
|
-
* { value: "inactive", label: "Inactive" }
|
|
1875
|
-
* ]}
|
|
1876
|
-
* />
|
|
1877
|
-
*/
|
|
1878
|
-
declare const CompactSelect: React$1.ForwardRefExoticComponent<CompactSelectProps<FieldValues> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1879
|
-
|
|
1880
|
-
interface CompactNumberInputProps<T extends FieldValues = FieldValues> {
|
|
1881
|
-
control?: Control<T>;
|
|
1882
|
-
name?: Path<T>;
|
|
1883
|
-
description?: string;
|
|
1884
|
-
required?: boolean;
|
|
1885
|
-
label?: string;
|
|
1886
|
-
placeholder?: string;
|
|
1887
|
-
disabled?: boolean;
|
|
1888
|
-
min?: number;
|
|
1889
|
-
max?: number;
|
|
1890
|
-
step?: number;
|
|
1891
|
-
prefix?: ReactNode;
|
|
1892
|
-
suffix?: ReactNode;
|
|
1893
|
-
showButtons?: boolean;
|
|
1894
|
-
buttonVariant?: "ghost" | "outline" | "default";
|
|
1895
|
-
className?: string;
|
|
1896
|
-
inputClassName?: string;
|
|
1897
|
-
labelClassName?: string;
|
|
1898
|
-
containerClassName?: string;
|
|
1899
|
-
onValueChange?: (value: number | string) => void;
|
|
1900
|
-
value?: number | string;
|
|
1901
|
-
defaultValue?: number | string;
|
|
1902
|
-
onChange?: (value: number | string) => void;
|
|
1903
|
-
error?: string;
|
|
1904
|
-
}
|
|
1905
|
-
/**
|
|
1906
|
-
* CompactNumberInput - A space-efficient number input with optional increment/decrement buttons
|
|
1907
|
-
*
|
|
1908
|
-
* Features:
|
|
1909
|
-
* - Floating label design
|
|
1910
|
-
* - Optional increment/decrement buttons
|
|
1911
|
-
* - Support for min/max/step values
|
|
1912
|
-
* - Prefix/suffix support
|
|
1913
|
-
* - Form integration via control prop
|
|
1914
|
-
* - Direct usage without form
|
|
1915
|
-
*/
|
|
1916
|
-
declare const CompactNumberInput: React$1.ForwardRefExoticComponent<CompactNumberInputProps<FieldValues> & React$1.RefAttributes<HTMLInputElement>>;
|
|
1917
|
-
|
|
1918
|
-
interface Choice {
|
|
1919
|
-
value: string;
|
|
1920
|
-
label: string;
|
|
1921
|
-
}
|
|
1922
|
-
interface CompactTagChoiceProps<T extends FieldValues = FieldValues> {
|
|
1923
|
-
control?: Control<T>;
|
|
1924
|
-
name?: Path<T>;
|
|
1925
|
-
label?: string;
|
|
1926
|
-
description?: string;
|
|
1927
|
-
placeholder?: string;
|
|
1928
|
-
required?: boolean;
|
|
1929
|
-
disabled?: boolean;
|
|
1930
|
-
choices?: Choice[];
|
|
1931
|
-
maxSelections?: number;
|
|
1932
|
-
className?: string;
|
|
1933
|
-
containerClassName?: string;
|
|
1934
|
-
labelClassName?: string;
|
|
1935
|
-
inputClassName?: string;
|
|
1936
|
-
value?: string[];
|
|
1937
|
-
onChange?: (value: string[]) => void;
|
|
1938
|
-
onValueChange?: (value: string[]) => void;
|
|
1939
|
-
error?: string;
|
|
1940
|
-
}
|
|
1941
|
-
/**
|
|
1942
|
-
* CompactTagChoice - A compact tag selection input
|
|
1943
|
-
*
|
|
1944
|
-
* Features:
|
|
1945
|
-
* - Multi-select tag interface
|
|
1946
|
-
* - Maximum selection limit
|
|
1947
|
-
* - Popover for selecting options
|
|
1948
|
-
* - Form integration via control prop
|
|
1949
|
-
* - Direct usage without form
|
|
1950
|
-
*/
|
|
1951
|
-
declare const CompactTagChoice: React$1.ForwardRefExoticComponent<CompactTagChoiceProps<FieldValues> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1952
|
-
|
|
1953
|
-
/**
|
|
1954
|
-
* Generates a URL-friendly slug from a string
|
|
1955
|
-
*/
|
|
1956
|
-
declare function generateSlug(text: string): string;
|
|
1957
|
-
interface CompactSlugFieldProps<T extends FieldValues = FieldValues> {
|
|
1958
|
-
control?: Control<T>;
|
|
1959
|
-
name?: Path<T>;
|
|
1960
|
-
description?: string;
|
|
1961
|
-
required?: boolean;
|
|
1962
|
-
label?: string;
|
|
1963
|
-
placeholder?: string;
|
|
1964
|
-
disabled?: boolean;
|
|
1965
|
-
icon?: ReactNode;
|
|
1966
|
-
sourceValue?: string;
|
|
1967
|
-
onGenerate?: (source: string) => string;
|
|
1968
|
-
className?: string;
|
|
1969
|
-
inputClassName?: string;
|
|
1970
|
-
onValueChange?: (value: string) => void;
|
|
1971
|
-
value?: string;
|
|
1972
|
-
onChange?: (e: ChangeEvent<HTMLInputElement> | {
|
|
1973
|
-
target: {
|
|
1974
|
-
value: string;
|
|
1975
|
-
};
|
|
1976
|
-
}) => void;
|
|
1977
|
-
error?: string;
|
|
1978
|
-
}
|
|
1979
|
-
/**
|
|
1980
|
-
* CompactSlugField - Compact slug input with auto-generation
|
|
1981
|
-
*
|
|
1982
|
-
* Features:
|
|
1983
|
-
* - Compact design with floating label
|
|
1984
|
-
* - Auto-generate slug from source field
|
|
1985
|
-
* - Manual editing support
|
|
1986
|
-
* - InputGroup with generate button
|
|
1987
|
-
* - Form integration via control prop
|
|
1988
|
-
*/
|
|
1989
|
-
declare const CompactSlugField: React$1.ForwardRefExoticComponent<CompactSlugFieldProps<FieldValues> & React$1.RefAttributes<HTMLInputElement>>;
|
|
1990
|
-
|
|
1991
1947
|
interface CalendarEvent {
|
|
1992
1948
|
id: string;
|
|
1993
1949
|
date: Date | string;
|
|
@@ -2059,4 +2015,127 @@ interface CalendarWithDetailProps<T extends CalendarEvent> extends Omit<EventCal
|
|
|
2059
2015
|
}
|
|
2060
2016
|
declare function CalendarWithDetail<T extends CalendarEvent>({ renderDetail, detailTitle, detailEmptyMessage, layout, detailPosition, onDateSelect, ...calendarProps }: CalendarWithDetailProps<T>): react_jsx_runtime.JSX.Element;
|
|
2061
2017
|
|
|
2062
|
-
|
|
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 };
|