@arolariu/components 0.0.9 → 0.0.11

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.
Files changed (54) hide show
  1. package/dist/cjs/components/ui/carousel.js +1 -1
  2. package/dist/cjs/components/ui/menubar.js +1 -1
  3. package/dist/cjs/components/ui/pagination.js +1 -1
  4. package/dist/cjs/components/ui/popover.js +1 -1
  5. package/dist/cjs/components/ui/scroll-area.js +1 -1
  6. package/dist/es/components/ui/accordion.js +8 -50
  7. package/dist/es/components/ui/alert-dialog.js +22 -118
  8. package/dist/es/components/ui/alert.js +14 -52
  9. package/dist/es/components/ui/aspect-ratio.js +2 -4
  10. package/dist/es/components/ui/avatar.js +6 -42
  11. package/dist/es/components/ui/badge.js +13 -28
  12. package/dist/es/components/ui/breadcrumb.js +10 -78
  13. package/dist/es/components/ui/button.js +21 -37
  14. package/dist/es/components/ui/calendar.js +29 -52
  15. package/dist/es/components/ui/card.js +6 -51
  16. package/dist/es/components/ui/carousel.js +32 -142
  17. package/dist/es/components/ui/chart.js +42 -169
  18. package/dist/es/components/ui/checkbox.js +2 -23
  19. package/dist/es/components/ui/collapsible.js +6 -24
  20. package/dist/es/components/ui/command.js +18 -136
  21. package/dist/es/components/ui/context-menu.js +30 -187
  22. package/dist/es/components/ui/dialog.js +18 -100
  23. package/dist/es/components/ui/drawer.js +18 -98
  24. package/dist/es/components/ui/dropdown-menu.js +30 -195
  25. package/dist/es/components/ui/form.js +8 -59
  26. package/dist/es/components/ui/hover-card.js +9 -30
  27. package/dist/es/components/ui/input-otp.js +6 -47
  28. package/dist/es/components/ui/input.js +1 -14
  29. package/dist/es/components/ui/label.js +2 -15
  30. package/dist/es/components/ui/menubar.js +47 -228
  31. package/dist/es/components/ui/navigation-menu.js +17 -146
  32. package/dist/es/components/ui/pagination.js +15 -96
  33. package/dist/es/components/ui/popover.js +10 -33
  34. package/dist/es/components/ui/progress.js +2 -24
  35. package/dist/es/components/ui/radio-group.js +4 -35
  36. package/dist/es/components/ui/resizable.js +6 -36
  37. package/dist/es/components/ui/scroll-area.js +4 -51
  38. package/dist/es/components/ui/select.js +21 -142
  39. package/dist/es/components/ui/separator.js +2 -19
  40. package/dist/es/components/ui/sheet.js +17 -99
  41. package/dist/es/components/ui/sidebar.js +112 -512
  42. package/dist/es/components/ui/skeleton.js +1 -8
  43. package/dist/es/components/ui/slider.js +4 -56
  44. package/dist/es/components/ui/sonner.js +7 -15
  45. package/dist/es/components/ui/switch.js +2 -24
  46. package/dist/es/components/ui/table.js +9 -87
  47. package/dist/es/components/ui/tabs.js +8 -54
  48. package/dist/es/components/ui/textarea.js +1 -11
  49. package/dist/es/components/ui/toggle-group.js +9 -48
  50. package/dist/es/components/ui/toggle.js +16 -31
  51. package/dist/es/components/ui/tooltip.js +11 -45
  52. package/dist/umd/arolariu-components.umd.js +2 -2
  53. package/package.json +105 -96
  54. package/readme.md +169 -0
package/package.json CHANGED
@@ -1,10 +1,16 @@
1
1
  {
2
2
  "name": "@arolariu/components",
3
3
  "displayName": "@arolariu/components",
4
- "version": "0.0.9",
4
+ "version": "0.0.11",
5
5
  "description": "A collection of reusable components for React applications.",
6
6
  "homepage": "https://arolariu.ro",
7
- "repository": "git+https://github.com/arolariu/arolariu.ro.git",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/arolariu/arolariu.ro"
10
+ },
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
8
14
  "author": {
9
15
  "name": "Alexandru-Razvan Olariu",
10
16
  "email": "admin@arolariu.ro",
@@ -16,6 +22,7 @@
16
22
  "main": "./dist/cjs/index.js",
17
23
  "module": "./dist/es/index.js",
18
24
  "types": "./dist/types/index.d.ts",
25
+ "source": "./src/index.ts",
19
26
  "files": [
20
27
  "dist"
21
28
  ],
@@ -24,14 +31,108 @@
24
31
  "yarn": ">=4.5"
25
32
  },
