cps-ui-kit 21.0.0 → 21.2.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.0.0",
3
+ "version": "21.2.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.2.6",
6
6
  "@angular/core": "^21.2.6",
@@ -269,7 +269,8 @@
269
269
  //Text
270
270
  --cps-color-text-lightest: #b5b2b2;
271
271
  --cps-color-text-light: #9a9595;
272
- --cps-color-text-mild: #787272;
272
+ --cps-color-text-mild: #6a6565;
273
+ --cps-color-text-medium: #5e5858;
273
274
  --cps-color-text-dark: #524a4a;
274
275
  --cps-color-text-darkest: #2d2323;
275
276
  }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Focus ring mixin for interactive elements.
3
+ *
4
+ * Renders a dual-color focus indicator (inner + outer ring)
5
+ * to ensure visibility on light and dark backgrounds and meet accessibility requirements.
6
+ */
7
+ @mixin focus-ring(
8
+ $radius: 0.375rem,
9
+ $inner-offset: 0.125rem,
10
+ $outer-offset: 0.25rem,
11
+ $inner-width: 0.0625rem,
12
+ $outer-width: 0.0625rem
13
+ ) {
14
+ &:focus-visible {
15
+ position: relative;
16
+ }
17
+
18
+ &:focus-visible::before,
19
+ &:focus-visible::after {
20
+ content: '';
21
+ position: absolute;
22
+ border-radius: $radius;
23
+ }
24
+
25
+ &:focus-visible::before {
26
+ inset: -#{$inner-offset}; /* inner offset */
27
+ border: $inner-width solid var(--cps-color-calm);
28
+ }
29
+
30
+ &:focus-visible::after {
31
+ inset: -#{$outer-offset}; /* outer offset */
32
+ border: $outer-width solid var(--cps-color-calm-highlighten);
33
+ }
34
+ }
@@ -1312,6 +1312,7 @@ declare class CpsAutocompleteComponent implements ControlValueAccessor, OnInit,
1312
1312
  error: string;
1313
1313
  cvtWidth: string;
1314
1314
  isOpened: boolean;
1315
+ isActive: boolean;
1315
1316
  inputText: string;
1316
1317
  inputTextDebounced: string;
1317
1318
  filteredOptions: any[];
@@ -1323,9 +1324,13 @@ declare class CpsAutocompleteComponent implements ControlValueAccessor, OnInit,
1323
1324
  autocompleteBoxWidth: number;
1324
1325
  resizeObserver: ResizeObserver;
1325
1326
  isTimePickerField: boolean;
1327
+ optionsListId: string;
1328
+ selectAllOptionId: string;
1329
+ private _optionIdPrefix;
1326
1330
  private _inputChangeSubject$;
1327
1331
  private _destroy$;
1328
1332
  private _options;
1333
+ private _optionIds;
1329
1334
  constructor(_control: NgControl, document: Document, cdRef: ChangeDetectorRef, _labelByValue: LabelByValuePipe);
1330
1335
  ngOnInit(): void;
1331
1336
  ngOnChanges(changes: SimpleChanges): void;
@@ -1344,7 +1349,6 @@ declare class CpsAutocompleteComponent implements ControlValueAccessor, OnInit,
1344
1349
  setDisabledState(disabled: boolean): void;
1345
1350
  onBlur(): void;
1346
1351
  onFocus(): void;
1347
- isActive(): boolean;
1348
1352
  onBeforeOptionsHidden(reason: CpsMenuHideReason): void;
1349
1353
  onBoxClick(): void;
1350
1354
  onContainerKeyDown(event: any): void;
@@ -1355,6 +1359,13 @@ declare class CpsAutocompleteComponent implements ControlValueAccessor, OnInit,
1355
1359
  recalcVirtualListHeight(): void;
1356
1360
  isEmptyValue(): boolean;
1357
1361
  clearInput(): void;
1362
+ get computedLabel(): string;
1363
+ get isSelectAllVisible(): boolean;
1364
+ get optionsAriaSetSize(): number;
1365
+ get activeDescendantId(): string | null;
1366
+ getOptionAriaPosInSet(itemIndex: number): number;
1367
+ getOptionId(option: any, index: number): string;
1368
+ private _buildOptionId;
1358
1369
  private _getEmptyValue;
1359
1370
  private _toggleOptions;
1360
1371
  private _clickOption;
@@ -1362,10 +1373,14 @@ declare class CpsAutocompleteComponent implements ControlValueAccessor, OnInit,
1362
1373
  private updateValue;
1363
1374
  private _getValueLabel;
1364
1375
  private _closeAndClear;
1365
- private _getHTMLOptions;
1366
1376
  private _dehighlightOption;
1377
+ private _getHighlightedOptionId;
1367
1378
  private _highlightOption;
1368
1379
  private _navigateOptionsByArrows;
1380
+ private _navigateVirtualOptionsByArrows;
1381
+ private _nextHighlightIndex;
1382
+ private _syncVirtualHighlightedOptionIntoView;
1383
+ private _scrollVirtualListToIndex;
1369
1384
  private _confirmInput;
1370
1385
  private _removeLastValue;
1371
1386
  static ɵfac: i0.ɵɵFactoryDeclaration<CpsAutocompleteComponent, [{ optional: true; self: true; }, null, null, null]>;
@@ -3755,6 +3770,11 @@ declare class CpsChipComponent implements OnChanges {
3755
3770
  * @group Props
3756
3771
  */
3757
3772
  disabled: boolean;
3773
+ /**
3774
+ * Aria label for the close button.
3775
+ * @group Props
3776
+ */
3777
+ closeButtonAriaLabel: string;
3758
3778
  /**
3759
3779
  * Callback to invoke on chip close.
3760
3780
  * @param {string} string - Chip closed.
@@ -3766,7 +3786,7 @@ declare class CpsChipComponent implements OnChanges {
3766
3786
  setClasses(): void;
3767
3787
  onCloseClick(event: any): void;
3768
3788
  static ɵfac: i0.ɵɵFactoryDeclaration<CpsChipComponent, never>;
3769
- static ɵcmp: i0.ɵɵComponentDeclaration<CpsChipComponent, "cps-chip", never, { "label": { "alias": "label"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "iconPosition": { "alias": "iconPosition"; "required": false; }; "closable": { "alias": "closable"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "closed": "closed"; }, never, never, true, never>;
3789
+ static ɵcmp: i0.ɵɵComponentDeclaration<CpsChipComponent, "cps-chip", never, { "label": { "alias": "label"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "iconPosition": { "alias": "iconPosition"; "required": false; }; "closable": { "alias": "closable"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "closeButtonAriaLabel": { "alias": "closeButtonAriaLabel"; "required": false; }; }, { "closed": "closed"; }, never, never, true, never>;
3770
3790
  }
3771
3791
 
3772
3792
  /**