@up_si_vale/sivale-componentes-angular 1.0.1 → 1.0.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.
@@ -0,0 +1,29 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export type AlertColor = 'default' | 'brand' | 'gray' | 'error' | 'warning' | 'success';
4
+ export type AlertSize = 'floating' | 'full-width';
5
+ export type AlertActionVariant = 'link' | 'button';
6
+ export declare class AlertComponent {
7
+ color: AlertColor;
8
+ size: AlertSize;
9
+ alertTitle: string;
10
+ supportingText?: string;
11
+ showIcon: boolean;
12
+ showActions: boolean;
13
+ actionVariant: AlertActionVariant;
14
+ dismissLabel: string;
15
+ primaryActionLabel: string;
16
+ showClose: boolean;
17
+ closeAriaLabel: string;
18
+ dismiss: EventEmitter<void>;
19
+ primaryAction: EventEmitter<void>;
20
+ closed: EventEmitter<void>;
21
+ get alertClasses(): string;
22
+ get actionClass(): string;
23
+ get primaryActionClass(): string;
24
+ handleDismiss(): void;
25
+ handlePrimaryAction(): void;
26
+ handleClose(): void;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<AlertComponent, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<AlertComponent, "app-alert", never, { "color": { "alias": "color"; "required": false; }; "size": { "alias": "size"; "required": false; }; "alertTitle": { "alias": "alertTitle"; "required": false; }; "supportingText": { "alias": "supportingText"; "required": false; }; "showIcon": { "alias": "showIcon"; "required": false; }; "showActions": { "alias": "showActions"; "required": false; }; "actionVariant": { "alias": "actionVariant"; "required": false; }; "dismissLabel": { "alias": "dismissLabel"; "required": false; }; "primaryActionLabel": { "alias": "primaryActionLabel"; "required": false; }; "showClose": { "alias": "showClose"; "required": false; }; "closeAriaLabel": { "alias": "closeAriaLabel"; "required": false; }; }, { "dismiss": "dismiss"; "primaryAction": "primaryAction"; "closed": "closed"; }, never, never, true, never>;
29
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ export type SidebarIconName = 'dashboard' | 'file-users' | 'card' | 'logout' | 'chevron-down' | 'settings' | 'user' | 'home';
3
+ export declare class SidebarIconComponent {
4
+ name: SidebarIconName;
5
+ size: number;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<SidebarIconComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<SidebarIconComponent, "svu-sidebar-icon", never, { "name": { "alias": "name"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, {}, never, never, true, never>;
8
+ }
@@ -0,0 +1,47 @@
1
+ import { EventEmitter, ElementRef, TemplateRef } from '@angular/core';
2
+ import { IsActiveMatchOptions } from '@angular/router';
3
+ import { SidebarIconName } from './sidebar-icon.component';
4
+ import * as i0 from "@angular/core";
5
+ export interface SidebarItem {
6
+ label: string;
7
+ icon?: SidebarIconName;
8
+ route?: string;
9
+ /** Subset match para que el padre se marque activo aunque la ruta hija no esté exacta. */
10
+ exact?: boolean;
11
+ children?: SidebarItem[];
12
+ }
13
+ export declare class SidebarComponent {
14
+ private hostRef;
15
+ /** Items del menú (datos-driven). Soporta children para sub-navegación. */
16
+ items: SidebarItem[];
17
+ /** Logo: si se pasa la URL se renderiza; alternativamente proyecta contenido con `[sidebarLogo]`. */
18
+ logoSrc?: string;
19
+ logoAlt: string;
20
+ /** Footer hibrido: si se pasan los inputs se usa el footer por defecto.
21
+ * Para footer custom, proyectar con `[sidebarFooter]` (gana sobre los inputs). */
22
+ userName?: string;
23
+ userEmail?: string;
24
+ /** Si no se pasa, se usa la primera letra de userName. */
25
+ userInitial?: string;
26
+ /** Mostrar/ocultar el botón de logout en el menú de cuenta. */
27
+ showLogout: boolean;
28
+ logoutLabel: string;
29
+ /** Click en un item (incluye expandibles y hojas). */
30
+ itemClick: EventEmitter<SidebarItem>;
31
+ logout: EventEmitter<void>;
32
+ logoTpl?: TemplateRef<unknown>;
33
+ footerTpl?: TemplateRef<unknown>;
34
+ expandedKeys: Set<string>;
35
+ accountMenuOpen: boolean;
36
+ readonly subsetMatch: IsActiveMatchOptions;
37
+ readonly exactMatch: IsActiveMatchOptions;
38
+ constructor(hostRef: ElementRef<HTMLElement>);
39
+ get computedInitial(): string;
40
+ isExpanded(item: SidebarItem): boolean;
41
+ onItemClick(item: SidebarItem): void;
42
+ toggleAccountMenu(): void;
43
+ onLogoutClick(): void;
44
+ onDocumentClick(event: Event): void;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<SidebarComponent, never>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<SidebarComponent, "svu-sidebar", never, { "items": { "alias": "items"; "required": false; }; "logoSrc": { "alias": "logoSrc"; "required": false; }; "logoAlt": { "alias": "logoAlt"; "required": false; }; "userName": { "alias": "userName"; "required": false; }; "userEmail": { "alias": "userEmail"; "required": false; }; "userInitial": { "alias": "userInitial"; "required": false; }; "showLogout": { "alias": "showLogout"; "required": false; }; "logoutLabel": { "alias": "logoutLabel"; "required": false; }; }, { "itemClick": "itemClick"; "logout": "logout"; }, ["logoTpl", "footerTpl"], never, true, never>;
47
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@up_si_vale/sivale-componentes-angular",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Librería de componentes Angular standalone (atoms + molecules) para los frontends de Sivale.",
5
5
  "author": "Up Sí Vale — Frontend Team",
6
6
  "license": "UNLICENSED",
@@ -20,16 +20,21 @@
20
20
  "access": "public"
21
21
  },
22
22
  "peerDependencies": {
23
- "@angular/common": "^17.3.0",
24
- "@angular/core": "^17.3.0",
25
- "@angular/forms": "^17.3.0",
23
+ "@angular/common": ">=17.3.0 <22.0.0",
24
+ "@angular/core": ">=17.3.0 <22.0.0",
25
+ "@angular/forms": ">=17.3.0 <22.0.0",
26
+ "@angular/router": ">=17.3.0 <22.0.0",
26
27
  "@up_si_vale/sivale-design-styles": "^1.0.15",
27
28
  "rxjs": "^7.8.0"
28
29
  },
29
30
  "dependencies": {
30
31
  "tslib": "^2.3.0"
31
32
  },
32
- "sideEffects": false,
33
+ "sideEffects": [
34
+ "./elements/**/*.ts",
35
+ "./**/*.scss",
36
+ "./**/*.css"
37
+ ],
33
38
  "module": "fesm2022/up_si_vale-sivale-componentes-angular.mjs",
34
39
  "typings": "index.d.ts",
35
40
  "exports": {
package/public-api.d.ts CHANGED
@@ -15,9 +15,12 @@ export * from './lib/atoms/checkbox/checkbox.component';
15
15
  export * from './lib/atoms/radio/radio.component';
16
16
  export * from './lib/atoms/date-picker/date-picker.component';
17
17
  export * from './lib/atoms/loader/loader.component';
18
+ export * from './lib/organisms/sidebar/sidebar-icon.component';
19
+ export * from './lib/organisms/sidebar/sidebar.component';
18
20
  export * from './lib/molecules/option/option.component';
19
21
  export * from './lib/molecules/select/select.component';
20
22
  export * from './lib/molecules/multiselect/multiselect.component';
21
23
  export * from './lib/molecules/phone-input/phone-input.component';
22
24
  export * from './lib/molecules/copy-input/copy-input.component';
23
25
  export * from './lib/molecules/snackbar/snackbar.component';
26
+ export * from './lib/molecules/alert/alert.component';