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