cps-ui-kit 17.11.0 → 17.12.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.
@@ -0,0 +1,72 @@
1
+ import { ElementRef, EventEmitter } from '@angular/core';
2
+ import { ControlValueAccessor, NgControl } from '@angular/forms';
3
+ import { CpsTooltipPosition } from '../../directives/cps-tooltip/cps-tooltip.directive';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * CpsSwitchComponent is a component used to toggle a boolean value.
7
+ * @group Components
8
+ */
9
+ export declare class CpsSwitchComponent implements ControlValueAccessor {
10
+ private _control;
11
+ private _elementRef;
12
+ /**
13
+ * Label of the component.
14
+ * @group Props
15
+ */
16
+ label: string;
17
+ /**
18
+ * Determines whether the component is disabled.
19
+ * @group Props
20
+ */
21
+ disabled: boolean;
22
+ /**
23
+ * When it is not an empty string, an info icon is displayed to show text for more info.
24
+ * @group Props
25
+ */
26
+ infoTooltip: string;
27
+ /**
28
+ * InfoTooltip class for styling.
29
+ * @group Props
30
+ */
31
+ infoTooltipClass: string;
32
+ /**
33
+ * Size of infoTooltip, of type number denoting pixels or string.
34
+ * @group Props
35
+ */
36
+ infoTooltipMaxWidth: number | string;
37
+ /**
38
+ * Determines whether the infoTooltip is persistent.
39
+ * @group Props
40
+ */
41
+ infoTooltipPersistent: boolean;
42
+ /**
43
+ * Position of infoTooltip, it can be 'top', 'bottom', 'left' or 'right'.
44
+ * @group Props
45
+ */
46
+ infoTooltipPosition: CpsTooltipPosition;
47
+ /**
48
+ * Value of the switch component.
49
+ * @group Props
50
+ */
51
+ set value(value: boolean);
52
+ get value(): boolean;
53
+ /**
54
+ * Callback to invoke on value change.
55
+ * @param {boolean} boolean - value changed.
56
+ * @group Emits
57
+ */
58
+ valueChanged: EventEmitter<boolean>;
59
+ private _value;
60
+ constructor(_control: NgControl, _elementRef: ElementRef<HTMLElement>);
61
+ onChange: (event: any) => void;
62
+ onTouched: () => void;
63
+ registerOnChange(fn: any): void;
64
+ registerOnTouched(fn: any): void;
65
+ writeValue(value: boolean): void;
66
+ updateValueEvent(event: any): void;
67
+ private _updateValue;
68
+ setDisabledState(disabled: boolean): void;
69
+ focus(): void;
70
+ static ɵfac: i0.ɵɵFactoryDeclaration<CpsSwitchComponent, [{ optional: true; self: true; }, null]>;
71
+ static ɵcmp: i0.ɵɵComponentDeclaration<CpsSwitchComponent, "cps-switch", never, { "label": { "alias": "label"; "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; }; "value": { "alias": "value"; "required": false; }; }, { "valueChanged": "valueChanged"; }, never, never, true, never>;
72
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cps-ui-kit",
3
- "version": "17.11.0",
3
+ "version": "17.12.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.1.2",
6
6
  "@angular/core": "^17.1.2",
package/public-api.d.ts CHANGED
@@ -39,6 +39,7 @@ export * from './lib/components/cps-tab-group/cps-tab/cps-tab.component';
39
39
  export * from './lib/components/cps-timepicker/cps-timepicker.component';
40
40
  export * from './lib/components/cps-file-upload/cps-file-upload.component';
41
41
  export * from './lib/components/cps-scheduler/cps-scheduler.component';
42
+ export * from './lib/components/cps-switch/cps-switch.component';
42
43
  export * from './lib/directives/cps-tooltip/cps-tooltip.directive';
43
44
  export * from './lib/services/cps-dialog/cps-dialog.service';
44
45
  export * from './lib/services/cps-dialog/utils/cps-dialog-config';