cps-ui-kit 21.20.0 → 21.22.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cps-ui-kit",
3
- "version": "21.20.0",
3
+ "version": "21.22.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.2.6",
6
6
  "@angular/core": "^21.2.6",
@@ -646,6 +646,7 @@ declare class CpsAutocompleteComponent implements ControlValueAccessor, OnInit,
646
646
  cvtWidth: string;
647
647
  isOpened: boolean;
648
648
  isActive: boolean;
649
+ isKeyboardFocused: boolean;
649
650
  inputText: string;
650
651
  inputTextDebounced: string;
651
652
  filteredOptions: any[];
@@ -660,10 +661,14 @@ declare class CpsAutocompleteComponent implements ControlValueAccessor, OnInit,
660
661
  isTimePickerField: boolean;
661
662
  readonly optionsListId: string;
662
663
  readonly selectAllOptionId: string;
664
+ readonly hintId: string;
665
+ readonly errorId: string;
666
+ get describedBy(): string | null;
663
667
  private readonly _optionIdPrefix;
664
668
  private readonly _cpsRootFontSizeService;
665
669
  private _inputChangeSubject$;
666
670
  private _destroy$;
671
+ private _mouseActivated;
667
672
  private _options;
668
673
  private _optionIds;
669
674
  constructor(_control: NgControl, cdRef: ChangeDetectorRef, _labelByValue: LabelByValuePipe);
@@ -685,7 +690,7 @@ declare class CpsAutocompleteComponent implements ControlValueAccessor, OnInit,
685
690
  onBlur(): void;
686
691
  onFocus(): void;
687
692
  onBeforeOptionsHidden(reason: CpsMenuHideReason): void;
688
- onBoxClick(): void;
693
+ onBoxClick(fromKeyboard?: boolean): void;
689
694
  onContainerKeyDown(event: any): void;
690
695
  onInputKeyDown(event: any): void;
691
696
  onChevronClick(event: any): void;
@@ -695,7 +700,6 @@ declare class CpsAutocompleteComponent implements ControlValueAccessor, OnInit,
695
700
  hasSelectedValue(): boolean;
696
701
  clearInput(): void;
697
702
  get isRequired(): boolean;
698
- get computedLabel(): string | null;
699
703
  get isSelectAllVisible(): boolean;
700
704
  get optionsAriaSetSize(): number;
701
705
  get activeDescendantId(): string | null;
@@ -1088,15 +1092,19 @@ type CpsInputAppearanceType = 'outlined' | 'underlined' | 'borderless';
1088
1092
  * CpsInputComponent is used to enter values in a certain formats such as numeric, text or password.
1089
1093
  * @group Components
1090
1094
  */
