cps-ui-kit 0.3.0 → 0.4.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/README.md +6 -5
- package/esm2020/lib/components/cps-autocomplete/cps-autocomplete.component.mjs +509 -0
- package/esm2020/lib/components/cps-button/cps-button.component.mjs +3 -3
- package/esm2020/lib/components/cps-checkbox/cps-checkbox.component.mjs +3 -3
- package/esm2020/lib/components/cps-chip/cps-chip.component.mjs +3 -3
- package/esm2020/lib/components/cps-icon/cps-icon.component.mjs +3 -3
- package/esm2020/lib/components/cps-input/cps-input.component.mjs +7 -4
- package/esm2020/lib/components/cps-radio/cps-radio.component.mjs +3 -3
- package/esm2020/lib/components/cps-select/cps-select.component.mjs +106 -7
- package/esm2020/lib/components/cps-tag/cps-tag.component.mjs +3 -3
- package/esm2020/lib/directives/click-outside.directive.mjs +1 -1
- package/esm2020/lib/pipes/combine-labels.pipe.mjs +1 -1
- package/esm2020/lib/pipes/label-by-value.pipe.mjs +1 -1
- package/esm2020/public-api.mjs +3 -1
- package/fesm2015/cps-ui-kit.mjs +634 -22
- package/fesm2015/cps-ui-kit.mjs.map +1 -1
- package/fesm2020/cps-ui-kit.mjs +619 -22
- package/fesm2020/cps-ui-kit.mjs.map +1 -1
- package/lib/components/cps-autocomplete/cps-autocomplete.component.d.ts +81 -0
- package/lib/components/cps-input/cps-input.component.d.ts +2 -1
- package/lib/components/cps-select/cps-select.component.d.ts +15 -2
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
- package/styles/_variables.scss +1 -1
- package/styles/styles.scss +2 -2
|
@@ -18,6 +18,7 @@ export declare class CpsInputComponent implements ControlValueAccessor, OnInit,
|
|
|
18
18
|
prefixIconSize: iconSizeType;
|
|
19
19
|
prefixText: string;
|
|
20
20
|
hideDetails: boolean;
|
|
21
|
+
persistentClear: boolean;
|
|
21
22
|
set value(value: string);
|
|
22
23
|
get value(): string;
|
|
23
24
|
valueChanged: EventEmitter<string>;
|
|
@@ -46,5 +47,5 @@ export declare class CpsInputComponent implements ControlValueAccessor, OnInit,
|
|
|
46
47
|
onBlur(): void;
|
|
47
48
|
focus(): void;
|
|
48
49
|
static ɵfac: i0.ɵɵFactoryDeclaration<CpsInputComponent, [{ optional: true; self: true; }, null, null]>;
|
|
49
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CpsInputComponent, "cps-input", never, { "label": "label"; "placeholder": "placeholder"; "hint": "hint"; "disabled": "disabled"; "width": "width"; "type": "type"; "loading": "loading"; "clearable": "clearable"; "prefixIcon": "prefixIcon"; "prefixIconSize": "prefixIconSize"; "prefixText": "prefixText"; "hideDetails": "hideDetails"; "value": "value"; }, { "valueChanged": "valueChanged"; }, never, never, true, never>;
|
|
50
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CpsInputComponent, "cps-input", never, { "label": "label"; "placeholder": "placeholder"; "hint": "hint"; "disabled": "disabled"; "width": "width"; "type": "type"; "loading": "loading"; "clearable": "clearable"; "prefixIcon": "prefixIcon"; "prefixIconSize": "prefixIconSize"; "prefixText": "prefixText"; "hideDetails": "hideDetails"; "persistentClear": "persistentClear"; "value": "value"; }, { "valueChanged": "valueChanged"; }, never, never, true, never>;
|
|
50
51
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
3
|
+
import { iconSizeType } from '../cps-icon/cps-icon.component';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class CpsSelectComponent implements ControlValueAccessor, OnInit, OnDestroy, OnChanges {
|
|
5
6
|
private _control;
|
|
@@ -20,6 +21,9 @@ export declare class CpsSelectComponent implements ControlValueAccessor, OnInit,
|
|
|
20
21
|
optionValue: string;
|
|
21
22
|
optionInfo: string;
|
|
22
23
|
hideDetails: boolean;
|
|
24
|
+
persistentClear: boolean;
|
|
25
|
+
prefixIcon: string;
|
|
26
|
+
prefixIconSize: iconSizeType;
|
|
23
27
|
_value: any;
|
|
24
28
|
set value(value: any);
|
|
25
29
|
get value(): any;
|
|
@@ -29,13 +33,22 @@ export declare class CpsSelectComponent implements ControlValueAccessor, OnInit,
|
|
|
29
33
|
error: string;
|
|
30
34
|
cvtWidth: string;
|
|
31
35
|
isOpened: boolean;
|
|
36
|
+
optionHighlightedIndex: number;
|
|
32
37
|
constructor(_control: NgControl);
|
|
33
38
|
ngOnChanges(changes: SimpleChanges): void;
|
|
34
39
|
ngOnInit(): void;
|
|
35
40
|
ngOnDestroy(): void;
|
|
36
|
-
|
|
41
|
+
private _toggleOptions;
|
|
37
42
|
select(option: any, byValue: boolean): void;
|
|
38
43
|
onOptionClick(option: any, dd: HTMLElement): void;
|
|
44
|
+
private _clickOption;
|
|
45
|
+
private _getHTMLOptions;
|
|
46
|
+
private _dehighlightOption;
|
|
47
|
+
private _highlightOption;
|
|
48
|
+
private _navigateOptionsByArrows;
|
|
49
|
+
onClickOutside(dd: HTMLElement): void;
|
|
50
|
+
onBoxClick(dd: HTMLElement): void;
|
|
51
|
+
onKeyDown(event: any, dd: HTMLElement): void;
|
|
39
52
|
toggleAll(): void;
|
|
40
53
|
private _checkErrors;
|
|
41
54
|
onChange: (event: any) => void;
|
|
@@ -50,5 +63,5 @@ export declare class CpsSelectComponent implements ControlValueAccessor, OnInit,
|
|
|
50
63
|
onBlur(): void;
|
|
51
64
|
focus(): void;
|
|
52
65
|
static ɵfac: i0.ɵɵFactoryDeclaration<CpsSelectComponent, [{ optional: true; self: true; }]>;
|
|
53
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CpsSelectComponent, "cps-select", never, { "label": "label"; "placeholder": "placeholder"; "hint": "hint"; "returnObject": "returnObject"; "multiple": "multiple"; "disabled": "disabled"; "width": "width"; "selectAll": "selectAll"; "chips": "chips"; "closableChips": "closableChips"; "clearable": "clearable"; "openOnClear": "openOnClear"; "options": "options"; "optionLabel": "optionLabel"; "optionValue": "optionValue"; "optionInfo": "optionInfo"; "hideDetails": "hideDetails"; "_value": "value"; }, { "valueChanged": "valueChanged"; }, never, never, true, never>;
|
|
66
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CpsSelectComponent, "cps-select", never, { "label": "label"; "placeholder": "placeholder"; "hint": "hint"; "returnObject": "returnObject"; "multiple": "multiple"; "disabled": "disabled"; "width": "width"; "selectAll": "selectAll"; "chips": "chips"; "closableChips": "closableChips"; "clearable": "clearable"; "openOnClear": "openOnClear"; "options": "options"; "optionLabel": "optionLabel"; "optionValue": "optionValue"; "optionInfo": "optionInfo"; "hideDetails": "hideDetails"; "persistentClear": "persistentClear"; "prefixIcon": "prefixIcon"; "prefixIconSize": "prefixIconSize"; "_value": "value"; }, { "valueChanged": "valueChanged"; }, never, never, true, never>;
|
|
54
67
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from './lib/components/cps-icon/cps-icon.component';
|
|
2
2
|
export * from './lib/components/cps-input/cps-input.component';
|
|
3
3
|
export * from './lib/components/cps-select/cps-select.component';
|
|
4
|
+
export * from './lib/components/cps-autocomplete/cps-autocomplete.component';
|
|
4
5
|
export * from './lib/components/cps-button/cps-button.component';
|
|
5
6
|
export * from './lib/components/cps-checkbox/cps-checkbox.component';
|
|
6
7
|
export * from './lib/components/cps-radio/cps-radio.component';
|
|
7
8
|
export * from './lib/components/cps-tag/cps-tag.component';
|
|
8
9
|
export * from './lib/components/cps-chip/cps-chip.component';
|
|
10
|
+
export * from './lib/utils/colors-utils';
|
package/styles/_variables.scss
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import '_colors.scss';
|
package/styles/styles.scss
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@import
|
|
2
|
-
@import
|
|
1
|
+
@import 'bootstrap-grid';
|
|
2
|
+
@import '_variables.scss';
|