ng-magary 0.0.2 β 0.0.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 +166 -32
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,63 +1,197 @@
|
|
|
1
|
-
# NgMagary
|
|
1
|
+
# NgMagary π¨
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://badge.fury.io/js/ng-magary)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
> β οΈ **Alpha Release** - This library is under active development. APIs may change in future versions.
|
|
6
7
|
|
|
7
|
-
Angular
|
|
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
|
-
|
|
23
|
+
npm install ng-magary
|
|
11
24
|
```
|
|
12
25
|
|
|
13
|
-
|
|
26
|
+
### Dependencies by Angular Version
|
|
14
27
|
|
|
28
|
+
#### For Angular 20+ (Recommended)
|
|
15
29
|
```bash
|
|
16
|
-
|
|
30
|
+
npm install @angular/common@^20.1.0 @angular/core@^20.1.0 @fortawesome/fontawesome-free@^7.0.0
|
|
17
31
|
```
|
|
18
32
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
40
|
+
npm install @angular/common@^14.0.0 @angular/core@^14.0.0 @fortawesome/fontawesome-free@^6.0.0
|
|
25
41
|
```
|
|
26
42
|
|
|
27
|
-
|
|
43
|
+
> **π‘ Tip**: NgMagary automatically adjusts its features based on the Angular version you're using, maintaining backward compatibility.
|
|
28
44
|
|
|
29
|
-
|
|
45
|
+
## π¦ Available Components
|
|
30
46
|
|
|
31
|
-
|
|
47
|
+
### π Button
|
|
48
|
+
- **Button**: Customizable button component
|
|
49
|
+
- **Speed Dial**: Floating action button with expandable actions
|
|
32
50
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
```
|
|
51
|
+
### π Form
|
|
52
|
+
- **Input**: Enhanced text input field
|
|
53
|
+
- **Cascade Select**: Cascading selector for hierarchical data
|
|
37
54
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
```
|
|
55
|
+
### π Menu
|
|
56
|
+
- **Panel Menu**: Expandable panel menu
|
|
57
|
+
- **Sidebar**: Navigable sidebar
|
|
42
58
|
|
|
43
|
-
|
|
59
|
+
### π€ Misc
|
|
60
|
+
- **Avatar**: User avatar component
|
|
44
61
|
|
|
45
|
-
|
|
62
|
+
### π¦ Panel
|
|
63
|
+
- **Card**: Content card
|
|
64
|
+
- **Tabs**: Navigable tab system
|
|
46
65
|
|
|
47
|
-
|
|
48
|
-
|
|
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
|
+
<mg-button label="Click me!" severity="primary"></mg-button>
|
|
81
|
+
<mg-input placeholder="Type something..."></mg-input>
|
|
82
|
+
<mg-card header="My Card">
|
|
83
|
+
<p>Card content</p>
|
|
84
|
+
</mg-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
|
-
|
|
116
|
+
### Using components in your template
|
|
117
|
+
|
|
118
|
+
```html
|
|
119
|
+
<!-- Button -->
|
|
120
|
+
<mg-button label="Click me!" severity="primary"></mg-button>
|
|
121
|
+
|
|
122
|
+
<!-- Input -->
|
|
123
|
+
<mg-input placeholder="Type something..."></mg-input>
|
|
124
|
+
|
|
125
|
+
<!-- Card -->
|
|
126
|
+
<mg-card header="My Card">
|
|
127
|
+
<p>Card content</p>
|
|
128
|
+
</mg-card>
|
|
129
|
+
```
|
|
52
130
|
|
|
53
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
195
|
+
---
|
|
62
196
|
|
|
63
|
-
|
|
197
|
+
β If you find this project useful, give it a star on GitHub!
|