tecnualng 21.0.12 → 21.0.17
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 +112 -1
- package/_index.scss +17 -0
- package/fesm2022/tecnualng.mjs +693 -75
- package/fesm2022/tecnualng.mjs.map +1 -1
- package/package.json +40 -5
- package/src/lib/styles/_theming.scss +99 -0
- package/src/lib/styles/definitions/_aurora-dark.scss +19 -0
- package/src/lib/styles/definitions/_aurora.scss +19 -0
- package/src/lib/styles/definitions/_dark.scss +19 -0
- package/src/lib/styles/definitions/_forest.scss +19 -0
- package/src/lib/styles/definitions/_futuristic.scss +36 -0
- package/src/lib/styles/definitions/_light.scss +31 -0
- package/src/lib/styles/definitions/_monochrome.scss +19 -0
- package/src/lib/styles/definitions/_ocean.scss +19 -0
- package/src/lib/styles/definitions/_royal.scss +19 -0
- package/src/lib/styles/definitions/_sunset.scss +19 -0
- package/types/tecnualng.d.ts +186 -5
package/README.md
CHANGED
|
@@ -70,7 +70,118 @@ import { TnButtonComponent } from 'tecnualng';
|
|
|
70
70
|
<tn-button label="Accept" (click)="onClick()"></tn-button>
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
### 4.
|
|
73
|
+
### 4. Configure Theming
|
|
74
|
+
|
|
75
|
+
TecnualNG includes a powerful theming system with 10 pre-built themes. To use themes in your application:
|
|
76
|
+
|
|
77
|
+
#### Step 1: Configure angular.json
|
|
78
|
+
|
|
79
|
+
Add theme bundles to your `angular.json`:
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
"styles": [
|
|
83
|
+
"src/styles.scss",
|
|
84
|
+
{
|
|
85
|
+
"input": "src/styles/themes/light.scss",
|
|
86
|
+
"bundleName": "theme-light",
|
|
87
|
+
"inject": false
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"input": "src/styles/themes/dark.scss",
|
|
91
|
+
"bundleName": "theme-dark",
|
|
92
|
+
"inject": false
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"input": "src/styles/themes/futuristic.scss",
|
|
96
|
+
"bundleName": "theme-futuristic",
|
|
97
|
+
"inject": false
|
|
98
|
+
}
|
|
99
|
+
// Add more themes as needed
|
|
100
|
+
]
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
#### Step 2: Create Theme Files
|
|
104
|
+
|
|
105
|
+
Create SCSS files for each theme in `src/styles/themes/`:
|
|
106
|
+
|
|
107
|
+
**light.scss:**
|
|
108
|
+
|
|
109
|
+
```scss
|
|
110
|
+
@use 'tecnualng/styles/themes/light' as light;
|
|
111
|
+
|
|
112
|
+
body {
|
|
113
|
+
@include light.tng-theme-default;
|
|
114
|
+
background-color: var(--tng-background);
|
|
115
|
+
color: var(--tng-text);
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**dark.scss:**
|
|
120
|
+
|
|
121
|
+
```scss
|
|
122
|
+
@use 'tecnualng/styles/themes/dark' as dark;
|
|
123
|
+
|
|
124
|
+
body {
|
|
125
|
+
@include dark.tng-theme-dark;
|
|
126
|
+
background-color: var(--tng-background);
|
|
127
|
+
color: var(--tng-text);
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**futuristic.scss:**
|
|
132
|
+
|
|
133
|
+
```scss
|
|
134
|
+
@use 'tecnualng/styles/themes/futuristic' as futuristic;
|
|
135
|
+
|
|
136
|
+
body {
|
|
137
|
+
@include futuristic.tng-theme-futuristic;
|
|
138
|
+
background-color: var(--tng-background);
|
|
139
|
+
color: var(--tng-text);
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
#### Step 3: Use ThemeService
|
|
144
|
+
|
|
145
|
+
Import and use the `ThemeService` to switch themes dynamically:
|
|
146
|
+
|
|
147
|
+
```typescript
|
|
148
|
+
import { Component, OnInit } from '@angular/core';
|
|
149
|
+
import { ThemeService } from 'tecnualng';
|
|
150
|
+
|
|
151
|
+
@Component({
|
|
152
|
+
selector: 'app-root',
|
|
153
|
+
templateUrl: './app.component.html',
|
|
154
|
+
})
|
|
155
|
+
export class AppComponent implements OnInit {
|
|
156
|
+
constructor(private themeService: ThemeService) {}
|
|
157
|
+
|
|
158
|
+
ngOnInit() {
|
|
159
|
+
// Set default theme
|
|
160
|
+
this.themeService.setTheme('light');
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
switchTheme(theme: string) {
|
|
164
|
+
this.themeService.setTheme(theme);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
#### Available Themes
|
|
170
|
+
|
|
171
|
+
TecnualNG includes 10 beautiful themes:
|
|
172
|
+
|
|
173
|
+
- **light** - Clean, bright theme with vibrant accents
|
|
174
|
+
- **dark** - Modern dark mode theme
|
|
175
|
+
- **ocean** - Ocean-inspired blues and teals
|
|
176
|
+
- **forest** - Nature-inspired greens
|
|
177
|
+
- **sunset** - Warm sunset colors
|
|
178
|
+
- **royal** - Elegant purple tones
|
|
179
|
+
- **monochrome** - Minimalist black and white
|
|
180
|
+
- **aurora** - Northern lights inspired colors
|
|
181
|
+
- **aurora-dark** - Dark aurora theme
|
|
182
|
+
- **futuristic** - Neon cyberpunk with glassmorphism effects
|
|
183
|
+
|
|
184
|
+
Each theme provides CSS variables for consistent styling across all components.
|
|
74
185
|
|
|
75
186
|
TecnualNG supports flexible styling with theme‑ready architecture.
|
|
76
187
|
|
package/_index.scss
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// TecnualNG Theme System
|
|
2
|
+
// Import this file to access all theme definitions
|
|
3
|
+
|
|
4
|
+
// Forward all theme mixins for external use
|
|
5
|
+
@forward 'src/lib/styles/definitions/light';
|
|
6
|
+
@forward 'src/lib/styles/definitions/dark';
|
|
7
|
+
@forward 'src/lib/styles/definitions/ocean';
|
|
8
|
+
@forward 'src/lib/styles/definitions/forest';
|
|
9
|
+
@forward 'src/lib/styles/definitions/sunset';
|
|
10
|
+
@forward 'src/lib/styles/definitions/royal';
|
|
11
|
+
@forward 'src/lib/styles/definitions/monochrome';
|
|
12
|
+
@forward 'src/lib/styles/definitions/aurora';
|
|
13
|
+
@forward 'src/lib/styles/definitions/aurora-dark';
|
|
14
|
+
@forward 'src/lib/styles/definitions/futuristic';
|
|
15
|
+
|
|
16
|
+
// Also forward the main theming file with all theme classes
|
|
17
|
+
@forward 'src/lib/styles/theming';
|