@ancatag/at-design 0.3.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 +537 -0
- package/dist/components/Sheet.d.ts +20 -0
- package/dist/components/Sheet.d.ts.map +1 -0
- package/dist/components/Sheet.js +26 -0
- package/dist/components/Sheet.js.map +1 -0
- package/dist/components/alert-dialog.d.ts +21 -0
- package/dist/components/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog.js +27 -0
- package/dist/components/alert-dialog.js.map +1 -0
- package/dist/components/alert.d.ts +9 -0
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +23 -0
- package/dist/components/alert.js.map +1 -0
- package/dist/components/avatar.d.ts +7 -0
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +12 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +10 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +21 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/bottom-sheet.d.ts +16 -0
- package/dist/components/bottom-sheet.d.ts.map +1 -0
- package/dist/components/bottom-sheet.js +13 -0
- package/dist/components/bottom-sheet.js.map +1 -0
- package/dist/components/button.d.ts +12 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +34 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/card.d.ts +9 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +17 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/checkbox.d.ts +5 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +10 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/combobox.d.ts +19 -0
- package/dist/components/combobox.d.ts.map +1 -0
- package/dist/components/combobox.js +101 -0
- package/dist/components/combobox.js.map +1 -0
- package/dist/components/dialog.d.ts +20 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +24 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +28 -0
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +36 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/error-page.d.ts +105 -0
- package/dist/components/error-page.d.ts.map +1 -0
- package/dist/components/error-page.js +99 -0
- package/dist/components/error-page.js.map +1 -0
- package/dist/components/glass-card.d.ts +12 -0
- package/dist/components/glass-card.d.ts.map +1 -0
- package/dist/components/glass-card.js +15 -0
- package/dist/components/glass-card.js.map +1 -0
- package/dist/components/icon-badge.d.ts +15 -0
- package/dist/components/icon-badge.d.ts.map +1 -0
- package/dist/components/icon-badge.js +77 -0
- package/dist/components/icon-badge.js.map +1 -0
- package/dist/components/input.d.ts +6 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +9 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/label.d.ts +6 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +11 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/progress.d.ts +5 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +9 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/radio-group.d.ts +6 -0
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +15 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/responsive-table.d.ts +21 -0
- package/dist/components/responsive-table.d.ts.map +1 -0
- package/dist/components/responsive-table.js +48 -0
- package/dist/components/responsive-table.js.map +1 -0
- package/dist/components/select.d.ts +14 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +27 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/skeleton.d.ts +3 -0
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +7 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/slider.d.ts +5 -0
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +9 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/stat-card.d.ts +17 -0
- package/dist/components/stat-card.d.ts.map +1 -0
- package/dist/components/stat-card.js +23 -0
- package/dist/components/stat-card.js.map +1 -0
- package/dist/components/switch.d.ts +5 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +9 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.d.ts +11 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +21 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +8 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +14 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/textarea.d.ts +6 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +9 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/toast.d.ts +6 -0
- package/dist/components/toast.d.ts.map +1 -0
- package/dist/components/toast.js +14 -0
- package/dist/components/toast.js.map +1 -0
- package/dist/components/tooltip.d.ts +8 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +12 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/dist/utils/cn.d.ts +3 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/cn.js +6 -0
- package/dist/utils/cn.js.map +1 -0
- package/package.json +96 -0
- package/src/components/Sheet.tsx +117 -0
- package/src/components/alert-dialog.tsx +138 -0
- package/src/components/alert.tsx +58 -0
- package/src/components/avatar.tsx +48 -0
- package/src/components/badge.tsx +36 -0
- package/src/components/bottom-sheet.tsx +68 -0
- package/src/components/button.tsx +56 -0
- package/src/components/card.tsx +85 -0
- package/src/components/checkbox.tsx +30 -0
- package/src/components/combobox.tsx +246 -0
- package/src/components/dialog.tsx +122 -0
- package/src/components/dropdown-menu.tsx +198 -0
- package/src/components/error-page.tsx +368 -0
- package/src/components/glass-card.tsx +37 -0
- package/src/components/icon-badge.tsx +126 -0
- package/src/components/input.tsx +25 -0
- package/src/components/label.tsx +26 -0
- package/src/components/progress.tsx +28 -0
- package/src/components/radio-group.tsx +42 -0
- package/src/components/responsive-table.tsx +191 -0
- package/src/components/select.tsx +158 -0
- package/src/components/skeleton.tsx +15 -0
- package/src/components/slider.tsx +27 -0
- package/src/components/stat-card.tsx +69 -0
- package/src/components/switch.tsx +29 -0
- package/src/components/table.tsx +117 -0
- package/src/components/tabs.tsx +55 -0
- package/src/components/textarea.tsx +23 -0
- package/src/components/toast.tsx +26 -0
- package/src/components/tooltip.tsx +34 -0
- package/src/index.ts +136 -0
- package/src/styles/animations.css +55 -0
- package/src/styles/base.css +51 -0
- package/src/styles/tokens.css +37 -0
- package/src/utils/cn.ts +6 -0
- package/tsconfig.json +22 -0
package/README.md
ADDED
|
@@ -0,0 +1,537 @@
|
|
|
1
|
+
# @ancatag/at-design
|
|
2
|
+
|
|
3
|
+
A shared design system package providing 29 reusable UI components with theme-agnostic styling. Built with React, TypeScript, Tailwind CSS, and Radix UI primitives.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### Install Package
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @ancatag/at-design
|
|
11
|
+
# or
|
|
12
|
+
pnpm add @ancatag/at-design
|
|
13
|
+
# or
|
|
14
|
+
yarn add @ancatag/at-design
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
This is a **public npm package** - no authentication required!
|
|
18
|
+
|
|
19
|
+
### From Git Repository (Development)
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@ancatag/at-design": "github:ancatag/at-design#v{version}"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Or for latest from main branch:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@ancatag/at-design": "github:ancatag/at-design"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### From Local File Path (Development)
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@ancatag/at-design": "file:../path/to/at-design"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Quick Start
|
|
50
|
+
|
|
51
|
+
### 1. Import Base Styles
|
|
52
|
+
|
|
53
|
+
In your app's main CSS file (e.g., `globals.css` or `index.css`), import the design system base styles:
|
|
54
|
+
|
|
55
|
+
```css
|
|
56
|
+
/* Import design system base styles */
|
|
57
|
+
@import "@ancatag/at-design/styles/tokens";
|
|
58
|
+
@import "@ancatag/at-design/styles/animations";
|
|
59
|
+
@import "@ancatag/at-design/styles/base";
|
|
60
|
+
|
|
61
|
+
@import "tailwindcss";
|
|
62
|
+
|
|
63
|
+
/* Override with your app's theme */
|
|
64
|
+
@theme {
|
|
65
|
+
--color-primary: #your-color;
|
|
66
|
+
--color-background: #your-bg;
|
|
67
|
+
/* ... other theme overrides */
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 2. Import Components
|
|
72
|
+
|
|
73
|
+
```typescript
|
|
74
|
+
import { Button, Card, Input } from "@ancatag/at-design";
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 3. Use Components
|
|
78
|
+
|
|
79
|
+
```tsx
|
|
80
|
+
<Card>
|
|
81
|
+
<CardHeader>
|
|
82
|
+
<CardTitle>Hello</CardTitle>
|
|
83
|
+
</CardHeader>
|
|
84
|
+
<CardContent>
|
|
85
|
+
<Input placeholder="Enter text" />
|
|
86
|
+
<Button>Submit</Button>
|
|
87
|
+
</CardContent>
|
|
88
|
+
</Card>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Component Inventory
|
|
92
|
+
|
|
93
|
+
### Form Components (9)
|
|
94
|
+
- **Input** - Text input field
|
|
95
|
+
- **Textarea** - Multi-line text input
|
|
96
|
+
- **Select** - Dropdown selection menu
|
|
97
|
+
- **Combobox** - Searchable dropdown with custom values
|
|
98
|
+
- **Checkbox** - Binary checkbox
|
|
99
|
+
- **RadioGroup** - Radio button group
|
|
100
|
+
- **Switch** - Toggle switch
|
|
101
|
+
- **Slider** - Range slider
|
|
102
|
+
- **Label** - Form label
|
|
103
|
+
|
|
104
|
+
### Display Components (8)
|
|
105
|
+
- **Card** - Container card with header/content/footer
|
|
106
|
+
- **GlassCard** - Glass morphism card with gradients
|
|
107
|
+
- **Badge** - Status indicator or label
|
|
108
|
+
- **Avatar** - User/entity avatar with image and fallback
|
|
109
|
+
- **IconBadge** - Badge with icon, value, and label
|
|
110
|
+
- **StatCard** - Statistics card with icon and value
|
|
111
|
+
- **Skeleton** - Loading placeholder
|
|
112
|
+
- **Progress** - Progress bar indicator
|
|
113
|
+
|
|
114
|
+
### Navigation & Layout (3)
|
|
115
|
+
- **Tabs** - Tabbed interface
|
|
116
|
+
- **Table** - Data table
|
|
117
|
+
- **ResponsiveTable** - Mobile-responsive table with card view
|
|
118
|
+
|
|
119
|
+
### Overlay Components (6)
|
|
120
|
+
- **Dialog** - Modal dialog
|
|
121
|
+
- **AlertDialog** - Alert dialog for confirmations
|
|
122
|
+
- **Sheet** - Slide-out panel
|
|
123
|
+
- **BottomSheet** - Mobile-optimized bottom sheet
|
|
124
|
+
- **Tooltip** - Hover tooltip
|
|
125
|
+
- **Toast** - Toast notification system
|
|
126
|
+
|
|
127
|
+
### Feedback Components (1)
|
|
128
|
+
- **Alert** - Alert message
|
|
129
|
+
|
|
130
|
+
### Action Components (2)
|
|
131
|
+
- **Button** - Primary action button
|
|
132
|
+
- **DropdownMenu** - Dropdown menu
|
|
133
|
+
|
|
134
|
+
### Error Pages (1)
|
|
135
|
+
- **ErrorPage** - Customizable error page component
|
|
136
|
+
- **NotFoundPage** - Pre-configured 404 page
|
|
137
|
+
- **ServerErrorPage** - Pre-configured 500 page
|
|
138
|
+
- **ForbiddenPage** - Pre-configured 403 page
|
|
139
|
+
- **UnauthorizedPage** - Pre-configured 401 page
|
|
140
|
+
|
|
141
|
+
**Total: 29 components**
|
|
142
|
+
|
|
143
|
+
## Multi-App Usage
|
|
144
|
+
|
|
145
|
+
This design system powers multiple applications with consistent UI components:
|
|
146
|
+
|
|
147
|
+
- **nova-route** - AI platform dashboard
|
|
148
|
+
- **openchat** - AI character storytelling platform
|
|
149
|
+
|
|
150
|
+
### Automated Releases
|
|
151
|
+
|
|
152
|
+
The design system uses GitHub Actions for automated versioning and publishing:
|
|
153
|
+
|
|
154
|
+
1. **Push to main** → Automatic version bump based on conventional commits
|
|
155
|
+
2. **Build & publish** → Package published to npm registry
|
|
156
|
+
3. **Create release** → Git tag and GitHub release created
|
|
157
|
+
4. **Update consuming apps** → Apps can update to latest version
|
|
158
|
+
|
|
159
|
+
### Version Update Process
|
|
160
|
+
|
|
161
|
+
Consuming applications should regularly update to the latest version:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
# Check latest version
|
|
165
|
+
pnpm info @ancatag/at-design
|
|
166
|
+
|
|
167
|
+
# Update to latest
|
|
168
|
+
pnpm update @ancatag/at-design
|
|
169
|
+
|
|
170
|
+
# Or pin to specific version
|
|
171
|
+
pnpm add @ancatag/at-design@^1.0.0 # Replace with desired version
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
See [`docs/DESIGN_SYSTEM_WORKFLOW.md`](docs/DESIGN_SYSTEM_WORKFLOW.md) for complete workflow documentation.
|
|
175
|
+
|
|
176
|
+
## Theme Customization
|
|
177
|
+
|
|
178
|
+
The design system uses CSS custom properties (CSS variables) for theming. All components automatically use these tokens, which can be overridden in your app's CSS.
|
|
179
|
+
|
|
180
|
+
### Available CSS Variables
|
|
181
|
+
|
|
182
|
+
```css
|
|
183
|
+
/* Colors */
|
|
184
|
+
--color-background
|
|
185
|
+
--color-foreground
|
|
186
|
+
--color-card
|
|
187
|
+
--color-card-foreground
|
|
188
|
+
--color-popover
|
|
189
|
+
--color-popover-foreground
|
|
190
|
+
--color-primary
|
|
191
|
+
--color-primary-foreground
|
|
192
|
+
--color-secondary
|
|
193
|
+
--color-secondary-foreground
|
|
194
|
+
--color-muted
|
|
195
|
+
--color-muted-foreground
|
|
196
|
+
--color-accent
|
|
197
|
+
--color-accent-foreground
|
|
198
|
+
--color-destructive
|
|
199
|
+
--color-destructive-foreground
|
|
200
|
+
--color-border
|
|
201
|
+
--color-input
|
|
202
|
+
--color-ring
|
|
203
|
+
|
|
204
|
+
/* Border Radius */
|
|
205
|
+
--radius-lg
|
|
206
|
+
--radius-md
|
|
207
|
+
--radius-sm
|
|
208
|
+
|
|
209
|
+
/* Shadows */
|
|
210
|
+
--shadow-sm
|
|
211
|
+
--shadow-md
|
|
212
|
+
--shadow-lg
|
|
213
|
+
--shadow-xl
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### Example: Custom Theme
|
|
217
|
+
|
|
218
|
+
```css
|
|
219
|
+
@theme {
|
|
220
|
+
/* Light Mode - Custom Theme */
|
|
221
|
+
--color-background: #f5f5f7;
|
|
222
|
+
--color-foreground: #1d1d1f;
|
|
223
|
+
--color-primary: #0071e3;
|
|
224
|
+
--color-primary-foreground: #ffffff;
|
|
225
|
+
/* ... */
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
:root.dark {
|
|
229
|
+
/* Dark Mode - Custom Theme */
|
|
230
|
+
--color-background: #000000;
|
|
231
|
+
--color-foreground: #f5f5f7;
|
|
232
|
+
--color-primary: #0a84ff;
|
|
233
|
+
/* ... */
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
## Usage Examples
|
|
238
|
+
|
|
239
|
+
### Basic Form
|
|
240
|
+
|
|
241
|
+
```tsx
|
|
242
|
+
import { Input, Label, Button, Card, CardContent, CardHeader, CardTitle } from "@ancatag/at-design";
|
|
243
|
+
|
|
244
|
+
function LoginForm() {
|
|
245
|
+
return (
|
|
246
|
+
<Card>
|
|
247
|
+
<CardHeader>
|
|
248
|
+
<CardTitle>Login</CardTitle>
|
|
249
|
+
</CardHeader>
|
|
250
|
+
<CardContent>
|
|
251
|
+
<div className="space-y-4">
|
|
252
|
+
<div>
|
|
253
|
+
<Label htmlFor="email">Email</Label>
|
|
254
|
+
<Input id="email" type="email" placeholder="you@example.com" />
|
|
255
|
+
</div>
|
|
256
|
+
<div>
|
|
257
|
+
<Label htmlFor="password">Password</Label>
|
|
258
|
+
<Input id="password" type="password" />
|
|
259
|
+
</div>
|
|
260
|
+
<Button>Sign In</Button>
|
|
261
|
+
</div>
|
|
262
|
+
</CardContent>
|
|
263
|
+
</Card>
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### 404 Error Page
|
|
269
|
+
|
|
270
|
+
```tsx
|
|
271
|
+
import { NotFoundPage } from "@ancatag/at-design";
|
|
272
|
+
|
|
273
|
+
function NotFound() {
|
|
274
|
+
return (
|
|
275
|
+
<NotFoundPage
|
|
276
|
+
showHomeButton
|
|
277
|
+
showBackButton
|
|
278
|
+
onHomeClick={() => window.location.href = "/"}
|
|
279
|
+
/>
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Custom Error Page
|
|
285
|
+
|
|
286
|
+
```tsx
|
|
287
|
+
import { ErrorPage } from "@ancatag/at-design";
|
|
288
|
+
import { AlertCircle } from "lucide-react";
|
|
289
|
+
|
|
290
|
+
function CustomError() {
|
|
291
|
+
return (
|
|
292
|
+
<ErrorPage
|
|
293
|
+
code="404"
|
|
294
|
+
title="Page Not Found"
|
|
295
|
+
description="The page you're looking for doesn't exist."
|
|
296
|
+
icon={AlertCircle}
|
|
297
|
+
showHomeButton
|
|
298
|
+
showBackButton
|
|
299
|
+
variant="full"
|
|
300
|
+
/>
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
### Icon Badge
|
|
306
|
+
|
|
307
|
+
```tsx
|
|
308
|
+
import { IconBadge } from "@ancatag/at-design";
|
|
309
|
+
import { Coins } from "lucide-react";
|
|
310
|
+
|
|
311
|
+
function TokenDisplay() {
|
|
312
|
+
return (
|
|
313
|
+
<IconBadge
|
|
314
|
+
icon={Coins}
|
|
315
|
+
value="1,234"
|
|
316
|
+
label="Open Tokens"
|
|
317
|
+
variant="yellow"
|
|
318
|
+
size="lg"
|
|
319
|
+
/>
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### Responsive Table
|
|
325
|
+
|
|
326
|
+
```tsx
|
|
327
|
+
import { ResponsiveTable } from "@ancatag/at-design";
|
|
328
|
+
|
|
329
|
+
const columns = [
|
|
330
|
+
{
|
|
331
|
+
key: "name",
|
|
332
|
+
header: "Name",
|
|
333
|
+
render: (item) => item.name,
|
|
334
|
+
mobileLabel: "Name",
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
key: "email",
|
|
338
|
+
header: "Email",
|
|
339
|
+
render: (item) => item.email,
|
|
340
|
+
mobileLabel: "Email",
|
|
341
|
+
},
|
|
342
|
+
];
|
|
343
|
+
|
|
344
|
+
function UserTable({ users }) {
|
|
345
|
+
return (
|
|
346
|
+
<ResponsiveTable
|
|
347
|
+
data={users}
|
|
348
|
+
columns={columns}
|
|
349
|
+
keyExtractor={(user) => user.id}
|
|
350
|
+
onRowClick={(user) => console.log(user)}
|
|
351
|
+
/>
|
|
352
|
+
);
|
|
353
|
+
}
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
## Component Documentation
|
|
357
|
+
|
|
358
|
+
For detailed component documentation, see [`docs/COMPONENTS.md`](./docs/COMPONENTS.md) and [`docs/COMPONENT_CATEGORIES.md`](./docs/COMPONENT_CATEGORIES.md).
|
|
359
|
+
|
|
360
|
+
## Dependencies
|
|
361
|
+
|
|
362
|
+
### Peer Dependencies
|
|
363
|
+
- `react` ^19.2.3
|
|
364
|
+
- `react-dom` ^19.2.3
|
|
365
|
+
|
|
366
|
+
### Direct Dependencies
|
|
367
|
+
- Radix UI primitives (for accessibility and behavior)
|
|
368
|
+
- `lucide-react` (for icons)
|
|
369
|
+
- `sonner` (for toast notifications)
|
|
370
|
+
- `class-variance-authority` (for variant management)
|
|
371
|
+
- `clsx` & `tailwind-merge` (for class name utilities)
|
|
372
|
+
|
|
373
|
+
## Development
|
|
374
|
+
|
|
375
|
+
### Building
|
|
376
|
+
|
|
377
|
+
```bash
|
|
378
|
+
pnpm build
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
This compiles TypeScript to the `dist/` directory with declaration files and source maps.
|
|
382
|
+
|
|
383
|
+
### Type Checking
|
|
384
|
+
|
|
385
|
+
```bash
|
|
386
|
+
pnpm type-check
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
### Cleaning Build Output
|
|
390
|
+
|
|
391
|
+
```bash
|
|
392
|
+
pnpm clean
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
## Publishing
|
|
396
|
+
|
|
397
|
+
### Automatic CI/CD Release (Recommended)
|
|
398
|
+
|
|
399
|
+
**Everything is handled automatically by GitHub Actions!** Just push to `main`:
|
|
400
|
+
|
|
401
|
+
1. **Make changes and commit** using [Conventional Commits](https://www.conventionalcommits.org/):
|
|
402
|
+
```bash
|
|
403
|
+
git commit -m "feat: add new component"
|
|
404
|
+
git push origin main
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
2. **CI automatically:**
|
|
408
|
+
- Detects version bump type from commits
|
|
409
|
+
- Bumps version in package.json
|
|
410
|
+
- Updates CHANGELOG.md
|
|
411
|
+
- Builds the package
|
|
412
|
+
- Publishes to npm registry as public package
|
|
413
|
+
- Creates git tag and GitHub release
|
|
414
|
+
|
|
415
|
+
**No manual steps required!**
|
|
416
|
+
|
|
417
|
+
### Version Bump Detection
|
|
418
|
+
|
|
419
|
+
CI analyzes commit messages since the last tag:
|
|
420
|
+
|
|
421
|
+
- `feat:` or `feature:` → **Minor** bump (0.1.0 → 0.2.0)
|
|
422
|
+
- `fix:` or `bugfix:` → **Patch** bump (0.1.0 → 0.1.1)
|
|
423
|
+
- `breaking:` or `BREAKING:` → **Major** bump (0.1.0 → 1.0.0)
|
|
424
|
+
- Other commits → **Patch** bump (default)
|
|
425
|
+
|
|
426
|
+
### Manual Release (if needed)
|
|
427
|
+
|
|
428
|
+
If you need to manually trigger a release:
|
|
429
|
+
|
|
430
|
+
1. Go to **Actions** → **Release** workflow
|
|
431
|
+
2. Click **"Run workflow"**
|
|
432
|
+
3. Optionally select version type (or leave empty for auto-detect)
|
|
433
|
+
4. CI handles everything
|
|
434
|
+
|
|
435
|
+
### Local Development Helpers
|
|
436
|
+
|
|
437
|
+
For local testing and preview:
|
|
438
|
+
|
|
439
|
+
```bash
|
|
440
|
+
# Check version status and suggested bump
|
|
441
|
+
pnpm version:info
|
|
442
|
+
|
|
443
|
+
# Auto-detect version bump (preview only)
|
|
444
|
+
pnpm version:auto
|
|
445
|
+
|
|
446
|
+
# Manual version bump (for testing)
|
|
447
|
+
pnpm version:patch
|
|
448
|
+
pnpm version:minor
|
|
449
|
+
pnpm version:major
|
|
450
|
+
|
|
451
|
+
# Update changelog manually (for testing)
|
|
452
|
+
pnpm changelog:update
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
### Manual Publishing (if needed)
|
|
456
|
+
|
|
457
|
+
Only if you need to publish manually:
|
|
458
|
+
|
|
459
|
+
1. **Set npm token:**
|
|
460
|
+
```bash
|
|
461
|
+
export NPM_TOKEN=your_npm_token
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
2. **Build and publish:**
|
|
465
|
+
```bash
|
|
466
|
+
pnpm build:clean
|
|
467
|
+
pnpm publish:npm
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
Or use npm directly:
|
|
471
|
+
```bash
|
|
472
|
+
npm publish --access public
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
### Conventional Commits Format
|
|
476
|
+
|
|
477
|
+
Use this format for automatic version detection:
|
|
478
|
+
|
|
479
|
+
```
|
|
480
|
+
<type>(<scope>): <description>
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
**Examples:**
|
|
484
|
+
```bash
|
|
485
|
+
git commit -m "feat: add new card component"
|
|
486
|
+
git commit -m "fix(button): resolve hover state issue"
|
|
487
|
+
git commit -m "breaking: remove deprecated API"
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
**Supported types:**
|
|
491
|
+
- `feat:` / `feature:` - New features (minor bump)
|
|
492
|
+
- `fix:` / `bugfix:` - Bug fixes (patch bump)
|
|
493
|
+
- `breaking:` - Breaking changes (major bump)
|
|
494
|
+
- `docs:`, `style:`, `refactor:`, `perf:`, `test:`, `chore:`, `build:`, `ci:` - No version bump
|
|
495
|
+
|
|
496
|
+
## Architecture
|
|
497
|
+
|
|
498
|
+
### Package Structure
|
|
499
|
+
|
|
500
|
+
```
|
|
501
|
+
at-design/
|
|
502
|
+
├── src/
|
|
503
|
+
│ ├── components/ # All 29 UI components
|
|
504
|
+
│ ├── styles/ # CSS tokens, animations, base styles
|
|
505
|
+
│ │ ├── tokens.css # Theme-agnostic CSS variables
|
|
506
|
+
│ │ ├── animations.css # Keyframe animations
|
|
507
|
+
│ │ └── base.css # Base global styles
|
|
508
|
+
│ ├── utils/ # Utility functions
|
|
509
|
+
│ │ └── cn.ts # Class name utility
|
|
510
|
+
│ └── index.ts # Main export file
|
|
511
|
+
├── docs/
|
|
512
|
+
│ ├── COMPONENTS.md # Component documentation
|
|
513
|
+
│ └── COMPONENT_CATEGORIES.md # Component categories
|
|
514
|
+
├── dist/ # Build output (generated)
|
|
515
|
+
├── package.json
|
|
516
|
+
├── tsconfig.json
|
|
517
|
+
└── README.md
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
### Design Principles
|
|
521
|
+
|
|
522
|
+
1. **Theme-Agnostic**: All styling uses CSS variables that can be overridden
|
|
523
|
+
2. **Accessible**: Built on Radix UI primitives for full accessibility
|
|
524
|
+
3. **Composable**: Components work together seamlessly
|
|
525
|
+
4. **Type-Safe**: Full TypeScript support with proper types
|
|
526
|
+
5. **Apple-Inspired**: Clean, minimal design with smooth animations
|
|
527
|
+
|
|
528
|
+
## License
|
|
529
|
+
|
|
530
|
+
MIT
|
|
531
|
+
|
|
532
|
+
## Links
|
|
533
|
+
|
|
534
|
+
- **GitHub Repository:** [https://github.com/sayanmohsin/at-design](https://github.com/sayanmohsin/at-design)
|
|
535
|
+
- **npm Package (Private):** [@ancatag/at-design](https://www.npmjs.com/package/@ancatag/at-design)
|
|
536
|
+
|
|
537
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const Sheet: React.FC<SheetPrimitive.DialogProps>;
|
|
4
|
+
declare const SheetTrigger: React.ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const SheetContent: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
7
|
+
side?: "left" | "right" | "top" | "bottom";
|
|
8
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const SheetHeader: {
|
|
10
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
declare const SheetFooter: {
|
|
14
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
declare const SheetTitle: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
18
|
+
declare const SheetDescription: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
19
|
+
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|
|
20
|
+
//# sourceMappingURL=Sheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sheet.d.ts","sourceRoot":"","sources":["../../src/components/Sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,KAAK,sCAAsB,CAAC;AAElC,QAAA,MAAM,YAAY,6GAAyB,CAAC;AAE5C,QAAA,MAAM,UAAU,2GAAuB,CAAC;AAmBxC,QAAA,MAAM,YAAY;WAGT,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ;wCAwB1C,CAAC;AAGH,QAAA,MAAM,WAAW;8BAGd,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAKtC,CAAC;AAGF,QAAA,MAAM,WAAW;8BAGd,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAC;AAGF,QAAA,MAAM,UAAU,mKASd,CAAC;AAGH,QAAA,MAAM,gBAAgB,6KASpB,CAAC;AAGH,OAAO,EACN,KAAK,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,WAAW,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,GAChB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../utils/cn";
|
|
5
|
+
const Sheet = SheetPrimitive.Root;
|
|
6
|
+
const SheetTrigger = SheetPrimitive.Trigger;
|
|
7
|
+
const SheetClose = SheetPrimitive.Close;
|
|
8
|
+
const SheetPortal = SheetPrimitive.Portal;
|
|
9
|
+
const SheetOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(SheetPrimitive.Overlay, { ref: ref, className: cn("fixed inset-0 z-50 bg-black/40 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className), ...props })));
|
|
10
|
+
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
11
|
+
const SheetContent = React.forwardRef(({ side = "left", className, children, ...props }, ref) => (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsx(SheetPrimitive.Content, { ref: ref, className: cn("fixed z-50 gap-4 bg-card p-6 shadow-lg transition ease-out data-[state=open]:animate-in data-[state=closed]:animate-out", side === "left" &&
|
|
12
|
+
"inset-y-0 left-0 w-80 data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left border-r border-border", side === "right" &&
|
|
13
|
+
"inset-y-0 right-0 w-80 data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right border-l border-border", side === "top" &&
|
|
14
|
+
"inset-x-0 top-0 h-1/3 data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top border-b border-border", side === "bottom" &&
|
|
15
|
+
"inset-x-0 bottom-0 h-1/3 data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom border-t border-border", className), ...props, children: children })] })));
|
|
16
|
+
SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
17
|
+
const SheetHeader = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col space-y-2 text-left", className), ...props }));
|
|
18
|
+
SheetHeader.displayName = "SheetHeader";
|
|
19
|
+
const SheetFooter = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props }));
|
|
20
|
+
SheetFooter.displayName = "SheetFooter";
|
|
21
|
+
const SheetTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(SheetPrimitive.Title, { ref: ref, className: cn("text-lg font-semibold text-foreground", className), ...props })));
|
|
22
|
+
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
23
|
+
const SheetDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(SheetPrimitive.Description, { ref: ref, className: cn("text-sm text-muted-foreground", className), ...props })));
|
|
24
|
+
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
25
|
+
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|
|
26
|
+
//# sourceMappingURL=Sheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sheet.js","sourceRoot":"","sources":["../../src/components/Sheet.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,cAAc,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC,MAAM,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC;AAElC,MAAM,YAAY,GAAG,cAAc,CAAC,OAAO,CAAC;AAE5C,MAAM,UAAU,GAAG,cAAc,CAAC,KAAK,CAAC;AAExC,MAAM,WAAW,GAAG,cAAc,CAAC,MAAM,CAAC;AAE1C,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAGnC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnC,KAAC,cAAc,CAAC,OAAO,IACtB,GAAG,EAAE,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AAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnC,KAAC,cAAc,CAAC,KAAK,IACpB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,uCAAuC,EAAE,SAAS,CAAC,KAC7D,KAAK,GACR,CACF,CAAC,CAAC;AACH,UAAU,CAAC,WAAW,GAAG,cAAc,CAAC,KAAK,CAAC,WAAW,CAAC;AAE1D,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAGvC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnC,KAAC,cAAc,CAAC,WAAW,IAC1B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,GACR,CACF,CAAC,CAAC;AACH,gBAAgB,CAAC,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC,WAAW,CAAC;AAEtE,OAAO,EACN,KAAK,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,WAAW,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,GAChB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
4
|
+
declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
|
|
6
|
+
declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const AlertDialogHeader: {
|
|
9
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
declare const AlertDialogFooter: {
|
|
13
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
declare const AlertDialogTitle: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
17
|
+
declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
18
|
+
declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
|
|
21
|
+
//# sourceMappingURL=alert-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../src/components/alert-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,WAAW,iDAA4B,CAAC;AAE9C,QAAA,MAAM,kBAAkB,wHAA+B,CAAC;AAExD,QAAA,MAAM,iBAAiB,uDAA8B,CAAC;AAEtD,QAAA,MAAM,kBAAkB,wKAYtB,CAAC;AAGH,QAAA,MAAM,kBAAkB,wKAetB,CAAC;AAGH,QAAA,MAAM,iBAAiB;8BAGpB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAC;AAGF,QAAA,MAAM,iBAAiB;8BAGpB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAC;AAGF,QAAA,MAAM,gBAAgB,8KASpB,CAAC;AAGH,QAAA,MAAM,sBAAsB,wLAS1B,CAAC;AAIH,QAAA,MAAM,iBAAiB,6KASrB,CAAC;AAGH,QAAA,MAAM,iBAAiB,6KAarB,CAAC;AAGH,OAAO,EACN,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,GACjB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../utils/cn";
|
|
5
|
+
import { buttonVariants } from "./button";
|
|
6
|
+
const AlertDialog = AlertDialogPrimitive.Root;
|
|
7
|
+
const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
8
|
+
const AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
9
|
+
const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Overlay, { className: cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className), ...props, ref: ref })));
|
|
10
|
+
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
11
|
+
const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Content, { ref: ref, className: cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", className), ...props })] })));
|
|
12
|
+
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
13
|
+
const AlertDialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props }));
|
|
14
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
15
|
+
const AlertDialogFooter = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props }));
|
|
16
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
17
|
+
const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Title, { ref: ref, className: cn("text-lg font-semibold", className), ...props })));
|
|
18
|
+
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
19
|
+
const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Description, { ref: ref, className: cn("text-sm text-muted-foreground", className), ...props })));
|
|
20
|
+
AlertDialogDescription.displayName =
|
|
21
|
+
AlertDialogPrimitive.Description.displayName;
|
|
22
|
+
const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Action, { ref: ref, className: cn(buttonVariants(), className), ...props })));
|
|
23
|
+
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
24
|
+
const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Cancel, { ref: ref, className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className), ...props })));
|
|
25
|
+
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
26
|
+
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
|
|
27
|
+
//# sourceMappingURL=alert-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-dialog.js","sourceRoot":"","sources":["../../src/components/alert-dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,WAAW,GAAG,oBAAoB,CAAC,IAAI,CAAC;AAE9C,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,OAAO,CAAC;AAExD,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,MAAM,CAAC;AAEtD,MAAM,kBAAkB,GAAG,KAAK,CAAC,UAAU,CAGzC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnC,KAAC,oBAAoB,CAAC,OAAO,IAC5B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iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,GACjB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
7
|
+
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
8
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
9
|
+
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/components/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmB/B,QAAA,MAAM,KAAK;;sHAUT,CAAC;AAGH,QAAA,MAAM,UAAU,uHASd,CAAC;AAGH,QAAA,MAAM,gBAAgB,yHASpB,CAAC;AAGH,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC"}
|