nexoreui-cli 0.1.3 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1096 -652
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -146,20 +146,20 @@ const buttonVariants = cva(
|
|
|
146
146
|
{
|
|
147
147
|
variants: {
|
|
148
148
|
variant: {
|
|
149
|
-
default: "bg-
|
|
149
|
+
default: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",
|
|
150
150
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 border border-border/50",
|
|
151
|
-
destructive: "bg-
|
|
152
|
-
outline: "border
|
|
151
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm",
|
|
152
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
153
153
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
154
154
|
link: "text-primary underline-offset-4 hover:underline",
|
|
155
155
|
// Premium variants
|
|
156
156
|
premium: "bg-gradient-to-r from-violet-600 via-pink-600 to-orange-500 text-white shadow-lg shadow-purple-500/20 hover:shadow-xl hover:shadow-purple-500/30",
|
|
157
|
-
neon: "bg-background border-2 border-primary text-foreground shadow-[
|
|
158
|
-
glass: "backdrop-blur-md bg-
|
|
157
|
+
neon: "bg-background border-2 border-primary text-foreground shadow-[0_0_var(--glow-radius)_rgba(var(--glow-color),var(--glow-strength))] hover:shadow-[0_0_calc(var(--glow-radius)*1.5)_rgba(var(--glow-color),calc(var(--glow-strength)*1.5))]",
|
|
158
|
+
glass: "backdrop-blur-md bg-zinc-900/10 dark:bg-zinc-100/10 border border-zinc-900/20 dark:border-zinc-100/20 text-zinc-900 dark:text-zinc-50 hover:bg-zinc-900/20 dark:hover:bg-zinc-100/20 shadow-md",
|
|
159
159
|
shimmer: "relative overflow-hidden bg-slate-900 text-white dark:bg-white dark:text-black",
|
|
160
160
|
// New requested variants
|
|
161
|
-
gradient: "bg-gradient-to-r from-indigo-500 via-purple-500 to-violet-
|
|
162
|
-
glow: "bg-primary text-primary-foreground shadow-[
|
|
161
|
+
gradient: "bg-gradient-to-r from-indigo-600 via-purple-600 to-violet-600 dark:from-indigo-500 dark:via-purple-500 dark:to-violet-500 text-white shadow-lg shadow-indigo-500/20 hover:shadow-xl hover:shadow-indigo-500/30 hover:opacity-95",
|
|
162
|
+
glow: "bg-primary text-primary-foreground shadow-[0_0_var(--glow-radius)_rgba(var(--glow-color),var(--glow-strength))] hover:shadow-[0_0_calc(var(--glow-radius)*1.5)_rgba(var(--glow-color),calc(var(--glow-strength)*1.5))] border border-primary/20",
|
|
163
163
|
magnetic: "bg-gradient-to-br from-violet-600 to-indigo-600 text-white shadow-md hover:shadow-lg",
|
|
164
164
|
loading: "bg-primary/80 text-primary-foreground/80 pointer-events-none cursor-wait",
|
|
165
165
|
},
|
|
@@ -277,7 +277,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
277
277
|
const resolvedClassName = cn(
|
|
278
278
|
buttonVariants({ variant: activeVariant, size, className }),
|
|
279
279
|
isShimmer && "relative overflow-hidden",
|
|
280
|
-
isGlow && "shadow-[
|
|
280
|
+
isGlow && "shadow-[0_0_var(--glow-radius)_rgba(var(--glow-color),var(--glow-strength))]"
|
|
281
281
|
);
|
|
282
282
|
|
|
283
283
|
if (!animate) {
|
|
@@ -304,7 +304,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
304
304
|
whileHover={{
|
|
305
305
|
scale: isMagnetic ? 1.02 : 1.03,
|
|
306
306
|
y: isMagnetic ? 0 : -1.5,
|
|
307
|
-
shadow: isGlow ? "0 0
|
|
307
|
+
shadow: isGlow ? "0 0 calc(var(--glow-radius)*1.5) rgba(var(--glow-color), calc(var(--glow-strength)*1.5))" : undefined,
|
|
308
308
|
}}
|
|
309
309
|
whileTap={{ scale: 0.97 }}
|
|
310
310
|
transition={{
|
|
@@ -325,9 +325,12 @@ Button.displayName = "Button";
|
|
|
325
325
|
export { Button, buttonVariants };
|
|
326
326
|
|
|
327
327
|
// ----------------------------------------------------
|
|
328
|
-
//
|
|
328
|
+
// Deprecated button wrappers for backward compatibility
|
|
329
329
|
// ----------------------------------------------------
|
|
330
330
|
|
|
331
|
+
/**
|
|
332
|
+
* @deprecated Use the unified \`<Button variant="neon">\` instead.
|
|
333
|
+
*/
|
|
331
334
|
export const NeonButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
332
335
|
({ children, ...props }, ref) => (
|
|
333
336
|
<Button ref={ref} variant="neon" glow={true} {...props}>
|
|
@@ -337,6 +340,9 @@ export const NeonButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
337
340
|
);
|
|
338
341
|
NeonButton.displayName = "NeonButton";
|
|
339
342
|
|
|
343
|
+
/**
|
|
344
|
+
* @deprecated Use custom styles or class variance utilities on the unified \`<Button>\` instead.
|
|
345
|
+
*/
|
|
340
346
|
export const ThreeDButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
341
347
|
({ children, className, ...props }, ref) => (
|
|
342
348
|
<Button
|
|
@@ -353,6 +359,9 @@ export const ThreeDButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
353
359
|
);
|
|
354
360
|
ThreeDButton.displayName = "ThreeDButton";
|
|
355
361
|
|
|
362
|
+
/**
|
|
363
|
+
* @deprecated Use custom ripple animations on the unified \`<Button>\` instead.
|
|
364
|
+
*/
|
|
356
365
|
export const RippleButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
357
366
|
({ children, className, ...props }, ref) => (
|
|
358
367
|
<Button
|
|
@@ -370,6 +379,9 @@ export const RippleButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
370
379
|
);
|
|
371
380
|
RippleButton.displayName = "RippleButton";
|
|
372
381
|
|
|
382
|
+
/**
|
|
383
|
+
* @deprecated Use standard utility classes on the unified \`<Button>\` instead.
|
|
384
|
+
*/
|
|
373
385
|
export const CyberpunkButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
374
386
|
({ children, className, ...props }, ref) => (
|
|
375
387
|
<Button
|
|
@@ -386,6 +398,9 @@ export const CyberpunkButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
386
398
|
);
|
|
387
399
|
CyberpunkButton.displayName = "CyberpunkButton";
|
|
388
400
|
|
|
401
|
+
/**
|
|
402
|
+
* @deprecated Use the unified \`<Button variant="magnetic">\` instead.
|
|
403
|
+
*/
|
|
389
404
|
export const MagneticButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
390
405
|
({ children, ...props }, ref) => (
|
|
391
406
|
<Button ref={ref} variant="magnetic" {...props}>
|
|
@@ -395,6 +410,9 @@ export const MagneticButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
395
410
|
);
|
|
396
411
|
MagneticButton.displayName = "MagneticButton";
|
|
397
412
|
|
|
413
|
+
/**
|
|
414
|
+
* @deprecated Use the unified \`<Button variant="shimmer">\` instead.
|
|
415
|
+
*/
|
|
398
416
|
export const ShimmerButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
399
417
|
({ children, ...props }, ref) => (
|
|
400
418
|
<Button ref={ref} variant="shimmer" shimmer={true} {...props}>
|
|
@@ -404,6 +422,9 @@ export const ShimmerButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
404
422
|
);
|
|
405
423
|
ShimmerButton.displayName = "ShimmerButton";
|
|
406
424
|
|
|
425
|
+
/**
|
|
426
|
+
* @deprecated Use a custom hover effect on the unified \`<Button>\` instead.
|
|
427
|
+
*/
|
|
407
428
|
export const BorderBeamButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
408
429
|
({ children, className, ...props }, ref) => (
|
|
409
430
|
<Button
|
|
@@ -423,6 +444,9 @@ export const BorderBeamButton = React.forwardRef<HTMLButtonElement, ButtonProps>
|
|
|
423
444
|
);
|
|
424
445
|
BorderBeamButton.displayName = "BorderBeamButton";
|
|
425
446
|
|
|
447
|
+
/**
|
|
448
|
+
* @deprecated Use the unified \`<Button isLoading={...}>\` instead.
|
|
449
|
+
*/
|
|
426
450
|
export const LoadingButton = React.forwardRef<HTMLButtonElement, ButtonProps & { isLoading?: boolean }>(
|
|
427
451
|
({ children, isLoading = true, ...props }, ref) => (
|
|
428
452
|
<Button ref={ref} isLoading={isLoading} {...props}>
|
|
@@ -432,6 +456,9 @@ export const LoadingButton = React.forwardRef<HTMLButtonElement, ButtonProps & {
|
|
|
432
456
|
);
|
|
433
457
|
LoadingButton.displayName = "LoadingButton";
|
|
434
458
|
|
|
459
|
+
/**
|
|
460
|
+
* @deprecated Use the unified \`<Button variant="destructive" glow>\` instead.
|
|
461
|
+
*/
|
|
435
462
|
export const DestructiveGlowButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
436
463
|
({ children, ...props }, ref) => (
|
|
437
464
|
<Button ref={ref} variant="destructive" glow={true} {...props}>
|
|
@@ -441,6 +468,9 @@ export const DestructiveGlowButton = React.forwardRef<HTMLButtonElement, ButtonP
|
|
|
441
468
|
);
|
|
442
469
|
DestructiveGlowButton.displayName = "DestructiveGlowButton";
|
|
443
470
|
|
|
471
|
+
/**
|
|
472
|
+
* @deprecated Use the unified \`<Button variant="outline">\` instead.
|
|
473
|
+
*/
|
|
444
474
|
export const GhostOutlineButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
445
475
|
({ children, ...props }, ref) => (
|
|
446
476
|
<Button ref={ref} variant="outline" {...props}>
|
|
@@ -450,6 +480,9 @@ export const GhostOutlineButton = React.forwardRef<HTMLButtonElement, ButtonProp
|
|
|
450
480
|
);
|
|
451
481
|
GhostOutlineButton.displayName = "GhostOutlineButton";
|
|
452
482
|
|
|
483
|
+
/**
|
|
484
|
+
* @deprecated Use the unified \`<Button variant="glow">\` instead.
|
|
485
|
+
*/
|
|
453
486
|
export const GlowButton = React.forwardRef<HTMLButtonElement, ButtonProps & { glowColor?: string }>(
|
|
454
487
|
({ children, glowColor = "rgba(139, 92, 246, 0.15)", className, ...props }, ref) => (
|
|
455
488
|
<div className="relative group inline-block">
|
|
@@ -465,6 +498,9 @@ export const GlowButton = React.forwardRef<HTMLButtonElement, ButtonProps & { gl
|
|
|
465
498
|
);
|
|
466
499
|
GlowButton.displayName = "GlowButton";
|
|
467
500
|
|
|
501
|
+
/**
|
|
502
|
+
* @deprecated Use the unified \`<Button shimmer>\` instead.
|
|
503
|
+
*/
|
|
468
504
|
export const ShinyButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
469
505
|
({ children, ...props }, ref) => (
|
|
470
506
|
<Button ref={ref} shimmer={true} {...props}>
|
|
@@ -474,6 +510,9 @@ export const ShinyButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
474
510
|
);
|
|
475
511
|
ShinyButton.displayName = "ShinyButton";
|
|
476
512
|
|
|
513
|
+
/**
|
|
514
|
+
* @deprecated Use the unified \`<Button variant="gradient">\` instead.
|
|
515
|
+
*/
|
|
477
516
|
export const GradientButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
478
517
|
({ children, ...props }, ref) => (
|
|
479
518
|
<Button ref={ref} variant="gradient" {...props}>
|
|
@@ -483,6 +522,9 @@ export const GradientButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
483
522
|
);
|
|
484
523
|
GradientButton.displayName = "GradientButton";
|
|
485
524
|
|
|
525
|
+
/**
|
|
526
|
+
* @deprecated Use the unified \`<Button variant="glass">\` instead.
|
|
527
|
+
*/
|
|
486
528
|
export const GlassButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
487
529
|
({ children, ...props }, ref) => (
|
|
488
530
|
<Button ref={ref} variant="glass" {...props}>
|
|
@@ -515,8 +557,8 @@ var modal = {
|
|
|
515
557
|
import * as React from "react"
|
|
516
558
|
import * as DialogPrimitive from "@radix-ui/react-dialog"
|
|
517
559
|
import { X, AlertTriangle, CheckCircle, Star } from "lucide-react"
|
|
560
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
518
561
|
import { cn } from "../utils/cn"
|
|
519
|
-
import { Button } from "./button"
|
|
520
562
|
|
|
521
563
|
const Dialog = DialogPrimitive.Root
|
|
522
564
|
|
|
@@ -541,18 +583,52 @@ const DialogOverlay = React.forwardRef<
|
|
|
541
583
|
))
|
|
542
584
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName
|
|
543
585
|
|
|
586
|
+
const dialogContentVariants = cva(
|
|
587
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background/95 backdrop-blur-md p-6 shadow-2xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:scale-95 data-[state=open]:scale-100 data-[state=closed]:translate-y-[-48%] data-[state=open]:translate-y-[-50%] rounded-2xl",
|
|
588
|
+
{
|
|
589
|
+
variants: {
|
|
590
|
+
variant: {
|
|
591
|
+
default: "border-border/50",
|
|
592
|
+
glass: "bg-white/10 backdrop-blur-xl border-white/20 shadow-2xl",
|
|
593
|
+
destructive: "border-destructive/20",
|
|
594
|
+
success: "border-green-500/20",
|
|
595
|
+
fullscreen: "max-w-full h-screen rounded-none",
|
|
596
|
+
drawer: "sm:max-w-full sm:h-[50vh] sm:rounded-b-none sm:rounded-t-[20px] fixed bottom-0 top-auto translate-y-0 data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
597
|
+
},
|
|
598
|
+
size: {
|
|
599
|
+
sm: "max-w-sm",
|
|
600
|
+
md: "max-w-md",
|
|
601
|
+
lg: "max-w-lg",
|
|
602
|
+
xl: "max-w-xl",
|
|
603
|
+
"2xl": "max-w-2xl",
|
|
604
|
+
full: "max-w-[95vw] md:max-w-[90vw]",
|
|
605
|
+
},
|
|
606
|
+
scrollable: {
|
|
607
|
+
true: "max-h-[80vh] overflow-y-auto",
|
|
608
|
+
false: "",
|
|
609
|
+
}
|
|
610
|
+
},
|
|
611
|
+
defaultVariants: {
|
|
612
|
+
variant: "default",
|
|
613
|
+
size: "lg",
|
|
614
|
+
scrollable: false,
|
|
615
|
+
},
|
|
616
|
+
}
|
|
617
|
+
)
|
|
618
|
+
|
|
619
|
+
export interface DialogContentProps
|
|
620
|
+
extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>,
|
|
621
|
+
VariantProps<typeof dialogContentVariants> {}
|
|
622
|
+
|
|
544
623
|
const DialogContent = React.forwardRef<
|
|
545
624
|
React.ElementRef<typeof DialogPrimitive.Content>,
|
|
546
|
-
|
|
547
|
-
>(({ className, children, ...props }, ref) => (
|
|
625
|
+
DialogContentProps
|
|
626
|
+
>(({ className, variant, size, scrollable, children, ...props }, ref) => (
|
|
548
627
|
<DialogPortal>
|
|
549
628
|
<DialogOverlay />
|
|
550
629
|
<DialogPrimitive.Content
|
|
551
630
|
ref={ref}
|
|
552
|
-
className={cn(
|
|
553
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border/50 bg-background/95 backdrop-blur-md p-6 shadow-2xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:scale-95 data-[state=open]:scale-100 data-[state=closed]:translate-y-[-48%] data-[state=open]:translate-y-[-50%] rounded-2xl",
|
|
554
|
-
className
|
|
555
|
-
)}
|
|
631
|
+
className={cn(dialogContentVariants({ variant, size, scrollable, className }))}
|
|
556
632
|
{...props}
|
|
557
633
|
>
|
|
558
634
|
{children}
|
|
@@ -632,437 +708,6 @@ export {
|
|
|
632
708
|
DialogTitle,
|
|
633
709
|
DialogDescription,
|
|
634
710
|
}
|
|
635
|
-
|
|
636
|
-
export interface ModalProps {
|
|
637
|
-
/**
|
|
638
|
-
* The title of the modal
|
|
639
|
-
*/
|
|
640
|
-
title?: React.ReactNode;
|
|
641
|
-
/**
|
|
642
|
-
* The description of the modal
|
|
643
|
-
*/
|
|
644
|
-
description?: React.ReactNode;
|
|
645
|
-
/**
|
|
646
|
-
* The content of the modal
|
|
647
|
-
*/
|
|
648
|
-
children?: React.ReactNode;
|
|
649
|
-
/**
|
|
650
|
-
* The trigger element to open the modal
|
|
651
|
-
*/
|
|
652
|
-
trigger?: React.ReactNode;
|
|
653
|
-
/**
|
|
654
|
-
* Callback function called when the confirm button is clicked
|
|
655
|
-
*/
|
|
656
|
-
onConfirm?: () => void;
|
|
657
|
-
/**
|
|
658
|
-
* Callback function called when the cancel button is clicked
|
|
659
|
-
*/
|
|
660
|
-
onCancel?: () => void;
|
|
661
|
-
/**
|
|
662
|
-
* The text for the confirm button
|
|
663
|
-
* @default "Confirm"
|
|
664
|
-
*/
|
|
665
|
-
confirmText?: string;
|
|
666
|
-
/**
|
|
667
|
-
* The text for the cancel button
|
|
668
|
-
* @default "Cancel"
|
|
669
|
-
*/
|
|
670
|
-
cancelText?: string;
|
|
671
|
-
/**
|
|
672
|
-
* Whether the modal is open
|
|
673
|
-
*/
|
|
674
|
-
isOpen?: boolean;
|
|
675
|
-
/**
|
|
676
|
-
* Callback function called when the open state changes
|
|
677
|
-
*/
|
|
678
|
-
onOpenChange?: (open: boolean) => void;
|
|
679
|
-
/**
|
|
680
|
-
* The variant of the modal
|
|
681
|
-
* @default "default"
|
|
682
|
-
*/
|
|
683
|
-
variant?: "default" | "glass" | "destructive" | "success" | "fullscreen" | "drawer";
|
|
684
|
-
/**
|
|
685
|
-
* Whether the content is scrollable
|
|
686
|
-
* @default false
|
|
687
|
-
*/
|
|
688
|
-
scrollable?: boolean;
|
|
689
|
-
/**
|
|
690
|
-
* Additional className for the dialog content
|
|
691
|
-
*/
|
|
692
|
-
className?: string;
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
export function Modal({
|
|
696
|
-
title,
|
|
697
|
-
description,
|
|
698
|
-
children,
|
|
699
|
-
trigger,
|
|
700
|
-
onConfirm,
|
|
701
|
-
onCancel,
|
|
702
|
-
confirmText = "Confirm",
|
|
703
|
-
cancelText = "Cancel",
|
|
704
|
-
isOpen,
|
|
705
|
-
onOpenChange,
|
|
706
|
-
variant = "default",
|
|
707
|
-
scrollable = false,
|
|
708
|
-
className,
|
|
709
|
-
}: ModalProps) {
|
|
710
|
-
const variantClasses = {
|
|
711
|
-
default: "",
|
|
712
|
-
glass: "bg-white/10 backdrop-blur-xl border-white/20 shadow-2xl",
|
|
713
|
-
destructive: "border-destructive/20",
|
|
714
|
-
success: "border-green-500/20",
|
|
715
|
-
fullscreen: "max-w-full h-screen rounded-none",
|
|
716
|
-
drawer: "sm:max-w-full sm:h-[50vh] sm:rounded-b-none sm:rounded-t-[20px] fixed bottom-0 top-auto translate-y-0",
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
const isDestructive = variant === "destructive";
|
|
720
|
-
const isSuccess = variant === "success";
|
|
721
|
-
|
|
722
|
-
return (
|
|
723
|
-
<Dialog open={isOpen} onOpenChange={onOpenChange}>
|
|
724
|
-
{trigger && <DialogTrigger asChild>{trigger}</DialogTrigger>}
|
|
725
|
-
<DialogContent className={cn(variantClasses[variant], scrollable ? "max-h-[80vh] overflow-y-auto" : "", className)}>
|
|
726
|
-
{(title || description || isDestructive || isSuccess) && (
|
|
727
|
-
<DialogHeader className={cn((isDestructive || isSuccess) ? "flex flex-col items-center text-center sm:text-center" : "")}>
|
|
728
|
-
{isDestructive && (
|
|
729
|
-
<div className="mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-destructive/10 mb-4">
|
|
730
|
-
<AlertTriangle className="h-6 w-6 text-destructive" />
|
|
731
|
-
</div>
|
|
732
|
-
)}
|
|
733
|
-
{isSuccess && (
|
|
734
|
-
<div className="mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-500/10 mb-4">
|
|
735
|
-
<CheckCircle className="h-6 w-6 text-green-500" />
|
|
736
|
-
</div>
|
|
737
|
-
)}
|
|
738
|
-
{title && <DialogTitle className={cn((isDestructive || isSuccess) ? "text-xl" : "")}>{title}</DialogTitle>}
|
|
739
|
-
{description && <DialogDescription>{description}</DialogDescription>}
|
|
740
|
-
</DialogHeader>
|
|
741
|
-
)}
|
|
742
|
-
<div className="py-4">{children}</div>
|
|
743
|
-
{(onConfirm || onCancel || isDestructive || isSuccess) && (
|
|
744
|
-
<DialogFooter className={cn((isDestructive || isSuccess) ? "sm:justify-center flex-col sm:flex-row gap-2" : "")}>
|
|
745
|
-
{onCancel && (
|
|
746
|
-
<DialogPrimitive.Close asChild>
|
|
747
|
-
<Button variant="outline" className={cn((isDestructive || isSuccess) ? "w-full sm:w-auto" : "")} onClick={onCancel}>{cancelText}</Button>
|
|
748
|
-
</DialogPrimitive.Close>
|
|
749
|
-
)}
|
|
750
|
-
{onConfirm && (
|
|
751
|
-
<Button
|
|
752
|
-
variant={isDestructive ? "destructive" : "default"}
|
|
753
|
-
className={cn((isDestructive || isSuccess) ? "w-full sm:w-auto" : "", isSuccess ? "bg-green-500 hover:bg-green-600" : "")}
|
|
754
|
-
onClick={onConfirm}
|
|
755
|
-
>
|
|
756
|
-
{confirmText}
|
|
757
|
-
</Button>
|
|
758
|
-
)}
|
|
759
|
-
</DialogFooter>
|
|
760
|
-
)}
|
|
761
|
-
</DialogContent>
|
|
762
|
-
</Dialog>
|
|
763
|
-
)
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
// ============================================
|
|
767
|
-
// Backward compatibility wrappers & variants
|
|
768
|
-
// ============================================
|
|
769
|
-
|
|
770
|
-
export interface BasicModalProps {
|
|
771
|
-
isOpen?: boolean;
|
|
772
|
-
onOpenChange?: (open: boolean) => void;
|
|
773
|
-
trigger?: React.ReactNode;
|
|
774
|
-
title?: string;
|
|
775
|
-
description?: string;
|
|
776
|
-
children?: React.ReactNode;
|
|
777
|
-
confirmText?: string;
|
|
778
|
-
cancelText?: string;
|
|
779
|
-
onConfirm?: () => void;
|
|
780
|
-
onCancel?: () => void;
|
|
781
|
-
className?: string;
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
export const BasicModal = ({
|
|
785
|
-
isOpen,
|
|
786
|
-
onOpenChange,
|
|
787
|
-
trigger,
|
|
788
|
-
title = "Basic Modal",
|
|
789
|
-
description = "This is a simple modal dialog that can be used for various purposes.",
|
|
790
|
-
children,
|
|
791
|
-
confirmText = "Confirm",
|
|
792
|
-
cancelText = "Cancel",
|
|
793
|
-
onConfirm,
|
|
794
|
-
onCancel,
|
|
795
|
-
className = ""
|
|
796
|
-
}: BasicModalProps) => {
|
|
797
|
-
return (
|
|
798
|
-
<Modal
|
|
799
|
-
isOpen={isOpen}
|
|
800
|
-
onOpenChange={onOpenChange}
|
|
801
|
-
trigger={trigger}
|
|
802
|
-
title={title}
|
|
803
|
-
description={description}
|
|
804
|
-
confirmText={confirmText}
|
|
805
|
-
cancelText={cancelText}
|
|
806
|
-
onConfirm={onConfirm}
|
|
807
|
-
onCancel={onCancel}
|
|
808
|
-
className={className}
|
|
809
|
-
variant="default"
|
|
810
|
-
>
|
|
811
|
-
{children}
|
|
812
|
-
</Modal>
|
|
813
|
-
)
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
export interface InteractiveGlassModalProps {
|
|
817
|
-
isOpen?: boolean;
|
|
818
|
-
onOpenChange?: (open: boolean) => void;
|
|
819
|
-
trigger?: React.ReactNode;
|
|
820
|
-
icon?: React.ReactNode;
|
|
821
|
-
title?: string;
|
|
822
|
-
description?: string;
|
|
823
|
-
children?: React.ReactNode;
|
|
824
|
-
confirmText?: string;
|
|
825
|
-
cancelText?: string;
|
|
826
|
-
onConfirm?: () => void;
|
|
827
|
-
onCancel?: () => void;
|
|
828
|
-
className?: string;
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
export const InteractiveGlassModal = ({
|
|
832
|
-
isOpen,
|
|
833
|
-
onOpenChange,
|
|
834
|
-
trigger,
|
|
835
|
-
icon = <Star className="w-6 h-6 text-yellow-300" />,
|
|
836
|
-
title = "Premium Glass Effect",
|
|
837
|
-
description = "This modal uses full glassmorphism for a stunning visual effect.",
|
|
838
|
-
children,
|
|
839
|
-
confirmText = "Upgrade Now",
|
|
840
|
-
cancelText = "Maybe Later",
|
|
841
|
-
onConfirm,
|
|
842
|
-
onCancel,
|
|
843
|
-
className = ""
|
|
844
|
-
}: InteractiveGlassModalProps) => {
|
|
845
|
-
return (
|
|
846
|
-
<Modal
|
|
847
|
-
isOpen={isOpen}
|
|
848
|
-
onOpenChange={onOpenChange}
|
|
849
|
-
trigger={trigger}
|
|
850
|
-
title={<span className="flex items-center gap-2">{icon} {title}</span>}
|
|
851
|
-
description={description}
|
|
852
|
-
confirmText={confirmText}
|
|
853
|
-
cancelText={cancelText}
|
|
854
|
-
onConfirm={onConfirm}
|
|
855
|
-
onCancel={onCancel}
|
|
856
|
-
className={className}
|
|
857
|
-
variant="glass"
|
|
858
|
-
>
|
|
859
|
-
{children}
|
|
860
|
-
</Modal>
|
|
861
|
-
)
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
export interface DangerModalProps {
|
|
865
|
-
isOpen?: boolean;
|
|
866
|
-
onOpenChange?: (open: boolean) => void;
|
|
867
|
-
trigger?: React.ReactNode;
|
|
868
|
-
icon?: React.ReactNode;
|
|
869
|
-
title?: string;
|
|
870
|
-
description?: string;
|
|
871
|
-
children?: React.ReactNode;
|
|
872
|
-
confirmText?: string;
|
|
873
|
-
cancelText?: string;
|
|
874
|
-
onConfirm?: () => void;
|
|
875
|
-
onCancel?: () => void;
|
|
876
|
-
className?: string;
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
export const DangerModal = ({
|
|
880
|
-
isOpen,
|
|
881
|
-
onOpenChange,
|
|
882
|
-
trigger,
|
|
883
|
-
icon = <X className="w-8 h-8" />,
|
|
884
|
-
title = "Are you absolutely sure?",
|
|
885
|
-
description = "This action cannot be undone. This will permanently delete your account and remove your data from our servers.",
|
|
886
|
-
children,
|
|
887
|
-
confirmText = "Delete",
|
|
888
|
-
cancelText = "Cancel",
|
|
889
|
-
onConfirm,
|
|
890
|
-
onCancel,
|
|
891
|
-
className = ""
|
|
892
|
-
}: DangerModalProps) => {
|
|
893
|
-
return (
|
|
894
|
-
<Modal
|
|
895
|
-
isOpen={isOpen}
|
|
896
|
-
onOpenChange={onOpenChange}
|
|
897
|
-
trigger={trigger}
|
|
898
|
-
title={title}
|
|
899
|
-
description={description}
|
|
900
|
-
confirmText={confirmText}
|
|
901
|
-
cancelText={cancelText}
|
|
902
|
-
onConfirm={onConfirm}
|
|
903
|
-
onCancel={onCancel}
|
|
904
|
-
className={className}
|
|
905
|
-
variant="destructive"
|
|
906
|
-
>
|
|
907
|
-
{children}
|
|
908
|
-
</Modal>
|
|
909
|
-
)
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
export interface GlassModalProps {
|
|
913
|
-
trigger?: React.ReactNode
|
|
914
|
-
title?: React.ReactNode
|
|
915
|
-
description?: React.ReactNode
|
|
916
|
-
children?: React.ReactNode
|
|
917
|
-
open?: boolean
|
|
918
|
-
onOpenChange?: (open: boolean) => void
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
export function GlassModal({ trigger, title = "Glass Modal", description, children, open, onOpenChange }: GlassModalProps) {
|
|
922
|
-
return (
|
|
923
|
-
<Modal
|
|
924
|
-
isOpen={open}
|
|
925
|
-
onOpenChange={onOpenChange}
|
|
926
|
-
trigger={trigger}
|
|
927
|
-
title={title}
|
|
928
|
-
description={description}
|
|
929
|
-
variant="glass"
|
|
930
|
-
>
|
|
931
|
-
{children}
|
|
932
|
-
</Modal>
|
|
933
|
-
)
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
export interface AlertModalProps {
|
|
937
|
-
trigger?: React.ReactNode
|
|
938
|
-
title?: string
|
|
939
|
-
description?: string
|
|
940
|
-
onConfirm?: () => void
|
|
941
|
-
onCancel?: () => void
|
|
942
|
-
confirmText?: string
|
|
943
|
-
cancelText?: string
|
|
944
|
-
children?: React.ReactNode
|
|
945
|
-
open?: boolean
|
|
946
|
-
onOpenChange?: (open: boolean) => void
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
export function AlertModal({
|
|
950
|
-
trigger,
|
|
951
|
-
title = "Are you absolutely sure?",
|
|
952
|
-
description,
|
|
953
|
-
onConfirm,
|
|
954
|
-
onCancel,
|
|
955
|
-
confirmText = "Confirm",
|
|
956
|
-
cancelText = "Cancel",
|
|
957
|
-
children,
|
|
958
|
-
open,
|
|
959
|
-
onOpenChange
|
|
960
|
-
}: AlertModalProps) {
|
|
961
|
-
return (
|
|
962
|
-
<Modal
|
|
963
|
-
isOpen={open}
|
|
964
|
-
onOpenChange={onOpenChange}
|
|
965
|
-
trigger={trigger}
|
|
966
|
-
title={title}
|
|
967
|
-
description={description}
|
|
968
|
-
confirmText={confirmText}
|
|
969
|
-
cancelText={cancelText}
|
|
970
|
-
onConfirm={onConfirm}
|
|
971
|
-
onCancel={onCancel}
|
|
972
|
-
variant="destructive"
|
|
973
|
-
>
|
|
974
|
-
{children}
|
|
975
|
-
</Modal>
|
|
976
|
-
)
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
export interface SuccessModalProps {
|
|
980
|
-
trigger?: React.ReactNode
|
|
981
|
-
title?: string
|
|
982
|
-
description?: string
|
|
983
|
-
children?: React.ReactNode
|
|
984
|
-
open?: boolean
|
|
985
|
-
onOpenChange?: (open: boolean) => void
|
|
986
|
-
confirmText?: string
|
|
987
|
-
onConfirm?: () => void
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
export function SuccessModal({
|
|
991
|
-
trigger,
|
|
992
|
-
title = "Success!",
|
|
993
|
-
description,
|
|
994
|
-
children,
|
|
995
|
-
open,
|
|
996
|
-
onOpenChange,
|
|
997
|
-
confirmText = "Awesome",
|
|
998
|
-
onConfirm
|
|
999
|
-
}: SuccessModalProps) {
|
|
1000
|
-
return (
|
|
1001
|
-
<Modal
|
|
1002
|
-
isOpen={open}
|
|
1003
|
-
onOpenChange={onOpenChange}
|
|
1004
|
-
trigger={trigger}
|
|
1005
|
-
title={title}
|
|
1006
|
-
description={description}
|
|
1007
|
-
confirmText={confirmText}
|
|
1008
|
-
onConfirm={onConfirm}
|
|
1009
|
-
variant="success"
|
|
1010
|
-
>
|
|
1011
|
-
{children}
|
|
1012
|
-
</Modal>
|
|
1013
|
-
)
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
export interface CommandPaletteModalProps {
|
|
1017
|
-
trigger: React.ReactNode
|
|
1018
|
-
open?: boolean
|
|
1019
|
-
onOpenChange?: (open: boolean) => void
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
export function CommandPaletteModal({ trigger, open, onOpenChange }: CommandPaletteModalProps) {
|
|
1023
|
-
return (
|
|
1024
|
-
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
1025
|
-
<DialogTrigger asChild>{trigger}</DialogTrigger>
|
|
1026
|
-
<DialogContent className="p-0 overflow-hidden sm:max-w-[600px] gap-0">
|
|
1027
|
-
<div className="flex items-center border-b px-3">
|
|
1028
|
-
<svg className="mr-2 h-4 w-4 shrink-0 opacity-50" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>
|
|
1029
|
-
<input className="flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50" placeholder="Type a command or search..." />
|
|
1030
|
-
</div>
|
|
1031
|
-
<div className="max-h-[300px] overflow-y-auto p-2">
|
|
1032
|
-
<div className="px-2 py-1.5 text-xs font-medium text-muted-foreground">Suggestions</div>
|
|
1033
|
-
<div className="flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground hover:bg-accent/50">
|
|
1034
|
-
Calendar
|
|
1035
|
-
</div>
|
|
1036
|
-
<div className="flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground hover:bg-accent/50">
|
|
1037
|
-
Search Emoji
|
|
1038
|
-
</div>
|
|
1039
|
-
<div className="flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground hover:bg-accent/50">
|
|
1040
|
-
Calculator
|
|
1041
|
-
</div>
|
|
1042
|
-
</div>
|
|
1043
|
-
</DialogContent>
|
|
1044
|
-
</Dialog>
|
|
1045
|
-
)
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
|
-
export interface BottomSheetSimulatedProps {
|
|
1049
|
-
trigger: React.ReactNode
|
|
1050
|
-
children?: React.ReactNode
|
|
1051
|
-
open?: boolean
|
|
1052
|
-
onOpenChange?: (open: boolean) => void
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
export function BottomSheetSimulated({ trigger, children, open, onOpenChange }: BottomSheetSimulatedProps) {
|
|
1056
|
-
return (
|
|
1057
|
-
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
1058
|
-
<DialogTrigger asChild>{trigger}</DialogTrigger>
|
|
1059
|
-
<DialogContent className="sm:max-w-full sm:h-[50vh] sm:rounded-b-none sm:rounded-t-[10px] fixed bottom-0 top-auto translate-y-0 data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom">
|
|
1060
|
-
<div className="mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" />
|
|
1061
|
-
{children}
|
|
1062
|
-
</DialogContent>
|
|
1063
|
-
</Dialog>
|
|
1064
|
-
)
|
|
1065
|
-
}
|
|
1066
711
|
`
|
|
1067
712
|
};
|
|
1068
713
|
|
|
@@ -1124,26 +769,6 @@ export interface CardProps
|
|
|
1124
769
|
* @default true
|
|
1125
770
|
*/
|
|
1126
771
|
animate?: boolean;
|
|
1127
|
-
/**
|
|
1128
|
-
* The main title of the card
|
|
1129
|
-
*/
|
|
1130
|
-
title?: React.ReactNode;
|
|
1131
|
-
/**
|
|
1132
|
-
* The subtitle or description of the card
|
|
1133
|
-
*/
|
|
1134
|
-
description?: React.ReactNode;
|
|
1135
|
-
/**
|
|
1136
|
-
* Content to render in the card footer area
|
|
1137
|
-
*/
|
|
1138
|
-
footer?: React.ReactNode;
|
|
1139
|
-
/**
|
|
1140
|
-
* An optional image URL to display at the top of the card
|
|
1141
|
-
*/
|
|
1142
|
-
image?: string;
|
|
1143
|
-
/**
|
|
1144
|
-
* HTML alternative text for the image
|
|
1145
|
-
*/
|
|
1146
|
-
imageAlt?: string;
|
|
1147
772
|
/**
|
|
1148
773
|
* Back content displayed when using the \`flip\` variant on hover
|
|
1149
774
|
*/
|
|
@@ -1162,11 +787,6 @@ const Card = React.forwardRef<HTMLDivElement, CardProps>(
|
|
|
1162
787
|
variant,
|
|
1163
788
|
hover,
|
|
1164
789
|
animate = true,
|
|
1165
|
-
title,
|
|
1166
|
-
description,
|
|
1167
|
-
footer,
|
|
1168
|
-
image,
|
|
1169
|
-
imageAlt,
|
|
1170
790
|
backContent,
|
|
1171
791
|
spotlightColor = "rgba(139, 92, 246, 0.15)",
|
|
1172
792
|
children,
|
|
@@ -1174,8 +794,6 @@ const Card = React.forwardRef<HTMLDivElement, CardProps>(
|
|
|
1174
794
|
},
|
|
1175
795
|
ref
|
|
1176
796
|
) => {
|
|
1177
|
-
const isCompound = !title && !description && !footer && !image;
|
|
1178
|
-
|
|
1179
797
|
// Feature toggles based on variants
|
|
1180
798
|
const isSpotlight = variant === "spotlight";
|
|
1181
799
|
const isFlip = variant === "flip";
|
|
@@ -1212,26 +830,6 @@ const Card = React.forwardRef<HTMLDivElement, CardProps>(
|
|
|
1212
830
|
// Flip card hover state
|
|
1213
831
|
const [isFlipped, setIsFlipped] = React.useState(false);
|
|
1214
832
|
|
|
1215
|
-
const baseContent = isCompound ? (
|
|
1216
|
-
children
|
|
1217
|
-
) : (
|
|
1218
|
-
<>
|
|
1219
|
-
{image && (
|
|
1220
|
-
<div className="relative w-full h-48 overflow-hidden rounded-t-2xl">
|
|
1221
|
-
<img src={image} alt={imageAlt || (typeof title === 'string' ? title : 'Card image')} className="object-cover w-full h-full transition-transform duration-300 hover:scale-105" />
|
|
1222
|
-
</div>
|
|
1223
|
-
)}
|
|
1224
|
-
{(title || description) && (
|
|
1225
|
-
<CardHeader>
|
|
1226
|
-
{title && <CardTitle>{title}</CardTitle>}
|
|
1227
|
-
{description && <CardDescription>{description}</CardDescription>}
|
|
1228
|
-
</CardHeader>
|
|
1229
|
-
)}
|
|
1230
|
-
{children && <CardContent>{children as React.ReactNode}</CardContent>}
|
|
1231
|
-
{footer && <CardFooter>{footer}</CardFooter>}
|
|
1232
|
-
</>
|
|
1233
|
-
);
|
|
1234
|
-
|
|
1235
833
|
// Destructure custom props to avoid DOM validation warnings
|
|
1236
834
|
const { ...htmlProps } = props;
|
|
1237
835
|
|
|
@@ -1252,7 +850,7 @@ const Card = React.forwardRef<HTMLDivElement, CardProps>(
|
|
|
1252
850
|
>
|
|
1253
851
|
{/* Front Face */}
|
|
1254
852
|
<div className="absolute inset-0 backface-hidden border bg-card text-card-foreground rounded-2xl shadow-sm flex flex-col justify-between overflow-hidden">
|
|
1255
|
-
{
|
|
853
|
+
{children}
|
|
1256
854
|
</div>
|
|
1257
855
|
|
|
1258
856
|
{/* Back Face */}
|
|
@@ -1303,7 +901,7 @@ const Card = React.forwardRef<HTMLDivElement, CardProps>(
|
|
|
1303
901
|
{...(htmlProps as any)}
|
|
1304
902
|
>
|
|
1305
903
|
{spotlightEffect}
|
|
1306
|
-
{
|
|
904
|
+
{children}
|
|
1307
905
|
</motion.div>
|
|
1308
906
|
);
|
|
1309
907
|
}
|
|
@@ -1314,7 +912,7 @@ const Card = React.forwardRef<HTMLDivElement, CardProps>(
|
|
|
1314
912
|
className={cardClass}
|
|
1315
913
|
{...(htmlProps as React.HTMLAttributes<HTMLDivElement>)}
|
|
1316
914
|
>
|
|
1317
|
-
{
|
|
915
|
+
{children}
|
|
1318
916
|
</div>
|
|
1319
917
|
);
|
|
1320
918
|
}
|
|
@@ -1424,144 +1022,7 @@ export const SpotlightCard = React.forwardRef<HTMLDivElement, CardProps>(
|
|
|
1424
1022
|
);
|
|
1425
1023
|
SpotlightCard.displayName = "SpotlightCard";
|
|
1426
1024
|
|
|
1427
|
-
// ============================================
|
|
1428
|
-
// Consolidated Legacy/Special Cards for Compatibility
|
|
1429
|
-
// ============================================
|
|
1430
|
-
|
|
1431
|
-
export const ImageCard = ({ src, title, subtitle, imageUrl, description }: any) => {
|
|
1432
|
-
const finalSrc = src || imageUrl;
|
|
1433
|
-
const finalTitle = title;
|
|
1434
|
-
const finalSubtitle = subtitle || description;
|
|
1435
|
-
return (
|
|
1436
|
-
<div className="group relative overflow-hidden rounded-xl border bg-card text-card-foreground">
|
|
1437
|
-
<div className="aspect-[4/3] w-full bg-muted overflow-hidden">
|
|
1438
|
-
{finalSrc ? (
|
|
1439
|
-
<img
|
|
1440
|
-
src={finalSrc}
|
|
1441
|
-
className="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"
|
|
1442
|
-
alt={typeof finalTitle === "string" ? finalTitle : "Image"}
|
|
1443
|
-
/>
|
|
1444
|
-
) : (
|
|
1445
|
-
<div className="w-full h-full bg-muted-foreground/20" />
|
|
1446
|
-
)}
|
|
1447
|
-
</div>
|
|
1448
|
-
<div className="p-4">
|
|
1449
|
-
<h3 className="font-semibold text-lg">{finalTitle}</h3>
|
|
1450
|
-
<p className="text-sm text-muted-foreground">{finalSubtitle}</p>
|
|
1451
|
-
</div>
|
|
1452
|
-
</div>
|
|
1453
|
-
);
|
|
1454
|
-
};
|
|
1455
|
-
|
|
1456
|
-
export const ProfileCard = ({ name, role, avatar }: any) => (
|
|
1457
|
-
<div className="flex flex-col items-center p-6 text-center rounded-xl border bg-card shadow-sm">
|
|
1458
|
-
<div className="w-24 h-24 rounded-full bg-muted mb-4 overflow-hidden border-4 border-background shadow-md">
|
|
1459
|
-
{avatar && <img src={avatar} className="w-full h-full object-cover" alt={name} />}
|
|
1460
|
-
</div>
|
|
1461
|
-
<h3 className="text-xl font-bold">{name}</h3>
|
|
1462
|
-
<p className="text-sm text-muted-foreground mb-4">{role}</p>
|
|
1463
|
-
<button className="px-6 py-2 bg-primary text-primary-foreground rounded-full font-medium w-full hover:bg-primary/90 transition-colors">Follow</button>
|
|
1464
|
-
</div>
|
|
1465
|
-
)
|
|
1466
|
-
|
|
1467
|
-
export const ProductCard = ({ title, price, category, src }: any) => (
|
|
1468
|
-
<div className="rounded-xl border bg-card p-4 flex flex-col gap-3 group">
|
|
1469
|
-
<div className="aspect-square w-full rounded-lg bg-muted overflow-hidden relative">
|
|
1470
|
-
{src && <img src={src} className="w-full h-full object-cover" alt={title} />}
|
|
1471
|
-
<button className="absolute top-2 right-2 p-2 bg-background/50 backdrop-blur rounded-full hover:bg-background transition-colors"><Heart className="w-4 h-4" /></button>
|
|
1472
|
-
</div>
|
|
1473
|
-
<div>
|
|
1474
|
-
<p className="text-xs text-muted-foreground mb-1">{category}</p>
|
|
1475
|
-
<h3 className="font-medium truncate">{title}</h3>
|
|
1476
|
-
<p className="font-bold text-lg mt-1">\${price}</p>
|
|
1477
|
-
</div>
|
|
1478
|
-
</div>
|
|
1479
|
-
)
|
|
1480
|
-
|
|
1481
|
-
export const ArticleCard = ({ title, excerpt, date }: any) => (
|
|
1482
|
-
<div className="p-6 rounded-xl border bg-card flex flex-col gap-4 hover:shadow-md transition-shadow cursor-pointer">
|
|
1483
|
-
<span className="text-xs font-medium text-primary">{date}</span>
|
|
1484
|
-
<h3 className="text-xl font-bold leading-tight">{title}</h3>
|
|
1485
|
-
<p className="text-muted-foreground line-clamp-3">{excerpt}</p>
|
|
1486
|
-
<div className="mt-auto pt-4 border-t flex items-center justify-between text-sm">
|
|
1487
|
-
<span className="font-medium">Read more \u2192</span>
|
|
1488
|
-
<button><Share2 className="w-4 h-4 text-muted-foreground hover:text-foreground" /></button>
|
|
1489
|
-
</div>
|
|
1490
|
-
</div>
|
|
1491
|
-
)
|
|
1492
|
-
|
|
1493
|
-
export const StatCardSimple = ({ label, value, trend }: any) => (
|
|
1494
|
-
<div className="p-5 rounded-xl border bg-card">
|
|
1495
|
-
<p className="text-sm font-medium text-muted-foreground mb-2">{label}</p>
|
|
1496
|
-
<div className="flex items-end justify-between">
|
|
1497
|
-
<h4 className="text-3xl font-bold">{value}</h4>
|
|
1498
|
-
<span className={\`text-sm font-medium \${trend?.startsWith('+') ? 'text-green-500' : 'text-red-500'}\`}>{trend}</span>
|
|
1499
|
-
</div>
|
|
1500
|
-
</div>
|
|
1501
|
-
)
|
|
1502
|
-
|
|
1503
|
-
export const PricingCardBasic = ({ name, price, features }: any) => (
|
|
1504
|
-
<div className="p-6 rounded-xl border bg-card flex flex-col items-center text-center">
|
|
1505
|
-
<h3 className="text-xl font-medium mb-2">{name}</h3>
|
|
1506
|
-
<div className="mb-6"><span className="text-4xl font-bold">\${price}</span><span className="text-muted-foreground">/mo</span></div>
|
|
1507
|
-
<ul className="space-y-3 w-full mb-8 text-sm">
|
|
1508
|
-
{features?.map((f: string, i: number) => <li key={i} className="text-muted-foreground border-b pb-2 last:border-0">{f}</li>)}
|
|
1509
|
-
</ul>
|
|
1510
|
-
<button className="w-full py-2 bg-primary text-primary-foreground rounded-lg font-medium mt-auto">Subscribe</button>
|
|
1511
|
-
</div>
|
|
1512
|
-
)
|
|
1513
|
-
|
|
1514
|
-
export const WeatherCard = ({ city, temp, condition }: any) => (
|
|
1515
|
-
<div className="p-6 rounded-xl border bg-gradient-to-br from-blue-500 to-cyan-400 text-white shadow-lg">
|
|
1516
|
-
<div className="flex justify-between items-start mb-8">
|
|
1517
|
-
<div>
|
|
1518
|
-
<h3 className="text-2xl font-bold">{city}</h3>
|
|
1519
|
-
<p className="opacity-80">{condition}</p>
|
|
1520
|
-
</div>
|
|
1521
|
-
<div className="text-5xl font-light">{temp}\xB0</div>
|
|
1522
|
-
</div>
|
|
1523
|
-
<div className="flex gap-4 opacity-90 text-sm">
|
|
1524
|
-
<span>H: {temp + 4}\xB0</span>
|
|
1525
|
-
<span>L: {temp - 3}\xB0</span>
|
|
1526
|
-
</div>
|
|
1527
|
-
</div>
|
|
1528
|
-
)
|
|
1529
|
-
|
|
1530
|
-
export const EventCard = ({ title, date, location }: any) => (
|
|
1531
|
-
<div className="flex p-4 rounded-xl border bg-card gap-4">
|
|
1532
|
-
<div className="flex flex-col items-center justify-center bg-primary/10 text-primary rounded-lg px-4 py-2 min-w-[70px]">
|
|
1533
|
-
<span className="text-xs uppercase font-bold">{date?.split(' ')[0]}</span>
|
|
1534
|
-
<span className="text-2xl font-black">{date?.split(' ')[1]}</span>
|
|
1535
|
-
</div>
|
|
1536
|
-
<div className="flex flex-col justify-center">
|
|
1537
|
-
<h3 className="font-bold text-lg leading-tight mb-1">{title}</h3>
|
|
1538
|
-
<div className="flex items-center text-sm text-muted-foreground gap-1">
|
|
1539
|
-
<MapPin className="w-3 h-3" /> {location}
|
|
1540
|
-
</div>
|
|
1541
|
-
</div>
|
|
1542
|
-
</div>
|
|
1543
|
-
)
|
|
1544
|
-
|
|
1545
|
-
export const TestimonialCardBasic = ({ text, author }: any) => (
|
|
1546
|
-
<div className="p-6 rounded-xl border bg-muted/30 italic relative">
|
|
1547
|
-
<span className="absolute top-4 left-4 text-4xl text-primary/20 font-serif">"</span>
|
|
1548
|
-
<p className="relative z-10 text-muted-foreground mb-4 pt-4">{text}</p>
|
|
1549
|
-
<div className="flex items-center gap-2">
|
|
1550
|
-
<div className="w-8 h-8 rounded-full bg-primary/20" />
|
|
1551
|
-
<span className="font-semibold text-sm not-italic">{author}</span>
|
|
1552
|
-
</div>
|
|
1553
|
-
</div>
|
|
1554
|
-
)
|
|
1555
1025
|
|
|
1556
|
-
export const InteractiveCard = ({ title, description }: any) => (
|
|
1557
|
-
<div className="group p-6 rounded-xl border bg-card hover:bg-primary hover:text-primary-foreground transition-all duration-300 cursor-pointer">
|
|
1558
|
-
<div className="w-12 h-12 rounded-lg bg-primary/10 text-primary group-hover:bg-primary-foreground/20 group-hover:text-primary-foreground flex items-center justify-center mb-4 transition-colors">
|
|
1559
|
-
<Star className="w-6 h-6" />
|
|
1560
|
-
</div>
|
|
1561
|
-
<h3 className="text-xl font-bold mb-2">{title}</h3>
|
|
1562
|
-
<p className="text-muted-foreground group-hover:text-primary-foreground/80 transition-colors">{description}</p>
|
|
1563
|
-
</div>
|
|
1564
|
-
)
|
|
1565
1026
|
|
|
1566
1027
|
|
|
1567
1028
|
`
|
|
@@ -1614,13 +1075,45 @@ const alertVariants = cva(
|
|
|
1614
1075
|
export interface AlertProps
|
|
1615
1076
|
extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'>,
|
|
1616
1077
|
VariantProps<typeof alertVariants> {
|
|
1078
|
+
/**
|
|
1079
|
+
* \u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0434\u043B\u044F animate
|
|
1080
|
+
* @default undefined
|
|
1081
|
+
*/
|
|
1617
1082
|
animate?: boolean;
|
|
1083
|
+
/**
|
|
1084
|
+
* \u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0434\u043B\u044F title
|
|
1085
|
+
* @default undefined
|
|
1086
|
+
*/
|
|
1618
1087
|
title?: React.ReactNode;
|
|
1088
|
+
/**
|
|
1089
|
+
* \u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0434\u043B\u044F description
|
|
1090
|
+
* @default undefined
|
|
1091
|
+
*/
|
|
1619
1092
|
description?: React.ReactNode;
|
|
1093
|
+
/**
|
|
1094
|
+
* \u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0434\u043B\u044F icon
|
|
1095
|
+
* @default undefined
|
|
1096
|
+
*/
|
|
1620
1097
|
icon?: React.ReactNode;
|
|
1098
|
+
/**
|
|
1099
|
+
* \u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0434\u043B\u044F dismissible
|
|
1100
|
+
* @default undefined
|
|
1101
|
+
*/
|
|
1621
1102
|
dismissible?: boolean;
|
|
1103
|
+
/**
|
|
1104
|
+
* \u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0434\u043B\u044F onDismiss
|
|
1105
|
+
* @default undefined
|
|
1106
|
+
*/
|
|
1622
1107
|
onDismiss?: () => void;
|
|
1108
|
+
/**
|
|
1109
|
+
* \u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0434\u043B\u044F actionText
|
|
1110
|
+
* @default undefined
|
|
1111
|
+
*/
|
|
1623
1112
|
actionText?: string;
|
|
1113
|
+
/**
|
|
1114
|
+
* \u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0434\u043B\u044F onAction
|
|
1115
|
+
* @default undefined
|
|
1116
|
+
*/
|
|
1624
1117
|
onAction?: () => void;
|
|
1625
1118
|
}
|
|
1626
1119
|
|
|
@@ -1649,10 +1142,19 @@ const Alert = React.forwardRef<HTMLDivElement, AlertProps>(
|
|
|
1649
1142
|
const isMinimal = variant === "minimal";
|
|
1650
1143
|
const isBanner = variant === "banner";
|
|
1651
1144
|
|
|
1145
|
+
const defaultIcon = icon || (
|
|
1146
|
+
variant === "destructive" ? <XCircle className="h-4 w-4" /> :
|
|
1147
|
+
variant === "success" ? <CheckCircle2 className="h-4 w-4" /> :
|
|
1148
|
+
variant === "warning" ? <AlertTriangle className="h-4 w-4" /> :
|
|
1149
|
+
variant === "info" ? <Info className="h-4 w-4" /> :
|
|
1150
|
+
variant === "default" ? <AlertCircle className="h-4 w-4" /> :
|
|
1151
|
+
null
|
|
1152
|
+
);
|
|
1153
|
+
|
|
1652
1154
|
const content = (
|
|
1653
1155
|
<>
|
|
1654
|
-
{
|
|
1655
|
-
<div className={cn(
|
|
1156
|
+
{defaultIcon && <div className={cn("absolute left-4", isMinimal ? "top-3" : "top-4")}>{defaultIcon}</div>}
|
|
1157
|
+
<div className={cn(defaultIcon ? "pl-7" : "", "pr-8")}>
|
|
1656
1158
|
{title && <AlertTitle>{title}</AlertTitle>}
|
|
1657
1159
|
{description && <AlertDescription>{description}</AlertDescription>}
|
|
1658
1160
|
{!title && !description && children}
|
|
@@ -1810,19 +1312,38 @@ export const RateLimitAlert = () => (
|
|
|
1810
1312
|
|
|
1811
1313
|
// Re-export original/merged components
|
|
1812
1314
|
export { Alert, AlertTitle, AlertDescription }
|
|
1813
|
-
|
|
1315
|
+
/**
|
|
1316
|
+
* @deprecated Use the unified \`<Alert variant="cyberpunk">\` instead.
|
|
1317
|
+
*/
|
|
1318
|
+
export const CyberAlert = ({ title, description, variant = "default", ...props }: any) => (
|
|
1814
1319
|
<Alert variant="cyberpunk" title={title} description={description} {...props} />
|
|
1815
1320
|
)
|
|
1816
|
-
|
|
1321
|
+
|
|
1322
|
+
/**
|
|
1323
|
+
* @deprecated Use \`<Alert variant="success">\` or \`<Alert variant="info">\` instead.
|
|
1324
|
+
*/
|
|
1325
|
+
export const SoftAlert = ({ title, description, variant = "default", ...props }: any) => (
|
|
1817
1326
|
<Alert variant={variant === "success" ? "success" : "info"} title={title} description={description} {...props} />
|
|
1818
1327
|
)
|
|
1819
|
-
|
|
1328
|
+
|
|
1329
|
+
/**
|
|
1330
|
+
* @deprecated Use \`<Alert variant="minimal">\` instead.
|
|
1331
|
+
*/
|
|
1332
|
+
export const MinimalAlert = ({ title, description, variant = "default", ...props }: any) => (
|
|
1820
1333
|
<Alert variant="minimal" title={title} description={description} {...props} />
|
|
1821
1334
|
)
|
|
1822
|
-
|
|
1335
|
+
|
|
1336
|
+
/**
|
|
1337
|
+
* @deprecated Use \`<Alert className="border-l-4 ...">\` instead.
|
|
1338
|
+
*/
|
|
1339
|
+
export const LeftBorderAlert = ({ title, description, variant = "default", ...props }: any) => (
|
|
1823
1340
|
<Alert variant={variant === "warning" ? "warning" : "default"} className="border-l-4 border-l-primary" title={title} description={description} {...props} />
|
|
1824
1341
|
)
|
|
1825
|
-
|
|
1342
|
+
|
|
1343
|
+
/**
|
|
1344
|
+
* @deprecated Use custom styled layouts or standard elements instead.
|
|
1345
|
+
*/
|
|
1346
|
+
export const IconTopAlert = ({ title, description, variant = "default", ...props }: any) => (
|
|
1826
1347
|
<div className="flex flex-col items-center text-center p-6 bg-card border rounded-2xl" {...props}>
|
|
1827
1348
|
<div className="h-12 w-12 rounded-full bg-destructive/10 text-destructive flex items-center justify-center mb-4">
|
|
1828
1349
|
<AlertCircle className="h-6 w-6" />
|
|
@@ -1831,7 +1352,11 @@ export const IconTopAlert = ({ title, description, variant, ...props }: any) =>
|
|
|
1831
1352
|
<p className="text-sm text-muted-foreground">{description}</p>
|
|
1832
1353
|
</div>
|
|
1833
1354
|
)
|
|
1834
|
-
|
|
1355
|
+
|
|
1356
|
+
/**
|
|
1357
|
+
* @deprecated Use standard tailwind background colors on unified \`<Alert>\` instead.
|
|
1358
|
+
*/
|
|
1359
|
+
export const SolidAlert = ({ title, description, variant = "default", ...props }: any) => {
|
|
1835
1360
|
const bgClasses: Record<string, string> = {
|
|
1836
1361
|
error: "bg-red-600 text-white border-0",
|
|
1837
1362
|
success: "bg-emerald-600 text-white border-0",
|
|
@@ -1849,16 +1374,32 @@ export const SolidAlert = ({ title, description, variant, ...props }: any) => {
|
|
|
1849
1374
|
</div>
|
|
1850
1375
|
)
|
|
1851
1376
|
}
|
|
1852
|
-
|
|
1377
|
+
|
|
1378
|
+
/**
|
|
1379
|
+
* @deprecated Use \`<Alert variant="banner">\` instead.
|
|
1380
|
+
*/
|
|
1381
|
+
export const BannerAlert = ({ message, variant = "default", ...props }: any) => (
|
|
1853
1382
|
<Alert variant="banner" title={message} {...props} />
|
|
1854
1383
|
)
|
|
1855
|
-
|
|
1384
|
+
|
|
1385
|
+
/**
|
|
1386
|
+
* @deprecated Use \`<Alert variant="neon">\` instead.
|
|
1387
|
+
*/
|
|
1388
|
+
export const NeonAlert = ({ title, description, variant = "default", ...props }: any) => (
|
|
1856
1389
|
<Alert variant="neon" title={title} description={description} {...props} />
|
|
1857
1390
|
)
|
|
1858
|
-
|
|
1391
|
+
|
|
1392
|
+
/**
|
|
1393
|
+
* @deprecated Use \`<Alert variant="glass">\` instead.
|
|
1394
|
+
*/
|
|
1395
|
+
export const GlassAlert = ({ title, description, variant = "default", ...props }: any) => (
|
|
1859
1396
|
<Alert variant="glass" title={title} description={description} {...props} />
|
|
1860
1397
|
)
|
|
1861
|
-
|
|
1398
|
+
|
|
1399
|
+
/**
|
|
1400
|
+
* @deprecated Use \`<Alert dismissible={true}>\` instead.
|
|
1401
|
+
*/
|
|
1402
|
+
export const DismissibleAlert = ({ variant = "default", title, description, ...props }: any) => (
|
|
1862
1403
|
<Alert variant={variant} title={title || "Attention"} description={description || "Action required"} dismissible={true} {...props} />
|
|
1863
1404
|
)
|
|
1864
1405
|
|
|
@@ -1881,7 +1422,6 @@ var badge = {
|
|
|
1881
1422
|
import * as React from "react"
|
|
1882
1423
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
1883
1424
|
import { cn } from "../utils/cn"
|
|
1884
|
-
import { Star } from "lucide-react"
|
|
1885
1425
|
|
|
1886
1426
|
const badgeVariants = cva(
|
|
1887
1427
|
"inline-flex items-center gap-1 rounded-full border font-semibold transition-all focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 cursor-default",
|
|
@@ -1892,9 +1432,11 @@ const badgeVariants = cva(
|
|
|
1892
1432
|
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
1893
1433
|
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
1894
1434
|
outline: "text-foreground border-border hover:bg-accent",
|
|
1895
|
-
gradient: "border-transparent bg-gradient-to-r from-violet-500 to-pink-500 text-white shadow-sm",
|
|
1896
|
-
neon: "border-
|
|
1435
|
+
gradient: "border-transparent bg-gradient-to-r from-violet-600 to-pink-600 dark:from-violet-500 dark:to-pink-500 text-white shadow-sm",
|
|
1436
|
+
neon: "border-primary/50 bg-primary/10 text-primary shadow-[0_0_10px_rgba(var(--primary-rgb),0.3)]",
|
|
1897
1437
|
success: "border-transparent bg-emerald-500/20 text-emerald-600 dark:text-emerald-400",
|
|
1438
|
+
warning: "border-transparent bg-amber-500/20 text-amber-600 dark:text-amber-400",
|
|
1439
|
+
info: "border-transparent bg-blue-500/20 text-blue-600 dark:text-blue-400",
|
|
1898
1440
|
},
|
|
1899
1441
|
size: {
|
|
1900
1442
|
default: "px-2.5 py-0.5 text-xs",
|
|
@@ -1912,8 +1454,20 @@ const badgeVariants = cva(
|
|
|
1912
1454
|
export interface BadgeProps
|
|
1913
1455
|
extends React.HTMLAttributes<HTMLDivElement>,
|
|
1914
1456
|
VariantProps<typeof badgeVariants> {
|
|
1457
|
+
/**
|
|
1458
|
+
* \u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0434\u043B\u044F pulse
|
|
1459
|
+
* @default undefined
|
|
1460
|
+
*/
|
|
1915
1461
|
pulse?: boolean;
|
|
1462
|
+
/**
|
|
1463
|
+
* \u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0434\u043B\u044F dot
|
|
1464
|
+
* @default undefined
|
|
1465
|
+
*/
|
|
1916
1466
|
dot?: boolean;
|
|
1467
|
+
/**
|
|
1468
|
+
* \u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0434\u043B\u044F text
|
|
1469
|
+
* @default undefined
|
|
1470
|
+
*/
|
|
1917
1471
|
text?: string;
|
|
1918
1472
|
}
|
|
1919
1473
|
|
|
@@ -1935,7 +1489,8 @@ function Badge({ className, variant, size, pulse = false, dot = false, children,
|
|
|
1935
1489
|
)
|
|
1936
1490
|
}
|
|
1937
1491
|
|
|
1938
|
-
export { Badge, badgeVariants }
|
|
1492
|
+
export { Badge, badgeVariants }
|
|
1493
|
+
`
|
|
1939
1494
|
};
|
|
1940
1495
|
|
|
1941
1496
|
// src/registry/morphing-geometry.ts
|
|
@@ -2282,6 +1837,882 @@ AuroraBorderFX.displayName = 'AuroraBorderFX';
|
|
|
2282
1837
|
`
|
|
2283
1838
|
};
|
|
2284
1839
|
|
|
1840
|
+
// src/registry/aurora-search-pill.ts
|
|
1841
|
+
var auroraSearchPill = {
|
|
1842
|
+
name: "auroraSearchPill",
|
|
1843
|
+
dependencies: [
|
|
1844
|
+
"clsx",
|
|
1845
|
+
"tailwind-merge",
|
|
1846
|
+
"framer-motion",
|
|
1847
|
+
"lucide-react"
|
|
1848
|
+
],
|
|
1849
|
+
fileName: "aurora-search-pill.tsx",
|
|
1850
|
+
content: `'use client';
|
|
1851
|
+
|
|
1852
|
+
import * as React from 'react';
|
|
1853
|
+
import { Globe, Sparkles } from 'lucide-react';
|
|
1854
|
+
import { cn } from '../utils/cn';
|
|
1855
|
+
|
|
1856
|
+
// Register hardware angle property once for conic gradient rotation
|
|
1857
|
+
if (typeof window !== 'undefined' && typeof (window as any).CSS !== 'undefined' && 'registerProperty' in (window as any).CSS) {
|
|
1858
|
+
try {
|
|
1859
|
+
(window as any).CSS.registerProperty({
|
|
1860
|
+
name: '--aurora-deg',
|
|
1861
|
+
syntax: '<angle>',
|
|
1862
|
+
inherits: false,
|
|
1863
|
+
initialValue: '0deg',
|
|
1864
|
+
});
|
|
1865
|
+
} catch {}
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
export interface AuroraSearchSource {
|
|
1869
|
+
/** Unique key for the source badge */
|
|
1870
|
+
id: string;
|
|
1871
|
+
/** Label or tooltip text for the source */
|
|
1872
|
+
label?: string;
|
|
1873
|
+
/** Direct avatar image URL (e.g. favicon, PNG, SVG) */
|
|
1874
|
+
avatarUrl?: string;
|
|
1875
|
+
/** Custom icon or element */
|
|
1876
|
+
icon?: React.ReactNode;
|
|
1877
|
+
/** Text initials to display inside badge */
|
|
1878
|
+
initials?: string;
|
|
1879
|
+
/** Built-in preset type or custom */
|
|
1880
|
+
type?: 'globe' | 'gradient' | 'github' | 'claude' | 'chatgpt' | 'perplexity' | 'custom';
|
|
1881
|
+
/** Custom background CSS string or hex */
|
|
1882
|
+
bg?: string;
|
|
1883
|
+
}
|
|
1884
|
+
|
|
1885
|
+
export type AuroraSearchPillSize = 'sm' | 'md' | 'lg';
|
|
1886
|
+
export type AuroraSearchPillSpeed = 'slow' | 'normal' | 'fast';
|
|
1887
|
+
export type AuroraSearchPillTheme = 'light' | 'dark' | 'auto';
|
|
1888
|
+
export type AuroraSearchPillGlow = 'subtle' | 'medium' | 'strong' | 'none';
|
|
1889
|
+
export type AuroraSpinMode = 'always' | 'searching' | 'hover' | 'never';
|
|
1890
|
+
|
|
1891
|
+
export interface AuroraSearchPillProps
|
|
1892
|
+
extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onToggle'> {
|
|
1893
|
+
/** Controlled searching state */
|
|
1894
|
+
isSearching?: boolean;
|
|
1895
|
+
/** Uncontrolled default searching state */
|
|
1896
|
+
defaultSearching?: boolean;
|
|
1897
|
+
/** Callback fired when searching state toggles */
|
|
1898
|
+
onToggle?: (searching: boolean) => void;
|
|
1899
|
+
/** Main search title text shown when active (default: "Search...") */
|
|
1900
|
+
searchLabel?: string;
|
|
1901
|
+
/** List of badge sources to render in the active state */
|
|
1902
|
+
sources?: AuroraSearchSource[];
|
|
1903
|
+
/** Shortcut array of avatar image URLs */
|
|
1904
|
+
sourceAvatars?: string[];
|
|
1905
|
+
/** Color theme for the pill body: light, dark, or auto (follows dark mode) */
|
|
1906
|
+
theme?: AuroraSearchPillTheme;
|
|
1907
|
+
/** Size scale of the pill */
|
|
1908
|
+
size?: AuroraSearchPillSize;
|
|
1909
|
+
/** Glow intensity of the surrounding ambient aurora */
|
|
1910
|
+
glowIntensity?: AuroraSearchPillGlow;
|
|
1911
|
+
/** Speed of the rotating aurora beam */
|
|
1912
|
+
speed?: AuroraSearchPillSpeed;
|
|
1913
|
+
/**
|
|
1914
|
+
* When the aurora beam should rotate:
|
|
1915
|
+
* - 'always' (default): continuously rotates the aurora light wave all the time
|
|
1916
|
+
* - 'searching': only spins while searching/active, remains calm when idle
|
|
1917
|
+
* - 'hover': spins on cursor hover / focus
|
|
1918
|
+
* - 'never': static gradient, no rotation
|
|
1919
|
+
*/
|
|
1920
|
+
spinMode?: AuroraSpinMode;
|
|
1921
|
+
/** Manually override spinning state */
|
|
1922
|
+
isSpinning?: boolean;
|
|
1923
|
+
/** Automatically toggle searching state at a set interval (demo mode) */
|
|
1924
|
+
autoCycle?: boolean;
|
|
1925
|
+
/** Interval in ms for autoCycle (default: 2400) */
|
|
1926
|
+
cycleInterval?: number;
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1929
|
+
const DEFAULT_SOURCES: AuroraSearchSource[] = [
|
|
1930
|
+
{ id: 'web', type: 'globe', label: 'Web' },
|
|
1931
|
+
{ id: 'gradient', type: 'gradient', label: 'Neural Index' },
|
|
1932
|
+
{ id: 'github', type: 'github', label: 'GitHub' },
|
|
1933
|
+
];
|
|
1934
|
+
|
|
1935
|
+
const SPEED_MAP: Record<AuroraSearchPillSpeed, string> = {
|
|
1936
|
+
slow: '5s',
|
|
1937
|
+
normal: '3.2s',
|
|
1938
|
+
fast: '1.8s',
|
|
1939
|
+
};
|
|
1940
|
+
|
|
1941
|
+
const GLOW_OPACITY: Record<AuroraSearchPillGlow, number> = {
|
|
1942
|
+
none: 0,
|
|
1943
|
+
subtle: 0.45,
|
|
1944
|
+
medium: 0.75,
|
|
1945
|
+
strong: 0.95,
|
|
1946
|
+
};
|
|
1947
|
+
|
|
1948
|
+
const SIZE_CONFIG: Record<
|
|
1949
|
+
AuroraSearchPillSize,
|
|
1950
|
+
{
|
|
1951
|
+
height: string;
|
|
1952
|
+
paddingDots: string;
|
|
1953
|
+
paddingSearch: string;
|
|
1954
|
+
dotSize: string;
|
|
1955
|
+
dotGap: string;
|
|
1956
|
+
fontSize: string;
|
|
1957
|
+
badgeSize: string;
|
|
1958
|
+
badgeMargin: string;
|
|
1959
|
+
minWidthSearch: string;
|
|
1960
|
+
}
|
|
1961
|
+
> = {
|
|
1962
|
+
sm: {
|
|
1963
|
+
height: 'h-10',
|
|
1964
|
+
paddingDots: 'px-4',
|
|
1965
|
+
paddingSearch: 'px-4',
|
|
1966
|
+
dotSize: 'w-1.5 h-1.5',
|
|
1967
|
+
dotGap: 'gap-1.5',
|
|
1968
|
+
fontSize: 'text-xs',
|
|
1969
|
+
badgeSize: 'w-4 h-4',
|
|
1970
|
+
badgeMargin: '-ml-1',
|
|
1971
|
+
minWidthSearch: 'min-w-[160px]',
|
|
1972
|
+
},
|
|
1973
|
+
md: {
|
|
1974
|
+
height: 'h-12',
|
|
1975
|
+
paddingDots: 'px-5',
|
|
1976
|
+
paddingSearch: 'px-5',
|
|
1977
|
+
dotSize: 'w-[6.5px] h-[6.5px]',
|
|
1978
|
+
dotGap: 'gap-[7px]',
|
|
1979
|
+
fontSize: 'text-sm sm:text-base',
|
|
1980
|
+
badgeSize: 'w-[22px] h-[22px]',
|
|
1981
|
+
badgeMargin: '-ml-1.5',
|
|
1982
|
+
minWidthSearch: 'min-w-[190px]',
|
|
1983
|
+
},
|
|
1984
|
+
lg: {
|
|
1985
|
+
height: 'h-14',
|
|
1986
|
+
paddingDots: 'px-6',
|
|
1987
|
+
paddingSearch: 'px-6',
|
|
1988
|
+
dotSize: 'w-2 h-2',
|
|
1989
|
+
dotGap: 'gap-2',
|
|
1990
|
+
fontSize: 'text-base sm:text-lg',
|
|
1991
|
+
badgeSize: 'w-6 h-6',
|
|
1992
|
+
badgeMargin: '-ml-2',
|
|
1993
|
+
minWidthSearch: 'min-w-[220px]',
|
|
1994
|
+
},
|
|
1995
|
+
};
|
|
1996
|
+
|
|
1997
|
+
/**
|
|
1998
|
+
* AuroraSearchPill Component
|
|
1999
|
+
*
|
|
2000
|
+
* An ultra-premium AI search pill with an ambient rotating aurora conic glow,
|
|
2001
|
+
* 1.5px illuminated border track, and smooth transition between pulsing dots and
|
|
2002
|
+
* active search query with source badges.
|
|
2003
|
+
*/
|
|
2004
|
+
export const AuroraSearchPill = React.forwardRef<HTMLDivElement, AuroraSearchPillProps>(
|
|
2005
|
+
(
|
|
2006
|
+
{
|
|
2007
|
+
isSearching: controlledSearching,
|
|
2008
|
+
defaultSearching = false,
|
|
2009
|
+
onToggle,
|
|
2010
|
+
searchLabel = 'Search...',
|
|
2011
|
+
sources = DEFAULT_SOURCES,
|
|
2012
|
+
sourceAvatars,
|
|
2013
|
+
theme = 'auto',
|
|
2014
|
+
size = 'md',
|
|
2015
|
+
glowIntensity = 'medium',
|
|
2016
|
+
speed = 'normal',
|
|
2017
|
+
spinMode = 'always',
|
|
2018
|
+
isSpinning: controlledSpinning,
|
|
2019
|
+
autoCycle = false,
|
|
2020
|
+
cycleInterval = 2400,
|
|
2021
|
+
className,
|
|
2022
|
+
onClick,
|
|
2023
|
+
onMouseEnter,
|
|
2024
|
+
onMouseLeave,
|
|
2025
|
+
...props
|
|
2026
|
+
},
|
|
2027
|
+
ref
|
|
2028
|
+
) => {
|
|
2029
|
+
const isControlled = controlledSearching !== undefined;
|
|
2030
|
+
const [uncontrolledSearching, setUncontrolledSearching] = React.useState(defaultSearching);
|
|
2031
|
+
const active = isControlled ? controlledSearching : uncontrolledSearching;
|
|
2032
|
+
|
|
2033
|
+
const [isHovered, setIsHovered] = React.useState(false);
|
|
2034
|
+
|
|
2035
|
+
// Unique style injection ID for CSS custom property and keyframes
|
|
2036
|
+
const instanceId = React.useId().replace(/:/g, '');
|
|
2037
|
+
|
|
2038
|
+
// Resolve active sources list (support direct sourceAvatars list)
|
|
2039
|
+
const activeSources = React.useMemo<AuroraSearchSource[]>(() => {
|
|
2040
|
+
if (sourceAvatars && sourceAvatars.length > 0) {
|
|
2041
|
+
return sourceAvatars.map((url, i): AuroraSearchSource => ({
|
|
2042
|
+
id: \`avatar-\${i}\`,
|
|
2043
|
+
avatarUrl: url,
|
|
2044
|
+
label: \`Source \${i + 1}\`,
|
|
2045
|
+
type: 'custom',
|
|
2046
|
+
}));
|
|
2047
|
+
}
|
|
2048
|
+
return sources;
|
|
2049
|
+
}, [sourceAvatars, sources]);
|
|
2050
|
+
|
|
2051
|
+
// Determine whether the aurora beam should actively rotate (default: always on)
|
|
2052
|
+
const shouldSpin = React.useMemo(() => {
|
|
2053
|
+
if (controlledSpinning !== undefined) return controlledSpinning;
|
|
2054
|
+
if (spinMode === 'never') return false;
|
|
2055
|
+
if (spinMode === 'searching') return active;
|
|
2056
|
+
if (spinMode === 'hover') return isHovered;
|
|
2057
|
+
// Default: 'always' -> continuously rotates in both idle (dots) and searching states
|
|
2058
|
+
return true;
|
|
2059
|
+
}, [controlledSpinning, spinMode, isHovered, active]);
|
|
2060
|
+
|
|
2061
|
+
// Auto demo cycling
|
|
2062
|
+
React.useEffect(() => {
|
|
2063
|
+
if (!autoCycle) return;
|
|
2064
|
+
const interval = setInterval(() => {
|
|
2065
|
+
if (isControlled) {
|
|
2066
|
+
onToggle?.(!active);
|
|
2067
|
+
} else {
|
|
2068
|
+
setUncontrolledSearching((prev) => {
|
|
2069
|
+
const next = !prev;
|
|
2070
|
+
onToggle?.(next);
|
|
2071
|
+
return next;
|
|
2072
|
+
});
|
|
2073
|
+
}
|
|
2074
|
+
}, cycleInterval);
|
|
2075
|
+
|
|
2076
|
+
return () => clearInterval(interval);
|
|
2077
|
+
}, [autoCycle, cycleInterval, active, isControlled, onToggle]);
|
|
2078
|
+
|
|
2079
|
+
const handleToggle = (e: React.MouseEvent<HTMLDivElement>) => {
|
|
2080
|
+
onClick?.(e);
|
|
2081
|
+
if (!isControlled) {
|
|
2082
|
+
setUncontrolledSearching(!active);
|
|
2083
|
+
}
|
|
2084
|
+
onToggle?.(!active);
|
|
2085
|
+
};
|
|
2086
|
+
|
|
2087
|
+
const sizeStyle = SIZE_CONFIG[size] || SIZE_CONFIG.md;
|
|
2088
|
+
const animationDuration = SPEED_MAP[speed] || SPEED_MAP.normal;
|
|
2089
|
+
const glowAlpha = GLOW_OPACITY[glowIntensity] ?? GLOW_OPACITY.medium;
|
|
2090
|
+
|
|
2091
|
+
// Theme resolution for pill body
|
|
2092
|
+
const bodyThemeClass =
|
|
2093
|
+
theme === 'light'
|
|
2094
|
+
? 'bg-white text-slate-900 border-white/60 shadow-sm'
|
|
2095
|
+
: theme === 'dark'
|
|
2096
|
+
? 'bg-[#090d16] text-white border-white/10 shadow-lg shadow-black/40'
|
|
2097
|
+
: 'bg-white text-slate-900 dark:bg-[#090d16] dark:text-white border-white/60 dark:border-white/10 shadow-sm dark:shadow-black/40';
|
|
2098
|
+
|
|
2099
|
+
const dotsColorClass =
|
|
2100
|
+
theme === 'light'
|
|
2101
|
+
? 'bg-slate-900'
|
|
2102
|
+
: theme === 'dark'
|
|
2103
|
+
? 'bg-white'
|
|
2104
|
+
: 'bg-slate-900 dark:bg-white';
|
|
2105
|
+
|
|
2106
|
+
return (
|
|
2107
|
+
<div
|
|
2108
|
+
ref={ref}
|
|
2109
|
+
onClick={handleToggle}
|
|
2110
|
+
onMouseEnter={(e) => {
|
|
2111
|
+
setIsHovered(true);
|
|
2112
|
+
onMouseEnter?.(e);
|
|
2113
|
+
}}
|
|
2114
|
+
onMouseLeave={(e) => {
|
|
2115
|
+
setIsHovered(false);
|
|
2116
|
+
onMouseLeave?.(e);
|
|
2117
|
+
}}
|
|
2118
|
+
role="button"
|
|
2119
|
+
tabIndex={0}
|
|
2120
|
+
aria-pressed={active}
|
|
2121
|
+
aria-label={active ? \`Searching: \${searchLabel}\` : 'Activate AI Search'}
|
|
2122
|
+
onKeyDown={(e) => {
|
|
2123
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
2124
|
+
e.preventDefault();
|
|
2125
|
+
handleToggle(e as unknown as React.MouseEvent<HTMLDivElement>);
|
|
2126
|
+
}
|
|
2127
|
+
}}
|
|
2128
|
+
className={cn(
|
|
2129
|
+
'relative inline-flex items-center justify-center cursor-pointer select-none isolate outline-none group',
|
|
2130
|
+
'transition-transform duration-200 ease-out active:scale-[0.96] focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2',
|
|
2131
|
+
className
|
|
2132
|
+
)}
|
|
2133
|
+
{...props}
|
|
2134
|
+
>
|
|
2135
|
+
{/* Scoped CSS for hardware accelerated conic rotation and pulse */}
|
|
2136
|
+
<style dangerouslySetInnerHTML={{
|
|
2137
|
+
__html: \`
|
|
2138
|
+
@property --aurora-deg {
|
|
2139
|
+
syntax: '<angle>';
|
|
2140
|
+
initial-value: 0deg;
|
|
2141
|
+
inherits: false;
|
|
2142
|
+
}
|
|
2143
|
+
@keyframes spinAurora {
|
|
2144
|
+
from {
|
|
2145
|
+
--aurora-deg: 0deg;
|
|
2146
|
+
}
|
|
2147
|
+
to {
|
|
2148
|
+
--aurora-deg: 360deg;
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2151
|
+
@keyframes dotPulse {
|
|
2152
|
+
0%, 80%, 100% {
|
|
2153
|
+
opacity: 0.35;
|
|
2154
|
+
transform: scale(0.75);
|
|
2155
|
+
}
|
|
2156
|
+
40% {
|
|
2157
|
+
opacity: 1;
|
|
2158
|
+
transform: scale(1.15);
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
\`,
|
|
2162
|
+
}} />
|
|
2163
|
+
|
|
2164
|
+
{/* 1. Ambient Volumetric Glow (Aurora Ambient Glow) */}
|
|
2165
|
+
{glowIntensity !== 'none' && (
|
|
2166
|
+
<div
|
|
2167
|
+
className="absolute -inset-1.5 rounded-full pointer-events-none blur-md z-0 transition-opacity duration-300"
|
|
2168
|
+
style={{
|
|
2169
|
+
opacity: glowAlpha,
|
|
2170
|
+
background: \`conic-gradient(
|
|
2171
|
+
from var(--aurora-deg, 0deg) at 50% 50%,
|
|
2172
|
+
transparent 0deg,
|
|
2173
|
+
rgba(59, 130, 246, 0.75) 60deg,
|
|
2174
|
+
rgba(139, 92, 246, 0.9) 110deg,
|
|
2175
|
+
rgba(236, 72, 153, 0.95) 160deg,
|
|
2176
|
+
rgba(244, 63, 94, 0.8) 200deg,
|
|
2177
|
+
transparent 250deg,
|
|
2178
|
+
transparent 360deg
|
|
2179
|
+
)\`,
|
|
2180
|
+
animation: shouldSpin
|
|
2181
|
+
? \`spinAurora \${animationDuration} linear infinite\`
|
|
2182
|
+
: undefined,
|
|
2183
|
+
}}
|
|
2184
|
+
/>
|
|
2185
|
+
)}
|
|
2186
|
+
|
|
2187
|
+
{/* 2. Sharp 1.5px Conic Border Track */}
|
|
2188
|
+
<div
|
|
2189
|
+
className="relative z-10 p-[1.5px] rounded-full transition-shadow duration-300 shadow-sm"
|
|
2190
|
+
style={{
|
|
2191
|
+
background: \`conic-gradient(
|
|
2192
|
+
from var(--aurora-deg, 0deg) at 50% 50%,
|
|
2193
|
+
rgba(226, 232, 240, 0.8) 0deg,
|
|
2194
|
+
rgba(59, 130, 246, 0.85) 60deg,
|
|
2195
|
+
rgba(139, 92, 246, 1) 110deg,
|
|
2196
|
+
rgba(236, 72, 153, 1) 160deg,
|
|
2197
|
+
rgba(244, 63, 94, 0.85) 200deg,
|
|
2198
|
+
rgba(226, 232, 240, 0.6) 260deg,
|
|
2199
|
+
rgba(226, 232, 240, 0.8) 360deg
|
|
2200
|
+
)\`,
|
|
2201
|
+
animation: shouldSpin
|
|
2202
|
+
? \`spinAurora \${animationDuration} linear infinite\`
|
|
2203
|
+
: undefined,
|
|
2204
|
+
}}
|
|
2205
|
+
>
|
|
2206
|
+
{/* 3. Center Pill Body */}
|
|
2207
|
+
<div
|
|
2208
|
+
className={cn(
|
|
2209
|
+
'relative z-20 rounded-full flex items-center justify-center overflow-hidden border',
|
|
2210
|
+
sizeStyle.height,
|
|
2211
|
+
active ? cn(sizeStyle.paddingSearch, sizeStyle.minWidthSearch) : sizeStyle.paddingDots,
|
|
2212
|
+
bodyThemeClass,
|
|
2213
|
+
'transition-all duration-500 [transition-timing-function:cubic-bezier(0.16,1,0.3,1)]'
|
|
2214
|
+
)}
|
|
2215
|
+
>
|
|
2216
|
+
{/* STATE 1: Pulsing Dots (Idle/Listening) */}
|
|
2217
|
+
<div
|
|
2218
|
+
className={cn(
|
|
2219
|
+
'flex items-center',
|
|
2220
|
+
sizeStyle.dotGap,
|
|
2221
|
+
'transition-all duration-400 [transition-timing-function:cubic-bezier(0.16,1,0.3,1)]',
|
|
2222
|
+
active
|
|
2223
|
+
? 'opacity-0 scale-50 -translate-y-2 pointer-events-none absolute'
|
|
2224
|
+
: 'opacity-100 scale-100 translate-y-0'
|
|
2225
|
+
)}
|
|
2226
|
+
>
|
|
2227
|
+
{[0, 1, 2].map((idx) => (
|
|
2228
|
+
<span
|
|
2229
|
+
key={idx}
|
|
2230
|
+
className={cn('rounded-full inline-block', sizeStyle.dotSize, dotsColorClass)}
|
|
2231
|
+
style={{
|
|
2232
|
+
animation: \`dotPulse 1.4s ease-in-out infinite both\`,
|
|
2233
|
+
animationDelay: \`\${idx === 0 ? -0.32 : idx === 1 ? -0.16 : 0}s\`,
|
|
2234
|
+
}}
|
|
2235
|
+
/>
|
|
2236
|
+
))}
|
|
2237
|
+
</div>
|
|
2238
|
+
|
|
2239
|
+
{/* STATE 2: Active Search Label + Overlapping Sources */}
|
|
2240
|
+
<div
|
|
2241
|
+
className={cn(
|
|
2242
|
+
'flex items-center gap-2.5 whitespace-nowrap',
|
|
2243
|
+
'transition-all duration-400 [transition-timing-function:cubic-bezier(0.16,1,0.3,1)]',
|
|
2244
|
+
active
|
|
2245
|
+
? 'opacity-100 scale-100 translate-y-0'
|
|
2246
|
+
: 'opacity-0 scale-90 translate-y-2 pointer-events-none absolute'
|
|
2247
|
+
)}
|
|
2248
|
+
>
|
|
2249
|
+
{/* Search Title */}
|
|
2250
|
+
<span className={cn('font-medium tracking-tight', sizeStyle.fontSize)}>
|
|
2251
|
+
{searchLabel}
|
|
2252
|
+
</span>
|
|
2253
|
+
|
|
2254
|
+
{/* Overlapping Sources Row */}
|
|
2255
|
+
{activeSources && activeSources.length > 0 && (
|
|
2256
|
+
<div className="inline-flex items-center pl-0.5">
|
|
2257
|
+
{activeSources.map((src, i) => {
|
|
2258
|
+
const isFirst = i === 0;
|
|
2259
|
+
|
|
2260
|
+
return (
|
|
2261
|
+
<div
|
|
2262
|
+
key={src.id || i}
|
|
2263
|
+
title={src.label || src.id}
|
|
2264
|
+
className={cn(
|
|
2265
|
+
'rounded-full border-[1.5px] border-white dark:border-zinc-900 flex items-center justify-center shrink-0 shadow-xs overflow-hidden',
|
|
2266
|
+
sizeStyle.badgeSize,
|
|
2267
|
+
!isFirst && sizeStyle.badgeMargin
|
|
2268
|
+
)}
|
|
2269
|
+
style={{
|
|
2270
|
+
backgroundColor:
|
|
2271
|
+
src.type === 'globe'
|
|
2272
|
+
? '#0b1120'
|
|
2273
|
+
: src.type === 'github'
|
|
2274
|
+
? '#ffffff'
|
|
2275
|
+
: src.type === 'claude'
|
|
2276
|
+
? '#d97757'
|
|
2277
|
+
: src.type === 'chatgpt'
|
|
2278
|
+
? '#10a37f'
|
|
2279
|
+
: src.type === 'perplexity'
|
|
2280
|
+
? '#1fb8cd'
|
|
2281
|
+
: src.type === 'custom' && src.bg
|
|
2282
|
+
? src.bg
|
|
2283
|
+
: undefined,
|
|
2284
|
+
background:
|
|
2285
|
+
src.type === 'gradient'
|
|
2286
|
+
? 'linear-gradient(135deg, #06b6d4 45%, #3b82f6 55%)'
|
|
2287
|
+
: undefined,
|
|
2288
|
+
}}
|
|
2289
|
+
>
|
|
2290
|
+
{src.avatarUrl ? (
|
|
2291
|
+
<img
|
|
2292
|
+
src={src.avatarUrl}
|
|
2293
|
+
alt={src.label || src.id}
|
|
2294
|
+
className="w-full h-full object-cover"
|
|
2295
|
+
/>
|
|
2296
|
+
) : src.icon ? (
|
|
2297
|
+
src.icon
|
|
2298
|
+
) : src.type === 'globe' ? (
|
|
2299
|
+
<Globe className="w-3 h-3 text-sky-400 stroke-[2.5]" />
|
|
2300
|
+
) : src.type === 'github' ? (
|
|
2301
|
+
<svg className="w-3.5 h-3.5 fill-[#181717]" viewBox="0 0 24 24">
|
|
2302
|
+
<path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z" />
|
|
2303
|
+
</svg>
|
|
2304
|
+
) : src.type === 'claude' ? (
|
|
2305
|
+
<Sparkles className="w-2.5 h-2.5 text-white" />
|
|
2306
|
+
) : src.type === 'chatgpt' ? (
|
|
2307
|
+
<div className="w-2 h-2 rounded-full bg-white" />
|
|
2308
|
+
) : src.type === 'perplexity' ? (
|
|
2309
|
+
<Sparkles className="w-2.5 h-2.5 text-white" />
|
|
2310
|
+
) : src.initials ? (
|
|
2311
|
+
<span className="text-[8px] font-bold text-white uppercase">
|
|
2312
|
+
{src.initials}
|
|
2313
|
+
</span>
|
|
2314
|
+
) : null}
|
|
2315
|
+
</div>
|
|
2316
|
+
);
|
|
2317
|
+
})}
|
|
2318
|
+
</div>
|
|
2319
|
+
)}
|
|
2320
|
+
</div>
|
|
2321
|
+
</div>
|
|
2322
|
+
</div>
|
|
2323
|
+
</div>
|
|
2324
|
+
);
|
|
2325
|
+
}
|
|
2326
|
+
);
|
|
2327
|
+
|
|
2328
|
+
AuroraSearchPill.displayName = 'AuroraSearchPill';
|
|
2329
|
+
`
|
|
2330
|
+
};
|
|
2331
|
+
|
|
2332
|
+
// src/registry/template-ai-startup.ts
|
|
2333
|
+
var templateAiStartup = {
|
|
2334
|
+
name: "template-ai-startup",
|
|
2335
|
+
dependencies: ["framer-motion", "lucide-react"],
|
|
2336
|
+
fileName: "template-ai-startup.tsx",
|
|
2337
|
+
content: `"use client";
|
|
2338
|
+
|
|
2339
|
+
import React, { useState } from "react";
|
|
2340
|
+
import { motion, AnimatePresence } from "framer-motion";
|
|
2341
|
+
import {
|
|
2342
|
+
Sparkles,
|
|
2343
|
+
ArrowRight,
|
|
2344
|
+
Cpu,
|
|
2345
|
+
Zap,
|
|
2346
|
+
Shield,
|
|
2347
|
+
Check,
|
|
2348
|
+
ChevronRight,
|
|
2349
|
+
Send,
|
|
2350
|
+
Terminal,
|
|
2351
|
+
Activity,
|
|
2352
|
+
} from "lucide-react";
|
|
2353
|
+
|
|
2354
|
+
export default function AiStartupTemplate() {
|
|
2355
|
+
const [selectedModel, setSelectedModel] = useState<"DeepSeek-R1" | "Claude-3.5" | "GPT-4o">("DeepSeek-R1");
|
|
2356
|
+
const [promptText, setPromptText] = useState("Synthesize an edge-routed vector indexing service");
|
|
2357
|
+
const [isGenerating, setIsGenerating] = useState(false);
|
|
2358
|
+
const [generatedOutput, setGeneratedOutput] = useState<string | null>(
|
|
2359
|
+
"\u2713 Tensor graph compiled. 4 regions provisioned. TTFT: 14ms. Throughput: 142 tok/s."
|
|
2360
|
+
);
|
|
2361
|
+
const [billingCycle, setBillingCycle] = useState<"monthly" | "annual">("annual");
|
|
2362
|
+
|
|
2363
|
+
const handleSynthesize = (e: React.FormEvent) => {
|
|
2364
|
+
e.preventDefault();
|
|
2365
|
+
if (!promptText.trim()) return;
|
|
2366
|
+
setIsGenerating(true);
|
|
2367
|
+
setGeneratedOutput(null);
|
|
2368
|
+
setTimeout(() => {
|
|
2369
|
+
setIsGenerating(false);
|
|
2370
|
+
setGeneratedOutput(
|
|
2371
|
+
\`\u2713 [\${selectedModel}] execution complete. 2,140 tokens streamed with zero-copy serialization. Latency: 1.1ms.\`
|
|
2372
|
+
);
|
|
2373
|
+
}, 900);
|
|
2374
|
+
};
|
|
2375
|
+
|
|
2376
|
+
return (
|
|
2377
|
+
<div className="min-h-screen bg-[#08090d] text-zinc-100 font-sans selection:bg-indigo-500/30">
|
|
2378
|
+
<header className="sticky top-0 z-30 backdrop-blur-xl border-b border-white/10 bg-[#08090d]/80">
|
|
2379
|
+
<div className="max-w-6xl mx-auto px-4 sm:px-6 h-14 flex items-center justify-between">
|
|
2380
|
+
<div className="flex items-center gap-2">
|
|
2381
|
+
<div className="h-7 w-7 rounded-lg bg-indigo-600 flex items-center justify-center text-white">
|
|
2382
|
+
<Sparkles className="h-4 w-4" />
|
|
2383
|
+
</div>
|
|
2384
|
+
<span className="font-bold text-sm">Synthetix AI</span>
|
|
2385
|
+
</div>
|
|
2386
|
+
<button className="text-xs font-semibold px-3.5 py-1.5 rounded-lg bg-indigo-600 text-white hover:bg-indigo-500">
|
|
2387
|
+
Get API Key
|
|
2388
|
+
</button>
|
|
2389
|
+
</div>
|
|
2390
|
+
</header>
|
|
2391
|
+
|
|
2392
|
+
<section className="pt-20 pb-16 px-4 sm:px-6 max-w-5xl mx-auto text-center">
|
|
2393
|
+
<div className="inline-flex items-center gap-2 px-3 py-1 rounded-full border border-indigo-500/30 bg-indigo-500/10 text-indigo-400 text-xs font-mono mb-6">
|
|
2394
|
+
<Cpu className="h-3 w-3" />
|
|
2395
|
+
<span>Next-Gen Autonomous Inference Engine</span>
|
|
2396
|
+
</div>
|
|
2397
|
+
|
|
2398
|
+
<h1 className="text-4xl sm:text-6xl font-extrabold tracking-tight mb-5 leading-tight">
|
|
2399
|
+
Zero Latency. Real Autonomous Intelligence.
|
|
2400
|
+
</h1>
|
|
2401
|
+
|
|
2402
|
+
<p className="text-sm sm:text-base text-zinc-400 max-w-2xl mx-auto mb-10">
|
|
2403
|
+
Stream deep reasoning tokens directly to edge clients. Synthesize complex backend architectures,
|
|
2404
|
+
fine-tune proprietary weights, and run microsecond telemetry without cold starts.
|
|
2405
|
+
</p>
|
|
2406
|
+
|
|
2407
|
+
<form
|
|
2408
|
+
onSubmit={handleSynthesize}
|
|
2409
|
+
className="max-w-2xl mx-auto p-2 rounded-2xl bg-zinc-900 border border-white/10 flex flex-col sm:flex-row gap-2 shadow-2xl"
|
|
2410
|
+
>
|
|
2411
|
+
<input
|
|
2412
|
+
type="text"
|
|
2413
|
+
value={promptText}
|
|
2414
|
+
onChange={(e) => setPromptText(e.target.value)}
|
|
2415
|
+
className="flex-1 bg-transparent px-3 py-2 text-xs text-white focus:outline-none"
|
|
2416
|
+
/>
|
|
2417
|
+
<button
|
|
2418
|
+
type="submit"
|
|
2419
|
+
disabled={isGenerating}
|
|
2420
|
+
className="px-4 py-2 rounded-xl bg-indigo-600 text-white text-xs font-semibold shrink-0"
|
|
2421
|
+
>
|
|
2422
|
+
{isGenerating ? "Synthesizing..." : "Execute"}
|
|
2423
|
+
</button>
|
|
2424
|
+
</form>
|
|
2425
|
+
|
|
2426
|
+
<AnimatePresence>
|
|
2427
|
+
{generatedOutput && (
|
|
2428
|
+
<motion.div
|
|
2429
|
+
initial={{ opacity: 0, y: 8 }}
|
|
2430
|
+
animate={{ opacity: 1, y: 0 }}
|
|
2431
|
+
className="mt-4 p-3.5 rounded-xl border border-indigo-500/30 bg-indigo-950/20 text-xs font-mono text-indigo-300 max-w-2xl mx-auto text-left"
|
|
2432
|
+
>
|
|
2433
|
+
{generatedOutput}
|
|
2434
|
+
</motion.div>
|
|
2435
|
+
)}
|
|
2436
|
+
</AnimatePresence>
|
|
2437
|
+
</section>
|
|
2438
|
+
</div>
|
|
2439
|
+
);
|
|
2440
|
+
}
|
|
2441
|
+
`
|
|
2442
|
+
};
|
|
2443
|
+
|
|
2444
|
+
// src/registry/template-modern-saas.ts
|
|
2445
|
+
var templateModernSaas = {
|
|
2446
|
+
name: "template-modern-saas",
|
|
2447
|
+
dependencies: ["framer-motion", "lucide-react"],
|
|
2448
|
+
fileName: "template-modern-saas.tsx",
|
|
2449
|
+
content: `"use client";
|
|
2450
|
+
|
|
2451
|
+
import React, { useState } from "react";
|
|
2452
|
+
import { motion } from "framer-motion";
|
|
2453
|
+
import { Command, Search, GitBranch, CheckCircle2, ArrowUpRight, ChevronRight, Zap } from "lucide-react";
|
|
2454
|
+
|
|
2455
|
+
export default function ModernSaasTemplate() {
|
|
2456
|
+
const [activeTab, setActiveTab] = useState<"branch" | "edge" | "telemetry">("branch");
|
|
2457
|
+
|
|
2458
|
+
return (
|
|
2459
|
+
<div className="min-h-screen bg-[#090b10] text-zinc-100 font-sans">
|
|
2460
|
+
<header className="sticky top-0 z-30 border-b border-white/10 bg-[#090b10]/80 backdrop-blur-xl">
|
|
2461
|
+
<div className="max-w-6xl mx-auto px-4 sm:px-6 h-14 flex items-center justify-between">
|
|
2462
|
+
<span className="font-bold text-sm">Aura Cloud</span>
|
|
2463
|
+
<button className="text-xs px-3 py-1.5 rounded-lg bg-white/10 hover:bg-white/20 text-white font-medium">
|
|
2464
|
+
Console
|
|
2465
|
+
</button>
|
|
2466
|
+
</div>
|
|
2467
|
+
</header>
|
|
2468
|
+
|
|
2469
|
+
<section className="pt-20 pb-16 px-4 sm:px-6 max-w-5xl mx-auto text-center">
|
|
2470
|
+
<div className="inline-flex items-center gap-2 px-3 py-1 rounded-full border border-blue-500/30 bg-blue-500/10 text-blue-400 text-xs font-mono mb-5">
|
|
2471
|
+
<GitBranch className="h-3 w-3" />
|
|
2472
|
+
<span>Continuous Edge Infrastructure</span>
|
|
2473
|
+
</div>
|
|
2474
|
+
|
|
2475
|
+
<h1 className="text-4xl sm:text-6xl font-extrabold tracking-tight mb-5 leading-tight">
|
|
2476
|
+
The Developer Cloud for Ultra-Fast Teams.
|
|
2477
|
+
</h1>
|
|
2478
|
+
|
|
2479
|
+
<p className="text-sm sm:text-base text-zinc-400 max-w-xl mx-auto mb-10">
|
|
2480
|
+
Push code, spawn instant ephemeral preview environments, and deploy across 300 global edge locations
|
|
2481
|
+
with zero configuration.
|
|
2482
|
+
</p>
|
|
2483
|
+
</section>
|
|
2484
|
+
</div>
|
|
2485
|
+
);
|
|
2486
|
+
}
|
|
2487
|
+
`
|
|
2488
|
+
};
|
|
2489
|
+
|
|
2490
|
+
// src/registry/template-analytics-dashboard.ts
|
|
2491
|
+
var templateAnalyticsDashboard = {
|
|
2492
|
+
name: "template-analytics-dashboard",
|
|
2493
|
+
dependencies: ["framer-motion", "lucide-react"],
|
|
2494
|
+
fileName: "template-analytics-dashboard.tsx",
|
|
2495
|
+
content: `"use client";
|
|
2496
|
+
|
|
2497
|
+
import React, { useState } from "react";
|
|
2498
|
+
import { BarChart3, TrendingUp, Users, CreditCard, ArrowUpRight, Download } from "lucide-react";
|
|
2499
|
+
|
|
2500
|
+
export default function AnalyticsDashboardTemplate() {
|
|
2501
|
+
const [dateRange, setDateRange] = useState("30D");
|
|
2502
|
+
|
|
2503
|
+
return (
|
|
2504
|
+
<div className="min-h-screen bg-[#08090d] text-zinc-100 flex flex-col md:flex-row font-sans">
|
|
2505
|
+
<aside className="w-full md:w-56 border-r border-white/10 p-4 shrink-0 bg-[#08090d]">
|
|
2506
|
+
<div className="font-bold text-sm mb-6">Prism Analytics</div>
|
|
2507
|
+
<nav className="space-y-1 text-xs">
|
|
2508
|
+
<button className="w-full text-left px-3 py-2 rounded-lg bg-emerald-600 text-white font-semibold">
|
|
2509
|
+
Overview
|
|
2510
|
+
</button>
|
|
2511
|
+
<button className="w-full text-left px-3 py-2 rounded-lg text-zinc-400 hover:text-white">
|
|
2512
|
+
Inflows
|
|
2513
|
+
</button>
|
|
2514
|
+
</nav>
|
|
2515
|
+
</aside>
|
|
2516
|
+
<main className="flex-1 p-6">
|
|
2517
|
+
<h1 className="text-2xl font-bold mb-4">Executive Telemetry</h1>
|
|
2518
|
+
</main>
|
|
2519
|
+
</div>
|
|
2520
|
+
);
|
|
2521
|
+
}
|
|
2522
|
+
`
|
|
2523
|
+
};
|
|
2524
|
+
|
|
2525
|
+
// src/registry/template-devtools-cli.ts
|
|
2526
|
+
var templateDevtoolsCli = {
|
|
2527
|
+
name: "template-devtools-cli",
|
|
2528
|
+
dependencies: ["framer-motion", "lucide-react"],
|
|
2529
|
+
fileName: "template-devtools-cli.tsx",
|
|
2530
|
+
content: `"use client";
|
|
2531
|
+
|
|
2532
|
+
import React, { useState } from "react";
|
|
2533
|
+
import { Terminal, Copy, Check, Star } from "lucide-react";
|
|
2534
|
+
|
|
2535
|
+
export default function DevtoolsCliTemplate() {
|
|
2536
|
+
const [copied, setCopied] = useState(false);
|
|
2537
|
+
|
|
2538
|
+
return (
|
|
2539
|
+
<div className="min-h-screen bg-[#090a10] text-zinc-100 font-mono p-6">
|
|
2540
|
+
<header className="flex justify-between items-center mb-12">
|
|
2541
|
+
<span className="font-bold text-sm">HyperTerminal</span>
|
|
2542
|
+
</header>
|
|
2543
|
+
</div>
|
|
2544
|
+
);
|
|
2545
|
+
}
|
|
2546
|
+
`
|
|
2547
|
+
};
|
|
2548
|
+
|
|
2549
|
+
// src/registry/template-creative-portfolio.ts
|
|
2550
|
+
var templateCreativePortfolio = {
|
|
2551
|
+
name: "template-creative-portfolio",
|
|
2552
|
+
dependencies: ["framer-motion", "lucide-react"],
|
|
2553
|
+
fileName: "template-creative-portfolio.tsx",
|
|
2554
|
+
content: `"use client";
|
|
2555
|
+
|
|
2556
|
+
import React from "react";
|
|
2557
|
+
import { ArrowUpRight, Award, X } from "lucide-react";
|
|
2558
|
+
|
|
2559
|
+
export default function CreativePortfolioTemplate() {
|
|
2560
|
+
return (
|
|
2561
|
+
<div className="min-h-screen bg-[#09090b] text-zinc-100 font-serif p-8">
|
|
2562
|
+
<header className="flex justify-between items-center mb-16 font-sans">
|
|
2563
|
+
<span className="font-bold uppercase tracking-tight">Studio Monolith</span>
|
|
2564
|
+
</header>
|
|
2565
|
+
<h1 className="text-5xl font-light leading-tight mb-12">
|
|
2566
|
+
Sculpting singular digital experiences for luxury institutions.
|
|
2567
|
+
</h1>
|
|
2568
|
+
</div>
|
|
2569
|
+
);
|
|
2570
|
+
}
|
|
2571
|
+
`
|
|
2572
|
+
};
|
|
2573
|
+
|
|
2574
|
+
// src/registry/template-fintech-app.ts
|
|
2575
|
+
var templateFintechApp = {
|
|
2576
|
+
name: "template-fintech-app",
|
|
2577
|
+
dependencies: ["framer-motion", "lucide-react"],
|
|
2578
|
+
fileName: "template-fintech-app.tsx",
|
|
2579
|
+
content: `"use client";
|
|
2580
|
+
|
|
2581
|
+
import React, { useState } from "react";
|
|
2582
|
+
import { CreditCard, Send, Lock, Unlock, ShieldCheck } from "lucide-react";
|
|
2583
|
+
|
|
2584
|
+
export default function FintechAppTemplate() {
|
|
2585
|
+
const [frozen, setFrozen] = useState(false);
|
|
2586
|
+
|
|
2587
|
+
return (
|
|
2588
|
+
<div className="min-h-screen bg-[#08090d] text-zinc-100 font-sans p-6">
|
|
2589
|
+
<h1 className="text-2xl font-bold mb-4">Apex Treasury</h1>
|
|
2590
|
+
</div>
|
|
2591
|
+
);
|
|
2592
|
+
}
|
|
2593
|
+
`
|
|
2594
|
+
};
|
|
2595
|
+
|
|
2596
|
+
// src/registry/template-ecommerce-store.ts
|
|
2597
|
+
var templateEcommerceStore = {
|
|
2598
|
+
name: "template-ecommerce-store",
|
|
2599
|
+
dependencies: ["framer-motion", "lucide-react"],
|
|
2600
|
+
fileName: "template-ecommerce-store.tsx",
|
|
2601
|
+
content: `"use client";
|
|
2602
|
+
|
|
2603
|
+
import React from "react";
|
|
2604
|
+
import { ShoppingBag, Heart, Truck, RotateCcw } from "lucide-react";
|
|
2605
|
+
|
|
2606
|
+
export default function EcommerceStoreTemplate() {
|
|
2607
|
+
return (
|
|
2608
|
+
<div className="min-h-screen bg-[#0c0d12] text-zinc-100 p-8">
|
|
2609
|
+
<h1 className="text-3xl font-bold">Atelier Objects</h1>
|
|
2610
|
+
</div>
|
|
2611
|
+
);
|
|
2612
|
+
}
|
|
2613
|
+
`
|
|
2614
|
+
};
|
|
2615
|
+
|
|
2616
|
+
// src/registry/template-agency-creative.ts
|
|
2617
|
+
var templateAgencyCreative = {
|
|
2618
|
+
name: "template-agency-creative",
|
|
2619
|
+
dependencies: ["framer-motion", "lucide-react"],
|
|
2620
|
+
fileName: "template-agency-creative.tsx",
|
|
2621
|
+
content: `"use client";
|
|
2622
|
+
|
|
2623
|
+
import React from "react";
|
|
2624
|
+
import { ArrowUpRight, Sparkles } from "lucide-react";
|
|
2625
|
+
|
|
2626
|
+
export default function AgencyCreativeTemplate() {
|
|
2627
|
+
return (
|
|
2628
|
+
<div className="min-h-screen bg-[#08090d] text-zinc-100 p-8 font-sans">
|
|
2629
|
+
<h1 className="text-6xl font-black uppercase">Vanguard Digital</h1>
|
|
2630
|
+
</div>
|
|
2631
|
+
);
|
|
2632
|
+
}
|
|
2633
|
+
`
|
|
2634
|
+
};
|
|
2635
|
+
|
|
2636
|
+
// src/registry/template-ai-chat.ts
|
|
2637
|
+
var templateAiChat = {
|
|
2638
|
+
name: "template-ai-chat",
|
|
2639
|
+
dependencies: ["framer-motion", "lucide-react"],
|
|
2640
|
+
fileName: "template-ai-chat.tsx",
|
|
2641
|
+
content: `"use client";
|
|
2642
|
+
|
|
2643
|
+
import React, { useState } from "react";
|
|
2644
|
+
import { Send, Cpu, Copy, Check } from "lucide-react";
|
|
2645
|
+
|
|
2646
|
+
export default function AiChatTemplate() {
|
|
2647
|
+
return (
|
|
2648
|
+
<div className="min-h-screen bg-[#08090d] text-zinc-100 flex p-4 font-sans">
|
|
2649
|
+
<div className="flex-1">Cortex AI Assistant</div>
|
|
2650
|
+
</div>
|
|
2651
|
+
);
|
|
2652
|
+
}
|
|
2653
|
+
`
|
|
2654
|
+
};
|
|
2655
|
+
|
|
2656
|
+
// src/registry/template-project-management.ts
|
|
2657
|
+
var templateProjectManagement = {
|
|
2658
|
+
name: "template-project-management",
|
|
2659
|
+
dependencies: ["framer-motion", "lucide-react"],
|
|
2660
|
+
fileName: "template-project-management.tsx",
|
|
2661
|
+
content: `"use client";
|
|
2662
|
+
|
|
2663
|
+
import React, { useState } from "react";
|
|
2664
|
+
import { Plus, Kanban } from "lucide-react";
|
|
2665
|
+
|
|
2666
|
+
export default function ProjectManagementTemplate() {
|
|
2667
|
+
return (
|
|
2668
|
+
<div className="min-h-screen bg-[#08090d] text-zinc-100 p-6 font-sans">
|
|
2669
|
+
<h1 className="text-xl font-bold">Orbit Flow</h1>
|
|
2670
|
+
</div>
|
|
2671
|
+
);
|
|
2672
|
+
}
|
|
2673
|
+
`
|
|
2674
|
+
};
|
|
2675
|
+
|
|
2676
|
+
// src/registry/template-startup-waitlist.ts
|
|
2677
|
+
var templateStartupWaitlist = {
|
|
2678
|
+
name: "template-startup-waitlist",
|
|
2679
|
+
dependencies: ["framer-motion", "lucide-react"],
|
|
2680
|
+
fileName: "template-startup-waitlist.tsx",
|
|
2681
|
+
content: `"use client";
|
|
2682
|
+
|
|
2683
|
+
import React, { useState } from "react";
|
|
2684
|
+
import { ArrowRight, Clock, Users } from "lucide-react";
|
|
2685
|
+
|
|
2686
|
+
export default function StartupWaitlistTemplate() {
|
|
2687
|
+
return (
|
|
2688
|
+
<div className="min-h-screen bg-[#08090d] text-zinc-100 p-8 text-center flex flex-col justify-center">
|
|
2689
|
+
<h1 className="text-5xl font-extrabold mb-4">Genesis Stealth</h1>
|
|
2690
|
+
</div>
|
|
2691
|
+
);
|
|
2692
|
+
}
|
|
2693
|
+
`
|
|
2694
|
+
};
|
|
2695
|
+
|
|
2696
|
+
// src/registry/template-docs-platform.ts
|
|
2697
|
+
var templateDocsPlatform = {
|
|
2698
|
+
name: "template-docs-platform",
|
|
2699
|
+
dependencies: ["framer-motion", "lucide-react"],
|
|
2700
|
+
fileName: "template-docs-platform.tsx",
|
|
2701
|
+
content: `"use client";
|
|
2702
|
+
|
|
2703
|
+
import React, { useState } from "react";
|
|
2704
|
+
import { Search, Code2, Send } from "lucide-react";
|
|
2705
|
+
|
|
2706
|
+
export default function DocsPlatformTemplate() {
|
|
2707
|
+
return (
|
|
2708
|
+
<div className="min-h-screen bg-[#08090d] text-zinc-100 p-6">
|
|
2709
|
+
<h1 className="text-3xl font-bold">Codex Documentation</h1>
|
|
2710
|
+
</div>
|
|
2711
|
+
);
|
|
2712
|
+
}
|
|
2713
|
+
`
|
|
2714
|
+
};
|
|
2715
|
+
|
|
2285
2716
|
// src/registry/index.ts
|
|
2286
2717
|
var registry = {
|
|
2287
2718
|
button,
|
|
@@ -2290,7 +2721,20 @@ var registry = {
|
|
|
2290
2721
|
alert,
|
|
2291
2722
|
badge,
|
|
2292
2723
|
"morphing-geometry": morphingGeometry,
|
|
2293
|
-
"aurora-border-fx": auroraBorderFX
|
|
2724
|
+
"aurora-border-fx": auroraBorderFX,
|
|
2725
|
+
"aurora-search-pill": auroraSearchPill,
|
|
2726
|
+
"template-ai-startup": templateAiStartup,
|
|
2727
|
+
"template-modern-saas": templateModernSaas,
|
|
2728
|
+
"template-analytics-dashboard": templateAnalyticsDashboard,
|
|
2729
|
+
"template-devtools-cli": templateDevtoolsCli,
|
|
2730
|
+
"template-creative-portfolio": templateCreativePortfolio,
|
|
2731
|
+
"template-fintech-app": templateFintechApp,
|
|
2732
|
+
"template-ecommerce-store": templateEcommerceStore,
|
|
2733
|
+
"template-agency-creative": templateAgencyCreative,
|
|
2734
|
+
"template-ai-chat": templateAiChat,
|
|
2735
|
+
"template-project-management": templateProjectManagement,
|
|
2736
|
+
"template-startup-waitlist": templateStartupWaitlist,
|
|
2737
|
+
"template-docs-platform": templateDocsPlatform
|
|
2294
2738
|
};
|
|
2295
2739
|
|
|
2296
2740
|
// src/commands/add.ts
|