26
33
  "keywords": [
34
+ "Component Library",
27
35
  "ReactJS",
28
- "TailwindCSS"
36
+ "TailwindCSS",
37
+ "Radix-UI",
38
+ "ShadCN"
29
39
  ],
40
+ "bugs": {
41
+ "url": "https://github.com/arolariu/arolariu.ro/issues",
42
+ "email": "admin@arolariu.ro"
43
+ },
44
+ "packageManager": "yarn@4.6.0+sha512.5383cc12567a95f1d668fbe762dfe0075c595b4bfff433be478dbbe24e05251a8e8c3eb992a986667c1d53b6c3a9c85b8398c35a960587fbd9fa3a0915406728",
45
+ "scripts": {
46
+ "build": "vite build",
47
+ "clean": "npx tsx scripts/clean.ts",
48
+ "dev": "vite",
49
+ "generate-exports": "npx tsx scripts/generate-exports.ts",
50
+ "preview": "vite preview",
51
+ "storybook": "storybook dev -p 6006",
52
+ "build-storybook": "storybook build"
53
+ },
54
+ "dependencies": {
55
+ "@hookform/resolvers": "^4.1.2",
56
+ "@radix-ui/react-accordion": "^1.2.3",
57
+ "@radix-ui/react-alert-dialog": "^1.1.6",
58
+ "@radix-ui/react-aspect-ratio": "^1.1.2",
59
+ "@radix-ui/react-avatar": "^1.1.3",
60
+ "@radix-ui/react-checkbox": "^1.1.4",
61
+ "@radix-ui/react-collapsible": "^1.1.3",
62
+ "@radix-ui/react-context-menu": "^2.2.6",
63
+ "@radix-ui/react-dialog": "^1.1.6",
64
+ "@radix-ui/react-dropdown-menu": "^2.1.6",
65
+ "@radix-ui/react-hover-card": "^1.1.6",
66
+ "@radix-ui/react-label": "^2.1.2",
67
+ "@radix-ui/react-menubar": "^1.1.6",
68
+ "@radix-ui/react-navigation-menu": "^1.2.5",
69
+ "@radix-ui/react-popover": "^1.1.6",
70
+ "@radix-ui/react-progress": "^1.1.2",
71
+ "@radix-ui/react-radio-group": "^1.2.3",
72
+ "@radix-ui/react-scroll-area": "^1.2.3",
73
+ "@radix-ui/react-select": "^2.1.6",
74
+ "@radix-ui/react-separator": "^1.1.2",
75
+ "@radix-ui/react-slider": "^1.2.3",
76
+ "@radix-ui/react-slot": "^1.1.2",
77
+ "@radix-ui/react-switch": "^1.1.3",
78
+ "@radix-ui/react-tabs": "^1.1.3",
79
+ "@radix-ui/react-toggle": "^1.1.2",
80
+ "@radix-ui/react-toggle-group": "^1.1.2",
81
+ "@radix-ui/react-tooltip": "^1.1.8",
82
+ "class-variance-authority": "^0.7.1",
83
+ "clsx": "2.1.1",
84
+ "cmdk": "1.0.0",
85
+ "date-fns": "^4.1.0",
86
+ "embla-carousel-react": "^8.5.2",
87
+ "input-otp": "^1.4.2",
88
+ "lucide-react": "^0.477.0",
89
+ "next-themes": "^0.4.4",
90
+ "react": "19.0.0",
91
+ "react-day-picker": "8.10.1",
92
+ "react-dom": "19.0.0",
93
+ "react-hook-form": "^7.54.2",
94
+ "react-resizable-panels": "^2.1.7",
95
+ "recharts": "^2.15.1",
96
+ "sonner": "^2.0.1",
97
+ "tailwind-merge": "3.0.2",
98
+ "tailwindcss-animate": "1.0.7",
99
+ "vaul": "^1.1.2",
100
+ "zod": "^3.24.2"
101
+ },
102
+ "peerDependencies": {},
103
+ "devDependencies": {
104
+ "@chromatic-com/storybook": "3.2.5",
105
+ "@storybook/addon-essentials": "8.6.2",
106
+ "@storybook/addon-onboarding": "8.6.2",
107
+ "@storybook/blocks": "8.6.2",
108
+ "@storybook/builder-vite": "8.6.2",
109
+ "@storybook/experimental-addon-test": "8.6.2",
110
+ "@storybook/react": "8.6.2",
111
+ "@storybook/react-vite": "8.6.2",
112
+ "@storybook/test": "8.6.2",
113
+ "@tailwindcss/postcss": "4.0.9",
114
+ "@tailwindcss/vite": "4.0.9",
115
+ "@types/node": "22.13.8",
116
+ "@types/react": "19.0.10",
117
+ "@types/react-dom": "19.0.4",
118
+ "@vitejs/plugin-react": "4.3.4",
119
+ "@vitest/browser": "3.0.7",
120
+ "@vitest/coverage-v8": "3.0.7",
121
+ "daisyui": "5.0.0",
122
+ "playwright": "1.50.1",
123
+ "postcss": "8.5.3",
124
+ "storybook": "8.6.2",
125
+ "tailwindcss": "4.0.9",
126
+ "typescript": "5.8.2",
127
+ "vite": "6.2.0",
128
+ "vite-plugin-dts": "^4.5.1",
129
+ "vitest": "3.0.7"
130
+ },
30
131
  "exports": {
31
132
  ".": {
32
133
  "import": "./dist/es/index.js",
33
134
  "require": "./dist/cjs/index.js",
34
- "types": "./dist/index.d.ts"
135
+ "types": "./dist/types/index.d.ts"
35
136
  },
36
137
  "./accordion": {
37
138
  "import": "./dist/es/components/ui/accordion.js",
@@ -263,97 +364,5 @@
263
364
  "require": "./dist/cjs/components/ui/tooltip.js",
264
365
  "types": "./dist/types/components/ui/tooltip.d.ts"
265
366
  }
266
- },
267
- "bugs": {
268
- "url": "https://github.com/arolariu/arolariu.ro/issues",
269
- "email": "admin@arolariu.ro"
270
- },
271
- "packageManager": "yarn@4.6.0+sha512.5383cc12567a95f1d668fbe762dfe0075c595b4bfff433be478dbbe24e05251a8e8c3eb992a986667c1d53b6c3a9c85b8398c35a960587fbd9fa3a0915406728",
272
- "scripts": {
273
- "build": "tsc && vite build && npm run build:styles",
274
- "build:styles": "postcss ./src/index.css -o ./dist/index.css",
275
- "clean": "npx tsx scripts/clean.ts",
276
- "dev": "vite",
277
- "generate-exports": "npx tsx scripts/generate-exports.ts",
278
- "preview": "vite preview",
279
- "storybook": "storybook dev -p 6006",
280
- "build-storybook": "storybook build"
281
- },
282
- "dependencies": {
283
- "@hookform/resolvers": "^4.1.2",
284
- "@radix-ui/react-accordion": "^1.2.3",
285
- "@radix-ui/react-alert-dialog": "^1.1.6",
286
- "@radix-ui/react-aspect-ratio": "^1.1.2",
287
- "@radix-ui/react-avatar": "^1.1.3",
288
- "@radix-ui/react-checkbox": "^1.1.4",
289
- "@radix-ui/react-collapsible": "^1.1.3",
290
- "@radix-ui/react-context-menu": "^2.2.6",
291
- "@radix-ui/react-dialog": "^1.1.6",
292
- "@radix-ui/react-dropdown-menu": "^2.1.6",
293
- "@radix-ui/react-hover-card": "^1.1.6",
294
- "@radix-ui/react-label": "^2.1.2",
295
- "@radix-ui/react-menubar": "^1.1.6",
296
- "@radix-ui/react-navigation-menu": "^1.2.5",
297
- "@radix-ui/react-popover": "^1.1.6",
298
- "@radix-ui/react-progress": "^1.1.2",
299
- "@radix-ui/react-radio-group": "^1.2.3",
300
- "@radix-ui/react-scroll-area": "^1.2.3",
301
- "@radix-ui/react-select": "^2.1.6",
302
- "@radix-ui/react-separator": "^1.1.2",
303
- "@radix-ui/react-slider": "^1.2.3",
304
- "@radix-ui/react-slot": "^1.1.2",
305
- "@radix-ui/react-switch": "^1.1.3",
306
- "@radix-ui/react-tabs": "^1.1.3",
307
- "@radix-ui/react-toggle": "^1.1.2",
308
- "@radix-ui/react-toggle-group": "^1.1.2",
309
- "@radix-ui/react-tooltip": "^1.1.8",
310
- "class-variance-authority": "^0.7.1",
311
- "clsx": "2.1.1",
312
- "cmdk": "1.0.0",
313
- "date-fns": "^4.1.0",
314
- "embla-carousel-react": "^8.5.2",
315
- "input-otp": "^1.4.2",
316
- "lucide-react": "^0.477.0",
317
- "next-themes": "^0.4.4",
318
- "react": "19.0.0",
319
- "react-day-picker": "8.10.1",
320
- "react-dom": "19.0.0",
321
- "react-hook-form": "^7.54.2",
322
- "react-resizable-panels": "^2.1.7",
323
- "recharts": "^2.15.1",
324
- "sonner": "^2.0.1",
325
- "tailwind-merge": "3.0.2",
326
- "tailwindcss-animate": "1.0.7",
327
- "vaul": "^1.1.2",
328
- "zod": "^3.24.2"
329
- },
330
- "peerDependencies": {},
331
- "devDependencies": {
332
- "@chromatic-com/storybook": "3.2.5",
333
- "@storybook/addon-essentials": "8.6.2",
334
- "@storybook/addon-onboarding": "8.6.2",
335
- "@storybook/blocks": "8.6.2",
336
- "@storybook/builder-vite": "8.6.2",
337
- "@storybook/experimental-addon-test": "8.6.2",
338
- "@storybook/react": "8.6.2",
339
- "@storybook/react-vite": "8.6.2",
340
- "@storybook/test": "8.6.2",
341
- "@tailwindcss/postcss": "4.0.9",
342
- "@tailwindcss/vite": "4.0.9",
343
- "@types/node": "22.13.8",
344
- "@types/react": "19.0.10",
345
- "@types/react-dom": "19.0.4",
346
- "@vitejs/plugin-react": "4.3.4",
347
- "@vitest/browser": "3.0.7",
348
- "@vitest/coverage-v8": "3.0.7",
349
- "daisyui": "5.0.0",
350
- "playwright": "1.50.1",
351
- "postcss": "8.5.3",
352
- "storybook": "8.6.2",
353
- "tailwindcss": "4.0.9",
354
- "typescript": "5.8.2",
355
- "vite": "6.2.0",
356
- "vite-plugin-dts": "^4.5.1",
357
- "vitest": "3.0.7"
358
367
  }
