@pelatform/ui 1.6.0 → 2.1.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 +360 -5
- package/dist/animation.d.ts +6 -379
- package/dist/animation.js +2 -1750
- package/dist/base.d.ts +1 -651
- package/dist/base.js +2 -5554
- package/dist/components.d.ts +1 -2944
- package/dist/components.js +2 -2719
- package/dist/css/color/gray.css +105 -0
- package/dist/css/color/neutral.css +105 -0
- package/dist/css/color/slate.css +105 -0
- package/dist/css/color/stone.css +105 -0
- package/dist/css/color/zinc.css +105 -0
- package/dist/css/styles/style-lyra.css +1335 -0
- package/dist/css/styles/style-maia.css +1360 -0
- package/dist/css/styles/style-mira.css +1362 -0
- package/dist/css/styles/style-nova.css +1360 -0
- package/dist/css/styles/style-vega.css +1356 -0
- package/dist/hooks.d.ts +1 -1172
- package/dist/hooks.js +2 -664
- package/dist/index.d.ts +1 -318
- package/dist/index.js +3 -229
- package/dist/radix.d.ts +1 -0
- package/dist/radix.js +4 -0
- package/dist/style.css +2 -0
- package/package.json +82 -136
- package/LICENSE +0 -21
- package/css/components/apexcharts.css +0 -101
- package/css/components/book.css +0 -19
- package/css/components/extra.css +0 -12
- package/css/components/image-input.css +0 -51
- package/css/components/leaflet.css +0 -25
- package/css/components/patterns.css +0 -34
- package/css/components/rating.css +0 -89
- package/css/components/scrollable.css +0 -118
- package/css/components/theme-transition.css +0 -51
- package/css/theme.css +0 -238
- package/dist/animation.cjs +0 -1752
- package/dist/animation.d.cts +0 -379
- package/dist/aria.cjs +0 -139
- package/dist/aria.d.cts +0 -31
- package/dist/aria.d.ts +0 -31
- package/dist/aria.js +0 -139
- package/dist/badge-BtI4BMea.d.cts +0 -33
- package/dist/badge-BtI4BMea.d.ts +0 -33
- package/dist/base.cjs +0 -5556
- package/dist/base.d.cts +0 -651
- package/dist/chunk-3N75YA6Q.cjs +0 -60
- package/dist/chunk-7472NIIL.cjs +0 -40
- package/dist/chunk-BXUKTDPN.cjs +0 -576
- package/dist/chunk-CD2BCCQU.js +0 -180
- package/dist/chunk-CJXIPSTG.cjs +0 -10
- package/dist/chunk-CTHRAJQZ.js +0 -1522
- package/dist/chunk-D373YKDA.js +0 -196
- package/dist/chunk-EZW5GNS4.js +0 -6
- package/dist/chunk-HILACSFA.cjs +0 -1522
- package/dist/chunk-HR3R6KKM.js +0 -40
- package/dist/chunk-HW52LCWN.js +0 -22
- package/dist/chunk-I46SELBA.cjs +0 -22
- package/dist/chunk-J4JGE3U5.cjs +0 -180
- package/dist/chunk-RQHJBTEU.js +0 -10
- package/dist/chunk-SK6SSJHC.js +0 -9
- package/dist/chunk-T74DBLYY.js +0 -60
- package/dist/chunk-TB6DU23O.js +0 -576
- package/dist/chunk-UP53DCYH.cjs +0 -6
- package/dist/chunk-ZBO5IAMA.cjs +0 -196
- package/dist/chunk-ZDR3OZ7Z.cjs +0 -9
- package/dist/colors-CUDWvz1g.d.cts +0 -42
- package/dist/colors-CUDWvz1g.d.ts +0 -42
- package/dist/components-CidsRcc3.d.cts +0 -46
- package/dist/components-CidsRcc3.d.ts +0 -46
- package/dist/components.cjs +0 -2721
- package/dist/components.d.cts +0 -2944
- package/dist/default.cjs +0 -8931
- package/dist/default.d.cts +0 -1322
- package/dist/default.d.ts +0 -1322
- package/dist/default.js +0 -8931
- package/dist/hooks.cjs +0 -666
- package/dist/hooks.d.cts +0 -1172
- package/dist/index.cjs +0 -230
- package/dist/index.d.cts +0 -318
- package/dist/input-AwYIskrX.d.cts +0 -22
- package/dist/input-AwYIskrX.d.ts +0 -22
- package/dist/menu-GmSRfRGB.d.cts +0 -43
- package/dist/menu-GmSRfRGB.d.ts +0 -43
- package/dist/metafile-cjs.json +0 -1
- package/dist/metafile-esm.json +0 -1
- package/dist/re-export/cva.cjs +0 -6
- package/dist/re-export/cva.d.cts +0 -10
- package/dist/re-export/cva.d.ts +0 -10
- package/dist/re-export/cva.js +0 -6
- package/dist/re-export/motion.cjs +0 -2
- package/dist/re-export/motion.d.cts +0 -1
- package/dist/re-export/motion.d.ts +0 -1
- package/dist/re-export/motion.js +0 -2
- package/dist/re-export/next-themes.cjs +0 -2
- package/dist/re-export/next-themes.d.cts +0 -1
- package/dist/re-export/next-themes.d.ts +0 -1
- package/dist/re-export/next-themes.js +0 -2
- package/dist/re-export/react-day-picker.cjs +0 -2
- package/dist/re-export/react-day-picker.d.cts +0 -1
- package/dist/re-export/react-day-picker.d.ts +0 -1
- package/dist/re-export/react-day-picker.js +0 -2
- package/dist/re-export/react-hook-form.cjs +0 -2
- package/dist/re-export/react-hook-form.d.cts +0 -1
- package/dist/re-export/react-hook-form.d.ts +0 -1
- package/dist/re-export/react-hook-form.js +0 -2
- package/dist/re-export/resolver.cjs +0 -2
- package/dist/re-export/resolver.d.cts +0 -1
- package/dist/re-export/resolver.d.ts +0 -1
- package/dist/re-export/resolver.js +0 -2
- package/dist/re-export/sonner.cjs +0 -2
- package/dist/re-export/sonner.d.cts +0 -1
- package/dist/re-export/sonner.d.ts +0 -1
- package/dist/re-export/sonner.js +0 -2
- package/dist/re-export/tanstack-query.cjs +0 -2
- package/dist/re-export/tanstack-query.d.cts +0 -1
- package/dist/re-export/tanstack-query.d.ts +0 -1
- package/dist/re-export/tanstack-query.js +0 -2
- package/dist/re-export/tanstack-table.cjs +0 -2
- package/dist/re-export/tanstack-table.d.cts +0 -1
- package/dist/re-export/tanstack-table.d.ts +0 -1
- package/dist/re-export/tanstack-table.js +0 -2
- package/dist/re-export/zod.cjs +0 -2
- package/dist/re-export/zod.d.cts +0 -1
- package/dist/re-export/zod.d.ts +0 -1
- package/dist/re-export/zod.js +0 -2
package/dist/components.d.ts
CHANGED
|
@@ -1,2944 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { ReactNode, HTMLAttributes, ComponentProps, FC, DragEvent, RefObject } from 'react';
|
|
4
|
-
import { B as BaseProps, L as Link, I as Image } from './components-CidsRcc3.js';
|
|
5
|
-
import { DialogProps } from '@radix-ui/react-dialog';
|
|
6
|
-
import { QueryClient } from '@tanstack/react-query';
|
|
7
|
-
import { ThemeProvider as ThemeProvider$1 } from 'next-themes';
|
|
8
|
-
import { VariantProps } from 'class-variance-authority';
|
|
9
|
-
import { b as badgeVariants } from './badge-BtI4BMea.js';
|
|
10
|
-
import { a as ThemeMode } from './colors-CUDWvz1g.js';
|
|
11
|
-
import 'class-variance-authority/types';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Alert Toast Component
|
|
15
|
-
*
|
|
16
|
-
* This module provides a customizable toast notification system using Sonner
|
|
17
|
-
* with integrated Alert components for consistent UI styling.
|
|
18
|
-
*
|
|
19
|
-
* Features:
|
|
20
|
-
* - Multiple icon variants (primary, destructive, success, info, warning)
|
|
21
|
-
* - Customizable alert variants for different visual styles
|
|
22
|
-
* - Auto-dismiss after 4 seconds
|
|
23
|
-
* - Unique ID generation for each toast
|
|
24
|
-
*/
|
|
25
|
-
/**
|
|
26
|
-
* Configuration options for the alert toast notification
|
|
27
|
-
*/
|
|
28
|
-
interface AlertToastOptions {
|
|
29
|
-
/** Custom message to display in the toast */
|
|
30
|
-
message?: string;
|
|
31
|
-
/** Icon variant to display in the alert - determines which icon is shown */
|
|
32
|
-
icon?: 'primary' | 'destructive' | 'success' | 'info' | 'warning';
|
|
33
|
-
/** Visual variant of the alert component - affects styling and colors */
|
|
34
|
-
variant?: 'secondary' | 'primary' | 'destructive' | 'mono' | 'success' | 'info' | 'warning';
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Creates and displays a customizable alert toast notification
|
|
38
|
-
*
|
|
39
|
-
* @param options - Configuration options for the toast
|
|
40
|
-
* @param options.message - The message to display (default: 'This is a toast')
|
|
41
|
-
* @param options.icon - The icon variant to show (default: 'success')
|
|
42
|
-
* @param options.variant - The visual style variant (default: 'mono')
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* ```tsx
|
|
46
|
-
* // Show a success message
|
|
47
|
-
* AlertToast({ message: 'Data saved successfully!' });
|
|
48
|
-
*
|
|
49
|
-
* // Show an error message
|
|
50
|
-
* AlertToast({
|
|
51
|
-
* message: 'Failed to save data',
|
|
52
|
-
* icon: 'destructive',
|
|
53
|
-
* variant: 'destructive'
|
|
54
|
-
* });
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
declare function AlertToast({ message, icon, variant, }: AlertToastOptions): void;
|
|
58
|
-
/**
|
|
59
|
-
* Alert Notification Component
|
|
60
|
-
*
|
|
61
|
-
* Renders a static alert notification with appropriate icon and styling
|
|
62
|
-
* based on the variant. This component is used for displaying persistent
|
|
63
|
-
* alerts that don't auto-dismiss like toast notifications.
|
|
64
|
-
*
|
|
65
|
-
* @param props - Component props
|
|
66
|
-
* @param props.message - The message to display in the alert
|
|
67
|
-
* @param props.variant - The visual style variant (default: 'info')
|
|
68
|
-
*
|
|
69
|
-
* @returns JSX element or null if no message is provided
|
|
70
|
-
*
|
|
71
|
-
* @example
|
|
72
|
-
* ```tsx
|
|
73
|
-
* // Basic info alert
|
|
74
|
-
* <AlertNotification message="Please verify your email address" />
|
|
75
|
-
*
|
|
76
|
-
* // Error alert
|
|
77
|
-
* <AlertNotification
|
|
78
|
-
* message="Failed to load data"
|
|
79
|
-
* variant="destructive"
|
|
80
|
-
* />
|
|
81
|
-
*
|
|
82
|
-
* // Success alert
|
|
83
|
-
* <AlertNotification
|
|
84
|
-
* message="Profile updated successfully"
|
|
85
|
-
* variant="success"
|
|
86
|
-
* />
|
|
87
|
-
*
|
|
88
|
-
* // Warning alert
|
|
89
|
-
* <AlertNotification
|
|
90
|
-
* message="Your session will expire soon"
|
|
91
|
-
* variant="warning"
|
|
92
|
-
* />
|
|
93
|
-
* ```
|
|
94
|
-
*/
|
|
95
|
-
declare function AlertNotification({ message, variant }: AlertToastOptions): react_jsx_runtime.JSX.Element | null;
|
|
96
|
-
/**
|
|
97
|
-
* Displays a standardized "coming soon" toast notification
|
|
98
|
-
*
|
|
99
|
-
* This function creates a consistent user experience for features that are
|
|
100
|
-
* not yet implemented. It uses a custom toast with alert styling to inform
|
|
101
|
-
* users that the feature they're trying to access is under development.
|
|
102
|
-
*
|
|
103
|
-
* @param options - Configuration options for the toast appearance and message
|
|
104
|
-
*
|
|
105
|
-
* @example
|
|
106
|
-
* ```tsx
|
|
107
|
-
* // Basic usage with default message
|
|
108
|
-
* AlertComingsoon();
|
|
109
|
-
*
|
|
110
|
-
* // Custom message with warning variant
|
|
111
|
-
* AlertComingsoon({
|
|
112
|
-
* message: 'Advanced analytics coming in Q2 2024',
|
|
113
|
-
* icon: 'warning',
|
|
114
|
-
* variant: 'warning'
|
|
115
|
-
* });
|
|
116
|
-
*
|
|
117
|
-
* // Success variant for positive messaging
|
|
118
|
-
* AlertComingsoon({
|
|
119
|
-
* message: 'New dashboard features are on the way!',
|
|
120
|
-
* icon: 'success',
|
|
121
|
-
* variant: 'success'
|
|
122
|
-
* });
|
|
123
|
-
*
|
|
124
|
-
* // Use in event handlers
|
|
125
|
-
* const handlePremiumFeature = () => {
|
|
126
|
-
* AlertComingsoon({
|
|
127
|
-
* message: 'Premium features available soon',
|
|
128
|
-
* icon: 'info',
|
|
129
|
-
* variant: 'info'
|
|
130
|
-
* });
|
|
131
|
-
* };
|
|
132
|
-
* ```
|
|
133
|
-
*/
|
|
134
|
-
declare const AlertComingsoon: ({ message, icon, variant, }?: AlertToastOptions) => void;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Confirm Dismiss Dialog Component
|
|
138
|
-
* Provides a reusable confirmation dialog for destructive actions like discarding changes
|
|
139
|
-
* Built on top of AlertDialog with customizable content and actions
|
|
140
|
-
*/
|
|
141
|
-
/**
|
|
142
|
-
* Props interface for the ConfirmDismissDialog component
|
|
143
|
-
*/
|
|
144
|
-
interface ConfirmDismissDialogProps {
|
|
145
|
-
/** Whether the dialog is open */
|
|
146
|
-
open: boolean;
|
|
147
|
-
/** Callback to handle dialog open state changes */
|
|
148
|
-
onOpenChange: (open: boolean) => void;
|
|
149
|
-
/** Callback executed when user confirms the action */
|
|
150
|
-
onConfirm: () => void;
|
|
151
|
-
/** Optional callback executed when user cancels (defaults to closing dialog) */
|
|
152
|
-
onCancel?: () => void;
|
|
153
|
-
/** Dialog title text (defaults to "Discard changes?") */
|
|
154
|
-
title?: string;
|
|
155
|
-
/** Dialog description text (defaults to unsaved changes message) */
|
|
156
|
-
description?: string;
|
|
157
|
-
/** Confirm button text (defaults to "Discard changes") */
|
|
158
|
-
confirmText?: string;
|
|
159
|
-
/** Cancel button text (defaults to "Cancel") */
|
|
160
|
-
cancelText?: string;
|
|
161
|
-
/** CSS class for maximum width (defaults to "md:max-w-[375px]") */
|
|
162
|
-
maxWidth?: string;
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Reusable confirmation dialog for destructive actions
|
|
166
|
-
*
|
|
167
|
-
* This component provides a standardized way to confirm destructive actions
|
|
168
|
-
* like discarding unsaved changes, deleting items, or leaving forms.
|
|
169
|
-
* It includes customizable text and handles both confirm and cancel actions.
|
|
170
|
-
*
|
|
171
|
-
* @param props - Component props for dialog configuration
|
|
172
|
-
* @returns JSX element containing the confirmation dialog
|
|
173
|
-
*
|
|
174
|
-
* @example
|
|
175
|
-
* ```tsx
|
|
176
|
-
* // Basic usage for form dismissal
|
|
177
|
-
* function FormComponent() {
|
|
178
|
-
* const [showDialog, setShowDialog] = useState(false);
|
|
179
|
-
* const [hasChanges, setHasChanges] = useState(false);
|
|
180
|
-
*
|
|
181
|
-
* const handleClose = () => {
|
|
182
|
-
* if (hasChanges) {
|
|
183
|
-
* setShowDialog(true);
|
|
184
|
-
* } else {
|
|
185
|
-
* // Close form directly
|
|
186
|
-
* onClose();
|
|
187
|
-
* }
|
|
188
|
-
* };
|
|
189
|
-
*
|
|
190
|
-
* return (
|
|
191
|
-
* <>
|
|
192
|
-
* <form>
|
|
193
|
-
* <button type="button" onClick={handleClose}>Close</button>
|
|
194
|
-
* </form>
|
|
195
|
-
*
|
|
196
|
-
* <ConfirmDismissDialog
|
|
197
|
-
* open={showDialog}
|
|
198
|
-
* onOpenChange={setShowDialog}
|
|
199
|
-
* onConfirm={() => {
|
|
200
|
-
* setShowDialog(false);
|
|
201
|
-
* onClose(); // Actually close the form
|
|
202
|
-
* }}
|
|
203
|
-
* />
|
|
204
|
-
* </>
|
|
205
|
-
* );
|
|
206
|
-
* }
|
|
207
|
-
*
|
|
208
|
-
* // Custom dialog for deletion
|
|
209
|
-
* <ConfirmDismissDialog
|
|
210
|
-
* open={showDeleteDialog}
|
|
211
|
-
* onOpenChange={setShowDeleteDialog}
|
|
212
|
-
* title="Delete item?"
|
|
213
|
-
* description="This action cannot be undone. Are you sure you want to delete this item?"
|
|
214
|
-
* confirmText="Delete"
|
|
215
|
-
* cancelText="Keep"
|
|
216
|
-
* onConfirm={handleDelete}
|
|
217
|
-
* />
|
|
218
|
-
* ```
|
|
219
|
-
*/
|
|
220
|
-
declare const ConfirmDismissDialog: ({ open, onOpenChange, onConfirm, onCancel, title, description, confirmText, cancelText, maxWidth, }: ConfirmDismissDialogProps) => react_jsx_runtime.JSX.Element;
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Screen Loader Component
|
|
224
|
-
* Provides a full-screen loading overlay with spinner and customizable text
|
|
225
|
-
* Perfect for page transitions, data loading, and async operations
|
|
226
|
-
*/
|
|
227
|
-
/**
|
|
228
|
-
* Props interface for the ScreenLoader component
|
|
229
|
-
*/
|
|
230
|
-
interface ScreenLoaderProps {
|
|
231
|
-
/** Loading text to display below the spinner */
|
|
232
|
-
loadingText?: string;
|
|
233
|
-
/** Additional CSS classes for the container */
|
|
234
|
-
className?: string;
|
|
235
|
-
/** Additional CSS classes for the spinner icon */
|
|
236
|
-
spinnerClassName?: string;
|
|
237
|
-
/** Additional CSS classes for the loading text */
|
|
238
|
-
textClassName?: string;
|
|
239
|
-
/** Display loader for content */
|
|
240
|
-
contentLoader?: boolean;
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* ScreenLoader Component
|
|
244
|
-
*
|
|
245
|
-
* A full-screen loading overlay that covers the entire viewport.
|
|
246
|
-
* Features a spinning icon and customizable loading text with
|
|
247
|
-
* smooth fade transitions. Positioned with high z-index to
|
|
248
|
-
* appear above all other content.
|
|
249
|
-
*
|
|
250
|
-
* @param props - Component props
|
|
251
|
-
* @returns JSX element containing the full-screen loader
|
|
252
|
-
*
|
|
253
|
-
* @example
|
|
254
|
-
* ```tsx
|
|
255
|
-
* // Basic usage
|
|
256
|
-
* function App() {
|
|
257
|
-
* const [isLoading, setIsLoading] = useState(true);
|
|
258
|
-
*
|
|
259
|
-
* useEffect(() => {
|
|
260
|
-
* // Simulate loading
|
|
261
|
-
* setTimeout(() => setIsLoading(false), 2000);
|
|
262
|
-
* }, []);
|
|
263
|
-
*
|
|
264
|
-
* return (
|
|
265
|
-
* <div>
|
|
266
|
-
* {isLoading && <ScreenLoader />}
|
|
267
|
-
* <main>Your app content</main>
|
|
268
|
-
* </div>
|
|
269
|
-
* );
|
|
270
|
-
* }
|
|
271
|
-
*
|
|
272
|
-
* // Custom loading text
|
|
273
|
-
* <ScreenLoader loadingText="Preparing your dashboard..." />
|
|
274
|
-
*
|
|
275
|
-
* // Custom styling
|
|
276
|
-
* <ScreenLoader
|
|
277
|
-
* loadingText="Please wait"
|
|
278
|
-
* className="bg-black/80 backdrop-blur-sm"
|
|
279
|
-
* spinnerClassName="size-8 animate-spin text-blue-500"
|
|
280
|
-
* textClassName="text-white text-lg font-semibold"
|
|
281
|
-
* />
|
|
282
|
-
*
|
|
283
|
-
* // With conditional rendering
|
|
284
|
-
* {isSubmitting && (
|
|
285
|
-
* <ScreenLoader
|
|
286
|
-
* loadingText="Submitting form..."
|
|
287
|
-
* className="bg-white/90"
|
|
288
|
-
* />
|
|
289
|
-
* )}
|
|
290
|
-
*
|
|
291
|
-
* // Different spinner sizes
|
|
292
|
-
* <ScreenLoader
|
|
293
|
-
* spinnerClassName="size-12 animate-spin text-purple-600"
|
|
294
|
-
* textClassName="text-purple-600 font-bold"
|
|
295
|
-
* />
|
|
296
|
-
* ```
|
|
297
|
-
*/
|
|
298
|
-
declare function ScreenLoader({ loadingText, className, spinnerClassName, textClassName, contentLoader, }?: ScreenLoaderProps): react_jsx_runtime.JSX.Element;
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* LayoutAuth Component
|
|
302
|
-
*
|
|
303
|
-
* A centered authentication page layout that vertically and horizontally
|
|
304
|
-
* centers its content. Optionally renders a `logo` above the card.
|
|
305
|
-
*
|
|
306
|
-
* @param props - Component props
|
|
307
|
-
* @returns JSX element containing the authentication layout
|
|
308
|
-
*
|
|
309
|
-
* @example
|
|
310
|
-
* ```tsx
|
|
311
|
-
* <LayoutAuth logo={<MyLogo />}>
|
|
312
|
-
* <LoginForm />
|
|
313
|
-
* </LayoutAuth>
|
|
314
|
-
* ```
|
|
315
|
-
*/
|
|
316
|
-
declare function LayoutAuth({ children, className, logo }: BaseProps & {
|
|
317
|
-
logo?: ReactNode;
|
|
318
|
-
}): react_jsx_runtime.JSX.Element;
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* Props interface for the `LayoutBlank` component
|
|
322
|
-
* Inherits `children` and `className` from `BaseProps`, and `Link` from `SharedLink`.
|
|
323
|
-
*/
|
|
324
|
-
interface LayoutBlankProps extends BaseProps {
|
|
325
|
-
/** Optional footer content displayed at the bottom */
|
|
326
|
-
footer?: ReactNode;
|
|
327
|
-
/** Optional logo element displayed at the top */
|
|
328
|
-
logo?: ReactNode;
|
|
329
|
-
/** Destination URL for the logo link */
|
|
330
|
-
logoHref?: string;
|
|
331
|
-
}
|
|
332
|
-
/**
|
|
333
|
-
* LayoutBlank Component
|
|
334
|
-
*
|
|
335
|
-
* A minimal full-screen layout with a subtle background grid and configurable
|
|
336
|
-
* header logo and footer content. Useful for simple landing or blank pages.
|
|
337
|
-
*
|
|
338
|
-
* @param props - Component props
|
|
339
|
-
* @returns JSX element containing the blank layout
|
|
340
|
-
*
|
|
341
|
-
* @example
|
|
342
|
-
* ```tsx
|
|
343
|
-
* <LayoutBlank logo={<Logo />} logoHref="/">
|
|
344
|
-
* <Content />
|
|
345
|
-
* </LayoutBlank>
|
|
346
|
-
* ```
|
|
347
|
-
*/
|
|
348
|
-
declare function LayoutBlank({ children, footer, className, logo, logoHref }: LayoutBlankProps): react_jsx_runtime.JSX.Element;
|
|
349
|
-
|
|
350
|
-
/**
|
|
351
|
-
* Body Component
|
|
352
|
-
*
|
|
353
|
-
* A wrapper component for the HTML body element that applies dynamic
|
|
354
|
-
* class names based on the provided slug. Useful for implementing
|
|
355
|
-
* theme switching, page-specific styling, or mode-based layouts.
|
|
356
|
-
*
|
|
357
|
-
* @param props - Component props
|
|
358
|
-
* @param props.children - Content to render inside the body
|
|
359
|
-
* @param props.slug - Slug used to determine additional class names
|
|
360
|
-
* @param props.className - Additional CSS classes to merge
|
|
361
|
-
* @returns JSX body element with combined class names
|
|
362
|
-
*
|
|
363
|
-
* @example
|
|
364
|
-
* ```tsx
|
|
365
|
-
* // Basic usage with theme slug
|
|
366
|
-
* <Body slug={['dark', 'compact']} className="font-sans">
|
|
367
|
-
* <div>Page content</div>
|
|
368
|
-
* </Body>
|
|
369
|
-
*
|
|
370
|
-
* // With single slug
|
|
371
|
-
* <Body slug="admin" className="bg-gray-100">
|
|
372
|
-
* <AdminPanel />
|
|
373
|
-
* </Body>
|
|
374
|
-
*
|
|
375
|
-
* // Dynamic theme switching
|
|
376
|
-
* function App() {
|
|
377
|
-
* const [theme, setTheme] = useState(['light']);
|
|
378
|
-
*
|
|
379
|
-
* return (
|
|
380
|
-
* <Body slug={theme} className="transition-colors">
|
|
381
|
-
* <ThemeToggle onThemeChange={setTheme} />
|
|
382
|
-
* <MainContent />
|
|
383
|
-
* </Body>
|
|
384
|
-
* );
|
|
385
|
-
* }
|
|
386
|
-
* ```
|
|
387
|
-
*/
|
|
388
|
-
declare function Body({ slug, children, className }: BaseProps & {
|
|
389
|
-
slug: string;
|
|
390
|
-
}): react_jsx_runtime.JSX.Element;
|
|
391
|
-
|
|
392
|
-
/**
|
|
393
|
-
* Coming Soon Component
|
|
394
|
-
* Displays a full-height section with an animated hover background and
|
|
395
|
-
* optional title and description. Ideal for placeholder pages or upcoming
|
|
396
|
-
* feature announcements.
|
|
397
|
-
*/
|
|
398
|
-
/**
|
|
399
|
-
* Props interface for the `ComingSoon` component
|
|
400
|
-
*/
|
|
401
|
-
interface ComingSoonProps {
|
|
402
|
-
/** Additional CSS classes for the wrapper */
|
|
403
|
-
className?: string;
|
|
404
|
-
/** Optional highlighted title text */
|
|
405
|
-
title?: string;
|
|
406
|
-
/** Optional descriptive text below the title */
|
|
407
|
-
description?: string;
|
|
408
|
-
}
|
|
409
|
-
/**
|
|
410
|
-
* ComingSoon Component
|
|
411
|
-
*
|
|
412
|
-
* Renders a full-height container with animated hover background objects
|
|
413
|
-
* and optional title/description content centered on the screen.
|
|
414
|
-
*
|
|
415
|
-
* @param props - Component props
|
|
416
|
-
* @returns JSX element containing the coming soon layout
|
|
417
|
-
*
|
|
418
|
-
* @example
|
|
419
|
-
* ```tsx
|
|
420
|
-
* <ComingSoon title="Coming Soon" description="We are cooking something nice." />
|
|
421
|
-
* ```
|
|
422
|
-
*/
|
|
423
|
-
declare function ComingSoon({ className, title, description }: ComingSoonProps): react_jsx_runtime.JSX.Element;
|
|
424
|
-
|
|
425
|
-
/**
|
|
426
|
-
* Props interface for the `ErrorComponents` component
|
|
427
|
-
*/
|
|
428
|
-
interface ErrorComponentsProps {
|
|
429
|
-
/** Additional CSS classes for the container */
|
|
430
|
-
className?: string;
|
|
431
|
-
/** Error variant to display */
|
|
432
|
-
type?: 'default' | '404' | '500' | 'custom';
|
|
433
|
-
/** Optional title content */
|
|
434
|
-
textTitle?: ReactNode;
|
|
435
|
-
/** Optional subtitle content */
|
|
436
|
-
textSubtitle?: ReactNode;
|
|
437
|
-
/** Optional action button (e.g., retry) */
|
|
438
|
-
button?: ReactNode;
|
|
439
|
-
}
|
|
440
|
-
/**
|
|
441
|
-
* ErrorComponents Component
|
|
442
|
-
*
|
|
443
|
-
* A reusable error layout supporting multiple variants (404, 500, default, custom).
|
|
444
|
-
* Displays illustrations and optional title, subtitle, and button.
|
|
445
|
-
*
|
|
446
|
-
* @param props - Component props
|
|
447
|
-
* @returns JSX element containing the error layout
|
|
448
|
-
*
|
|
449
|
-
* @example
|
|
450
|
-
* ```tsx
|
|
451
|
-
* <ErrorComponents
|
|
452
|
-
* type="404"
|
|
453
|
-
* textTitle="Page not found"
|
|
454
|
-
* textSubtitle="The page you are looking for does not exist."
|
|
455
|
-
* />
|
|
456
|
-
* ```
|
|
457
|
-
*/
|
|
458
|
-
declare function ErrorComponents({ className, type, textTitle, textSubtitle, button, }: ErrorComponentsProps): react_jsx_runtime.JSX.Element;
|
|
459
|
-
|
|
460
|
-
/**
|
|
461
|
-
* Grid Component
|
|
462
|
-
* Renders an SVG grid pattern overlay for background decoration
|
|
463
|
-
* Useful for creating grid-based layouts or visual guides
|
|
464
|
-
*/
|
|
465
|
-
/**
|
|
466
|
-
* Grid Component
|
|
467
|
-
*
|
|
468
|
-
* Renders an SVG-based grid pattern that can be used as a background
|
|
469
|
-
* overlay. The grid is responsive and fills its container while
|
|
470
|
-
* maintaining consistent cell sizes and stroke widths.
|
|
471
|
-
*
|
|
472
|
-
* @param props - Component props
|
|
473
|
-
* @param props.cellSize - Size of each grid cell (default: 12px)
|
|
474
|
-
* @param props.strokeWidth - Width of grid lines (default: 1px)
|
|
475
|
-
* @param props.patternOffset - Grid offset position (default: [0, 0])
|
|
476
|
-
* @param props.className - Additional CSS classes
|
|
477
|
-
* @returns JSX SVG element with grid pattern
|
|
478
|
-
*
|
|
479
|
-
* @example
|
|
480
|
-
* ```tsx
|
|
481
|
-
* // Basic grid overlay
|
|
482
|
-
* <div className="relative">
|
|
483
|
-
* <Grid />
|
|
484
|
-
* <div>Content over grid</div>
|
|
485
|
-
* </div>
|
|
486
|
-
*
|
|
487
|
-
* // Custom grid with larger cells
|
|
488
|
-
* <Grid
|
|
489
|
-
* cellSize={24}
|
|
490
|
-
* strokeWidth={2}
|
|
491
|
-
* className="text-blue-500/20"
|
|
492
|
-
* />
|
|
493
|
-
*
|
|
494
|
-
* // Offset grid pattern
|
|
495
|
-
* <Grid
|
|
496
|
-
* cellSize={16}
|
|
497
|
-
* patternOffset={[8, 8]}
|
|
498
|
-
* className="text-gray-300/30"
|
|
499
|
-
* />
|
|
500
|
-
*
|
|
501
|
-
* // Fine grid for detailed layouts
|
|
502
|
-
* <Grid
|
|
503
|
-
* cellSize={8}
|
|
504
|
-
* strokeWidth={0.5}
|
|
505
|
-
* className="text-slate-400/15"
|
|
506
|
-
* />
|
|
507
|
-
* ```
|
|
508
|
-
*/
|
|
509
|
-
declare function Grid({ cellSize, strokeWidth, patternOffset, className, }: {
|
|
510
|
-
/** Size of each grid cell in pixels */
|
|
511
|
-
cellSize?: number;
|
|
512
|
-
/** Width of the grid lines in pixels */
|
|
513
|
-
strokeWidth?: number;
|
|
514
|
-
/** Offset position for the grid pattern [x, y] */
|
|
515
|
-
patternOffset?: [number, number];
|
|
516
|
-
/** Additional CSS classes to apply to the grid */
|
|
517
|
-
className?: string;
|
|
518
|
-
}): react_jsx_runtime.JSX.Element;
|
|
519
|
-
|
|
520
|
-
/**
|
|
521
|
-
* Props interface for the Section component
|
|
522
|
-
*/
|
|
523
|
-
type SectionProps = {
|
|
524
|
-
/** Additional CSS classes to apply to the section element */
|
|
525
|
-
sectionClassName?: string;
|
|
526
|
-
} & HTMLAttributes<HTMLDivElement>;
|
|
527
|
-
/**
|
|
528
|
-
* Section Component
|
|
529
|
-
*
|
|
530
|
-
* A layout component that creates structured sections with a grid background
|
|
531
|
-
* and decorative corner elements. Provides consistent spacing and visual
|
|
532
|
-
* hierarchy for page content sections.
|
|
533
|
-
*
|
|
534
|
-
* @param props - Component props extending HTMLDivElement attributes
|
|
535
|
-
* @param props.children - Content to render inside the section
|
|
536
|
-
* @param props.sectionClassName - CSS classes for the section element
|
|
537
|
-
* @param props.className - CSS classes for the content container
|
|
538
|
-
* @returns JSX section element with grid background and decorative elements
|
|
539
|
-
*
|
|
540
|
-
* @example
|
|
541
|
-
* ```tsx
|
|
542
|
-
* // Basic section
|
|
543
|
-
* <Section>
|
|
544
|
-
* <h2>Section Title</h2>
|
|
545
|
-
* <p>Section content</p>
|
|
546
|
-
* </Section>
|
|
547
|
-
*
|
|
548
|
-
* // With custom styling
|
|
549
|
-
* <Section
|
|
550
|
-
* sectionClassName="py-16 bg-gray-50"
|
|
551
|
-
* className="text-center"
|
|
552
|
-
* >
|
|
553
|
-
* <Hero />
|
|
554
|
-
* </Section>
|
|
555
|
-
*
|
|
556
|
-
* // Multiple sections
|
|
557
|
-
* <main>
|
|
558
|
-
* <Section sectionClassName="bg-white">
|
|
559
|
-
* <Introduction />
|
|
560
|
-
* </Section>
|
|
561
|
-
* <Section sectionClassName="bg-gray-100">
|
|
562
|
-
* <Features />
|
|
563
|
-
* </Section>
|
|
564
|
-
* <Section sectionClassName="bg-blue-50">
|
|
565
|
-
* <CallToAction />
|
|
566
|
-
* </Section>
|
|
567
|
-
* </main>
|
|
568
|
-
*
|
|
569
|
-
* // With additional props
|
|
570
|
-
* <Section
|
|
571
|
-
* id="about"
|
|
572
|
-
* sectionClassName="scroll-mt-16"
|
|
573
|
-
* className="space-y-8"
|
|
574
|
-
* >
|
|
575
|
-
* <AboutContent />
|
|
576
|
-
* </Section>
|
|
577
|
-
* ```
|
|
578
|
-
*/
|
|
579
|
-
declare const Section: ({ children, sectionClassName, className, ...props }: SectionProps) => react_jsx_runtime.JSX.Element;
|
|
580
|
-
|
|
581
|
-
/**
|
|
582
|
-
* SiteFooter Component
|
|
583
|
-
*
|
|
584
|
-
* A responsive footer component that provides consistent styling
|
|
585
|
-
* and layout for site-wide footer content. Features a top border,
|
|
586
|
-
* responsive padding, and flexible content arrangement.
|
|
587
|
-
*
|
|
588
|
-
* Features:
|
|
589
|
-
* - Responsive design (stacked on mobile, horizontal on desktop)
|
|
590
|
-
* - Consistent container width and padding
|
|
591
|
-
* - Top border for visual separation
|
|
592
|
-
* - Flexible content arrangement
|
|
593
|
-
* - Semantic footer element
|
|
594
|
-
*
|
|
595
|
-
* @param props - Component props
|
|
596
|
-
* @returns JSX element containing the site footer
|
|
597
|
-
*
|
|
598
|
-
* @example
|
|
599
|
-
* ```tsx
|
|
600
|
-
* // Basic usage with copyright and links
|
|
601
|
-
* <SiteFooter>
|
|
602
|
-
* <div className="flex flex-col items-center gap-4 md:flex-row">
|
|
603
|
-
* <p className="text-sm text-muted-foreground">
|
|
604
|
-
* © 2024 Your Company. All rights reserved.
|
|
605
|
-
* </p>
|
|
606
|
-
* <nav className="flex gap-4">
|
|
607
|
-
* <Link href="/privacy" className="text-sm hover:underline">
|
|
608
|
-
* Privacy Policy
|
|
609
|
-
* </Link>
|
|
610
|
-
* <Link href="/terms" className="text-sm hover:underline">
|
|
611
|
-
* Terms of Service
|
|
612
|
-
* </Link>
|
|
613
|
-
* </nav>
|
|
614
|
-
* </div>
|
|
615
|
-
* </SiteFooter>
|
|
616
|
-
*
|
|
617
|
-
* // With social links and newsletter
|
|
618
|
-
* <SiteFooter>
|
|
619
|
-
* <div className="text-sm text-muted-foreground">
|
|
620
|
-
* © 2024 Your Company
|
|
621
|
-
* </div>
|
|
622
|
-
* <div className="flex items-center gap-4">
|
|
623
|
-
* <SocialLinks />
|
|
624
|
-
* <NewsletterSignup />
|
|
625
|
-
* </div>
|
|
626
|
-
* </SiteFooter>
|
|
627
|
-
*
|
|
628
|
-
* // Custom styling
|
|
629
|
-
* <SiteFooter className="bg-gray-50 dark:bg-gray-900">
|
|
630
|
-
* <FooterContent />
|
|
631
|
-
* </SiteFooter>
|
|
632
|
-
* ```
|
|
633
|
-
*/
|
|
634
|
-
declare function SiteFooter({ children, className }: BaseProps): react_jsx_runtime.JSX.Element;
|
|
635
|
-
|
|
636
|
-
/**
|
|
637
|
-
* SiteHeader Component
|
|
638
|
-
*
|
|
639
|
-
* A sticky header component with modern styling including backdrop blur,
|
|
640
|
-
* semi-transparent background, and responsive design. Positioned at the
|
|
641
|
-
* top of the viewport with high z-index for proper layering.
|
|
642
|
-
*
|
|
643
|
-
* Features:
|
|
644
|
-
* - Sticky positioning at top of viewport
|
|
645
|
-
* - Backdrop blur effect for modern appearance
|
|
646
|
-
* - Semi-transparent background with fallback
|
|
647
|
-
* - Bottom border for visual separation
|
|
648
|
-
* - Responsive container with consistent spacing
|
|
649
|
-
* - High z-index for proper layering
|
|
650
|
-
* - Dark mode support
|
|
651
|
-
*
|
|
652
|
-
* @param props - Component props
|
|
653
|
-
* @returns JSX element containing the site header
|
|
654
|
-
*
|
|
655
|
-
* @example
|
|
656
|
-
* ```tsx
|
|
657
|
-
* // Basic usage with logo and navigation
|
|
658
|
-
* <SiteHeader>
|
|
659
|
-
* <div className="flex items-center gap-4">
|
|
660
|
-
* <Logo />
|
|
661
|
-
* <MainNav items={navItems} />
|
|
662
|
-
* </div>
|
|
663
|
-
* <div className="flex items-center gap-2">
|
|
664
|
-
* <ThemeToggle />
|
|
665
|
-
* <UserMenu />
|
|
666
|
-
* </div>
|
|
667
|
-
* </SiteHeader>
|
|
668
|
-
*
|
|
669
|
-
* // With mobile navigation
|
|
670
|
-
* <SiteHeader>
|
|
671
|
-
* <div className="flex items-center gap-4">
|
|
672
|
-
* <MobileNav>
|
|
673
|
-
* <MobileNavItems />
|
|
674
|
-
* </MobileNav>
|
|
675
|
-
* <Logo />
|
|
676
|
-
* <MainNav items={navItems} className="hidden md:flex" />
|
|
677
|
-
* </div>
|
|
678
|
-
* <HeaderActions />
|
|
679
|
-
* </SiteHeader>
|
|
680
|
-
*
|
|
681
|
-
* // Custom styling
|
|
682
|
-
* <SiteHeader className="bg-white/80 border-gray-200">
|
|
683
|
-
* <HeaderContent />
|
|
684
|
-
* </SiteHeader>
|
|
685
|
-
* ```
|
|
686
|
-
*/
|
|
687
|
-
declare function SiteHeader({ className, children }: BaseProps): react_jsx_runtime.JSX.Element;
|
|
688
|
-
|
|
689
|
-
/**
|
|
690
|
-
* MaxWidthWrapper Component
|
|
691
|
-
*
|
|
692
|
-
* A responsive container component that constrains content to a maximum
|
|
693
|
-
* width while providing consistent padding and centering. Ideal for
|
|
694
|
-
* creating readable layouts that work well across different screen sizes.
|
|
695
|
-
*
|
|
696
|
-
* @param props - Component props
|
|
697
|
-
* @param props.className - Additional CSS classes to merge
|
|
698
|
-
* @param props.children - Content to render inside the wrapper
|
|
699
|
-
* @returns JSX div element with max-width constraints and responsive padding
|
|
700
|
-
*
|
|
701
|
-
* @example
|
|
702
|
-
* ```tsx
|
|
703
|
-
* // Basic content wrapper
|
|
704
|
-
* <MaxWidthWrapper>
|
|
705
|
-
* <h1>Page Title</h1>
|
|
706
|
-
* <p>Content that won't exceed the maximum width</p>
|
|
707
|
-
* </MaxWidthWrapper>
|
|
708
|
-
*
|
|
709
|
-
* // With custom styling
|
|
710
|
-
* <MaxWidthWrapper className="bg-gray-50 rounded-lg">
|
|
711
|
-
* <Article />
|
|
712
|
-
* </MaxWidthWrapper>
|
|
713
|
-
*
|
|
714
|
-
* // Multiple sections
|
|
715
|
-
* <main>
|
|
716
|
-
* <MaxWidthWrapper>
|
|
717
|
-
* <Header />
|
|
718
|
-
* </MaxWidthWrapper>
|
|
719
|
-
* <MaxWidthWrapper className="py-8">
|
|
720
|
-
* <MainContent />
|
|
721
|
-
* </MaxWidthWrapper>
|
|
722
|
-
* <MaxWidthWrapper>
|
|
723
|
-
* <Footer />
|
|
724
|
-
* </MaxWidthWrapper>
|
|
725
|
-
* </main>
|
|
726
|
-
*
|
|
727
|
-
* // Nested with other layout components
|
|
728
|
-
* <Section>
|
|
729
|
-
* <MaxWidthWrapper>
|
|
730
|
-
* <Grid>
|
|
731
|
-
* <Card>Content</Card>
|
|
732
|
-
* </Grid>
|
|
733
|
-
* </MaxWidthWrapper>
|
|
734
|
-
* </Section>
|
|
735
|
-
* ```
|
|
736
|
-
*/
|
|
737
|
-
declare function MaxWidthWrapper({ className, children }: BaseProps): react_jsx_runtime.JSX.Element;
|
|
738
|
-
|
|
739
|
-
/**
|
|
740
|
-
* CodeDisplay Component
|
|
741
|
-
*
|
|
742
|
-
* A responsive layout component that displays code examples alongside
|
|
743
|
-
* their rendered output. Features a two-column layout on desktop
|
|
744
|
-
* and stacked layout on mobile devices.
|
|
745
|
-
*
|
|
746
|
-
* @param props - Component props
|
|
747
|
-
* @param props.children - Code content (typically syntax-highlighted)
|
|
748
|
-
* @param props.component - The rendered component to showcase
|
|
749
|
-
* @returns JSX element with side-by-side code and component display
|
|
750
|
-
*
|
|
751
|
-
* @example
|
|
752
|
-
* ```tsx
|
|
753
|
-
* // Basic usage in MDX documentation
|
|
754
|
-
* <CodeDisplay component={<Button>Click me</Button>}>
|
|
755
|
-
* ```tsx
|
|
756
|
-
* <Button>Click me</Button>
|
|
757
|
-
* ```
|
|
758
|
-
* </CodeDisplay>
|
|
759
|
-
*
|
|
760
|
-
* // With complex component
|
|
761
|
-
* <CodeDisplay
|
|
762
|
-
* component={
|
|
763
|
-
* <Card className="w-64">
|
|
764
|
-
* <CardHeader>
|
|
765
|
-
* <CardTitle>Example Card</CardTitle>
|
|
766
|
-
* </CardHeader>
|
|
767
|
-
* <CardContent>
|
|
768
|
-
* <p>Card content here</p>
|
|
769
|
-
* </CardContent>
|
|
770
|
-
* </Card>
|
|
771
|
-
* }
|
|
772
|
-
* >
|
|
773
|
-
* ```tsx
|
|
774
|
-
* <Card className="w-64">
|
|
775
|
-
* <CardHeader>
|
|
776
|
-
* <CardTitle>Example Card</CardTitle>
|
|
777
|
-
* </CardHeader>
|
|
778
|
-
* <CardContent>
|
|
779
|
-
* <p>Card content here</p>
|
|
780
|
-
* </CardContent>
|
|
781
|
-
* </Card>
|
|
782
|
-
* ```
|
|
783
|
-
* </CodeDisplay>
|
|
784
|
-
*
|
|
785
|
-
* // Interactive component showcase
|
|
786
|
-
* <CodeDisplay component={<InteractiveDemo />}>
|
|
787
|
-
* ```tsx
|
|
788
|
-
* function InteractiveDemo() {
|
|
789
|
-
* const [count, setCount] = useState(0);
|
|
790
|
-
* return (
|
|
791
|
-
* <Button onClick={() => setCount(count + 1)}>
|
|
792
|
-
* Clicked {count} times
|
|
793
|
-
* </Button>
|
|
794
|
-
* );
|
|
795
|
-
* }
|
|
796
|
-
* ```
|
|
797
|
-
* </CodeDisplay>
|
|
798
|
-
* ```
|
|
799
|
-
*/
|
|
800
|
-
declare function CodeDisplay({ children, component, }: {
|
|
801
|
-
children: ReactNode;
|
|
802
|
-
component: ReactNode;
|
|
803
|
-
}): react_jsx_runtime.JSX.Element;
|
|
804
|
-
|
|
805
|
-
/**
|
|
806
|
-
* DownloadFile Component
|
|
807
|
-
*
|
|
808
|
-
* A styled download button component that opens files in a new tab
|
|
809
|
-
* with proper security attributes. Features a download icon and
|
|
810
|
-
* rounded button styling.
|
|
811
|
-
*
|
|
812
|
-
* @param props - Component props
|
|
813
|
-
* @param props.children - Button label or content
|
|
814
|
-
* @param props.href - URL of the file to download
|
|
815
|
-
* @param props.className - Additional CSS classes
|
|
816
|
-
* @returns JSX element with download button
|
|
817
|
-
*
|
|
818
|
-
* @example
|
|
819
|
-
* ```tsx
|
|
820
|
-
* // Basic file download
|
|
821
|
-
* <DownloadFile href="/files/document.pdf">
|
|
822
|
-
* Download PDF
|
|
823
|
-
* </DownloadFile>
|
|
824
|
-
*
|
|
825
|
-
* // Custom styling
|
|
826
|
-
* <DownloadFile
|
|
827
|
-
* href="/assets/template.zip"
|
|
828
|
-
* className="bg-blue-600 hover:bg-blue-700"
|
|
829
|
-
* >
|
|
830
|
-
* Download Template
|
|
831
|
-
* </DownloadFile>
|
|
832
|
-
*
|
|
833
|
-
* // Multiple download options
|
|
834
|
-
* <div className="flex gap-4">
|
|
835
|
-
* <DownloadFile href="/files/guide.pdf">
|
|
836
|
-
* User Guide (PDF)
|
|
837
|
-
* </DownloadFile>
|
|
838
|
-
* <DownloadFile href="/files/guide.docx">
|
|
839
|
-
* User Guide (Word)
|
|
840
|
-
* </DownloadFile>
|
|
841
|
-
* </div>
|
|
842
|
-
*
|
|
843
|
-
* // In MDX content
|
|
844
|
-
* Here's the latest version of our software:
|
|
845
|
-
*
|
|
846
|
-
* <DownloadFile href="/releases/app-v2.1.0.zip">
|
|
847
|
-
* Download v2.1.0
|
|
848
|
-
* </DownloadFile>
|
|
849
|
-
* ```
|
|
850
|
-
*/
|
|
851
|
-
declare function DownloadFile({ children, className, href }: BaseProps & {
|
|
852
|
-
href: string;
|
|
853
|
-
}): react_jsx_runtime.JSX.Element;
|
|
854
|
-
|
|
855
|
-
declare function ExtraLink({ Link, href, target, className, children, }: SharedLink & ComponentProps<Link>): react_jsx_runtime.JSX.Element;
|
|
856
|
-
|
|
857
|
-
/**
|
|
858
|
-
* Video Component
|
|
859
|
-
*
|
|
860
|
-
* A styled video component that extends the native HTML video element
|
|
861
|
-
* with consistent styling, responsive design, and automatic controls.
|
|
862
|
-
* Perfect for embedding videos in MDX documentation or content.
|
|
863
|
-
*
|
|
864
|
-
* @param props - Standard HTML video element props
|
|
865
|
-
* @param props.className - Additional CSS classes to merge
|
|
866
|
-
* @returns JSX video element with enhanced styling
|
|
867
|
-
*
|
|
868
|
-
* @example
|
|
869
|
-
* ```tsx
|
|
870
|
-
* // Basic video with source
|
|
871
|
-
* <Video src="/videos/demo.mp4" />
|
|
872
|
-
*
|
|
873
|
-
* // Video with multiple sources
|
|
874
|
-
* <Video>
|
|
875
|
-
* <source src="/videos/demo.webm" type="video/webm" />
|
|
876
|
-
* <source src="/videos/demo.mp4" type="video/mp4" />
|
|
877
|
-
* Your browser does not support the video tag.
|
|
878
|
-
* </Video>
|
|
879
|
-
*
|
|
880
|
-
* // Custom styling
|
|
881
|
-
* <Video
|
|
882
|
-
* src="/videos/tutorial.mp4"
|
|
883
|
-
* className="max-w-md mx-auto"
|
|
884
|
-
* />
|
|
885
|
-
*
|
|
886
|
-
* // With additional attributes
|
|
887
|
-
* <Video
|
|
888
|
-
* src="/videos/background.mp4"
|
|
889
|
-
* autoPlay
|
|
890
|
-
* muted
|
|
891
|
-
* playsInline
|
|
892
|
-
* className="w-full h-64 object-cover"
|
|
893
|
-
* />
|
|
894
|
-
*
|
|
895
|
-
* // In MDX content
|
|
896
|
-
* Here's a demonstration of the feature:
|
|
897
|
-
*
|
|
898
|
-
* <Video src="/demos/feature-walkthrough.mp4" />
|
|
899
|
-
* ```
|
|
900
|
-
*/
|
|
901
|
-
declare function Video({ className, ...props }: ComponentProps<'video'>): react_jsx_runtime.JSX.Element;
|
|
902
|
-
|
|
903
|
-
/**
|
|
904
|
-
* Wrapper Component
|
|
905
|
-
*
|
|
906
|
-
* A decorative container component with gradient background and border styling.
|
|
907
|
-
* Features a radial gradient from blue with transparency and responsive design.
|
|
908
|
-
* Ideal for highlighting important content, callouts, or special sections in MDX.
|
|
909
|
-
*
|
|
910
|
-
* @param props - Component props
|
|
911
|
-
* @param props.children - Content to render inside the wrapper
|
|
912
|
-
* @param props.className - Additional CSS classes to merge
|
|
913
|
-
* @returns JSX element with styled wrapper container
|
|
914
|
-
*
|
|
915
|
-
* @example
|
|
916
|
-
* ```tsx
|
|
917
|
-
* // Basic content wrapper
|
|
918
|
-
* <Wrapper>
|
|
919
|
-
* <h3>Important Notice</h3>
|
|
920
|
-
* <p>This is highlighted content that stands out from the rest.</p>
|
|
921
|
-
* </Wrapper>
|
|
922
|
-
*
|
|
923
|
-
* // Custom styling
|
|
924
|
-
* <Wrapper className="my-8 text-center">
|
|
925
|
-
* <blockquote>
|
|
926
|
-
* "This is a featured quote or testimonial."
|
|
927
|
-
* </blockquote>
|
|
928
|
-
* </Wrapper>
|
|
929
|
-
*
|
|
930
|
-
* // Code example highlight
|
|
931
|
-
* <Wrapper>
|
|
932
|
-
* <h4>Pro Tip</h4>
|
|
933
|
-
* <p>Use this pattern for better performance:</p>
|
|
934
|
-
* <code>const memoizedValue = useMemo(() => expensiveCalculation(), [deps]);</code>
|
|
935
|
-
* </Wrapper>
|
|
936
|
-
*
|
|
937
|
-
* // In MDX content for callouts
|
|
938
|
-
* <Wrapper>
|
|
939
|
-
* **Warning:** This feature is experimental and may change in future versions.
|
|
940
|
-
* </Wrapper>
|
|
941
|
-
*
|
|
942
|
-
* // Multiple wrappers for different content types
|
|
943
|
-
* <div className="space-y-6">
|
|
944
|
-
* <Wrapper>
|
|
945
|
-
* <h3>Feature Highlight</h3>
|
|
946
|
-
* <p>New functionality description</p>
|
|
947
|
-
* </Wrapper>
|
|
948
|
-
* <Wrapper className="border-green-200 bg-green-50">
|
|
949
|
-
* <h3>Success Story</h3>
|
|
950
|
-
* <p>Customer testimonial</p>
|
|
951
|
-
* </Wrapper>
|
|
952
|
-
* </div>
|
|
953
|
-
* ```
|
|
954
|
-
*/
|
|
955
|
-
declare function Wrapper({ children, className }: BaseProps): react_jsx_runtime.JSX.Element;
|
|
956
|
-
|
|
957
|
-
/**
|
|
958
|
-
* Youtube Component
|
|
959
|
-
* Embeds YouTube videos in MDX content with responsive design
|
|
960
|
-
* Features 16:9 aspect ratio and rounded corners for consistent styling
|
|
961
|
-
*/
|
|
962
|
-
/**
|
|
963
|
-
* Youtube Component
|
|
964
|
-
*
|
|
965
|
-
* Embeds YouTube videos using an iframe with responsive design and
|
|
966
|
-
* consistent styling. Automatically maintains 16:9 aspect ratio
|
|
967
|
-
* and includes proper accessibility attributes.
|
|
968
|
-
*
|
|
969
|
-
* @param props - Component props
|
|
970
|
-
* @param props.id - YouTube video ID (the part after 'v=' in YouTube URLs)
|
|
971
|
-
* @returns JSX iframe element for YouTube video embedding
|
|
972
|
-
*
|
|
973
|
-
* @example
|
|
974
|
-
* ```tsx
|
|
975
|
-
* // Basic YouTube video embed
|
|
976
|
-
* <Youtube id="dQw4w9WgXcQ" />
|
|
977
|
-
*
|
|
978
|
-
* // Extract ID from YouTube URL
|
|
979
|
-
* // URL: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
980
|
-
* // ID: dQw4w9WgXcQ
|
|
981
|
-
* <Youtube id="dQw4w9WgXcQ" />
|
|
982
|
-
*
|
|
983
|
-
* // In MDX content
|
|
984
|
-
* Here's a tutorial video:
|
|
985
|
-
*
|
|
986
|
-
* <Youtube id="ScMzIvxBSi4" />
|
|
987
|
-
*
|
|
988
|
-
* // Multiple videos in sequence
|
|
989
|
-
* <div className="space-y-8">
|
|
990
|
-
* <div>
|
|
991
|
-
* <h3>Introduction</h3>
|
|
992
|
-
* <Youtube id="intro-video-id" />
|
|
993
|
-
* </div>
|
|
994
|
-
* <div>
|
|
995
|
-
* <h3>Advanced Tutorial</h3>
|
|
996
|
-
* <Youtube id="advanced-video-id" />
|
|
997
|
-
* </div>
|
|
998
|
-
* </div>
|
|
999
|
-
*
|
|
1000
|
-
* // With surrounding content
|
|
1001
|
-
* ## Video Tutorial
|
|
1002
|
-
*
|
|
1003
|
-
* Watch this comprehensive guide to get started:
|
|
1004
|
-
*
|
|
1005
|
-
* <Youtube id="tutorial-video-id" />
|
|
1006
|
-
*
|
|
1007
|
-
* After watching the video, you can proceed to the next section.
|
|
1008
|
-
* ```
|
|
1009
|
-
*/
|
|
1010
|
-
declare function Youtube({ id }: {
|
|
1011
|
-
id: string;
|
|
1012
|
-
}): react_jsx_runtime.JSX.Element;
|
|
1013
|
-
|
|
1014
|
-
/**
|
|
1015
|
-
* Shared Component Types and Default Implementations
|
|
1016
|
-
* Provides reusable component interfaces and default implementations
|
|
1017
|
-
* for common UI elements like images, links, and navigation
|
|
1018
|
-
*/
|
|
1019
|
-
|
|
1020
|
-
/**
|
|
1021
|
-
* Interface for components that accept a custom Image component
|
|
1022
|
-
* Allows injection of custom image implementations (e.g., Next.js Image)
|
|
1023
|
-
*/
|
|
1024
|
-
interface SharedImage {
|
|
1025
|
-
/** Custom Image component implementation */
|
|
1026
|
-
Image?: Image;
|
|
1027
|
-
}
|
|
1028
|
-
/**
|
|
1029
|
-
* Interface for components that accept a custom Link component
|
|
1030
|
-
* Allows injection of custom link implementations (e.g., Next.js Link)
|
|
1031
|
-
*/
|
|
1032
|
-
interface SharedLink {
|
|
1033
|
-
/** Custom Link component implementation */
|
|
1034
|
-
Link?: Link;
|
|
1035
|
-
}
|
|
1036
|
-
/**
|
|
1037
|
-
* Interface for components that accept a custom navigation function
|
|
1038
|
-
* Allows injection of custom navigation implementations (e.g., Next.js router)
|
|
1039
|
-
*/
|
|
1040
|
-
interface SharedNavigate {
|
|
1041
|
-
/** Custom navigation function */
|
|
1042
|
-
navigate?: (href: string) => void;
|
|
1043
|
-
}
|
|
1044
|
-
/**
|
|
1045
|
-
* Default Image Component
|
|
1046
|
-
*
|
|
1047
|
-
* A basic HTML img element implementation that serves as the default
|
|
1048
|
-
* when no custom Image component is provided. Supports standard
|
|
1049
|
-
* image attributes and CSS classes.
|
|
1050
|
-
*
|
|
1051
|
-
* @param props - Image component props
|
|
1052
|
-
* @param props.src - Source URL of the image
|
|
1053
|
-
* @param props.alt - Alt text for accessibility
|
|
1054
|
-
* @param props.className - Additional CSS classes
|
|
1055
|
-
* @returns JSX element containing a standard img tag
|
|
1056
|
-
*
|
|
1057
|
-
* @example
|
|
1058
|
-
* ```tsx
|
|
1059
|
-
* // Basic usage
|
|
1060
|
-
* <DefaultImage
|
|
1061
|
-
* src="/images/logo.png"
|
|
1062
|
-
* alt="Company Logo"
|
|
1063
|
-
* className="w-32 h-auto"
|
|
1064
|
-
* />
|
|
1065
|
-
* ```
|
|
1066
|
-
*/
|
|
1067
|
-
declare const DefaultImage: Image;
|
|
1068
|
-
/**
|
|
1069
|
-
* Default Link Component
|
|
1070
|
-
*
|
|
1071
|
-
* A basic HTML anchor element implementation that serves as the default
|
|
1072
|
-
* when no custom Link component is provided. Supports standard
|
|
1073
|
-
* link attributes and CSS classes.
|
|
1074
|
-
*
|
|
1075
|
-
* @param props - Link component props
|
|
1076
|
-
* @param props.href - Destination URL
|
|
1077
|
-
* @param props.className - Additional CSS classes
|
|
1078
|
-
* @param props.children - Link content
|
|
1079
|
-
* @returns JSX element containing a standard anchor tag
|
|
1080
|
-
*
|
|
1081
|
-
* @example
|
|
1082
|
-
* ```tsx
|
|
1083
|
-
* // Basic usage
|
|
1084
|
-
* <DefaultLink
|
|
1085
|
-
* href="/about"
|
|
1086
|
-
* className="text-blue-600 hover:underline"
|
|
1087
|
-
* >
|
|
1088
|
-
* About Us
|
|
1089
|
-
* </DefaultLink>
|
|
1090
|
-
* ```
|
|
1091
|
-
*/
|
|
1092
|
-
declare const DefaultLink: Link;
|
|
1093
|
-
/**
|
|
1094
|
-
* Default Navigation Function
|
|
1095
|
-
*
|
|
1096
|
-
* A basic navigation implementation using window.location.href
|
|
1097
|
-
* that serves as the default when no custom navigation function
|
|
1098
|
-
* is provided. Performs a full page navigation.
|
|
1099
|
-
*
|
|
1100
|
-
* @param href - Destination URL to navigate to
|
|
1101
|
-
*
|
|
1102
|
-
* @example
|
|
1103
|
-
* ```tsx
|
|
1104
|
-
* // Basic usage
|
|
1105
|
-
* const handleNavigation = () => {
|
|
1106
|
-
* DefaultNavigate('/dashboard');
|
|
1107
|
-
* };
|
|
1108
|
-
*
|
|
1109
|
-
* // In a component
|
|
1110
|
-
* <button onClick={() => DefaultNavigate('/contact')}>
|
|
1111
|
-
* Contact Us
|
|
1112
|
-
* </button>
|
|
1113
|
-
* ```
|
|
1114
|
-
*/
|
|
1115
|
-
declare const DefaultNavigate: (href: string) => void;
|
|
1116
|
-
|
|
1117
|
-
/**
|
|
1118
|
-
* Props interface for the BackLink component
|
|
1119
|
-
*/
|
|
1120
|
-
interface BackLinkProps extends SharedLink, BaseProps {
|
|
1121
|
-
/** URL to navigate back to */
|
|
1122
|
-
href: string;
|
|
1123
|
-
}
|
|
1124
|
-
/**
|
|
1125
|
-
* BackLink Component
|
|
1126
|
-
*
|
|
1127
|
-
* A navigation component that provides a styled back link with a chevron icon
|
|
1128
|
-
* and smooth hover animations. Features a secondary button with icon and
|
|
1129
|
-
* customizable link component support.
|
|
1130
|
-
*
|
|
1131
|
-
* @param props - Component props
|
|
1132
|
-
* @param props.Link - Custom link component (defaults to DefaultLink)
|
|
1133
|
-
* @param props.children - Text content for the back link
|
|
1134
|
-
* @param props.href - Destination URL for the back navigation
|
|
1135
|
-
* @param props.className - Additional CSS classes
|
|
1136
|
-
* @returns JSX element with back navigation link
|
|
1137
|
-
*
|
|
1138
|
-
* @example
|
|
1139
|
-
* ```tsx
|
|
1140
|
-
* // Basic back link
|
|
1141
|
-
* <BackLink href="/dashboard">
|
|
1142
|
-
* Back to Dashboard
|
|
1143
|
-
* </BackLink>
|
|
1144
|
-
*
|
|
1145
|
-
* // With custom Link component (Next.js)
|
|
1146
|
-
* <BackLink Link={NextLink} href="/products">
|
|
1147
|
-
* Back to Products
|
|
1148
|
-
* </BackLink>
|
|
1149
|
-
*
|
|
1150
|
-
* // Custom styling
|
|
1151
|
-
* <BackLink
|
|
1152
|
-
* href="/settings"
|
|
1153
|
-
* className="text-blue-600 hover:text-blue-800"
|
|
1154
|
-
* >
|
|
1155
|
-
* Back to Settings
|
|
1156
|
-
* </BackLink>
|
|
1157
|
-
*
|
|
1158
|
-
* // In breadcrumb navigation
|
|
1159
|
-
* <nav className="flex items-center space-x-2">
|
|
1160
|
-
* <BackLink href="/docs">
|
|
1161
|
-
* Documentation
|
|
1162
|
-
* </BackLink>
|
|
1163
|
-
* <span>/</span>
|
|
1164
|
-
* <span>Current Page</span>
|
|
1165
|
-
* </nav>
|
|
1166
|
-
*
|
|
1167
|
-
* // Dynamic back navigation
|
|
1168
|
-
* function ProductDetail({ productId }: { productId: string }) {
|
|
1169
|
-
* return (
|
|
1170
|
-
* <div>
|
|
1171
|
-
* <BackLink href={`/category/${categoryId}`}>
|
|
1172
|
-
* Back to Category
|
|
1173
|
-
* </BackLink>
|
|
1174
|
-
* <h1>Product Details</h1>
|
|
1175
|
-
* </div>
|
|
1176
|
-
* );
|
|
1177
|
-
* }
|
|
1178
|
-
* ```
|
|
1179
|
-
*/
|
|
1180
|
-
declare function BackLink({ Link, children, href, className }: BackLinkProps): react_jsx_runtime.JSX.Element;
|
|
1181
|
-
|
|
1182
|
-
/**
|
|
1183
|
-
* Props interface for the CommandMenu component
|
|
1184
|
-
* Extends DialogProps from Radix UI for full dialog customization
|
|
1185
|
-
*/
|
|
1186
|
-
interface CommandMenuProps extends DialogProps {
|
|
1187
|
-
/** Child elements to render inside the command list (command items, groups, etc.) */
|
|
1188
|
-
children: React$1.ReactNode;
|
|
1189
|
-
/** Additional CSS classes for the trigger button */
|
|
1190
|
-
classButton?: string;
|
|
1191
|
-
/** Additional CSS classes for the command dialog */
|
|
1192
|
-
classDialog?: string;
|
|
1193
|
-
/** Text displayed on the search trigger button */
|
|
1194
|
-
searchButtonText?: string;
|
|
1195
|
-
/** Placeholder text for the command input field */
|
|
1196
|
-
commandInputPlaceholder?: string;
|
|
1197
|
-
/** Keyboard shortcut hint displayed on the button (e.g., "⌘K", "Ctrl+K") */
|
|
1198
|
-
keyHint?: string;
|
|
1199
|
-
}
|
|
1200
|
-
/**
|
|
1201
|
-
* CommandMenu Component
|
|
1202
|
-
*
|
|
1203
|
-
* A comprehensive command palette that provides users with quick access to application
|
|
1204
|
-
* features through keyboard shortcuts and search. Automatically tracks user interactions
|
|
1205
|
-
* for analytics and provides a responsive, accessible interface.
|
|
1206
|
-
*
|
|
1207
|
-
* The component listens for keyboard shortcuts (Cmd+K, Ctrl+K, /) and opens a dialog
|
|
1208
|
-
* with a search input and command list. It intelligently avoids triggering when the
|
|
1209
|
-
* user is typing in form fields or content-editable areas.
|
|
1210
|
-
*
|
|
1211
|
-
* @param props - Component props extending DialogProps
|
|
1212
|
-
* @returns JSX element containing the command menu trigger and dialog
|
|
1213
|
-
*
|
|
1214
|
-
* @example
|
|
1215
|
-
* ```tsx
|
|
1216
|
-
* // Basic usage with command items
|
|
1217
|
-
* <CommandMenu>
|
|
1218
|
-
* <CommandGroup heading="Navigation">
|
|
1219
|
-
* <CommandItem onSelect={() => router.push('/')}>
|
|
1220
|
-
* <IconHome className="mr-2 h-4 w-4" />
|
|
1221
|
-
* <span>Home</span>
|
|
1222
|
-
* </CommandItem>
|
|
1223
|
-
* <CommandItem onSelect={() => router.push('/dashboard')}>
|
|
1224
|
-
* <IconDashboard className="mr-2 h-4 w-4" />
|
|
1225
|
-
* <span>Dashboard</span>
|
|
1226
|
-
* </CommandItem>
|
|
1227
|
-
* </CommandGroup>
|
|
1228
|
-
*
|
|
1229
|
-
* <CommandGroup heading="Actions">
|
|
1230
|
-
* <CommandItem onSelect={() => setTheme('dark')}>
|
|
1231
|
-
* <IconMoon className="mr-2 h-4 w-4" />
|
|
1232
|
-
* <span>Toggle Dark Mode</span>
|
|
1233
|
-
* </CommandItem>
|
|
1234
|
-
* </CommandGroup>
|
|
1235
|
-
* </CommandMenu>
|
|
1236
|
-
*
|
|
1237
|
-
* // Custom styling and text
|
|
1238
|
-
* <CommandMenu
|
|
1239
|
-
* searchButtonText="Search commands..."
|
|
1240
|
-
* commandInputPlaceholder="What would you like to do?"
|
|
1241
|
-
* keyHint="⌘K"
|
|
1242
|
-
* classButton="w-64 bg-gray-50"
|
|
1243
|
-
* classDialog="max-w-2xl"
|
|
1244
|
-
* >
|
|
1245
|
-
* <CommandEmpty>No results found.</CommandEmpty>
|
|
1246
|
-
* <CommandGroup heading="Quick Actions">
|
|
1247
|
-
* <CommandItem onSelect={handleCreateNew}>
|
|
1248
|
-
* <IconPlus className="mr-2 h-4 w-4" />
|
|
1249
|
-
* <span>Create New Project</span>
|
|
1250
|
-
* <CommandShortcut>⌘N</CommandShortcut>
|
|
1251
|
-
* </CommandItem>
|
|
1252
|
-
* </CommandGroup>
|
|
1253
|
-
* </CommandMenu>
|
|
1254
|
-
*
|
|
1255
|
-
* // With search functionality
|
|
1256
|
-
* <CommandMenu
|
|
1257
|
-
* searchButtonText="Search docs..."
|
|
1258
|
-
* commandInputPlaceholder="Search documentation..."
|
|
1259
|
-
* >
|
|
1260
|
-
* <CommandEmpty>No documentation found.</CommandEmpty>
|
|
1261
|
-
* <CommandGroup heading="Documentation">
|
|
1262
|
-
* {docs.map((doc) => (
|
|
1263
|
-
* <CommandItem
|
|
1264
|
-
* key={doc.id}
|
|
1265
|
-
* onSelect={() => router.push(`/docs/${doc.slug}`)}
|
|
1266
|
-
* >
|
|
1267
|
-
* <IconBook className="mr-2 h-4 w-4" />
|
|
1268
|
-
* <span>{doc.title}</span>
|
|
1269
|
-
* </CommandItem>
|
|
1270
|
-
* ))}
|
|
1271
|
-
* </CommandGroup>
|
|
1272
|
-
* </CommandMenu>
|
|
1273
|
-
* ```
|
|
1274
|
-
*/
|
|
1275
|
-
declare function CommandMenu({ children, classButton, classDialog, searchButtonText, commandInputPlaceholder, keyHint, ...props }: CommandMenuProps): react_jsx_runtime.JSX.Element;
|
|
1276
|
-
|
|
1277
|
-
/**
|
|
1278
|
-
* Interface defining the structure of a navigation item
|
|
1279
|
-
*/
|
|
1280
|
-
interface NavItem {
|
|
1281
|
-
/** Display text for the navigation item */
|
|
1282
|
-
title: string;
|
|
1283
|
-
/** URL path for the navigation item */
|
|
1284
|
-
href?: string;
|
|
1285
|
-
/** Whether the link opens in a new tab */
|
|
1286
|
-
external?: boolean;
|
|
1287
|
-
/** Optional icon to display alongside the title */
|
|
1288
|
-
icon?: React.ComponentType<React.SVGProps<SVGSVGElement>>;
|
|
1289
|
-
/** Child navigation items for dropdown menus */
|
|
1290
|
-
children?: NavItem[];
|
|
1291
|
-
}
|
|
1292
|
-
/**
|
|
1293
|
-
* Props interface for the MainNav component
|
|
1294
|
-
*/
|
|
1295
|
-
interface NavigationProps extends SharedLink {
|
|
1296
|
-
/** Current pathname */
|
|
1297
|
-
pathname: string;
|
|
1298
|
-
/** Array of navigation items to display */
|
|
1299
|
-
items: NavItem[];
|
|
1300
|
-
/** Additional CSS classes for the navigation container */
|
|
1301
|
-
className?: string;
|
|
1302
|
-
}
|
|
1303
|
-
/**
|
|
1304
|
-
* MainNav Component
|
|
1305
|
-
*
|
|
1306
|
-
* A responsive navigation component that supports multi-level dropdown menus,
|
|
1307
|
-
* active state detection, and analytics tracking. Hidden on mobile devices
|
|
1308
|
-
* and typically used in the site header.
|
|
1309
|
-
*
|
|
1310
|
-
* Features:
|
|
1311
|
-
* - Multi-level dropdown menus (up to 3 levels)
|
|
1312
|
-
* - Active state detection for current page
|
|
1313
|
-
* - External link indicators
|
|
1314
|
-
* - Analytics tracking for menu interactions
|
|
1315
|
-
* - Responsive design (hidden on mobile)
|
|
1316
|
-
* - Keyboard navigation support
|
|
1317
|
-
*
|
|
1318
|
-
* @param props - Component props
|
|
1319
|
-
* @returns JSX element containing the navigation menu
|
|
1320
|
-
*
|
|
1321
|
-
* @example
|
|
1322
|
-
* ```tsx
|
|
1323
|
-
* const navItems: NavItem[] = [
|
|
1324
|
-
* {
|
|
1325
|
-
* title: 'Home',
|
|
1326
|
-
* href: '/',
|
|
1327
|
-
* },
|
|
1328
|
-
* {
|
|
1329
|
-
* title: 'Products',
|
|
1330
|
-
* children: [
|
|
1331
|
-
* { title: 'Web Apps', href: '/products/web' },
|
|
1332
|
-
* { title: 'Mobile Apps', href: '/products/mobile' },
|
|
1333
|
-
* {
|
|
1334
|
-
* title: 'Enterprise',
|
|
1335
|
-
* children: [
|
|
1336
|
-
* { title: 'SaaS Solutions', href: '/products/enterprise/saas' },
|
|
1337
|
-
* { title: 'Custom Development', href: '/products/enterprise/custom' }
|
|
1338
|
-
* ]
|
|
1339
|
-
* }
|
|
1340
|
-
* ]
|
|
1341
|
-
* },
|
|
1342
|
-
* {
|
|
1343
|
-
* title: 'Documentation',
|
|
1344
|
-
* href: 'https://docs.example.com',
|
|
1345
|
-
* external: true,
|
|
1346
|
-
* icon: <IconBook className="w-4 h-4" />
|
|
1347
|
-
* }
|
|
1348
|
-
* ];
|
|
1349
|
-
*
|
|
1350
|
-
* <MainNav items={navItems} />
|
|
1351
|
-
* ```
|
|
1352
|
-
*/
|
|
1353
|
-
declare function MainNav({ Link, pathname, items, className }: NavigationProps): react_jsx_runtime.JSX.Element;
|
|
1354
|
-
declare function handleMenuClick(item: NavItem): void;
|
|
1355
|
-
|
|
1356
|
-
/**
|
|
1357
|
-
* MobileNav Component
|
|
1358
|
-
*
|
|
1359
|
-
* A mobile-optimized navigation component that uses a drawer interface
|
|
1360
|
-
* for space-efficient menu display on small screens. Automatically
|
|
1361
|
-
* manages meta theme color changes when the drawer opens/closes.
|
|
1362
|
-
*
|
|
1363
|
-
* Features:
|
|
1364
|
-
* - Drawer-based interface for mobile screens
|
|
1365
|
-
* - Meta theme color management
|
|
1366
|
-
* - Responsive design (hidden on desktop)
|
|
1367
|
-
* - Accessible with proper ARIA labels
|
|
1368
|
-
* - Smooth open/close animations
|
|
1369
|
-
* - Scrollable content area
|
|
1370
|
-
*
|
|
1371
|
-
* @param props - Component props
|
|
1372
|
-
* @returns JSX element containing the mobile navigation drawer
|
|
1373
|
-
*
|
|
1374
|
-
* @example
|
|
1375
|
-
* ```tsx
|
|
1376
|
-
* // Basic usage with navigation items
|
|
1377
|
-
* <MobileNav>
|
|
1378
|
-
* <div className="space-y-4">
|
|
1379
|
-
* <MobileNavItemRenderer
|
|
1380
|
-
* item={{ title: 'Home', href: '/' }}
|
|
1381
|
-
* onOpenChange={setOpen}
|
|
1382
|
-
* level={1}
|
|
1383
|
-
* />
|
|
1384
|
-
* <MobileNavItemRenderer
|
|
1385
|
-
* item={{
|
|
1386
|
-
* title: 'Products',
|
|
1387
|
-
* children: [
|
|
1388
|
-
* { title: 'Web Apps', href: '/products/web' },
|
|
1389
|
-
* { title: 'Mobile Apps', href: '/products/mobile' }
|
|
1390
|
-
* ]
|
|
1391
|
-
* }}
|
|
1392
|
-
* onOpenChange={setOpen}
|
|
1393
|
-
* level={1}
|
|
1394
|
-
* />
|
|
1395
|
-
* </div>
|
|
1396
|
-
* </MobileNav>
|
|
1397
|
-
*
|
|
1398
|
-
* // With custom content
|
|
1399
|
-
* <MobileNav className="border-l border-gray-200">
|
|
1400
|
-
* <div className="space-y-6">
|
|
1401
|
-
* <NavigationItems />
|
|
1402
|
-
* <UserProfile />
|
|
1403
|
-
* <ThemeToggle />
|
|
1404
|
-
* </div>
|
|
1405
|
-
* </MobileNav>
|
|
1406
|
-
* ```
|
|
1407
|
-
*/
|
|
1408
|
-
declare function MobileNav({ children, className }: BaseProps): react_jsx_runtime.JSX.Element;
|
|
1409
|
-
interface MobileNavItemRendererProps extends SharedLink, SharedNavigate {
|
|
1410
|
-
item: NavItem;
|
|
1411
|
-
pathname: string | null;
|
|
1412
|
-
level: number;
|
|
1413
|
-
onOpenChange: (open: boolean) => void;
|
|
1414
|
-
}
|
|
1415
|
-
declare function MobileNavItemRenderer({ Link, navigate, item, pathname, level, onOpenChange, }: MobileNavItemRendererProps): react_jsx_runtime.JSX.Element;
|
|
1416
|
-
|
|
1417
|
-
/**
|
|
1418
|
-
* React Query provider component with optimized configuration
|
|
1419
|
-
*
|
|
1420
|
-
* This provider sets up TanStack Query with:
|
|
1421
|
-
* - Global error handling with toast notifications
|
|
1422
|
-
* - Optimized caching and retry strategies
|
|
1423
|
-
* - Background refetching configuration
|
|
1424
|
-
* - Stale time and garbage collection settings
|
|
1425
|
-
*
|
|
1426
|
-
* @param props - Component props containing children
|
|
1427
|
-
* @returns JSX element wrapping children with QueryClient context
|
|
1428
|
-
*
|
|
1429
|
-
* @example
|
|
1430
|
-
* ```tsx
|
|
1431
|
-
* // Wrap your app with QueryProvider
|
|
1432
|
-
* function App() {
|
|
1433
|
-
* return (
|
|
1434
|
-
* <QueryProvider>
|
|
1435
|
-
* <YourAppComponents />
|
|
1436
|
-
* </QueryProvider>
|
|
1437
|
-
* );
|
|
1438
|
-
* }
|
|
1439
|
-
*
|
|
1440
|
-
* // Use React Query hooks in child components
|
|
1441
|
-
* function UserProfile() {
|
|
1442
|
-
* const { data, isLoading, error } = useQuery({
|
|
1443
|
-
* queryKey: ['user', userId],
|
|
1444
|
-
* queryFn: () => fetchUser(userId)
|
|
1445
|
-
* });
|
|
1446
|
-
*
|
|
1447
|
-
* if (isLoading) return <div>Loading...</div>;
|
|
1448
|
-
* if (error) return <div>Error occurred</div>; // Error toast will show automatically
|
|
1449
|
-
*
|
|
1450
|
-
* return <div>{data.name}</div>;
|
|
1451
|
-
* }
|
|
1452
|
-
* ```
|
|
1453
|
-
*/
|
|
1454
|
-
declare const QueryProvider: ({ client: clientProps, children, }: {
|
|
1455
|
-
client?: QueryClient;
|
|
1456
|
-
children: ReactNode;
|
|
1457
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
1458
|
-
|
|
1459
|
-
/**
|
|
1460
|
-
* Props interface for ThemeProvider component
|
|
1461
|
-
* Extends NextThemesProvider props for full compatibility
|
|
1462
|
-
*/
|
|
1463
|
-
interface ThemeProviderProps extends React$1.ComponentProps<typeof ThemeProvider$1> {
|
|
1464
|
-
/** Child components that will have access to theme context */
|
|
1465
|
-
children: React$1.ReactNode;
|
|
1466
|
-
}
|
|
1467
|
-
/**
|
|
1468
|
-
* Application theme provider component
|
|
1469
|
-
*
|
|
1470
|
-
* This provider sets up theme management with:
|
|
1471
|
-
* - Light, dark, and system theme support
|
|
1472
|
-
* - Automatic system preference detection
|
|
1473
|
-
* - Smooth theme transitions
|
|
1474
|
-
* - Integration with tooltip provider
|
|
1475
|
-
* - CSS class-based theme switching
|
|
1476
|
-
*
|
|
1477
|
-
* The provider integrates with the application's theme configuration
|
|
1478
|
-
* and provides a consistent theming experience across all components.
|
|
1479
|
-
*
|
|
1480
|
-
* @param props - Component props extending NextThemesProvider props
|
|
1481
|
-
* @returns JSX element wrapping children with theme and tooltip context
|
|
1482
|
-
*
|
|
1483
|
-
* @example
|
|
1484
|
-
* ```tsx
|
|
1485
|
-
* // Basic usage - wrap your app root
|
|
1486
|
-
* function App() {
|
|
1487
|
-
* return (
|
|
1488
|
-
* <ThemeProvider>
|
|
1489
|
-
* <YourAppComponents />
|
|
1490
|
-
* </ThemeProvider>
|
|
1491
|
-
* );
|
|
1492
|
-
* }
|
|
1493
|
-
*
|
|
1494
|
-
* // With custom configuration
|
|
1495
|
-
* function App() {
|
|
1496
|
-
* return (
|
|
1497
|
-
* <ThemeProvider
|
|
1498
|
-
* defaultTheme="dark"
|
|
1499
|
-
* storageKey="custom-theme"
|
|
1500
|
-
* >
|
|
1501
|
-
* <YourAppComponents />
|
|
1502
|
-
* </ThemeProvider>
|
|
1503
|
-
* );
|
|
1504
|
-
* }
|
|
1505
|
-
*
|
|
1506
|
-
* // Use theme in child components
|
|
1507
|
-
* function ThemeToggle() {
|
|
1508
|
-
* const { theme, setTheme } = useTheme();
|
|
1509
|
-
*
|
|
1510
|
-
* return (
|
|
1511
|
-
* <select value={theme} onChange={(e) => setTheme(e.target.value)}>
|
|
1512
|
-
* <option value="light">Light</option>
|
|
1513
|
-
* <option value="dark">Dark</option>
|
|
1514
|
-
* <option value="system">System</option>
|
|
1515
|
-
* </select>
|
|
1516
|
-
* );
|
|
1517
|
-
* }
|
|
1518
|
-
* ```
|
|
1519
|
-
*/
|
|
1520
|
-
declare function ThemeProvider({ children, ...props }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
1521
|
-
|
|
1522
|
-
/**
|
|
1523
|
-
* Props interface for the Announcement component
|
|
1524
|
-
*/
|
|
1525
|
-
type AnnouncementProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof badgeVariants> & {
|
|
1526
|
-
/** Whether to apply themed styling with special background treatment */
|
|
1527
|
-
themed?: boolean;
|
|
1528
|
-
};
|
|
1529
|
-
/**
|
|
1530
|
-
* Announcement Component
|
|
1531
|
-
*
|
|
1532
|
-
* A styled badge component for displaying announcements, notifications,
|
|
1533
|
-
* and promotional content. Features rounded design with hover effects
|
|
1534
|
-
* and optional themed styling.
|
|
1535
|
-
*
|
|
1536
|
-
* @param props - Component props
|
|
1537
|
-
* @param props.variant - Badge variant style (default: 'outline')
|
|
1538
|
-
* @param props.themed - Whether to apply themed styling
|
|
1539
|
-
* @param props.className - Additional CSS classes
|
|
1540
|
-
* @returns JSX element with announcement badge
|
|
1541
|
-
*
|
|
1542
|
-
* @example
|
|
1543
|
-
* ```tsx
|
|
1544
|
-
* // Basic announcement
|
|
1545
|
-
* <Announcement>
|
|
1546
|
-
* New feature available!
|
|
1547
|
-
* </Announcement>
|
|
1548
|
-
*
|
|
1549
|
-
* // Themed announcement with tag
|
|
1550
|
-
* <Announcement themed variant="secondary">
|
|
1551
|
-
* <AnnouncementTag>NEW</AnnouncementTag>
|
|
1552
|
-
* <AnnouncementTitle>
|
|
1553
|
-
* Product Update v2.0
|
|
1554
|
-
* </AnnouncementTitle>
|
|
1555
|
-
* </Announcement>
|
|
1556
|
-
*
|
|
1557
|
-
* // Custom styled announcement
|
|
1558
|
-
* <Announcement
|
|
1559
|
-
* variant="destructive"
|
|
1560
|
-
* className="border-red-500"
|
|
1561
|
-
* >
|
|
1562
|
-
* Important Notice
|
|
1563
|
-
* </Announcement>
|
|
1564
|
-
* ```
|
|
1565
|
-
*/
|
|
1566
|
-
declare const Announcement: ({ variant, themed, className, ...props }: AnnouncementProps) => react_jsx_runtime.JSX.Element;
|
|
1567
|
-
/**
|
|
1568
|
-
* Props interface for the AnnouncementTag component
|
|
1569
|
-
*/
|
|
1570
|
-
type AnnouncementTagProps = HTMLAttributes<HTMLDivElement>;
|
|
1571
|
-
/**
|
|
1572
|
-
* AnnouncementTag Component
|
|
1573
|
-
*
|
|
1574
|
-
* A small tag component designed to be used within announcements
|
|
1575
|
-
* to highlight categories, status, or importance levels.
|
|
1576
|
-
*
|
|
1577
|
-
* @param props - Component props
|
|
1578
|
-
* @param props.className - Additional CSS classes
|
|
1579
|
-
* @returns JSX element with announcement tag
|
|
1580
|
-
*
|
|
1581
|
-
* @example
|
|
1582
|
-
* ```tsx
|
|
1583
|
-
* <Announcement>
|
|
1584
|
-
* <AnnouncementTag>BETA</AnnouncementTag>
|
|
1585
|
-
* <AnnouncementTitle>New Dashboard</AnnouncementTitle>
|
|
1586
|
-
* </Announcement>
|
|
1587
|
-
* ```
|
|
1588
|
-
*/
|
|
1589
|
-
declare const AnnouncementTag: ({ className, ...props }: AnnouncementTagProps) => react_jsx_runtime.JSX.Element;
|
|
1590
|
-
/**
|
|
1591
|
-
* Props interface for the AnnouncementTitle component
|
|
1592
|
-
*/
|
|
1593
|
-
type AnnouncementTitleProps = HTMLAttributes<HTMLDivElement>;
|
|
1594
|
-
/**
|
|
1595
|
-
* AnnouncementTitle Component
|
|
1596
|
-
*
|
|
1597
|
-
* A title component designed for use within announcements,
|
|
1598
|
-
* providing proper spacing and alignment for announcement content.
|
|
1599
|
-
*
|
|
1600
|
-
* @param props - Component props
|
|
1601
|
-
* @param props.className - Additional CSS classes
|
|
1602
|
-
* @returns JSX element with announcement title
|
|
1603
|
-
*
|
|
1604
|
-
* @example
|
|
1605
|
-
* ```tsx
|
|
1606
|
-
* <Announcement>
|
|
1607
|
-
* <AnnouncementTag>UPDATE</AnnouncementTag>
|
|
1608
|
-
* <AnnouncementTitle>
|
|
1609
|
-
* System Maintenance Scheduled
|
|
1610
|
-
* </AnnouncementTitle>
|
|
1611
|
-
* </Announcement>
|
|
1612
|
-
* ```
|
|
1613
|
-
*/
|
|
1614
|
-
declare const AnnouncementTitle: ({ className, ...props }: AnnouncementTitleProps) => react_jsx_runtime.JSX.Element;
|
|
1615
|
-
|
|
1616
|
-
/**
|
|
1617
|
-
* Background Paths Components
|
|
1618
|
-
* Provides animated SVG path backgrounds with motion effects
|
|
1619
|
-
* Perfect for creating dynamic visual backgrounds and decorative elements
|
|
1620
|
-
*/
|
|
1621
|
-
/**
|
|
1622
|
-
* FloatingPaths Component
|
|
1623
|
-
*
|
|
1624
|
-
* Creates animated floating SVG paths with customizable position and color.
|
|
1625
|
-
* Features smooth animations with varying opacity and path lengths for
|
|
1626
|
-
* a dynamic background effect.
|
|
1627
|
-
*
|
|
1628
|
-
* @param props - Component props
|
|
1629
|
-
* @param props.position - Position multiplier for path positioning (affects curve placement)
|
|
1630
|
-
* @param props.color - CSS color class for the paths (default: 'text-slate-950 dark:text-white')
|
|
1631
|
-
* @returns JSX element with animated SVG paths
|
|
1632
|
-
*
|
|
1633
|
-
* @example
|
|
1634
|
-
* ```tsx
|
|
1635
|
-
* // Basic floating paths
|
|
1636
|
-
* <FloatingPaths position={1} />
|
|
1637
|
-
*
|
|
1638
|
-
* // Custom colored paths
|
|
1639
|
-
* <FloatingPaths
|
|
1640
|
-
* position={2}
|
|
1641
|
-
* color="text-blue-500 dark:text-blue-300"
|
|
1642
|
-
* />
|
|
1643
|
-
*
|
|
1644
|
-
* // Multiple layers with different positions
|
|
1645
|
-
* <div className="relative">
|
|
1646
|
-
* <FloatingPaths position={1} color="text-gray-300" />
|
|
1647
|
-
* <FloatingPaths position={2} color="text-gray-400" />
|
|
1648
|
-
* <FloatingPaths position={3} color="text-gray-500" />
|
|
1649
|
-
* </div>
|
|
1650
|
-
*
|
|
1651
|
-
* // In a hero section
|
|
1652
|
-
* <section className="relative min-h-screen">
|
|
1653
|
-
* <FloatingPaths position={1.5} />
|
|
1654
|
-
* <div className="relative z-10">
|
|
1655
|
-
* <h1>Your Content Here</h1>
|
|
1656
|
-
* </div>
|
|
1657
|
-
* </section>
|
|
1658
|
-
* ```
|
|
1659
|
-
*/
|
|
1660
|
-
declare function FloatingPaths({ position, color, }: {
|
|
1661
|
-
position: number;
|
|
1662
|
-
color?: string;
|
|
1663
|
-
}): react_jsx_runtime.JSX.Element;
|
|
1664
|
-
/**
|
|
1665
|
-
* BackgroundPaths Component
|
|
1666
|
-
*
|
|
1667
|
-
* A simplified wrapper around FloatingPaths with a fixed position,
|
|
1668
|
-
* providing an easy way to add animated background paths to any container.
|
|
1669
|
-
*
|
|
1670
|
-
* @param props - Component props
|
|
1671
|
-
* @param props.color - CSS color class for the paths (default: 'text-slate-950 dark:text-white')
|
|
1672
|
-
* @returns JSX element with animated background paths
|
|
1673
|
-
*
|
|
1674
|
-
* @example
|
|
1675
|
-
* ```tsx
|
|
1676
|
-
* // Basic background paths
|
|
1677
|
-
* <div className="relative">
|
|
1678
|
-
* <BackgroundPaths />
|
|
1679
|
-
* <div className="relative z-10">
|
|
1680
|
-
* Your content here
|
|
1681
|
-
* </div>
|
|
1682
|
-
* </div>
|
|
1683
|
-
*
|
|
1684
|
-
* // Custom colored background
|
|
1685
|
-
* <BackgroundPaths color="text-purple-500 dark:text-purple-300" />
|
|
1686
|
-
*
|
|
1687
|
-
* // In a card component
|
|
1688
|
-
* <div className="relative p-6 bg-white rounded-lg shadow-lg">
|
|
1689
|
-
* <BackgroundPaths color="text-gray-100" />
|
|
1690
|
-
* <div className="relative z-10">
|
|
1691
|
-
* <h2>Card Title</h2>
|
|
1692
|
-
* <p>Card content...</p>
|
|
1693
|
-
* </div>
|
|
1694
|
-
* </div>
|
|
1695
|
-
* ```
|
|
1696
|
-
*/
|
|
1697
|
-
declare function BackgroundPaths({ color }: {
|
|
1698
|
-
color?: string;
|
|
1699
|
-
}): react_jsx_runtime.JSX.Element;
|
|
1700
|
-
|
|
1701
|
-
/**
|
|
1702
|
-
* Props interface for the Book component
|
|
1703
|
-
*/
|
|
1704
|
-
interface BookProps {
|
|
1705
|
-
/** Content to display inside the book */
|
|
1706
|
-
children: React__default.ReactNode;
|
|
1707
|
-
/** Book cover color (default: '#f50537') */
|
|
1708
|
-
color?: string;
|
|
1709
|
-
/** Text color for book content */
|
|
1710
|
-
textColor?: string;
|
|
1711
|
-
/** Whether to apply texture effects */
|
|
1712
|
-
texture?: boolean;
|
|
1713
|
-
/** Book depth in container query width units */
|
|
1714
|
-
depth?: number;
|
|
1715
|
-
/** Book variant style (default: 'default') */
|
|
1716
|
-
variant?: 'default' | 'simple';
|
|
1717
|
-
/** Optional illustration to display on the book */
|
|
1718
|
-
illustration?: React__default.ReactNode;
|
|
1719
|
-
/** Book width in pixels (default: 196) */
|
|
1720
|
-
width?: number;
|
|
1721
|
-
}
|
|
1722
|
-
/**
|
|
1723
|
-
* Book Component
|
|
1724
|
-
*
|
|
1725
|
-
* A 3D book component with hover animations and customizable styling.
|
|
1726
|
-
* Features perspective transforms, shadow effects, and flexible content layout.
|
|
1727
|
-
*
|
|
1728
|
-
* @param props - Component props
|
|
1729
|
-
* @returns JSX element with 3D book appearance
|
|
1730
|
-
*
|
|
1731
|
-
* @example
|
|
1732
|
-
* ```tsx
|
|
1733
|
-
* // Basic book
|
|
1734
|
-
* <Book>
|
|
1735
|
-
* <h3>Book Title</h3>
|
|
1736
|
-
* <p>Book description...</p>
|
|
1737
|
-
* </Book>
|
|
1738
|
-
*
|
|
1739
|
-
* // Customized book
|
|
1740
|
-
* <Book
|
|
1741
|
-
* color="#3b82f6"
|
|
1742
|
-
* textColor="#ffffff"
|
|
1743
|
-
* width={240}
|
|
1744
|
-
* depth={6}
|
|
1745
|
-
* >
|
|
1746
|
-
* <div className="p-4">
|
|
1747
|
-
* <h2>Custom Book</h2>
|
|
1748
|
-
* <p>Custom content</p>
|
|
1749
|
-
* </div>
|
|
1750
|
-
* </Book>
|
|
1751
|
-
*
|
|
1752
|
-
* // Simple variant with illustration
|
|
1753
|
-
* <Book
|
|
1754
|
-
* variant="simple"
|
|
1755
|
-
* illustration={<BookIcon />}
|
|
1756
|
-
* >
|
|
1757
|
-
* Simple book content
|
|
1758
|
-
* </Book>
|
|
1759
|
-
*
|
|
1760
|
-
* // Book gallery
|
|
1761
|
-
* <div className="flex gap-4">
|
|
1762
|
-
* <Book color="#ef4444">Red Book</Book>
|
|
1763
|
-
* <Book color="#10b981">Green Book</Book>
|
|
1764
|
-
* <Book color="#8b5cf6">Purple Book</Book>
|
|
1765
|
-
* </div>
|
|
1766
|
-
* ```
|
|
1767
|
-
*/
|
|
1768
|
-
declare function Book(props: BookProps): react_jsx_runtime.JSX.Element;
|
|
1769
|
-
type FlexAlignItems = 'stretch' | 'start' | 'end' | 'center';
|
|
1770
|
-
type FlexJustifyContent = 'stretch' | 'start' | 'end' | 'space-between' | 'space-around' | 'space-evenly' | 'center';
|
|
1771
|
-
interface StackProps extends React__default.ComponentProps<'div'> {
|
|
1772
|
-
children: React__default.ReactNode;
|
|
1773
|
-
direction?: 'column' | 'row';
|
|
1774
|
-
align?: FlexAlignItems;
|
|
1775
|
-
justify?: FlexJustifyContent;
|
|
1776
|
-
gap?: number;
|
|
1777
|
-
padding?: number;
|
|
1778
|
-
grow?: boolean;
|
|
1779
|
-
shrink?: boolean;
|
|
1780
|
-
wrap?: boolean;
|
|
1781
|
-
className?: string;
|
|
1782
|
-
}
|
|
1783
|
-
declare function Stack(props: StackProps): react_jsx_runtime.JSX.Element;
|
|
1784
|
-
|
|
1785
|
-
/**
|
|
1786
|
-
* DotsPattern Component
|
|
1787
|
-
* Creates a customizable dots pattern background using SVG
|
|
1788
|
-
* Perfect for adding subtle texture and visual interest to backgrounds
|
|
1789
|
-
*/
|
|
1790
|
-
/**
|
|
1791
|
-
* DotsPattern Component
|
|
1792
|
-
*
|
|
1793
|
-
* Generates an SVG-based dots pattern that can be used as a background element.
|
|
1794
|
-
* Features customizable dot size, spacing, and positioning with automatic
|
|
1795
|
-
* pattern generation using unique IDs.
|
|
1796
|
-
*
|
|
1797
|
-
* @param props - Component props
|
|
1798
|
-
* @param props.dotSize - Size of each dot in pixels (default: 2)
|
|
1799
|
-
* @param props.gapSize - Space between dots in pixels (default: 10)
|
|
1800
|
-
* @param props.patternOffset - X and Y offset for pattern positioning (default: [0, 0])
|
|
1801
|
-
* @param props.className - Additional CSS classes
|
|
1802
|
-
* @returns JSX element with SVG dots pattern
|
|
1803
|
-
*
|
|
1804
|
-
* @example
|
|
1805
|
-
* ```tsx
|
|
1806
|
-
* // Basic dots pattern
|
|
1807
|
-
* <div className="relative h-64 bg-gray-50">
|
|
1808
|
-
* <DotsPattern />
|
|
1809
|
-
* <div className="relative z-10 p-4">
|
|
1810
|
-
* Content over dots pattern
|
|
1811
|
-
* </div>
|
|
1812
|
-
* </div>
|
|
1813
|
-
*
|
|
1814
|
-
* // Customized dots pattern
|
|
1815
|
-
* <DotsPattern
|
|
1816
|
-
* dotSize={3}
|
|
1817
|
-
* gapSize={15}
|
|
1818
|
-
* className="text-blue-500/20"
|
|
1819
|
-
* />
|
|
1820
|
-
*
|
|
1821
|
-
* // Offset pattern
|
|
1822
|
-
* <DotsPattern
|
|
1823
|
-
* patternOffset={[5, 5]}
|
|
1824
|
-
* dotSize={1}
|
|
1825
|
-
* gapSize={8}
|
|
1826
|
-
* />
|
|
1827
|
-
*
|
|
1828
|
-
* // Hero section with dots background
|
|
1829
|
-
* <section className="relative min-h-screen bg-white">
|
|
1830
|
-
* <DotsPattern
|
|
1831
|
-
* dotSize={2}
|
|
1832
|
-
* gapSize={12}
|
|
1833
|
-
* className="text-gray-300"
|
|
1834
|
-
* />
|
|
1835
|
-
* <div className="relative z-10 flex items-center justify-center min-h-screen">
|
|
1836
|
-
* <h1>Hero Content</h1>
|
|
1837
|
-
* </div>
|
|
1838
|
-
* </section>
|
|
1839
|
-
*
|
|
1840
|
-
* // Card with dots pattern
|
|
1841
|
-
* <div className="relative p-6 bg-white rounded-lg shadow-lg overflow-hidden">
|
|
1842
|
-
* <DotsPattern
|
|
1843
|
-
* dotSize={1}
|
|
1844
|
-
* gapSize={6}
|
|
1845
|
-
* className="text-gray-100"
|
|
1846
|
-
* />
|
|
1847
|
-
* <div className="relative z-10">
|
|
1848
|
-
* <h3>Card Title</h3>
|
|
1849
|
-
* <p>Card content...</p>
|
|
1850
|
-
* </div>
|
|
1851
|
-
* </div>
|
|
1852
|
-
* ```
|
|
1853
|
-
*/
|
|
1854
|
-
declare function DotsPattern({ dotSize, gapSize, patternOffset, className, }: {
|
|
1855
|
-
dotSize?: number;
|
|
1856
|
-
gapSize?: number;
|
|
1857
|
-
patternOffset?: [number, number];
|
|
1858
|
-
className?: string;
|
|
1859
|
-
}): react_jsx_runtime.JSX.Element;
|
|
1860
|
-
|
|
1861
|
-
/**
|
|
1862
|
-
* Grid Background Component
|
|
1863
|
-
* Creates a customizable grid background with vertical lines and dots pattern
|
|
1864
|
-
* Perfect for adding structured visual backgrounds to layouts and sections
|
|
1865
|
-
*/
|
|
1866
|
-
|
|
1867
|
-
/**
|
|
1868
|
-
* Props interface for the GridBackground component
|
|
1869
|
-
*/
|
|
1870
|
-
interface GridBackgroundProps {
|
|
1871
|
-
/** Number of grid columns to display (default: 4) */
|
|
1872
|
-
columns?: number;
|
|
1873
|
-
/** Additional CSS classes for styling */
|
|
1874
|
-
className?: string;
|
|
1875
|
-
/** CSS class for maximum width container (default: 'grid-container') */
|
|
1876
|
-
maxWidthClass?: string;
|
|
1877
|
-
}
|
|
1878
|
-
/**
|
|
1879
|
-
* GridBackground Component
|
|
1880
|
-
*
|
|
1881
|
-
* Creates a customizable grid background with vertical lines and dots pattern.
|
|
1882
|
-
* Features configurable column count and styling options for creating
|
|
1883
|
-
* structured visual backgrounds.
|
|
1884
|
-
*
|
|
1885
|
-
* @param props - Component props
|
|
1886
|
-
* @param props.columns - Number of grid columns to display
|
|
1887
|
-
* @param props.className - Additional CSS classes for styling
|
|
1888
|
-
* @param props.maxWidthClass - CSS class for maximum width container
|
|
1889
|
-
* @returns JSX element with grid background pattern
|
|
1890
|
-
*
|
|
1891
|
-
* @example
|
|
1892
|
-
* ```tsx
|
|
1893
|
-
* // Basic grid background
|
|
1894
|
-
* <div className="relative">
|
|
1895
|
-
* <GridBackground />
|
|
1896
|
-
* <div className="relative z-10">Content over grid</div>
|
|
1897
|
-
* </div>
|
|
1898
|
-
*
|
|
1899
|
-
* // Custom column count
|
|
1900
|
-
* <GridBackground columns={6} />
|
|
1901
|
-
*
|
|
1902
|
-
* // With custom styling
|
|
1903
|
-
* <GridBackground
|
|
1904
|
-
* columns={3}
|
|
1905
|
-
* className="opacity-50"
|
|
1906
|
-
* maxWidthClass="max-w-6xl"
|
|
1907
|
-
* />
|
|
1908
|
-
* ```
|
|
1909
|
-
*/
|
|
1910
|
-
declare const GridBackground: FC<GridBackgroundProps>;
|
|
1911
|
-
|
|
1912
|
-
interface HexagonBadgeProps {
|
|
1913
|
-
children?: ReactNode;
|
|
1914
|
-
classNames?: {
|
|
1915
|
-
base?: string;
|
|
1916
|
-
svg?: string;
|
|
1917
|
-
wraper?: string;
|
|
1918
|
-
};
|
|
1919
|
-
}
|
|
1920
|
-
declare const HexagonBadge: ({ children, classNames }: HexagonBadgeProps) => react_jsx_runtime.JSX.Element;
|
|
1921
|
-
|
|
1922
|
-
/**
|
|
1923
|
-
* Props interface for icon components
|
|
1924
|
-
* Extends standard HTML SVG element attributes for full customization
|
|
1925
|
-
*/
|
|
1926
|
-
type IconProps = React__default.HTMLAttributes<SVGElement>;
|
|
1927
|
-
/**
|
|
1928
|
-
* Collection of brand and service icons
|
|
1929
|
-
*
|
|
1930
|
-
* This object contains SVG icons for popular brands, services, and technologies.
|
|
1931
|
-
* All icons are designed to be scalable and themeable using CSS currentColor.
|
|
1932
|
-
*
|
|
1933
|
-
* @example
|
|
1934
|
-
* ```tsx
|
|
1935
|
-
* // Basic usage
|
|
1936
|
-
* <Icons.google className="w-6 h-6" />
|
|
1937
|
-
*
|
|
1938
|
-
* // With custom styling
|
|
1939
|
-
* <Icons.github
|
|
1940
|
-
* className="w-8 h-8 text-gray-600 hover:text-gray-900"
|
|
1941
|
-
* onClick={handleGitHubClick}
|
|
1942
|
-
* />
|
|
1943
|
-
*
|
|
1944
|
-
* // Colorful variants
|
|
1945
|
-
* <Icons.googleColorful className="w-10 h-10" />
|
|
1946
|
-
* <Icons.facebookColorful className="w-10 h-10" />
|
|
1947
|
-
* ```
|
|
1948
|
-
*/
|
|
1949
|
-
declare const Icons: {
|
|
1950
|
-
anthropic: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1951
|
-
apple: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1952
|
-
aria: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1953
|
-
facebook: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1954
|
-
facebookColorful: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1955
|
-
github: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1956
|
-
google: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1957
|
-
googleColorful: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1958
|
-
instagram: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1959
|
-
linkedin: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1960
|
-
linkedinColorful: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1961
|
-
microsoft: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1962
|
-
nextjs: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1963
|
-
npm: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1964
|
-
openai: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1965
|
-
paypal: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1966
|
-
pelatform: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1967
|
-
pnpm: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1968
|
-
postgresql: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1969
|
-
prisma: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1970
|
-
radix: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1971
|
-
radixui: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1972
|
-
react: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1973
|
-
scira: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1974
|
-
scribble: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1975
|
-
supabaseColorful: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1976
|
-
tailwind: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1977
|
-
telegram: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1978
|
-
twitter: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1979
|
-
whatsApp: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1980
|
-
x: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1981
|
-
yarn: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1982
|
-
youtube: (props: IconProps) => react_jsx_runtime.JSX.Element;
|
|
1983
|
-
};
|
|
1984
|
-
|
|
1985
|
-
/**
|
|
1986
|
-
* Image Input Component
|
|
1987
|
-
* Provides a comprehensive image upload solution with drag-and-drop support,
|
|
1988
|
-
* multiple file selection, preview generation, and file management capabilities
|
|
1989
|
-
*/
|
|
1990
|
-
|
|
1991
|
-
/**
|
|
1992
|
-
* Interface representing a single image file with metadata
|
|
1993
|
-
*/
|
|
1994
|
-
interface ImageInputFile {
|
|
1995
|
-
/** Base64 data URL of the image for preview */
|
|
1996
|
-
dataURL?: string;
|
|
1997
|
-
/** Original File object */
|
|
1998
|
-
file?: File;
|
|
1999
|
-
/** Additional custom properties */
|
|
2000
|
-
[key: string]: unknown;
|
|
2001
|
-
}
|
|
2002
|
-
/**
|
|
2003
|
-
* Type representing an array of image files
|
|
2004
|
-
*/
|
|
2005
|
-
type ImageInputFiles = ImageInputFile[];
|
|
2006
|
-
/**
|
|
2007
|
-
* Props interface for the ImageInput component
|
|
2008
|
-
*/
|
|
2009
|
-
interface ImageInputProps {
|
|
2010
|
-
/** Current array of image files */
|
|
2011
|
-
value: ImageInputFiles;
|
|
2012
|
-
/** Callback when files change, includes updated file indices */
|
|
2013
|
-
onChange: (value: ImageInputFiles, addUpdatedIndex?: number[]) => void;
|
|
2014
|
-
/** Render prop function that receives image input controls */
|
|
2015
|
-
children?: (props: ImageInputExport) => ReactNode;
|
|
2016
|
-
/** Whether to allow multiple file selection */
|
|
2017
|
-
multiple?: boolean;
|
|
2018
|
-
/** Maximum number of files allowed (not implemented in current version) */
|
|
2019
|
-
maxNumber?: number;
|
|
2020
|
-
/** Array of accepted file extensions (without dots) */
|
|
2021
|
-
acceptType?: string[];
|
|
2022
|
-
/** Key name for the data URL property in file objects */
|
|
2023
|
-
dataURLKey?: string;
|
|
2024
|
-
/** Additional props to pass to the hidden input element */
|
|
2025
|
-
inputProps?: React__default.HTMLProps<HTMLInputElement>;
|
|
2026
|
-
}
|
|
2027
|
-
/**
|
|
2028
|
-
* Interface for the object passed to the children render prop
|
|
2029
|
-
* Contains all necessary functions and state for image management
|
|
2030
|
-
*/
|
|
2031
|
-
interface ImageInputExport {
|
|
2032
|
-
/** Current list of image files */
|
|
2033
|
-
fileList: ImageInputFiles;
|
|
2034
|
-
/** Function to trigger file selection dialog */
|
|
2035
|
-
onImageUpload: () => void;
|
|
2036
|
-
/** Function to remove all images */
|
|
2037
|
-
onImageRemoveAll: () => void;
|
|
2038
|
-
/** Function to update/replace an image at specific index */
|
|
2039
|
-
onImageUpdate: (index: number) => void;
|
|
2040
|
-
/** Function to remove an image at specific index */
|
|
2041
|
-
onImageRemove: (index: number) => void;
|
|
2042
|
-
/** Whether drag operation is currently active */
|
|
2043
|
-
isDragging: boolean;
|
|
2044
|
-
/** Drag and drop event handlers */
|
|
2045
|
-
dragProps: {
|
|
2046
|
-
onDrop: (e: DragEvent<HTMLDivElement>) => void;
|
|
2047
|
-
onDragEnter: (e: DragEvent<HTMLDivElement>) => void;
|
|
2048
|
-
onDragLeave: (e: DragEvent<HTMLDivElement>) => void;
|
|
2049
|
-
onDragOver: (e: DragEvent<HTMLDivElement>) => void;
|
|
2050
|
-
onDragStart: (e: DragEvent<HTMLDivElement>) => void;
|
|
2051
|
-
};
|
|
2052
|
-
}
|
|
2053
|
-
/** Default index value indicating no selection */
|
|
2054
|
-
declare const DEFAULT_NULL_INDEX = -1;
|
|
2055
|
-
/** Default key name for storing data URL in file objects */
|
|
2056
|
-
declare const DEFAULT_DATA_URL_KEY = "dataURL";
|
|
2057
|
-
/**
|
|
2058
|
-
* Utility Functions for Image Input Component
|
|
2059
|
-
*/
|
|
2060
|
-
/**
|
|
2061
|
-
* Programmatically opens the file selection dialog
|
|
2062
|
-
*
|
|
2063
|
-
* @param inputRef - Reference to the hidden input element
|
|
2064
|
-
*
|
|
2065
|
-
* @example
|
|
2066
|
-
* ```tsx
|
|
2067
|
-
* const inputRef = useRef<HTMLInputElement>(null);
|
|
2068
|
-
*
|
|
2069
|
-
* const handleUploadClick = () => {
|
|
2070
|
-
* openFileDialog(inputRef);
|
|
2071
|
-
* };
|
|
2072
|
-
* ```
|
|
2073
|
-
*/
|
|
2074
|
-
declare const openFileDialog: (inputRef: RefObject<HTMLInputElement | null>) => void;
|
|
2075
|
-
/**
|
|
2076
|
-
* Generates the accept attribute string for file input
|
|
2077
|
-
*
|
|
2078
|
-
* @param acceptType - Array of file extensions without dots
|
|
2079
|
-
* @param allowNonImageType - Whether to allow non-image files
|
|
2080
|
-
* @returns Accept attribute string for input element
|
|
2081
|
-
*
|
|
2082
|
-
* @example
|
|
2083
|
-
* ```tsx
|
|
2084
|
-
* getAcceptTypeString(['jpg', 'png']); // '.jpg, .png'
|
|
2085
|
-
* getAcceptTypeString(); // 'image/*'
|
|
2086
|
-
* getAcceptTypeString([], true); // ''
|
|
2087
|
-
* ```
|
|
2088
|
-
*/
|
|
2089
|
-
declare const getAcceptTypeString: (acceptType?: string[], allowNonImageType?: boolean) => string;
|
|
2090
|
-
/**
|
|
2091
|
-
* Converts a File object to a base64 data URL string
|
|
2092
|
-
*
|
|
2093
|
-
* @param file - The file to convert
|
|
2094
|
-
* @returns Promise resolving to base64 data URL
|
|
2095
|
-
*
|
|
2096
|
-
* @example
|
|
2097
|
-
* ```tsx
|
|
2098
|
-
* const file = new File([''], 'image.jpg', { type: 'image/jpeg' });
|
|
2099
|
-
* const dataURL = await getBase64(file);
|
|
2100
|
-
* console.log(dataURL); // 'data:image/jpeg;base64,/9j/4AAQ...'
|
|
2101
|
-
* ```
|
|
2102
|
-
*/
|
|
2103
|
-
declare const getBase64: (file: File) => Promise<string>;
|
|
2104
|
-
/**
|
|
2105
|
-
* Creates an HTMLImageElement from a File object
|
|
2106
|
-
* Useful for getting image dimensions or other metadata
|
|
2107
|
-
*
|
|
2108
|
-
* @param file - The image file to load
|
|
2109
|
-
* @returns Promise resolving to HTMLImageElement
|
|
2110
|
-
*
|
|
2111
|
-
* @example
|
|
2112
|
-
* ```tsx
|
|
2113
|
-
* const file = new File([''], 'image.jpg', { type: 'image/jpeg' });
|
|
2114
|
-
* const image = await getImage(file);
|
|
2115
|
-
* console.log(`Dimensions: ${image.width}x${image.height}`);
|
|
2116
|
-
* ```
|
|
2117
|
-
*/
|
|
2118
|
-
declare const getImage: (file: File) => Promise<HTMLImageElement>;
|
|
2119
|
-
/**
|
|
2120
|
-
* Converts a FileList to an array of ImageInputFile objects
|
|
2121
|
-
* Each file is converted to base64 for preview purposes
|
|
2122
|
-
*
|
|
2123
|
-
* @param files - FileList from input or drag event
|
|
2124
|
-
* @param dataURLKey - Key name for storing the data URL
|
|
2125
|
-
* @returns Promise resolving to array of ImageInputFile objects
|
|
2126
|
-
*
|
|
2127
|
-
* @example
|
|
2128
|
-
* ```tsx
|
|
2129
|
-
* const handleFileChange = async (e: ChangeEvent<HTMLInputElement>) => {
|
|
2130
|
-
* if (e.target.files) {
|
|
2131
|
-
* const imageFiles = await getListFiles(e.target.files, 'dataURL');
|
|
2132
|
-
* setImages(imageFiles);
|
|
2133
|
-
* }
|
|
2134
|
-
* };
|
|
2135
|
-
* ```
|
|
2136
|
-
*/
|
|
2137
|
-
declare const getListFiles: (files: FileList, dataURLKey: string) => Promise<ImageInputFiles>;
|
|
2138
|
-
/**
|
|
2139
|
-
* ImageInput Component
|
|
2140
|
-
*
|
|
2141
|
-
* A comprehensive image upload component with drag-and-drop support,
|
|
2142
|
-
* multiple file selection, and file management capabilities.
|
|
2143
|
-
* Uses render props pattern for maximum flexibility in UI implementation.
|
|
2144
|
-
*
|
|
2145
|
-
* @param props - Component props
|
|
2146
|
-
* @returns JSX element containing hidden input and render prop children
|
|
2147
|
-
*
|
|
2148
|
-
* @example
|
|
2149
|
-
* ```tsx
|
|
2150
|
-
* // Basic single image upload
|
|
2151
|
-
* function SingleImageUpload() {
|
|
2152
|
-
* const [images, setImages] = useState<ImageInputFiles>([]);
|
|
2153
|
-
*
|
|
2154
|
-
* return (
|
|
2155
|
-
* <ImageInput
|
|
2156
|
-
* value={images}
|
|
2157
|
-
* onChange={setImages}
|
|
2158
|
-
* acceptType={['jpg', 'png', 'gif']}
|
|
2159
|
-
* >
|
|
2160
|
-
* {({ fileList, onImageUpload, onImageRemove, isDragging, dragProps }) => (
|
|
2161
|
-
* <div
|
|
2162
|
-
* {...dragProps}
|
|
2163
|
-
* className={`border-2 border-dashed p-4 ${
|
|
2164
|
-
* isDragging ? 'border-blue-500 bg-blue-50' : 'border-gray-300'
|
|
2165
|
-
* }`}
|
|
2166
|
-
* >
|
|
2167
|
-
* {fileList.length === 0 ? (
|
|
2168
|
-
* <button onClick={onImageUpload}>
|
|
2169
|
-
* Click or drag image here
|
|
2170
|
-
* </button>
|
|
2171
|
-
* ) : (
|
|
2172
|
-
* <div>
|
|
2173
|
-
* <img src={fileList[0].dataURL} alt="Preview" />
|
|
2174
|
-
* <button onClick={() => onImageRemove(0)}>Remove</button>
|
|
2175
|
-
* </div>
|
|
2176
|
-
* )}
|
|
2177
|
-
* </div>
|
|
2178
|
-
* )}
|
|
2179
|
-
* </ImageInput>
|
|
2180
|
-
* );
|
|
2181
|
-
* }
|
|
2182
|
-
*
|
|
2183
|
-
* // Multiple image upload with gallery
|
|
2184
|
-
* function ImageGallery() {
|
|
2185
|
-
* const [images, setImages] = useState<ImageInputFiles>([]);
|
|
2186
|
-
*
|
|
2187
|
-
* return (
|
|
2188
|
-
* <ImageInput
|
|
2189
|
-
* value={images}
|
|
2190
|
-
* onChange={setImages}
|
|
2191
|
-
* multiple
|
|
2192
|
-
* acceptType={['jpg', 'png']}
|
|
2193
|
-
* >
|
|
2194
|
-
* {({ fileList, onImageUpload, onImageRemove, onImageRemoveAll }) => (
|
|
2195
|
-
* <div>
|
|
2196
|
-
* <button onClick={onImageUpload}>Add Images</button>
|
|
2197
|
-
* {fileList.length > 0 && (
|
|
2198
|
-
* <button onClick={onImageRemoveAll}>Remove All</button>
|
|
2199
|
-
* )}
|
|
2200
|
-
* <div className="grid grid-cols-3 gap-4">
|
|
2201
|
-
* {fileList.map((image, index) => (
|
|
2202
|
-
* <div key={index} className="relative">
|
|
2203
|
-
* <img src={image.dataURL} alt={`Preview ${index}`} />
|
|
2204
|
-
* <button
|
|
2205
|
-
* onClick={() => onImageRemove(index)}
|
|
2206
|
-
* className="absolute top-0 right-0"
|
|
2207
|
-
* >
|
|
2208
|
-
* ×
|
|
2209
|
-
* </button>
|
|
2210
|
-
* </div>
|
|
2211
|
-
* ))}
|
|
2212
|
-
* </div>
|
|
2213
|
-
* </div>
|
|
2214
|
-
* )}
|
|
2215
|
-
* </ImageInput>
|
|
2216
|
-
* );
|
|
2217
|
-
* }
|
|
2218
|
-
* ```
|
|
2219
|
-
*/
|
|
2220
|
-
declare const ImageInput: FC<ImageInputProps>;
|
|
2221
|
-
|
|
2222
|
-
/**
|
|
2223
|
-
* Locale option used by the LanguageSwitcher
|
|
2224
|
-
*/
|
|
2225
|
-
interface LocaleOption {
|
|
2226
|
-
/** Locale code, e.g. 'en', 'id' */
|
|
2227
|
-
code: string;
|
|
2228
|
-
/** Human readable language name */
|
|
2229
|
-
name: string;
|
|
2230
|
-
/** Optional flag code to render, e.g. 'us', 'id' */
|
|
2231
|
-
flag?: string;
|
|
2232
|
-
/** Optional currency code associated with the locale */
|
|
2233
|
-
currency?: string;
|
|
2234
|
-
}
|
|
2235
|
-
/**
|
|
2236
|
-
* Props for the LanguageSwitcher component (prop-driven)
|
|
2237
|
-
*/
|
|
2238
|
-
interface LanguageSwitcherProps extends SharedImage {
|
|
2239
|
-
/** Additional CSS classes */
|
|
2240
|
-
className?: string;
|
|
2241
|
-
/** UI type: standalone dropdown or submenu dropdown */
|
|
2242
|
-
type?: 'dropdown' | 'sub-dropdown';
|
|
2243
|
-
/** Button variant style (for toggle type) */
|
|
2244
|
-
variant?: 'ghost' | 'outline' | 'secondary';
|
|
2245
|
-
/** Button size (for toggle type) */
|
|
2246
|
-
size?: 'sm' | 'md' | 'lg';
|
|
2247
|
-
/** Whether to show language names */
|
|
2248
|
-
showNames?: boolean;
|
|
2249
|
-
/** Whether to show flag icons */
|
|
2250
|
-
showFlags?: boolean;
|
|
2251
|
-
/** Label text for the dropdown trigger; defaults to 'Language' */
|
|
2252
|
-
label?: string;
|
|
2253
|
-
/** Whether i18n is enabled; if false and <=1 locales, render null */
|
|
2254
|
-
i18nEnabled?: boolean;
|
|
2255
|
-
/** Current active locale code */
|
|
2256
|
-
currentLocale: string;
|
|
2257
|
-
/** Available locales to render */
|
|
2258
|
-
locales: LocaleOption[];
|
|
2259
|
-
/** Handler called when a new locale is selected */
|
|
2260
|
-
onLocaleChange: (newLocale: string) => void | Promise<void>;
|
|
2261
|
-
/** Custom flags asset url */
|
|
2262
|
-
customFlagUrl?: boolean;
|
|
2263
|
-
}
|
|
2264
|
-
declare function LanguageSwitcher({ className, type, variant, size, showNames, showFlags, label, i18nEnabled, currentLocale, locales, onLocaleChange, customFlagUrl, Image, }: LanguageSwitcherProps): react_jsx_runtime.JSX.Element | null;
|
|
2265
|
-
|
|
2266
|
-
/**
|
|
2267
|
-
* Logo Component
|
|
2268
|
-
* Displays the application logo as an SVG icon
|
|
2269
|
-
* Supports theming through currentColor and customizable sizing
|
|
2270
|
-
*/
|
|
2271
|
-
/**
|
|
2272
|
-
* Logo Component
|
|
2273
|
-
*
|
|
2274
|
-
* Renders the application's logo as a scalable SVG icon.
|
|
2275
|
-
* The logo uses currentColor for theming and can be customized
|
|
2276
|
-
* with additional CSS classes for size and styling.
|
|
2277
|
-
*
|
|
2278
|
-
* @param props - Component props
|
|
2279
|
-
* @param props.className - Additional CSS classes for styling
|
|
2280
|
-
* @returns JSX element with the application logo
|
|
2281
|
-
*
|
|
2282
|
-
* @example
|
|
2283
|
-
* ```tsx
|
|
2284
|
-
* // Basic logo
|
|
2285
|
-
* <Logo />
|
|
2286
|
-
*
|
|
2287
|
-
* // Custom sized logo
|
|
2288
|
-
* <Logo className="w-12 h-12" />
|
|
2289
|
-
*
|
|
2290
|
-
* // Colored logo
|
|
2291
|
-
* <Logo className="text-blue-600 w-16 h-16" />
|
|
2292
|
-
*
|
|
2293
|
-
* // Logo in navigation
|
|
2294
|
-
* <nav className="flex items-center space-x-4">
|
|
2295
|
-
* <Logo className="w-8 h-8" />
|
|
2296
|
-
* <span className="font-bold">App Name</span>
|
|
2297
|
-
* </nav>
|
|
2298
|
-
*
|
|
2299
|
-
* // Logo in header
|
|
2300
|
-
* <header className="bg-white shadow-sm">
|
|
2301
|
-
* <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
2302
|
-
* <div className="flex justify-between items-center py-6">
|
|
2303
|
-
* <Logo className="w-10 h-10 text-primary" />
|
|
2304
|
-
* </div>
|
|
2305
|
-
* </div>
|
|
2306
|
-
* </header>
|
|
2307
|
-
* ```
|
|
2308
|
-
*/
|
|
2309
|
-
declare function Logo({ className }: {
|
|
2310
|
-
className?: string;
|
|
2311
|
-
}): react_jsx_runtime.JSX.Element;
|
|
2312
|
-
|
|
2313
|
-
/**
|
|
2314
|
-
* Props interface for the ModeSwitcher component
|
|
2315
|
-
*/
|
|
2316
|
-
interface ModeSwitcherProps {
|
|
2317
|
-
/** Additional CSS classes for the button */
|
|
2318
|
-
className?: string;
|
|
2319
|
-
/** Button variant style */
|
|
2320
|
-
variant?: 'ghost' | 'outline' | 'secondary';
|
|
2321
|
-
/** Button size */
|
|
2322
|
-
size?: 'sm' | 'md' | 'lg';
|
|
2323
|
-
/** Custom cycle order for themes (defaults to system -> light -> dark) */
|
|
2324
|
-
cycleOrder?: ThemeMode[];
|
|
2325
|
-
/** Button type: 'toggle' for a single button or 'dropdown' and 'sub-dropdown' for a menu with options */
|
|
2326
|
-
type?: 'toogle' | 'dropdown' | 'sub-dropdown';
|
|
2327
|
-
/** Labels for each theme mode (optional) */
|
|
2328
|
-
label?: {
|
|
2329
|
-
system?: string;
|
|
2330
|
-
dark?: string;
|
|
2331
|
-
light?: string;
|
|
2332
|
-
};
|
|
2333
|
-
}
|
|
2334
|
-
/**
|
|
2335
|
-
* ModeSwitcher Component
|
|
2336
|
-
*
|
|
2337
|
-
* A button component that cycles through available theme modes (light, dark, system).
|
|
2338
|
-
* Automatically updates the meta theme color and displays appropriate icons
|
|
2339
|
-
* for each theme state. Integrates with next-themes for theme persistence.
|
|
2340
|
-
*
|
|
2341
|
-
* Features:
|
|
2342
|
-
* - Cycles through light, dark, and system themes
|
|
2343
|
-
* - Updates meta theme color automatically
|
|
2344
|
-
* - Shows appropriate icons for each theme
|
|
2345
|
-
* - Accessible with screen reader support
|
|
2346
|
-
* - Customizable appearance and cycle order
|
|
2347
|
-
* - Integrates with application color configuration
|
|
2348
|
-
*
|
|
2349
|
-
* @param props - Component props
|
|
2350
|
-
* @returns JSX element containing the theme switcher button
|
|
2351
|
-
*
|
|
2352
|
-
* @example
|
|
2353
|
-
* ```tsx
|
|
2354
|
-
* // Basic usage
|
|
2355
|
-
* <ModeSwitcher />
|
|
2356
|
-
*
|
|
2357
|
-
* // Custom styling
|
|
2358
|
-
* <ModeSwitcher
|
|
2359
|
-
* className="border border-gray-300"
|
|
2360
|
-
* variant="outline"
|
|
2361
|
-
* size="lg"
|
|
2362
|
-
* />
|
|
2363
|
-
*
|
|
2364
|
-
* // Custom cycle order
|
|
2365
|
-
* <ModeSwitcher
|
|
2366
|
-
* cycleOrder={['light', 'dark']} // Skip system mode
|
|
2367
|
-
* />
|
|
2368
|
-
* ```
|
|
2369
|
-
*/
|
|
2370
|
-
declare function ModeSwitcher({ className, variant, size, cycleOrder, type, label, }: ModeSwitcherProps): react_jsx_runtime.JSX.Element;
|
|
2371
|
-
|
|
2372
|
-
/**
|
|
2373
|
-
* Props interface for MovingLabel component
|
|
2374
|
-
*/
|
|
2375
|
-
interface MovingLabelProps {
|
|
2376
|
-
/** Border radius for the component (CSS value) */
|
|
2377
|
-
borderRadius?: string;
|
|
2378
|
-
/** Child elements to render inside the label */
|
|
2379
|
-
children: ReactNode;
|
|
2380
|
-
/** HTML element type to render as (default: 'button') */
|
|
2381
|
-
as?: React__default.ElementType;
|
|
2382
|
-
/** Additional CSS classes for the container */
|
|
2383
|
-
containerClassName?: string;
|
|
2384
|
-
/** Additional CSS classes for the border element */
|
|
2385
|
-
borderClassName?: string;
|
|
2386
|
-
/** Animation duration in milliseconds */
|
|
2387
|
-
duration?: number;
|
|
2388
|
-
/** Additional CSS classes for the content area */
|
|
2389
|
-
className?: string;
|
|
2390
|
-
/** Additional props to pass to the root element */
|
|
2391
|
-
[key: string]: unknown;
|
|
2392
|
-
}
|
|
2393
|
-
/**
|
|
2394
|
-
* MovingLabel Component
|
|
2395
|
-
*
|
|
2396
|
-
* A button or label component with an animated moving border effect.
|
|
2397
|
-
* The border continuously moves around the perimeter of the element,
|
|
2398
|
-
* creating an eye-catching visual effect perfect for CTAs or highlights.
|
|
2399
|
-
*
|
|
2400
|
-
* @param props - Component props
|
|
2401
|
-
* @returns JSX element with animated border
|
|
2402
|
-
*
|
|
2403
|
-
* @example
|
|
2404
|
-
* ```tsx
|
|
2405
|
-
* // Basic button with moving border
|
|
2406
|
-
* <MovingLabel>
|
|
2407
|
-
* Click me!
|
|
2408
|
-
* </MovingLabel>
|
|
2409
|
-
*
|
|
2410
|
-
* // Custom styling and duration
|
|
2411
|
-
* <MovingLabel
|
|
2412
|
-
* borderRadius="0.5rem"
|
|
2413
|
-
* duration={3000}
|
|
2414
|
-
* className="px-6 py-3 text-lg"
|
|
2415
|
-
* borderClassName="bg-gradient-to-r from-blue-500 to-purple-500"
|
|
2416
|
-
* >
|
|
2417
|
-
* Premium Feature
|
|
2418
|
-
* </MovingLabel>
|
|
2419
|
-
*
|
|
2420
|
-
* // As a div instead of button
|
|
2421
|
-
* <MovingLabel
|
|
2422
|
-
* as="div"
|
|
2423
|
-
* containerClassName="w-64 h-32"
|
|
2424
|
-
* className="flex items-center justify-center"
|
|
2425
|
-
* >
|
|
2426
|
-
* <span>Animated Card</span>
|
|
2427
|
-
* </MovingLabel>
|
|
2428
|
-
*
|
|
2429
|
-
* // Custom border effect
|
|
2430
|
-
* <MovingLabel
|
|
2431
|
-
* borderClassName="h-8 w-16 bg-[radial-gradient(#ff6b6b_20%,transparent_70%)]"
|
|
2432
|
-
* duration={1500}
|
|
2433
|
-
* >
|
|
2434
|
-
* Fast Animation
|
|
2435
|
-
* </MovingLabel>
|
|
2436
|
-
* ```
|
|
2437
|
-
*/
|
|
2438
|
-
declare function MovingLabel({ borderRadius, children, as: Component, containerClassName, borderClassName, duration, className, ...otherProps }: MovingLabelProps): react_jsx_runtime.JSX.Element;
|
|
2439
|
-
/**
|
|
2440
|
-
* Props interface for MovingBorder component
|
|
2441
|
-
*/
|
|
2442
|
-
interface MovingBorderProps {
|
|
2443
|
-
/** Child elements to animate along the border path */
|
|
2444
|
-
children: ReactNode;
|
|
2445
|
-
/** Animation duration in milliseconds (default: 2000) */
|
|
2446
|
-
duration?: number;
|
|
2447
|
-
/** Horizontal border radius for the SVG path */
|
|
2448
|
-
rx?: string;
|
|
2449
|
-
/** Vertical border radius for the SVG path */
|
|
2450
|
-
ry?: string;
|
|
2451
|
-
/** Additional props to pass to the SVG element */
|
|
2452
|
-
[key: string]: unknown;
|
|
2453
|
-
}
|
|
2454
|
-
/**
|
|
2455
|
-
* MovingBorder Component
|
|
2456
|
-
*
|
|
2457
|
-
* Creates an animated border effect where child elements move along
|
|
2458
|
-
* the perimeter of a rectangular path. Uses SVG path calculations
|
|
2459
|
-
* and Framer Motion for smooth animations.
|
|
2460
|
-
*
|
|
2461
|
-
* This is typically used as a building block for other components
|
|
2462
|
-
* like MovingLabel, but can be used standalone for custom effects.
|
|
2463
|
-
*
|
|
2464
|
-
* @param props - Component props
|
|
2465
|
-
* @returns JSX element with SVG path and animated child
|
|
2466
|
-
*
|
|
2467
|
-
* @example
|
|
2468
|
-
* ```tsx
|
|
2469
|
-
* // Basic usage with a glowing dot
|
|
2470
|
-
* <div className="relative w-64 h-32 border border-gray-300">
|
|
2471
|
-
* <MovingBorder duration={3000} rx="10%" ry="10%">
|
|
2472
|
-
* <div className="w-4 h-4 bg-blue-500 rounded-full shadow-lg" />
|
|
2473
|
-
* </MovingBorder>
|
|
2474
|
-
* </div>
|
|
2475
|
-
*
|
|
2476
|
-
* // Multiple animated elements
|
|
2477
|
-
* <div className="relative w-48 h-48 rounded-lg border">
|
|
2478
|
-
* <MovingBorder duration={2000}>
|
|
2479
|
-
* <div className="w-3 h-3 bg-red-500 rounded-full" />
|
|
2480
|
-
* </MovingBorder>
|
|
2481
|
-
* <MovingBorder duration={3000}>
|
|
2482
|
-
* <div className="w-2 h-2 bg-green-500 rounded-full" />
|
|
2483
|
-
* </MovingBorder>
|
|
2484
|
-
* </div>
|
|
2485
|
-
*
|
|
2486
|
-
* // Custom SVG styling
|
|
2487
|
-
* <MovingBorder
|
|
2488
|
-
* duration={1500}
|
|
2489
|
-
* rx="20%"
|
|
2490
|
-
* ry="20%"
|
|
2491
|
-
* stroke="blue"
|
|
2492
|
-
* strokeWidth="2"
|
|
2493
|
-
* >
|
|
2494
|
-
* <div className="w-6 h-6 bg-gradient-to-r from-purple-500 to-pink-500 rounded" />
|
|
2495
|
-
* </MovingBorder>
|
|
2496
|
-
* ```
|
|
2497
|
-
*/
|
|
2498
|
-
declare const MovingBorder: ({ children, duration, rx, ry, ...otherProps }: MovingBorderProps) => react_jsx_runtime.JSX.Element;
|
|
2499
|
-
|
|
2500
|
-
/**
|
|
2501
|
-
* Newsletter Subscribe Component
|
|
2502
|
-
* Provides a complete newsletter subscription form with reCAPTCHA verification,
|
|
2503
|
-
* email validation, analytics tracking, and customizable messaging
|
|
2504
|
-
*/
|
|
2505
|
-
/**
|
|
2506
|
-
* Props interface for the Subscribe component
|
|
2507
|
-
*/
|
|
2508
|
-
interface SubscribeProps {
|
|
2509
|
-
/** Main heading text for the subscription section */
|
|
2510
|
-
heading?: string;
|
|
2511
|
-
/** Subheading or description text */
|
|
2512
|
-
subheading?: string;
|
|
2513
|
-
/** Button text when not loading */
|
|
2514
|
-
buttonText?: string;
|
|
2515
|
-
/** Button text when loading/submitting */
|
|
2516
|
-
loadingButtonText?: string;
|
|
2517
|
-
/** Placeholder text for email input */
|
|
2518
|
-
inputPlaceholder?: string;
|
|
2519
|
-
/** Success message shown after successful subscription */
|
|
2520
|
-
successMessage?: string;
|
|
2521
|
-
/** Error message for invalid email format */
|
|
2522
|
-
invalidEmailMessage?: string;
|
|
2523
|
-
/** Error message for reCAPTCHA verification failure */
|
|
2524
|
-
recaptchaMessage?: string;
|
|
2525
|
-
/** Generic error message for API failures */
|
|
2526
|
-
errorMessage?: string;
|
|
2527
|
-
/** API endpoint for subscription requests */
|
|
2528
|
-
apiEndpoint?: string;
|
|
2529
|
-
/** Text for the verify button in reCAPTCHA popover */
|
|
2530
|
-
verifyButtonText?: string;
|
|
2531
|
-
/** Additional CSS classes for the container */
|
|
2532
|
-
className?: string;
|
|
2533
|
-
}
|
|
2534
|
-
/**
|
|
2535
|
-
* Subscribe Component
|
|
2536
|
-
*
|
|
2537
|
-
* A complete newsletter subscription form with the following features:
|
|
2538
|
-
* - Email validation with regex pattern matching
|
|
2539
|
-
* - reCAPTCHA v2 verification for bot protection
|
|
2540
|
-
* - Analytics tracking for conversion metrics
|
|
2541
|
-
* - Customizable messaging and styling
|
|
2542
|
-
* - Toast notifications for user feedback
|
|
2543
|
-
* - Loading states and error handling
|
|
2544
|
-
*
|
|
2545
|
-
* The component automatically tracks subscription events for analytics
|
|
2546
|
-
* and provides a seamless user experience with proper accessibility.
|
|
2547
|
-
*
|
|
2548
|
-
* @param props - Component props
|
|
2549
|
-
* @returns JSX element containing the subscription form
|
|
2550
|
-
*
|
|
2551
|
-
* @example
|
|
2552
|
-
* ```tsx
|
|
2553
|
-
* // Basic usage with default settings
|
|
2554
|
-
* <Subscribe />
|
|
2555
|
-
*
|
|
2556
|
-
* // Custom messaging and endpoint
|
|
2557
|
-
* <Subscribe
|
|
2558
|
-
* heading="Join Our Community"
|
|
2559
|
-
* subheading="Get exclusive updates and early access"
|
|
2560
|
-
* buttonText="Join Now"
|
|
2561
|
-
* apiEndpoint="/api/newsletter/subscribe"
|
|
2562
|
-
* successMessage="Welcome to our community!"
|
|
2563
|
-
* />
|
|
2564
|
-
*
|
|
2565
|
-
* // Multilingual support
|
|
2566
|
-
* <Subscribe
|
|
2567
|
-
* heading="Tetap terinformasi dengan rilis terbaru"
|
|
2568
|
-
* subheading="Hanya update yang layak diketahui"
|
|
2569
|
-
* buttonText="Berlangganan"
|
|
2570
|
-
* loadingButtonText="Berlangganan..."
|
|
2571
|
-
* inputPlaceholder="Alamat email Anda"
|
|
2572
|
-
* successMessage="Terima kasih atas langganan Anda!"
|
|
2573
|
-
* invalidEmailMessage="Alamat email tidak valid. Silakan periksa dan coba lagi."
|
|
2574
|
-
* />
|
|
2575
|
-
*
|
|
2576
|
-
* // Custom styling
|
|
2577
|
-
* <Subscribe
|
|
2578
|
-
* className="bg-gradient-to-r from-blue-600 to-purple-600"
|
|
2579
|
-
* />
|
|
2580
|
-
* ```
|
|
2581
|
-
*/
|
|
2582
|
-
declare function Subscribe({ heading, subheading, buttonText, loadingButtonText, inputPlaceholder, successMessage, invalidEmailMessage, recaptchaMessage, errorMessage, apiEndpoint, verifyButtonText, className, }?: SubscribeProps): react_jsx_runtime.JSX.Element;
|
|
2583
|
-
|
|
2584
|
-
/**
|
|
2585
|
-
* Main Toolbar Component
|
|
2586
|
-
*
|
|
2587
|
-
* Creates a horizontal layout with space between heading and actions.
|
|
2588
|
-
* Typically used at the top of pages or sections to display titles
|
|
2589
|
-
* and related action buttons.
|
|
2590
|
-
*
|
|
2591
|
-
* @param props - Component props
|
|
2592
|
-
* @returns JSX element containing the toolbar layout
|
|
2593
|
-
*
|
|
2594
|
-
* @example
|
|
2595
|
-
* ```tsx
|
|
2596
|
-
* <Toolbar>
|
|
2597
|
-
* <ToolbarHeading>
|
|
2598
|
-
* <ToolbarTitle>Dashboard</ToolbarTitle>
|
|
2599
|
-
* <p className="text-sm text-muted-foreground">
|
|
2600
|
-
* Welcome back! Here's what's happening.
|
|
2601
|
-
* </p>
|
|
2602
|
-
* </ToolbarHeading>
|
|
2603
|
-
* <ToolbarActions>
|
|
2604
|
-
* <Button variant="outline">Export</Button>
|
|
2605
|
-
* <Button>Create New</Button>
|
|
2606
|
-
* </ToolbarActions>
|
|
2607
|
-
* </Toolbar>
|
|
2608
|
-
* ```
|
|
2609
|
-
*/
|
|
2610
|
-
declare const Toolbar: ({ children }: BaseProps) => react_jsx_runtime.JSX.Element;
|
|
2611
|
-
/**
|
|
2612
|
-
* ToolbarHeading Component
|
|
2613
|
-
*
|
|
2614
|
-
* Container for the left side of the toolbar, typically containing
|
|
2615
|
-
* the title and optional subtitle or description text.
|
|
2616
|
-
*
|
|
2617
|
-
* @param props - Component props
|
|
2618
|
-
* @returns JSX element containing the heading section
|
|
2619
|
-
*
|
|
2620
|
-
* @example
|
|
2621
|
-
* ```tsx
|
|
2622
|
-
* <ToolbarHeading>
|
|
2623
|
-
* <ToolbarTitle>User Management</ToolbarTitle>
|
|
2624
|
-
* <p className="text-sm text-muted-foreground">
|
|
2625
|
-
* Manage user accounts and permissions
|
|
2626
|
-
* </p>
|
|
2627
|
-
* </ToolbarHeading>
|
|
2628
|
-
* ```
|
|
2629
|
-
*/
|
|
2630
|
-
declare const ToolbarHeading: ({ children, className }: BaseProps) => react_jsx_runtime.JSX.Element;
|
|
2631
|
-
/**
|
|
2632
|
-
* ToolbarTitle Component
|
|
2633
|
-
*
|
|
2634
|
-
* Displays the main title text with consistent typography.
|
|
2635
|
-
* Renders as an h1 element for proper semantic structure.
|
|
2636
|
-
*
|
|
2637
|
-
* @param props - Component props
|
|
2638
|
-
* @returns JSX element containing the title
|
|
2639
|
-
*
|
|
2640
|
-
* @example
|
|
2641
|
-
* ```tsx
|
|
2642
|
-
* <ToolbarTitle>Analytics Dashboard</ToolbarTitle>
|
|
2643
|
-
*
|
|
2644
|
-
* // With custom styling
|
|
2645
|
-
* <ToolbarTitle className="text-2xl text-blue-600">
|
|
2646
|
-
* Premium Features
|
|
2647
|
-
* </ToolbarTitle>
|
|
2648
|
-
* ```
|
|
2649
|
-
*/
|
|
2650
|
-
declare const ToolbarTitle: ({ className, children }: BaseProps) => react_jsx_runtime.JSX.Element;
|
|
2651
|
-
/**
|
|
2652
|
-
* ToolbarActions Component
|
|
2653
|
-
*
|
|
2654
|
-
* Container for the right side of the toolbar, typically containing
|
|
2655
|
-
* action buttons, dropdowns, or other interactive elements.
|
|
2656
|
-
* Responsive design with different gaps on mobile vs desktop.
|
|
2657
|
-
*
|
|
2658
|
-
* @param props - Component props
|
|
2659
|
-
* @returns JSX element containing the actions section
|
|
2660
|
-
*
|
|
2661
|
-
* @example
|
|
2662
|
-
* ```tsx
|
|
2663
|
-
* <ToolbarActions>
|
|
2664
|
-
* <Button variant="outline" size="sm">
|
|
2665
|
-
* <IconDownload className="w-4 h-4 mr-2" />
|
|
2666
|
-
* Export
|
|
2667
|
-
* </Button>
|
|
2668
|
-
* <Button size="sm">
|
|
2669
|
-
* <IconPlus className="w-4 h-4 mr-2" />
|
|
2670
|
-
* Add Item
|
|
2671
|
-
* </Button>
|
|
2672
|
-
* </ToolbarActions>
|
|
2673
|
-
*
|
|
2674
|
-
* // With dropdown menu
|
|
2675
|
-
* <ToolbarActions>
|
|
2676
|
-
* <DropdownMenu>
|
|
2677
|
-
* <DropdownMenuTrigger asChild>
|
|
2678
|
-
* <Button variant="outline">Options</Button>
|
|
2679
|
-
* </DropdownMenuTrigger>
|
|
2680
|
-
* <DropdownMenuContent>
|
|
2681
|
-
* <DropdownMenuItem>Edit</DropdownMenuItem>
|
|
2682
|
-
* <DropdownMenuItem>Delete</DropdownMenuItem>
|
|
2683
|
-
* </DropdownMenuContent>
|
|
2684
|
-
* </DropdownMenu>
|
|
2685
|
-
* </ToolbarActions>
|
|
2686
|
-
* ```
|
|
2687
|
-
*/
|
|
2688
|
-
declare const ToolbarActions: ({ children }: BaseProps) => react_jsx_runtime.JSX.Element;
|
|
2689
|
-
|
|
2690
|
-
/**
|
|
2691
|
-
* User Avatar Component
|
|
2692
|
-
* Displays user profile pictures with fallback initials and optional status indicators
|
|
2693
|
-
* Built on top of the base Avatar component with enhanced user-specific features
|
|
2694
|
-
*/
|
|
2695
|
-
/**
|
|
2696
|
-
* Props interface for the UserAvatar component
|
|
2697
|
-
*/
|
|
2698
|
-
interface UserAvatarProps {
|
|
2699
|
-
/** Additional CSS classes for styling */
|
|
2700
|
-
className?: string;
|
|
2701
|
-
/** Whether to show online status indicator */
|
|
2702
|
-
indicator?: boolean;
|
|
2703
|
-
/** Source URL for the user's profile image */
|
|
2704
|
-
src?: string | null | undefined;
|
|
2705
|
-
/** Alt text for the image, also used to generate initials */
|
|
2706
|
-
alt?: string | null;
|
|
2707
|
-
}
|
|
2708
|
-
/**
|
|
2709
|
-
* UserAvatar Component
|
|
2710
|
-
*
|
|
2711
|
-
* Displays a user's profile picture with automatic fallback to initials
|
|
2712
|
-
* when no image is available. Supports optional online status indicators
|
|
2713
|
-
* and follows accessibility best practices.
|
|
2714
|
-
*
|
|
2715
|
-
* Features:
|
|
2716
|
-
* - Automatic initials generation from name
|
|
2717
|
-
* - Fallback handling for missing images
|
|
2718
|
-
* - Optional online status indicator
|
|
2719
|
-
* - Accessible alt text support
|
|
2720
|
-
* - Customizable styling
|
|
2721
|
-
*
|
|
2722
|
-
* @param props - Component props
|
|
2723
|
-
* @param props.className - Additional CSS classes for styling
|
|
2724
|
-
* @param props.indicator - Whether to show online status indicator (default: false)
|
|
2725
|
-
* @param props.src - Source URL for the user's profile image
|
|
2726
|
-
* @param props.alt - Alt text for the image, also used to generate initials
|
|
2727
|
-
* @returns JSX element containing the user avatar
|
|
2728
|
-
*
|
|
2729
|
-
* @example
|
|
2730
|
-
* ```tsx
|
|
2731
|
-
* // Basic user avatar with image
|
|
2732
|
-
* <UserAvatar
|
|
2733
|
-
* src="https://example.com/avatar.jpg"
|
|
2734
|
-
* alt="John Doe"
|
|
2735
|
-
* />
|
|
2736
|
-
*
|
|
2737
|
-
* // Avatar with online indicator
|
|
2738
|
-
* <UserAvatar
|
|
2739
|
-
* src="https://example.com/avatar.jpg"
|
|
2740
|
-
* alt="Jane Smith"
|
|
2741
|
-
* indicator={true}
|
|
2742
|
-
* />
|
|
2743
|
-
*
|
|
2744
|
-
* // Avatar with fallback initials (no image)
|
|
2745
|
-
* <UserAvatar
|
|
2746
|
-
* alt="Bob Johnson"
|
|
2747
|
-
* className="w-12 h-12"
|
|
2748
|
-
* />
|
|
2749
|
-
*
|
|
2750
|
-
* // User list with avatars
|
|
2751
|
-
* <div className="flex space-x-2">
|
|
2752
|
-
* {users.map(user => (
|
|
2753
|
-
* <UserAvatar
|
|
2754
|
-
* key={user.id}
|
|
2755
|
-
* src={user.avatar}
|
|
2756
|
-
* alt={user.name}
|
|
2757
|
-
* indicator={user.isOnline}
|
|
2758
|
-
* className="w-8 h-8"
|
|
2759
|
-
* />
|
|
2760
|
-
* ))}
|
|
2761
|
-
* </div>
|
|
2762
|
-
*
|
|
2763
|
-
* // Profile header
|
|
2764
|
-
* <div className="flex items-center space-x-4">
|
|
2765
|
-
* <UserAvatar
|
|
2766
|
-
* src={currentUser.avatar}
|
|
2767
|
-
* alt={currentUser.name}
|
|
2768
|
-
* indicator={true}
|
|
2769
|
-
* className="w-16 h-16"
|
|
2770
|
-
* />
|
|
2771
|
-
* <div>
|
|
2772
|
-
* <h2>{currentUser.name}</h2>
|
|
2773
|
-
* <p className="text-gray-600">{currentUser.email}</p>
|
|
2774
|
-
* </div>
|
|
2775
|
-
* </div>
|
|
2776
|
-
* ```
|
|
2777
|
-
*/
|
|
2778
|
-
declare function UserAvatar({ className, indicator, src, alt }: UserAvatarProps): react_jsx_runtime.JSX.Element;
|
|
2779
|
-
/**
|
|
2780
|
-
* Utility function to generate initials from a name
|
|
2781
|
-
*
|
|
2782
|
-
* Extracts the first letter of each word in a name and converts
|
|
2783
|
-
* them to uppercase to create user initials for avatar fallbacks.
|
|
2784
|
-
*
|
|
2785
|
-
* @param name - The full name to extract initials from
|
|
2786
|
-
* @param count - Maximum number of initials to return (optional)
|
|
2787
|
-
* @returns String containing the initials
|
|
2788
|
-
*
|
|
2789
|
-
* @example
|
|
2790
|
-
* ```tsx
|
|
2791
|
-
* getInitials("John Doe") // Returns "JD"
|
|
2792
|
-
* getInitials("Jane Mary Smith", 2) // Returns "JM"
|
|
2793
|
-
* getInitials("") // Returns ""
|
|
2794
|
-
* getInitials(null) // Returns ""
|
|
2795
|
-
* ```
|
|
2796
|
-
*/
|
|
2797
|
-
declare const getInitials: (name: string | null | undefined, count?: number) => string;
|
|
2798
|
-
|
|
2799
|
-
/**
|
|
2800
|
-
* Satoshi Font Utilities
|
|
2801
|
-
* Provides Satoshi font loading and CSS generation utilities
|
|
2802
|
-
* Loads the variable font from Pelatform CDN with optimal display settings
|
|
2803
|
-
*/
|
|
2804
|
-
/**
|
|
2805
|
-
* Satoshi font (local, variable), loaded from Pelatform CDN
|
|
2806
|
-
* Use for branding, headings, or special UI elements.
|
|
2807
|
-
* Supports weights 300–900, normal style, swap display.
|
|
2808
|
-
*/
|
|
2809
|
-
declare const satoshiFontUrl = "https://assets.pelatform.com/fonts/satoshi/Satoshi-Variable.woff2";
|
|
2810
|
-
/**
|
|
2811
|
-
* CSS font-face declaration for Satoshi font
|
|
2812
|
-
* Defines the font family with variable weight support and optimal loading
|
|
2813
|
-
*/
|
|
2814
|
-
declare const cssFontFace = "\n @font-face {\n font-family: 'Satoshi';\n src: url('https://assets.pelatform.com/fonts/satoshi/Satoshi-Variable.woff2') format('woff2');\n font-weight: 300 900;\n font-style: normal;\n font-display: swap;\n }\n";
|
|
2815
|
-
/**
|
|
2816
|
-
* SatoshiFontCSS Component
|
|
2817
|
-
*
|
|
2818
|
-
* Injects the Satoshi font CSS into the document head.
|
|
2819
|
-
* Use this component in your app layout to load the Satoshi font.
|
|
2820
|
-
*
|
|
2821
|
-
* @returns JSX element containing the font CSS styles
|
|
2822
|
-
*
|
|
2823
|
-
* @example
|
|
2824
|
-
* ```tsx
|
|
2825
|
-
* // In your layout or app component
|
|
2826
|
-
* function Layout({ children }: { children: React.ReactNode }) {
|
|
2827
|
-
* return (
|
|
2828
|
-
* <html>
|
|
2829
|
-
* <head>
|
|
2830
|
-
* <SatoshiFontCSS />
|
|
2831
|
-
* </head>
|
|
2832
|
-
* <body className="font-satoshi">
|
|
2833
|
-
* {children}
|
|
2834
|
-
* </body>
|
|
2835
|
-
* </html>
|
|
2836
|
-
* );
|
|
2837
|
-
* }
|
|
2838
|
-
*
|
|
2839
|
-
* // Or use in a specific component
|
|
2840
|
-
* function BrandedSection() {
|
|
2841
|
-
* return (
|
|
2842
|
-
* <>
|
|
2843
|
-
* <SatoshiFontCSS />
|
|
2844
|
-
* <h1 style={{ fontFamily: 'Satoshi' }}>
|
|
2845
|
-
* Branded Heading
|
|
2846
|
-
* </h1>
|
|
2847
|
-
* </>
|
|
2848
|
-
* );
|
|
2849
|
-
* }
|
|
2850
|
-
* ```
|
|
2851
|
-
*/
|
|
2852
|
-
declare function SatoshiFontCSS(): react_jsx_runtime.JSX.Element;
|
|
2853
|
-
|
|
2854
|
-
/**
|
|
2855
|
-
* Props interface for the RecaptchaPopover component
|
|
2856
|
-
*/
|
|
2857
|
-
interface RecaptchaPopoverProps {
|
|
2858
|
-
/** Whether the popover is open */
|
|
2859
|
-
open: boolean;
|
|
2860
|
-
/** Callback when popover open state changes */
|
|
2861
|
-
onOpenChange: (open: boolean) => void;
|
|
2862
|
-
/** Callback when reCAPTCHA verification succeeds */
|
|
2863
|
-
onVerify: (token: string) => void;
|
|
2864
|
-
/** Trigger element that opens the popover */
|
|
2865
|
-
trigger: ReactNode;
|
|
2866
|
-
/** Custom text for the verify button (default: "Verify & Submit") */
|
|
2867
|
-
verifyButtonText?: string;
|
|
2868
|
-
}
|
|
2869
|
-
/**
|
|
2870
|
-
* RecaptchaPopover Component
|
|
2871
|
-
*
|
|
2872
|
-
* A popover component that displays Google reCAPTCHA v2 verification.
|
|
2873
|
-
* Provides a clean, accessible interface for bot protection without
|
|
2874
|
-
* disrupting the main page flow. Automatically handles reCAPTCHA
|
|
2875
|
-
* initialization, token retrieval, and error states.
|
|
2876
|
-
*
|
|
2877
|
-
* @param props - Component props
|
|
2878
|
-
* @returns JSX element containing the popover with reCAPTCHA
|
|
2879
|
-
*
|
|
2880
|
-
* @example
|
|
2881
|
-
* ```tsx
|
|
2882
|
-
* // Basic usage with form submission
|
|
2883
|
-
* function ContactForm() {
|
|
2884
|
-
* const [showRecaptcha, setShowRecaptcha] = useState(false);
|
|
2885
|
-
* const [formData, setFormData] = useState({ email: '', message: '' });
|
|
2886
|
-
*
|
|
2887
|
-
* const handleSubmit = (e: FormEvent) => {
|
|
2888
|
-
* e.preventDefault();
|
|
2889
|
-
* setShowRecaptcha(true);
|
|
2890
|
-
* };
|
|
2891
|
-
*
|
|
2892
|
-
* const handleRecaptchaVerify = async (token: string) => {
|
|
2893
|
-
* try {
|
|
2894
|
-
* await submitForm({ ...formData, recaptchaToken: token });
|
|
2895
|
-
* setShowRecaptcha(false);
|
|
2896
|
-
* toast.success('Form submitted successfully!');
|
|
2897
|
-
* } catch (error) {
|
|
2898
|
-
* toast.error('Submission failed. Please try again.');
|
|
2899
|
-
* }
|
|
2900
|
-
* };
|
|
2901
|
-
*
|
|
2902
|
-
* return (
|
|
2903
|
-
* <form onSubmit={handleSubmit}>
|
|
2904
|
-
* <input
|
|
2905
|
-
* type="email"
|
|
2906
|
-
* value={formData.email}
|
|
2907
|
-
* onChange={(e) => setFormData(prev => ({ ...prev, email: e.target.value }))}
|
|
2908
|
-
* placeholder="Email"
|
|
2909
|
-
* required
|
|
2910
|
-
* />
|
|
2911
|
-
* <textarea
|
|
2912
|
-
* value={formData.message}
|
|
2913
|
-
* onChange={(e) => setFormData(prev => ({ ...prev, message: e.target.value }))}
|
|
2914
|
-
* placeholder="Message"
|
|
2915
|
-
* required
|
|
2916
|
-
* />
|
|
2917
|
-
*
|
|
2918
|
-
* <RecaptchaPopover
|
|
2919
|
-
* open={showRecaptcha}
|
|
2920
|
-
* onOpenChange={setShowRecaptcha}
|
|
2921
|
-
* onVerify={handleRecaptchaVerify}
|
|
2922
|
-
* trigger={
|
|
2923
|
-
* <Button type="submit">
|
|
2924
|
-
* Send Message
|
|
2925
|
-
* </Button>
|
|
2926
|
-
* }
|
|
2927
|
-
* />
|
|
2928
|
-
* </form>
|
|
2929
|
-
* );
|
|
2930
|
-
* }
|
|
2931
|
-
*
|
|
2932
|
-
* // Custom verification button text
|
|
2933
|
-
* <RecaptchaPopover
|
|
2934
|
-
* open={showVerification}
|
|
2935
|
-
* onOpenChange={setShowVerification}
|
|
2936
|
-
* onVerify={handleVerification}
|
|
2937
|
-
* verifyButtonText="Complete Verification"
|
|
2938
|
-
* trigger={<Button>Verify Account</Button>}
|
|
2939
|
-
* />
|
|
2940
|
-
* ```
|
|
2941
|
-
*/
|
|
2942
|
-
declare function RecaptchaPopover({ open, onOpenChange, onVerify, trigger, verifyButtonText, }: RecaptchaPopoverProps): react_jsx_runtime.JSX.Element;
|
|
2943
|
-
|
|
2944
|
-
export { AlertComingsoon, AlertNotification, AlertToast, type AlertToastOptions, Announcement, AnnouncementTag, AnnouncementTitle, BackLink, BackgroundPaths, Body, Book, CodeDisplay, ComingSoon, type ComingSoonProps, CommandMenu, type CommandMenuProps, ConfirmDismissDialog, type ConfirmDismissDialogProps, DEFAULT_DATA_URL_KEY, DEFAULT_NULL_INDEX, DefaultImage, DefaultLink, DefaultNavigate, DotsPattern, DownloadFile, ErrorComponents, type ErrorComponentsProps, ExtraLink, FloatingPaths, Grid, GridBackground, HexagonBadge, Icons, ImageInput, type ImageInputFile, type ImageInputFiles, type ImageInputProps, LanguageSwitcher, type LanguageSwitcherProps, LayoutAuth, LayoutBlank, type LayoutBlankProps, type LocaleOption, Logo, MainNav, MaxWidthWrapper, MobileNav, MobileNavItemRenderer, ModeSwitcher, type ModeSwitcherProps, MovingBorder, MovingLabel, type NavItem, type NavigationProps, QueryProvider, RecaptchaPopover, SatoshiFontCSS, ScreenLoader, type ScreenLoaderProps, Section, type SharedImage, type SharedLink, type SharedNavigate, SiteFooter, SiteHeader, Stack, Subscribe, type SubscribeProps, ThemeProvider, Toolbar, ToolbarActions, ToolbarHeading, ToolbarTitle, UserAvatar, Video, Wrapper, Youtube, cssFontFace, getAcceptTypeString, getBase64, getImage, getInitials, getListFiles, handleMenuClick, openFileDialog, satoshiFontUrl };
|
|
1
|
+
export * from 'pelatform-ui/components';
|