valtech-components 4.0.111 → 4.0.113
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/molecules/option-cards/option-cards.component.mjs +102 -0
- package/esm2022/lib/components/molecules/option-cards/types.mjs +2 -0
- package/esm2022/lib/services/theme.service.mjs +18 -3
- package/esm2022/lib/version.mjs +2 -2
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/valtech-components.mjs +119 -5
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/option-cards/option-cards.component.d.ts +31 -0
- package/lib/components/molecules/option-cards/types.d.ts +10 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { OptionCardItem } from './types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* val-option-cards
|
|
6
|
+
*
|
|
7
|
+
* Lista de cards seleccionables con radio — para elegir una opción
|
|
8
|
+
* (método de pago, plan, modo de entrega, etc.).
|
|
9
|
+
*
|
|
10
|
+
* Soporta items con logo (imagen), badge de "próximamente" en disabled,
|
|
11
|
+
* y color de selección configurable vía CSS custom properties:
|
|
12
|
+
* --oc-selected-color borde activo (default: --ion-color-primary)
|
|
13
|
+
* --oc-selected-bg fondo de card activa (default: primary 5%)
|
|
14
|
+
* --oc-gap gap entre cards (default: 20px)
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <val-option-cards
|
|
18
|
+
* [items]="pmItems"
|
|
19
|
+
* [value]="payMethod()"
|
|
20
|
+
* (valueChange)="payMethod.set($event)"
|
|
21
|
+
* style="--oc-selected-color: var(--bingo-magenta); --oc-selected-bg: rgba(255,0,178,0.04)"
|
|
22
|
+
* />
|
|
23
|
+
*/
|
|
24
|
+
export declare class OptionCardsComponent {
|
|
25
|
+
items: OptionCardItem[];
|
|
26
|
+
value: string;
|
|
27
|
+
valueChange: EventEmitter<string>;
|
|
28
|
+
select(item: OptionCardItem): void;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OptionCardsComponent, never>;
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OptionCardsComponent, "val-option-cards", never, { "items": { "alias": "items"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface OptionCardItem {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
/** URL de imagen/logo mostrada a la izquierda del label. */
|
|
5
|
+
logoSrc?: string;
|
|
6
|
+
/** Deshabilita la selección y muestra un badge opcional. */
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
/** Texto del chip/badge cuando disabled=true (ej: "Próximamente"). */
|
|
9
|
+
badge?: string;
|
|
10
|
+
}
|
package/lib/version.d.ts
CHANGED
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -96,6 +96,8 @@ export * from './lib/components/molecules/progress-status/progress-status.compon
|
|
|
96
96
|
export * from './lib/components/molecules/progress-status/types';
|
|
97
97
|
export * from './lib/components/molecules/prompter/prompter.component';
|
|
98
98
|
export * from './lib/components/molecules/prompter/types';
|
|
99
|
+
export * from './lib/components/molecules/option-cards/option-cards.component';
|
|
100
|
+
export * from './lib/components/molecules/option-cards/types';
|
|
99
101
|
export * from './lib/components/molecules/radio-input/radio-input.component';
|
|
100
102
|
export * from './lib/components/molecules/range-input/range-input.component';
|
|
101
103
|
export * from './lib/components/molecules/range-input/types';
|