359
368
  }
package/readme.md CHANGED
@@ -0,0 +1,169 @@
1
+ # @arolariu/components
2
+
3
+ ![npm version](https://img.shields.io/npm/v/@arolariu/components)
4
+ ![license](https://img.shields.io/npm/l/@arolariu/components)
5
+ ![bundle size](https://img.shields.io/bundlephobia/minzip/@arolariu/components)
6
+ ![types](https://img.shields.io/npm/types/@arolariu/components)
7
+
8
+ A collection of reusable, accessible UI components for React applications, built on top of [Radix UI](https://www.radix-ui.com/) primitives and inspired by [shadcn/ui](https://ui.shadcn.com/).
9
+
10
+ ## Features
11
+
12
+ - **Fully Tree-Shakeable** - Import only the components you need
13
+ - **TypeScript Support** - Full type definitions for all components
14
+ - **Multiple Module Formats** - ESM, CommonJS, and UMD support
15
+ - **Accessibility** - Built on Radix UI primitives for ARIA compliance
16
+ - **Customizable** - Override styles with Tailwind CSS
17
+ - **Modern** - Designed for React 18+ and modern browsers
18
+ - **Zero Runtime CSS** - Uses Tailwind for styling
19
+ - **Server-Side Rendering Compatible** - Works with Next.js and other SSR frameworks
20
+
21
+ ## Installation
22
+
23
+ ```bash
24
+ # npm
25
+ npm install @arolariu/components
26
+
27
+ # yarn
28
+ yarn add @arolariu/components
29
+
30
+ # pnpm
31
+ pnpm add @arolariu/components
32
+ ```
33
+
34
+ ## Usage
35
+
36
+ ### Basic Import
37
+
38
+ ```tsx
39
+ import { Button } from "@arolariu/components/button";
40
+ import { Card } from "@arolariu/components/card";
41
+
42
+ export default function MyComponent() {
43
+ return (
44
+ <Card>
45
+ <Card.Header>
46
+ <Card.Title>Card Title</Card.Title>
47
+ <Card.Description>Card Description</Card.Description>
48
+ </Card.Header>
49
+ <Card.Footer>
50
+ <Button>Click Me</Button>
51
+ </Card.Footer>
52
+ </Card>
53
+ );
54
+ }
55
+ ```
56
+
57
+ ### Tree-Shaking
58
+
59
+ For optimal bundle size, import components directly:
60
+
61
+ ```tsx
62
+ // ✅ Good: Only imports Button component
63
+ import { Button } from "@arolariu/components/button";
64
+
65
+ // ❌ Avoid: Imports all components
66
+ import { Button } from "@arolariu/components";
67
+ ```
68
+
69
+ ## Available Components
70
+
71
+ This library includes over 30 components, including:
72
+
73
+ - **Layout**: Card, AspectRatio, Separator, Resizable
74
+ - **Inputs**: Button, Input, Textarea, Checkbox, RadioGroup, Select
75
+ - **Navigation**: Breadcrumb, Tabs, NavigationMenu, Sidebar
76
+ - **Overlays**: Dialog, Drawer, Sheet, Popover, Tooltip
77
+ - **Feedback**: Alert, Progress, Skeleton
78
+ - **Data Display**: Table, Calendar, Avatar, Badge
79
+ - **Advanced**: Form, Command, Chart, Carousel
80
+
81
+ ## Component Documentation
82
+
83
+ Each component can be imported individually:
84
+
85
+ ```tsx
86
+ // Buttons
87
+ import { Button, buttonVariants } from "@arolariu/components/button";
88
+
89
+ // Forms
90
+ import { Form } from "@arolariu/components/form";
91
+ import { Input } from "@arolariu/components/input";
92
+
93
+ // Data Display
94
+ import { Table } from "@arolariu/components/table";
95
+ import { Avatar } from "@arolariu/components/avatar";
96
+
97
+ // Overlays
98
+ import { Dialog } from "@arolariu/components/dialog";
99
+ import { Sheet } from "@arolariu/components/sheet";
100
+ ```
101
+
102
+ ## TypeScript Support
103
+
104
+ This library includes comprehensive TypeScript definitions. All components are properly typed with props interfaces:
105
+
106
+ ```tsx
107
+ import { Button } from "@arolariu/components/button";
108
+ import type { ButtonProps } from "@arolariu/components/button";
109
+
110
+ // TypeScript will provide autocomplete and type checking for props
111
+ const MyButton = (props: ButtonProps) => {
112
+ return <Button {...props} />;
113
+ };
114
+ ```
115
+
116
+ ## Server-Side Rendering
117
+
118
+ All components are compatible with server-side rendering frameworks like Next.js:
119
+
120
+ ```tsx
121
+ // Next.js App Router example
122
+ export default function Page() {
123
+ return (
124
+ <div>
125
+ <Button>Server Component Button</Button>
126
+ </div>
127
+ );
128
+ }
129
+
130
+ // For client interactions
131
+ ("use client");
132
+ import { Dialog } from "@arolariu/components/dialog";
133
+ ```
134
+
135
+ ## Browser Support
136
+
137
+ - Chrome/Edge (last 2 versions)
138
+ - Firefox (last 2 versions)
139
+ - Safari (last 2 versions)
140
+
141
+ ## Contributing
142
+
143
+ Contributions are welcome! Please feel free to submit a Pull Request.
144
+
145
+ 1. Fork the repository
146
+ 2. Create your feature branch: `git checkout -b my-new-feature`
147
+ 3. Commit your changes: `git commit -am 'Add some feature'`
148
+ 4. Push to the branch: `git push origin my-new-feature`
149
+ 5. Submit a pull request
150
+
151
+ ## License
152
+
153
+ [MIT](https://choosealicense.com/licenses/mit/)
154
+
155
+ ## Author
156
+
157
+ **Alexandru-Razvan Olariu**
158
+
159
+ - Website: [https://arolariu.ro](https://arolariu.ro)
160
+ - GitHub: [@arolariu](https://github.com/arolariu)
161
+ - Email: admin@arolariu.ro
162
+
163
+ ## Acknowledgments
164
+
165
+ - [Radix UI](https://www.radix-ui.com/) for providing accessible primitives
166
+ - [shadcn/ui](https://ui.shadcn.com/) for inspiration and component patterns
167
+ - [Tailwind CSS](https://tailwindcss.com/) for styling utilities
168
+
169
+ Similar code found with 2 license types