@peacock-ui/core 2.0.0 → 3.0.0-alpha.2
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 +40 -38
- package/dist/canvas/PeacockScene.d.ts +1 -0
- package/dist/components/HolographicCard.d.ts +7 -0
- package/dist/components/PeacockDock.d.ts +13 -0
- package/dist/components/PeacockTabs.d.ts +15 -0
- package/dist/components/data-display/PeacockAvatar.d.ts +8 -0
- package/dist/components/data-display/PeacockCode.d.ts +6 -0
- package/dist/components/feedback/PeacockSkeleton.d.ts +2 -0
- package/dist/components/inputs/PeacockSlider.d.ts +3 -0
- package/dist/components/overlay/PeacockCommand.d.ts +76 -0
- package/dist/components/overlay/PeacockToast.d.ts +4 -0
- package/dist/index.d.ts +10 -0
- package/dist/peacock-ui.js +56458 -2192
- package/dist/peacock-ui.umd.cjs +4394 -34
- package/dist/style.css +1 -1
- package/package.json +13 -3
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,
|
|
3
|
+
**Fluidity over Staticity.** A high-fidelity, WebGL-accelerated design system for React 19.
|
|
4
4
|
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
6
|
[](https://react.dev/)
|
|
7
7
|
[](https://www.framer.com/motion/)
|
|
8
|
+
[](https://threejs.org/)
|
|
8
9
|
|
|
9
|
-
Peacock UI
|
|
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
|
-
-
|
|
14
|
-
- **🎨 Plumage Engine**:
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
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
|
|
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
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
## 🧱
|
|
51
|
+
## 🧱 Quantum Components
|
|
47
52
|
|
|
48
|
-
### `
|
|
49
|
-
|
|
53
|
+
### `HolographicCard`
|
|
54
|
+
A 3D-tilt card that tracks mouse movement with sub-millisecond latency and simulated light reflections.
|
|
50
55
|
```tsx
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
</
|
|
56
|
+
<HolographicCard>
|
|
57
|
+
{/* Your Content */}
|
|
58
|
+
</HolographicCard>
|
|
54
59
|
```
|
|
55
|
-
**Props:** `variant` ('primary'|'outline'|'glass'), `glowSize` (number)
|
|
56
60
|
|
|
57
|
-
### `
|
|
58
|
-
|
|
61
|
+
### `PeacockDock`
|
|
62
|
+
macOS-inspired navigation with non-linear magnification and spring-loaded scaling.
|
|
59
63
|
```tsx
|
|
60
|
-
<
|
|
64
|
+
<PeacockDock items={[{ id: '1', icon: <Home />, label: 'Home' }]} />
|
|
61
65
|
```
|
|
62
|
-
**Props:** `label` (string), `error` (string), `icon` (ReactNode)
|
|
63
66
|
|
|
64
|
-
### `
|
|
65
|
-
|
|
67
|
+
### `PeacockCommand`
|
|
68
|
+
A high-fidelity command palette (Cmd+K) with integrated glassmorphism.
|
|
66
69
|
```tsx
|
|
67
|
-
<
|
|
70
|
+
<CommandDialog open={isOpen} onOpenChange={setIsOpen}>
|
|
71
|
+
<CommandInput placeholder="Search commands..." />
|
|
72
|
+
{/* ... items */}
|
|
73
|
+
</CommandDialog>
|
|
68
74
|
```
|
|
69
75
|
|
|
70
|
-
### `
|
|
71
|
-
|
|
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
|
-
<
|
|
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 @@
|
|
|
1
|
+
export declare const PeacockScene: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface HolographicCardProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const HolographicCard: ({ children, className }: HolographicCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface DockItem {
|
|
3
|
+
id: string;
|
|
4
|
+
icon: React.ReactNode;
|
|
5
|
+
label?: string;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
}
|
|
8
|
+
interface PeacockDockProps {
|
|
9
|
+
items: DockItem[];
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const PeacockDock: ({ items, className }: PeacockDockProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
}
|
|
15
|
+
export declare const PeacockTabs: ({ items, defaultValue, onValueChange, className, variant }: PeacockTabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
3
|
+
export declare const PeacockAvatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
4
|
+
glow?: boolean;
|
|
5
|
+
status?: "online" | "offline" | "busy";
|
|
6
|
+
} & React.RefAttributes<HTMLSpanElement>>;
|
|
7
|
+
export declare const PeacockAvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
8
|
+
export declare const PeacockAvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -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,3 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
3
|
+
export declare const PeacockSlider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,76 @@
|
|
|
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
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './MotionProvider';
|
|
2
2
|
export * from './PeacockProvider';
|
|
3
3
|
export * from './MotionPrimitive';
|
|
4
|
+
export * from './canvas/PeacockScene';
|
|
4
5
|
export * from './components/PeacockButton';
|
|
5
6
|
export * from './components/FluidCard';
|
|
6
7
|
export * from './components/GlassMenu';
|
|
@@ -9,4 +10,13 @@ export * from './components/PeacockSwitch';
|
|
|
9
10
|
export * from './components/PeacockBadge';
|
|
10
11
|
export * from './components/PeacockTooltip';
|
|
11
12
|
export * from './components/PeacockDialog';
|
|
13
|
+
export * from './components/PeacockTabs';
|
|
14
|
+
export * from './components/HolographicCard';
|
|
15
|
+
export * from './components/PeacockDock';
|
|
16
|
+
export * from './components/inputs/PeacockSlider';
|
|
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';
|
|
12
22
|
export * from './hooks/utils';
|