cps-ui-kit 0.164.0 → 17.0.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/esm2022/lib/components/cps-autocomplete/cps-autocomplete.component.mjs +824 -0
- package/esm2022/lib/components/cps-button/cps-button.component.mjs +190 -0
- package/esm2022/lib/components/cps-button-toggle/cps-button-toggle.component.mjs +235 -0
- package/esm2022/lib/components/cps-checkbox/cps-checkbox.component.mjs +149 -0
- package/esm2022/lib/components/cps-chip/cps-chip.component.mjs +94 -0
- package/esm2022/lib/components/cps-datepicker/cps-datepicker.component.mjs +382 -0
- package/esm2022/lib/components/cps-expansion-panel/cps-expansion-panel.component.mjs +209 -0
- package/esm2022/lib/components/cps-file-upload/cps-file-upload.component.mjs +138 -0
- package/esm2022/lib/components/cps-icon/cps-icon.component.mjs +193 -0
- package/esm2022/lib/components/cps-info-circle/cps-info-circle.component.mjs +61 -0
- package/esm2022/lib/components/cps-input/cps-input.component.mjs +386 -0
- package/{esm2020 → esm2022}/lib/components/cps-loader/cps-loader.component.mjs +5 -5
- package/esm2022/lib/components/cps-menu/cps-menu.component.mjs +552 -0
- package/esm2022/lib/components/cps-paginator/cps-paginator.component.mjs +114 -0
- package/esm2022/lib/components/cps-paginator/pipes/cps-paginate.pipe.mjs +30 -0
- package/{esm2020 → esm2022}/lib/components/cps-progress-circular/cps-progress-circular.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/components/cps-progress-linear/cps-progress-linear.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/components/cps-radio-group/cps-radio/cps-radio.component.mjs +7 -7
- package/esm2022/lib/components/cps-radio-group/cps-radio-button/cps-radio-button.component.mjs +55 -0
- package/esm2022/lib/components/cps-radio-group/cps-radio-group.component.mjs +158 -0
- package/esm2022/lib/components/cps-select/cps-select.component.mjs +615 -0
- package/esm2022/lib/components/cps-sidebar-menu/cps-sidebar-menu.component.mjs +110 -0
- package/{esm2020 → esm2022}/lib/components/cps-tab-group/cps-tab/cps-tab.component.mjs +4 -4
- package/esm2022/lib/components/cps-tab-group/cps-tab-group.component.mjs +303 -0
- package/esm2022/lib/components/cps-table/components/internal/cps-sort-icon/cps-sort-icon.component.mjs +79 -0
- package/esm2022/lib/components/cps-table/components/internal/table-column-filter/table-column-filter.component.mjs +408 -0
- package/esm2022/lib/components/cps-table/components/internal/table-column-filter-constraint/table-column-filter-constraint.component.mjs +149 -0
- package/esm2022/lib/components/cps-table/components/internal/table-row-menu/table-row-menu.component.mjs +88 -0
- package/esm2022/lib/components/cps-table/cps-table.component.mjs +941 -0
- package/esm2022/lib/components/cps-table/directives/cps-table-column-filter.directive.mjs +181 -0
- package/{esm2020 → esm2022}/lib/components/cps-table/directives/cps-table-column-sortable.directive.mjs +5 -5
- package/{esm2020 → esm2022}/lib/components/cps-table/directives/cps-table-header-selectable.directive.mjs +5 -5
- package/{esm2020 → esm2022}/lib/components/cps-table/directives/cps-table-row-selectable.directive.mjs +5 -5
- package/esm2022/lib/components/cps-table/directives/internal/table-unsort.directive.mjs +220 -0
- package/esm2022/lib/components/cps-tag/cps-tag.component.mjs +136 -0
- package/esm2022/lib/components/cps-textarea/cps-textarea.component.mjs +291 -0
- package/esm2022/lib/components/cps-timepicker/cps-timepicker.component.mjs +351 -0
- package/esm2022/lib/components/cps-tree-autocomplete/cps-tree-autocomplete.component.mjs +251 -0
- package/esm2022/lib/components/cps-tree-select/cps-tree-select.component.mjs +87 -0
- package/esm2022/lib/components/cps-tree-table/cps-tree-table.component.mjs +1196 -0
- package/{esm2020 → esm2022}/lib/components/cps-tree-table/directives/cps-tree-table-column-filter.directive.mjs +5 -5
- package/{esm2020 → esm2022}/lib/components/cps-tree-table/directives/cps-tree-table-column-sortable.directive.mjs +5 -5
- package/{esm2020 → esm2022}/lib/components/cps-tree-table/directives/cps-tree-table-header-selectable.directive.mjs +5 -5
- package/{esm2020 → esm2022}/lib/components/cps-tree-table/directives/cps-tree-table-row-selectable.directive.mjs +5 -5
- package/esm2022/lib/components/cps-tree-table/directives/cps-tree-table-row-toggler.directive.mjs +43 -0
- package/esm2022/lib/components/cps-tree-table/directives/internal/tree-table-unsort.directive.mjs +354 -0
- package/esm2022/lib/components/internal/cps-base-tree-dropdown/cps-base-tree-dropdown.component.mjs +619 -0
- package/esm2022/lib/directives/cps-tooltip/cps-tooltip.directive.mjs +257 -0
- package/{esm2020 → esm2022}/lib/pipes/internal/check-option-selected.pipe.mjs +4 -4
- package/esm2022/lib/pipes/internal/combine-labels.pipe.mjs +25 -0
- package/{esm2020 → esm2022}/lib/pipes/internal/label-by-value.pipe.mjs +4 -4
- package/esm2022/lib/services/cps-dialog/cps-dialog.service.mjs +99 -0
- package/{esm2020 → esm2022}/lib/services/cps-dialog/internal/components/cps-confirmation/cps-confirmation.component.mjs +5 -5
- package/esm2022/lib/services/cps-dialog/internal/components/cps-dialog/cps-dialog.component.mjs +470 -0
- package/{esm2020 → esm2022}/lib/services/cps-dialog/internal/directives/cps-dialog-content.directive.mjs +5 -5
- package/esm2022/lib/services/cps-dialog/utils/cps-dialog-config.mjs +3 -0
- package/esm2022/lib/services/cps-notification/cps-notification.service.mjs +126 -0
- package/esm2022/lib/services/cps-notification/internal/components/cps-notification-container/cps-notification-container.component.mjs +91 -0
- package/{esm2020 → esm2022}/lib/services/cps-notification/internal/components/cps-toast/cps-toast.component.mjs +23 -23
- package/esm2022/lib/utils/colors-utils.mjs +57 -0
- package/esm2022/lib/utils/internal/size-utils.mjs +24 -0
- package/{esm2020 → esm2022}/public-api.mjs +2 -2
- package/{fesm2020 → fesm2022}/cps-ui-kit.mjs +569 -434
- package/fesm2022/cps-ui-kit.mjs.map +1 -0
- package/lib/components/cps-autocomplete/cps-autocomplete.component.d.ts +2 -2
- package/lib/components/cps-button/cps-button.component.d.ts +1 -1
- package/lib/components/cps-button-toggle/cps-button-toggle.component.d.ts +2 -2
- package/lib/components/cps-checkbox/cps-checkbox.component.d.ts +2 -2
- package/lib/components/cps-chip/cps-chip.component.d.ts +1 -1
- package/lib/components/cps-datepicker/cps-datepicker.component.d.ts +2 -2
- package/lib/components/cps-expansion-panel/cps-expansion-panel.component.d.ts +13 -3
- package/lib/components/cps-file-upload/cps-file-upload.component.d.ts +1 -1
- package/lib/components/cps-icon/cps-icon.component.d.ts +1 -1
- package/lib/components/cps-info-circle/cps-info-circle.component.d.ts +2 -2
- package/lib/components/cps-input/cps-input.component.d.ts +2 -2
- package/lib/components/cps-loader/cps-loader.component.d.ts +1 -1
- package/lib/components/cps-menu/cps-menu.component.d.ts +1 -1
- package/lib/components/cps-paginator/cps-paginator.component.d.ts +1 -1
- package/lib/components/cps-progress-circular/cps-progress-circular.component.d.ts +1 -1
- package/lib/components/cps-progress-linear/cps-progress-linear.component.d.ts +1 -1
- package/lib/components/cps-radio-group/cps-radio/cps-radio.component.d.ts +1 -1
- package/lib/components/cps-radio-group/cps-radio-button/cps-radio-button.component.d.ts +1 -1
- package/lib/components/cps-radio-group/cps-radio-group.component.d.ts +2 -2
- package/lib/components/cps-select/cps-select.component.d.ts +2 -2
- package/lib/components/cps-sidebar-menu/cps-sidebar-menu.component.d.ts +1 -1
- package/lib/components/cps-tab-group/cps-tab/cps-tab.component.d.ts +1 -1
- package/lib/components/cps-tab-group/cps-tab-group.component.d.ts +16 -6
- package/lib/components/cps-table/components/internal/cps-sort-icon/cps-sort-icon.component.d.ts +1 -1
- package/lib/components/cps-table/components/internal/table-column-filter/table-column-filter.component.d.ts +1 -1
- package/lib/components/cps-table/components/internal/table-column-filter-constraint/table-column-filter-constraint.component.d.ts +1 -1
- package/lib/components/cps-table/components/internal/table-row-menu/table-row-menu.component.d.ts +1 -1
- package/lib/components/cps-table/cps-table.component.d.ts +1 -1
- package/lib/components/cps-table/directives/cps-table-column-filter.directive.d.ts +1 -1
- package/lib/components/cps-table/directives/cps-table-column-sortable.directive.d.ts +1 -1
- package/lib/components/cps-table/directives/cps-table-row-selectable.directive.d.ts +1 -1
- package/lib/components/cps-tag/cps-tag.component.d.ts +1 -1
- package/lib/components/cps-textarea/cps-textarea.component.d.ts +2 -2
- package/lib/components/cps-timepicker/cps-timepicker.component.d.ts +2 -2
- package/lib/components/cps-tree-autocomplete/cps-tree-autocomplete.component.d.ts +1 -1
- package/lib/components/cps-tree-select/cps-tree-select.component.d.ts +1 -1
- package/lib/components/cps-tree-table/cps-tree-table.component.d.ts +4 -4
- package/lib/components/cps-tree-table/directives/cps-tree-table-column-filter.directive.d.ts +1 -1
- package/lib/components/cps-tree-table/directives/cps-tree-table-column-sortable.directive.d.ts +1 -1
- package/lib/components/cps-tree-table/directives/cps-tree-table-row-selectable.directive.d.ts +1 -1
- package/lib/components/cps-tree-table/directives/cps-tree-table-row-toggler.directive.d.ts +1 -1
- package/lib/components/internal/cps-base-tree-dropdown/cps-base-tree-dropdown.component.d.ts +2 -2
- package/lib/directives/{cps-tooltip.directive.d.ts → cps-tooltip/cps-tooltip.directive.d.ts} +2 -2
- package/lib/services/cps-dialog/cps-dialog.service.d.ts +13 -0
- package/lib/services/cps-dialog/utils/cps-dialog-config.d.ts +1 -1
- package/lib/services/cps-notification/cps-notification.service.d.ts +32 -0
- package/lib/services/cps-notification/internal/components/cps-notification-container/cps-notification-container.component.d.ts +1 -1
- package/lib/services/cps-notification/internal/components/cps-toast/cps-toast.component.d.ts +1 -1
- package/package.json +12 -18
- package/public-api.d.ts +1 -1
- package/esm2020/lib/components/cps-autocomplete/cps-autocomplete.component.mjs +0 -824
- package/esm2020/lib/components/cps-button/cps-button.component.mjs +0 -190
- package/esm2020/lib/components/cps-button-toggle/cps-button-toggle.component.mjs +0 -235
- package/esm2020/lib/components/cps-checkbox/cps-checkbox.component.mjs +0 -149
- package/esm2020/lib/components/cps-chip/cps-chip.component.mjs +0 -94
- package/esm2020/lib/components/cps-datepicker/cps-datepicker.component.mjs +0 -382
- package/esm2020/lib/components/cps-expansion-panel/cps-expansion-panel.component.mjs +0 -178
- package/esm2020/lib/components/cps-file-upload/cps-file-upload.component.mjs +0 -138
- package/esm2020/lib/components/cps-icon/cps-icon.component.mjs +0 -193
- package/esm2020/lib/components/cps-info-circle/cps-info-circle.component.mjs +0 -61
- package/esm2020/lib/components/cps-input/cps-input.component.mjs +0 -386
- package/esm2020/lib/components/cps-menu/cps-menu.component.mjs +0 -552
- package/esm2020/lib/components/cps-paginator/cps-paginator.component.mjs +0 -113
- package/esm2020/lib/components/cps-paginator/pipes/cps-paginate.pipe.mjs +0 -30
- package/esm2020/lib/components/cps-radio-group/cps-radio-button/cps-radio-button.component.mjs +0 -55
- package/esm2020/lib/components/cps-radio-group/cps-radio-group.component.mjs +0 -158
- package/esm2020/lib/components/cps-select/cps-select.component.mjs +0 -615
- package/esm2020/lib/components/cps-sidebar-menu/cps-sidebar-menu.component.mjs +0 -110
- package/esm2020/lib/components/cps-tab-group/cps-tab-group.component.mjs +0 -285
- package/esm2020/lib/components/cps-table/components/internal/cps-sort-icon/cps-sort-icon.component.mjs +0 -79
- package/esm2020/lib/components/cps-table/components/internal/table-column-filter/table-column-filter.component.mjs +0 -408
- package/esm2020/lib/components/cps-table/components/internal/table-column-filter-constraint/table-column-filter-constraint.component.mjs +0 -148
- package/esm2020/lib/components/cps-table/components/internal/table-row-menu/table-row-menu.component.mjs +0 -88
- package/esm2020/lib/components/cps-table/cps-table.component.mjs +0 -940
- package/esm2020/lib/components/cps-table/directives/cps-table-column-filter.directive.mjs +0 -181
- package/esm2020/lib/components/cps-table/directives/internal/table-unsort.directive.mjs +0 -210
- package/esm2020/lib/components/cps-tag/cps-tag.component.mjs +0 -136
- package/esm2020/lib/components/cps-textarea/cps-textarea.component.mjs +0 -291
- package/esm2020/lib/components/cps-timepicker/cps-timepicker.component.mjs +0 -351
- package/esm2020/lib/components/cps-tree-autocomplete/cps-tree-autocomplete.component.mjs +0 -250
- package/esm2020/lib/components/cps-tree-select/cps-tree-select.component.mjs +0 -87
- package/esm2020/lib/components/cps-tree-table/cps-tree-table.component.mjs +0 -1192
- package/esm2020/lib/components/cps-tree-table/directives/cps-tree-table-row-toggler.directive.mjs +0 -43
- package/esm2020/lib/components/cps-tree-table/directives/internal/tree-table-unsort.directive.mjs +0 -334
- package/esm2020/lib/components/internal/cps-base-tree-dropdown/cps-base-tree-dropdown.component.mjs +0 -616
- package/esm2020/lib/directives/cps-tooltip.directive.mjs +0 -257
- package/esm2020/lib/pipes/internal/combine-labels.pipe.mjs +0 -25
- package/esm2020/lib/services/cps-dialog/cps-dialog.service.mjs +0 -86
- package/esm2020/lib/services/cps-dialog/internal/components/cps-dialog/cps-dialog.component.mjs +0 -470
- package/esm2020/lib/services/cps-dialog/utils/cps-dialog-config.mjs +0 -3
- package/esm2020/lib/services/cps-notification/cps-notification.service.mjs +0 -94
- package/esm2020/lib/services/cps-notification/internal/components/cps-notification-container/cps-notification-container.component.mjs +0 -91
- package/esm2020/lib/utils/colors-utils.mjs +0 -57
- package/esm2020/lib/utils/internal/size-utils.mjs +0 -24
- package/fesm2015/cps-ui-kit.mjs +0 -12038
- package/fesm2015/cps-ui-kit.mjs.map +0 -1
- package/fesm2020/cps-ui-kit.mjs.map +0 -1
- /package/{esm2020 → esm2022}/cps-ui-kit.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/components/cps-table/cps-column-filter-types.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/services/cps-dialog/utils/cps-dialog-ref.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/services/cps-notification/utils/cps-notification-config.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/services/cps-notification/utils/internal/cps-notification-data.mjs +0 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, EventEmitter, Input, Optional, Output, Self } from '@angular/core';
|
|
3
|
+
import { CpsInfoCircleComponent } from '../cps-info-circle/cps-info-circle.component';
|
|
4
|
+
import { CpsIconComponent } from '../cps-icon/cps-icon.component';
|
|
5
|
+
import { getCSSColor } from '../../utils/colors-utils';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "@angular/forms";
|
|
8
|
+
import * as i2 from "@angular/common";
|
|
9
|
+
/**
|
|
10
|
+
* CpsCheckboxComponent is a checkbox element.
|
|
11
|
+
* @group Components
|
|
12
|
+
*/
|
|
13
|
+
export class CpsCheckboxComponent {
|
|
14
|
+
/**
|
|
15
|
+
* Value of the checkbox.
|
|
16
|
+
* @group Props
|
|
17
|
+
*/
|
|
18
|
+
set value(value) {
|
|
19
|
+
this._value = value;
|
|
20
|
+
this.onChange(value);
|
|
21
|
+
}
|
|
22
|
+
get value() {
|
|
23
|
+
return this._value;
|
|
24
|
+
}
|
|
25
|
+
constructor(_control, _elementRef) {
|
|
26
|
+
this._control = _control;
|
|
27
|
+
this._elementRef = _elementRef;
|
|
28
|
+
/**
|
|
29
|
+
* Label of the checkbox.
|
|
30
|
+
* @group Props
|
|
31
|
+
*/
|
|
32
|
+
this.label = '';
|
|
33
|
+
/**
|
|
34
|
+
* Determines whether checkbox is disabled.
|
|
35
|
+
* @group Props
|
|
36
|
+
*/
|
|
37
|
+
this.disabled = false;
|
|
38
|
+
/**
|
|
39
|
+
* When it is not an empty string, an info icon is displayed to show text for more info.
|
|
40
|
+
* @group Props
|
|
41
|
+
*/
|
|
42
|
+
this.infoTooltip = '';
|
|
43
|
+
/**
|
|
44
|
+
* InfoTooltip class for styling.
|
|
45
|
+
* @group Props
|
|
46
|
+
*/
|
|
47
|
+
this.infoTooltipClass = 'cps-tooltip-content';
|
|
48
|
+
/**
|
|
49
|
+
* Size of infoTooltip, of type number denoting pixels or string.
|
|
50
|
+
* @group Props
|
|
51
|
+
*/
|
|
52
|
+
this.infoTooltipMaxWidth = '100%';
|
|
53
|
+
/**
|
|
54
|
+
* Determines whether the infoTooltip is persistent.
|
|
55
|
+
* @group Props
|
|
56
|
+
*/
|
|
57
|
+
this.infoTooltipPersistent = false;
|
|
58
|
+
/**
|
|
59
|
+
* Position of infoTooltip, it can be 'top', 'bottom', 'left' or 'right'.
|
|
60
|
+
* @group Props
|
|
61
|
+
*/
|
|
62
|
+
this.infoTooltipPosition = 'top';
|
|
63
|
+
/**
|
|
64
|
+
* Name of the icon.
|
|
65
|
+
* @group Props
|
|
66
|
+
*/
|
|
67
|
+
this.icon = '';
|
|
68
|
+
/**
|
|
69
|
+
* Color of the icon.
|
|
70
|
+
* @group Props
|
|
71
|
+
*/
|
|
72
|
+
this.iconColor = 'text-dark';
|
|
73
|
+
/**
|
|
74
|
+
* Callback to invoke on value change.
|
|
75
|
+
* @param {boolean} boolean - value changed.
|
|
76
|
+
* @group Emits
|
|
77
|
+
*/
|
|
78
|
+
this.valueChanged = new EventEmitter();
|
|
79
|
+
this._value = false;
|
|
80
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
81
|
+
this.onChange = (event) => { };
|
|
82
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
83
|
+
this.onTouched = () => { };
|
|
84
|
+
if (this._control) {
|
|
85
|
+
this._control.valueAccessor = this;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
ngOnInit() {
|
|
89
|
+
this.iconColor = getCSSColor(this.iconColor);
|
|
90
|
+
}
|
|
91
|
+
registerOnChange(fn) {
|
|
92
|
+
this.onChange = fn;
|
|
93
|
+
}
|
|
94
|
+
registerOnTouched(fn) {
|
|
95
|
+
this.onTouched = fn;
|
|
96
|
+
}
|
|
97
|
+
writeValue(value) {
|
|
98
|
+
this.value = value;
|
|
99
|
+
}
|
|
100
|
+
updateValueEvent(event) {
|
|
101
|
+
event.preventDefault();
|
|
102
|
+
if (this.disabled)
|
|
103
|
+
return;
|
|
104
|
+
this._updateValue(!this.value);
|
|
105
|
+
}
|
|
106
|
+
_updateValue(value) {
|
|
107
|
+
this.writeValue(value);
|
|
108
|
+
this.onChange(value);
|
|
109
|
+
this.valueChanged.emit(value);
|
|
110
|
+
}
|
|
111
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
112
|
+
setDisabledState(disabled) { }
|
|
113
|
+
focus() {
|
|
114
|
+
this._elementRef?.nativeElement?.querySelector('input')?.focus();
|
|
115
|
+
}
|
|
116
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: CpsCheckboxComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
117
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: CpsCheckboxComponent, isStandalone: true, selector: "cps-checkbox", inputs: { label: "label", disabled: "disabled", infoTooltip: "infoTooltip", infoTooltipClass: "infoTooltipClass", infoTooltipMaxWidth: "infoTooltipMaxWidth", infoTooltipPersistent: "infoTooltipPersistent", infoTooltipPosition: "infoTooltipPosition", icon: "icon", iconColor: "iconColor", value: "value" }, outputs: { valueChanged: "valueChanged" }, ngImport: i0, template: "<div class=\"cps-checkbox-container\">\n <label\n class=\"cps-checkbox\"\n [ngClass]=\"{\n 'cps-checkbox-disabled': disabled\n }\">\n <input\n type=\"checkbox\"\n [disabled]=\"disabled\"\n [checked]=\"value\"\n (change)=\"updateValueEvent($event)\" />\n <span class=\"cps-checkbox-indicator\"></span>\n <cps-icon\n class=\"cps-checkbox-icon\"\n *ngIf=\"icon\"\n [icon]=\"icon\"\n size=\"small\"\n [color]=\"disabled ? 'text-light' : iconColor\">\n </cps-icon>\n <span *ngIf=\"label\" class=\"cps-checkbox-label\">{{ label }}</span>\n </label>\n <cps-info-circle\n *ngIf=\"infoTooltip\"\n class=\"cps-checkbox-info-circle\"\n size=\"xsmall\"\n [tooltipPosition]=\"infoTooltipPosition\"\n [tooltipContentClass]=\"infoTooltipClass\"\n [tooltipMaxWidth]=\"infoTooltipMaxWidth\"\n [tooltipPersistent]=\"infoTooltipPersistent\"\n [tooltipText]=\"infoTooltip\">\n </cps-info-circle>\n</div>\n", styles: [":host{min-width:max-content;display:inline-block}:host .cps-checkbox-container{line-height:normal;display:flex;align-items:center}:host .cps-checkbox-container .cps-checkbox{display:flex;align-items:center;font-size:1rem;font-family:Source Sans Pro,sans-serif;font-style:normal;font-weight:400;color:var(--cps-color-text-dark);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .cps-checkbox-container .cps-checkbox-disabled{cursor:default;color:var(--cps-color-text-light)}:host .cps-checkbox-container .cps-checkbox input[type=checkbox]{position:absolute;opacity:0;width:0;height:0}:host .cps-checkbox-container .cps-checkbox-indicator{position:relative;display:inline-block;width:18px;height:18px;border:2px solid var(--cps-color-text-mild);border-radius:2px}:host .cps-checkbox-container .cps-checkbox-label,:host .cps-checkbox-container .cps-checkbox-icon{margin-left:10px}:host .cps-checkbox-container .cps-checkbox input[type=checkbox]:checked~.cps-checkbox-indicator{color:#fff;background:var(--cps-color-calm) url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgMTIgOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgPHBhdGggZD0iTTQuNTc1IDguOTc3cy0uNDA0LS4wMDctLjUzNi0uMTY1TC4wNTcgNS42NGwuODI5LTEuMjI3TDQuNDcgNy4yNjggMTAuOTIxLjA4NmwuOTIzIDEuMTAzLTYuODYzIDcuNjRjLS4xMzQtLjAwMy0uNDA2LjE0OC0uNDA2LjE0OHoiIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPg0KPC9zdmc+) 50% 40% no-repeat;border-color:var(--cps-color-calm)}:host .cps-checkbox-container .cps-checkbox input[type=checkbox]:disabled~.cps-checkbox-indicator{border-color:var(--cps-color-text-light)}:host .cps-checkbox-container .cps-checkbox input[type=checkbox]:checked:disabled~.cps-checkbox-indicator{background:var(--cps-color-text-lightest) url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgMTIgOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgPHBhdGggZD0iTTQuNTc1IDguOTc3cy0uNDA0LS4wMDctLjUzNi0uMTY1TC4wNTcgNS42NGwuODI5LTEuMjI3TDQuNDcgNy4yNjggMTAuOTIxLjA4NmwuOTIzIDEuMTAzLTYuODYzIDcuNjRjLS4xMzQtLjAwMy0uNDA2LjE0OC0uNDA2LjE0OHoiIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPg0KPC9zdmc+) 50% 40% no-repeat;border-color:var(--cps-color-text-lightest)}:host .cps-checkbox-container .cps-checkbox input[type=checkbox]:not(:disabled):hover~.cps-checkbox-indicator{border-color:var(--cps-color-calm)}:host .cps-checkbox-container .cps-checkbox-info-circle{margin-left:8px}:host .cps-checkbox-container .cps-checkbox-info-circle ::ng-deep cps-icon i{width:14px;height:14px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CpsInfoCircleComponent, selector: "cps-info-circle", inputs: ["size", "tooltipText", "tooltipPosition", "tooltipContentClass", "tooltipMaxWidth", "tooltipPersistent"] }, { kind: "component", type: CpsIconComponent, selector: "cps-icon", inputs: ["icon", "size", "color"] }] }); }
|
|
118
|
+
}
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: CpsCheckboxComponent, decorators: [{
|
|
120
|
+
type: Component,
|
|
121
|
+
args: [{ standalone: true, imports: [CommonModule, CpsInfoCircleComponent, CpsIconComponent], selector: 'cps-checkbox', template: "<div class=\"cps-checkbox-container\">\n <label\n class=\"cps-checkbox\"\n [ngClass]=\"{\n 'cps-checkbox-disabled': disabled\n }\">\n <input\n type=\"checkbox\"\n [disabled]=\"disabled\"\n [checked]=\"value\"\n (change)=\"updateValueEvent($event)\" />\n <span class=\"cps-checkbox-indicator\"></span>\n <cps-icon\n class=\"cps-checkbox-icon\"\n *ngIf=\"icon\"\n [icon]=\"icon\"\n size=\"small\"\n [color]=\"disabled ? 'text-light' : iconColor\">\n </cps-icon>\n <span *ngIf=\"label\" class=\"cps-checkbox-label\">{{ label }}</span>\n </label>\n <cps-info-circle\n *ngIf=\"infoTooltip\"\n class=\"cps-checkbox-info-circle\"\n size=\"xsmall\"\n [tooltipPosition]=\"infoTooltipPosition\"\n [tooltipContentClass]=\"infoTooltipClass\"\n [tooltipMaxWidth]=\"infoTooltipMaxWidth\"\n [tooltipPersistent]=\"infoTooltipPersistent\"\n [tooltipText]=\"infoTooltip\">\n </cps-info-circle>\n</div>\n", styles: [":host{min-width:max-content;display:inline-block}:host .cps-checkbox-container{line-height:normal;display:flex;align-items:center}:host .cps-checkbox-container .cps-checkbox{display:flex;align-items:center;font-size:1rem;font-family:Source Sans Pro,sans-serif;font-style:normal;font-weight:400;color:var(--cps-color-text-dark);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .cps-checkbox-container .cps-checkbox-disabled{cursor:default;color:var(--cps-color-text-light)}:host .cps-checkbox-container .cps-checkbox input[type=checkbox]{position:absolute;opacity:0;width:0;height:0}:host .cps-checkbox-container .cps-checkbox-indicator{position:relative;display:inline-block;width:18px;height:18px;border:2px solid var(--cps-color-text-mild);border-radius:2px}:host .cps-checkbox-container .cps-checkbox-label,:host .cps-checkbox-container .cps-checkbox-icon{margin-left:10px}:host .cps-checkbox-container .cps-checkbox input[type=checkbox]:checked~.cps-checkbox-indicator{color:#fff;background:var(--cps-color-calm) url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgMTIgOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgPHBhdGggZD0iTTQuNTc1IDguOTc3cy0uNDA0LS4wMDctLjUzNi0uMTY1TC4wNTcgNS42NGwuODI5LTEuMjI3TDQuNDcgNy4yNjggMTAuOTIxLjA4NmwuOTIzIDEuMTAzLTYuODYzIDcuNjRjLS4xMzQtLjAwMy0uNDA2LjE0OC0uNDA2LjE0OHoiIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPg0KPC9zdmc+) 50% 40% no-repeat;border-color:var(--cps-color-calm)}:host .cps-checkbox-container .cps-checkbox input[type=checkbox]:disabled~.cps-checkbox-indicator{border-color:var(--cps-color-text-light)}:host .cps-checkbox-container .cps-checkbox input[type=checkbox]:checked:disabled~.cps-checkbox-indicator{background:var(--cps-color-text-lightest) url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgMTIgOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgPHBhdGggZD0iTTQuNTc1IDguOTc3cy0uNDA0LS4wMDctLjUzNi0uMTY1TC4wNTcgNS42NGwuODI5LTEuMjI3TDQuNDcgNy4yNjggMTAuOTIxLjA4NmwuOTIzIDEuMTAzLTYuODYzIDcuNjRjLS4xMzQtLjAwMy0uNDA2LjE0OC0uNDA2LjE0OHoiIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPg0KPC9zdmc+) 50% 40% no-repeat;border-color:var(--cps-color-text-lightest)}:host .cps-checkbox-container .cps-checkbox input[type=checkbox]:not(:disabled):hover~.cps-checkbox-indicator{border-color:var(--cps-color-calm)}:host .cps-checkbox-container .cps-checkbox-info-circle{margin-left:8px}:host .cps-checkbox-container .cps-checkbox-info-circle ::ng-deep cps-icon i{width:14px;height:14px}\n"] }]
|
|
122
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
123
|
+
type: Self
|
|
124
|
+
}, {
|
|
125
|
+
type: Optional
|
|
126
|
+
}] }, { type: i0.ElementRef }], propDecorators: { label: [{
|
|
127
|
+
type: Input
|
|
128
|
+
}], disabled: [{
|
|
129
|
+
type: Input
|
|
130
|
+
}], infoTooltip: [{
|
|
131
|
+
type: Input
|
|
132
|
+
}], infoTooltipClass: [{
|
|
133
|
+
type: Input
|
|
134
|
+
}], infoTooltipMaxWidth: [{
|
|
135
|
+
type: Input
|
|
136
|
+
}], infoTooltipPersistent: [{
|
|
137
|
+
type: Input
|
|
138
|
+
}], infoTooltipPosition: [{
|
|
139
|
+
type: Input
|
|
140
|
+
}], icon: [{
|
|
141
|
+
type: Input
|
|
142
|
+
}], iconColor: [{
|
|
143
|
+
type: Input
|
|
144
|
+
}], value: [{
|
|
145
|
+
type: Input
|
|
146
|
+
}], valueChanged: [{
|
|
147
|
+
type: Output
|
|
148
|
+
}] } });
|
|
149
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3BzLWNoZWNrYm94LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Nwcy11aS1raXQvc3JjL2xpYi9jb21wb25lbnRzL2Nwcy1jaGVja2JveC9jcHMtY2hlY2tib3guY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVj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==
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import { CpsIconComponent } from '../cps-icon/cps-icon.component';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/common";
|
|
6
|
+
/**
|
|
7
|
+
* CpsChipComponent represents a chip element.
|
|
8
|
+
* @group Components
|
|
9
|
+
*/
|
|
10
|
+
export class CpsChipComponent {
|
|
11
|
+
constructor() {
|
|
12
|
+
/**
|
|
13
|
+
* Label of the chip element.
|
|
14
|
+
* @group Props
|
|
15
|
+
*/
|
|
16
|
+
this.label = '';
|
|
17
|
+
/**
|
|
18
|
+
* Name of the icon.
|
|
19
|
+
* @group Props
|
|
20
|
+
*/
|
|
21
|
+
this.icon = '';
|
|
22
|
+
/**
|
|
23
|
+
* Color of the icon.
|
|
24
|
+
* @group Props
|
|
25
|
+
*/
|
|
26
|
+
this.iconColor = 'text-darkest';
|
|
27
|
+
/**
|
|
28
|
+
* Position of the icon, it can be 'before' or 'after'. Defaults to 'before'.
|
|
29
|
+
* @group Props
|
|
30
|
+
*/
|
|
31
|
+
this.iconPosition = 'before';
|
|
32
|
+
/**
|
|
33
|
+
* Option for closing a chip element.
|
|
34
|
+
* @group Props
|
|
35
|
+
*/
|
|
36
|
+
this.closable = false;
|
|
37
|
+
/**
|
|
38
|
+
* Determines whether chip is disabled.
|
|
39
|
+
* @group Props
|
|
40
|
+
*/
|
|
41
|
+
this.disabled = false;
|
|
42
|
+
/**
|
|
43
|
+
* Callback to invoke on chip close.
|
|
44
|
+
* @param {string} string - Chip closed.
|
|
45
|
+
* @group Emits
|
|
46
|
+
*/
|
|
47
|
+
this.closed = new EventEmitter();
|
|
48
|
+
this.classesList = ['cps-chip'];
|
|
49
|
+
}
|
|
50
|
+
ngOnChanges() {
|
|
51
|
+
this.setClasses();
|
|
52
|
+
}
|
|
53
|
+
setClasses() {
|
|
54
|
+
if (this.disabled)
|
|
55
|
+
this.classesList.push('cps-chip-disabled');
|
|
56
|
+
if (this.icon && this.label) {
|
|
57
|
+
switch (this.iconPosition) {
|
|
58
|
+
case 'before': {
|
|
59
|
+
this.classesList.push('cps-chip--icon-before');
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
case 'after': {
|
|
63
|
+
this.classesList.push('cps-chip--icon-after');
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
onCloseClick(event) {
|
|
70
|
+
event.stopPropagation();
|
|
71
|
+
this.closed.emit(this.label);
|
|
72
|
+
}
|
|
73
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: CpsChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
74
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: CpsChipComponent, isStandalone: true, selector: "cps-chip", inputs: { label: "label", icon: "icon", iconColor: "iconColor", iconPosition: "iconPosition", closable: "closable", disabled: "disabled" }, outputs: { closed: "closed" }, usesOnChanges: true, ngImport: i0, template: "<div [ngClass]=\"classesList\">\n <cps-icon\n *ngIf=\"icon\"\n class=\"cps-chip-icon\"\n [icon]=\"icon\"\n [color]=\"iconColor\"></cps-icon>\n <span class=\"cps-chip-label\">{{ label }}</span>\n <cps-icon\n *ngIf=\"closable\"\n class=\"cps-chip-close-icon\"\n icon=\"close-x\"\n size=\"xsmall\"\n color=\"text-darkest\"\n (click)=\"onCloseClick($event)\"></cps-icon>\n</div>\n", styles: [":host{width:fit-content;display:inline-block;-webkit-user-select:none;-ms-user-select:none;user-select:none}:host .cps-chip{align-items:center;display:inline-flex;background-color:var(--cps-color-bg-dark);border-radius:14px;line-height:16px;padding:4px 12px;cursor:default}:host .cps-chip-close-icon{margin-left:6px;cursor:pointer}:host .cps-chip-close-icon:hover ::ng-deep .cps-icon{color:var(--cps-color-calm)!important}:host .cps-chip-label{font-size:14px;color:var(--cps-color-text-darkest);font-family:Source Sans Pro,sans-serif;font-style:normal;font-weight:400}:host .cps-chip.cps-chip-disabled{pointer-events:none;background-color:var(--cps-color-bg-mid)}:host .cps-chip.cps-chip-disabled .cps-chip-label{color:var(--cps-color-text-light)}:host .cps-chip.cps-chip-disabled .cps-chip-icon ::ng-deep .cps-icon,:host .cps-chip.cps-chip-disabled .cps-chip-close-icon ::ng-deep .cps-icon{color:var(--cps-color-text-light)!important}:host .cps-chip.cps-chip--icon-before .cps-chip-icon{margin-right:6px}:host .cps-chip.cps-chip--icon-after .cps-chip-icon{margin-left:6px;order:1}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CpsIconComponent, selector: "cps-icon", inputs: ["icon", "size", "color"] }] }); }
|
|
75
|
+
}
|
|
76
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: CpsChipComponent, decorators: [{
|
|
77
|
+
type: Component,
|
|
78
|
+
args: [{ standalone: true, imports: [CommonModule, CpsIconComponent], selector: 'cps-chip', template: "<div [ngClass]=\"classesList\">\n <cps-icon\n *ngIf=\"icon\"\n class=\"cps-chip-icon\"\n [icon]=\"icon\"\n [color]=\"iconColor\"></cps-icon>\n <span class=\"cps-chip-label\">{{ label }}</span>\n <cps-icon\n *ngIf=\"closable\"\n class=\"cps-chip-close-icon\"\n icon=\"close-x\"\n size=\"xsmall\"\n color=\"text-darkest\"\n (click)=\"onCloseClick($event)\"></cps-icon>\n</div>\n", styles: [":host{width:fit-content;display:inline-block;-webkit-user-select:none;-ms-user-select:none;user-select:none}:host .cps-chip{align-items:center;display:inline-flex;background-color:var(--cps-color-bg-dark);border-radius:14px;line-height:16px;padding:4px 12px;cursor:default}:host .cps-chip-close-icon{margin-left:6px;cursor:pointer}:host .cps-chip-close-icon:hover ::ng-deep .cps-icon{color:var(--cps-color-calm)!important}:host .cps-chip-label{font-size:14px;color:var(--cps-color-text-darkest);font-family:Source Sans Pro,sans-serif;font-style:normal;font-weight:400}:host .cps-chip.cps-chip-disabled{pointer-events:none;background-color:var(--cps-color-bg-mid)}:host .cps-chip.cps-chip-disabled .cps-chip-label{color:var(--cps-color-text-light)}:host .cps-chip.cps-chip-disabled .cps-chip-icon ::ng-deep .cps-icon,:host .cps-chip.cps-chip-disabled .cps-chip-close-icon ::ng-deep .cps-icon{color:var(--cps-color-text-light)!important}:host .cps-chip.cps-chip--icon-before .cps-chip-icon{margin-right:6px}:host .cps-chip.cps-chip--icon-after .cps-chip-icon{margin-left:6px;order:1}\n"] }]
|
|
79
|
+
}], propDecorators: { label: [{
|
|
80
|
+
type: Input
|
|
81
|
+
}], icon: [{
|
|
82
|
+
type: Input
|
|
83
|
+
}], iconColor: [{
|
|
84
|
+
type: Input
|
|
85
|
+
}], iconPosition: [{
|
|
86
|
+
type: Input
|
|
87
|
+
}], closable: [{
|
|
88
|
+
type: Input
|
|
89
|
+
}], disabled: [{
|
|
90
|
+
type: Input
|
|
91
|
+
}], closed: [{
|
|
92
|
+
type: Output
|
|
93
|
+
}] } });
|
|
94
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3BzLWNoaXAuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY3BzLXVpLWtpdC9zcmMvbGliL2NvbXBvbmVudHMvY3BzLWNoaXAvY3BzLWNoaXAuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY3BzLXVpLWtpdC9zcmMvbGliL2NvbXBvbmVudHMvY3B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