angular-matecu 4.0.0 → 4.0.1

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 CHANGED
@@ -159,50 +159,96 @@ El contenido de la página tiene una función que se puede llamar para realizar
159
159
 
160
160
  Importar módulo o componentes
161
161
 
162
+ ```
163
+ // ...
162
164
  import { MatecuTopbarLayoutModule } from 'angular-matecu';
163
- // o
164
- import {MatecuTopbarLayoutComponent} from 'angular-matecu';
165
- import {MatecuTopbarHeaderRowComponent} from 'angular-matecu';
166
- import {MatecuTopbarHeaderColumnComponent} from 'angular-matecu';
167
- import {MatecuTopbarActionComponent} from 'angular-matecu';
168
- import {MatecuTopbarSearchComponent} from 'angular-matecu';
169
- import {MatecuTopbarFabComponent} from 'angular-matecu';
170
- import {MatecuTopbarTitleComponent} from 'angular-matecu';
171
- import {MatecuTopbarBodyComponent} from 'angular-matecu';
165
+ import { MatIconModule } from '@angular/material/icon';
166
+ import { MatButtonModule } from '@angular/material/button';
167
+ // Se pueden importar los componentes de forma individual
168
+ // ...
169
+ @NgModule({
170
+
171
+ declarations: [AppComponent],
172
+ imports: [
173
+ // ...
174
+ MatecuTopbarLayoutModule,
175
+ MatIconModule,
176
+ MatButtonModule
177
+ // ...
178
+ ],
179
+ providers: [],
180
+ bootstrap: [AppComponent],
181
+ })
182
+ export class AppModule {}
183
+ ```
172
184
 
173
185
  Agregar a la plantilla de algún componente:
174
186
 
175
187
  ```
176
188
  <matecu-topbar-layout #topbar>
177
189
  <matecu-topbar-header-row first-row>
178
- <matecu-topbar-header-column left-column>
190
+ <matecu-topbar-header-column left-column>
179
191
  <matecu-topbar-action>
180
- <button mat-icon-button><mat-icon>menu</mat-icon></button>
192
+ <button mat-icon-button><mat-icon>menu</mat-icon></button>
181
193
  </matecu-topbar-action>
182
194
  <matecu-topbar-fab>
183
- <button mat-fab><mat-icon>add</mat-icon></button>
195
+ <button mat-fab><mat-icon>add</mat-icon></button>
184
196
  </matecu-topbar-fab>
185
197
  <matecu-topbar-title>Topbar Layout</matecu-topbar-title>
186
-
187
- </matecu-topbar-header-column>
188
- <matecu-topbar-header-column right-column>
189
- <matecu-topbar-search (valueChange)="searchFunction($event)"></matecu-topbar-search>
198
+ </matecu-topbar-header-column>
199
+ <matecu-topbar-header-column right-column>
200
+ <matecu-topbar-search
201
+ placeholder="Buscar..."
202
+ (valueChange)="searchFunction($event)"
203
+ ></matecu-topbar-search>
190
204
  <matecu-topbar-action>
191
- <button><mat-icon>more_vert</mat-icon></button>
205
+ <button mat-icon-button><mat-icon>more_vert</mat-icon></button>
192
206
  </matecu-topbar-action>
193
- </matecu-topbar-header-column>
207
+ </matecu-topbar-header-column>
194
208
  </matecu-topbar-header-row>
195
- <matecu-topbar-body >
196
- Contenido de la página
197
- .....
198
- <button (click)="topbar.scrollTop()">
199
- Regresar al inicio
200
- </button>
201
- </matecu-topbar-body>
202
-
209
+ <matecu-topbar-body>
210
+ Contenido de la página .....
211
+ <button (click)="topbar.scrollTop()">Regresar al inicio</button>
212
+ </matecu-topbar-body>
203
213
  </matecu-topbar-layout>
214
+
204
215
  ```
205
216
 
217
+ Agregar al componente el método para capturar el texto de búsqueda
218
+
219
+ ```
220
+ import { Component } from '@angular/core';
221
+
222
+ @Component({
223
+ selector: 'app-root',
224
+ templateUrl: './app.component.html',
225
+ styleUrls: ['./app.component.scss'],
226
+ })
227
+ export class AppComponent {
228
+ searchFunction(searchText: string) {
229
+ console.log(searchText);
230
+ }
231
+
232
+ }
233
+
234
+ ```
235
+
236
+ Ajustar los colores y los estilos en el archivo de css del componente o el archivo de css global
237
+
238
+ ````
239
+ // global
240
+ :root {
241
+ // ...
242
+ --mtb-primary-color: red;
243
+ // ...
244
+ }
245
+ // en el componente
246
+ :host {
247
+ // ...
248
+ --mtb-primary-color: red;
249
+ // ...
250
+ }
251
+ ```
206
252
  ## Componentes
207
253
 
208
254
  ### MatecuTopbarLayout:
@@ -305,3 +351,4 @@ Crea un contenedor para agregar el contenido de la página
305
351
  --mtb-body-padding: Padding para el contenido
306
352
  --mtb-body-background: Fondo del contenido;
307
353
  --mtb-body-padding-button: Padding inferior (Es utilizado para asignar un espacio al Botón principal (FAB) cuando tiene asignados los estilos para dispositivos móviles)
354
+ ````
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "angular-matecu",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^15.x || ^16.x",
6
6
  "@angular/core": "^15.x || ^16.x",
Binary file