1091
- declare class CpsInputComponent implements ControlValueAccessor, OnInit, AfterViewInit, OnDestroy {
1095
+ declare class CpsInputComponent implements ControlValueAccessor, OnInit, OnChanges, OnDestroy {
1092
1096
  private _control;
1093
1097
  elementRef: ElementRef<HTMLElement>;
1094
- private cdRef;
1095
1098
  /**
1096
1099
  * Label of the input element.
1097
1100
  * @group Props
1098
1101
  */
1099
1102
  label: string;
1103
+ /**
1104
+ * Aria label for the input component, used for accessibility, it takes precedence over label.
1105
+ * @group Props
1106
+ */
1107
+ ariaLabel: string;
1100
1108
  /**
1101
1109
  * Bottom hint text for the input field.
1102
1110
  * @group Props
@@ -1117,6 +1125,16 @@ declare class CpsInputComponent implements ControlValueAccessor, OnInit, AfterVi
1117
1125
  * @group Props
1118
1126
  */
1119
1127
  readonly: boolean;
1128
+ /**
1129
+ * Determines whether the value of the input can be automatically completed by the browser.
1130
+ * @group Props
1131
+ */
1132
+ autocomplete: string;
1133
+ /**
1134
+ * Determines whether the value of the input may be checked for spelling errors.
1135
+ * @group Props
1136
+ */
1137
+ spellcheck: boolean;
1120
1138
  /**
1121
1139
  * Width of the input field, of type number denoting pixels or string.
1122
1140
  * @group Props
@@ -1152,6 +1170,11 @@ declare class CpsInputComponent implements ControlValueAccessor, OnInit, AfterVi
1152
1170
  * @group Props
1153
1171
  */
1154
1172
  prefixIconSize: iconSizeType;
1173
+ /**
1174
+ * Aria label for the clickable prefix icon, required when prefixIconClickable is true.
1175
+ * @group Props
1176
+ */
1177
+ prefixIconAriaLabel: string;
1155
1178
  /**
1156
1179
  * Text before input value.
1157
1180
  * @group Props
@@ -1250,15 +1273,18 @@ declare class CpsInputComponent implements ControlValueAccessor, OnInit, AfterVi
1250
1273
  * @group Emits
1251
1274
  */
1252
1275
  enterClicked: EventEmitter<any>;
1253
- prefixTextSpan: ElementRef | undefined;
1254
1276
  currentType: string;
1255
- prefixWidth: string;
1256
1277
  cvtWidth: string;
1278
+ isKeyboardFocused: boolean;
1279
+ readonly hintId: string;
1280
+ readonly errorId: string;
1281
+ get describedBy(): string | null;
1282
+ private _mouseActivated;
1257
1283
  private _statusChangesSubscription?;
1258
1284
  private _value;
1259
- constructor(_control: NgControl, elementRef: ElementRef<HTMLElement>, cdRef: ChangeDetectorRef);
1285
+ constructor(_control: NgControl, elementRef: ElementRef<HTMLElement>);
1260
1286
  ngOnInit(): void;
1261
- ngAfterViewInit(): void;
1287
+ ngOnChanges(changes: SimpleChanges): void;
1262
1288
  ngOnDestroy(): void;
1263
1289
  private _checkErrors;
1264
1290
  onChange: (_event: any) => void;
@@ -1273,12 +1299,14 @@ declare class CpsInputComponent implements ControlValueAccessor, OnInit, AfterVi
1273
1299
  clear(): void;
1274
1300
  togglePassword(): void;
1275
1301
  setDisabledState(_disabled: boolean): void;
1302
+ get isRequired(): boolean;
1276
1303
  onClickPrefixIcon(): void;
1277
1304
  onBlur(): void;
1278
1305
  onFocus(): void;
1306
+ onInputMousedown(): void;
1279
1307
  focus(): void;
1280
- static ɵfac: i0.ɵɵFactoryDeclaration<CpsInputComponent, [{ optional: true; self: true; }, null, null]>;
1281
- static ɵcmp: i0.ɵɵComponentDeclaration<CpsInputComponent, "cps-input", never, { "label": { "alias": "label"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "width": { "alias": "width"; "required": false; }; "type": { "alias": "type"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "prefixIcon": { "alias": "prefixIcon"; "required": false; }; "prefixIconClickable": { "alias": "prefixIconClickable"; "required": false; }; "prefixIconSize": { "alias": "prefixIconSize"; "required": false; }; "prefixText": { "alias": "prefixText"; "required": false; }; "hideDetails": { "alias": "hideDetails"; "required": false; }; "persistentClear": { "alias": "persistentClear"; "required": false; }; "error": { "alias": "error"; "required": false; }; "infoTooltip": { "alias": "infoTooltip"; "required": false; }; "infoTooltipClass": { "alias": "infoTooltipClass"; "required": false; }; "infoTooltipMaxWidth": { "alias": "infoTooltipMaxWidth"; "required": false; }; "infoTooltipPersistent": { "alias": "infoTooltipPersistent"; "required": false; }; "infoTooltipPosition": { "alias": "infoTooltipPosition"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "valueToDisplay": { "alias": "valueToDisplay"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChanged": "valueChanged"; "focused": "focused"; "prefixIconClicked": "prefixIconClicked"; "blurred": "blurred"; "cleared": "cleared"; "enterClicked": "enterClicked"; }, never, never, true, never>;
1308
+ static ɵfac: i0.ɵɵFactoryDeclaration<CpsInputComponent, [{ optional: true; self: true; }, null]>;
1309
+ static ɵcmp: i0.ɵɵComponentDeclaration<CpsInputComponent, "cps-input", never, { "label": { "alias": "label"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "spellcheck": { "alias": "spellcheck"; "required": false; }; "width": { "alias": "width"; "required": false; }; "type": { "alias": "type"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "prefixIcon": { "alias": "prefixIcon"; "required": false; }; "prefixIconClickable": { "alias": "prefixIconClickable"; "required": false; }; "prefixIconSize": { "alias": "prefixIconSize"; "required": false; }; "prefixIconAriaLabel": { "alias": "prefixIconAriaLabel"; "required": false; }; "prefixText": { "alias": "prefixText"; "required": false; }; "hideDetails": { "alias": "hideDetails"; "required": false; }; "persistentClear": { "alias": "persistentClear"; "required": false; }; "error": { "alias": "error"; "required": false; }; "infoTooltip": { "alias": "infoTooltip"; "required": false; }; "infoTooltipClass": { "alias": "infoTooltipClass"; "required": false; }; "infoTooltipMaxWidth": { "alias": "infoTooltipMaxWidth"; "required": false; }; "infoTooltipPersistent": { "alias": "infoTooltipPersistent"; "required": false; }; "infoTooltipPosition": { "alias": "infoTooltipPosition"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "valueToDisplay": { "alias": "valueToDisplay"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChanged": "valueChanged"; "focused": "focused"; "prefixIconClicked": "prefixIconClicked"; "blurred": "blurred"; "cleared": "cleared"; "enterClicked": "enterClicked"; }, never, never, true, never>;
1282
1310
  }
1283
1311
 
1284
1312
  /**
@@ -1290,13 +1318,18 @@ type CpsDatepickerAppearanceType = 'outlined' | 'underlined' | 'borderless';
1290
1318
  * CpsDatepickerComponent is an input component to provide date input.
1291
1319
  * @group Components
1292
1320
  */
1293
- declare class CpsDatepickerComponent implements ControlValueAccessor, OnInit, OnDestroy {
1321
+ declare class CpsDatepickerComponent implements ControlValueAccessor, OnInit, OnChanges, OnDestroy {
1294
1322
  private _control;
1295
1323
  /**
1296
1324
  * Label of the datepicker element.
1297
1325
  * @group Props
1298
1326
  */
1299
1327
  label: string;
1328
+ /**
1329
+ * Aria label for the datepicker component, used for accessibility, it takes precedence over label.
1330
+ * @group Props
1331
+ */
1332
+ ariaLabel: string;
1300
1333
  /**
1301
1334
  * Determines whether datepicker is disabled.
1302
1335
  * @group Props
@@ -1405,6 +1438,7 @@ declare class CpsDatepickerComponent implements ControlValueAccessor, OnInit, On
1405
1438
  private _value;
1406
1439
  constructor(_control: NgControl);
1407
1440
  ngOnInit(): void;
1441
+ ngOnChanges(): void;
1408
1442
  ngOnDestroy(): void;
1409
1443
  onChange: (_event: any) => void;
1410
1444
  onTouched: () => void;
@@ -1431,7 +1465,7 @@ declare class CpsDatepickerComponent implements ControlValueAccessor, OnInit, On
1431
1465
  focusInput(): void;
1432
1466
  toggleCalendar(show?: boolean): void;
1433
1467
  static ɵfac: i0.ɵɵFactoryDeclaration<CpsDatepickerComponent, [{ optional: true; self: true; }]>;
1434
- static ɵcmp: i0.ɵɵComponentDeclaration<CpsDatepickerComponent, "cps-datepicker", never, { "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "width": { "alias": "width"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "hideDetails": { "alias": "hideDetails"; "required": false; }; "persistentClear": { "alias": "persistentClear"; "required": false; }; "showTodayButton": { "alias": "showTodayButton"; "required": false; }; "openOnInputFocus": { "alias": "openOnInputFocus"; "required": false; }; "infoTooltip": { "alias": "infoTooltip"; "required": false; }; "infoTooltipClass": { "alias": "infoTooltipClass"; "required": false; }; "infoTooltipMaxWidth": { "alias": "infoTooltipMaxWidth"; "required": false; }; "infoTooltipPersistent": { "alias": "infoTooltipPersistent"; "required": false; }; "infoTooltipPosition": { "alias": "infoTooltipPosition"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChanged": "valueChanged"; }, never, never, true, never>;
1468
+ static ɵcmp: i0.ɵɵComponentDeclaration<CpsDatepickerComponent, "cps-datepicker", never, { "label": { "alias": "label"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "width": { "alias": "width"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "hideDetails": { "alias": "hideDetails"; "required": false; }; "persistentClear": { "alias": "persistentClear"; "required": false; }; "showTodayButton": { "alias": "showTodayButton"; "required": false; }; "openOnInputFocus": { "alias": "openOnInputFocus"; "required": false; }; "infoTooltip": { "alias": "infoTooltip"; "required": false; }; "infoTooltipClass": { "alias": "infoTooltipClass"; "required": false; }; "infoTooltipMaxWidth": { "alias": "infoTooltipMaxWidth"; "required": false; }; "infoTooltipPersistent": { "alias": "infoTooltipPersistent"; "required": false; }; "infoTooltipPosition": { "alias": "infoTooltipPosition"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChanged": "valueChanged"; }, never, never, true, never>;
1435
1469
  }
1436
1470
 
1437
1471
  /**
@@ -2006,6 +2040,9 @@ declare class CpsRadioGroupComponent implements ControlValueAccessor, OnInit, On
2006
2040
  */
2007
2041
  focused: EventEmitter<any>;
2008
2042
  readonly groupName: string;
2043
+ readonly hintId: string;
2044
+ readonly errorId: string;
2045
+ get describedBy(): string | null;
2009
2046
  private _statusChangesSubscription?;
2010
2047
  private _value;
2011
2048
  error: string;
@@ -2024,7 +2061,6 @@ declare class CpsRadioGroupComponent implements ControlValueAccessor, OnInit, On
2024
2061
  onBlur(): void;
2025
2062
  onFocus(): void;
2026
2063
  get isRequired(): boolean;
2027
- get computedLabel(): string | null;
2028
2064
  private _checkErrors;
2029
2065
  static ɵfac: i0.ɵɵFactoryDeclaration<CpsRadioGroupComponent, [{ optional: true; self: true; }]>;
2030
2066
  static ɵcmp: i0.ɵɵComponentDeclaration<CpsRadioGroupComponent, "cps-radio-group", never, { "options": { "alias": "options"; "required": false; }; "groupLabel": { "alias": "groupLabel"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "vertical": { "alias": "vertical"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "infoTooltip": { "alias": "infoTooltip"; "required": false; }; "infoTooltipClass": { "alias": "infoTooltipClass"; "required": false; }; "infoTooltipMaxWidth": { "alias": "infoTooltipMaxWidth"; "required": false; }; "infoTooltipPersistent": { "alias": "infoTooltipPersistent"; "required": false; }; "infoTooltipPosition": { "alias": "infoTooltipPosition"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "hideDetails": { "alias": "hideDetails"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChanged": "valueChanged"; "blurred": "blurred"; "focused": "focused"; }, never, ["*"], true, never>;
@@ -2171,6 +2207,9 @@ declare class CpsTimepickerComponent implements OnInit, OnChanges, AfterViewInit
2171
2207
  value: string;
2172
2208
  }[];
2173
2209
  private _statusChangesSubscription?;
2210
+ readonly hintId: string;
2211
+ readonly errorId: string;
2212
+ get describedBy(): string | null;
2174
2213
  error: string;
2175
2214
  hoursError: string;
2176
2215
  minutesError: string;
@@ -2608,6 +2647,9 @@ declare class CpsSelectComponent implements ControlValueAccessor, OnInit, OnChan
2608
2647
  private readonly _cpsRootFontSizeService;
2609
2648
  readonly optionsListId: string;
2610
2649
  readonly selectAllOptionId: string;
2650
+ readonly hintId: string;
2651
+ readonly errorId: string;
2652
+ get describedBy(): string | null;
2611
2653
  private readonly _optionIdPrefix;
2612
2654
  private _optionIds;
2613
2655
  constructor(_control: NgControl);
@@ -2642,7 +2684,6 @@ declare class CpsSelectComponent implements ControlValueAccessor, OnInit, OnChan
2642
2684
  onFocus(): void;
2643
2685
  focus(): void;
2644
2686
  get isRequired(): boolean;
2645
- get computedLabel(): string | null;
2646
2687
  get isSelectAllVisible(): boolean;
2647
2688
  get optionsAriaSetSize(): number;
2648
2689
  get activeDescendantId(): string | null;