@cuby-ui/core 0.0.11 → 0.0.13
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/components/button/button.component.d.ts +8 -3
- package/components/input-number/input-number.component.d.ts +11 -6
- package/components/input-number/input-number.module.d.ts +4 -3
- package/components/input-password/input-password.component.d.ts +8 -4
- package/components/input-password/input-password.module.d.ts +2 -1
- package/components/input-text/input-text.component.d.ts +9 -6
- package/components/input-text/input-text.module.d.ts +2 -1
- package/components/svg/svg.component.d.ts +5 -10
- package/components/textarea/textarea.component.d.ts +3 -2
- package/directives/index.d.ts +1 -0
- package/directives/text-field-controller/index.d.ts +8 -0
- package/directives/text-field-controller/text-field-controller.module.d.ts +11 -0
- package/directives/text-field-controller/text-field-controller.provider.d.ts +4 -0
- package/directives/text-field-controller/text-field-icon-left.directive.d.ts +9 -0
- package/directives/text-field-controller/text-field-id.directive.d.ts +8 -0
- package/directives/text-field-controller/text-field-is-error.directive.d.ts +8 -0
- package/directives/text-field-controller/text-field-placeholder.directive.d.ts +8 -0
- package/directives/text-field-controller/text-field-size.directive.d.ts +9 -0
- package/directives/text-field-controller/text-field.controller.d.ts +20 -0
- package/esm2020/components/accordion/accordion-item/accordion-item.component.mjs +1 -1
- package/esm2020/components/button/button.component.mjs +32 -13
- package/esm2020/components/context-menu/context-menu.component.mjs +3 -3
- package/esm2020/components/icon-button/icon-button.component.mjs +2 -2
- package/esm2020/components/input-number/input-number.component.mjs +39 -18
- package/esm2020/components/input-number/input-number.module.mjs +19 -6
- package/esm2020/components/input-password/input-password.component.mjs +34 -15
- package/esm2020/components/input-password/input-password.module.mjs +9 -4
- package/esm2020/components/input-text/input-text.component.mjs +34 -17
- package/esm2020/components/input-text/input-text.module.mjs +9 -4
- package/esm2020/components/svg/svg.component.mjs +15 -24
- package/esm2020/components/textarea/textarea.component.mjs +13 -11
- package/esm2020/directives/index.mjs +2 -0
- package/esm2020/directives/text-field-controller/index.mjs +9 -0
- package/esm2020/directives/text-field-controller/text-field-controller.module.mjs +40 -0
- package/esm2020/directives/text-field-controller/text-field-controller.provider.mjs +24 -0
- package/esm2020/directives/text-field-controller/text-field-icon-left.directive.mjs +21 -0
- package/esm2020/directives/text-field-controller/text-field-id.directive.mjs +21 -0
- package/esm2020/directives/text-field-controller/text-field-is-error.directive.mjs +24 -0
- package/esm2020/directives/text-field-controller/text-field-placeholder.directive.mjs +21 -0
- package/esm2020/directives/text-field-controller/text-field-size.directive.mjs +24 -0
- package/esm2020/directives/text-field-controller/text-field.controller.mjs +25 -0
- package/esm2020/index.mjs +3 -2
- package/esm2020/interfaces/context-menu-item.mjs +1 -1
- package/fesm2015/cuby-ui-core.mjs +359 -105
- package/fesm2015/cuby-ui-core.mjs.map +1 -1
- package/fesm2020/cuby-ui-core.mjs +359 -105
- package/fesm2020/cuby-ui-core.mjs.map +1 -1
- package/index.d.ts +2 -1
- package/interfaces/context-menu-item.d.ts +1 -0
- package/package.json +3 -3
- package/styles/mixins/buttons.scss +2 -0
- package/styles/mixins/inputs.scss +8 -1
- package/styles/variables/colors.scss +3 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy, InjectionToken, inject,
|
|
2
|
+
import { Component, ChangeDetectionStrategy, InjectionToken, inject, Input, HostBinding, ChangeDetectorRef, ViewChild, NgModule, ElementRef, HostListener, Directive, forwardRef } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
5
5
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
@@ -7,7 +7,7 @@ import { cuiIsIcon, CUI_ICONS } from '@cuby-ui/icons';
|
|
|
7
7
|
import * as i2 from '@angular/forms';
|
|
8
8
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
9
9
|
import * as i1$1 from '@cuby-ui/cdk';
|
|
10
|
-
import { CuiAutoResizingDirective } from '@cuby-ui/cdk';
|
|
10
|
+
import { cuiProvide, CuiAutoResizingDirective } from '@cuby-ui/cdk';
|
|
11
11
|
|
|
12
12
|
class CuiAccordionComponent {
|
|
13
13
|
}
|
|
@@ -30,8 +30,6 @@ const CUI_BUTTON_OPTIONS = new InjectionToken('', {
|
|
|
30
30
|
class CuiSvgComponent {
|
|
31
31
|
constructor() {
|
|
32
32
|
this.domSanitizer = inject(DomSanitizer);
|
|
33
|
-
this.element = inject(ElementRef).nativeElement;
|
|
34
|
-
this.STROKE_WIDTH_ATTRIBUTE = 'stroke-width';
|
|
35
33
|
}
|
|
36
34
|
set icon(icon) {
|
|
37
35
|
// TODO: В данном случае подключаются все иконки (вероятно, можно как-то оптимизировано их подключать)
|
|
@@ -39,44 +37,37 @@ class CuiSvgComponent {
|
|
|
39
37
|
? CUI_ICONS[icon]
|
|
40
38
|
: icon);
|
|
41
39
|
}
|
|
42
|
-
|
|
43
|
-
this.
|
|
44
|
-
this.updateStrokeWidth();
|
|
40
|
+
get isWithStrokeWidth() {
|
|
41
|
+
return !!this.strokeWidth;
|
|
45
42
|
}
|
|
46
43
|
get isWithColor() {
|
|
47
44
|
return !!this.color;
|
|
48
45
|
}
|
|
49
|
-
ngAfterViewInit() {
|
|
50
|
-
this.updateStrokeWidth();
|
|
51
|
-
}
|
|
52
|
-
updateStrokeWidth() {
|
|
53
|
-
if (this._strokeWidth === undefined) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
this.element.querySelectorAll(`[${this.STROKE_WIDTH_ATTRIBUTE}]`)
|
|
57
|
-
.forEach(element => {
|
|
58
|
-
element.setAttribute(this.STROKE_WIDTH_ATTRIBUTE, this._strokeWidth.toString());
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
46
|
}
|
|
62
47
|
CuiSvgComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
63
|
-
CuiSvgComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: { width: "width", height: "height",
|
|
48
|
+
CuiSvgComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: { width: "width", height: "height", strokeWidth: "strokeWidth", color: "color", icon: "icon" }, host: { properties: { "style.--stroke-width": "this.strokeWidth", "style.--color": "this.color", "class._with-stroke-width": "this.isWithStrokeWidth", "class._with-color": "this.isWithColor" } }, ngImport: i0, template: "<span\n [innerHTML]=\"safeSvgContent\"\n [style.width.px]=\"width\"\n [style.height.px]=\"height\"\n></span>", styles: [":host{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;vertical-align:middle;line-height:0}:host ::ng-deep svg{width:100%;height:100%}:host._with-stroke-width ::ng-deep [stroke-width]{stroke-width:var(--stroke-width)}:host._with-color ::ng-deep [stroke]{stroke:var(--color)}:host._with-color ::ng-deep [fill]:not([fill=none]){fill:var(--color)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
64
49
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgComponent, decorators: [{
|
|
65
50
|
type: Component,
|
|
66
|
-
args: [{ selector: 'cui-svg[icon]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n [innerHTML]=\"safeSvgContent\"\n [style.width.px]=\"width\"\n [style.height.px]=\"height\"\n></span>", styles: [":host{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;vertical-align:middle;line-height:0}:host._with-
|
|
51
|
+
args: [{ selector: 'cui-svg[icon]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n [innerHTML]=\"safeSvgContent\"\n [style.width.px]=\"width\"\n [style.height.px]=\"height\"\n></span>", styles: [":host{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;vertical-align:middle;line-height:0}:host ::ng-deep svg{width:100%;height:100%}:host._with-stroke-width ::ng-deep [stroke-width]{stroke-width:var(--stroke-width)}:host._with-color ::ng-deep [stroke]{stroke:var(--color)}:host._with-color ::ng-deep [fill]:not([fill=none]){fill:var(--color)}\n"] }]
|
|
67
52
|
}], propDecorators: { width: [{
|
|
68
53
|
type: Input
|
|
69
54
|
}], height: [{
|
|
70
55
|
type: Input
|
|
56
|
+
}], strokeWidth: [{
|
|
57
|
+
type: Input
|
|
58
|
+
}, {
|
|
59
|
+
type: HostBinding,
|
|
60
|
+
args: ['style.--stroke-width']
|
|
71
61
|
}], color: [{
|
|
72
62
|
type: Input
|
|
73
63
|
}, {
|
|
74
64
|
type: HostBinding,
|
|
75
|
-
args: ['style.--
|
|
65
|
+
args: ['style.--color']
|
|
76
66
|
}], icon: [{
|
|
77
67
|
type: Input
|
|
78
|
-
}],
|
|
79
|
-
type:
|
|
68
|
+
}], isWithStrokeWidth: [{
|
|
69
|
+
type: HostBinding,
|
|
70
|
+
args: ['class._with-stroke-width']
|
|
80
71
|
}], isWithColor: [{
|
|
81
72
|
type: HostBinding,
|
|
82
73
|
args: ['class._with-color']
|
|
@@ -86,30 +77,49 @@ class CuiButtonComponent {
|
|
|
86
77
|
constructor() {
|
|
87
78
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
88
79
|
this.cuiButtonOptions = inject(CUI_BUTTON_OPTIONS);
|
|
80
|
+
this.COLOR_BASE_500 = 'var(--cui-base-500)';
|
|
81
|
+
this.BUTTON_ICONS_COLOR_BASE_500 = [
|
|
82
|
+
'secondary',
|
|
83
|
+
'outlined',
|
|
84
|
+
'outlined-gray',
|
|
85
|
+
'ghost'
|
|
86
|
+
];
|
|
87
|
+
this._appearance = this.cuiButtonOptions.appearance;
|
|
88
|
+
this.iconColor = 'currentColor';
|
|
89
89
|
this._size = this.cuiButtonOptions.size;
|
|
90
|
-
this.
|
|
90
|
+
this.iconDimensions = {
|
|
91
91
|
width: 20,
|
|
92
92
|
height: 20
|
|
93
93
|
};
|
|
94
|
-
this.appearance = this.cuiButtonOptions.appearance;
|
|
95
94
|
this.shape = this.cuiButtonOptions.shape;
|
|
96
95
|
this.disabled = false;
|
|
97
96
|
this.isLoaderShown = false;
|
|
98
97
|
this.containsOnlyIcon = false;
|
|
99
98
|
}
|
|
99
|
+
get appearance() {
|
|
100
|
+
return this._appearance;
|
|
101
|
+
}
|
|
102
|
+
set appearance(appearance) {
|
|
103
|
+
this._appearance = appearance;
|
|
104
|
+
if (this.BUTTON_ICONS_COLOR_BASE_500.includes(appearance)) {
|
|
105
|
+
this.iconColor = this.COLOR_BASE_500;
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
this.iconColor = 'currentColor';
|
|
109
|
+
}
|
|
100
110
|
get size() {
|
|
101
111
|
return this._size;
|
|
102
112
|
}
|
|
103
113
|
set size(size) {
|
|
104
114
|
this._size = size;
|
|
105
115
|
if (size === 'xxs') {
|
|
106
|
-
this.
|
|
116
|
+
this.iconDimensions = {
|
|
107
117
|
width: 16,
|
|
108
118
|
height: 16
|
|
109
119
|
};
|
|
110
120
|
return;
|
|
111
121
|
}
|
|
112
|
-
this.
|
|
122
|
+
this.iconDimensions = {
|
|
113
123
|
width: 20,
|
|
114
124
|
height: 20
|
|
115
125
|
};
|
|
@@ -128,16 +138,11 @@ class CuiButtonComponent {
|
|
|
128
138
|
}
|
|
129
139
|
}
|
|
130
140
|
CuiButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
131
|
-
CuiButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: {
|
|
141
|
+
CuiButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: { shape: "shape", disabled: "disabled", isLoaderShown: "isLoaderShown", icon: "icon", iconRight: "iconRight", appearance: "appearance", size: "size" }, host: { properties: { "attr.data-shape": "this.shape", "class._disabled": "this.disabled", "class._loading": "this.isLoaderShown", "attr.data-appearance": "this.appearance", "attr.data-size": "this.size", "class._only-icon": "this.containsOnlyIcon", "disabled": "this.isDisabled" } }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true }], ngImport: i0, template: "<span\n class=\"c-wrapper\"\n [class.c-wrapper_invisible]=\"isLoaderShown\"\n>\n <cui-svg\n *ngIf=\"icon\"\n [icon]=\"icon\"\n [width]=\"iconDimensions.width\"\n [height]=\"iconDimensions.height\"\n [color]=\"iconColor\"\n ></cui-svg>\n <span\n #content\n *ngIf=\"!containsOnlyIcon\"\n >\n <ng-content></ng-content>\n </span>\n <cui-svg\n *ngIf=\"iconRight\"\n [icon]=\"iconRight\"\n [width]=\"iconDimensions.width\"\n [height]=\"iconDimensions.height\"\n [color]=\"iconColor\"\n ></cui-svg>\n</span>\n<cui-svg\n *ngIf=\"isLoaderShown\"\n icon=\"cuiIconLoading\"\n class=\"c-loader\"\n></cui-svg>\n", styles: [":host{padding:0;border:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;font-weight:500;font-size:14px;line-height:20px;display:inline-block;position:relative;box-sizing:border-box;border-radius:8px;font-family:var(--cui-main-font)}:host:disabled{cursor:not-allowed}:host[data-shape=rounded]{border-radius:20px}:host[data-appearance=accent]{background:var(--cui-accent-800);color:var(--cui-base-0)}@media (hover: hover){:host[data-appearance=accent]:hover{background:var(--cui-accent-900)}}:host[data-appearance=accent]:active{background:var(--cui-accent-900)}:host[data-appearance=accent]:disabled{background:var(--cui-accent-800)}:host[data-appearance=secondary]{background:var(--cui-base-100);color:var(--cui-base-900)}@media (hover: hover){:host[data-appearance=secondary]:hover{background:var(--cui-base-200)}}:host[data-appearance=secondary]:active{background:var(--cui-base-200)}:host[data-appearance=secondary]:disabled{background:var(--cui-base-100)}:host[data-appearance=outlined]{border:1px solid var(--cui-base-200);background:var(--cui-base-0);color:var(--cui-base-900)}@media (hover: hover){:host[data-appearance=outlined]:hover{background:var(--cui-base-50)}}:host[data-appearance=outlined]:active{background:var(--cui-base-50)}:host[data-appearance=outlined]:disabled{background:var(--cui-base-0)}:host[data-appearance=outlined-gray]{border:1px solid var(--cui-base-200);background:var(--cui-base-10);color:var(--cui-base-900)}@media (hover: hover){:host[data-appearance=outlined-gray]:hover{background:var(--cui-base-50)}}:host[data-appearance=outlined-gray]:active{background:var(--cui-base-50)}:host[data-appearance=outlined-gray]:disabled{background:var(--cui-base-10)}:host[data-appearance=ghost]{color:var(--cui-base-900)}@media (hover: hover){:host[data-appearance=ghost]:hover{background:var(--cui-base-50)}}:host[data-appearance=ghost]:active{background:var(--cui-base-50)}:host[data-appearance=ghost]:disabled{background:inherit}:host[data-appearance=destructive]{background:var(--cui-error-500);color:var(--cui-base-0)}@media (hover: hover){:host[data-appearance=destructive]:hover{background:var(--cui-error-600)}}:host[data-appearance=destructive]:active{background:var(--cui-error-600)}:host[data-appearance=destructive]:disabled{background:var(--cui-error-500)}:host[data-appearance=link]{height:24px!important;padding:0 4px!important;color:var(--cui-info-600)}@media (hover: hover){:host[data-appearance=link]:hover{color:var(--cui-info-900)}}:host[data-appearance=link]:active{color:var(--cui-info-900)}:host[data-appearance=link]:disabled{color:var(--cui-info-600)}:host[data-size=xxs]{font-size:12px;line-height:14px;height:28px;padding:0 8px}:host[data-size=xxs][data-appearance=outlined],:host[data-size=xxs][data-appearance=outlined-gray]{padding:0 7px}:host[data-size=xxs]._only-icon{width:28px}:host[data-size=xxs] .c-wrapper{gap:6px}:host[data-size=xs]{font-size:13px;line-height:16px;height:32px;padding:0 12px}:host[data-size=xs][data-appearance=outlined],:host[data-size=xs][data-appearance=outlined-gray]{padding:0 11px}:host[data-size=xs]._only-icon{width:32px}:host[data-size=sm]{height:36px;padding:0 14px}:host[data-size=sm][data-appearance=outlined],:host[data-size=sm][data-appearance=outlined-gray]{padding:0 13px}:host[data-size=sm]._only-icon{width:36px}:host[data-size=md]{height:40px;padding:0 16px}:host[data-size=md][data-appearance=outlined],:host[data-size=md][data-appearance=outlined-gray]{padding:0 15px}:host[data-size=md]._only-icon{width:40px}:host._disabled{opacity:.5}.c-wrapper{display:flex;justify-content:center;align-items:center;gap:8px;height:100%}.c-wrapper_invisible{opacity:0}.c-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
132
142
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonComponent, decorators: [{
|
|
133
143
|
type: Component,
|
|
134
|
-
args: [{ selector: 'button[cuiButton], a[cuiButton]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n class=\"c-wrapper\"\n [class.c-wrapper_invisible]=\"isLoaderShown\"\n>\n <cui-svg\n *ngIf=\"icon\"\n [icon]=\"icon\"\n [width]=\"
|
|
135
|
-
}], propDecorators: {
|
|
136
|
-
type: Input
|
|
137
|
-
}, {
|
|
138
|
-
type: HostBinding,
|
|
139
|
-
args: ['attr.data-appearance']
|
|
140
|
-
}], shape: [{
|
|
144
|
+
args: [{ selector: 'button[cuiButton], a[cuiButton]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n class=\"c-wrapper\"\n [class.c-wrapper_invisible]=\"isLoaderShown\"\n>\n <cui-svg\n *ngIf=\"icon\"\n [icon]=\"icon\"\n [width]=\"iconDimensions.width\"\n [height]=\"iconDimensions.height\"\n [color]=\"iconColor\"\n ></cui-svg>\n <span\n #content\n *ngIf=\"!containsOnlyIcon\"\n >\n <ng-content></ng-content>\n </span>\n <cui-svg\n *ngIf=\"iconRight\"\n [icon]=\"iconRight\"\n [width]=\"iconDimensions.width\"\n [height]=\"iconDimensions.height\"\n [color]=\"iconColor\"\n ></cui-svg>\n</span>\n<cui-svg\n *ngIf=\"isLoaderShown\"\n icon=\"cuiIconLoading\"\n class=\"c-loader\"\n></cui-svg>\n", styles: [":host{padding:0;border:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;font-weight:500;font-size:14px;line-height:20px;display:inline-block;position:relative;box-sizing:border-box;border-radius:8px;font-family:var(--cui-main-font)}:host:disabled{cursor:not-allowed}:host[data-shape=rounded]{border-radius:20px}:host[data-appearance=accent]{background:var(--cui-accent-800);color:var(--cui-base-0)}@media (hover: hover){:host[data-appearance=accent]:hover{background:var(--cui-accent-900)}}:host[data-appearance=accent]:active{background:var(--cui-accent-900)}:host[data-appearance=accent]:disabled{background:var(--cui-accent-800)}:host[data-appearance=secondary]{background:var(--cui-base-100);color:var(--cui-base-900)}@media (hover: hover){:host[data-appearance=secondary]:hover{background:var(--cui-base-200)}}:host[data-appearance=secondary]:active{background:var(--cui-base-200)}:host[data-appearance=secondary]:disabled{background:var(--cui-base-100)}:host[data-appearance=outlined]{border:1px solid var(--cui-base-200);background:var(--cui-base-0);color:var(--cui-base-900)}@media (hover: hover){:host[data-appearance=outlined]:hover{background:var(--cui-base-50)}}:host[data-appearance=outlined]:active{background:var(--cui-base-50)}:host[data-appearance=outlined]:disabled{background:var(--cui-base-0)}:host[data-appearance=outlined-gray]{border:1px solid var(--cui-base-200);background:var(--cui-base-10);color:var(--cui-base-900)}@media (hover: hover){:host[data-appearance=outlined-gray]:hover{background:var(--cui-base-50)}}:host[data-appearance=outlined-gray]:active{background:var(--cui-base-50)}:host[data-appearance=outlined-gray]:disabled{background:var(--cui-base-10)}:host[data-appearance=ghost]{color:var(--cui-base-900)}@media (hover: hover){:host[data-appearance=ghost]:hover{background:var(--cui-base-50)}}:host[data-appearance=ghost]:active{background:var(--cui-base-50)}:host[data-appearance=ghost]:disabled{background:inherit}:host[data-appearance=destructive]{background:var(--cui-error-500);color:var(--cui-base-0)}@media (hover: hover){:host[data-appearance=destructive]:hover{background:var(--cui-error-600)}}:host[data-appearance=destructive]:active{background:var(--cui-error-600)}:host[data-appearance=destructive]:disabled{background:var(--cui-error-500)}:host[data-appearance=link]{height:24px!important;padding:0 4px!important;color:var(--cui-info-600)}@media (hover: hover){:host[data-appearance=link]:hover{color:var(--cui-info-900)}}:host[data-appearance=link]:active{color:var(--cui-info-900)}:host[data-appearance=link]:disabled{color:var(--cui-info-600)}:host[data-size=xxs]{font-size:12px;line-height:14px;height:28px;padding:0 8px}:host[data-size=xxs][data-appearance=outlined],:host[data-size=xxs][data-appearance=outlined-gray]{padding:0 7px}:host[data-size=xxs]._only-icon{width:28px}:host[data-size=xxs] .c-wrapper{gap:6px}:host[data-size=xs]{font-size:13px;line-height:16px;height:32px;padding:0 12px}:host[data-size=xs][data-appearance=outlined],:host[data-size=xs][data-appearance=outlined-gray]{padding:0 11px}:host[data-size=xs]._only-icon{width:32px}:host[data-size=sm]{height:36px;padding:0 14px}:host[data-size=sm][data-appearance=outlined],:host[data-size=sm][data-appearance=outlined-gray]{padding:0 13px}:host[data-size=sm]._only-icon{width:36px}:host[data-size=md]{height:40px;padding:0 16px}:host[data-size=md][data-appearance=outlined],:host[data-size=md][data-appearance=outlined-gray]{padding:0 15px}:host[data-size=md]._only-icon{width:40px}:host._disabled{opacity:.5}.c-wrapper{display:flex;justify-content:center;align-items:center;gap:8px;height:100%}.c-wrapper_invisible{opacity:0}.c-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}\n"] }]
|
|
145
|
+
}], propDecorators: { shape: [{
|
|
141
146
|
type: Input
|
|
142
147
|
}, {
|
|
143
148
|
type: HostBinding,
|
|
@@ -156,6 +161,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
156
161
|
type: Input
|
|
157
162
|
}], iconRight: [{
|
|
158
163
|
type: Input
|
|
164
|
+
}], appearance: [{
|
|
165
|
+
type: Input
|
|
166
|
+
}, {
|
|
167
|
+
type: HostBinding,
|
|
168
|
+
args: ['attr.data-appearance']
|
|
159
169
|
}], size: [{
|
|
160
170
|
type: Input
|
|
161
171
|
}, {
|
|
@@ -181,7 +191,7 @@ class CuiAccordionItemComponent {
|
|
|
181
191
|
}
|
|
182
192
|
}
|
|
183
193
|
CuiAccordionItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
184
|
-
CuiAccordionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiAccordionItemComponent, selector: "cui-accordion-item", ngImport: i0, template: "<header class=\"c-header\">\n <span>\n <ng-content></ng-content>\n </span>\n <button\n cuiButton\n appearance=\"ghost\"\n size=\"xxs\"\n icon=\"cuiIconChevronDown\"\n (click)=\"onRowToggle()\"\n [class.c-button_opened]=\"isOpen\"\n ></button>\n</header>\n<div *ngIf=\"isOpen\">\n <ng-content select=\"[cuiAccordionItemContent]\"></ng-content>\n</div>\n", styles: [":host{padding:12px;display:flex;flex-direction:column;gap:8px;background:var(--cui-base-10);border-radius:8px}.c-header{font-weight:400;font-size:12px;line-height:14px;display:flex;justify-content:space-between;align-items:center;gap:8px;color:var(--cui-base-900);font-family:var(--cui-main-font);text-transform:uppercase}.c-button_opened{transform:rotate(180deg)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["
|
|
194
|
+
CuiAccordionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiAccordionItemComponent, selector: "cui-accordion-item", ngImport: i0, template: "<header class=\"c-header\">\n <span>\n <ng-content></ng-content>\n </span>\n <button\n cuiButton\n appearance=\"ghost\"\n size=\"xxs\"\n icon=\"cuiIconChevronDown\"\n (click)=\"onRowToggle()\"\n [class.c-button_opened]=\"isOpen\"\n ></button>\n</header>\n<div *ngIf=\"isOpen\">\n <ng-content select=\"[cuiAccordionItemContent]\"></ng-content>\n</div>\n", styles: [":host{padding:12px;display:flex;flex-direction:column;gap:8px;background:var(--cui-base-10);border-radius:8px}.c-header{font-weight:400;font-size:12px;line-height:14px;display:flex;justify-content:space-between;align-items:center;gap:8px;color:var(--cui-base-900);font-family:var(--cui-main-font);text-transform:uppercase}.c-button_opened{transform:rotate(180deg)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
185
195
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAccordionItemComponent, decorators: [{
|
|
186
196
|
type: Component,
|
|
187
197
|
args: [{ selector: 'cui-accordion-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<header class=\"c-header\">\n <span>\n <ng-content></ng-content>\n </span>\n <button\n cuiButton\n appearance=\"ghost\"\n size=\"xxs\"\n icon=\"cuiIconChevronDown\"\n (click)=\"onRowToggle()\"\n [class.c-button_opened]=\"isOpen\"\n ></button>\n</header>\n<div *ngIf=\"isOpen\">\n <ng-content select=\"[cuiAccordionItemContent]\"></ng-content>\n</div>\n", styles: [":host{padding:12px;display:flex;flex-direction:column;gap:8px;background:var(--cui-base-10);border-radius:8px}.c-header{font-weight:400;font-size:12px;line-height:14px;display:flex;justify-content:space-between;align-items:center;gap:8px;color:var(--cui-base-900);font-family:var(--cui-main-font);text-transform:uppercase}.c-button_opened{transform:rotate(180deg)}\n"] }]
|
|
@@ -340,10 +350,10 @@ class CuiContextMenuComponent {
|
|
|
340
350
|
}
|
|
341
351
|
}
|
|
342
352
|
CuiContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiContextMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
343
|
-
CuiContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiContextMenuComponent, selector: "cui-context-menu[items][target]", inputs: { items: "items", target: "target" }, host: { listeners: { "document:click": "onClickOutside($event.target)" }, properties: { "class._hidden": "this.isHidden", "style.left.px": "this.pageX", "style.top.px": "this.pageY" } }, ngImport: i0, template: "<ul\n *ngIf=\"isVisible\"\n class=\"c-ul\"\n>\n <li
|
|
353
|
+
CuiContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiContextMenuComponent, selector: "cui-context-menu[items][target]", inputs: { items: "items", target: "target" }, host: { listeners: { "document:click": "onClickOutside($event.target)" }, properties: { "class._hidden": "this.isHidden", "style.left.px": "this.pageX", "style.top.px": "this.pageY" } }, ngImport: i0, template: "<ul\n *ngIf=\"isVisible\"\n class=\"c-ul\"\n>\n <li\n *ngFor=\"let item of items; trackBy: trackByFn\"\n [style.color]=\"item.color\"\n >\n <button\n class=\"c-button\"\n (click)=\"onSelect(item)\"\n >\n <cui-svg\n *ngIf=\"item.icon\"\n [icon]=\"item.icon\"\n [color]=\"item.color\"\n ></cui-svg>\n <span>{{ item.label }}</span>\n </button>\n </li>\n</ul>\n", styles: [":host{position:absolute;display:block;width:268px;border-radius:8px}:host._hidden{visibility:hidden}.c-ul{padding:7px 0;margin:0;list-style:none;font-weight:400;font-size:14px;line-height:20px;box-shadow:0 1px 4px #0000000a,0 1px 4px #0000000a;border:1px solid var(--cui-base-200);border-radius:inherit;background:var(--cui-base-0);color:var(--cui-base-900);font-family:var(--cui-main-font)}.c-button{padding:8px 11px 8px 0;border:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;padding:8px 11px;width:100%;display:flex;gap:12px}.c-button:active{background:var(--cui-base-50)}@media (hover: hover){.c-button:hover{background:var(--cui-base-50)}}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
344
354
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiContextMenuComponent, decorators: [{
|
|
345
355
|
type: Component,
|
|
346
|
-
args: [{ selector: 'cui-context-menu[items][target]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ul\n *ngIf=\"isVisible\"\n class=\"c-ul\"\n>\n <li
|
|
356
|
+
args: [{ selector: 'cui-context-menu[items][target]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ul\n *ngIf=\"isVisible\"\n class=\"c-ul\"\n>\n <li\n *ngFor=\"let item of items; trackBy: trackByFn\"\n [style.color]=\"item.color\"\n >\n <button\n class=\"c-button\"\n (click)=\"onSelect(item)\"\n >\n <cui-svg\n *ngIf=\"item.icon\"\n [icon]=\"item.icon\"\n [color]=\"item.color\"\n ></cui-svg>\n <span>{{ item.label }}</span>\n </button>\n </li>\n</ul>\n", styles: [":host{position:absolute;display:block;width:268px;border-radius:8px}:host._hidden{visibility:hidden}.c-ul{padding:7px 0;margin:0;list-style:none;font-weight:400;font-size:14px;line-height:20px;box-shadow:0 1px 4px #0000000a,0 1px 4px #0000000a;border:1px solid var(--cui-base-200);border-radius:inherit;background:var(--cui-base-0);color:var(--cui-base-900);font-family:var(--cui-main-font)}.c-button{padding:8px 11px 8px 0;border:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;padding:8px 11px;width:100%;display:flex;gap:12px}.c-button:active{background:var(--cui-base-50)}@media (hover: hover){.c-button:hover{background:var(--cui-base-50)}}\n"] }]
|
|
347
357
|
}], propDecorators: { items: [{
|
|
348
358
|
type: Input
|
|
349
359
|
}], target: [{
|
|
@@ -422,10 +432,10 @@ class CuiIconButtonComponent {
|
|
|
422
432
|
}
|
|
423
433
|
}
|
|
424
434
|
CuiIconButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiIconButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
425
|
-
CuiIconButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiIconButtonComponent, selector: "button[cuiIconButton][icon], a[cuiIconButton][icon]", inputs: { icon: "icon", color: "color", hoverColor: "hoverColor" }, host: { properties: { "style.--icon-hover-color": "this.hoverColor", "class._with-hover-color": "this.isWithHoverColor" } }, ngImport: i0, template: "<cui-svg\n [icon]=\"icon\"\n [width]=\"ICON_WIDTH\"\n [height]=\"ICON_HEIGHT\"\n [color]=\"color\"\n [strokeWidth]=\"ICON_STROKE_WIDTH\"\n class=\"c-icon\"\n></cui-svg>\n", styles: [":host{padding:0;border:0;outline:none;cursor:pointer;appearance:none;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;display:flex;justify-content:center;align-items:center;width:24px;height:24px}:host._with-hover-color:active .c-icon ::ng-deep
|
|
435
|
+
CuiIconButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiIconButtonComponent, selector: "button[cuiIconButton][icon], a[cuiIconButton][icon]", inputs: { icon: "icon", color: "color", hoverColor: "hoverColor" }, host: { properties: { "style.--icon-hover-color": "this.hoverColor", "class._with-hover-color": "this.isWithHoverColor" } }, ngImport: i0, template: "<cui-svg\n [icon]=\"icon\"\n [width]=\"ICON_WIDTH\"\n [height]=\"ICON_HEIGHT\"\n [color]=\"color\"\n [strokeWidth]=\"ICON_STROKE_WIDTH\"\n class=\"c-icon\"\n></cui-svg>\n", styles: [":host{padding:0;border:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;display:flex;justify-content:center;align-items:center;width:24px;height:24px}:host._with-hover-color:active .c-icon ::ng-deep [stroke]{stroke:var(--icon-hover-color)}:host._with-hover-color:active .c-icon ::ng-deep [fill]:not([fill=none]){fill:var(--icon-hover-color)}@media (hover: hover){:host._with-hover-color:hover .c-icon ::ng-deep [stroke]{stroke:var(--icon-hover-color)}:host._with-hover-color:hover .c-icon ::ng-deep [fill]:not([fill=none]){fill:var(--icon-hover-color)}}\n"], dependencies: [{ kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
426
436
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiIconButtonComponent, decorators: [{
|
|
427
437
|
type: Component,
|
|
428
|
-
args: [{ selector: 'button[cuiIconButton][icon], a[cuiIconButton][icon]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-svg\n [icon]=\"icon\"\n [width]=\"ICON_WIDTH\"\n [height]=\"ICON_HEIGHT\"\n [color]=\"color\"\n [strokeWidth]=\"ICON_STROKE_WIDTH\"\n class=\"c-icon\"\n></cui-svg>\n", styles: [":host{padding:0;border:0;outline:none;cursor:pointer;appearance:none;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;display:flex;justify-content:center;align-items:center;width:24px;height:24px}:host._with-hover-color:active .c-icon ::ng-deep
|
|
438
|
+
args: [{ selector: 'button[cuiIconButton][icon], a[cuiIconButton][icon]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-svg\n [icon]=\"icon\"\n [width]=\"ICON_WIDTH\"\n [height]=\"ICON_HEIGHT\"\n [color]=\"color\"\n [strokeWidth]=\"ICON_STROKE_WIDTH\"\n class=\"c-icon\"\n></cui-svg>\n", styles: [":host{padding:0;border:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;display:flex;justify-content:center;align-items:center;width:24px;height:24px}:host._with-hover-color:active .c-icon ::ng-deep [stroke]{stroke:var(--icon-hover-color)}:host._with-hover-color:active .c-icon ::ng-deep [fill]:not([fill=none]){fill:var(--icon-hover-color)}@media (hover: hover){:host._with-hover-color:hover .c-icon ::ng-deep [stroke]{stroke:var(--icon-hover-color)}:host._with-hover-color:hover .c-icon ::ng-deep [fill]:not([fill=none]){fill:var(--icon-hover-color)}}\n"] }]
|
|
429
439
|
}], propDecorators: { icon: [{
|
|
430
440
|
type: Input
|
|
431
441
|
}], color: [{
|
|
@@ -478,6 +488,177 @@ function cuiReplace(value, search, replace) {
|
|
|
478
488
|
return value.replace(regex, replace);
|
|
479
489
|
}
|
|
480
490
|
|
|
491
|
+
class CuiTextFieldController {
|
|
492
|
+
constructor(iconLeftDirective, idDirective, isErrorDirective, placeholderDirective, sizeDirective) {
|
|
493
|
+
this.iconLeftDirective = iconLeftDirective;
|
|
494
|
+
this.idDirective = idDirective;
|
|
495
|
+
this.isErrorDirective = isErrorDirective;
|
|
496
|
+
this.placeholderDirective = placeholderDirective;
|
|
497
|
+
this.sizeDirective = sizeDirective;
|
|
498
|
+
}
|
|
499
|
+
get iconLeft() {
|
|
500
|
+
return this.iconLeftDirective.iconLeft;
|
|
501
|
+
}
|
|
502
|
+
get id() {
|
|
503
|
+
return this.idDirective.id;
|
|
504
|
+
}
|
|
505
|
+
get isError() {
|
|
506
|
+
return this.isErrorDirective.isError;
|
|
507
|
+
}
|
|
508
|
+
get placeholder() {
|
|
509
|
+
return this.placeholderDirective.placeholder;
|
|
510
|
+
}
|
|
511
|
+
get size() {
|
|
512
|
+
return this.sizeDirective.size;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
const CUI_TEXT_FIELD_ICON_LEFT = new InjectionToken('', {
|
|
517
|
+
factory: () => new CuiTextFieldIconLeftDirective()
|
|
518
|
+
});
|
|
519
|
+
class CuiTextFieldIconLeftDirective {
|
|
520
|
+
}
|
|
521
|
+
CuiTextFieldIconLeftDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldIconLeftDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
522
|
+
CuiTextFieldIconLeftDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CuiTextFieldIconLeftDirective, selector: "[cuiTextFieldIconLeft]", inputs: { iconLeft: ["cuiTextFieldIconLeft", "iconLeft"] }, providers: [cuiProvide(CUI_TEXT_FIELD_ICON_LEFT, CuiTextFieldIconLeftDirective)], ngImport: i0 });
|
|
523
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldIconLeftDirective, decorators: [{
|
|
524
|
+
type: Directive,
|
|
525
|
+
args: [{
|
|
526
|
+
selector: '[cuiTextFieldIconLeft]',
|
|
527
|
+
providers: [cuiProvide(CUI_TEXT_FIELD_ICON_LEFT, CuiTextFieldIconLeftDirective)]
|
|
528
|
+
}]
|
|
529
|
+
}], propDecorators: { iconLeft: [{
|
|
530
|
+
type: Input,
|
|
531
|
+
args: ['cuiTextFieldIconLeft']
|
|
532
|
+
}] } });
|
|
533
|
+
|
|
534
|
+
const CUI_TEXT_FIELD_ID = new InjectionToken('', {
|
|
535
|
+
factory: () => new CuiTextFieldIdDirective()
|
|
536
|
+
});
|
|
537
|
+
class CuiTextFieldIdDirective {
|
|
538
|
+
}
|
|
539
|
+
CuiTextFieldIdDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldIdDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
540
|
+
CuiTextFieldIdDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CuiTextFieldIdDirective, selector: "[cuiTextFieldId]", inputs: { id: ["cuiTextFieldId", "id"] }, providers: [cuiProvide(CUI_TEXT_FIELD_ID, CuiTextFieldIdDirective)], ngImport: i0 });
|
|
541
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldIdDirective, decorators: [{
|
|
542
|
+
type: Directive,
|
|
543
|
+
args: [{
|
|
544
|
+
selector: '[cuiTextFieldId]',
|
|
545
|
+
providers: [cuiProvide(CUI_TEXT_FIELD_ID, CuiTextFieldIdDirective)]
|
|
546
|
+
}]
|
|
547
|
+
}], propDecorators: { id: [{
|
|
548
|
+
type: Input,
|
|
549
|
+
args: ['cuiTextFieldId']
|
|
550
|
+
}] } });
|
|
551
|
+
|
|
552
|
+
const CUI_TEXT_FIELD_IS_ERROR = new InjectionToken('', {
|
|
553
|
+
factory: () => new CuiTextFieldIsErrorDirective()
|
|
554
|
+
});
|
|
555
|
+
class CuiTextFieldIsErrorDirective {
|
|
556
|
+
constructor() {
|
|
557
|
+
this.isError = false;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
CuiTextFieldIsErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldIsErrorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
561
|
+
CuiTextFieldIsErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CuiTextFieldIsErrorDirective, selector: "[cuiTextFieldIsError]", inputs: { isError: ["cuiTextFieldIsError", "isError"] }, providers: [cuiProvide(CUI_TEXT_FIELD_IS_ERROR, CuiTextFieldIsErrorDirective)], ngImport: i0 });
|
|
562
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldIsErrorDirective, decorators: [{
|
|
563
|
+
type: Directive,
|
|
564
|
+
args: [{
|
|
565
|
+
selector: '[cuiTextFieldIsError]',
|
|
566
|
+
providers: [cuiProvide(CUI_TEXT_FIELD_IS_ERROR, CuiTextFieldIsErrorDirective)]
|
|
567
|
+
}]
|
|
568
|
+
}], propDecorators: { isError: [{
|
|
569
|
+
type: Input,
|
|
570
|
+
args: ['cuiTextFieldIsError']
|
|
571
|
+
}] } });
|
|
572
|
+
|
|
573
|
+
const CUI_TEXT_FIELD_PLACEHOLDER = new InjectionToken('', {
|
|
574
|
+
factory: () => new CuiTextFieldPlaceholderDirective()
|
|
575
|
+
});
|
|
576
|
+
class CuiTextFieldPlaceholderDirective {
|
|
577
|
+
}
|
|
578
|
+
CuiTextFieldPlaceholderDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldPlaceholderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
579
|
+
CuiTextFieldPlaceholderDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CuiTextFieldPlaceholderDirective, selector: "[cuiTextFieldPlaceholder]", inputs: { placeholder: ["cuiTextFieldPlaceholder", "placeholder"] }, providers: [cuiProvide(CUI_TEXT_FIELD_PLACEHOLDER, CuiTextFieldPlaceholderDirective)], ngImport: i0 });
|
|
580
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldPlaceholderDirective, decorators: [{
|
|
581
|
+
type: Directive,
|
|
582
|
+
args: [{
|
|
583
|
+
selector: '[cuiTextFieldPlaceholder]',
|
|
584
|
+
providers: [cuiProvide(CUI_TEXT_FIELD_PLACEHOLDER, CuiTextFieldPlaceholderDirective)]
|
|
585
|
+
}]
|
|
586
|
+
}], propDecorators: { placeholder: [{
|
|
587
|
+
type: Input,
|
|
588
|
+
args: ['cuiTextFieldPlaceholder']
|
|
589
|
+
}] } });
|
|
590
|
+
|
|
591
|
+
const CUI_TEXT_FIELD_SIZE = new InjectionToken('', {
|
|
592
|
+
factory: () => new CuiTextFieldSizeDirective()
|
|
593
|
+
});
|
|
594
|
+
class CuiTextFieldSizeDirective {
|
|
595
|
+
constructor() {
|
|
596
|
+
this.size = 'sm';
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
CuiTextFieldSizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldSizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
600
|
+
CuiTextFieldSizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CuiTextFieldSizeDirective, selector: "[cuiTextFieldSize]", inputs: { size: ["cuiTextFieldSize", "size"] }, providers: [cuiProvide(CUI_TEXT_FIELD_SIZE, CuiTextFieldSizeDirective)], ngImport: i0 });
|
|
601
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldSizeDirective, decorators: [{
|
|
602
|
+
type: Directive,
|
|
603
|
+
args: [{
|
|
604
|
+
selector: '[cuiTextFieldSize]',
|
|
605
|
+
providers: [cuiProvide(CUI_TEXT_FIELD_SIZE, CuiTextFieldSizeDirective)]
|
|
606
|
+
}]
|
|
607
|
+
}], propDecorators: { size: [{
|
|
608
|
+
type: Input,
|
|
609
|
+
args: ['cuiTextFieldSize']
|
|
610
|
+
}] } });
|
|
611
|
+
|
|
612
|
+
class CuiTextFieldControllerModule {
|
|
613
|
+
}
|
|
614
|
+
CuiTextFieldControllerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldControllerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
615
|
+
CuiTextFieldControllerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldControllerModule, declarations: [CuiTextFieldIconLeftDirective,
|
|
616
|
+
CuiTextFieldIdDirective,
|
|
617
|
+
CuiTextFieldPlaceholderDirective,
|
|
618
|
+
CuiTextFieldIsErrorDirective,
|
|
619
|
+
CuiTextFieldSizeDirective], exports: [CuiTextFieldIconLeftDirective,
|
|
620
|
+
CuiTextFieldIdDirective,
|
|
621
|
+
CuiTextFieldPlaceholderDirective,
|
|
622
|
+
CuiTextFieldIsErrorDirective,
|
|
623
|
+
CuiTextFieldSizeDirective] });
|
|
624
|
+
CuiTextFieldControllerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldControllerModule });
|
|
625
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldControllerModule, decorators: [{
|
|
626
|
+
type: NgModule,
|
|
627
|
+
args: [{
|
|
628
|
+
declarations: [
|
|
629
|
+
CuiTextFieldIconLeftDirective,
|
|
630
|
+
CuiTextFieldIdDirective,
|
|
631
|
+
CuiTextFieldPlaceholderDirective,
|
|
632
|
+
CuiTextFieldIsErrorDirective,
|
|
633
|
+
CuiTextFieldSizeDirective
|
|
634
|
+
],
|
|
635
|
+
exports: [
|
|
636
|
+
CuiTextFieldIconLeftDirective,
|
|
637
|
+
CuiTextFieldIdDirective,
|
|
638
|
+
CuiTextFieldPlaceholderDirective,
|
|
639
|
+
CuiTextFieldIsErrorDirective,
|
|
640
|
+
CuiTextFieldSizeDirective
|
|
641
|
+
]
|
|
642
|
+
}]
|
|
643
|
+
}] });
|
|
644
|
+
|
|
645
|
+
const CUI_TEXT_FIELD_CONTROLLER = new InjectionToken('');
|
|
646
|
+
const CUI_TEXT_FILED_CONTROLLER_PROVIDER = [
|
|
647
|
+
{
|
|
648
|
+
provide: CUI_TEXT_FIELD_CONTROLLER,
|
|
649
|
+
useFactory: (...controllers) => {
|
|
650
|
+
return new CuiTextFieldController(...controllers);
|
|
651
|
+
},
|
|
652
|
+
deps: [
|
|
653
|
+
CUI_TEXT_FIELD_ICON_LEFT,
|
|
654
|
+
CUI_TEXT_FIELD_ID,
|
|
655
|
+
CUI_TEXT_FIELD_IS_ERROR,
|
|
656
|
+
CUI_TEXT_FIELD_PLACEHOLDER,
|
|
657
|
+
CUI_TEXT_FIELD_SIZE
|
|
658
|
+
]
|
|
659
|
+
}
|
|
660
|
+
];
|
|
661
|
+
|
|
481
662
|
const INPUT_NUMBER_VALUE_ACCESSOR = {
|
|
482
663
|
provide: NG_VALUE_ACCESSOR,
|
|
483
664
|
useExisting: forwardRef(() => CuiInputNumberComponent),
|
|
@@ -486,6 +667,7 @@ const INPUT_NUMBER_VALUE_ACCESSOR = {
|
|
|
486
667
|
class CuiInputNumberComponent {
|
|
487
668
|
constructor() {
|
|
488
669
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
670
|
+
this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
|
|
489
671
|
this.cuiInputNumberOptions = inject(CUI_INPUT_NUMBER_OPTIONS);
|
|
490
672
|
this.MIN_JS_NUMBER = -(Math.pow(2, 53));
|
|
491
673
|
this.MAX_JS_NUMBER = Math.pow(2, 53);
|
|
@@ -496,13 +678,27 @@ class CuiInputNumberComponent {
|
|
|
496
678
|
this._max = this.calculateValidMaxValue(this.cuiInputNumberOptions.max);
|
|
497
679
|
this.step = this.cuiInputNumberOptions.step;
|
|
498
680
|
this.precision = this.cuiInputNumberOptions.precision;
|
|
499
|
-
this.isError = false;
|
|
500
681
|
}
|
|
501
|
-
set min(
|
|
502
|
-
this._min = this.calculateValidMinValue(
|
|
682
|
+
set min(min) {
|
|
683
|
+
this._min = this.calculateValidMinValue(min);
|
|
684
|
+
}
|
|
685
|
+
set max(max) {
|
|
686
|
+
this._max = this.calculateValidMaxValue(max);
|
|
687
|
+
}
|
|
688
|
+
get id() {
|
|
689
|
+
return this.cuiTextFieldController.id;
|
|
503
690
|
}
|
|
504
|
-
|
|
505
|
-
|
|
691
|
+
get placeholder() {
|
|
692
|
+
return this.cuiTextFieldController.placeholder;
|
|
693
|
+
}
|
|
694
|
+
get iconLeft() {
|
|
695
|
+
return this.cuiTextFieldController.iconLeft;
|
|
696
|
+
}
|
|
697
|
+
get size() {
|
|
698
|
+
return this.cuiTextFieldController.size;
|
|
699
|
+
}
|
|
700
|
+
get isError() {
|
|
701
|
+
return this.cuiTextFieldController.isError;
|
|
506
702
|
}
|
|
507
703
|
writeValue(value) {
|
|
508
704
|
var _a;
|
|
@@ -629,23 +825,20 @@ class CuiInputNumberComponent {
|
|
|
629
825
|
}
|
|
630
826
|
}
|
|
631
827
|
CuiInputNumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
632
|
-
CuiInputNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiInputNumberComponent, selector: "cui-input-number", inputs: { step: "step", precision: "precision",
|
|
828
|
+
CuiInputNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiInputNumberComponent, selector: "cui-input-number", inputs: { step: "step", precision: "precision", min: "min", max: "max" }, host: { listeners: { "click": "onFocus()" }, properties: { "class._disabled": "this.isDisabled", "attr.data-size": "this.size", "class._with-error": "this.isError" } }, providers: [
|
|
829
|
+
CUI_TEXT_FILED_CONTROLLER_PROVIDER,
|
|
830
|
+
INPUT_NUMBER_VALUE_ACCESSOR
|
|
831
|
+
], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<cui-svg\n *ngIf=\"iconLeft\"\n [icon]=\"iconLeft\"\n></cui-svg>\n<input\n #input\n [ngModel]=\"formattedValue\"\n [attr.id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n type=\"text\"\n [disabled]=\"isDisabled\"\n class=\"c-input\"\n (input)=\"onInput($event)\"\n (focus)=\"onTouched()\"\n (keydown.arrowUp)=\"onArrowUp()\"\n (keydown.arrowDown)=\"onArrowDown()\"\n>\n", styles: [":host{padding-right:13px;padding-left:13px;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;gap:8px;border:1px solid var(--cui-base-200);border-radius:8px;cursor:text;background:var(--cui-base-10);color:var(--cui-base-900);font-family:var(--cui-main-font)}:host:hover{border-color:var(--cui-base-300)}:host:focus-within{box-shadow:0 0 0 2px #e5ecff;border-color:var(--cui-info-600)}:host[data-size=sm]{padding-top:7px;padding-bottom:7px}:host[data-size=md]{padding-top:8px;padding-bottom:8px}:host._disabled{cursor:not-allowed;opacity:.5;background:var(--cui-base-50);border-color:var(--cui-base-200)}:host._with-error{border-color:var(--cui-error-500)}:host._with-error:focus-within{box-shadow:0 0 0 2px #d92d2040}.c-input{padding:0;outline:none;margin:0;border-width:0;appearance:none;caret-color:currentColor;background:none;color:inherit;font:inherit;line-height:inherit;width:100%}.c-input:disabled{cursor:not-allowed}.c-input::placeholder{color:var(--cui-base-400)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
633
832
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputNumberComponent, decorators: [{
|
|
634
833
|
type: Component,
|
|
635
|
-
args: [{ selector: 'cui-input-number', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
834
|
+
args: [{ selector: 'cui-input-number', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
835
|
+
CUI_TEXT_FILED_CONTROLLER_PROVIDER,
|
|
836
|
+
INPUT_NUMBER_VALUE_ACCESSOR
|
|
837
|
+
], template: "<cui-svg\n *ngIf=\"iconLeft\"\n [icon]=\"iconLeft\"\n></cui-svg>\n<input\n #input\n [ngModel]=\"formattedValue\"\n [attr.id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n type=\"text\"\n [disabled]=\"isDisabled\"\n class=\"c-input\"\n (input)=\"onInput($event)\"\n (focus)=\"onTouched()\"\n (keydown.arrowUp)=\"onArrowUp()\"\n (keydown.arrowDown)=\"onArrowDown()\"\n>\n", styles: [":host{padding-right:13px;padding-left:13px;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;gap:8px;border:1px solid var(--cui-base-200);border-radius:8px;cursor:text;background:var(--cui-base-10);color:var(--cui-base-900);font-family:var(--cui-main-font)}:host:hover{border-color:var(--cui-base-300)}:host:focus-within{box-shadow:0 0 0 2px #e5ecff;border-color:var(--cui-info-600)}:host[data-size=sm]{padding-top:7px;padding-bottom:7px}:host[data-size=md]{padding-top:8px;padding-bottom:8px}:host._disabled{cursor:not-allowed;opacity:.5;background:var(--cui-base-50);border-color:var(--cui-base-200)}:host._with-error{border-color:var(--cui-error-500)}:host._with-error:focus-within{box-shadow:0 0 0 2px #d92d2040}.c-input{padding:0;outline:none;margin:0;border-width:0;appearance:none;caret-color:currentColor;background:none;color:inherit;font:inherit;line-height:inherit;width:100%}.c-input:disabled{cursor:not-allowed}.c-input::placeholder{color:var(--cui-base-400)}\n"] }]
|
|
636
838
|
}], propDecorators: { step: [{
|
|
637
839
|
type: Input
|
|
638
840
|
}], precision: [{
|
|
639
841
|
type: Input
|
|
640
|
-
}], isError: [{
|
|
641
|
-
type: Input
|
|
642
|
-
}, {
|
|
643
|
-
type: HostBinding,
|
|
644
|
-
args: ['class._with-error']
|
|
645
|
-
}], inputId: [{
|
|
646
|
-
type: Input
|
|
647
|
-
}], inputPlaceholder: [{
|
|
648
|
-
type: Input
|
|
649
842
|
}], min: [{
|
|
650
843
|
type: Input
|
|
651
844
|
}], max: [{
|
|
@@ -656,6 +849,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
656
849
|
}], input: [{
|
|
657
850
|
type: ViewChild,
|
|
658
851
|
args: ['input']
|
|
852
|
+
}], size: [{
|
|
853
|
+
type: HostBinding,
|
|
854
|
+
args: ['attr.data-size']
|
|
855
|
+
}], isError: [{
|
|
856
|
+
type: HostBinding,
|
|
857
|
+
args: ['class._with-error']
|
|
659
858
|
}], onFocus: [{
|
|
660
859
|
type: HostListener,
|
|
661
860
|
args: ['click']
|
|
@@ -664,14 +863,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
664
863
|
class CuiInputNumberModule {
|
|
665
864
|
}
|
|
666
865
|
CuiInputNumberModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputNumberModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
667
|
-
CuiInputNumberModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiInputNumberModule, declarations: [CuiInputNumberComponent], imports: [CommonModule,
|
|
668
|
-
|
|
866
|
+
CuiInputNumberModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiInputNumberModule, declarations: [CuiInputNumberComponent], imports: [CommonModule,
|
|
867
|
+
FormsModule,
|
|
868
|
+
CuiSvgModule], exports: [CuiInputNumberComponent,
|
|
869
|
+
CuiTextFieldControllerModule] });
|
|
870
|
+
CuiInputNumberModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputNumberModule, imports: [CommonModule,
|
|
871
|
+
FormsModule,
|
|
872
|
+
CuiSvgModule, CuiTextFieldControllerModule] });
|
|
669
873
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputNumberModule, decorators: [{
|
|
670
874
|
type: NgModule,
|
|
671
875
|
args: [{
|
|
672
|
-
imports: [
|
|
876
|
+
imports: [
|
|
877
|
+
CommonModule,
|
|
878
|
+
FormsModule,
|
|
879
|
+
CuiSvgModule
|
|
880
|
+
],
|
|
673
881
|
declarations: [CuiInputNumberComponent],
|
|
674
|
-
exports: [
|
|
882
|
+
exports: [
|
|
883
|
+
CuiInputNumberComponent,
|
|
884
|
+
CuiTextFieldControllerModule
|
|
885
|
+
]
|
|
675
886
|
}]
|
|
676
887
|
}] });
|
|
677
888
|
|
|
@@ -683,8 +894,17 @@ const INPUT_PASSWORD_VALUE_ACCESSOR = {
|
|
|
683
894
|
class CuiInputPasswordComponent {
|
|
684
895
|
constructor() {
|
|
685
896
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
897
|
+
this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
|
|
686
898
|
this.isPasswordHidden = true;
|
|
687
|
-
|
|
899
|
+
}
|
|
900
|
+
get id() {
|
|
901
|
+
return this.cuiTextFieldController.id;
|
|
902
|
+
}
|
|
903
|
+
get placeholder() {
|
|
904
|
+
return this.cuiTextFieldController.placeholder;
|
|
905
|
+
}
|
|
906
|
+
get iconLeft() {
|
|
907
|
+
return this.cuiTextFieldController.iconLeft;
|
|
688
908
|
}
|
|
689
909
|
get isToggleButtonShown() {
|
|
690
910
|
return !this.isDisabled;
|
|
@@ -698,6 +918,12 @@ class CuiInputPasswordComponent {
|
|
|
698
918
|
get buttonTitle() {
|
|
699
919
|
return this.isPasswordHidden ? 'Reveal password' : 'Hide password';
|
|
700
920
|
}
|
|
921
|
+
get size() {
|
|
922
|
+
return this.cuiTextFieldController.size;
|
|
923
|
+
}
|
|
924
|
+
get isError() {
|
|
925
|
+
return this.cuiTextFieldController.isError;
|
|
926
|
+
}
|
|
701
927
|
writeValue(value) {
|
|
702
928
|
this.value = value;
|
|
703
929
|
this.changeDetectorRef.markForCheck();
|
|
@@ -725,22 +951,25 @@ class CuiInputPasswordComponent {
|
|
|
725
951
|
}
|
|
726
952
|
}
|
|
727
953
|
CuiInputPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
728
|
-
CuiInputPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiInputPasswordComponent, selector: "cui-input-password",
|
|
954
|
+
CuiInputPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiInputPasswordComponent, selector: "cui-input-password", host: { properties: { "class._disabled": "this.isDisabled", "attr.data-size": "this.size", "class._with-error": "this.isError" } }, providers: [
|
|
955
|
+
CUI_TEXT_FILED_CONTROLLER_PROVIDER,
|
|
956
|
+
INPUT_PASSWORD_VALUE_ACCESSOR
|
|
957
|
+
], ngImport: i0, template: "<cui-svg\n *ngIf=\"iconLeft\"\n [icon]=\"iconLeft\"\n></cui-svg>\n<input\n [ngModel]=\"value\"\n [attr.id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n [type]=\"type\"\n [disabled]=\"isDisabled\"\n class=\"c-input\"\n (input)=\"onInput($event)\"\n (focus)=\"onTouched()\"\n>\n<button\n *ngIf=\"isToggleButtonShown\"\n [title]=\"buttonTitle\"\n class=\"c-button\"\n (click)=\"onTogglePasswordVisibility()\"\n>\n <cui-svg\n [icon]=\"icon\"\n [width]=\"16\"\n [height]=\"16\"\n ></cui-svg>\n</button>\n", styles: [":host{padding-right:13px;padding-left:13px;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;gap:8px;border:1px solid var(--cui-base-200);border-radius:8px;cursor:text;background:var(--cui-base-10);color:var(--cui-base-900);font-family:var(--cui-main-font)}:host:hover{border-color:var(--cui-base-300)}:host:focus-within{box-shadow:0 0 0 2px #e5ecff;border-color:var(--cui-info-600)}:host[data-size=sm]{padding-top:7px;padding-bottom:7px}:host[data-size=md]{padding-top:8px;padding-bottom:8px}:host._disabled{cursor:not-allowed;opacity:.5;background:var(--cui-base-50);border-color:var(--cui-base-200)}:host._with-error{border-color:var(--cui-error-500)}:host._with-error:focus-within{box-shadow:0 0 0 2px #d92d2040}.c-input{padding:0;outline:none;margin:0;border-width:0;appearance:none;caret-color:currentColor;background:none;color:inherit;font:inherit;line-height:inherit;width:100%}.c-input:disabled{cursor:not-allowed}.c-input::placeholder{color:var(--cui-base-400)}.c-input::-ms-reveal{display:none}.c-input[type=password]{color:var(--cui-base-400)}.c-button{padding:0;border:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
729
958
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputPasswordComponent, decorators: [{
|
|
730
959
|
type: Component,
|
|
731
|
-
args: [{ selector: 'cui-input-password', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
args: ['class._with-error']
|
|
737
|
-
}], inputId: [{
|
|
738
|
-
type: Input
|
|
739
|
-
}], inputPlaceholder: [{
|
|
740
|
-
type: Input
|
|
741
|
-
}], isDisabled: [{
|
|
960
|
+
args: [{ selector: 'cui-input-password', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
961
|
+
CUI_TEXT_FILED_CONTROLLER_PROVIDER,
|
|
962
|
+
INPUT_PASSWORD_VALUE_ACCESSOR
|
|
963
|
+
], template: "<cui-svg\n *ngIf=\"iconLeft\"\n [icon]=\"iconLeft\"\n></cui-svg>\n<input\n [ngModel]=\"value\"\n [attr.id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n [type]=\"type\"\n [disabled]=\"isDisabled\"\n class=\"c-input\"\n (input)=\"onInput($event)\"\n (focus)=\"onTouched()\"\n>\n<button\n *ngIf=\"isToggleButtonShown\"\n [title]=\"buttonTitle\"\n class=\"c-button\"\n (click)=\"onTogglePasswordVisibility()\"\n>\n <cui-svg\n [icon]=\"icon\"\n [width]=\"16\"\n [height]=\"16\"\n ></cui-svg>\n</button>\n", styles: [":host{padding-right:13px;padding-left:13px;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;gap:8px;border:1px solid var(--cui-base-200);border-radius:8px;cursor:text;background:var(--cui-base-10);color:var(--cui-base-900);font-family:var(--cui-main-font)}:host:hover{border-color:var(--cui-base-300)}:host:focus-within{box-shadow:0 0 0 2px #e5ecff;border-color:var(--cui-info-600)}:host[data-size=sm]{padding-top:7px;padding-bottom:7px}:host[data-size=md]{padding-top:8px;padding-bottom:8px}:host._disabled{cursor:not-allowed;opacity:.5;background:var(--cui-base-50);border-color:var(--cui-base-200)}:host._with-error{border-color:var(--cui-error-500)}:host._with-error:focus-within{box-shadow:0 0 0 2px #d92d2040}.c-input{padding:0;outline:none;margin:0;border-width:0;appearance:none;caret-color:currentColor;background:none;color:inherit;font:inherit;line-height:inherit;width:100%}.c-input:disabled{cursor:not-allowed}.c-input::placeholder{color:var(--cui-base-400)}.c-input::-ms-reveal{display:none}.c-input[type=password]{color:var(--cui-base-400)}.c-button{padding:0;border:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}\n"] }]
|
|
964
|
+
}], propDecorators: { isDisabled: [{
|
|
742
965
|
type: HostBinding,
|
|
743
966
|
args: ['class._disabled']
|
|
967
|
+
}], size: [{
|
|
968
|
+
type: HostBinding,
|
|
969
|
+
args: ['attr.data-size']
|
|
970
|
+
}], isError: [{
|
|
971
|
+
type: HostBinding,
|
|
972
|
+
args: ['class._with-error']
|
|
744
973
|
}] } });
|
|
745
974
|
|
|
746
975
|
class CuiInputPasswordModule {
|
|
@@ -748,10 +977,11 @@ class CuiInputPasswordModule {
|
|
|
748
977
|
CuiInputPasswordModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputPasswordModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
749
978
|
CuiInputPasswordModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiInputPasswordModule, declarations: [CuiInputPasswordComponent], imports: [CommonModule,
|
|
750
979
|
FormsModule,
|
|
751
|
-
CuiSvgModule], exports: [CuiInputPasswordComponent
|
|
980
|
+
CuiSvgModule], exports: [CuiInputPasswordComponent,
|
|
981
|
+
CuiTextFieldControllerModule] });
|
|
752
982
|
CuiInputPasswordModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputPasswordModule, imports: [CommonModule,
|
|
753
983
|
FormsModule,
|
|
754
|
-
CuiSvgModule] });
|
|
984
|
+
CuiSvgModule, CuiTextFieldControllerModule] });
|
|
755
985
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputPasswordModule, decorators: [{
|
|
756
986
|
type: NgModule,
|
|
757
987
|
args: [{
|
|
@@ -761,7 +991,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
761
991
|
CuiSvgModule
|
|
762
992
|
],
|
|
763
993
|
declarations: [CuiInputPasswordComponent],
|
|
764
|
-
exports: [
|
|
994
|
+
exports: [
|
|
995
|
+
CuiInputPasswordComponent,
|
|
996
|
+
CuiTextFieldControllerModule
|
|
997
|
+
]
|
|
765
998
|
}]
|
|
766
999
|
}] });
|
|
767
1000
|
|
|
@@ -773,11 +1006,26 @@ const INPUT_TEXT_VALUE_ACCESSOR = {
|
|
|
773
1006
|
class CuiInputTextComponent {
|
|
774
1007
|
constructor() {
|
|
775
1008
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
776
|
-
this.
|
|
1009
|
+
this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
|
|
1010
|
+
}
|
|
1011
|
+
get id() {
|
|
1012
|
+
return this.cuiTextFieldController.id;
|
|
1013
|
+
}
|
|
1014
|
+
get placeholder() {
|
|
1015
|
+
return this.cuiTextFieldController.placeholder;
|
|
1016
|
+
}
|
|
1017
|
+
get iconLeft() {
|
|
1018
|
+
return this.cuiTextFieldController.iconLeft;
|
|
777
1019
|
}
|
|
778
1020
|
get isClearButtonShown() {
|
|
779
1021
|
return !!(this.value && !this.isDisabled);
|
|
780
1022
|
}
|
|
1023
|
+
get size() {
|
|
1024
|
+
return this.cuiTextFieldController.size;
|
|
1025
|
+
}
|
|
1026
|
+
get isError() {
|
|
1027
|
+
return this.cuiTextFieldController.isError;
|
|
1028
|
+
}
|
|
781
1029
|
writeValue(value) {
|
|
782
1030
|
this.value = value;
|
|
783
1031
|
this.changeDetectorRef.markForCheck();
|
|
@@ -807,27 +1055,28 @@ class CuiInputTextComponent {
|
|
|
807
1055
|
}
|
|
808
1056
|
}
|
|
809
1057
|
CuiInputTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
810
|
-
CuiInputTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiInputTextComponent, selector: "cui-input-text",
|
|
1058
|
+
CuiInputTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiInputTextComponent, selector: "cui-input-text", host: { listeners: { "click": "onFocus()" }, properties: { "class._disabled": "this.isDisabled", "attr.data-size": "this.size", "class._with-error": "this.isError" } }, providers: [
|
|
1059
|
+
CUI_TEXT_FILED_CONTROLLER_PROVIDER,
|
|
1060
|
+
INPUT_TEXT_VALUE_ACCESSOR
|
|
1061
|
+
], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<cui-svg\n *ngIf=\"iconLeft\"\n [icon]=\"iconLeft\"\n></cui-svg>\n<input\n #input\n [ngModel]=\"value\"\n [attr.id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n type=\"text\"\n [disabled]=\"isDisabled\"\n class=\"c-input\"\n (input)=\"onInput($event)\"\n (focus)=\"onTouched()\"\n>\n<button\n *ngIf=\"isClearButtonShown\"\n class=\"c-button\"\n (click)=\"onClear()\"\n>\n <cui-svg icon=\"cuiIconClear\"></cui-svg>\n</button>\n", styles: [":host{padding-right:13px;padding-left:13px;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;gap:8px;border:1px solid var(--cui-base-200);border-radius:8px;cursor:text;background:var(--cui-base-10);color:var(--cui-base-900);font-family:var(--cui-main-font)}:host:hover{border-color:var(--cui-base-300)}:host:focus-within{box-shadow:0 0 0 2px #e5ecff;border-color:var(--cui-info-600)}:host[data-size=sm]{padding-top:7px;padding-bottom:7px}:host[data-size=md]{padding-top:8px;padding-bottom:8px}:host._disabled{cursor:not-allowed;opacity:.5;background:var(--cui-base-50);border-color:var(--cui-base-200)}:host._with-error{border-color:var(--cui-error-500)}:host._with-error:focus-within{box-shadow:0 0 0 2px #d92d2040}.c-input{padding:0;outline:none;margin:0;border-width:0;appearance:none;caret-color:currentColor;background:none;color:inherit;font:inherit;line-height:inherit;width:100%}.c-input:disabled{cursor:not-allowed}.c-input::placeholder{color:var(--cui-base-400)}.c-button{padding:0;border:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
811
1062
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputTextComponent, decorators: [{
|
|
812
1063
|
type: Component,
|
|
813
|
-
args: [{ selector: 'cui-input-text', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
args: ['class._with-error']
|
|
819
|
-
}], inputId: [{
|
|
820
|
-
type: Input
|
|
821
|
-
}], inputPlaceholder: [{
|
|
822
|
-
type: Input
|
|
823
|
-
}], iconLeft: [{
|
|
824
|
-
type: Input
|
|
825
|
-
}], isDisabled: [{
|
|
1064
|
+
args: [{ selector: 'cui-input-text', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1065
|
+
CUI_TEXT_FILED_CONTROLLER_PROVIDER,
|
|
1066
|
+
INPUT_TEXT_VALUE_ACCESSOR
|
|
1067
|
+
], template: "<cui-svg\n *ngIf=\"iconLeft\"\n [icon]=\"iconLeft\"\n></cui-svg>\n<input\n #input\n [ngModel]=\"value\"\n [attr.id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n type=\"text\"\n [disabled]=\"isDisabled\"\n class=\"c-input\"\n (input)=\"onInput($event)\"\n (focus)=\"onTouched()\"\n>\n<button\n *ngIf=\"isClearButtonShown\"\n class=\"c-button\"\n (click)=\"onClear()\"\n>\n <cui-svg icon=\"cuiIconClear\"></cui-svg>\n</button>\n", styles: [":host{padding-right:13px;padding-left:13px;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;gap:8px;border:1px solid var(--cui-base-200);border-radius:8px;cursor:text;background:var(--cui-base-10);color:var(--cui-base-900);font-family:var(--cui-main-font)}:host:hover{border-color:var(--cui-base-300)}:host:focus-within{box-shadow:0 0 0 2px #e5ecff;border-color:var(--cui-info-600)}:host[data-size=sm]{padding-top:7px;padding-bottom:7px}:host[data-size=md]{padding-top:8px;padding-bottom:8px}:host._disabled{cursor:not-allowed;opacity:.5;background:var(--cui-base-50);border-color:var(--cui-base-200)}:host._with-error{border-color:var(--cui-error-500)}:host._with-error:focus-within{box-shadow:0 0 0 2px #d92d2040}.c-input{padding:0;outline:none;margin:0;border-width:0;appearance:none;caret-color:currentColor;background:none;color:inherit;font:inherit;line-height:inherit;width:100%}.c-input:disabled{cursor:not-allowed}.c-input::placeholder{color:var(--cui-base-400)}.c-button{padding:0;border:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}\n"] }]
|
|
1068
|
+
}], propDecorators: { isDisabled: [{
|
|
826
1069
|
type: HostBinding,
|
|
827
1070
|
args: ['class._disabled']
|
|
828
1071
|
}], input: [{
|
|
829
1072
|
type: ViewChild,
|
|
830
1073
|
args: ['input']
|
|
1074
|
+
}], size: [{
|
|
1075
|
+
type: HostBinding,
|
|
1076
|
+
args: ['attr.data-size']
|
|
1077
|
+
}], isError: [{
|
|
1078
|
+
type: HostBinding,
|
|
1079
|
+
args: ['class._with-error']
|
|
831
1080
|
}], onFocus: [{
|
|
832
1081
|
type: HostListener,
|
|
833
1082
|
args: ['click']
|
|
@@ -838,10 +1087,11 @@ class CuiInputModule {
|
|
|
838
1087
|
CuiInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
839
1088
|
CuiInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiInputModule, declarations: [CuiInputTextComponent], imports: [CommonModule,
|
|
840
1089
|
FormsModule,
|
|
841
|
-
CuiSvgModule], exports: [CuiInputTextComponent
|
|
1090
|
+
CuiSvgModule], exports: [CuiInputTextComponent,
|
|
1091
|
+
CuiTextFieldControllerModule] });
|
|
842
1092
|
CuiInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputModule, imports: [CommonModule,
|
|
843
1093
|
FormsModule,
|
|
844
|
-
CuiSvgModule] });
|
|
1094
|
+
CuiSvgModule, CuiTextFieldControllerModule] });
|
|
845
1095
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputModule, decorators: [{
|
|
846
1096
|
type: NgModule,
|
|
847
1097
|
args: [{
|
|
@@ -851,7 +1101,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
851
1101
|
CuiSvgModule
|
|
852
1102
|
],
|
|
853
1103
|
declarations: [CuiInputTextComponent],
|
|
854
|
-
exports: [
|
|
1104
|
+
exports: [
|
|
1105
|
+
CuiInputTextComponent,
|
|
1106
|
+
CuiTextFieldControllerModule
|
|
1107
|
+
]
|
|
855
1108
|
}]
|
|
856
1109
|
}] });
|
|
857
1110
|
|
|
@@ -885,25 +1138,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
885
1138
|
|
|
886
1139
|
class CuiTextareaComponent {
|
|
887
1140
|
constructor() {
|
|
888
|
-
this.
|
|
1141
|
+
this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
|
|
889
1142
|
this.rows = 4;
|
|
890
1143
|
}
|
|
1144
|
+
get isError() {
|
|
1145
|
+
return this.cuiTextFieldController.isError;
|
|
1146
|
+
}
|
|
891
1147
|
}
|
|
892
1148
|
CuiTextareaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
893
|
-
CuiTextareaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiTextareaComponent, selector: "textarea[cuiTextarea]", inputs: {
|
|
1149
|
+
CuiTextareaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiTextareaComponent, selector: "textarea[cuiTextarea]", inputs: { rows: "rows" }, host: { properties: { "rows": "this.rows", "class._with-error": "this.isError" } }, providers: [CUI_TEXT_FILED_CONTROLLER_PROVIDER], hostDirectives: [{ directive: i1$1.CuiAutoResizingDirective }], ngImport: i0, template: '', isInline: true, styles: [":host{padding:11px 13px 11px 0;outline:none;margin:0;border-width:0;appearance:none;caret-color:currentColor;color:inherit;font:inherit;line-height:inherit;padding:11px 13px;font-weight:400;font-size:14px;line-height:20px;box-sizing:border-box;width:100%;border:1px solid var(--cui-base-200);border-radius:8px;resize:none;background:none;color:var(--cui-base-900);font-family:var(--cui-main-font)}:host:hover{border-color:var(--cui-base-300)}:host:focus-within{box-shadow:0 0 0 2px #e5ecff;border-color:var(--cui-info-600)}:host:disabled{cursor:not-allowed;opacity:.5;background:var(--cui-base-50);border-color:var(--cui-base-200)}:host::placeholder{color:var(--cui-base-400)}:host._with-error{border-color:var(--cui-error-500)}:host._with-error:focus-within{box-shadow:0 0 0 2px #d92d2040}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
894
1150
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextareaComponent, decorators: [{
|
|
895
1151
|
type: Component,
|
|
896
|
-
args: [{ selector: 'textarea[cuiTextarea]', template: '', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [CuiAutoResizingDirective], styles: [":host{padding:11px 13px 11px 0;outline:none;margin:0;border-width:0;appearance:none;caret-color:currentColor;color:inherit;font:inherit;line-height:inherit;padding:11px 13px;font-weight:400;font-size:14px;line-height:20px;box-sizing:border-box;width:100%;border:1px solid var(--cui-base-200);border-radius:8px;resize:none;background:none;color:var(--cui-base-900);font-family:var(--cui-main-font)}:host:hover{border-color:var(--cui-base-300)}:host:focus-within{box-shadow:0 0 0 2px #e5ecff;border-color:var(--cui-info-600)}:host:disabled{cursor:not-allowed;opacity:.5;background:var(--cui-base-50);border-color:var(--cui-base-200)}:host::placeholder{color:var(--cui-base-400)}:host._with-error{border-color:var(--cui-error-500)}:host._with-error:focus-within{box-shadow:0 0 0 2px #d92d2040}\n"] }]
|
|
897
|
-
}], propDecorators: {
|
|
898
|
-
type: Input
|
|
899
|
-
}, {
|
|
900
|
-
type: HostBinding,
|
|
901
|
-
args: ['class._with-error']
|
|
902
|
-
}], rows: [{
|
|
1152
|
+
args: [{ selector: 'textarea[cuiTextarea]', template: '', changeDetection: ChangeDetectionStrategy.OnPush, providers: [CUI_TEXT_FILED_CONTROLLER_PROVIDER], hostDirectives: [CuiAutoResizingDirective], styles: [":host{padding:11px 13px 11px 0;outline:none;margin:0;border-width:0;appearance:none;caret-color:currentColor;color:inherit;font:inherit;line-height:inherit;padding:11px 13px;font-weight:400;font-size:14px;line-height:20px;box-sizing:border-box;width:100%;border:1px solid var(--cui-base-200);border-radius:8px;resize:none;background:none;color:var(--cui-base-900);font-family:var(--cui-main-font)}:host:hover{border-color:var(--cui-base-300)}:host:focus-within{box-shadow:0 0 0 2px #e5ecff;border-color:var(--cui-info-600)}:host:disabled{cursor:not-allowed;opacity:.5;background:var(--cui-base-50);border-color:var(--cui-base-200)}:host::placeholder{color:var(--cui-base-400)}:host._with-error{border-color:var(--cui-error-500)}:host._with-error:focus-within{box-shadow:0 0 0 2px #d92d2040}\n"] }]
|
|
1153
|
+
}], propDecorators: { rows: [{
|
|
903
1154
|
type: Input
|
|
904
1155
|
}, {
|
|
905
1156
|
type: HostBinding,
|
|
906
1157
|
args: ['rows']
|
|
1158
|
+
}], isError: [{
|
|
1159
|
+
type: HostBinding,
|
|
1160
|
+
args: ['class._with-error']
|
|
907
1161
|
}] } });
|
|
908
1162
|
|
|
909
1163
|
class CuiTextareaModule {
|
|
@@ -923,5 +1177,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
923
1177
|
* Generated bundle index. Do not edit.
|
|
924
1178
|
*/
|
|
925
1179
|
|
|
926
|
-
export { CUI_BUTTON_DEFAULT_OPTIONS, CUI_BUTTON_OPTIONS, CuiAccordionComponent, CuiAccordionItemComponent, CuiAccordionModule, CuiButtonComponent, CuiButtonGroupComponent, CuiButtonGroupModule, CuiButtonModule, CuiContextMenuComponent, CuiContextMenuModule, CuiHintComponent, CuiHintModule, CuiIconButtonComponent, CuiIconButtonModule, CuiInputModule, CuiInputNumberComponent, CuiInputNumberModule, CuiInputPasswordComponent, CuiInputPasswordModule, CuiInputTextComponent, CuiLabelComponent, CuiLabelModule, CuiSvgComponent, CuiSvgModule, CuiTextareaComponent, CuiTextareaModule, cuiRemoveSpaces, cuiReplace };
|
|
1180
|
+
export { CUI_BUTTON_DEFAULT_OPTIONS, CUI_BUTTON_OPTIONS, CUI_TEXT_FIELD_CONTROLLER, CUI_TEXT_FIELD_ICON_LEFT, CUI_TEXT_FIELD_ID, CUI_TEXT_FIELD_IS_ERROR, CUI_TEXT_FIELD_PLACEHOLDER, CUI_TEXT_FIELD_SIZE, CUI_TEXT_FILED_CONTROLLER_PROVIDER, CuiAccordionComponent, CuiAccordionItemComponent, CuiAccordionModule, CuiButtonComponent, CuiButtonGroupComponent, CuiButtonGroupModule, CuiButtonModule, CuiContextMenuComponent, CuiContextMenuModule, CuiHintComponent, CuiHintModule, CuiIconButtonComponent, CuiIconButtonModule, CuiInputModule, CuiInputNumberComponent, CuiInputNumberModule, CuiInputPasswordComponent, CuiInputPasswordModule, CuiInputTextComponent, CuiLabelComponent, CuiLabelModule, CuiSvgComponent, CuiSvgModule, CuiTextFieldController, CuiTextFieldControllerModule, CuiTextFieldIconLeftDirective, CuiTextFieldIdDirective, CuiTextFieldIsErrorDirective, CuiTextFieldPlaceholderDirective, CuiTextFieldSizeDirective, CuiTextareaComponent, CuiTextareaModule, cuiRemoveSpaces, cuiReplace };
|
|
927
1181
|
//# sourceMappingURL=cuby-ui-core.mjs.map
|