@revathi_kanakapathy/storybook 0.3.3
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 +378 -0
- package/dist/components/charts/AreaChart/AreaChart.d.ts +7 -0
- package/dist/components/charts/BarChart/BarChart.d.ts +19 -0
- package/dist/components/charts/LineChart/LineChart.d.ts +20 -0
- package/dist/components/charts/PieChart/PieChart.d.ts +14 -0
- package/dist/components/charts/RadarChart/RadarChart.d.ts +7 -0
- package/dist/components/charts/ScatterChart/ScatterChart.d.ts +7 -0
- package/dist/components/charts/index.d.ts +6 -0
- package/dist/components/ui/Accordion/Accordion.d.ts +27 -0
- package/dist/components/ui/Alert/Alert.d.ts +29 -0
- package/dist/components/ui/Badge/Badge.d.ts +5 -0
- package/dist/components/ui/Breadcrumb/Breadcrumb.d.ts +48 -0
- package/dist/components/ui/Button/Button.d.ts +23 -0
- package/dist/components/ui/Card/Card.d.ts +7 -0
- package/dist/components/ui/Checkbox/Checkbox.d.ts +30 -0
- package/dist/components/ui/Input/Input.d.ts +2 -0
- package/dist/components/ui/Label/Label.d.ts +2 -0
- package/dist/components/ui/Textarea/Textarea.d.ts +2 -0
- package/dist/components/ui/Toast/Toast.d.ts +42 -0
- package/dist/components/ui/index.d.ts +6 -0
- package/dist/components.es.js +3265 -0
- package/dist/components.umd.js +1 -0
- package/dist/fonts/recoleta/Recoleta-Black.eot +0 -0
- package/dist/fonts/recoleta/Recoleta-Black.ttf +0 -0
- package/dist/fonts/recoleta/Recoleta-Black.woff +0 -0
- package/dist/fonts/recoleta/Recoleta-Black.woff2 +0 -0
- package/dist/fonts/recoleta/Recoleta-Bold.eot +0 -0
- package/dist/fonts/recoleta/Recoleta-Bold.ttf +0 -0
- package/dist/fonts/recoleta/Recoleta-Bold.woff +0 -0
- package/dist/fonts/recoleta/Recoleta-Bold.woff2 +0 -0
- package/dist/fonts/recoleta/Recoleta-Light.eot +0 -0
- package/dist/fonts/recoleta/Recoleta-Light.ttf +0 -0
- package/dist/fonts/recoleta/Recoleta-Light.woff +0 -0
- package/dist/fonts/recoleta/Recoleta-Light.woff2 +0 -0
- package/dist/fonts/recoleta/Recoleta-Medium.eot +0 -0
- package/dist/fonts/recoleta/Recoleta-Medium.ttf +0 -0
- package/dist/fonts/recoleta/Recoleta-Medium.woff +0 -0
- package/dist/fonts/recoleta/Recoleta-Medium.woff2 +0 -0
- package/dist/fonts/recoleta/Recoleta-Regular.eot +0 -0
- package/dist/fonts/recoleta/Recoleta-Regular.ttf +0 -0
- package/dist/fonts/recoleta/Recoleta-Regular.woff +0 -0
- package/dist/fonts/recoleta/Recoleta-Regular.woff2 +0 -0
- package/dist/fonts/recoleta/Recoleta-SemiBold.eot +0 -0
- package/dist/fonts/recoleta/Recoleta-SemiBold.ttf +0 -0
- package/dist/fonts/recoleta/Recoleta-SemiBold.woff +0 -0
- package/dist/fonts/recoleta/Recoleta-SemiBold.woff2 +0 -0
- package/dist/fonts/recoleta/Recoleta-Thin.eot +0 -0
- package/dist/fonts/recoleta/Recoleta-Thin.ttf +0 -0
- package/dist/fonts/recoleta/Recoleta-Thin.woff +0 -0
- package/dist/fonts/recoleta/Recoleta-Thin.woff2 +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Black.eot +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Black.ttf +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Black.woff +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Black.woff2 +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Bold.eot +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Bold.ttf +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Bold.woff +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Bold.woff2 +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Light.eot +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Light.ttf +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Light.woff +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Light.woff2 +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Medium.eot +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Medium.ttf +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Medium.woff +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Medium.woff2 +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Regular.eot +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Regular.ttf +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Regular.woff +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Regular.woff2 +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-SemiBold.eot +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-SemiBold.ttf +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-SemiBold.woff +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-SemiBold.woff2 +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Thin.eot +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Thin.ttf +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Thin.woff +0 -0
- package/dist/fonts/recoleta/RecoletaAlt-Thin.woff2 +0 -0
- package/dist/fonts/recoleta/demo.html +573 -0
- package/dist/fonts/recoleta/stylesheet.css +168 -0
- package/dist/index.d.ts +7 -0
- package/dist/lib/utils.d.ts +1 -0
- package/dist/storybook.css +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +88 -0
package/README.md
ADDED
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
# @raise/components
|
|
2
|
+
|
|
3
|
+
A comprehensive React component library built with **React**, **Tailwind CSS**, and **shadcn/ui**.
|
|
4
|
+
|
|
5
|
+
## NPM Package Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @raise/components
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Quick Start
|
|
12
|
+
|
|
13
|
+
**IMPORTANT:** You **must** import the CSS file to ensure colors and styles work correctly. The CSS file contains all the CSS custom properties (variables) that define the color palette.
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
import { Button, Card, CardHeader, CardTitle, CardContent } from '@raise/components';
|
|
17
|
+
// ⚠️ REQUIRED: Import the styles to get correct colors
|
|
18
|
+
import '@raise/components/styles.css';
|
|
19
|
+
|
|
20
|
+
function App() {
|
|
21
|
+
return (
|
|
22
|
+
<Card>
|
|
23
|
+
<CardHeader>
|
|
24
|
+
<CardTitle>Welcome</CardTitle>
|
|
25
|
+
</CardHeader>
|
|
26
|
+
<CardContent>
|
|
27
|
+
<Button variant="default">Click Me</Button>
|
|
28
|
+
</CardContent>
|
|
29
|
+
</Card>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
#### CSS Import Options
|
|
35
|
+
|
|
36
|
+
You can import the CSS in different ways depending on your setup:
|
|
37
|
+
|
|
38
|
+
**Option 1 - In your main entry file (recommended):**
|
|
39
|
+
```jsx
|
|
40
|
+
// main.jsx or index.jsx or App.jsx
|
|
41
|
+
import '@raise/components/styles.css';
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Option 2 - In your CSS file:**
|
|
45
|
+
```css
|
|
46
|
+
/* styles/global.css or index.css */
|
|
47
|
+
@import 'raise-components/styles.css';
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Option 3 - In Vite config:**
|
|
51
|
+
```js
|
|
52
|
+
// vite.config.js
|
|
53
|
+
import { defineConfig } from 'vite';
|
|
54
|
+
|
|
55
|
+
export default defineConfig({
|
|
56
|
+
css: {
|
|
57
|
+
preprocessorOptions: {
|
|
58
|
+
css: {
|
|
59
|
+
additionalData: `@import 'raise-components/styles.css';`
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## About
|
|
67
|
+
|
|
68
|
+
A comprehensive, living style guide built with **React**, **Tailwind CSS**, and **shadcn/ui** for the Data Matrix Platform.
|
|
69
|
+
|
|
70
|
+
## Features
|
|
71
|
+
|
|
72
|
+
- **Modern Tech Stack**: React 19, Tailwind CSS 4, Vite 7, Storybook 9
|
|
73
|
+
- **Scalable Architecture**: Well-organized component structure
|
|
74
|
+
- **Developer-Friendly**: Comprehensive documentation and examples
|
|
75
|
+
- **Accessible**: WCAG 2.1 compliant components
|
|
76
|
+
- **Dark Mode**: Full theme support with toggle
|
|
77
|
+
- **Interactive**: Live component playground with Storybook
|
|
78
|
+
|
|
79
|
+
## Tech Stack
|
|
80
|
+
|
|
81
|
+
- **React 19+**: Modern React with hooks
|
|
82
|
+
- **Tailwind CSS 4**: Utility-first CSS framework
|
|
83
|
+
- **shadcn/ui**: High-quality component primitives
|
|
84
|
+
- **Vite**: Lightning-fast build tool
|
|
85
|
+
- **Storybook 9**: Component documentation and testing
|
|
86
|
+
- **class-variance-authority**: Type-safe component variants
|
|
87
|
+
- **lucide-react**: Beautiful icon library
|
|
88
|
+
|
|
89
|
+
## Getting Started
|
|
90
|
+
|
|
91
|
+
### Prerequisites
|
|
92
|
+
|
|
93
|
+
- Node.js 18 or higher
|
|
94
|
+
- npm or yarn
|
|
95
|
+
|
|
96
|
+
### Installation
|
|
97
|
+
|
|
98
|
+
1. Install dependencies:
|
|
99
|
+
```bash
|
|
100
|
+
npm install
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
2. Run Storybook (development):
|
|
104
|
+
```bash
|
|
105
|
+
npm run storybook
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
3. Build Storybook (production):
|
|
109
|
+
```bash
|
|
110
|
+
npm run build-storybook
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
4. Run the React app:
|
|
114
|
+
```bash
|
|
115
|
+
npm run dev
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Project Structure
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
storybook/
|
|
122
|
+
├── .storybook/ # Storybook configuration
|
|
123
|
+
│ ├── main.js # Main config
|
|
124
|
+
│ └── preview.js # Preview config with theme
|
|
125
|
+
├── src/
|
|
126
|
+
│ ├── components/
|
|
127
|
+
│ │ └── ui/ # UI component library
|
|
128
|
+
│ │ ├── Button.jsx
|
|
129
|
+
│ │ ├── Button.stories.jsx
|
|
130
|
+
│ │ ├── Input.jsx
|
|
131
|
+
│ │ ├── Input.stories.jsx
|
|
132
|
+
│ │ ├── Card.jsx
|
|
133
|
+
│ │ ├── Card.stories.jsx
|
|
134
|
+
│ │ ├── Badge.jsx
|
|
135
|
+
│ │ ├── Badge.stories.jsx
|
|
136
|
+
│ │ ├── Label.jsx
|
|
137
|
+
│ │ ├── Label.stories.jsx
|
|
138
|
+
│ │ ├── Textarea.jsx
|
|
139
|
+
│ │ ├── Textarea.stories.jsx
|
|
140
|
+
│ │ └── index.js
|
|
141
|
+
│ ├── lib/
|
|
142
|
+
│ │ └── utils.js # Utility functions (cn helper)
|
|
143
|
+
│ ├── stories/
|
|
144
|
+
│ │ └── docs/ # Documentation MDX files
|
|
145
|
+
│ │ ├── Introduction.mdx
|
|
146
|
+
│ │ ├── GettingStarted.mdx
|
|
147
|
+
│ │ ├── DesignTokens.mdx
|
|
148
|
+
│ │ └── ComponentGuidelines.mdx
|
|
149
|
+
│ └── index.css # Global styles and theme tokens
|
|
150
|
+
├── tailwind.config.js # Tailwind configuration
|
|
151
|
+
├── postcss.config.js # PostCSS configuration
|
|
152
|
+
└── package.json
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Component Library
|
|
156
|
+
|
|
157
|
+
### Core Components
|
|
158
|
+
|
|
159
|
+
#### Button
|
|
160
|
+
Multiple variants and sizes for different use cases:
|
|
161
|
+
- Variants: default, destructive, outline, secondary, ghost, link
|
|
162
|
+
- Sizes: sm, default, lg, icon
|
|
163
|
+
|
|
164
|
+
```jsx
|
|
165
|
+
import { Button } from '@/components/ui';
|
|
166
|
+
|
|
167
|
+
<Button variant="default">Click me</Button>
|
|
168
|
+
<Button variant="destructive">Delete</Button>
|
|
169
|
+
<Button size="lg">Large Button</Button>
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
#### Input
|
|
173
|
+
Text input with label support:
|
|
174
|
+
|
|
175
|
+
```jsx
|
|
176
|
+
import { Input, Label } from '@/components/ui';
|
|
177
|
+
|
|
178
|
+
<div>
|
|
179
|
+
<Label htmlFor="email">Email</Label>
|
|
180
|
+
<Input id="email" type="email" placeholder="Enter email" />
|
|
181
|
+
</div>
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
#### Card
|
|
185
|
+
Content container with header, body, and footer:
|
|
186
|
+
|
|
187
|
+
```jsx
|
|
188
|
+
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '@/components/ui';
|
|
189
|
+
|
|
190
|
+
<Card>
|
|
191
|
+
<CardHeader>
|
|
192
|
+
<CardTitle>Title</CardTitle>
|
|
193
|
+
<CardDescription>Description</CardDescription>
|
|
194
|
+
</CardHeader>
|
|
195
|
+
<CardContent>Content goes here</CardContent>
|
|
196
|
+
<CardFooter>Footer content</CardFooter>
|
|
197
|
+
</Card>
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
#### Badge
|
|
201
|
+
Status indicators and labels:
|
|
202
|
+
|
|
203
|
+
```jsx
|
|
204
|
+
import { Badge } from '@/components/ui';
|
|
205
|
+
|
|
206
|
+
<Badge variant="default">New</Badge>
|
|
207
|
+
<Badge variant="destructive">Error</Badge>
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
#### Textarea
|
|
211
|
+
Multi-line text input:
|
|
212
|
+
|
|
213
|
+
```jsx
|
|
214
|
+
import { Textarea, Label } from '@/components/ui';
|
|
215
|
+
|
|
216
|
+
<div>
|
|
217
|
+
<Label htmlFor="message">Message</Label>
|
|
218
|
+
<Textarea id="message" placeholder="Enter message" />
|
|
219
|
+
</div>
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
#### Label
|
|
223
|
+
Form field labels:
|
|
224
|
+
|
|
225
|
+
```jsx
|
|
226
|
+
import { Label } from '@/components/ui';
|
|
227
|
+
|
|
228
|
+
<Label htmlFor="username">Username</Label>
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## Theming
|
|
232
|
+
|
|
233
|
+
The design system uses CSS custom properties for theming, making it easy to customize colors and other design tokens.
|
|
234
|
+
|
|
235
|
+
### Theme Variables
|
|
236
|
+
|
|
237
|
+
Edit `src/index.css` to customize theme colors:
|
|
238
|
+
|
|
239
|
+
```css
|
|
240
|
+
:root {
|
|
241
|
+
--background: 0 0% 100%;
|
|
242
|
+
--foreground: 222.2 84% 4.9%;
|
|
243
|
+
--primary: 221.2 83.2% 53.3%;
|
|
244
|
+
/* ... more variables */
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.dark {
|
|
248
|
+
--background: 222.2 84% 4.9%;
|
|
249
|
+
--foreground: 210 40% 98%;
|
|
250
|
+
/* ... dark mode overrides */
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Tailwind Configuration
|
|
255
|
+
|
|
256
|
+
Customize Tailwind in `tailwind.config.js`:
|
|
257
|
+
|
|
258
|
+
```js
|
|
259
|
+
export default {
|
|
260
|
+
theme: {
|
|
261
|
+
extend: {
|
|
262
|
+
colors: {
|
|
263
|
+
primary: {
|
|
264
|
+
DEFAULT: "hsl(var(--primary))",
|
|
265
|
+
foreground: "hsl(var(--primary-foreground))",
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
## Storybook Features
|
|
274
|
+
|
|
275
|
+
### Addons Included
|
|
276
|
+
|
|
277
|
+
- **@storybook/addon-docs**: Auto-generated documentation
|
|
278
|
+
- **@storybook/addon-a11y**: Accessibility testing
|
|
279
|
+
- **@storybook/addon-vitest**: Component testing
|
|
280
|
+
- **storybook-dark-mode**: Dark/light theme toggle
|
|
281
|
+
- **@storybook/addon-onboarding**: Interactive tutorial
|
|
282
|
+
|
|
283
|
+
### Documentation
|
|
284
|
+
|
|
285
|
+
Comprehensive documentation is available in Storybook:
|
|
286
|
+
|
|
287
|
+
1. **Introduction**: Overview of the design system
|
|
288
|
+
2. **Getting Started**: Setup and usage guide
|
|
289
|
+
3. **Design Tokens**: Color palette, typography, spacing
|
|
290
|
+
4. **Component Guidelines**: Best practices and examples
|
|
291
|
+
|
|
292
|
+
## Usage in Your Project
|
|
293
|
+
|
|
294
|
+
### Import Components
|
|
295
|
+
|
|
296
|
+
```jsx
|
|
297
|
+
import { Button, Card, Input, Label, Badge, Textarea } from '@/components/ui';
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### Using the cn Utility
|
|
301
|
+
|
|
302
|
+
The `cn` utility combines class names efficiently:
|
|
303
|
+
|
|
304
|
+
```jsx
|
|
305
|
+
import { cn } from '@/lib/utils';
|
|
306
|
+
|
|
307
|
+
<Button className={cn("w-full", isActive && "ring-2")}>
|
|
308
|
+
Button
|
|
309
|
+
</Button>
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
## Accessibility
|
|
313
|
+
|
|
314
|
+
All components are built with accessibility in mind:
|
|
315
|
+
|
|
316
|
+
- Semantic HTML elements
|
|
317
|
+
- ARIA attributes where needed
|
|
318
|
+
- Keyboard navigation support
|
|
319
|
+
- Focus management
|
|
320
|
+
- Screen reader compatibility
|
|
321
|
+
- Color contrast compliance
|
|
322
|
+
|
|
323
|
+
## Browser Support
|
|
324
|
+
|
|
325
|
+
- Chrome (latest)
|
|
326
|
+
- Firefox (latest)
|
|
327
|
+
- Safari (latest)
|
|
328
|
+
- Edge (latest)
|
|
329
|
+
|
|
330
|
+
## Scripts
|
|
331
|
+
|
|
332
|
+
```bash
|
|
333
|
+
# Start Storybook
|
|
334
|
+
npm run storybook
|
|
335
|
+
|
|
336
|
+
# Build Storybook for deployment
|
|
337
|
+
npm run build-storybook
|
|
338
|
+
|
|
339
|
+
# Run React app
|
|
340
|
+
npm run dev
|
|
341
|
+
|
|
342
|
+
# Build React app
|
|
343
|
+
npm run build
|
|
344
|
+
|
|
345
|
+
# Preview production build
|
|
346
|
+
npm run preview
|
|
347
|
+
|
|
348
|
+
# Lint code
|
|
349
|
+
npm run lint
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
## Contributing
|
|
353
|
+
|
|
354
|
+
1. Create a new component in `src/components/ui/`
|
|
355
|
+
2. Add corresponding `.stories.jsx` file
|
|
356
|
+
3. Export component from `src/components/ui/index.js`
|
|
357
|
+
4. Update documentation if needed
|
|
358
|
+
5. Test in Storybook
|
|
359
|
+
|
|
360
|
+
## Best Practices
|
|
361
|
+
|
|
362
|
+
1. **Use Semantic HTML**: Choose appropriate HTML elements
|
|
363
|
+
2. **Accessibility First**: Include ARIA labels and keyboard support
|
|
364
|
+
3. **Consistent Styling**: Use design tokens and Tailwind utilities
|
|
365
|
+
4. **Document Everything**: Add stories and documentation for new components
|
|
366
|
+
5. **Test Thoroughly**: Test components in different states and themes
|
|
367
|
+
|
|
368
|
+
## License
|
|
369
|
+
|
|
370
|
+
[Your License Here]
|
|
371
|
+
|
|
372
|
+
## Support
|
|
373
|
+
|
|
374
|
+
For questions or issues, please [open an issue](https://github.com/your-repo/issues).
|
|
375
|
+
|
|
376
|
+
---
|
|
377
|
+
|
|
378
|
+
Built with ❤️ for the Data Matrix Platform
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BarChart component for displaying categorical data with bars
|
|
3
|
+
*
|
|
4
|
+
* @component
|
|
5
|
+
* @example
|
|
6
|
+
* const data = [
|
|
7
|
+
* { category: 'A', value: 4000 },
|
|
8
|
+
* { category: 'B', value: 3000 },
|
|
9
|
+
* ];
|
|
10
|
+
*
|
|
11
|
+
* <BarChart
|
|
12
|
+
* data={data}
|
|
13
|
+
* bars={[
|
|
14
|
+
* { dataKey: 'value', fill: '#3b82f6', name: 'Sales' },
|
|
15
|
+
* ]}
|
|
16
|
+
* />
|
|
17
|
+
*/
|
|
18
|
+
export const BarChart: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
19
|
+
import * as React from "react";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LineChart component for displaying time-series or sequential data
|
|
3
|
+
*
|
|
4
|
+
* @component
|
|
5
|
+
* @example
|
|
6
|
+
* const data = [
|
|
7
|
+
* { name: 'Jan', sales: 4000, revenue: 2400 },
|
|
8
|
+
* { name: 'Feb', sales: 3000, revenue: 1398 },
|
|
9
|
+
* ];
|
|
10
|
+
*
|
|
11
|
+
* <LineChart
|
|
12
|
+
* data={data}
|
|
13
|
+
* lines={[
|
|
14
|
+
* { dataKey: 'sales', stroke: '#3b82f6', name: 'Sales' },
|
|
15
|
+
* { dataKey: 'revenue', stroke: '#10b981', name: 'Revenue' },
|
|
16
|
+
* ]}
|
|
17
|
+
* />
|
|
18
|
+
*/
|
|
19
|
+
export const LineChart: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
20
|
+
import * as React from "react";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PieChart component for displaying proportional data
|
|
3
|
+
*
|
|
4
|
+
* @component
|
|
5
|
+
* @example
|
|
6
|
+
* const data = [
|
|
7
|
+
* { name: 'Category A', value: 400 },
|
|
8
|
+
* { name: 'Category B', value: 300 },
|
|
9
|
+
* ];
|
|
10
|
+
*
|
|
11
|
+
* <PieChart data={data} />
|
|
12
|
+
*/
|
|
13
|
+
export const PieChart: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
14
|
+
import * as React from "react";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { LineChart } from "./LineChart/LineChart";
|
|
2
|
+
export { BarChart } from "./BarChart/BarChart";
|
|
3
|
+
export { PieChart } from "./PieChart/PieChart";
|
|
4
|
+
export { AreaChart } from "./AreaChart/AreaChart";
|
|
5
|
+
export { ScatterChart } from "./ScatterChart/ScatterChart";
|
|
6
|
+
export { RadarChart } from "./RadarChart/RadarChart";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accordion component for expandable/collapsible content sections
|
|
3
|
+
*
|
|
4
|
+
* @component
|
|
5
|
+
* @example
|
|
6
|
+
* // Basic usage
|
|
7
|
+
* <Accordion>
|
|
8
|
+
* <AccordionItem value="item-1">
|
|
9
|
+
* <AccordionTrigger>Is it accessible?</AccordionTrigger>
|
|
10
|
+
* <AccordionContent>Yes. It adheres to the WAI-ARIA design pattern.</AccordionContent>
|
|
11
|
+
* </AccordionItem>
|
|
12
|
+
* </Accordion>
|
|
13
|
+
*/
|
|
14
|
+
export const Accordion: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
15
|
+
/**
|
|
16
|
+
* AccordionItem component - represents a single accordion item
|
|
17
|
+
*/
|
|
18
|
+
export const AccordionItem: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
19
|
+
/**
|
|
20
|
+
* AccordionTrigger component - the clickable header of an accordion item
|
|
21
|
+
*/
|
|
22
|
+
export const AccordionTrigger: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
23
|
+
/**
|
|
24
|
+
* AccordionContent component - the expandable content of an accordion item
|
|
25
|
+
*/
|
|
26
|
+
export const AccordionContent: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
27
|
+
import * as React from "react";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Alert component for displaying important messages and notifications
|
|
3
|
+
*
|
|
4
|
+
* @component
|
|
5
|
+
* @example
|
|
6
|
+
* // Basic usage
|
|
7
|
+
* <Alert variant="info">
|
|
8
|
+
* <AlertTitle>Heads up!</AlertTitle>
|
|
9
|
+
* <AlertDescription>You can add components to your app.</AlertDescription>
|
|
10
|
+
* </Alert>
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // With custom icon
|
|
14
|
+
* <Alert variant="success">
|
|
15
|
+
* <CheckCircle className="h-4 w-4" />
|
|
16
|
+
* <AlertTitle>Success!</AlertTitle>
|
|
17
|
+
* <AlertDescription>Your changes have been saved.</AlertDescription>
|
|
18
|
+
* </Alert>
|
|
19
|
+
*/
|
|
20
|
+
export const Alert: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
21
|
+
/**
|
|
22
|
+
* AlertTitle component - renders the title of an alert
|
|
23
|
+
*/
|
|
24
|
+
export const AlertTitle: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
25
|
+
/**
|
|
26
|
+
* AlertDescription component - renders the description text of an alert
|
|
27
|
+
*/
|
|
28
|
+
export const AlertDescription: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
29
|
+
import * as React from "react";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export const Badge: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
2
|
+
export const badgeVariants: (props?: {
|
|
3
|
+
variant?: "default" | "destructive" | "outline" | "secondary";
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
5
|
+
import * as React from "react";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Breadcrumb component for navigation hierarchy
|
|
3
|
+
*
|
|
4
|
+
* @component
|
|
5
|
+
* @example
|
|
6
|
+
* // Basic usage
|
|
7
|
+
* <Breadcrumb>
|
|
8
|
+
* <BreadcrumbList>
|
|
9
|
+
* <BreadcrumbItem>
|
|
10
|
+
* <BreadcrumbLink href="/">Home</BreadcrumbLink>
|
|
11
|
+
* </BreadcrumbItem>
|
|
12
|
+
* <BreadcrumbSeparator />
|
|
13
|
+
* <BreadcrumbItem>
|
|
14
|
+
* <BreadcrumbLink href="/products">Products</BreadcrumbLink>
|
|
15
|
+
* </BreadcrumbItem>
|
|
16
|
+
* <BreadcrumbSeparator />
|
|
17
|
+
* <BreadcrumbItem>
|
|
18
|
+
* <BreadcrumbPage>Current Page</BreadcrumbPage>
|
|
19
|
+
* </BreadcrumbItem>
|
|
20
|
+
* </BreadcrumbList>
|
|
21
|
+
* </Breadcrumb>
|
|
22
|
+
*/
|
|
23
|
+
export const Breadcrumb: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
24
|
+
/**
|
|
25
|
+
* BreadcrumbList component - container for breadcrumb items
|
|
26
|
+
*/
|
|
27
|
+
export const BreadcrumbList: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
28
|
+
/**
|
|
29
|
+
* BreadcrumbItem component - individual breadcrumb item
|
|
30
|
+
*/
|
|
31
|
+
export const BreadcrumbItem: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
32
|
+
/**
|
|
33
|
+
* BreadcrumbLink component - clickable breadcrumb link
|
|
34
|
+
*/
|
|
35
|
+
export const BreadcrumbLink: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
36
|
+
/**
|
|
37
|
+
* BreadcrumbPage component - current page (non-clickable)
|
|
38
|
+
*/
|
|
39
|
+
export const BreadcrumbPage: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
40
|
+
/**
|
|
41
|
+
* BreadcrumbSeparator component - separator between breadcrumb items
|
|
42
|
+
*/
|
|
43
|
+
export const BreadcrumbSeparator: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
44
|
+
/**
|
|
45
|
+
* BreadcrumbEllipsis component - ellipsis for collapsed items
|
|
46
|
+
*/
|
|
47
|
+
export const BreadcrumbEllipsis: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
48
|
+
import * as React from "react";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Primary UI component for user interaction
|
|
3
|
+
*
|
|
4
|
+
* @component
|
|
5
|
+
* @example
|
|
6
|
+
* // Basic usage
|
|
7
|
+
* <Button>Click me</Button>
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* // With icon
|
|
11
|
+
* <Button icon={<Icon />} iconAlign="left">Submit</Button>
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* // Custom variant
|
|
15
|
+
* <Button variant="destructive" size="lg">Delete</Button>
|
|
16
|
+
*/
|
|
17
|
+
export const Button: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
18
|
+
export const buttonVariants: (props?: {
|
|
19
|
+
variant?: "inverted" | "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "success" | "warning" | "info";
|
|
20
|
+
size?: "icon" | "default" | "sm" | "lg" | "xl" | "icon-sm" | "icon-lg";
|
|
21
|
+
rounded?: boolean | "md" | "sm" | "lg" | "xl" | "full";
|
|
22
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
23
|
+
import * as React from "react";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const Card: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
2
|
+
export const CardHeader: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
3
|
+
export const CardFooter: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
4
|
+
export const CardTitle: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
5
|
+
export const CardDescription: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
6
|
+
export const CardContent: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
7
|
+
import * as React from "react";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checkbox component for boolean input
|
|
3
|
+
*
|
|
4
|
+
* @component
|
|
5
|
+
* @example
|
|
6
|
+
* // Basic usage
|
|
7
|
+
* <Checkbox id="terms" />
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* // With label
|
|
11
|
+
* <div className="flex items-center space-x-2">
|
|
12
|
+
* <Checkbox id="terms" />
|
|
13
|
+
* <label htmlFor="terms">Accept terms and conditions</label>
|
|
14
|
+
* </div>
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // Controlled
|
|
18
|
+
* const [checked, setChecked] = useState(false)
|
|
19
|
+
* <Checkbox checked={checked} onCheckedChange={setChecked} />
|
|
20
|
+
*/
|
|
21
|
+
export const Checkbox: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
22
|
+
/**
|
|
23
|
+
* CheckboxGroup component for managing multiple checkboxes
|
|
24
|
+
*/
|
|
25
|
+
export const CheckboxGroup: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
26
|
+
/**
|
|
27
|
+
* CheckboxWithLabel component - Checkbox with integrated label
|
|
28
|
+
*/
|
|
29
|
+
export const CheckboxWithLabel: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
30
|
+
import * as React from "react";
|