@crowdfarming/oliva-ds 1.110.0 → 1.111.0

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.
@@ -1,24 +1,36 @@
1
- import { EventEmitter } from '@angular/core';
2
1
  import * as i0 from "@angular/core";
3
2
  export interface SegmentOption {
4
3
  label: string;
5
4
  value: any;
6
5
  iconName?: string;
7
6
  }
7
+ export interface SegmentView extends SegmentOption {
8
+ selected: boolean;
9
+ iconColor: string;
10
+ tabIndex: number;
11
+ }
8
12
  export declare class SegmentedControlComponent {
9
- options: SegmentOption[];
10
- selectedValue: any;
11
- selectionChange: EventEmitter<any>;
12
- fill: boolean;
13
- size: 'sm' | 'md';
14
- /** Cuando el usuario hace click en un segmento */
13
+ readonly options: import("@angular/core").InputSignal<SegmentOption[]>;
14
+ readonly fill: import("@angular/core").InputSignal<boolean>;
15
+ readonly size: import("@angular/core").InputSignal<"md" | "sm">;
16
+ readonly selectedValue: import("@angular/core").ModelSignal<SegmentOption>;
17
+ readonly selectionChange: import("@angular/core").OutputEmitterRef<SegmentOption>;
18
+ private readonly host;
19
+ private readonly destroyRef;
20
+ private readonly pillRef;
21
+ private readonly itemRefs;
22
+ private placed;
23
+ private observer?;
24
+ private observedItems?;
25
+ readonly classes: import("@angular/core").Signal<string>;
26
+ readonly segments: import("@angular/core").Signal<SegmentView[]>;
27
+ constructor();
28
+ /** Re-measures the pill whenever the host or any item changes size (fonts, tokens, container). */
29
+ private observeResizes;
15
30
  onSelect(option: SegmentOption): void;
16
- /** Marca si ésta opción está activa */
17
- isSelected(option: SegmentOption): boolean;
18
- /** Obtiene el color del icono según el estado */
19
- getIconColor(option: SegmentOption): string;
20
- /** Manejo simple de flechas izquierda/derecha */
21
31
  onKeydown(event: KeyboardEvent): void;
32
+ private activeItem;
33
+ private movePill;
22
34
  static ɵfac: i0.ɵɵFactoryDeclaration<SegmentedControlComponent, never>;
23
- static ɵcmp: i0.ɵɵComponentDeclaration<SegmentedControlComponent, "lib-segmented-control", never, { "options": { "alias": "options"; "required": false; }; "selectedValue": { "alias": "selectedValue"; "required": false; }; "fill": { "alias": "fill"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, never, true, never>;
35
+ static ɵcmp: i0.ɵɵComponentDeclaration<SegmentedControlComponent, "lib-segmented-control", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "fill": { "alias": "fill"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "selectedValue": { "alias": "selectedValue"; "required": false; "isSignal": true; }; }, { "selectedValue": "selectedValueChange"; "selectionChange": "selectionChange"; }, never, never, true, never>;
24
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowdfarming/oliva-ds",
3
- "version": "1.110.0",
3
+ "version": "1.111.0",
4
4
  "description": "Librería de componentes de diseño de Oliva",
5
5
  "author": "crowdfarming",
6
6
  "license": "MIT",