@alexandretav/aleui 1.1.0 → 1.1.2

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 (3) hide show
  1. package/README.md +208 -105
  2. package/cli.js +46 -29
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,122 +1,132 @@
1
- # ✨ Glassmorphism UI Library
1
+ # ✨ AleUI - Glassmorphism Components
2
2
 
3
- A beautiful, modern React component library built with TypeScript and Tailwind CSS, featuring stunning glassmorphism and Frutiger Aero design styles.
3
+ Beautiful, modern React components with glassmorphism and Frutiger Aero design. Copy components directly to your project - no bloat, full control.
4
4
 
5
- ![Version](https://img.shields.io/badge/version-1.0.0-blue)
5
+ ![Version](https://img.shields.io/badge/version-1.1.0-blue)
6
6
  ![License](https://img.shields.io/badge/license-MIT-green)
7
7
  ![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue)
8
8
  ![React](https://img.shields.io/badge/React-18-blue)
9
9
 
10
10
  ## 🎨 Features
11
11
 
12
- - ✨ **Beautiful Glassmorphism Design**: Modern, translucent UI components with backdrop blur effects
13
- - 🌊 **Frutiger Aero Style**: Nostalgic 2000s aesthetic with aquatic gradients
14
- - 📘 **TypeScript Support**: Full type safety and IntelliSense support
15
- - 🎨 **Tailwind CSS**: Utility-first CSS framework for easy customization
16
- - 🎭 **Multiple Variants**: Light, Medium, Dark, and Colored variants for each component
17
- - 📱 **Responsive**: Mobile-first design that works on all screen sizes
18
- - 🔧 **Customizable**: Easy to extend and customize with your own styles
19
- - ⚡ **Framer Motion**: Smooth animations and interactions
12
+ - ✨ **Copy, Don't Install**: Components are copied to your project, not bundled
13
+ - 🌊 **Glassmorphism & Frutiger Aero**: Modern glass effects + nostalgic 2000s aesthetic
14
+ - 📘 **TypeScript**: Full type safety and IntelliSense
15
+ - 🎨 **Tailwind CSS**: Utility-first styling
16
+ - 🎭 **4 Variants**: Light, Medium, Dark, and Colored for each component
17
+ - 📱 **Responsive**: Mobile-first design
18
+ - 🔧 **Full Control**: Edit components directly in your codebase
19
+ - ⚡ **Framer Motion**: Smooth animations
20
20
 
21
21
  ## 📦 Components
22
22
 
23
- - **Button**: Interactive buttons with glassmorphism effects
24
- - **Card**: Container components with customizable variants
25
- - **Input**: Form input fields with labels and validation
26
- - **Modal**: Dialog components with backdrop blur
27
- - **Accordion**: Collapsible content panels
28
- - **AeroBubble**: Decorative bubble elements with Frutiger Aero style
23
+ ### Glassmorphism Components
24
+ - **Button** - Interactive buttons with glass effects
25
+ - **Card** - Container components with blur
26
+ - **Input** - Form fields with labels
27
+ - **Modal** - Dialog with backdrop blur
28
+ - **Accordion** - Collapsible panels
29
29
 
30
- ## 🚀 Quick Start
31
-
32
- ### Installation
30
+ ### Frutiger Aero Components
31
+ - **AeroButton** - Aquatic gradient buttons
32
+ - **AeroCard** - Cards with aero styling
33
+ - **AeroInput** - Inputs with aero theme
34
+ - **AeroBubble** - Decorative bubble elements
33
35
 
34
- ```bash
35
- npm install glassmorphism-ui
36
- # or
37
- yarn add glassmorphism-ui
38
- # or
39
- pnpm add glassmorphism-ui
40
- ```
36
+ ## 🚀 Quick Start
41
37
 
42
- ### Setup Tailwind CSS
38
+ ### 1. Setup Tailwind CSS
43
39
 
44
- This library requires Tailwind CSS. Configure your `tailwind.config.js`:
40
+ Add to your `tailwind.config.js`:
45
41
 
46
42
  ```js
47
43
  module.exports = {
48
44
  content: [
49
45
  "./src/**/*.{js,ts,jsx,tsx}",
50
- "./node_modules/glassmorphism-ui/**/*.{js,ts,jsx,tsx}", // Add this line
51
46
  ],
52
47
  theme: {
53
48
  extend: {
54
- colors: {
55
- aero: {
56
- sky: '#87CEEB',
57
- aqua: '#00CED1',
58
- cyan: '#00E5FF',
59
- mint: '#98FF98',
60
- lime: '#BFFF00',
61
- white: '#F0F8FF',
62
- },
63
- },
64
49
  boxShadow: {
65
50
  'aero': '0 8px 32px 0 rgba(31, 38, 135, 0.37)',
66
51
  'aero-lg': '0 12px 48px 0 rgba(31, 38, 135, 0.5)',
67
52
  },
68
53
  },
69
54
  },
70
- plugins: [],
71
55
  }
72
56
  ```
73
57
 
74
- ### Demo
58
+ ### 2. Add Components
75
59
 
76
- Para ver a demo localmente:
60
+ Add all components (recommended):
77
61
 
78
62
  ```bash
79
- # Clone o repositório
80
- git clone https://github.com/seu-usuario/glassmorphism-ui.git
81
- cd glassmorphism-ui
63
+ npx @alexandretav/aleui
64
+ ```
82
65
 
83
- # Instalar dependências
84
- npm install
66
+ Or add a specific component:
85
67
 
86
- # Rodar servidor de desenvolvimento
87
- npm run dev
68
+ ```bash
69
+ npx @alexandretav/aleui add button
88
70
  ```
89
71
 
90
- Abra [http://localhost:3000](http://localhost:3000) para ver a demo.
72
+ List available components:
73
+
74
+ ```bash
75
+ npx @alexandretav/aleui list
76
+ ```
91
77
 
92
- ## 💻 Usage
78
+ ### 3. Use Components
93
79
 
94
- ### Import Components
80
+ Components are copied to `src/components/ui/` in your project:
95
81
 
96
82
  ```tsx
97
- import { Button, Card, Input, Modal } from '@/components';
83
+ import { Button } from '@/components/ui/button';
84
+ import { Card } from '@/components/ui/card';
85
+
86
+ function App() {
87
+ return (
88
+ <Card variant="medium" padding="lg">
89
+ <h2>Hello World</h2>
90
+ <Button variant="light" size="md">
91
+ Click Me
92
+ </Button>
93
+ </Card>
94
+ );
95
+ }
98
96
  ```
99
97
 
100
- ### Button Example
98
+ ## 💻 Usage Examples
99
+
100
+ ### Button
101
101
 
102
102
  ```tsx
103
- <Button variant="light" size="md" onClick={() => console.log('Clicked!')}>
103
+ import { Button } from '@/components/ui/button';
104
+
105
+ <Button variant="light" size="md" onClick={() => alert('Clicked!')}>
104
106
  Click Me
105
107
  </Button>
108
+
109
+ <Button variant="colored" size="lg" fullWidth>
110
+ Full Width Button
111
+ </Button>
106
112
  ```
107
113
 
108
- ### Card Example
114
+ ### Card
109
115
 
110
116
  ```tsx
111
- <Card variant="medium" hover padding="lg">
117
+ import { Card } from '@/components/ui/card';
118
+
119
+ <Card variant="medium" padding="lg" enableInteractions>
112
120
  <h2>Card Title</h2>
113
- <p>Card content goes here</p>
121
+ <p>Card content with hover effects</p>
114
122
  </Card>
115
123
  ```
116
124
 
117
- ### Input Example
125
+ ### Input
118
126
 
119
127
  ```tsx
128
+ import { Input } from '@/components/ui/input';
129
+
120
130
  <Input
121
131
  variant="light"
122
132
  label="Email"
@@ -126,9 +136,12 @@ import { Button, Card, Input, Modal } from '@/components';
126
136
  />
127
137
  ```
128
138
 
129
- ### Modal Example
139
+ ### Modal
130
140
 
131
141
  ```tsx
142
+ import { Modal } from '@/components/ui/modal';
143
+ import { useState } from 'react';
144
+
132
145
  const [isOpen, setIsOpen] = useState(false);
133
146
 
134
147
  <Modal
@@ -141,75 +154,165 @@ const [isOpen, setIsOpen] = useState(false);
141
154
  </Modal>
142
155
  ```
143
156
 
157
+ ### Accordion
158
+
159
+ ```tsx
160
+ import { Accordion } from '@/components/ui/accordion';
161
+
162
+ <Accordion
163
+ variant="light"
164
+ items={[
165
+ {
166
+ id: '1',
167
+ title: 'Question 1',
168
+ content: 'Answer 1',
169
+ },
170
+ {
171
+ id: '2',
172
+ title: 'Question 2',
173
+ content: 'Answer 2',
174
+ },
175
+ ]}
176
+ />
177
+ ```
178
+
144
179
  ## 🎨 Customization
145
180
 
181
+ Since components are copied to your project, you have **full control** to customize them:
182
+
183
+ ### Edit Components Directly
184
+
185
+ ```tsx
186
+ // src/components/ui/button/button.tsx
187
+ export const Button = ({ variant = 'light', ... }) => {
188
+ // Modify styles, add features, change behavior
189
+ return <button className={...}>...</button>
190
+ }
191
+ ```
192
+
146
193
  ### Theme Configuration
147
194
 
148
- The glassmorphism theme is configured in `src/theme/glass.ts`. You can customize:
195
+ The theme is in `src/theme/glass.ts`:
196
+
197
+ ```typescript
198
+ export const glassVariants = {
199
+ light: {
200
+ background: 'bg-white/5',
201
+ backdropBlur: 'backdrop-blur-[2px]',
202
+ border: 'border border-white/15',
203
+ shadow: 'shadow-lg',
204
+ hover: 'hover:bg-white/10',
205
+ focus: 'focus:ring-2 focus:ring-white/10',
206
+ },
207
+ // ... customize as needed
208
+ }
209
+ ```
210
+
211
+ ### Using Theme Utilities
149
212
 
150
- - Background opacity
151
- - Backdrop blur intensity
152
- - Border styles
153
- - Shadow effects
154
- - Animation transitions
213
+ ```tsx
214
+ import { getGlassClasses, getAeroClasses } from '@/theme/glass';
215
+
216
+ const MyComponent = () => {
217
+ const glassStyle = getGlassClasses('medium');
218
+ const aeroStyle = getAeroClasses('colored');
219
+
220
+ return <div className={glassStyle}>Custom component</div>;
221
+ };
222
+ ```
155
223
 
156
- ### Tailwind Configuration
224
+ ## 📁 Project Structure (After Installation)
157
225
 
158
- Extend the Tailwind configuration in `tailwind.config.js` to add custom colors, spacing, or other utilities.
226
+ ```
227
+ your-project/
228
+ ├── src/
229
+ │ ├── components/
230
+ │ │ └── ui/ # Components copied here
231
+ │ │ ├── button/
232
+ │ │ │ ├── button.tsx
233
+ │ │ │ └── index.ts
234
+ │ │ ├── card/
235
+ │ │ ├── input/
236
+ │ │ ├── modal/
237
+ │ │ ├── accordion/
238
+ │ │ └── aero-bubble/
239
+ │ └── theme/
240
+ │ └── glass.ts # Theme config copied here
241
+ ```
159
242
 
160
- ### Global Styles
243
+ ## 🎯 CLI Commands
161
244
 
162
- Global glassmorphism utility classes are available in `src/app/globals.css`:
245
+ ```bash
246
+ # Add all components (default)
247
+ npx @alexandretav/aleui
163
248
 
164
- - `.glass` - Default glassmorphism style
165
- - `.glass-light` - Light variant
166
- - `.glass-medium` - Medium variant
167
- - `.glass-dark` - Dark variant
168
- - `.glass-hover` - Hover animation
249
+ # Add a specific component
250
+ npx @alexandretav/aleui add button
251
+ npx @alexandretav/aleui add card
252
+ npx @alexandretav/aleui add modal
169
253
 
170
- ## 📁 Project Structure
254
+ # List available components
255
+ npx @alexandretav/aleui list
171
256
 
257
+ # Show help
258
+ npx @alexandretav/aleui help
172
259
  ```
173
- src/
174
- ├── app/
175
- │ ├── globals.css # Global styles and Tailwind imports
176
- │ ├── layout.tsx # Root layout
177
- │ └── page.tsx # Demo page
178
- ├── components/
179
- │ ├── Button/
180
- │ │ ├── Button.tsx
181
- │ │ └── index.ts
182
- │ ├── Card/
183
- │ │ ├── Card.tsx
184
- │ │ └── index.ts
185
- │ ├── Input/
186
- │ │ ├── Input.tsx
187
- │ │ └── index.ts
188
- │ ├── Modal/
189
- │ │ ├── Modal.tsx
190
- │ │ └── index.ts
191
- │ └── index.ts # Component exports
192
- ├── theme/
193
- │ └── glass.ts # Glassmorphism theme config
194
- └── utils/
195
- └── index.ts # Utility functions
260
+
261
+ ## 🌐 Demo
262
+
263
+ View live demo: [https://github.com/alexandrertav/alex-ui](https://github.com/alexandrertav/alex-ui)
264
+
265
+ Run demo locally:
266
+
267
+ ```bash
268
+ git clone https://github.com/alexandrertav/alex-ui.git
269
+ cd alex-ui
270
+ npm install
271
+ npm run dev
196
272
  ```
197
273
 
274
+ Open [http://localhost:3000](http://localhost:3000)
275
+
198
276
  ## 🛠️ Tech Stack
199
277
 
200
- - **Next.js 14** - React framework
278
+ - **React 18** - UI library
201
279
  - **TypeScript** - Type safety
202
280
  - **Tailwind CSS** - Styling
203
- - **React 18** - UI library
281
+ - **Framer Motion** - Animations
282
+
283
+ ## ❓ FAQ
284
+
285
+ **Q: Why copy components instead of installing from npm?**
286
+ A: Full control. Edit, customize, and own the code. No black boxes.
287
+
288
+ **Q: Do I need to install the package?**
289
+ A: No! Just use `npx @alexandretav/aleui add <component>` to copy components.
290
+
291
+ **Q: Can I modify the components?**
292
+ A: Yes! They're in your codebase. Modify freely.
293
+
294
+ **Q: What about updates?**
295
+ A: Re-run the CLI command to get the latest version of a component.
296
+
297
+ **Q: Does it work with Next.js/Remix/Vite?**
298
+ A: Yes! Works with any React framework that supports Tailwind CSS.
204
299
 
205
300
  ## 📝 License
206
301
 
207
- MIT
302
+ MIT License - feel free to use in personal and commercial projects.
208
303
 
209
304
  ## 🤝 Contributing
210
305
 
211
- Contributions are welcome! Feel free to open issues or submit pull requests.
306
+ Contributions are welcome!
307
+
308
+ - Report bugs: [GitHub Issues](https://github.com/alexandrertav/alex-ui/issues)
309
+ - Submit PRs: [GitHub Pull Requests](https://github.com/alexandrertav/alex-ui/pulls)
310
+
311
+ ## 🔗 Links
312
+
313
+ - **NPM Package**: [@alexandretav/aleui](https://www.npmjs.com/package/@alexandretav/aleui)
314
+ - **GitHub**: [alexandrertav/alex-ui](https://github.com/alexandrertav/alex-ui)
315
+ - **Author**: Alexandre R. Tavares
212
316
 
213
317
  ---
214
318
 
215
- Built with ❤️ using Next.js and Tailwind CSS
package/cli.js CHANGED
@@ -71,22 +71,25 @@ function showHelp() {
71
71
  🎨 AleUI - Glassmorphism Components
72
72
 
73
73
  Uso:
74
- npx @alexandretav/aleui add <componente>
75
- npx @alexandretav/aleui add-all
76
- npx @alexandretav/aleui list
74
+ npx @alexandretav/aleui # Adiciona todos os componentes
75
+ npx @alexandretav/aleui add <componente> # Adiciona um componente específico
76
+ npx @alexandretav/aleui list # Lista componentes disponíveis
77
77
 
78
78
  Comandos:
79
+ (sem comando) Adiciona todos os componentes
79
80
  add <componente> Adiciona um componente específico
80
81
  add-all Adiciona todos os componentes
81
82
  list Lista componentes disponíveis
83
+ help Mostra esta ajuda
82
84
 
83
85
  Componentes disponíveis:
84
86
  ${availableComponents.map(c => ` - ${c}`).join('\n')}
85
87
 
86
88
  Exemplos:
87
- npx @alexandretav/aleui add button
88
- npx @alexandretav/aleui add card
89
- npx @alexandretav/aleui add-all
89
+ npx @alexandretav/aleui # Adiciona tudo
90
+ npx @alexandretav/aleui add button # Adiciona só o Button
91
+ npx @alexandretav/aleui add card # Adiciona só o Card
92
+ npx @alexandretav/aleui list # Lista componentes
90
93
  `);
91
94
  }
92
95
 
@@ -99,27 +102,41 @@ function listComponents() {
99
102
  }
100
103
 
101
104
  // Main
102
- switch (command) {
103
- case 'add':
104
- if (!componentName) {
105
- console.error('❌ Especifique o nome do componente!');
106
- console.log('Uso: npx @alexandretav/aleui add <componente>');
107
- process.exit(1);
108
- }
109
- copyTheme();
110
- copyComponent(componentName);
111
- break;
112
-
113
- case 'add-all':
114
- copyTheme();
115
- availableComponents.forEach(comp => copyComponent(comp));
116
- console.log('\n✅ Todos os componentes foram copiados!');
117
- break;
118
-
119
- case 'list':
120
- listComponents();
121
- break;
122
-
123
- default:
124
- showHelp();
105
+ if (!command) {
106
+ // Se não houver comando, adiciona todos os componentes
107
+ copyTheme();
108
+ availableComponents.forEach(comp => copyComponent(comp));
109
+ console.log('\n✅ Todos os componentes foram copiados!');
110
+ } else {
111
+ switch (command) {
112
+ case 'add':
113
+ if (!componentName) {
114
+ console.error('❌ Especifique o nome do componente!');
115
+ console.log('Uso: npx @alexandretav/aleui add <componente>');
116
+ process.exit(1);
117
+ }
118
+ copyTheme();
119
+ copyComponent(componentName);
120
+ break;
121
+
122
+ case 'add-all':
123
+ copyTheme();
124
+ availableComponents.forEach(comp => copyComponent(comp));
125
+ console.log('\n✅ Todos os componentes foram copiados!');
126
+ break;
127
+
128
+ case 'list':
129
+ listComponents();
130
+ break;
131
+
132
+ case 'help':
133
+ case '--help':
134
+ case '-h':
135
+ showHelp();
136
+ break;
137
+
138
+ default:
139
+ console.error(`❌ Comando desconhecido: "${command}"`);
140
+ showHelp();
141
+ }
125
142
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@alexandretav/aleui",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Glass UI components for React",
5
5
  "main": "src/components/index.ts",
6
6
  "types": "src/components/index.ts",
7
7
  "bin": {
8
- "aleui": "./cli.js"
8
+ "aleui": "cli.js"
9
9
  },
10
10
  "files": [
11
11
  "src/components",