cps-ui-kit 21.22.0 → 21.23.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.22.0",
3
+ "version": "21.23.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.2.6",
6
6
  "@angular/core": "^21.2.6",
@@ -4090,7 +4090,7 @@ declare class CpsTagComponent implements ControlValueAccessor, OnChanges {
4090
4090
  * CpsTextareaComponent is a textarea component.
4091
4091
  * @group Components
4092
4092
  */
4093
- declare class CpsTextareaComponent implements ControlValueAccessor, OnInit, OnDestroy {
4093
+ declare class CpsTextareaComponent implements ControlValueAccessor, OnInit, OnChanges, OnDestroy, AfterViewInit {
4094
4094
  private _control;
4095
4095
  private _elementRef;
4096
4096
  /**
@@ -4098,6 +4098,11 @@ declare class CpsTextareaComponent implements ControlValueAccessor, OnInit, OnDe
4098
4098
  * @group Props
4099
4099
  */
4100
4100
  label: string;
4101
+ /**
4102
+ * Aria label for the textarea component, used for accessibility, it takes precedence over label.
4103
+ * @group Props
4104
+ */
4105
+ ariaLabel: string;
4101
4106
  /**
4102
4107
  * Placeholder text for the textarea.
4103
4108
  * @group Props
@@ -4118,6 +4123,16 @@ declare class CpsTextareaComponent implements ControlValueAccessor, OnInit, OnDe
4118
4123
  * @group Props
4119
4124
  */
4120
4125
  autofocus: boolean;
4126
+ /**
4127
+ * Determines whether the value of the textarea may be checked for spelling errors.
4128
+ * @group Props
4129
+ */
4130
+ spellcheck: boolean;
4131
+ /**
4132
+ * Determines whether the value of the textarea can be automatically completed by the browser.
4133
+ * @group Props
4134
+ */
4135
+ autocomplete: string;
4121
4136
  /**
4122
4137
  * Bottom hint text for the textarea.
4123
4138
  * @group Props
@@ -4128,6 +4143,11 @@ declare class CpsTextareaComponent implements ControlValueAccessor, OnInit, OnDe
4128
4143
  * @group Props
4129
4144
  */
4130
4145
  disabled: boolean;
4146
+ /**
4147
+ * Determines whether the textarea is readonly.
4148
+ * @group Props
4149
+ */
4150
+ readonly: boolean;
4131
4151
  /**
4132
4152
  * Width of the textarea, it can be of type number denoting pixels or string.
4133
4153
  * @group Props
@@ -4158,6 +4178,12 @@ declare class CpsTextareaComponent implements ControlValueAccessor, OnInit, OnDe
4158
4178
  * @group Props
4159
4179
  */
4160
4180
  resizable: 'vertical' | 'none';
4181
+ /**
4182
+ * Maximum height of the textarea during resize, of type number denoting pixels or string.
4183
+ * Accepts only units of px, rem and em. When resizable is set to 'none', this prop has no effect.
4184
+ * @group Props
4185
+ */
4186
+ maxHeight: number | string;
4161
4187
  /**
4162
4188
  * When it is not an empty string, an info icon is displayed to show text for more info.
4163
4189
  * @group Props
@@ -4214,13 +4240,28 @@ declare class CpsTextareaComponent implements ControlValueAccessor, OnInit, OnDe
4214
4240
  * @group Emits
4215
4241
  */
4216
4242
  blurred: EventEmitter<any>;
4243
+ private _textareaEl?;
4217
4244
  private _statusChangesSubscription?;
4218
4245
  private _value;
4246
+ readonly hintId: string;
4247
+ readonly errorId: string;
4248
+ get describedBy(): string | null;
4219
4249
  cvtWidth: string;
4250
+ maxHeightPx: number | null;
4251
+ isKeyboardFocused: boolean;
4252
+ private _singleRowHeightPx;
4253
+ private _mouseActivated;
4254
+ private readonly _cpsRootFontSizeService;
4255
+ private readonly _platformId;
4256
+ private readonly _resizeStepPx;
4220
4257
  constructor(_control: NgControl, _elementRef: ElementRef<HTMLElement>);
4221
4258
  ngOnInit(): void;
4259
+ ngOnChanges(changes: SimpleChanges): void;
4260
+ ngAfterViewInit(): void;
4222
4261
  ngOnDestroy(): void;
4262
+ private _updateMaxHeight;
4223
4263
  private _checkErrors;
4264
+ get isRequired(): boolean;
4224
4265
  onChange: (_event: any) => void;
4225
4266
  onTouched: () => void;
4226
4267
  registerOnChange(fn: any): void;
@@ -4229,12 +4270,16 @@ declare class CpsTextareaComponent implements ControlValueAccessor, OnInit, OnDe
4229
4270
  updateValueEvent(event: any): void;
4230
4271
  private _updateValue;
4231
4272
  clear(): void;
4273
+ onClear(event: Event): void;
4274
+ get isClearButtonVisible(): boolean;
4232
4275
  setDisabledState(_disabled: boolean): void;
4233
4276
  onBlur(): void;
4234
4277
  onFocus(): void;
4278
+ onTextareaMousedown(): void;
4235
4279
  focus(): void;
4280
+ onResizeHandleKeydown(event: KeyboardEvent): void;
4236
4281
  static ɵfac: i0.ɵɵFactoryDeclaration<CpsTextareaComponent, [{ optional: true; self: true; }, null]>;
4237
- static ɵcmp: i0.ɵɵComponentDeclaration<CpsTextareaComponent, "cps-textarea", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "cols": { "alias": "cols"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "width": { "alias": "width"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "hideDetails": { "alias": "hideDetails"; "required": false; }; "persistentClear": { "alias": "persistentClear"; "required": false; }; "error": { "alias": "error"; "required": false; }; "resizable": { "alias": "resizable"; "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; }; "value": { "alias": "value"; "required": false; }; }, { "valueChanged": "valueChanged"; "focused": "focused"; "prefixIconClicked": "prefixIconClicked"; "blurred": "blurred"; }, never, never, true, never>;
4282
+ static ɵcmp: i0.ɵɵComponentDeclaration<CpsTextareaComponent, "cps-textarea", never, { "label": { "alias": "label"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "cols": { "alias": "cols"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "spellcheck": { "alias": "spellcheck"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "width": { "alias": "width"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "hideDetails": { "alias": "hideDetails"; "required": false; }; "persistentClear": { "alias": "persistentClear"; "required": false; }; "error": { "alias": "error"; "required": false; }; "resizable": { "alias": "resizable"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "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; }; "value": { "alias": "value"; "required": false; }; }, { "valueChanged": "valueChanged"; "focused": "focused"; "prefixIconClicked": "prefixIconClicked"; "blurred": "blurred"; }, never, never, true, never>;
4238
4283
  }
4239
4284
 
4240
4285
  /**