@peacock-ui/core 3.0.0-alpha.1 → 3.0.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,26 +1,26 @@
1
- # 🦚 Peacock UI
1
+ # 🦚 Peacock UI v3 (Quantum)
2
2
 
3
- **Fluidity over Staticity.** A high-fidelity, motion-first design system for React 19 and Tailwind CSS 4.
3
+ **Fluidity over Staticity.** A high-fidelity, WebGL-accelerated design system for React 19.
4
4
 
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
6
  [![React 19](https://img.shields.io/badge/React-19-blue.svg)](https://react.dev/)
7
7
  [![Framer Motion](https://img.shields.io/badge/Motion-Framer-black.svg)](https://www.framer.com/motion/)
8
+ [![WebGL](https://img.shields.io/badge/Engine-Quantum--WebGL-5865F2.svg)](https://threejs.org/)
8
9
 
9
- Peacock UI is not just a component library; it's an aesthetic framework designed to bridge the gap between static interfaces and immersive interactive experiences. Inspired by the sleek, high-end aesthetics of Discord and Linear.
10
+ Peacock UI v3 introduces the **Quantum Engine**—a hybrid rendering architecture that bridges standard React DOM components with a WebGL acceleration layer. Designed for developers who demand Discord-grade aesthetics and sub-millisecond interaction physics.
10
11
 
11
12
  ## ✨ Features
12
13
 
13
- - **🚀 React 19 Ready**: Built with the latest React features and optimizations.
14
- - **🎨 Plumage Engine**: Dynamic Tailwind plugin for advanced glassmorphism and multi-layered gradients.
15
- - **⚡ Physics-Based Motion**: Every component inherits spring physics (stiffness, damping, mass) for a natural feel.
16
- - **🛡️ Type-Safe**: 100% TypeScript with strict prop definitions.
17
- - **♿ Accessible**: Built with Radix UI primitives for WAI-ARIA compliance.
18
- - **🌓 Dark Mode First**: Optimized for deep charcoal and neon-accented aesthetics.
14
+ - **⚛️ Quantum Engine**: Integrated `@react-three/fiber` layer for fluid background shaders and 3D holographic effects.
15
+ - **🎨 Plumage Engine v2**: Enhanced Tailwind plugin with deep glassmorphism (`plumage-glass-heavy`) and noise textures.
16
+ - **🚀 React 19 Native**: Optimized for the latest React concurrency features and compiler.
17
+ - **⚡ Physics-Based Motion**: Mass, stiffness, and damping are first-class citizens in every component.
18
+ - **🌓 Dark Mode First**: A deep charcoal and neon-accented aesthetic inspired by high-end gaming platforms.
19
19
 
20
20
  ## 📦 Installation
21
21
 
22
22
  ```bash
23
- npm install @peacock-ui/core framer-motion tailwindcss lucide-react
23
+ npm install @peacock-ui/core framer-motion three @react-three/fiber @react-three/drei lucide-react
24
24
  ```
25
25
 
26
26
  ## 🚀 Quick Start
@@ -29,54 +29,56 @@ npm install @peacock-ui/core framer-motion tailwindcss lucide-react
29
29
  2. **Wrap your App**:
30
30
 
31
31
  ```tsx
32
- import { PeacockProvider, PeacockButton } from '@peacock-ui/core';
32
+ import { PeacockProvider, PeacockButton, HolographicCard } from '@peacock-ui/core';
33
33
  import '@peacock-ui/core/style.css';
34
34
 
35
35
  function App() {
36
36
  return (
37
37
  <PeacockProvider theme="dark">
38
- <PeacockButton onClick={() => console.log("Clicked!")}>
39
- Spread Plumage
40
- </PeacockButton>
38
+ <div className="p-20">
39
+ <HolographicCard>
40
+ <h1 className="text-white text-3xl font-bold">Quantum Interface</h1>
41
+ <PeacockButton className="mt-4">
42
+ Initialize Engine
43
+ </PeacockButton>
44
+ </HolographicCard>
45
+ </div>
41
46
  </PeacockProvider>
42
47
  );
43
48
  }
44
49
  ```
45
50
 
46
- ## 🧱 Component Reference
51
+ ## 🧱 Quantum Components
47
52
 
48
- ### `PeacockButton`
49
- Interactive light-source button with physics-based haptics.
53
+ ### `HolographicCard`
54
+ A 3D-tilt card that tracks mouse movement with sub-millisecond latency and simulated light reflections.
50
55
  ```tsx
51
- <PeacockButton variant="primary" glowSize={200}>
52
- Spread Plumage
53
- </PeacockButton>
56
+ <HolographicCard>
57
+ {/* Your Content */}
58
+ </HolographicCard>
54
59
  ```
55
- **Props:** `variant` ('primary'|'outline'|'glass'), `glowSize` (number)
56
60
 
57
- ### `PeacockInput`
58
- Focus-reactive input with dynamic glow borders.
61
+ ### `PeacockDock`
62
+ macOS-inspired navigation with non-linear magnification and spring-loaded scaling.
59
63
  ```tsx
60
- <PeacockInput label="Email" placeholder="you@example.com" error="Required" />
64
+ <PeacockDock items={[{ id: '1', icon: <Home />, label: 'Home' }]} />
61
65
  ```
62
- **Props:** `label` (string), `error` (string), `icon` (ReactNode)
63
66
 
64
- ### `FluidCard`
65
- Expandable surface with shared-element layout transitions.
67
+ ### `PeacockCommand`
68
+ A high-fidelity command palette (Cmd+K) with integrated glassmorphism.
66
69
  ```tsx
67
- <FluidCard title="Physics" description="Hover for details" expandedContent={<p>Details...</p>} />
70
+ <CommandDialog open={isOpen} onOpenChange={setIsOpen}>
71
+ <CommandInput placeholder="Search commands..." />
72
+ {/* ... items */}
73
+ </CommandDialog>
68
74
  ```
69
75
 
70
- ### `PeacockSwitch`
71
- Spring-loaded toggle interaction.
72
- ```tsx
73
- <PeacockSwitch checked={true} onChange={(val) => {}} label="Motion Enabled" />
74
- ```
75
-
76
- ### `GlassMenu`
77
- Command-palette style recursive menu.
76
+ ### `PeacockButton`
77
+ Interactive light-source button with follow-mouse radial gradients and physics-based haptics.
78
78
  ```tsx
79
- <GlassMenu isOpen={isOpen} onClose={close} items={[{ id: '1', label: 'Home' }]} />
79
+ <PeacockButton variant="primary" glowSize={150}>
80
+ Spread Plumage
81
+ </PeacockButton>
80
82
  ```
81
83
 
82
84
  ## 🛠️ Development
@@ -97,4 +99,4 @@ npm run build
97
99
 
98
100
  ## 📜 License
99
101
 
100
- MIT © [Sploov](https://github.com/sploov)
102
+ MIT © [Sploov](https://github.com/sploov)
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ export interface TabItem {
3
+ id: string;
4
+ label: string;
5
+ content: React.ReactNode;
6
+ icon?: React.ReactNode;
7
+ }
8
+ export interface PeacockTabsProps {
9
+ items: TabItem[];
10
+ defaultValue?: string;
11
+ onValueChange?: (value: string) => void;
12
+ className?: string;
13
+ variant?: 'pill' | 'underline' | 'glass';
14
+ layoutId?: string;
15
+ }
16
+ export declare const PeacockTabs: ({ items, defaultValue, onValueChange, className, variant, layoutId }: PeacockTabsProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface PeacockCodeProps extends React.HTMLAttributes<HTMLPreElement> {
3
+ children: React.ReactNode;
4
+ }
5
+ export declare const PeacockCode: ({ children, className, ...props }: PeacockCodeProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,2 @@
1
+ declare function PeacockSkeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
2
+ export { PeacockSkeleton };
@@ -0,0 +1,83 @@
1
+ import { Dialog } from '../PeacockDialog';
2
+ import * as React from "react";
3
+ declare const Command: React.ForwardRefExoticComponent<Omit<{
4
+ children?: React.ReactNode;
5
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
6
+ ref?: React.Ref<HTMLDivElement>;
7
+ } & {
8
+ asChild?: boolean;
9
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
10
+ label?: string;
11
+ shouldFilter?: boolean;
12
+ filter?: (value: string, search: string, keywords?: string[]) => number;
13
+ defaultValue?: string;
14
+ value?: string;
15
+ onValueChange?: (value: string) => void;
16
+ loop?: boolean;
17
+ disablePointerSelection?: boolean;
18
+ vimBindings?: boolean;
19
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
+ interface CommandDialogProps extends React.ComponentPropsWithoutRef<typeof Dialog> {
21
+ children: React.ReactNode;
22
+ }
23
+ declare const CommandDialog: ({ children, ...props }: CommandDialogProps) => import("react/jsx-runtime").JSX.Element;
24
+ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
25
+ ref?: React.Ref<HTMLInputElement>;
26
+ } & {
27
+ asChild?: boolean;
28
+ }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "value" | "type" | "onChange"> & {
29
+ value?: string;
30
+ onValueChange?: (search: string) => void;
31
+ } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
32
+ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
33
+ children?: React.ReactNode;
34
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
35
+ ref?: React.Ref<HTMLDivElement>;
36
+ } & {
37
+ asChild?: boolean;
38
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
39
+ label?: string;
40
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
41
+ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
42
+ children?: React.ReactNode;
43
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
44
+ ref?: React.Ref<HTMLDivElement>;
45
+ } & {
46
+ asChild?: boolean;
47
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
48
+ declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
49
+ children?: React.ReactNode;
50
+ } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
51
+ ref?: React.Ref<HTMLDivElement>;
52
+ } & {
53
+ asChild?: boolean;
54
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "heading"> & {
55
+ heading?: React.ReactNode;
56
+ value?: string;
57
+ forceMount?: boolean;
58
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
59
+ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
60
+ children?: React.ReactNode;
61
+ } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
62
+ ref?: React.Ref<HTMLDivElement>;
63
+ } & {
64
+ asChild?: boolean;
65
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "onSelect" | "disabled"> & {
66
+ disabled?: boolean;
67
+ onSelect?: (value: string) => void;
68
+ value?: string;
69
+ keywords?: string[];
70
+ forceMount?: boolean;
71
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
72
+ declare const CommandShortcut: {
73
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
74
+ displayName: string;
75
+ };
76
+ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
77
+ ref?: React.Ref<HTMLDivElement>;
78
+ } & {
79
+ asChild?: boolean;
80
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
81
+ alwaysRender?: boolean;
82
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
83
+ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -0,0 +1,4 @@
1
+ import { Toaster as Sonner } from 'sonner';
2
+ type ToasterProps = React.ComponentProps<typeof Sonner>;
3
+ export declare const PeacockToaster: ({ ...props }: ToasterProps) => import("react/jsx-runtime").JSX.Element;
4
+ export {};
package/dist/index.d.ts CHANGED
@@ -10,8 +10,13 @@ export * from './components/PeacockSwitch';
10
10
  export * from './components/PeacockBadge';
11
11
  export * from './components/PeacockTooltip';
12
12
  export * from './components/PeacockDialog';
13
+ export * from './components/PeacockTabs';
13
14
  export * from './components/HolographicCard';
14
15
  export * from './components/PeacockDock';
15
16
  export * from './components/inputs/PeacockSlider';
16
17
  export * from './components/data-display/PeacockAvatar';
18
+ export * from './components/data-display/PeacockCode';
19
+ export * from './components/feedback/PeacockSkeleton';
20
+ export * from './components/overlay/PeacockCommand';
21
+ export * from './components/overlay/PeacockToast';
17
22
  export * from './hooks/utils';