ng-magary 0.0.2 β†’ 0.0.4

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 (2) hide show
  1. package/README.md +166 -32
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,63 +1,197 @@
1
- # NgMagary
1
+ # NgMagary 🎨
2
2
 
3
- This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.1.0.
3
+ [![npm version](https://badge.fury.io/js/ng-magary.svg)](https://badge.fury.io/js/ng-magary)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
5
 
5
- ## Code scaffolding
6
+ > ⚠️ **Alpha Release** - This library is under active development. APIs may change in future versions.
6
7
 
7
- Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
8
+ NgMagary is a modern and elegant Angular component library, designed to provide reusable and easy-to-use UI components for your Angular projects.
9
+
10
+ ## 🎯 Angular Compatibility
11
+
12
+ NgMagary is **optimized for Angular 20+**, but it's also **compatible with previous versions**:
13
+
14
+ - βœ… **Angular 20+** (Recommended - Full support)
15
+ - βœ… **Angular 15+** (Compatible - Using traditional modules)
16
+ - βœ… **Angular 14+** (Compatible - Using traditional modules)
17
+
18
+ > **Note**: For versions prior to Angular 15, all components are available as traditional modules, ensuring seamless compatibility.
19
+
20
+ ## πŸš€ Installation
8
21
 
9
22
  ```bash
10
- ng generate component component-name
23
+ npm install ng-magary
11
24
  ```
12
25
 
13
- For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
26
+ ### Dependencies by Angular Version
14
27
 
28
+ #### For Angular 20+ (Recommended)
15
29
  ```bash
16
- ng generate --help
30
+ npm install @angular/common@^20.1.0 @angular/core@^20.1.0 @fortawesome/fontawesome-free@^7.0.0
17
31
  ```
18
32
 
19
- ## Building
20
-
21
- To build the library, run:
33
+ #### For Angular 15-19
34
+ ```bash
35
+ npm install @angular/common@^15.0.0 @angular/core@^15.0.0 @fortawesome/fontawesome-free@^6.0.0
36
+ ```
22
37
 
38
+ #### For Angular 14
23
39
  ```bash
24
- ng build ng-magary
40
+ npm install @angular/common@^14.0.0 @angular/core@^14.0.0 @fortawesome/fontawesome-free@^6.0.0
25
41
  ```
26
42
 
27
- This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
43
+ > **πŸ’‘ Tip**: NgMagary automatically adjusts its features based on the Angular version you're using, maintaining backward compatibility.
28
44
 
29
- ### Publishing the Library
45
+ ## πŸ“¦ Available Components
30
46
 
31
- Once the project is built, you can publish your library by following these steps:
47
+ ### πŸ”˜ Button
48
+ - **Button**: Customizable button component
49
+ - **Speed Dial**: Floating action button with expandable actions
32
50
 
33
- 1. Navigate to the `dist` directory:
34
- ```bash
35
- cd dist/ng-magary
36
- ```
51
+ ### πŸ“ Form
52
+ - **Input**: Enhanced text input field
53
+ - **Cascade Select**: Cascading selector for hierarchical data
37
54
 
38
- 2. Run the `npm publish` command to publish your library to the npm registry:
39
- ```bash
40
- npm publish
41
- ```
55
+ ### πŸ“‹ Menu
56
+ - **Panel Menu**: Expandable panel menu
57
+ - **Sidebar**: Navigable sidebar
42
58
 
43
- ## Running unit tests
59
+ ### πŸ‘€ Misc
60
+ - **Avatar**: User avatar component
44
61
 
45
- To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
62
+ ### πŸ“¦ Panel
63
+ - **Card**: Content card
64
+ - **Tabs**: Navigable tab system
46
65
 
47
- ```bash
48
- ng test
66
+ ## πŸ› οΈ Basic Usage
67
+
68
+ ### Import according to your Angular version
69
+
70
+ #### Angular 20+ (Standalone Components)
71
+ ```typescript
72
+ import { Component } from '@angular/core';
73
+ import { ButtonComponent, InputComponent, CardComponent } from 'ng-magary';
74
+
75
+ @Component({
76
+ selector: 'app-example',
77
+ standalone: true,
78
+ imports: [ButtonComponent, InputComponent, CardComponent],
79
+ template: `
80
+ <magary-button label="Click me!" severity="primary"></magary-button>
81
+ <magary-input placeholder="Type something..."></magary-input>
82
+ <magary-card header="My Card">
83
+ <p>Card content</p>
84
+ </magary-card>
85
+ `
86
+ })
87
+ export class ExampleComponent { }
88
+ ```
89
+
90
+ #### Angular 14-19 (Traditional Modules)
91
+ ```typescript
92
+ import { NgModule } from '@angular/core';
93
+ import { BrowserModule } from '@angular/platform-browser';
94
+
95
+ // Import the NgMagary modules you need
96
+ import { ButtonModule, InputModule, CardModule } from 'ng-magary';
97
+
98
+ import { AppComponent } from './app.component';
99
+
100
+ @NgModule({
101
+ declarations: [
102
+ AppComponent
103
+ ],
104
+ imports: [
105
+ BrowserModule,
106
+ ButtonModule,
107
+ InputModule,
108
+ CardModule
109
+ ],
110
+ providers: [],
111
+ bootstrap: [AppComponent]
112
+ })
113
+ export class AppModule { }
49
114
  ```
50
115
 
51
- ## Running end-to-end tests
116
+ ### Using components in your template
117
+
118
+ ```html
119
+ <!-- Button -->
120
+ <magary-button label="Click me!" severity="primary"></magary-button>
121
+
122
+ <!-- Input -->
123
+ <magary-input placeholder="Type something..."></magary-input>
124
+
125
+ <!-- Card -->
126
+ <magary-card header="My Card">
127
+ <p>Card content</p>
128
+ </magary-card>
129
+ ```
52
130
 
53
- For end-to-end (e2e) testing, run:
131
+ ## πŸ“š Documentation
132
+
133
+ Complete documentation will be available soon. For now, you can explore the components in the source code or check the examples in the demo application.
134
+
135
+ ## πŸ”§ Development
136
+
137
+ To contribute to development:
54
138
 
55
139
  ```bash
56
- ng e2e
140
+ # Clone the repository
141
+ git clone https://github.com/JhoanGon/magary.git
142
+
143
+ # Install dependencies
144
+ npm install
145
+
146
+ # Run in development mode
147
+ npm start
148
+
149
+ # Run tests
150
+ npm test
151
+
152
+ # Build the library
153
+ ng build ng-magary
57
154
  ```
58
155
 
59
- Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
156
+ ## πŸ—ΊοΈ Roadmap
157
+
158
+ ### Upcoming components (future versions):
159
+ - **Data**: Table, List, Tree
160
+ - **File**: Upload, Download
161
+ - **Media**: Image, Carousel
162
+ - **Messages**: Toast, Dialog, Confirm
163
+ - **Overlay**: Modal, Tooltip, Popup
164
+
165
+ ## πŸ“ Changelog
166
+
167
+ ### v0.0.2 (Alpha)
168
+ - βœ… **Optimized for Angular 20+** with standalone components support
169
+ - βœ… **Backward compatibility** with Angular 14, 15, 16, 17, 18, 19
170
+ - βœ… Button and Speed Dial components
171
+ - βœ… Form components (Input, Cascade Select)
172
+ - βœ… Menu components (Panel Menu, Sidebar)
173
+ - βœ… Avatar component
174
+ - βœ… Panel components (Card, Tabs)
175
+ - βœ… Traditional modules available for previous Angular versions
176
+
177
+ ## 🀝 Contributing
178
+
179
+ Contributions are welcome. Please:
180
+
181
+ 1. Fork the project
182
+ 2. Create a feature branch (`git checkout -b feature/AmazingFeature`)
183
+ 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
184
+ 4. Push to the branch (`git push origin feature/AmazingFeature`)
185
+ 5. Open a Pull Request
186
+
187
+ ## πŸ“„ License
188
+
189
+ This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.
190
+
191
+ ## πŸ‘¨β€πŸ’» Author
192
+
193
+ **JhoanGon** - [GitHub](https://github.com/JhoanGon)
60
194
 
61
- ## Additional Resources
195
+ ---
62
196
 
63
- For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
197
+ ⭐ If you find this project useful, give it a star on GitHub!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-magary",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "license": "MIT",
5
5
  "peerDependencies": {
6
6
  "@fortawesome/fontawesome-free": "^7.0.0",