@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
|
@@ -5,17 +5,22 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
export declare class CuiButtonComponent implements CuiButtonOptions, AfterViewInit {
|
|
6
6
|
private readonly changeDetectorRef;
|
|
7
7
|
private readonly cuiButtonOptions;
|
|
8
|
+
protected readonly COLOR_BASE_500 = "var(--cui-base-500)";
|
|
9
|
+
protected readonly BUTTON_ICONS_COLOR_BASE_500: CuiButtonOptions['appearance'][];
|
|
10
|
+
protected _appearance: "link" | "accent" | "secondary" | "outlined" | "outlined-gray" | "ghost" | "destructive";
|
|
11
|
+
protected iconColor: string;
|
|
8
12
|
protected _size: "xxs" | "xs" | "sm" | "md";
|
|
9
|
-
protected
|
|
13
|
+
protected iconDimensions: {
|
|
10
14
|
width: number;
|
|
11
15
|
height: number;
|
|
12
16
|
};
|
|
13
|
-
appearance: "link" | "accent" | "secondary" | "outlined" | "outlined-gray" | "ghost" | "destructive";
|
|
14
17
|
shape: "rounded" | null;
|
|
15
18
|
disabled: boolean;
|
|
16
19
|
isLoaderShown: boolean;
|
|
17
20
|
icon?: CuiIcon | string;
|
|
18
21
|
iconRight?: CuiIcon | string;
|
|
22
|
+
get appearance(): CuiButtonOptions['appearance'];
|
|
23
|
+
set appearance(appearance: CuiButtonOptions['appearance']);
|
|
19
24
|
get size(): CuiButtonOptions['size'];
|
|
20
25
|
set size(size: CuiButtonOptions['size']);
|
|
21
26
|
protected containsOnlyIcon: boolean;
|
|
@@ -24,5 +29,5 @@ export declare class CuiButtonComponent implements CuiButtonOptions, AfterViewIn
|
|
|
24
29
|
ngAfterViewInit(): void;
|
|
25
30
|
private initContainsOnlyIcon;
|
|
26
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<CuiButtonComponent, never>;
|
|
27
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CuiButtonComponent, "button[cuiButton], a[cuiButton]", never, { "
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CuiButtonComponent, "button[cuiButton], a[cuiButton]", never, { "shape": "shape"; "disabled": "disabled"; "isLoaderShown": "isLoaderShown"; "icon": "icon"; "iconRight": "iconRight"; "appearance": "appearance"; "size": "size"; }, {}, never, ["*"], false, never>;
|
|
28
33
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
3
|
import { CuiNullable, CuiOnChange, CuiOnTouched } from '@cuby-ui/cdk';
|
|
4
|
+
import { CuiIcon } from '@cuby-ui/icons';
|
|
4
5
|
import { CuiInputNumberOptions } from './input-number.options';
|
|
6
|
+
import { CuiSizeMd, CuiSizeSm } from '../../types';
|
|
5
7
|
import * as i0 from "@angular/core";
|
|
6
8
|
export declare class CuiInputNumberComponent implements CuiInputNumberOptions, ControlValueAccessor {
|
|
7
9
|
private readonly changeDetectorRef;
|
|
10
|
+
private readonly cuiTextFieldController;
|
|
8
11
|
private readonly cuiInputNumberOptions;
|
|
9
12
|
protected readonly MIN_JS_NUMBER: number;
|
|
10
13
|
protected readonly MAX_JS_NUMBER: number;
|
|
@@ -18,13 +21,15 @@ export declare class CuiInputNumberComponent implements CuiInputNumberOptions, C
|
|
|
18
21
|
protected onTouched: CuiOnTouched;
|
|
19
22
|
step: number;
|
|
20
23
|
precision: number;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
inputPlaceholder?: string;
|
|
24
|
-
set min(value: number);
|
|
25
|
-
set max(value: number);
|
|
24
|
+
set min(min: number);
|
|
25
|
+
set max(max: number);
|
|
26
26
|
protected isDisabled: boolean;
|
|
27
27
|
protected input: ElementRef<HTMLInputElement>;
|
|
28
|
+
protected get id(): string | undefined;
|
|
29
|
+
protected get placeholder(): string | undefined;
|
|
30
|
+
protected get iconLeft(): CuiIcon | string | undefined;
|
|
31
|
+
protected get size(): CuiSizeSm | CuiSizeMd;
|
|
32
|
+
protected get isError(): boolean;
|
|
28
33
|
writeValue(value: CuiNullable<number>): void;
|
|
29
34
|
registerOnChange(fn: CuiOnChange<number>): void;
|
|
30
35
|
registerOnTouched(fn: CuiOnTouched): void;
|
|
@@ -46,5 +51,5 @@ export declare class CuiInputNumberComponent implements CuiInputNumberOptions, C
|
|
|
46
51
|
private calculateValidMinValue;
|
|
47
52
|
private calculateValidMaxValue;
|
|
48
53
|
static ɵfac: i0.ɵɵFactoryDeclaration<CuiInputNumberComponent, never>;
|
|
49
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CuiInputNumberComponent, "cui-input-number", never, { "step": "step"; "precision": "precision"; "
|
|
54
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CuiInputNumberComponent, "cui-input-number", never, { "step": "step"; "precision": "precision"; "min": "min"; "max": "max"; }, {}, never, never, false, never>;
|
|
50
55
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./input-number.component";
|
|
3
3
|
import * as i2 from "@angular/common";
|
|
4
|
-
import * as i3 from "
|
|
5
|
-
import * as i4 from "
|
|
4
|
+
import * as i3 from "@angular/forms";
|
|
5
|
+
import * as i4 from "../svg/svg.module";
|
|
6
|
+
import * as i5 from "../../directives/text-field-controller/text-field-controller.module";
|
|
6
7
|
export declare class CuiInputNumberModule {
|
|
7
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<CuiInputNumberModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<CuiInputNumberModule, [typeof i1.CuiInputNumberComponent], [typeof i2.CommonModule, typeof i3.
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CuiInputNumberModule, [typeof i1.CuiInputNumberComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.CuiSvgModule], [typeof i1.CuiInputNumberComponent, typeof i5.CuiTextFieldControllerModule]>;
|
|
9
10
|
static ɵinj: i0.ɵɵInjectorDeclaration<CuiInputNumberModule>;
|
|
10
11
|
}
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import { ControlValueAccessor } from '@angular/forms';
|
|
2
2
|
import { CuiInputType, CuiNullable, CuiOnChange, CuiOnTouched } from '@cuby-ui/cdk';
|
|
3
3
|
import { CuiIcon } from '@cuby-ui/icons';
|
|
4
|
+
import { CuiSizeMd, CuiSizeSm } from '../../types';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class CuiInputPasswordComponent implements ControlValueAccessor {
|
|
6
7
|
private readonly changeDetectorRef;
|
|
8
|
+
private readonly cuiTextFieldController;
|
|
7
9
|
protected isPasswordHidden: boolean;
|
|
8
10
|
protected value: CuiNullable<string>;
|
|
9
11
|
protected onChange: CuiOnChange<string>;
|
|
10
12
|
protected onTouched: CuiOnTouched;
|
|
11
|
-
isError: boolean;
|
|
12
|
-
inputId?: string;
|
|
13
|
-
inputPlaceholder?: string;
|
|
14
13
|
protected isDisabled: boolean;
|
|
14
|
+
protected get id(): string | undefined;
|
|
15
|
+
protected get placeholder(): string | undefined;
|
|
16
|
+
protected get iconLeft(): CuiIcon | string | undefined;
|
|
15
17
|
protected get isToggleButtonShown(): boolean;
|
|
16
18
|
protected get icon(): CuiIcon;
|
|
17
19
|
protected get type(): CuiInputType;
|
|
18
20
|
protected get buttonTitle(): string;
|
|
21
|
+
protected get size(): CuiSizeSm | CuiSizeMd;
|
|
22
|
+
protected get isError(): boolean;
|
|
19
23
|
writeValue(value: CuiNullable<string>): void;
|
|
20
24
|
registerOnChange(fn: CuiOnChange<string>): void;
|
|
21
25
|
registerOnTouched(fn: CuiOnTouched): void;
|
|
@@ -23,5 +27,5 @@ export declare class CuiInputPasswordComponent implements ControlValueAccessor {
|
|
|
23
27
|
protected onInput({ target }: Event): void;
|
|
24
28
|
protected onTogglePasswordVisibility(): void;
|
|
25
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<CuiInputPasswordComponent, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CuiInputPasswordComponent, "cui-input-password", never, {
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CuiInputPasswordComponent, "cui-input-password", never, {}, {}, never, never, false, never>;
|
|
27
31
|
}
|
|
@@ -3,8 +3,9 @@ import * as i1 from "./input-password.component";
|
|
|
3
3
|
import * as i2 from "@angular/common";
|
|
4
4
|
import * as i3 from "@angular/forms";
|
|
5
5
|
import * as i4 from "../svg/svg.module";
|
|
6
|
+
import * as i5 from "../../directives/text-field-controller/text-field-controller.module";
|
|
6
7
|
export declare class CuiInputPasswordModule {
|
|
7
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<CuiInputPasswordModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<CuiInputPasswordModule, [typeof i1.CuiInputPasswordComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.CuiSvgModule], [typeof i1.CuiInputPasswordComponent]>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CuiInputPasswordModule, [typeof i1.CuiInputPasswordComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.CuiSvgModule], [typeof i1.CuiInputPasswordComponent, typeof i5.CuiTextFieldControllerModule]>;
|
|
9
10
|
static ɵinj: i0.ɵɵInjectorDeclaration<CuiInputPasswordModule>;
|
|
10
11
|
}
|
|
@@ -2,19 +2,22 @@ import { ElementRef } from '@angular/core';
|
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
3
|
import { CuiOnChange, CuiOnTouched, CuiNullable } from '@cuby-ui/cdk';
|
|
4
4
|
import { CuiIcon } from '@cuby-ui/icons';
|
|
5
|
+
import { CuiSizeMd, CuiSizeSm } from '../../types';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class CuiInputTextComponent implements ControlValueAccessor {
|
|
7
|
-
private changeDetectorRef;
|
|
8
|
+
private readonly changeDetectorRef;
|
|
9
|
+
private readonly cuiTextFieldController;
|
|
8
10
|
protected value: CuiNullable<string>;
|
|
9
11
|
protected onChange: CuiOnChange<string>;
|
|
10
12
|
protected onTouched: CuiOnTouched;
|
|
11
|
-
isError: boolean;
|
|
12
|
-
inputId?: string;
|
|
13
|
-
inputPlaceholder?: string;
|
|
14
|
-
iconLeft?: CuiIcon | string;
|
|
15
13
|
protected isDisabled: boolean;
|
|
16
14
|
protected input: ElementRef<HTMLInputElement>;
|
|
15
|
+
protected get id(): string | undefined;
|
|
16
|
+
protected get placeholder(): string | undefined;
|
|
17
|
+
protected get iconLeft(): CuiIcon | string | undefined;
|
|
17
18
|
protected get isClearButtonShown(): boolean;
|
|
19
|
+
protected get size(): CuiSizeSm | CuiSizeMd;
|
|
20
|
+
protected get isError(): boolean;
|
|
18
21
|
writeValue(value: CuiNullable<string>): void;
|
|
19
22
|
registerOnChange(fn: CuiOnChange<string>): void;
|
|
20
23
|
registerOnTouched(fn: CuiOnTouched): void;
|
|
@@ -24,5 +27,5 @@ export declare class CuiInputTextComponent implements ControlValueAccessor {
|
|
|
24
27
|
protected onFocus(): void;
|
|
25
28
|
private changeModel;
|
|
26
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<CuiInputTextComponent, never>;
|
|
27
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CuiInputTextComponent, "cui-input-text", never, {
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CuiInputTextComponent, "cui-input-text", never, {}, {}, never, never, false, never>;
|
|
28
31
|
}
|
|
@@ -3,8 +3,9 @@ import * as i1 from "./input-text.component";
|
|
|
3
3
|
import * as i2 from "@angular/common";
|
|
4
4
|
import * as i3 from "@angular/forms";
|
|
5
5
|
import * as i4 from "../svg/svg.module";
|
|
6
|
+
import * as i5 from "../../directives/text-field-controller/text-field-controller.module";
|
|
6
7
|
export declare class CuiInputModule {
|
|
7
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<CuiInputModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<CuiInputModule, [typeof i1.CuiInputTextComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.CuiSvgModule], [typeof i1.CuiInputTextComponent]>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CuiInputModule, [typeof i1.CuiInputTextComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.CuiSvgModule], [typeof i1.CuiInputTextComponent, typeof i5.CuiTextFieldControllerModule]>;
|
|
9
10
|
static ɵinj: i0.ɵɵInjectorDeclaration<CuiInputModule>;
|
|
10
11
|
}
|
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
import { AfterViewInit } from '@angular/core';
|
|
2
1
|
import { SafeHtml } from '@angular/platform-browser';
|
|
3
2
|
import { CuiIcon } from '@cuby-ui/icons';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class CuiSvgComponent
|
|
4
|
+
export declare class CuiSvgComponent {
|
|
6
5
|
private readonly domSanitizer;
|
|
7
|
-
private readonly element;
|
|
8
|
-
protected readonly STROKE_WIDTH_ATTRIBUTE = "stroke-width";
|
|
9
6
|
protected safeSvgContent: SafeHtml;
|
|
10
|
-
protected _strokeWidth?: number;
|
|
11
7
|
width?: number;
|
|
12
8
|
height?: number;
|
|
9
|
+
strokeWidth?: number;
|
|
13
10
|
color?: string;
|
|
14
11
|
set icon(icon: CuiIcon | string);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
ngAfterViewInit(): void;
|
|
18
|
-
private updateStrokeWidth;
|
|
12
|
+
get isWithStrokeWidth(): boolean;
|
|
13
|
+
get isWithColor(): boolean;
|
|
19
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<CuiSvgComponent, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CuiSvgComponent, "cui-svg[icon]", never, { "width": "width"; "height": "height"; "
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CuiSvgComponent, "cui-svg[icon]", never, { "width": "width"; "height": "height"; "strokeWidth": "strokeWidth"; "color": "color"; "icon": "icon"; }, {}, never, never, false, never>;
|
|
21
16
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "@cuby-ui/cdk";
|
|
3
3
|
export declare class CuiTextareaComponent {
|
|
4
|
-
|
|
4
|
+
private readonly cuiTextFieldController;
|
|
5
5
|
rows: number;
|
|
6
|
+
protected get isError(): boolean;
|
|
6
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<CuiTextareaComponent, never>;
|
|
7
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CuiTextareaComponent, "textarea[cuiTextarea]", never, { "
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CuiTextareaComponent, "textarea[cuiTextarea]", never, { "rows": "rows"; }, {}, never, never, false, [{ directive: typeof i1.CuiAutoResizingDirective; inputs: {}; outputs: {}; }]>;
|
|
8
9
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './text-field-controller';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './text-field.controller';
|
|
2
|
+
export * from './text-field-controller.module';
|
|
3
|
+
export * from './text-field-controller.provider';
|
|
4
|
+
export * from './text-field-icon-left.directive';
|
|
5
|
+
export * from './text-field-id.directive';
|
|
6
|
+
export * from './text-field-is-error.directive';
|
|
7
|
+
export * from './text-field-placeholder.directive';
|
|
8
|
+
export * from './text-field-size.directive';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./text-field-icon-left.directive";
|
|
3
|
+
import * as i2 from "./text-field-id.directive";
|
|
4
|
+
import * as i3 from "./text-field-placeholder.directive";
|
|
5
|
+
import * as i4 from "./text-field-is-error.directive";
|
|
6
|
+
import * as i5 from "./text-field-size.directive";
|
|
7
|
+
export declare class CuiTextFieldControllerModule {
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuiTextFieldControllerModule, never>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CuiTextFieldControllerModule, [typeof i1.CuiTextFieldIconLeftDirective, typeof i2.CuiTextFieldIdDirective, typeof i3.CuiTextFieldPlaceholderDirective, typeof i4.CuiTextFieldIsErrorDirective, typeof i5.CuiTextFieldSizeDirective], never, [typeof i1.CuiTextFieldIconLeftDirective, typeof i2.CuiTextFieldIdDirective, typeof i3.CuiTextFieldPlaceholderDirective, typeof i4.CuiTextFieldIsErrorDirective, typeof i5.CuiTextFieldSizeDirective]>;
|
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<CuiTextFieldControllerModule>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { InjectionToken, Provider } from '@angular/core';
|
|
2
|
+
import { CuiTextFieldController } from './text-field.controller';
|
|
3
|
+
export declare const CUI_TEXT_FIELD_CONTROLLER: InjectionToken<CuiTextFieldController>;
|
|
4
|
+
export declare const CUI_TEXT_FILED_CONTROLLER_PROVIDER: Provider;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { CuiIcon } from '@cuby-ui/icons';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare const CUI_TEXT_FIELD_ICON_LEFT: InjectionToken<CuiTextFieldIconLeftDirective>;
|
|
5
|
+
export declare class CuiTextFieldIconLeftDirective {
|
|
6
|
+
iconLeft?: CuiIcon | string;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuiTextFieldIconLeftDirective, never>;
|
|
8
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiTextFieldIconLeftDirective, "[cuiTextFieldIconLeft]", never, { "iconLeft": "cuiTextFieldIconLeft"; }, {}, never, never, false, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare const CUI_TEXT_FIELD_ID: InjectionToken<CuiTextFieldIdDirective>;
|
|
4
|
+
export declare class CuiTextFieldIdDirective {
|
|
5
|
+
id?: string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuiTextFieldIdDirective, never>;
|
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiTextFieldIdDirective, "[cuiTextFieldId]", never, { "id": "cuiTextFieldId"; }, {}, never, never, false, never>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare const CUI_TEXT_FIELD_IS_ERROR: InjectionToken<CuiTextFieldIsErrorDirective>;
|
|
4
|
+
export declare class CuiTextFieldIsErrorDirective {
|
|
5
|
+
isError: boolean;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuiTextFieldIsErrorDirective, never>;
|
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiTextFieldIsErrorDirective, "[cuiTextFieldIsError]", never, { "isError": "cuiTextFieldIsError"; }, {}, never, never, false, never>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare const CUI_TEXT_FIELD_PLACEHOLDER: InjectionToken<CuiTextFieldPlaceholderDirective>;
|
|
4
|
+
export declare class CuiTextFieldPlaceholderDirective {
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuiTextFieldPlaceholderDirective, never>;
|
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiTextFieldPlaceholderDirective, "[cuiTextFieldPlaceholder]", never, { "placeholder": "cuiTextFieldPlaceholder"; }, {}, never, never, false, never>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import type { CuiSizeMd, CuiSizeSm } from '../../types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare const CUI_TEXT_FIELD_SIZE: InjectionToken<CuiTextFieldSizeDirective>;
|
|
5
|
+
export declare class CuiTextFieldSizeDirective {
|
|
6
|
+
size: CuiSizeSm | CuiSizeMd;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuiTextFieldSizeDirective, never>;
|
|
8
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiTextFieldSizeDirective, "[cuiTextFieldSize]", never, { "size": "cuiTextFieldSize"; }, {}, never, never, false, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CuiIcon } from '@cuby-ui/icons';
|
|
2
|
+
import type { CuiTextFieldSizeDirective } from './text-field-size.directive';
|
|
3
|
+
import type { CuiTextFieldIdDirective } from './text-field-id.directive';
|
|
4
|
+
import type { CuiTextFieldIconLeftDirective } from './text-field-icon-left.directive';
|
|
5
|
+
import type { CuiTextFieldPlaceholderDirective } from './text-field-placeholder.directive';
|
|
6
|
+
import type { CuiTextFieldIsErrorDirective } from './text-field-is-error.directive';
|
|
7
|
+
import type { CuiSizeMd, CuiSizeSm } from '../../types';
|
|
8
|
+
export declare class CuiTextFieldController {
|
|
9
|
+
private readonly iconLeftDirective;
|
|
10
|
+
private readonly idDirective;
|
|
11
|
+
private readonly isErrorDirective;
|
|
12
|
+
private readonly placeholderDirective;
|
|
13
|
+
private readonly sizeDirective;
|
|
14
|
+
constructor(iconLeftDirective: CuiTextFieldIconLeftDirective, idDirective: CuiTextFieldIdDirective, isErrorDirective: CuiTextFieldIsErrorDirective, placeholderDirective: CuiTextFieldPlaceholderDirective, sizeDirective: CuiTextFieldSizeDirective);
|
|
15
|
+
get iconLeft(): CuiIcon | string | undefined;
|
|
16
|
+
get id(): string | undefined;
|
|
17
|
+
get isError(): boolean;
|
|
18
|
+
get placeholder(): string | undefined;
|
|
19
|
+
get size(): CuiSizeSm | CuiSizeMd;
|
|
20
|
+
}
|
|
@@ -11,7 +11,7 @@ export class CuiAccordionItemComponent {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
CuiAccordionItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14
|
-
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: i2.CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["
|
|
14
|
+
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: i2.CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15
15
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAccordionItemComponent, decorators: [{
|
|
16
16
|
type: Component,
|
|
17
17
|
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"] }]
|
|
@@ -7,30 +7,49 @@ export class CuiButtonComponent {
|
|
|
7
7
|
constructor() {
|
|
8
8
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
9
9
|
this.cuiButtonOptions = inject(CUI_BUTTON_OPTIONS);
|
|
10
|
+
this.COLOR_BASE_500 = 'var(--cui-base-500)';
|
|
11
|
+
this.BUTTON_ICONS_COLOR_BASE_500 = [
|
|
12
|
+
'secondary',
|
|
13
|
+
'outlined',
|
|
14
|
+
'outlined-gray',
|
|
15
|
+
'ghost'
|
|
16
|
+
];
|
|
17
|
+
this._appearance = this.cuiButtonOptions.appearance;
|
|
18
|
+
this.iconColor = 'currentColor';
|
|
10
19
|
this._size = this.cuiButtonOptions.size;
|
|
11
|
-
this.
|
|
20
|
+
this.iconDimensions = {
|
|
12
21
|
width: 20,
|
|
13
22
|
height: 20
|
|
14
23
|
};
|
|
15
|
-
this.appearance = this.cuiButtonOptions.appearance;
|
|
16
24
|
this.shape = this.cuiButtonOptions.shape;
|
|
17
25
|
this.disabled = false;
|
|
18
26
|
this.isLoaderShown = false;
|
|
19
27
|
this.containsOnlyIcon = false;
|
|
20
28
|
}
|
|
29
|
+
get appearance() {
|
|
30
|
+
return this._appearance;
|
|
31
|
+
}
|
|
32
|
+
set appearance(appearance) {
|
|
33
|
+
this._appearance = appearance;
|
|
34
|
+
if (this.BUTTON_ICONS_COLOR_BASE_500.includes(appearance)) {
|
|
35
|
+
this.iconColor = this.COLOR_BASE_500;
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
this.iconColor = 'currentColor';
|
|
39
|
+
}
|
|
21
40
|
get size() {
|
|
22
41
|
return this._size;
|
|
23
42
|
}
|
|
24
43
|
set size(size) {
|
|
25
44
|
this._size = size;
|
|
26
45
|
if (size === 'xxs') {
|
|
27
|
-
this.
|
|
46
|
+
this.iconDimensions = {
|
|
28
47
|
width: 16,
|
|
29
48
|
height: 16
|
|
30
49
|
};
|
|
31
50
|
return;
|
|
32
51
|
}
|
|
33
|
-
this.
|
|
52
|
+
this.iconDimensions = {
|
|
34
53
|
width: 20,
|
|
35
54
|
height: 20
|
|
36
55
|
};
|
|
@@ -49,16 +68,11 @@ export class CuiButtonComponent {
|
|
|
49
68
|
}
|
|
50
69
|
}
|
|
51
70
|
CuiButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
52
|
-
CuiButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: {
|
|
71
|
+
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: i2.CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
53
72
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonComponent, decorators: [{
|
|
54
73
|
type: Component,
|
|
55
|
-
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]=\"
|
|
56
|
-
}], propDecorators: {
|
|
57
|
-
type: Input
|
|
58
|
-
}, {
|
|
59
|
-
type: HostBinding,
|
|
60
|
-
args: ['attr.data-appearance']
|
|
61
|
-
}], shape: [{
|
|
74
|
+
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"] }]
|
|
75
|
+
}], propDecorators: { shape: [{
|
|
62
76
|
type: Input
|
|
63
77
|
}, {
|
|
64
78
|
type: HostBinding,
|
|
@@ -77,6 +91,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
77
91
|
type: Input
|
|
78
92
|
}], iconRight: [{
|
|
79
93
|
type: Input
|
|
94
|
+
}], appearance: [{
|
|
95
|
+
type: Input
|
|
96
|
+
}, {
|
|
97
|
+
type: HostBinding,
|
|
98
|
+
args: ['attr.data-appearance']
|
|
80
99
|
}], size: [{
|
|
81
100
|
type: Input
|
|
82
101
|
}, {
|
|
@@ -92,4 +111,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
92
111
|
type: ViewChild,
|
|
93
112
|
args: ['content']
|
|
94
113
|
}] } });
|
|
95
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
114
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvcmUvY29tcG9uZW50cy9idXR0b24vYnV0dG9uLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvcmUvY29tcG9uZW50cy9idXR0b24vYnV0dG9uLnRlbXBsYXRlLmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUVMLHVCQUF1QixFQUN2QixpQkFBaUIsRUFDakIsU0FBUyxFQUVULFdBQVcsRUFDWCxNQUFNLEVBQ04sS0FBSyxFQUNMLFNBQVMsRUFDVixNQUFNLGVBQWUsQ0FBQztBQUd2QixPQUFPLEVBQUUsa0JBQWtCLEVBQW9CLE1BQU0sa0JBQWtCLENBQUM7Ozs7QUFReEUsTUFBTSxPQUFPLGtCQUFrQjtJQU4vQjtRQU9tQixzQkFBaUIsR0FBRyxNQUFNLENBQUMsaUJBQWlCLENBQUMsQ0FBQztRQUM5QyxxQkFBZ0IsR0FBRyxNQUFNLENBQUMsa0JBQWtCLENBQUMsQ0FBQztRQUU1QyxtQkFBYyxHQUFHLHFCQUFxQixDQUFDO1FBQ3ZDLGdDQUEyQixHQUFxQztZQUNqRixXQUFXO1lBQ1gsVUFBVT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XG4gIGNsYXNzPVwiYy13cmFwcGVyXCJcbiAgW2NsYXNzLmMtd3JhcHBlcl9pbnZpc2libGVdPVwiaXNMb2FkZXJTaG93blwiXG4+XG4gIDxjdWktc3ZnXG4gICAgKm5nSWY9XCJpY29uXCJcbiAgICBbaWNvbl09XCJpY29uXCJcbiAgICBbd2lkdGhdPVwiaWNvbkRpbWVuc2lvbnMud2lkdGhcIlxuICAgIFtoZWlnaHRdPVwiaWNvbkRpbWVuc2lvbnMuaGVpZ2h0XCJcbiAgICBbY29sb3JdPVwiaWNvbkNvbG9yXCJcbiAgPjwvY3VpLXN2Zz5cbiAgPHNwYW5cbiAgICAjY29udGVudFxuICAgICpuZ0lmPVwiIWNvbnRhaW5zT25seUljb25cIlxuICA+XG4gICAgPG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50PlxuICA8L3NwYW4+XG4gIDxjdWktc3ZnXG4gICAgKm5nSWY9XCJpY29uUmlnaHRcIlxuICAgIFtpY29uXT1cImljb25SaWdodFwiXG4gICAgW3dpZHRoXT1cImljb25EaW1lbnNpb25zLndpZHRoXCJcbiAgICBbaGVpZ2h0XT1cImljb25EaW1lbnNpb25zLmhlaWdodFwiXG4gICAgW2NvbG9yXT1cImljb25Db2xvclwiXG4gID48L2N1aS1zdmc+XG48L3NwYW4+XG48Y3VpLXN2Z1xuICAqbmdJZj1cImlzTG9hZGVyU2hvd25cIlxuICBpY29uPVwiY3VpSWNvbkxvYWRpbmdcIlxuICBjbGFzcz1cImMtbG9hZGVyXCJcbj48L2N1aS1zdmc+XG4iXX0=
|
|
@@ -70,10 +70,10 @@ export class CuiContextMenuComponent {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
CuiContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiContextMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
73
|
-
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
|
|
73
|
+
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: i2.CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
74
74
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiContextMenuComponent, decorators: [{
|
|
75
75
|
type: Component,
|
|
76
|
-
args: [{ selector: 'cui-context-menu[items][target]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ul\n *ngIf=\"isVisible\"\n class=\"c-ul\"\n>\n <li
|
|
76
|
+
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"] }]
|
|
77
77
|
}], propDecorators: { items: [{
|
|
78
78
|
type: Input
|
|
79
79
|
}], target: [{
|
|
@@ -91,4 +91,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
91
91
|
type: HostListener,
|
|
92
92
|
args: ['document:click', ['$event.target']]
|
|
93
93
|
}] } });
|
|
94
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
94
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dC1tZW51LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvcmUvY29tcG9uZW50cy9jb250ZXh0LW1lbnUvY29udGV4dC1tZW51LmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvcmUvY29tcG9uZW50cy9jb250ZXh0LW1lbnUvY29udGV4dC1tZW51LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFFTCx1QkFBdUIsRUFDdkIsaUJBQWlCLEVBQ2pCLFNBQVMsRUFDVCxVQUFVLEVBQ1YsV0FBVyxFQUNYLFlBQVksRUFDWixNQUFNLEVBQ04sS0FBSyxFQUVOLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQzs7OztBQVUzQyxNQUFNLE9BQU8sdUJBQXVCO0lBTnBDO1FBT21CLHNCQUFpQixHQUFHLE1BQU0sQ0FBQyxpQkFBaUIsQ0FBQyxDQUFDO1FBQzlDLFlBQU8sR0FBRyxNQUFNLENBQUMsVUFBVSxDQUFDLENBQUMsYUFBYSxDQUFDO1FBQzNDLGFBQVEsR0FBRyxNQUFNLENBQUMsUUFBUSxDQUFDLENBQUM7UUFDNUIsb0JBQWUsR0FBRyxJQUFJLENB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