valtech-components 2.0.777 → 2.0.779
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/esm2022/lib/components/atoms/glass/glass.component.mjs +125 -0
- package/esm2022/lib/components/atoms/glass/types.mjs +2 -0
- package/esm2022/lib/components/atoms/pattern/pattern.component.mjs +8 -4
- package/esm2022/lib/services/icons.service.mjs +7 -2
- package/esm2022/lib/version.mjs +2 -2
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/valtech-components.mjs +137 -6
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/atoms/glass/glass.component.d.ts +43 -0
- package/lib/components/atoms/glass/types.d.ts +70 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { GlassMetadata } from './types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* `val-glass`
|
|
5
|
+
*
|
|
6
|
+
* Capa **glassmorphism** reusable. Frosted glass overlay con backdrop blur,
|
|
7
|
+
* tint semi-translúcido, border sutil y shadow. Acepta cualquier contenido via
|
|
8
|
+
* `<ng-content>` — desde un texto a un card entero.
|
|
9
|
+
*
|
|
10
|
+
* Ideal sobre backgrounds decorativos (val-pattern, gradients, imágenes) para
|
|
11
|
+
* mejorar legibilidad del contenido sin tapar la decoración.
|
|
12
|
+
*
|
|
13
|
+
* @example Pill sobre patrón:
|
|
14
|
+
* ```html
|
|
15
|
+
* <val-glass><h1>Buenos días</h1></val-glass>
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @example Card glass (block) con auto tint:
|
|
19
|
+
* ```html
|
|
20
|
+
* <val-glass [props]="{ tint: 'auto', display: 'block', radius: '20px', padding: '24px' }">
|
|
21
|
+
* <p>Contenido del card</p>
|
|
22
|
+
* </val-glass>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare class GlassComponent {
|
|
26
|
+
private readonly props_;
|
|
27
|
+
set props(value: GlassMetadata | undefined);
|
|
28
|
+
/** Snapshot reactivo de los props con defaults aplicados. */
|
|
29
|
+
readonly resolvedProps: import("@angular/core").Signal<GlassMetadata>;
|
|
30
|
+
/**
|
|
31
|
+
* Resuelve el background según `tint` + `tintAlpha`.
|
|
32
|
+
* - `'dark'` → rgba purple-dark
|
|
33
|
+
* - `'light'` → rgba blanco
|
|
34
|
+
* - `'auto'` → CSS var con fallback (resolved vía media/class del tema)
|
|
35
|
+
* - custom string → usado tal cual
|
|
36
|
+
*/
|
|
37
|
+
readonly bgStyle: import("@angular/core").Signal<string>;
|
|
38
|
+
readonly filterStyle: import("@angular/core").Signal<string>;
|
|
39
|
+
readonly borderStyle: import("@angular/core").Signal<"none" | "1px solid rgba(0, 0, 0, 0.08)" | "1px solid rgba(255, 255, 255, 0.08)">;
|
|
40
|
+
readonly shadowStyle: import("@angular/core").Signal<"none" | "0 2px 8px rgba(0, 0, 0, 0.15)" | "0 12px 40px rgba(0, 0, 0, 0.35)" | "0 4px 24px rgba(0, 0, 0, 0.25)">;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GlassComponent, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GlassComponent, "val-glass", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
43
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuración del componente `val-glass`.
|
|
3
|
+
*
|
|
4
|
+
* Capa glassmorphism (frosted glass) — backdrop blur + tint semi-translúcido +
|
|
5
|
+
* border sutil + shadow. Diseñada para usarse SOBRE backgrounds decorativos
|
|
6
|
+
* (patterns, gradients, hero images) para mejorar legibilidad del contenido
|
|
7
|
+
* sin tapar la decoración.
|
|
8
|
+
*
|
|
9
|
+
* @example Pill sobre patrón (greeting hero):
|
|
10
|
+
* ```html
|
|
11
|
+
* <val-glass>
|
|
12
|
+
* <h1>Buenos días, Juan</h1>
|
|
13
|
+
* </val-glass>
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @example Card glass auto-tint según tema:
|
|
17
|
+
* ```html
|
|
18
|
+
* <val-glass [props]="{ tint: 'auto', radius: '20px', padding: '24px', display: 'block' }">
|
|
19
|
+
* <p>Contenido</p>
|
|
20
|
+
* </val-glass>
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @example Light glass sobre dark bg:
|
|
24
|
+
* ```html
|
|
25
|
+
* <val-glass [props]="{ tint: 'light', tintAlpha: 0.15, blur: 16 }">
|
|
26
|
+
* ...
|
|
27
|
+
* </val-glass>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export interface GlassMetadata {
|
|
31
|
+
/**
|
|
32
|
+
* Tint del fondo. Built-in:
|
|
33
|
+
* - `'dark'` (default) — `rgba(14, 4, 32, alpha)` — combina con palette Valtech purple
|
|
34
|
+
* - `'light'` — `rgba(255, 255, 255, alpha)` — para usar sobre dark bg
|
|
35
|
+
* - `'auto'` — switch por tema activo (`body.dark` → dark, sino light)
|
|
36
|
+
*
|
|
37
|
+
* También acepta una string CSS color custom (`rgba(...)`, `hsl(...)`, hex).
|
|
38
|
+
* Si pasas custom, `tintAlpha` se ignora.
|
|
39
|
+
*/
|
|
40
|
+
tint?: 'dark' | 'light' | 'auto' | string;
|
|
41
|
+
/** Alpha del tint (0..1). Default `0.55`. Ignorado si `tint` es custom string. */
|
|
42
|
+
tintAlpha?: number;
|
|
43
|
+
/** Blur radius en px. Default `10`. Subir a 16-24 para más frosting. */
|
|
44
|
+
blur?: number;
|
|
45
|
+
/** Saturate filter % (acompañando blur). Default `140`. */
|
|
46
|
+
saturate?: number;
|
|
47
|
+
/** Border radius. Cualquier CSS length. Default `'14px'`. */
|
|
48
|
+
radius?: string;
|
|
49
|
+
/** Padding interno. CSS shorthand. Default `'10px 18px'`. */
|
|
50
|
+
padding?: string;
|
|
51
|
+
/** Mostrar border sutil (1px rgba blanco). Default `true`. */
|
|
52
|
+
border?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Elevación de shadow:
|
|
55
|
+
* - `'none'` — sin shadow
|
|
56
|
+
* - `'sm'` — `0 2px 8px rgba(0,0,0,0.15)`
|
|
57
|
+
* - `'md'` (default) — `0 4px 24px rgba(0,0,0,0.25)`
|
|
58
|
+
* - `'lg'` — `0 12px 40px rgba(0,0,0,0.35)`
|
|
59
|
+
*/
|
|
60
|
+
elevation?: 'none' | 'sm' | 'md' | 'lg';
|
|
61
|
+
/**
|
|
62
|
+
* Display mode:
|
|
63
|
+
* - `'inline-block'` (default) — fit-content, ideal para pills/badges
|
|
64
|
+
* - `'block'` — fill parent width, ideal para cards
|
|
65
|
+
* - `'flex'` — flex column, ideal para layouts internos
|
|
66
|
+
*/
|
|
67
|
+
display?: 'inline-block' | 'block' | 'flex';
|
|
68
|
+
/** Clase CSS extra. */
|
|
69
|
+
cssClass?: string;
|
|
70
|
+
}
|
package/lib/version.d.ts
CHANGED
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -44,6 +44,8 @@ export * from './lib/components/atoms/rights-footer/types';
|
|
|
44
44
|
export * from './lib/components/atoms/pattern/pattern.component';
|
|
45
45
|
export * from './lib/components/atoms/pattern/types';
|
|
46
46
|
export * from './lib/components/atoms/pattern/motifs';
|
|
47
|
+
export * from './lib/components/atoms/glass/glass.component';
|
|
48
|
+
export { GlassMetadata } from './lib/components/atoms/glass/types';
|
|
47
49
|
export * from './lib/components/molecules/alert-box/alert-box.component';
|
|
48
50
|
export * from './lib/components/molecules/alert-box/types';
|
|
49
51
|
export * from './lib/components/molecules/button-group/button-group.component';
|