@dilipod/ui 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 +226 -0
- package/dist/index.d.mts +133 -0
- package/dist/index.d.ts +133 -0
- package/dist/index.js +888 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +552 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +89 -0
- package/src/components/badge.stories.tsx +99 -0
- package/src/components/badge.tsx +86 -0
- package/src/components/button.stories.tsx +136 -0
- package/src/components/button.tsx +63 -0
- package/src/components/card.stories.tsx +107 -0
- package/src/components/card.tsx +80 -0
- package/src/components/icon-box.stories.tsx +99 -0
- package/src/components/icon-box.tsx +57 -0
- package/src/components/logo.stories.tsx +93 -0
- package/src/components/logo.tsx +91 -0
- package/src/components/progress.stories.tsx +99 -0
- package/src/components/progress.tsx +70 -0
- package/src/components/sheet.stories.tsx +109 -0
- package/src/components/sheet.tsx +140 -0
- package/src/components/stat.stories.tsx +127 -0
- package/src/components/stat.tsx +115 -0
- package/src/components/tag.stories.tsx +107 -0
- package/src/components/tag.tsx +53 -0
- package/src/icons.ts +107 -0
- package/src/index.ts +50 -0
- package/src/lib/utils.ts +6 -0
- package/src/styles/globals.css +187 -0
package/README.md
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# @dilipod/ui
|
|
2
|
+
|
|
3
|
+
Dilipod Design System - Shared UI components and styles for Dilipod applications.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🎨 **Black + Cyan** color system
|
|
8
|
+
- 📦 **Tree-shakeable** components
|
|
9
|
+
- 🎯 **TypeScript** first
|
|
10
|
+
- 📚 **Storybook** documentation
|
|
11
|
+
- âš¡ **Tailwind CSS v4** powered
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# From the monorepo root
|
|
17
|
+
npm install
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
### Import Components
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
import {
|
|
26
|
+
Button,
|
|
27
|
+
Logo,
|
|
28
|
+
Sheet,
|
|
29
|
+
Badge,
|
|
30
|
+
Card,
|
|
31
|
+
Progress,
|
|
32
|
+
IconBox,
|
|
33
|
+
Tag,
|
|
34
|
+
Stat
|
|
35
|
+
} from '@dilipod/ui'
|
|
36
|
+
|
|
37
|
+
export function MyComponent() {
|
|
38
|
+
return (
|
|
39
|
+
<Card>
|
|
40
|
+
<CardHeader>
|
|
41
|
+
<CardTitle>Agent Status</CardTitle>
|
|
42
|
+
</CardHeader>
|
|
43
|
+
<CardContent>
|
|
44
|
+
<Badge variant="primary" pulse>Active</Badge>
|
|
45
|
+
<Progress value={84} showLabel />
|
|
46
|
+
<Stat value="1,247" label="Docs Processed" valueColor="primary" />
|
|
47
|
+
</CardContent>
|
|
48
|
+
</Card>
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Import Styles
|
|
54
|
+
|
|
55
|
+
In your app's global CSS file:
|
|
56
|
+
|
|
57
|
+
```css
|
|
58
|
+
@import '@dilipod/ui/styles.css';
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Components
|
|
62
|
+
|
|
63
|
+
### Core Components
|
|
64
|
+
|
|
65
|
+
| Component | Description |
|
|
66
|
+
|-----------|-------------|
|
|
67
|
+
| **Button** | Versatile button with 7 variants and 4 sizes |
|
|
68
|
+
| **Logo** | Dilipod logo with dark/light variants |
|
|
69
|
+
| **Sheet** | Slide-out panel for mobile menus, sidebars |
|
|
70
|
+
|
|
71
|
+
### Data Display
|
|
72
|
+
|
|
73
|
+
| Component | Description |
|
|
74
|
+
|-----------|-------------|
|
|
75
|
+
| **Badge** | Status indicators with pulse animation |
|
|
76
|
+
| **Card** | Content container with header/content/footer |
|
|
77
|
+
| **Progress** | Progress bar with label support |
|
|
78
|
+
| **Stat** | Big number + label for metrics |
|
|
79
|
+
|
|
80
|
+
### Layout
|
|
81
|
+
|
|
82
|
+
| Component | Description |
|
|
83
|
+
|-----------|-------------|
|
|
84
|
+
| **IconBox** | Icon container with variants and sizes |
|
|
85
|
+
| **Tag** | Inline pills/chips for labels |
|
|
86
|
+
|
|
87
|
+
## Component API
|
|
88
|
+
|
|
89
|
+
### Badge
|
|
90
|
+
|
|
91
|
+
```tsx
|
|
92
|
+
<Badge variant="primary" pulse>Active</Badge>
|
|
93
|
+
<Badge variant="success">Completed</Badge>
|
|
94
|
+
<Badge variant="error">Failed</Badge>
|
|
95
|
+
<Badge variant="warning">Pending</Badge>
|
|
96
|
+
<Badge variant="outline" size="sm">Draft</Badge>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Card
|
|
100
|
+
|
|
101
|
+
```tsx
|
|
102
|
+
<Card>
|
|
103
|
+
<CardHeader>
|
|
104
|
+
<CardTitle>Title</CardTitle>
|
|
105
|
+
<CardDescription>Description</CardDescription>
|
|
106
|
+
</CardHeader>
|
|
107
|
+
<CardContent>Content</CardContent>
|
|
108
|
+
<CardFooter>Footer</CardFooter>
|
|
109
|
+
</Card>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Progress
|
|
113
|
+
|
|
114
|
+
```tsx
|
|
115
|
+
<Progress value={75} />
|
|
116
|
+
<Progress value={84} showLabel />
|
|
117
|
+
<Progress value={100} variant="success" size="lg" />
|
|
118
|
+
<Progress value={50} variant="gradient" />
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### IconBox
|
|
122
|
+
|
|
123
|
+
```tsx
|
|
124
|
+
<IconBox><BrainIcon /></IconBox>
|
|
125
|
+
<IconBox variant="primary" size="lg"><FileIcon /></IconBox>
|
|
126
|
+
<IconBox variant="gradient" rounded="full"><AIIcon /></IconBox>
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Tag
|
|
130
|
+
|
|
131
|
+
```tsx
|
|
132
|
+
<Tag>Label</Tag>
|
|
133
|
+
<Tag variant="primary">Active</Tag>
|
|
134
|
+
<Tag variant="outline" icon={<IndustryIcon />}>Real Estate</Tag>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Stat
|
|
138
|
+
|
|
139
|
+
```tsx
|
|
140
|
+
<Stat value="1,247" label="Docs Reviewed" />
|
|
141
|
+
<Stat value="80%" suffix="cheaper" valueSize="lg" />
|
|
142
|
+
<Stat value="99.8%" label="Accuracy" valueColor="primary" />
|
|
143
|
+
<Stat value="24h" label="Deploy Time" variant="card" align="center" />
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Color System
|
|
147
|
+
|
|
148
|
+
| Variable | Value | Usage |
|
|
149
|
+
|----------|-------|-------|
|
|
150
|
+
| `--black` | `#0A0A0A` | Primary text, backgrounds |
|
|
151
|
+
| `--cyan` | `#00B8A9` | Primary accent |
|
|
152
|
+
| `--cyan-dark` | `#007A70` | Gradients, hover states |
|
|
153
|
+
| `--cyan-light` | `#00E5D4` | Highlights |
|
|
154
|
+
|
|
155
|
+
### Status Colors
|
|
156
|
+
|
|
157
|
+
| Status | Color |
|
|
158
|
+
|--------|-------|
|
|
159
|
+
| Success | Cyan (`--cyan`) |
|
|
160
|
+
| Error | Red |
|
|
161
|
+
| Warning | Amber |
|
|
162
|
+
|
|
163
|
+
### Gradient Utilities
|
|
164
|
+
|
|
165
|
+
```css
|
|
166
|
+
.bg-gradient-light /* Light hero background */
|
|
167
|
+
.bg-gradient-dark /* Dark section background */
|
|
168
|
+
.bg-gradient-full /* Full black-to-cyan gradient */
|
|
169
|
+
.text-gradient /* Gradient text */
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Glass Effects
|
|
173
|
+
|
|
174
|
+
```css
|
|
175
|
+
.glass /* Light glassmorphism */
|
|
176
|
+
.glass-dark /* Dark glassmorphism */
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## Development
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
# Start Storybook
|
|
183
|
+
npm run storybook
|
|
184
|
+
|
|
185
|
+
# Build the package
|
|
186
|
+
npm run build
|
|
187
|
+
|
|
188
|
+
# Watch mode
|
|
189
|
+
npm run dev
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Storybook
|
|
193
|
+
|
|
194
|
+
View all components with interactive examples:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
cd packages/ui
|
|
198
|
+
npm run storybook
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Opens at http://localhost:6006
|
|
202
|
+
|
|
203
|
+
## Icons
|
|
204
|
+
|
|
205
|
+
All icons are re-exported from `@phosphor-icons/react`. Import them from `@dilipod/ui`:
|
|
206
|
+
|
|
207
|
+
```tsx
|
|
208
|
+
import {
|
|
209
|
+
ArrowRight, Brain, CheckCircle, Robot,
|
|
210
|
+
Database, Receipt, Calendar, Gear
|
|
211
|
+
} from '@dilipod/ui'
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Available Icon Categories
|
|
215
|
+
|
|
216
|
+
- **Navigation**: `ArrowRight`, `ArrowUpRight`, `ArrowLeft`, `CaretRight`, `CaretDown`, `List`, `X`
|
|
217
|
+
- **Actions**: `Plus`, `Minus`, `Check`, `Play`, `Pause`, `Stop`
|
|
218
|
+
- **Business**: `Brain`, `Robot`, `Gear`, `Files`, `Database`, `Receipt`, `Wallet`, `Clock`, `Calendar`
|
|
219
|
+
- **Industries**: `Buildings`, `Briefcase`, `FirstAid`, `ShoppingCart`, `AddressBook`
|
|
220
|
+
- **Status**: `CheckCircle`, `CheckSquare`, `WarningCircle`, `Warning`, `Info`
|
|
221
|
+
- **Social**: `LinkedinLogo`, `XLogo`, `EnvelopeSimple`, `Envelope`, `Phone`, `Globe`
|
|
222
|
+
- **UI**: `House`, `MagnifyingGlass`, `Trash`, `PencilSimple`, `Eye`, `Download`, `Upload`
|
|
223
|
+
|
|
224
|
+
## License
|
|
225
|
+
|
|
226
|
+
Private - Dilipod
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
6
|
+
import { ClassValue } from 'clsx';
|
|
7
|
+
export { AddressBook, ArrowLeft, ArrowRight, ArrowSquareOut, ArrowUpRight, Brain, Briefcase, Buildings, Calendar, CaretDown, CaretRight, CaretUp, ChartBar, ChartLineUp, ChatCircle, Check, CheckCircle, CheckSquare, Circle, Clock, Copy, Database, DotsThree, DotsThreeVertical, Download, Envelope, EnvelopeSimple, Eye, EyeSlash, File, FileText, Files, FirstAid, Funnel, Gear, GearSix, Globe, Handshake, House, Icon, IconProps, Info, Link, LinkedinLogo, List, MagnifyingGlass, Minus, Pause, PencilSimple, Phone, Play, Plus, Question, Receipt, Robot, ShoppingCart, SignIn, SignOut, SortAscending, SortDescending, Stop, Trash, Upload, User, UserPlus, Users, UsersThree, VideoCamera, Wallet, Warning, WarningCircle, X, XLogo } from '@phosphor-icons/react';
|
|
8
|
+
|
|
9
|
+
declare const buttonVariants: (props?: ({
|
|
10
|
+
variant?: "default" | "primary" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
11
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
12
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
13
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
14
|
+
asChild?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
|
|
18
|
+
declare const Sheet: React.FC<SheetPrimitive.DialogProps>;
|
|
19
|
+
declare const SheetTrigger: React.ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
21
|
+
declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
|
|
22
|
+
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const sheetVariants: (props?: ({
|
|
24
|
+
side?: "top" | "bottom" | "left" | "right" | null | undefined;
|
|
25
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
26
|
+
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
27
|
+
}
|
|
28
|
+
declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
declare const SheetHeader: {
|
|
30
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
31
|
+
displayName: string;
|
|
32
|
+
};
|
|
33
|
+
declare const SheetFooter: {
|
|
34
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
35
|
+
displayName: string;
|
|
36
|
+
};
|
|
37
|
+
declare const SheetTitle: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
38
|
+
declare const SheetDescription: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
39
|
+
|
|
40
|
+
interface LogoProps {
|
|
41
|
+
variant?: 'dark' | 'light';
|
|
42
|
+
size?: 'sm' | 'md' | 'lg';
|
|
43
|
+
href?: string;
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Logo component that renders the Dilipod logo as inline SVG
|
|
48
|
+
*
|
|
49
|
+
* @param variant - 'dark' for light backgrounds (black text), 'light' for dark backgrounds (white text)
|
|
50
|
+
* @param size - 'sm' | 'md' | 'lg'
|
|
51
|
+
* @param href - Optional link href (wraps logo in anchor tag)
|
|
52
|
+
* @param className - Additional CSS classes
|
|
53
|
+
*/
|
|
54
|
+
declare function Logo({ variant, size, href, className, }: LogoProps): react_jsx_runtime.JSX.Element;
|
|
55
|
+
|
|
56
|
+
declare const badgeVariants: (props?: ({
|
|
57
|
+
variant?: "default" | "primary" | "outline" | "success" | "warning" | "error" | null | undefined;
|
|
58
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
59
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
60
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
61
|
+
/** Show animated pulse dot */
|
|
62
|
+
pulse?: boolean;
|
|
63
|
+
/** Custom pulse color (overrides variant-based color) */
|
|
64
|
+
pulseColor?: 'default' | 'primary' | 'success' | 'warning' | 'error';
|
|
65
|
+
}
|
|
66
|
+
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
67
|
+
|
|
68
|
+
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
69
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
70
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
|
|
71
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
72
|
+
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
73
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
74
|
+
|
|
75
|
+
declare const progressVariants: (props?: ({
|
|
76
|
+
variant?: "default" | "success" | "warning" | "error" | "gradient" | null | undefined;
|
|
77
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
78
|
+
interface ProgressProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof progressVariants> {
|
|
79
|
+
/** Progress value (0-100) */
|
|
80
|
+
value: number;
|
|
81
|
+
/** Show percentage label */
|
|
82
|
+
showLabel?: boolean;
|
|
83
|
+
/** Custom label text (defaults to "Progress") */
|
|
84
|
+
label?: string;
|
|
85
|
+
/** Size of the progress bar */
|
|
86
|
+
size?: 'sm' | 'default' | 'lg';
|
|
87
|
+
}
|
|
88
|
+
declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
89
|
+
|
|
90
|
+
declare const iconBoxVariants: (props?: ({
|
|
91
|
+
variant?: "default" | "primary" | "outline" | "ghost" | "gradient" | null | undefined;
|
|
92
|
+
size?: "default" | "sm" | "lg" | "xl" | null | undefined;
|
|
93
|
+
rounded?: "default" | "sm" | "full" | null | undefined;
|
|
94
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
95
|
+
interface IconBoxProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof iconBoxVariants> {
|
|
96
|
+
}
|
|
97
|
+
declare const IconBox: React.ForwardRefExoticComponent<IconBoxProps & React.RefAttributes<HTMLDivElement>>;
|
|
98
|
+
|
|
99
|
+
declare const tagVariants: (props?: ({
|
|
100
|
+
variant?: "default" | "primary" | "outline" | "dark" | null | undefined;
|
|
101
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
102
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
103
|
+
interface TagProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof tagVariants> {
|
|
104
|
+
/** Optional icon to display before text */
|
|
105
|
+
icon?: React.ReactNode;
|
|
106
|
+
}
|
|
107
|
+
declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLSpanElement>>;
|
|
108
|
+
|
|
109
|
+
declare const statVariants: (props?: ({
|
|
110
|
+
variant?: "default" | "card" | null | undefined;
|
|
111
|
+
align?: "center" | "left" | "right" | null | undefined;
|
|
112
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
113
|
+
declare const valueVariants: (props?: ({
|
|
114
|
+
size?: "default" | "sm" | "lg" | "xl" | null | undefined;
|
|
115
|
+
color?: "default" | "primary" | "white" | "gradient" | null | undefined;
|
|
116
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
117
|
+
interface StatProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof statVariants> {
|
|
118
|
+
/** The main value to display */
|
|
119
|
+
value: string | number;
|
|
120
|
+
/** Label below the value */
|
|
121
|
+
label?: string;
|
|
122
|
+
/** Optional suffix after value (e.g., "faster", "cheaper") */
|
|
123
|
+
suffix?: string;
|
|
124
|
+
/** Size of the value text */
|
|
125
|
+
valueSize?: 'sm' | 'default' | 'lg' | 'xl';
|
|
126
|
+
/** Color of the value */
|
|
127
|
+
valueColor?: 'default' | 'primary' | 'white' | 'gradient';
|
|
128
|
+
}
|
|
129
|
+
declare const Stat: React.ForwardRefExoticComponent<StatProps & React.RefAttributes<HTMLDivElement>>;
|
|
130
|
+
|
|
131
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
132
|
+
|
|
133
|
+
export { Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, IconBox, type IconBoxProps, Logo, type LogoProps, Progress, type ProgressProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Stat, type StatProps, Tag, type TagProps, badgeVariants, buttonVariants, cn, iconBoxVariants, progressVariants, statVariants, tagVariants, valueVariants };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
6
|
+
import { ClassValue } from 'clsx';
|
|
7
|
+
export { AddressBook, ArrowLeft, ArrowRight, ArrowSquareOut, ArrowUpRight, Brain, Briefcase, Buildings, Calendar, CaretDown, CaretRight, CaretUp, ChartBar, ChartLineUp, ChatCircle, Check, CheckCircle, CheckSquare, Circle, Clock, Copy, Database, DotsThree, DotsThreeVertical, Download, Envelope, EnvelopeSimple, Eye, EyeSlash, File, FileText, Files, FirstAid, Funnel, Gear, GearSix, Globe, Handshake, House, Icon, IconProps, Info, Link, LinkedinLogo, List, MagnifyingGlass, Minus, Pause, PencilSimple, Phone, Play, Plus, Question, Receipt, Robot, ShoppingCart, SignIn, SignOut, SortAscending, SortDescending, Stop, Trash, Upload, User, UserPlus, Users, UsersThree, VideoCamera, Wallet, Warning, WarningCircle, X, XLogo } from '@phosphor-icons/react';
|
|
8
|
+
|
|
9
|
+
declare const buttonVariants: (props?: ({
|
|
10
|
+
variant?: "default" | "primary" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
11
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
12
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
13
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
14
|
+
asChild?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
|
|
18
|
+
declare const Sheet: React.FC<SheetPrimitive.DialogProps>;
|
|
19
|
+
declare const SheetTrigger: React.ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
21
|
+
declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
|
|
22
|
+
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const sheetVariants: (props?: ({
|
|
24
|
+
side?: "top" | "bottom" | "left" | "right" | null | undefined;
|
|
25
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
26
|
+
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
27
|
+
}
|
|
28
|
+
declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
declare const SheetHeader: {
|
|
30
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
31
|
+
displayName: string;
|
|
32
|
+
};
|
|
33
|
+
declare const SheetFooter: {
|
|
34
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
35
|
+
displayName: string;
|
|
36
|
+
};
|
|
37
|
+
declare const SheetTitle: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
38
|
+
declare const SheetDescription: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
39
|
+
|
|
40
|
+
interface LogoProps {
|
|
41
|
+
variant?: 'dark' | 'light';
|
|
42
|
+
size?: 'sm' | 'md' | 'lg';
|
|
43
|
+
href?: string;
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Logo component that renders the Dilipod logo as inline SVG
|
|
48
|
+
*
|
|
49
|
+
* @param variant - 'dark' for light backgrounds (black text), 'light' for dark backgrounds (white text)
|
|
50
|
+
* @param size - 'sm' | 'md' | 'lg'
|
|
51
|
+
* @param href - Optional link href (wraps logo in anchor tag)
|
|
52
|
+
* @param className - Additional CSS classes
|
|
53
|
+
*/
|
|
54
|
+
declare function Logo({ variant, size, href, className, }: LogoProps): react_jsx_runtime.JSX.Element;
|
|
55
|
+
|
|
56
|
+
declare const badgeVariants: (props?: ({
|
|
57
|
+
variant?: "default" | "primary" | "outline" | "success" | "warning" | "error" | null | undefined;
|
|
58
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
59
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
60
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
61
|
+
/** Show animated pulse dot */
|
|
62
|
+
pulse?: boolean;
|
|
63
|
+
/** Custom pulse color (overrides variant-based color) */
|
|
64
|
+
pulseColor?: 'default' | 'primary' | 'success' | 'warning' | 'error';
|
|
65
|
+
}
|
|
66
|
+
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
67
|
+
|
|
68
|
+
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
69
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
70
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
|
|
71
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
72
|
+
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
73
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
74
|
+
|
|
75
|
+
declare const progressVariants: (props?: ({
|
|
76
|
+
variant?: "default" | "success" | "warning" | "error" | "gradient" | null | undefined;
|
|
77
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
78
|
+
interface ProgressProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof progressVariants> {
|
|
79
|
+
/** Progress value (0-100) */
|
|
80
|
+
value: number;
|
|
81
|
+
/** Show percentage label */
|
|
82
|
+
showLabel?: boolean;
|
|
83
|
+
/** Custom label text (defaults to "Progress") */
|
|
84
|
+
label?: string;
|
|
85
|
+
/** Size of the progress bar */
|
|
86
|
+
size?: 'sm' | 'default' | 'lg';
|
|
87
|
+
}
|
|
88
|
+
declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
89
|
+
|
|
90
|
+
declare const iconBoxVariants: (props?: ({
|
|
91
|
+
variant?: "default" | "primary" | "outline" | "ghost" | "gradient" | null | undefined;
|
|
92
|
+
size?: "default" | "sm" | "lg" | "xl" | null | undefined;
|
|
93
|
+
rounded?: "default" | "sm" | "full" | null | undefined;
|
|
94
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
95
|
+
interface IconBoxProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof iconBoxVariants> {
|
|
96
|
+
}
|
|
97
|
+
declare const IconBox: React.ForwardRefExoticComponent<IconBoxProps & React.RefAttributes<HTMLDivElement>>;
|
|
98
|
+
|
|
99
|
+
declare const tagVariants: (props?: ({
|
|
100
|
+
variant?: "default" | "primary" | "outline" | "dark" | null | undefined;
|
|
101
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
102
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
103
|
+
interface TagProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof tagVariants> {
|
|
104
|
+
/** Optional icon to display before text */
|
|
105
|
+
icon?: React.ReactNode;
|
|
106
|
+
}
|
|
107
|
+
declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLSpanElement>>;
|
|
108
|
+
|
|
109
|
+
declare const statVariants: (props?: ({
|
|
110
|
+
variant?: "default" | "card" | null | undefined;
|
|
111
|
+
align?: "center" | "left" | "right" | null | undefined;
|
|
112
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
113
|
+
declare const valueVariants: (props?: ({
|
|
114
|
+
size?: "default" | "sm" | "lg" | "xl" | null | undefined;
|
|
115
|
+
color?: "default" | "primary" | "white" | "gradient" | null | undefined;
|
|
116
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
117
|
+
interface StatProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof statVariants> {
|
|
118
|
+
/** The main value to display */
|
|
119
|
+
value: string | number;
|
|
120
|
+
/** Label below the value */
|
|
121
|
+
label?: string;
|
|
122
|
+
/** Optional suffix after value (e.g., "faster", "cheaper") */
|
|
123
|
+
suffix?: string;
|
|
124
|
+
/** Size of the value text */
|
|
125
|
+
valueSize?: 'sm' | 'default' | 'lg' | 'xl';
|
|
126
|
+
/** Color of the value */
|
|
127
|
+
valueColor?: 'default' | 'primary' | 'white' | 'gradient';
|
|
128
|
+
}
|
|
129
|
+
declare const Stat: React.ForwardRefExoticComponent<StatProps & React.RefAttributes<HTMLDivElement>>;
|
|
130
|
+
|
|
131
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
132
|
+
|
|
133
|
+
export { Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, IconBox, type IconBoxProps, Logo, type LogoProps, Progress, type ProgressProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Stat, type StatProps, Tag, type TagProps, badgeVariants, buttonVariants, cn, iconBoxVariants, progressVariants, statVariants, tagVariants, valueVariants };
|