@peacock-ui/core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +72 -0
- package/dist/PeacockProvider.d.ts +11 -0
- package/dist/components/PeacockButton.d.ts +9 -0
- package/dist/hooks/utils.d.ts +3 -0
- package/dist/index.d.ts +4 -0
- package/dist/motion/variants.d.ts +17 -0
- package/dist/peacock-ui.js +2999 -0
- package/dist/peacock-ui.umd.cjs +30 -0
- package/dist/style.css +1 -0
- package/package.json +60 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Sploov
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# 🦚 Peacock UI
|
|
2
|
+
|
|
3
|
+
**Fluidity over Staticity.** A high-fidelity, motion-first design system for React 19 and Tailwind CSS 4.
|
|
4
|
+
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
[](https://react.dev/)
|
|
7
|
+
[](https://www.framer.com/motion/)
|
|
8
|
+
|
|
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
|
+
|
|
11
|
+
## ✨ Features
|
|
12
|
+
|
|
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.
|
|
19
|
+
|
|
20
|
+
## 📦 Installation
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install @peacock-ui/core framer-motion tailwindcss lucide-react
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## 🚀 Quick Start
|
|
27
|
+
|
|
28
|
+
1. **Setup Tailwind**: Add the Peacock plugin to your `tailwind.config.mjs`.
|
|
29
|
+
2. **Wrap your App**:
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
import { PeacockProvider, PeacockButton } from '@peacock-ui/core';
|
|
33
|
+
import '@peacock-ui/core/style.css';
|
|
34
|
+
|
|
35
|
+
function App() {
|
|
36
|
+
return (
|
|
37
|
+
<PeacockProvider theme="dark">
|
|
38
|
+
<PeacockButton onClick={() => console.log("Clicked!")}>
|
|
39
|
+
Spread Plumage
|
|
40
|
+
</PeacockButton>
|
|
41
|
+
</PeacockProvider>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 🧱 Core Components
|
|
47
|
+
|
|
48
|
+
- **PeacockButton**: Follow-mouse radial light source effect.
|
|
49
|
+
- **FluidCard**: Seamless layout transitions using shared element logic.
|
|
50
|
+
- **GlassMenu**: Recursive command-palette style menu.
|
|
51
|
+
- **PeacockInput**: Interactive focus-glow borders.
|
|
52
|
+
- **PeacockSwitch**: Physics-based toggle interactions.
|
|
53
|
+
|
|
54
|
+
## 🛠️ Development
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Clone the repo
|
|
58
|
+
git clone https://github.com/sploov/peacock-ui
|
|
59
|
+
|
|
60
|
+
# Install dependencies
|
|
61
|
+
npm install
|
|
62
|
+
|
|
63
|
+
# Run the documentation site locally
|
|
64
|
+
npm run dev
|
|
65
|
+
|
|
66
|
+
# Build the library
|
|
67
|
+
npm run build
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## 📜 License
|
|
71
|
+
|
|
72
|
+
MIT © [Sploov](https://github.com/sploov)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
interface PeacockContextProps {
|
|
4
|
+
theme: 'light' | 'dark';
|
|
5
|
+
}
|
|
6
|
+
export declare const PeacockProvider: ({ children, theme }: {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
theme?: "light" | "dark";
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const usePeacock: () => PeacockContextProps;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { HTMLMotionProps } from 'framer-motion';
|
|
3
|
+
|
|
4
|
+
interface PeacockButtonProps extends HTMLMotionProps<'button'> {
|
|
5
|
+
variant?: 'primary' | 'outline' | 'ghost';
|
|
6
|
+
glow?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const PeacockButton: React.ForwardRefExoticComponent<Omit<PeacockButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Variants } from 'framer-motion';
|
|
2
|
+
|
|
3
|
+
export declare const slideUp: Variants;
|
|
4
|
+
export declare const fadeScale: Variants;
|
|
5
|
+
export declare const springRotate: Variants;
|
|
6
|
+
export declare const transitions: {
|
|
7
|
+
spring: {
|
|
8
|
+
type: string;
|
|
9
|
+
stiffness: number;
|
|
10
|
+
damping: number;
|
|
11
|
+
};
|
|
12
|
+
smooth: {
|
|
13
|
+
type: string;
|
|
14
|
+
ease: number[];
|
|
15
|
+
duration: number;
|
|
16
|
+
};
|
|
17
|
+
};
|