@moontra/moonui 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/README.md +215 -0
- package/dist/index.d.mts +73 -0
- package/dist/index.d.ts +73 -0
- package/dist/index.js +244 -0
- package/dist/index.mjs +193 -0
- package/package.json +82 -0
package/README.md
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# MoonUI
|
|
2
|
+
|
|
3
|
+
MoonUI is a modern UI component library for React applications. It provides a comprehensive set of accessible, customizable, and reusable components that make building modern web applications faster and easier.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🌙 **Modern Design**: Beautiful, clean UI components with a consistent design language
|
|
8
|
+
- 🎨 **Customizable**: Easily customize components with variants and Tailwind CSS
|
|
9
|
+
- ♿ **Accessible**: Built on top of Radix UI primitives for robust accessibility
|
|
10
|
+
- 🔍 **Type Safe**: Written in TypeScript with comprehensive type definitions
|
|
11
|
+
- 🌗 **Dark Mode**: Built-in dark mode support for all components
|
|
12
|
+
- 📱 **Responsive**: All components are designed to work on any device size
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install moonui
|
|
18
|
+
# or
|
|
19
|
+
yarn add moonui
|
|
20
|
+
# or
|
|
21
|
+
pnpm add moonui
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Setup
|
|
25
|
+
|
|
26
|
+
### 1. Install dependencies
|
|
27
|
+
|
|
28
|
+
MoonUI requires the following peer dependencies:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install tailwindcss
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### 2. Add Tailwind CSS configuration
|
|
35
|
+
|
|
36
|
+
Add MoonUI's Tailwind CSS configuration to your `tailwind.config.js`:
|
|
37
|
+
|
|
38
|
+
```js
|
|
39
|
+
// tailwind.config.js
|
|
40
|
+
/** @type {import('tailwindcss').Config} */
|
|
41
|
+
module.exports = {
|
|
42
|
+
darkMode: ["class"],
|
|
43
|
+
content: [
|
|
44
|
+
// ...
|
|
45
|
+
"./node_modules/moonui/dist/**/*.{js,ts,jsx,tsx}",
|
|
46
|
+
],
|
|
47
|
+
theme: {
|
|
48
|
+
extend: {
|
|
49
|
+
colors: {
|
|
50
|
+
border: "hsl(var(--border))",
|
|
51
|
+
input: "hsl(var(--input))",
|
|
52
|
+
ring: "hsl(var(--ring))",
|
|
53
|
+
background: "hsl(var(--background))",
|
|
54
|
+
foreground: "hsl(var(--foreground))",
|
|
55
|
+
primary: {
|
|
56
|
+
DEFAULT: "hsl(var(--primary))",
|
|
57
|
+
foreground: "hsl(var(--primary-foreground))",
|
|
58
|
+
},
|
|
59
|
+
secondary: {
|
|
60
|
+
DEFAULT: "hsl(var(--secondary))",
|
|
61
|
+
foreground: "hsl(var(--secondary-foreground))",
|
|
62
|
+
},
|
|
63
|
+
destructive: {
|
|
64
|
+
DEFAULT: "hsl(var(--destructive))",
|
|
65
|
+
foreground: "hsl(var(--destructive-foreground))",
|
|
66
|
+
},
|
|
67
|
+
muted: {
|
|
68
|
+
DEFAULT: "hsl(var(--muted))",
|
|
69
|
+
foreground: "hsl(var(--muted-foreground))",
|
|
70
|
+
},
|
|
71
|
+
accent: {
|
|
72
|
+
DEFAULT: "hsl(var(--accent))",
|
|
73
|
+
foreground: "hsl(var(--accent-foreground))",
|
|
74
|
+
},
|
|
75
|
+
popover: {
|
|
76
|
+
DEFAULT: "hsl(var(--popover))",
|
|
77
|
+
foreground: "hsl(var(--popover-foreground))",
|
|
78
|
+
},
|
|
79
|
+
card: {
|
|
80
|
+
DEFAULT: "hsl(var(--card))",
|
|
81
|
+
foreground: "hsl(var(--card-foreground))",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
borderRadius: {
|
|
85
|
+
lg: "var(--radius)",
|
|
86
|
+
md: "calc(var(--radius) - 2px)",
|
|
87
|
+
sm: "calc(var(--radius) - 4px)",
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### 3. Add CSS variables
|
|
95
|
+
|
|
96
|
+
Add the following CSS variables to your global CSS file:
|
|
97
|
+
|
|
98
|
+
```css
|
|
99
|
+
@tailwind base;
|
|
100
|
+
@tailwind components;
|
|
101
|
+
@tailwind utilities;
|
|
102
|
+
|
|
103
|
+
@layer base {
|
|
104
|
+
:root {
|
|
105
|
+
--background: 0 0% 100%;
|
|
106
|
+
--foreground: 222.2 84% 4.9%;
|
|
107
|
+
|
|
108
|
+
--card: 0 0% 100%;
|
|
109
|
+
--card-foreground: 222.2 84% 4.9%;
|
|
110
|
+
|
|
111
|
+
--popover: 0 0% 100%;
|
|
112
|
+
--popover-foreground: 222.2 84% 4.9%;
|
|
113
|
+
|
|
114
|
+
--primary: 222.2 47.4% 11.2%;
|
|
115
|
+
--primary-foreground: 210 40% 98%;
|
|
116
|
+
|
|
117
|
+
--secondary: 210 40% 96.1%;
|
|
118
|
+
--secondary-foreground: 222.2 47.4% 11.2%;
|
|
119
|
+
|
|
120
|
+
--muted: 210 40% 96.1%;
|
|
121
|
+
--muted-foreground: 215.4 16.3% 46.9%;
|
|
122
|
+
|
|
123
|
+
--accent: 210 40% 96.1%;
|
|
124
|
+
--accent-foreground: 222.2 47.4% 11.2%;
|
|
125
|
+
|
|
126
|
+
--destructive: 0 84.2% 60.2%;
|
|
127
|
+
--destructive-foreground: 210 40% 98%;
|
|
128
|
+
|
|
129
|
+
--border: 214.3 31.8% 91.4%;
|
|
130
|
+
--input: 214.3 31.8% 91.4%;
|
|
131
|
+
--ring: 222.2 84% 4.9%;
|
|
132
|
+
|
|
133
|
+
--radius: 0.5rem;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.dark {
|
|
137
|
+
--background: 222.2 84% 4.9%;
|
|
138
|
+
--foreground: 210 40% 98%;
|
|
139
|
+
|
|
140
|
+
--card: 222.2 84% 4.9%;
|
|
141
|
+
--card-foreground: 210 40% 98%;
|
|
142
|
+
|
|
143
|
+
--popover: 222.2 84% 4.9%;
|
|
144
|
+
--popover-foreground: 210 40% 98%;
|
|
145
|
+
|
|
146
|
+
--primary: 210 40% 98%;
|
|
147
|
+
--primary-foreground: 222.2 47.4% 11.2%;
|
|
148
|
+
|
|
149
|
+
--secondary: 217.2 32.6% 17.5%;
|
|
150
|
+
--secondary-foreground: 210 40% 98%;
|
|
151
|
+
|
|
152
|
+
--muted: 217.2 32.6% 17.5%;
|
|
153
|
+
--muted-foreground: 215 20.2% 65.1%;
|
|
154
|
+
|
|
155
|
+
--accent: 217.2 32.6% 17.5%;
|
|
156
|
+
--accent-foreground: 210 40% 98%;
|
|
157
|
+
|
|
158
|
+
--destructive: 0 62.8% 30.6%;
|
|
159
|
+
--destructive-foreground: 210 40% 98%;
|
|
160
|
+
|
|
161
|
+
--border: 217.2 32.6% 17.5%;
|
|
162
|
+
--input: 217.2 32.6% 17.5%;
|
|
163
|
+
--ring: 212.7 26.8% 83.9%;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@layer base {
|
|
168
|
+
* {
|
|
169
|
+
@apply border-border;
|
|
170
|
+
}
|
|
171
|
+
body {
|
|
172
|
+
@apply bg-background text-foreground;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Usage
|
|
178
|
+
|
|
179
|
+
```jsx
|
|
180
|
+
import { Button } from 'moonui';
|
|
181
|
+
|
|
182
|
+
export default function App() {
|
|
183
|
+
return (
|
|
184
|
+
<Button variant="default">
|
|
185
|
+
Click me
|
|
186
|
+
</Button>
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Components
|
|
192
|
+
|
|
193
|
+
MoonUI provides a wide range of components:
|
|
194
|
+
|
|
195
|
+
- **Form Components**: Button, Input, Checkbox, Radio, Select, Switch, etc.
|
|
196
|
+
- **Layout Components**: Card, Dialog, Accordion, Sheet, Popover, etc.
|
|
197
|
+
- **Navigation Components**: Tabs, Breadcrumb, DropdownMenu, NavigationMenu, etc.
|
|
198
|
+
- **Data Display Components**: Badge, Table, Avatar, Progress, Skeleton, etc.
|
|
199
|
+
|
|
200
|
+
## Documentation
|
|
201
|
+
|
|
202
|
+
For full documentation, visit [moonui.com/docs](https://moonui.com/docs).
|
|
203
|
+
|
|
204
|
+
## CLI Tool
|
|
205
|
+
|
|
206
|
+
MoonUI also provides a CLI tool for easy integration:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
npm install -g @moonui/cli
|
|
210
|
+
moonui init
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## License
|
|
214
|
+
|
|
215
|
+
MIT © MoonUI
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
3
|
+
import * as React$1 from 'react';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Utility function for merging Tailwind CSS classes with clsx/cva
|
|
9
|
+
* @param inputs - Class values to be merged
|
|
10
|
+
* @returns - Merged class string
|
|
11
|
+
*/
|
|
12
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
13
|
+
/**
|
|
14
|
+
* Format a monetary amount to a currency string
|
|
15
|
+
* @param amount - Amount in cents or smallest currency unit
|
|
16
|
+
* @param currency - Currency code (default: USD)
|
|
17
|
+
* @returns - Formatted currency string
|
|
18
|
+
*/
|
|
19
|
+
declare function formatCurrency(amount: number, currency?: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Generate a unique ID (useful for components that need unique IDs)
|
|
22
|
+
* @param prefix - Optional prefix for the ID
|
|
23
|
+
* @returns - A unique string ID
|
|
24
|
+
*/
|
|
25
|
+
declare function generateId(prefix?: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* Safely access nested object properties
|
|
28
|
+
* @param obj - The object to query
|
|
29
|
+
* @param path - Path to the property as a dot-separated string
|
|
30
|
+
* @param fallback - Value to return if the path doesn't exist
|
|
31
|
+
* @returns - The value at the path or the fallback
|
|
32
|
+
*/
|
|
33
|
+
declare function get<T = any>(obj: any, path: string, fallback?: T | null): T | null;
|
|
34
|
+
/**
|
|
35
|
+
* Debounce a function call
|
|
36
|
+
* @param fn - Function to debounce
|
|
37
|
+
* @param ms - Milliseconds to delay
|
|
38
|
+
* @returns - Debounced function
|
|
39
|
+
*/
|
|
40
|
+
declare function debounce<T extends (...args: any[]) => any>(fn: T, ms?: number): (...args: Parameters<T>) => void;
|
|
41
|
+
/**
|
|
42
|
+
* Combine multiple React refs into one
|
|
43
|
+
* @param refs - Refs to combine
|
|
44
|
+
* @returns - Combined ref callback
|
|
45
|
+
*/
|
|
46
|
+
declare function combineRefs<T>(...refs: Array<React.Ref<T> | undefined>): React.RefCallback<T>;
|
|
47
|
+
|
|
48
|
+
declare const buttonVariants: (props?: {
|
|
49
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "primary" | "success";
|
|
50
|
+
size?: "default" | "sm" | "lg" | "icon";
|
|
51
|
+
} & class_variance_authority_dist_types.ClassProp) => string;
|
|
52
|
+
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
53
|
+
asChild?: boolean;
|
|
54
|
+
}
|
|
55
|
+
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
56
|
+
|
|
57
|
+
declare const badgeVariants: (props?: {
|
|
58
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "success" | "warning" | "info";
|
|
59
|
+
} & class_variance_authority_dist_types.ClassProp) => string;
|
|
60
|
+
interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
61
|
+
}
|
|
62
|
+
declare function Badge({ className, variant, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
63
|
+
|
|
64
|
+
declare const Card: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
65
|
+
declare const CardHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
66
|
+
declare const CardTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
67
|
+
declare const CardDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
68
|
+
declare const CardContent: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
69
|
+
declare const CardFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
70
|
+
|
|
71
|
+
type CardProps = React$1.ComponentProps<typeof Card>;
|
|
72
|
+
|
|
73
|
+
export { Badge, BadgeProps, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardProps, CardTitle, badgeVariants, buttonVariants, cn, combineRefs, debounce, formatCurrency, generateId, get };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
3
|
+
import * as React$1 from 'react';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Utility function for merging Tailwind CSS classes with clsx/cva
|
|
9
|
+
* @param inputs - Class values to be merged
|
|
10
|
+
* @returns - Merged class string
|
|
11
|
+
*/
|
|
12
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
13
|
+
/**
|
|
14
|
+
* Format a monetary amount to a currency string
|
|
15
|
+
* @param amount - Amount in cents or smallest currency unit
|
|
16
|
+
* @param currency - Currency code (default: USD)
|
|
17
|
+
* @returns - Formatted currency string
|
|
18
|
+
*/
|
|
19
|
+
declare function formatCurrency(amount: number, currency?: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Generate a unique ID (useful for components that need unique IDs)
|
|
22
|
+
* @param prefix - Optional prefix for the ID
|
|
23
|
+
* @returns - A unique string ID
|
|
24
|
+
*/
|
|
25
|
+
declare function generateId(prefix?: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* Safely access nested object properties
|
|
28
|
+
* @param obj - The object to query
|
|
29
|
+
* @param path - Path to the property as a dot-separated string
|
|
30
|
+
* @param fallback - Value to return if the path doesn't exist
|
|
31
|
+
* @returns - The value at the path or the fallback
|
|
32
|
+
*/
|
|
33
|
+
declare function get<T = any>(obj: any, path: string, fallback?: T | null): T | null;
|
|
34
|
+
/**
|
|
35
|
+
* Debounce a function call
|
|
36
|
+
* @param fn - Function to debounce
|
|
37
|
+
* @param ms - Milliseconds to delay
|
|
38
|
+
* @returns - Debounced function
|
|
39
|
+
*/
|
|
40
|
+
declare function debounce<T extends (...args: any[]) => any>(fn: T, ms?: number): (...args: Parameters<T>) => void;
|
|
41
|
+
/**
|
|
42
|
+
* Combine multiple React refs into one
|
|
43
|
+
* @param refs - Refs to combine
|
|
44
|
+
* @returns - Combined ref callback
|
|
45
|
+
*/
|
|
46
|
+
declare function combineRefs<T>(...refs: Array<React.Ref<T> | undefined>): React.RefCallback<T>;
|
|
47
|
+
|
|
48
|
+
declare const buttonVariants: (props?: {
|
|
49
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "primary" | "success";
|
|
50
|
+
size?: "default" | "sm" | "lg" | "icon";
|
|
51
|
+
} & class_variance_authority_dist_types.ClassProp) => string;
|
|
52
|
+
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
53
|
+
asChild?: boolean;
|
|
54
|
+
}
|
|
55
|
+
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
56
|
+
|
|
57
|
+
declare const badgeVariants: (props?: {
|
|
58
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "success" | "warning" | "info";
|
|
59
|
+
} & class_variance_authority_dist_types.ClassProp) => string;
|
|
60
|
+
interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
61
|
+
}
|
|
62
|
+
declare function Badge({ className, variant, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
63
|
+
|
|
64
|
+
declare const Card: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
65
|
+
declare const CardHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
66
|
+
declare const CardTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
67
|
+
declare const CardDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
68
|
+
declare const CardContent: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
69
|
+
declare const CardFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
70
|
+
|
|
71
|
+
type CardProps = React$1.ComponentProps<typeof Card>;
|
|
72
|
+
|
|
73
|
+
export { Badge, BadgeProps, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardProps, CardTitle, badgeVariants, buttonVariants, cn, combineRefs, debounce, formatCurrency, generateId, get };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/index.tsx
|
|
30
|
+
var src_exports = {};
|
|
31
|
+
__export(src_exports, {
|
|
32
|
+
Badge: () => Badge,
|
|
33
|
+
Button: () => Button,
|
|
34
|
+
Card: () => Card,
|
|
35
|
+
CardContent: () => CardContent,
|
|
36
|
+
CardDescription: () => CardDescription,
|
|
37
|
+
CardFooter: () => CardFooter,
|
|
38
|
+
CardHeader: () => CardHeader,
|
|
39
|
+
CardTitle: () => CardTitle,
|
|
40
|
+
badgeVariants: () => badgeVariants,
|
|
41
|
+
buttonVariants: () => buttonVariants,
|
|
42
|
+
cn: () => cn,
|
|
43
|
+
combineRefs: () => combineRefs,
|
|
44
|
+
debounce: () => debounce,
|
|
45
|
+
formatCurrency: () => formatCurrency,
|
|
46
|
+
generateId: () => generateId,
|
|
47
|
+
get: () => get
|
|
48
|
+
});
|
|
49
|
+
module.exports = __toCommonJS(src_exports);
|
|
50
|
+
|
|
51
|
+
// src/lib/utils.ts
|
|
52
|
+
var import_clsx = require("clsx");
|
|
53
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
54
|
+
function cn(...inputs) {
|
|
55
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
56
|
+
}
|
|
57
|
+
function formatCurrency(amount, currency = "USD") {
|
|
58
|
+
const formatter = new Intl.NumberFormat("en-US", {
|
|
59
|
+
style: "currency",
|
|
60
|
+
currency
|
|
61
|
+
});
|
|
62
|
+
return formatter.format(amount / 100);
|
|
63
|
+
}
|
|
64
|
+
function generateId(prefix) {
|
|
65
|
+
const randomPart = Math.random().toString(36).substring(2, 9);
|
|
66
|
+
return prefix ? `${prefix}-${randomPart}` : randomPart;
|
|
67
|
+
}
|
|
68
|
+
function get(obj, path, fallback = null) {
|
|
69
|
+
const keys = path.split(".");
|
|
70
|
+
let result = obj;
|
|
71
|
+
for (const key of keys) {
|
|
72
|
+
if (result === void 0 || result === null) {
|
|
73
|
+
return fallback;
|
|
74
|
+
}
|
|
75
|
+
result = result[key];
|
|
76
|
+
}
|
|
77
|
+
return result === void 0 ? fallback : result;
|
|
78
|
+
}
|
|
79
|
+
function debounce(fn, ms = 300) {
|
|
80
|
+
let timeoutId;
|
|
81
|
+
return function(...args) {
|
|
82
|
+
clearTimeout(timeoutId);
|
|
83
|
+
timeoutId = setTimeout(() => fn(...args), ms);
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function combineRefs(...refs) {
|
|
87
|
+
return (value) => {
|
|
88
|
+
refs.forEach((ref) => {
|
|
89
|
+
if (typeof ref === "function") {
|
|
90
|
+
ref(value);
|
|
91
|
+
} else if (ref) {
|
|
92
|
+
ref.current = value;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// src/components/ui/button.tsx
|
|
99
|
+
var React = __toESM(require("react"));
|
|
100
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
101
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
102
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
103
|
+
"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-slate-950 dark:focus-visible:ring-slate-300",
|
|
104
|
+
{
|
|
105
|
+
variants: {
|
|
106
|
+
variant: {
|
|
107
|
+
default: "bg-slate-900 text-slate-50 hover:bg-slate-900/90 dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-50/90",
|
|
108
|
+
destructive: "bg-red-500 text-slate-50 hover:bg-red-500/90 dark:bg-red-900 dark:text-slate-50 dark:hover:bg-red-900/90",
|
|
109
|
+
outline: "border border-slate-200 bg-white hover:bg-slate-100 hover:text-slate-900 dark:border-slate-800 dark:bg-slate-950 dark:hover:bg-slate-800 dark:hover:text-slate-50",
|
|
110
|
+
secondary: "bg-slate-100 text-slate-900 hover:bg-slate-100/80 dark:bg-slate-800 dark:text-slate-50 dark:hover:bg-slate-800/80",
|
|
111
|
+
ghost: "hover:bg-slate-100 hover:text-slate-900 dark:hover:bg-slate-800 dark:hover:text-slate-50",
|
|
112
|
+
link: "text-slate-900 underline-offset-4 hover:underline dark:text-slate-50",
|
|
113
|
+
primary: "bg-primary text-white hover:bg-primary/90",
|
|
114
|
+
success: "bg-green-500 text-white hover:bg-green-600"
|
|
115
|
+
},
|
|
116
|
+
size: {
|
|
117
|
+
default: "h-10 px-4 py-2",
|
|
118
|
+
sm: "h-9 rounded-md px-3",
|
|
119
|
+
lg: "h-11 rounded-md px-8",
|
|
120
|
+
icon: "h-10 w-10"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
defaultVariants: {
|
|
124
|
+
variant: "default",
|
|
125
|
+
size: "default"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
var Button = React.forwardRef(
|
|
130
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
131
|
+
const Comp = asChild ? React.Fragment : "button";
|
|
132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
133
|
+
Comp,
|
|
134
|
+
{
|
|
135
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
136
|
+
ref,
|
|
137
|
+
...props
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
Button.displayName = "Button";
|
|
143
|
+
|
|
144
|
+
// src/components/ui/badge.tsx
|
|
145
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
146
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
147
|
+
var badgeVariants = (0, import_class_variance_authority2.cva)(
|
|
148
|
+
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
149
|
+
{
|
|
150
|
+
variants: {
|
|
151
|
+
variant: {
|
|
152
|
+
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
153
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
154
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
155
|
+
outline: "text-foreground",
|
|
156
|
+
success: "border-transparent bg-green-500 text-white hover:bg-green-600",
|
|
157
|
+
warning: "border-transparent bg-yellow-500 text-white hover:bg-yellow-600",
|
|
158
|
+
info: "border-transparent bg-blue-500 text-white hover:bg-blue-600"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
defaultVariants: {
|
|
162
|
+
variant: "default"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
function Badge({ className, variant, ...props }) {
|
|
167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// src/components/ui/card.tsx
|
|
171
|
+
var React2 = __toESM(require("react"));
|
|
172
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
173
|
+
var Card = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
174
|
+
"div",
|
|
175
|
+
{
|
|
176
|
+
ref,
|
|
177
|
+
className: cn(
|
|
178
|
+
"rounded-lg border border-slate-200 bg-white text-slate-950 shadow-sm dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",
|
|
179
|
+
className
|
|
180
|
+
),
|
|
181
|
+
...props
|
|
182
|
+
}
|
|
183
|
+
));
|
|
184
|
+
Card.displayName = "Card";
|
|
185
|
+
var CardHeader = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
186
|
+
"div",
|
|
187
|
+
{
|
|
188
|
+
ref,
|
|
189
|
+
className: cn("flex flex-col space-y-1.5 p-6", className),
|
|
190
|
+
...props
|
|
191
|
+
}
|
|
192
|
+
));
|
|
193
|
+
CardHeader.displayName = "CardHeader";
|
|
194
|
+
var CardTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
195
|
+
"h3",
|
|
196
|
+
{
|
|
197
|
+
ref,
|
|
198
|
+
className: cn(
|
|
199
|
+
"text-2xl font-semibold leading-none tracking-tight",
|
|
200
|
+
className
|
|
201
|
+
),
|
|
202
|
+
...props
|
|
203
|
+
}
|
|
204
|
+
));
|
|
205
|
+
CardTitle.displayName = "CardTitle";
|
|
206
|
+
var CardDescription = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
207
|
+
"p",
|
|
208
|
+
{
|
|
209
|
+
ref,
|
|
210
|
+
className: cn("text-sm text-slate-500 dark:text-slate-400", className),
|
|
211
|
+
...props
|
|
212
|
+
}
|
|
213
|
+
));
|
|
214
|
+
CardDescription.displayName = "CardDescription";
|
|
215
|
+
var CardContent = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
216
|
+
CardContent.displayName = "CardContent";
|
|
217
|
+
var CardFooter = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
218
|
+
"div",
|
|
219
|
+
{
|
|
220
|
+
ref,
|
|
221
|
+
className: cn("flex items-center p-6 pt-0", className),
|
|
222
|
+
...props
|
|
223
|
+
}
|
|
224
|
+
));
|
|
225
|
+
CardFooter.displayName = "CardFooter";
|
|
226
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
227
|
+
0 && (module.exports = {
|
|
228
|
+
Badge,
|
|
229
|
+
Button,
|
|
230
|
+
Card,
|
|
231
|
+
CardContent,
|
|
232
|
+
CardDescription,
|
|
233
|
+
CardFooter,
|
|
234
|
+
CardHeader,
|
|
235
|
+
CardTitle,
|
|
236
|
+
badgeVariants,
|
|
237
|
+
buttonVariants,
|
|
238
|
+
cn,
|
|
239
|
+
combineRefs,
|
|
240
|
+
debounce,
|
|
241
|
+
formatCurrency,
|
|
242
|
+
generateId,
|
|
243
|
+
get
|
|
244
|
+
});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
// src/lib/utils.ts
|
|
2
|
+
import { clsx } from "clsx";
|
|
3
|
+
import { twMerge } from "tailwind-merge";
|
|
4
|
+
function cn(...inputs) {
|
|
5
|
+
return twMerge(clsx(inputs));
|
|
6
|
+
}
|
|
7
|
+
function formatCurrency(amount, currency = "USD") {
|
|
8
|
+
const formatter = new Intl.NumberFormat("en-US", {
|
|
9
|
+
style: "currency",
|
|
10
|
+
currency
|
|
11
|
+
});
|
|
12
|
+
return formatter.format(amount / 100);
|
|
13
|
+
}
|
|
14
|
+
function generateId(prefix) {
|
|
15
|
+
const randomPart = Math.random().toString(36).substring(2, 9);
|
|
16
|
+
return prefix ? `${prefix}-${randomPart}` : randomPart;
|
|
17
|
+
}
|
|
18
|
+
function get(obj, path, fallback = null) {
|
|
19
|
+
const keys = path.split(".");
|
|
20
|
+
let result = obj;
|
|
21
|
+
for (const key of keys) {
|
|
22
|
+
if (result === void 0 || result === null) {
|
|
23
|
+
return fallback;
|
|
24
|
+
}
|
|
25
|
+
result = result[key];
|
|
26
|
+
}
|
|
27
|
+
return result === void 0 ? fallback : result;
|
|
28
|
+
}
|
|
29
|
+
function debounce(fn, ms = 300) {
|
|
30
|
+
let timeoutId;
|
|
31
|
+
return function(...args) {
|
|
32
|
+
clearTimeout(timeoutId);
|
|
33
|
+
timeoutId = setTimeout(() => fn(...args), ms);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function combineRefs(...refs) {
|
|
37
|
+
return (value) => {
|
|
38
|
+
refs.forEach((ref) => {
|
|
39
|
+
if (typeof ref === "function") {
|
|
40
|
+
ref(value);
|
|
41
|
+
} else if (ref) {
|
|
42
|
+
ref.current = value;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// src/components/ui/button.tsx
|
|
49
|
+
import * as React from "react";
|
|
50
|
+
import { cva } from "class-variance-authority";
|
|
51
|
+
import { jsx } from "react/jsx-runtime";
|
|
52
|
+
var buttonVariants = cva(
|
|
53
|
+
"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-slate-950 dark:focus-visible:ring-slate-300",
|
|
54
|
+
{
|
|
55
|
+
variants: {
|
|
56
|
+
variant: {
|
|
57
|
+
default: "bg-slate-900 text-slate-50 hover:bg-slate-900/90 dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-50/90",
|
|
58
|
+
destructive: "bg-red-500 text-slate-50 hover:bg-red-500/90 dark:bg-red-900 dark:text-slate-50 dark:hover:bg-red-900/90",
|
|
59
|
+
outline: "border border-slate-200 bg-white hover:bg-slate-100 hover:text-slate-900 dark:border-slate-800 dark:bg-slate-950 dark:hover:bg-slate-800 dark:hover:text-slate-50",
|
|
60
|
+
secondary: "bg-slate-100 text-slate-900 hover:bg-slate-100/80 dark:bg-slate-800 dark:text-slate-50 dark:hover:bg-slate-800/80",
|
|
61
|
+
ghost: "hover:bg-slate-100 hover:text-slate-900 dark:hover:bg-slate-800 dark:hover:text-slate-50",
|
|
62
|
+
link: "text-slate-900 underline-offset-4 hover:underline dark:text-slate-50",
|
|
63
|
+
primary: "bg-primary text-white hover:bg-primary/90",
|
|
64
|
+
success: "bg-green-500 text-white hover:bg-green-600"
|
|
65
|
+
},
|
|
66
|
+
size: {
|
|
67
|
+
default: "h-10 px-4 py-2",
|
|
68
|
+
sm: "h-9 rounded-md px-3",
|
|
69
|
+
lg: "h-11 rounded-md px-8",
|
|
70
|
+
icon: "h-10 w-10"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
defaultVariants: {
|
|
74
|
+
variant: "default",
|
|
75
|
+
size: "default"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
var Button = React.forwardRef(
|
|
80
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
81
|
+
const Comp = asChild ? React.Fragment : "button";
|
|
82
|
+
return /* @__PURE__ */ jsx(
|
|
83
|
+
Comp,
|
|
84
|
+
{
|
|
85
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
86
|
+
ref,
|
|
87
|
+
...props
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
Button.displayName = "Button";
|
|
93
|
+
|
|
94
|
+
// src/components/ui/badge.tsx
|
|
95
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
96
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
97
|
+
var badgeVariants = cva2(
|
|
98
|
+
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
99
|
+
{
|
|
100
|
+
variants: {
|
|
101
|
+
variant: {
|
|
102
|
+
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
103
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
104
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
105
|
+
outline: "text-foreground",
|
|
106
|
+
success: "border-transparent bg-green-500 text-white hover:bg-green-600",
|
|
107
|
+
warning: "border-transparent bg-yellow-500 text-white hover:bg-yellow-600",
|
|
108
|
+
info: "border-transparent bg-blue-500 text-white hover:bg-blue-600"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
defaultVariants: {
|
|
112
|
+
variant: "default"
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
function Badge({ className, variant, ...props }) {
|
|
117
|
+
return /* @__PURE__ */ jsx2("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// src/components/ui/card.tsx
|
|
121
|
+
import * as React2 from "react";
|
|
122
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
123
|
+
var Card = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
124
|
+
"div",
|
|
125
|
+
{
|
|
126
|
+
ref,
|
|
127
|
+
className: cn(
|
|
128
|
+
"rounded-lg border border-slate-200 bg-white text-slate-950 shadow-sm dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",
|
|
129
|
+
className
|
|
130
|
+
),
|
|
131
|
+
...props
|
|
132
|
+
}
|
|
133
|
+
));
|
|
134
|
+
Card.displayName = "Card";
|
|
135
|
+
var CardHeader = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
136
|
+
"div",
|
|
137
|
+
{
|
|
138
|
+
ref,
|
|
139
|
+
className: cn("flex flex-col space-y-1.5 p-6", className),
|
|
140
|
+
...props
|
|
141
|
+
}
|
|
142
|
+
));
|
|
143
|
+
CardHeader.displayName = "CardHeader";
|
|
144
|
+
var CardTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
145
|
+
"h3",
|
|
146
|
+
{
|
|
147
|
+
ref,
|
|
148
|
+
className: cn(
|
|
149
|
+
"text-2xl font-semibold leading-none tracking-tight",
|
|
150
|
+
className
|
|
151
|
+
),
|
|
152
|
+
...props
|
|
153
|
+
}
|
|
154
|
+
));
|
|
155
|
+
CardTitle.displayName = "CardTitle";
|
|
156
|
+
var CardDescription = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
157
|
+
"p",
|
|
158
|
+
{
|
|
159
|
+
ref,
|
|
160
|
+
className: cn("text-sm text-slate-500 dark:text-slate-400", className),
|
|
161
|
+
...props
|
|
162
|
+
}
|
|
163
|
+
));
|
|
164
|
+
CardDescription.displayName = "CardDescription";
|
|
165
|
+
var CardContent = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
166
|
+
CardContent.displayName = "CardContent";
|
|
167
|
+
var CardFooter = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
168
|
+
"div",
|
|
169
|
+
{
|
|
170
|
+
ref,
|
|
171
|
+
className: cn("flex items-center p-6 pt-0", className),
|
|
172
|
+
...props
|
|
173
|
+
}
|
|
174
|
+
));
|
|
175
|
+
CardFooter.displayName = "CardFooter";
|
|
176
|
+
export {
|
|
177
|
+
Badge,
|
|
178
|
+
Button,
|
|
179
|
+
Card,
|
|
180
|
+
CardContent,
|
|
181
|
+
CardDescription,
|
|
182
|
+
CardFooter,
|
|
183
|
+
CardHeader,
|
|
184
|
+
CardTitle,
|
|
185
|
+
badgeVariants,
|
|
186
|
+
buttonVariants,
|
|
187
|
+
cn,
|
|
188
|
+
combineRefs,
|
|
189
|
+
debounce,
|
|
190
|
+
formatCurrency,
|
|
191
|
+
generateId,
|
|
192
|
+
get
|
|
193
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@moontra/moonui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Modern UI component library for React applications with premium dark mode support",
|
|
5
|
+
"author": "MoonUI",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/oguzhanayyildiz/moonui"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/oguzhanayyildiz/moonui",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/oguzhanayyildiz/moonui/issues"
|
|
14
|
+
},
|
|
15
|
+
"main": "dist/index.js",
|
|
16
|
+
"module": "dist/index.mjs",
|
|
17
|
+
"types": "dist/index.d.ts",
|
|
18
|
+
"sideEffects": false,
|
|
19
|
+
"files": [
|
|
20
|
+
"dist/**",
|
|
21
|
+
"styles/**"
|
|
22
|
+
],
|
|
23
|
+
"keywords": [
|
|
24
|
+
"ui",
|
|
25
|
+
"components",
|
|
26
|
+
"design-system",
|
|
27
|
+
"react",
|
|
28
|
+
"nextjs",
|
|
29
|
+
"tailwindcss",
|
|
30
|
+
"radix-ui"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"dev": "tsup src/index.tsx --format esm,cjs --dts --watch",
|
|
34
|
+
"build": "tsup src/index.tsx --format esm,cjs --dts",
|
|
35
|
+
"lint": "eslint \"src/**/*.{ts,tsx}\" --fix",
|
|
36
|
+
"clean": "rm -rf dist",
|
|
37
|
+
"prepublishOnly": "npm run build"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"react": "^18.0.0",
|
|
41
|
+
"react-dom": "^18.0.0",
|
|
42
|
+
"tailwindcss": "^3.0.0"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@radix-ui/react-accordion": "^1.1.2",
|
|
46
|
+
"@radix-ui/react-alert-dialog": "^1.0.5",
|
|
47
|
+
"@radix-ui/react-aspect-ratio": "^1.0.3",
|
|
48
|
+
"@radix-ui/react-avatar": "^1.0.3",
|
|
49
|
+
"@radix-ui/react-checkbox": "^1.0.4",
|
|
50
|
+
"@radix-ui/react-dialog": "^1.0.5",
|
|
51
|
+
"@radix-ui/react-dropdown-menu": "^2.0.5",
|
|
52
|
+
"@radix-ui/react-label": "^2.0.2",
|
|
53
|
+
"@radix-ui/react-popover": "^1.0.6",
|
|
54
|
+
"@radix-ui/react-select": "^1.2.2",
|
|
55
|
+
"@radix-ui/react-separator": "^1.0.3",
|
|
56
|
+
"@radix-ui/react-slot": "^1.0.2",
|
|
57
|
+
"@radix-ui/react-switch": "^1.0.3",
|
|
58
|
+
"@radix-ui/react-tabs": "^1.0.4",
|
|
59
|
+
"@radix-ui/react-toast": "^1.1.5",
|
|
60
|
+
"@radix-ui/react-tooltip": "^1.0.7",
|
|
61
|
+
"class-variance-authority": "^0.7.0",
|
|
62
|
+
"clsx": "^2.0.0",
|
|
63
|
+
"lucide-react": "^0.284.0",
|
|
64
|
+
"tailwind-merge": "^1.14.0"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@types/node": "^18.16.0",
|
|
68
|
+
"@types/react": "^18.2.14",
|
|
69
|
+
"@types/react-dom": "^18.2.6",
|
|
70
|
+
"autoprefixer": "^10.4.14",
|
|
71
|
+
"eslint": "^8.39.0",
|
|
72
|
+
"eslint-config-next": "^13.4.9",
|
|
73
|
+
"eslint-plugin-react": "^7.32.2",
|
|
74
|
+
"eslint-plugin-tailwindcss": "^3.13.0",
|
|
75
|
+
"postcss": "^8.4.25",
|
|
76
|
+
"react": "^18.2.0",
|
|
77
|
+
"react-dom": "^18.2.0",
|
|
78
|
+
"tailwindcss": "^3.3.2",
|
|
79
|
+
"tsup": "^7.1.0",
|
|
80
|
+
"typescript": "^5.1.6"
|
|
81
|
+
}
|
|
82
|
+
}
|