@cuby-ui/core 0.0.149 → 0.0.151
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/index.d.ts +1 -0
- package/components/input-time/index.d.ts +3 -0
- package/components/input-time/input-time.component.d.ts +33 -0
- package/components/input-time/input-time.module.d.ts +11 -0
- package/components/input-time/input-time.options.d.ts +7 -0
- package/esm2020/components/banner/banner.component.mjs +2 -2
- package/esm2020/components/index.mjs +2 -1
- package/esm2020/components/input-time/index.mjs +4 -0
- package/esm2020/components/input-time/input-time.component.mjs +89 -0
- package/esm2020/components/input-time/input-time.module.mjs +35 -0
- package/esm2020/components/input-time/input-time.options.mjs +8 -0
- package/fesm2015/cuby-ui-core.mjs +121 -3
- package/fesm2015/cuby-ui-core.mjs.map +1 -1
- package/fesm2020/cuby-ui-core.mjs +120 -3
- package/fesm2020/cuby-ui-core.mjs.map +1 -1
- package/package.json +6 -3
package/components/index.d.ts
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ElementRef } from '@angular/core';
|
|
2
|
+
import type { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import type { MaskitoOptions } from '@maskito/core';
|
|
4
|
+
import { CuiNullable, CuiOnChange, CuiOnTouched } from '@cuby-ui/cdk';
|
|
5
|
+
import { CuiInputTimeOptions } from './input-time.options';
|
|
6
|
+
import type { CuiSizeMd, CuiSizeSm } from '../../types';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class CuiInputTimeComponent implements CuiInputTimeOptions, ControlValueAccessor {
|
|
9
|
+
private readonly changeDetectorRef;
|
|
10
|
+
private readonly cuiTextFieldController;
|
|
11
|
+
private readonly options;
|
|
12
|
+
protected maskOptions: MaskitoOptions;
|
|
13
|
+
protected defaultPlaceholder: string;
|
|
14
|
+
protected value: CuiNullable<string>;
|
|
15
|
+
protected onChange: CuiOnChange<string>;
|
|
16
|
+
protected onTouched: CuiOnTouched;
|
|
17
|
+
set mode(value: CuiInputTimeOptions['mode']);
|
|
18
|
+
protected isDisabled: boolean;
|
|
19
|
+
protected input: ElementRef<HTMLInputElement>;
|
|
20
|
+
protected get id(): string | undefined;
|
|
21
|
+
protected get placeholder(): string | undefined;
|
|
22
|
+
protected get size(): CuiSizeSm | CuiSizeMd;
|
|
23
|
+
protected get isError(): boolean;
|
|
24
|
+
writeValue(value: CuiNullable<string>): void;
|
|
25
|
+
registerOnChange(fn: CuiOnChange<string>): void;
|
|
26
|
+
registerOnTouched(fn: CuiOnTouched): void;
|
|
27
|
+
setDisabledState(isDisabled: boolean): void;
|
|
28
|
+
protected onInput(event: Event): void;
|
|
29
|
+
protected onFocus(): void;
|
|
30
|
+
private generateMask;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuiInputTimeComponent, never>;
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CuiInputTimeComponent, "cui-input-time", never, { "mode": "mode"; }, {}, never, never, false, never>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./input-time.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@angular/forms";
|
|
5
|
+
import * as i4 from "../svg/svg.module";
|
|
6
|
+
import * as i5 from "@maskito/angular";
|
|
7
|
+
export declare class InputTimeModule {
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputTimeModule, never>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<InputTimeModule, [typeof i1.CuiInputTimeComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.CuiSvgModule, typeof i5.MaskitoDirective], [typeof i1.CuiInputTimeComponent]>;
|
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<InputTimeModule>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import type { CuiTimeMode } from '@cuby-ui/cdk';
|
|
3
|
+
export interface CuiInputTimeOptions {
|
|
4
|
+
readonly mode: CuiTimeMode;
|
|
5
|
+
}
|
|
6
|
+
export declare const CUI_INPUT_TIME_DEFAULT_OPTIONS: CuiInputTimeOptions;
|
|
7
|
+
export declare const CUI_INPUT_TIME_OPTIONS: InjectionToken<CuiInputTimeOptions>;
|
|
@@ -45,10 +45,10 @@ export class CuiBannerComponent {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
CuiBannerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
48
|
-
CuiBannerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiBannerComponent, selector: "cui-banner", inputs: { status: "status", isCloseable: "isCloseable", label: "label", actionButtonText: "actionButtonText" }, outputs: { actionButtonClicked: "actionButtonClicked", closed: "closed" }, host: { properties: { "attr.data-status": "this.status" } }, ngImport: i0, template: "<cui-svg\n *cuiLet=\"ICON_OPTIONS[status] as iconOption\"\n [icon]=\"iconOption.icon\"\n [color]=\"iconOption.color\"\n class=\"c-icon\"\n></cui-svg>\n<div class=\"c-wrapper\">\n <h2\n *ngIf=\"label\"\n class=\"c-heading\"\n >\n {{ label }}\n </h2>\n <ng-content></ng-content>\n <button\n cuiButton\n *ngIf=\"actionButtonText\"\n appearance=\"link\"\n class=\"c-action\"\n (click)=\"onAction()\"\n >\n {{ actionButtonText }}\n </button>\n</div>\n<button\n *ngIf=\"isCloseable\"\n class=\"c-button\"\n (click)=\"onClose()\"\n>\n <cui-svg\n *cuiLet=\"theme$ | async as theme\"\n icon=\"cuiIconX\"\n [color]=\"THEME_CLOSE_BUTTON_ICON_COLORS[theme!]\"\n />\n</button>\n", styles: [":host{--c-info-icon-color: var(--cui-light-blue-800);--c-alert-icon-color: var(--cui-orange-800);padding:
|
|
48
|
+
CuiBannerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiBannerComponent, selector: "cui-banner", inputs: { status: "status", isCloseable: "isCloseable", label: "label", actionButtonText: "actionButtonText" }, outputs: { actionButtonClicked: "actionButtonClicked", closed: "closed" }, host: { properties: { "attr.data-status": "this.status" } }, ngImport: i0, template: "<cui-svg\n *cuiLet=\"ICON_OPTIONS[status] as iconOption\"\n [icon]=\"iconOption.icon\"\n [color]=\"iconOption.color\"\n class=\"c-icon\"\n></cui-svg>\n<div class=\"c-wrapper\">\n <h2\n *ngIf=\"label\"\n class=\"c-heading\"\n >\n {{ label }}\n </h2>\n <ng-content></ng-content>\n <button\n cuiButton\n *ngIf=\"actionButtonText\"\n appearance=\"link\"\n class=\"c-action\"\n (click)=\"onAction()\"\n >\n {{ actionButtonText }}\n </button>\n</div>\n<button\n *ngIf=\"isCloseable\"\n class=\"c-button\"\n (click)=\"onClose()\"\n>\n <cui-svg\n *cuiLet=\"theme$ | async as theme\"\n icon=\"cuiIconX\"\n [color]=\"THEME_CLOSE_BUTTON_ICON_COLORS[theme!]\"\n />\n</button>\n", styles: [":host{--c-info-icon-color: var(--cui-light-blue-800);--c-alert-icon-color: var(--cui-orange-800);padding:8px 16px;font-weight:400;font-size:14px;line-height:20px;display:flex;gap:16px;align-items:center;color:var(--cui-base-900);font-family:var(--cui-main-font)}:host[data-status=info]{color:var(--cui-light-blue-800);background:var(--cui-blue-50)}:host[data-status=success]{background:var(--cui-green-50)}:host[data-status=alert]{color:var(--cui-orange-800);background:var(--cui-yellow-100)}:host[data-status=error]{background:var(--cui-red-50)}:host-context([cuiTheme=dark]){--c-info-icon-color: var(--cui-light-blue-400);--c-alert-icon-color: var(--cui-yellow-300);color:var(--cui-gray-0)}:host-context([cuiTheme=dark])[data-status=info]{color:var(--cui-light-blue-400);background:var(--cui-blue-900)}:host-context([cuiTheme=dark])[data-status=info] .c-action:hover{color:var(--cui-blue-500)}:host-context([cuiTheme=dark])[data-status=success]{background:var(--cui-green-900)}:host-context([cuiTheme=dark])[data-status=success] .c-action{color:var(--cui-green-500)}:host-context([cuiTheme=dark])[data-status=alert]{background:var(--cui-yellow-900)}:host-context([cuiTheme=dark])[data-status=alert] .c-action{color:var(--cui-yellow-300)}:host-context([cuiTheme=dark])[data-status=error]{background:var(--cui-red-900)}:host-context([cuiTheme=dark])[data-status=error] .c-action{color:var(--cui-red-400)}.c-icon{height:28px}.c-wrapper{flex:1;display:flex;align-items:center;gap:16px;overflow-wrap:anywhere}.c-heading{font-weight:500;font-size:14px;line-height:20px;margin:0}.c-button{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}.c-button:hover{background:rgba(255,255,255,.2)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "component", type: i3.CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "component", type: i4.CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "size"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
49
49
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBannerComponent, decorators: [{
|
|
50
50
|
type: Component,
|
|
51
|
-
args: [{ selector: 'cui-banner', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-svg\n *cuiLet=\"ICON_OPTIONS[status] as iconOption\"\n [icon]=\"iconOption.icon\"\n [color]=\"iconOption.color\"\n class=\"c-icon\"\n></cui-svg>\n<div class=\"c-wrapper\">\n <h2\n *ngIf=\"label\"\n class=\"c-heading\"\n >\n {{ label }}\n </h2>\n <ng-content></ng-content>\n <button\n cuiButton\n *ngIf=\"actionButtonText\"\n appearance=\"link\"\n class=\"c-action\"\n (click)=\"onAction()\"\n >\n {{ actionButtonText }}\n </button>\n</div>\n<button\n *ngIf=\"isCloseable\"\n class=\"c-button\"\n (click)=\"onClose()\"\n>\n <cui-svg\n *cuiLet=\"theme$ | async as theme\"\n icon=\"cuiIconX\"\n [color]=\"THEME_CLOSE_BUTTON_ICON_COLORS[theme!]\"\n />\n</button>\n", styles: [":host{--c-info-icon-color: var(--cui-light-blue-800);--c-alert-icon-color: var(--cui-orange-800);padding:
|
|
51
|
+
args: [{ selector: 'cui-banner', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-svg\n *cuiLet=\"ICON_OPTIONS[status] as iconOption\"\n [icon]=\"iconOption.icon\"\n [color]=\"iconOption.color\"\n class=\"c-icon\"\n></cui-svg>\n<div class=\"c-wrapper\">\n <h2\n *ngIf=\"label\"\n class=\"c-heading\"\n >\n {{ label }}\n </h2>\n <ng-content></ng-content>\n <button\n cuiButton\n *ngIf=\"actionButtonText\"\n appearance=\"link\"\n class=\"c-action\"\n (click)=\"onAction()\"\n >\n {{ actionButtonText }}\n </button>\n</div>\n<button\n *ngIf=\"isCloseable\"\n class=\"c-button\"\n (click)=\"onClose()\"\n>\n <cui-svg\n *cuiLet=\"theme$ | async as theme\"\n icon=\"cuiIconX\"\n [color]=\"THEME_CLOSE_BUTTON_ICON_COLORS[theme!]\"\n />\n</button>\n", styles: [":host{--c-info-icon-color: var(--cui-light-blue-800);--c-alert-icon-color: var(--cui-orange-800);padding:8px 16px;font-weight:400;font-size:14px;line-height:20px;display:flex;gap:16px;align-items:center;color:var(--cui-base-900);font-family:var(--cui-main-font)}:host[data-status=info]{color:var(--cui-light-blue-800);background:var(--cui-blue-50)}:host[data-status=success]{background:var(--cui-green-50)}:host[data-status=alert]{color:var(--cui-orange-800);background:var(--cui-yellow-100)}:host[data-status=error]{background:var(--cui-red-50)}:host-context([cuiTheme=dark]){--c-info-icon-color: var(--cui-light-blue-400);--c-alert-icon-color: var(--cui-yellow-300);color:var(--cui-gray-0)}:host-context([cuiTheme=dark])[data-status=info]{color:var(--cui-light-blue-400);background:var(--cui-blue-900)}:host-context([cuiTheme=dark])[data-status=info] .c-action:hover{color:var(--cui-blue-500)}:host-context([cuiTheme=dark])[data-status=success]{background:var(--cui-green-900)}:host-context([cuiTheme=dark])[data-status=success] .c-action{color:var(--cui-green-500)}:host-context([cuiTheme=dark])[data-status=alert]{background:var(--cui-yellow-900)}:host-context([cuiTheme=dark])[data-status=alert] .c-action{color:var(--cui-yellow-300)}:host-context([cuiTheme=dark])[data-status=error]{background:var(--cui-red-900)}:host-context([cuiTheme=dark])[data-status=error] .c-action{color:var(--cui-red-400)}.c-icon{height:28px}.c-wrapper{flex:1;display:flex;align-items:center;gap:16px;overflow-wrap:anywhere}.c-heading{font-weight:500;font-size:14px;line-height:20px;margin:0}.c-button{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}.c-button:hover{background:rgba(255,255,255,.2)}\n"] }]
|
|
52
52
|
}], propDecorators: { status: [{
|
|
53
53
|
type: Input
|
|
54
54
|
}, {
|
|
@@ -14,6 +14,7 @@ export * from './icon-button';
|
|
|
14
14
|
export * from './input-number';
|
|
15
15
|
export * from './input-password';
|
|
16
16
|
export * from './input-text';
|
|
17
|
+
export * from './input-time';
|
|
17
18
|
export * from './label';
|
|
18
19
|
export * from './notification';
|
|
19
20
|
export * from './radio';
|
|
@@ -23,4 +24,4 @@ export * from './svg';
|
|
|
23
24
|
export * from './tabs';
|
|
24
25
|
export * from './textarea';
|
|
25
26
|
export * from './toggle';
|
|
26
|
-
//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vbSAnLi9hbGVydCc7XG5leHBvcnQgKiBmcm9tICcuL2JhZGdlJztcbmV4cG9ydCAqIGZyb20gJy4vYmFubmVyJztcbmV4cG9ydCAqIGZyb20gJy4vYnJlYWRjcnVtYnMnO1xuZXhwb3J0ICogZnJvbSAnLi9idXR0b24nO1xuZXhwb3J0ICogZnJvbSAnLi9idXR0b24tZ3JvdXAnO1xuZXhwb3J0ICogZnJvbSAnLi9jaGVja2JveCc7XG5leHBvcnQgKiBmcm9tICcuL2NvbnRleHQtbWVudSc7XG5leHBvcnQgKiBmcm9tICcuL2RpYWxvZyc7XG5leHBvcnQgKiBmcm9tICcuL2Zvcm0tZmllbGQnO1xuZXhwb3J0ICogZnJvbSAnLi9oaW50JztcbmV4cG9ydCAqIGZyb20gJy4vaWNvbi1idXR0b24nO1xuZXhwb3J0ICogZnJvbSAnLi9pbnB1dC1udW1iZXInO1xuZXhwb3J0ICogZnJvbSAnLi9pbnB1dC1wYXNzd29yZCc7XG5leHBvcnQgKiBmcm9tICcuL2lucHV0LXRleHQnO1xuZXhwb3J0ICogZnJvbSAnLi9pbnB1dC10aW1lJztcbmV4cG9ydCAqIGZyb20gJy4vbGFiZWwnO1xuZXhwb3J0ICogZnJvbSAnLi9ub3RpZmljYXRpb24nO1xuZXhwb3J0ICogZnJvbSAnLi9yYWRpbyc7XG5leHBvcnQgKiBmcm9tICcuL3Jvb3QnO1xuZXhwb3J0ICogZnJvbSAnLi9zZWxlY3QnO1xuZXhwb3J0ICogZnJvbSAnLi9zdmcnO1xuZXhwb3J0ICogZnJvbSAnLi90YWJzJztcbmV4cG9ydCAqIGZyb20gJy4vdGV4dGFyZWEnO1xuZXhwb3J0ICogZnJvbSAnLi90b2dnbGUnO1xuIl19
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export * from './input-time.component';
|
|
2
|
+
export * from './input-time.module';
|
|
3
|
+
export * from './input-time.options';
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL2NvbXBvbmVudHMvaW5wdXQtdGltZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHdCQUF3QixDQUFDO0FBQ3ZDLGNBQWMscUJBQXFCLENBQUM7QUFDcEMsY0FBYyxzQkFBc0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vaW5wdXQtdGltZS5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9pbnB1dC10aW1lLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2lucHV0LXRpbWUub3B0aW9ucyc7Il19
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, HostBinding, HostListener, inject, Input, ViewChild } from '@angular/core';
|
|
2
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
|
+
import { maskitoTimeOptionsGenerator } from '@maskito/kit';
|
|
4
|
+
import { cuiProvide } from '@cuby-ui/cdk';
|
|
5
|
+
import { CUI_INPUT_TIME_OPTIONS } from './input-time.options';
|
|
6
|
+
import { CUI_TEXT_FIELD_CONTROLLER, CUI_TEXT_FILED_CONTROLLER_PROVIDER } from '../../directives';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import * as i1 from "@angular/forms";
|
|
9
|
+
import * as i2 from "../svg/svg.component";
|
|
10
|
+
import * as i3 from "@maskito/angular";
|
|
11
|
+
export class CuiInputTimeComponent {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
14
|
+
this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
|
|
15
|
+
this.options = inject(CUI_INPUT_TIME_OPTIONS);
|
|
16
|
+
this.maskOptions = this.generateMask(this.options.mode);
|
|
17
|
+
this.defaultPlaceholder = this.options.mode.toLowerCase();
|
|
18
|
+
}
|
|
19
|
+
set mode(value) {
|
|
20
|
+
this.maskOptions = this.generateMask(this.options.mode);
|
|
21
|
+
this.defaultPlaceholder = value.toLowerCase();
|
|
22
|
+
}
|
|
23
|
+
get id() {
|
|
24
|
+
return this.cuiTextFieldController.id;
|
|
25
|
+
}
|
|
26
|
+
get placeholder() {
|
|
27
|
+
return this.cuiTextFieldController.placeholder ?? this.defaultPlaceholder;
|
|
28
|
+
}
|
|
29
|
+
get size() {
|
|
30
|
+
return this.cuiTextFieldController.size;
|
|
31
|
+
}
|
|
32
|
+
get isError() {
|
|
33
|
+
return this.cuiTextFieldController.isError;
|
|
34
|
+
}
|
|
35
|
+
writeValue(value) {
|
|
36
|
+
this.value = value;
|
|
37
|
+
this.changeDetectorRef.markForCheck();
|
|
38
|
+
}
|
|
39
|
+
registerOnChange(fn) {
|
|
40
|
+
this.onChange = fn;
|
|
41
|
+
}
|
|
42
|
+
registerOnTouched(fn) {
|
|
43
|
+
this.onTouched = fn;
|
|
44
|
+
}
|
|
45
|
+
setDisabledState(isDisabled) {
|
|
46
|
+
this.isDisabled = isDisabled;
|
|
47
|
+
this.changeDetectorRef.markForCheck();
|
|
48
|
+
}
|
|
49
|
+
onInput(event) {
|
|
50
|
+
this.value = event.target.value;
|
|
51
|
+
this.onChange(this.value);
|
|
52
|
+
}
|
|
53
|
+
onFocus() {
|
|
54
|
+
this.input.nativeElement.focus();
|
|
55
|
+
}
|
|
56
|
+
generateMask(mode) {
|
|
57
|
+
return maskitoTimeOptionsGenerator({ mode });
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
CuiInputTimeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputTimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
61
|
+
CuiInputTimeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiInputTimeComponent, selector: "cui-input-time", inputs: { mode: "mode" }, host: { listeners: { "click": "onFocus()" }, properties: { "class._disabled": "this.isDisabled", "attr.data-size": "this.size", "class._with-error": "this.isError" } }, providers: [
|
|
62
|
+
CUI_TEXT_FILED_CONTROLLER_PROVIDER,
|
|
63
|
+
cuiProvide(NG_VALUE_ACCESSOR, CuiInputTimeComponent, true)
|
|
64
|
+
], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<cui-svg\n icon=\"cuiIconClock\"\n color=\"var(--cui-base-500)\"\n></cui-svg>\n<input\n #input\n [ngModel]=\"value\"\n [attr.id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n type=\"text\"\n [maskito]=\"maskOptions\"\n [disabled]=\"isDisabled\"\n class=\"c-input\"\n (input)=\"onInput($event)\"\n (focus)=\"onTouched()\"\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-input);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 var(--cui-focus);border-color:var(--cui-info)}: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-danger)}: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;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;display:flex}\n"], dependencies: [{ kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "directive", type: i3.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputTimeComponent, decorators: [{
|
|
66
|
+
type: Component,
|
|
67
|
+
args: [{ selector: 'cui-input-time', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
68
|
+
CUI_TEXT_FILED_CONTROLLER_PROVIDER,
|
|
69
|
+
cuiProvide(NG_VALUE_ACCESSOR, CuiInputTimeComponent, true)
|
|
70
|
+
], template: "<cui-svg\n icon=\"cuiIconClock\"\n color=\"var(--cui-base-500)\"\n></cui-svg>\n<input\n #input\n [ngModel]=\"value\"\n [attr.id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n type=\"text\"\n [maskito]=\"maskOptions\"\n [disabled]=\"isDisabled\"\n class=\"c-input\"\n (input)=\"onInput($event)\"\n (focus)=\"onTouched()\"\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-input);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 var(--cui-focus);border-color:var(--cui-info)}: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-danger)}: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;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;display:flex}\n"] }]
|
|
71
|
+
}], propDecorators: { mode: [{
|
|
72
|
+
type: Input
|
|
73
|
+
}], isDisabled: [{
|
|
74
|
+
type: HostBinding,
|
|
75
|
+
args: ['class._disabled']
|
|
76
|
+
}], input: [{
|
|
77
|
+
type: ViewChild,
|
|
78
|
+
args: ['input']
|
|
79
|
+
}], size: [{
|
|
80
|
+
type: HostBinding,
|
|
81
|
+
args: ['attr.data-size']
|
|
82
|
+
}], isError: [{
|
|
83
|
+
type: HostBinding,
|
|
84
|
+
args: ['class._with-error']
|
|
85
|
+
}], onFocus: [{
|
|
86
|
+
type: HostListener,
|
|
87
|
+
args: ['click']
|
|
88
|
+
}] } });
|
|
89
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQtdGltZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL2NvbXBvbmVudHMvaW5wdXQtdGltZS9pbnB1dC10aW1lLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3Byb2plY3Rz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VsZW1lbnQuZm9jdXMoKTtcbiAgfVxuXG4gIHByaXZhdGUgZ2VuZXJhdGVNYXNrKG1vZGU6IE1hc2tpdG9UaW1lTW9kZSk6IE1hc2tpdG9PcHRpb25zIHtcbiAgICByZXR1cm4gbWFza2l0b1RpbWVPcHRpb25zR2VuZXJhdG9yKHsgbW9kZSB9KTtcbiAgfVxufVxuIiwiPGN1aS1zdmdcbiAgaWNvbj1cImN1aUljb25DbG9ja1wiXG4gIGNvbG9yPVwidmFyKC0tY3VpLWJhc2UtNTAwKVwiXG4+PC9jdWktc3ZnPlxuPGlucHV0XG4gICNpbnB1dFxuICBbbmdNb2RlbF09XCJ2YWx1ZVwiXG4gIFthdHRyLmlkXT1cImlkXCJcbiAgW2F0dHIucGxhY2Vob2xkZXJdPVwicGxhY2Vob2xkZXJcIlxuICB0eXBlPVwidGV4dFwiXG4gIFttYXNraXRvXT1cIm1hc2tPcHRpb25zXCJcbiAgW2Rpc2FibGVkXT1cImlzRGlzYWJsZWRcIlxuICBjbGFzcz1cImMtaW5wdXRcIlxuICAoaW5wdXQpPVwib25JbnB1dCgkZXZlbnQpXCJcbiAgKGZvY3VzKT1cIm9uVG91Y2hlZCgpXCJcbj4iXX0=
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormsModule } from '@angular/forms';
|
|
4
|
+
import { MaskitoDirective } from '@maskito/angular';
|
|
5
|
+
import { CuiInputTimeComponent } from './input-time.component';
|
|
6
|
+
import { CuiSvgModule } from '../svg';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export class InputTimeModule {
|
|
9
|
+
}
|
|
10
|
+
InputTimeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InputTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
11
|
+
InputTimeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: InputTimeModule, declarations: [CuiInputTimeComponent], imports: [CommonModule,
|
|
12
|
+
FormsModule,
|
|
13
|
+
CuiSvgModule,
|
|
14
|
+
MaskitoDirective], exports: [CuiInputTimeComponent] });
|
|
15
|
+
InputTimeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InputTimeModule, imports: [CommonModule,
|
|
16
|
+
FormsModule,
|
|
17
|
+
CuiSvgModule] });
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InputTimeModule, decorators: [{
|
|
19
|
+
type: NgModule,
|
|
20
|
+
args: [{
|
|
21
|
+
imports: [
|
|
22
|
+
CommonModule,
|
|
23
|
+
FormsModule,
|
|
24
|
+
CuiSvgModule,
|
|
25
|
+
MaskitoDirective
|
|
26
|
+
],
|
|
27
|
+
declarations: [
|
|
28
|
+
CuiInputTimeComponent
|
|
29
|
+
],
|
|
30
|
+
exports: [
|
|
31
|
+
CuiInputTimeComponent
|
|
32
|
+
]
|
|
33
|
+
}]
|
|
34
|
+
}] });
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQtdGltZS5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL2NvbXBvbmVudHMvaW5wdXQtdGltZS9pbnB1dC10aW1lLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sZ0JBQWdCL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AnLi4vc3ZnJztcblxuQE5nTW9kdWxlKHtcbiAgaW1wb3J0czogW1xuICAgIENvbW1vbk1vZHVsZSxcbiAgICBGb3Jtc01vZHVsZSxcbiAgICBDdWlTdmdNb2R1bGUsXG4gICAgTWFza2l0b0RpcmVjdGl2ZVxuICBdLFxuICBkZWNsYXJhdGlvbnM6IFtcbiAgICBDdWlJbnB1dFRpbWVDb21wb25lbnRcbiAgXSxcbiAgZXhwb3J0czogW1xuICAgIEN1aUlucHV0VGltZUNvbXBvbmVudFxuICBdXG59KVxuZXhwb3J0IGNsYXNzIElucHV0VGltZU1vZHVsZSB7IH1cbiJdfQ==
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
export const CUI_INPUT_TIME_DEFAULT_OPTIONS = {
|
|
3
|
+
mode: 'HH:MM'
|
|
4
|
+
};
|
|
5
|
+
export const CUI_INPUT_TIME_OPTIONS = new InjectionToken('', {
|
|
6
|
+
factory: () => CUI_INPUT_TIME_DEFAULT_OPTIONS
|
|
7
|
+
});
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQtdGltZS5vcHRpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29yZS9jb21wb25lbnRzL2lucHV0LXRpbWUvaW5wdXQtdGltZS5vcHRpb25zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFPL0MsTUFBTSxDQUFDLE1BQU0sOEJBQThCLEdBQXdCO0lBQ2pFLElBQUksRUFBRSxPQUFPO0NBQ2QsQ0FBQztBQUVGLE1BQU0sQ0FBQyxNQUFNLHNCQUFzQixHQUFHLElBQUksY0FBYyxDQUFDLEVBQUUsRUFBRTtJQUMzRCxPQUFPLEVBQUUsR0FBRyxFQUFFLENBQUMsOEJBQThCO0NBQzlDLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEluamVjdGlvblRva2VuIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgdHlwZSB7IEN1aVRpbWVNb2RlIH0gZnJvbSAnQGN1YnktdWkvY2RrJztcblxuZXhwb3J0IGludGVyZmFjZSBDdWlJbnB1dFRpbWVPcHRpb25zIHtcbiAgcmVhZG9ubHkgbW9kZTogQ3VpVGltZU1vZGU7XG59XG5cbmV4cG9ydCBjb25zdCBDVUlfSU5QVVRfVElNRV9ERUZBVUxUX09QVElPTlM6IEN1aUlucHV0VGltZU9wdGlvbnMgPSB7XG4gIG1vZGU6ICdISDpNTSdcbn07XG5cbmV4cG9ydCBjb25zdCBDVUlfSU5QVVRfVElNRV9PUFRJT05TID0gbmV3IEluamVjdGlvblRva2VuKCcnLCB7XG4gIGZhY3Rvcnk6ICgpID0+IENVSV9JTlBVVF9USU1FX0RFRkFVTFRfT1BUSU9OU1xufSk7Il19
|
|
@@ -11,6 +11,9 @@ import * as i2$1 from '@tinkoff/ng-polymorpheus';
|
|
|
11
11
|
import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
12
12
|
import * as i2$2 from '@angular/forms';
|
|
13
13
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
14
|
+
import { maskitoTimeOptionsGenerator } from '@maskito/kit';
|
|
15
|
+
import * as i3 from '@maskito/angular';
|
|
16
|
+
import { MaskitoDirective } from '@maskito/angular';
|
|
14
17
|
|
|
15
18
|
class CuiAccordionComponent {
|
|
16
19
|
}
|
|
@@ -571,10 +574,10 @@ class CuiBannerComponent {
|
|
|
571
574
|
}
|
|
572
575
|
}
|
|
573
576
|
CuiBannerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
574
|
-
CuiBannerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiBannerComponent, selector: "cui-banner", inputs: { status: "status", isCloseable: "isCloseable", label: "label", actionButtonText: "actionButtonText" }, outputs: { actionButtonClicked: "actionButtonClicked", closed: "closed" }, host: { properties: { "attr.data-status": "this.status" } }, ngImport: i0, template: "<cui-svg\n *cuiLet=\"ICON_OPTIONS[status] as iconOption\"\n [icon]=\"iconOption.icon\"\n [color]=\"iconOption.color\"\n class=\"c-icon\"\n></cui-svg>\n<div class=\"c-wrapper\">\n <h2\n *ngIf=\"label\"\n class=\"c-heading\"\n >\n {{ label }}\n </h2>\n <ng-content></ng-content>\n <button\n cuiButton\n *ngIf=\"actionButtonText\"\n appearance=\"link\"\n class=\"c-action\"\n (click)=\"onAction()\"\n >\n {{ actionButtonText }}\n </button>\n</div>\n<button\n *ngIf=\"isCloseable\"\n class=\"c-button\"\n (click)=\"onClose()\"\n>\n <cui-svg\n *cuiLet=\"theme$ | async as theme\"\n icon=\"cuiIconX\"\n [color]=\"THEME_CLOSE_BUTTON_ICON_COLORS[theme!]\"\n />\n</button>\n", styles: [":host{--c-info-icon-color: var(--cui-light-blue-800);--c-alert-icon-color: var(--cui-orange-800);padding:
|
|
577
|
+
CuiBannerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiBannerComponent, selector: "cui-banner", inputs: { status: "status", isCloseable: "isCloseable", label: "label", actionButtonText: "actionButtonText" }, outputs: { actionButtonClicked: "actionButtonClicked", closed: "closed" }, host: { properties: { "attr.data-status": "this.status" } }, ngImport: i0, template: "<cui-svg\n *cuiLet=\"ICON_OPTIONS[status] as iconOption\"\n [icon]=\"iconOption.icon\"\n [color]=\"iconOption.color\"\n class=\"c-icon\"\n></cui-svg>\n<div class=\"c-wrapper\">\n <h2\n *ngIf=\"label\"\n class=\"c-heading\"\n >\n {{ label }}\n </h2>\n <ng-content></ng-content>\n <button\n cuiButton\n *ngIf=\"actionButtonText\"\n appearance=\"link\"\n class=\"c-action\"\n (click)=\"onAction()\"\n >\n {{ actionButtonText }}\n </button>\n</div>\n<button\n *ngIf=\"isCloseable\"\n class=\"c-button\"\n (click)=\"onClose()\"\n>\n <cui-svg\n *cuiLet=\"theme$ | async as theme\"\n icon=\"cuiIconX\"\n [color]=\"THEME_CLOSE_BUTTON_ICON_COLORS[theme!]\"\n />\n</button>\n", styles: [":host{--c-info-icon-color: var(--cui-light-blue-800);--c-alert-icon-color: var(--cui-orange-800);padding:8px 16px;font-weight:400;font-size:14px;line-height:20px;display:flex;gap:16px;align-items:center;color:var(--cui-base-900);font-family:var(--cui-main-font)}:host[data-status=info]{color:var(--cui-light-blue-800);background:var(--cui-blue-50)}:host[data-status=success]{background:var(--cui-green-50)}:host[data-status=alert]{color:var(--cui-orange-800);background:var(--cui-yellow-100)}:host[data-status=error]{background:var(--cui-red-50)}:host-context([cuiTheme=dark]){--c-info-icon-color: var(--cui-light-blue-400);--c-alert-icon-color: var(--cui-yellow-300);color:var(--cui-gray-0)}:host-context([cuiTheme=dark])[data-status=info]{color:var(--cui-light-blue-400);background:var(--cui-blue-900)}:host-context([cuiTheme=dark])[data-status=info] .c-action:hover{color:var(--cui-blue-500)}:host-context([cuiTheme=dark])[data-status=success]{background:var(--cui-green-900)}:host-context([cuiTheme=dark])[data-status=success] .c-action{color:var(--cui-green-500)}:host-context([cuiTheme=dark])[data-status=alert]{background:var(--cui-yellow-900)}:host-context([cuiTheme=dark])[data-status=alert] .c-action{color:var(--cui-yellow-300)}:host-context([cuiTheme=dark])[data-status=error]{background:var(--cui-red-900)}:host-context([cuiTheme=dark])[data-status=error] .c-action{color:var(--cui-red-400)}.c-icon{height:28px}.c-wrapper{flex:1;display:flex;align-items:center;gap:16px;overflow-wrap:anywhere}.c-heading{font-weight:500;font-size:14px;line-height:20px;margin:0}.c-button{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}.c-button:hover{background:rgba(255,255,255,.2)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "component", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "size"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
575
578
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBannerComponent, decorators: [{
|
|
576
579
|
type: Component,
|
|
577
|
-
args: [{ selector: 'cui-banner', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-svg\n *cuiLet=\"ICON_OPTIONS[status] as iconOption\"\n [icon]=\"iconOption.icon\"\n [color]=\"iconOption.color\"\n class=\"c-icon\"\n></cui-svg>\n<div class=\"c-wrapper\">\n <h2\n *ngIf=\"label\"\n class=\"c-heading\"\n >\n {{ label }}\n </h2>\n <ng-content></ng-content>\n <button\n cuiButton\n *ngIf=\"actionButtonText\"\n appearance=\"link\"\n class=\"c-action\"\n (click)=\"onAction()\"\n >\n {{ actionButtonText }}\n </button>\n</div>\n<button\n *ngIf=\"isCloseable\"\n class=\"c-button\"\n (click)=\"onClose()\"\n>\n <cui-svg\n *cuiLet=\"theme$ | async as theme\"\n icon=\"cuiIconX\"\n [color]=\"THEME_CLOSE_BUTTON_ICON_COLORS[theme!]\"\n />\n</button>\n", styles: [":host{--c-info-icon-color: var(--cui-light-blue-800);--c-alert-icon-color: var(--cui-orange-800);padding:
|
|
580
|
+
args: [{ selector: 'cui-banner', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-svg\n *cuiLet=\"ICON_OPTIONS[status] as iconOption\"\n [icon]=\"iconOption.icon\"\n [color]=\"iconOption.color\"\n class=\"c-icon\"\n></cui-svg>\n<div class=\"c-wrapper\">\n <h2\n *ngIf=\"label\"\n class=\"c-heading\"\n >\n {{ label }}\n </h2>\n <ng-content></ng-content>\n <button\n cuiButton\n *ngIf=\"actionButtonText\"\n appearance=\"link\"\n class=\"c-action\"\n (click)=\"onAction()\"\n >\n {{ actionButtonText }}\n </button>\n</div>\n<button\n *ngIf=\"isCloseable\"\n class=\"c-button\"\n (click)=\"onClose()\"\n>\n <cui-svg\n *cuiLet=\"theme$ | async as theme\"\n icon=\"cuiIconX\"\n [color]=\"THEME_CLOSE_BUTTON_ICON_COLORS[theme!]\"\n />\n</button>\n", styles: [":host{--c-info-icon-color: var(--cui-light-blue-800);--c-alert-icon-color: var(--cui-orange-800);padding:8px 16px;font-weight:400;font-size:14px;line-height:20px;display:flex;gap:16px;align-items:center;color:var(--cui-base-900);font-family:var(--cui-main-font)}:host[data-status=info]{color:var(--cui-light-blue-800);background:var(--cui-blue-50)}:host[data-status=success]{background:var(--cui-green-50)}:host[data-status=alert]{color:var(--cui-orange-800);background:var(--cui-yellow-100)}:host[data-status=error]{background:var(--cui-red-50)}:host-context([cuiTheme=dark]){--c-info-icon-color: var(--cui-light-blue-400);--c-alert-icon-color: var(--cui-yellow-300);color:var(--cui-gray-0)}:host-context([cuiTheme=dark])[data-status=info]{color:var(--cui-light-blue-400);background:var(--cui-blue-900)}:host-context([cuiTheme=dark])[data-status=info] .c-action:hover{color:var(--cui-blue-500)}:host-context([cuiTheme=dark])[data-status=success]{background:var(--cui-green-900)}:host-context([cuiTheme=dark])[data-status=success] .c-action{color:var(--cui-green-500)}:host-context([cuiTheme=dark])[data-status=alert]{background:var(--cui-yellow-900)}:host-context([cuiTheme=dark])[data-status=alert] .c-action{color:var(--cui-yellow-300)}:host-context([cuiTheme=dark])[data-status=error]{background:var(--cui-red-900)}:host-context([cuiTheme=dark])[data-status=error] .c-action{color:var(--cui-red-400)}.c-icon{height:28px}.c-wrapper{flex:1;display:flex;align-items:center;gap:16px;overflow-wrap:anywhere}.c-heading{font-weight:500;font-size:14px;line-height:20px;margin:0}.c-button{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}.c-button:hover{background:rgba(255,255,255,.2)}\n"] }]
|
|
578
581
|
}], propDecorators: { status: [{
|
|
579
582
|
type: Input
|
|
580
583
|
}, {
|
|
@@ -1832,6 +1835,121 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1832
1835
|
}]
|
|
1833
1836
|
}] });
|
|
1834
1837
|
|
|
1838
|
+
const CUI_INPUT_TIME_DEFAULT_OPTIONS = {
|
|
1839
|
+
mode: 'HH:MM'
|
|
1840
|
+
};
|
|
1841
|
+
const CUI_INPUT_TIME_OPTIONS = new InjectionToken('', {
|
|
1842
|
+
factory: () => CUI_INPUT_TIME_DEFAULT_OPTIONS
|
|
1843
|
+
});
|
|
1844
|
+
|
|
1845
|
+
class CuiInputTimeComponent {
|
|
1846
|
+
constructor() {
|
|
1847
|
+
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
1848
|
+
this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
|
|
1849
|
+
this.options = inject(CUI_INPUT_TIME_OPTIONS);
|
|
1850
|
+
this.maskOptions = this.generateMask(this.options.mode);
|
|
1851
|
+
this.defaultPlaceholder = this.options.mode.toLowerCase();
|
|
1852
|
+
}
|
|
1853
|
+
set mode(value) {
|
|
1854
|
+
this.maskOptions = this.generateMask(this.options.mode);
|
|
1855
|
+
this.defaultPlaceholder = value.toLowerCase();
|
|
1856
|
+
}
|
|
1857
|
+
get id() {
|
|
1858
|
+
return this.cuiTextFieldController.id;
|
|
1859
|
+
}
|
|
1860
|
+
get placeholder() {
|
|
1861
|
+
var _a;
|
|
1862
|
+
return (_a = this.cuiTextFieldController.placeholder) !== null && _a !== void 0 ? _a : this.defaultPlaceholder;
|
|
1863
|
+
}
|
|
1864
|
+
get size() {
|
|
1865
|
+
return this.cuiTextFieldController.size;
|
|
1866
|
+
}
|
|
1867
|
+
get isError() {
|
|
1868
|
+
return this.cuiTextFieldController.isError;
|
|
1869
|
+
}
|
|
1870
|
+
writeValue(value) {
|
|
1871
|
+
this.value = value;
|
|
1872
|
+
this.changeDetectorRef.markForCheck();
|
|
1873
|
+
}
|
|
1874
|
+
registerOnChange(fn) {
|
|
1875
|
+
this.onChange = fn;
|
|
1876
|
+
}
|
|
1877
|
+
registerOnTouched(fn) {
|
|
1878
|
+
this.onTouched = fn;
|
|
1879
|
+
}
|
|
1880
|
+
setDisabledState(isDisabled) {
|
|
1881
|
+
this.isDisabled = isDisabled;
|
|
1882
|
+
this.changeDetectorRef.markForCheck();
|
|
1883
|
+
}
|
|
1884
|
+
onInput(event) {
|
|
1885
|
+
this.value = event.target.value;
|
|
1886
|
+
this.onChange(this.value);
|
|
1887
|
+
}
|
|
1888
|
+
onFocus() {
|
|
1889
|
+
this.input.nativeElement.focus();
|
|
1890
|
+
}
|
|
1891
|
+
generateMask(mode) {
|
|
1892
|
+
return maskitoTimeOptionsGenerator({ mode });
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
CuiInputTimeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputTimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1896
|
+
CuiInputTimeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiInputTimeComponent, selector: "cui-input-time", inputs: { mode: "mode" }, host: { listeners: { "click": "onFocus()" }, properties: { "class._disabled": "this.isDisabled", "attr.data-size": "this.size", "class._with-error": "this.isError" } }, providers: [
|
|
1897
|
+
CUI_TEXT_FILED_CONTROLLER_PROVIDER,
|
|
1898
|
+
cuiProvide(NG_VALUE_ACCESSOR, CuiInputTimeComponent, true)
|
|
1899
|
+
], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<cui-svg\n icon=\"cuiIconClock\"\n color=\"var(--cui-base-500)\"\n></cui-svg>\n<input\n #input\n [ngModel]=\"value\"\n [attr.id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n type=\"text\"\n [maskito]=\"maskOptions\"\n [disabled]=\"isDisabled\"\n class=\"c-input\"\n (input)=\"onInput($event)\"\n (focus)=\"onTouched()\"\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-input);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 var(--cui-focus);border-color:var(--cui-info)}: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-danger)}: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;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;display:flex}\n"], dependencies: [{ kind: "directive", type: i2$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.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"] }, { kind: "directive", type: i3.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1900
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputTimeComponent, decorators: [{
|
|
1901
|
+
type: Component,
|
|
1902
|
+
args: [{ selector: 'cui-input-time', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1903
|
+
CUI_TEXT_FILED_CONTROLLER_PROVIDER,
|
|
1904
|
+
cuiProvide(NG_VALUE_ACCESSOR, CuiInputTimeComponent, true)
|
|
1905
|
+
], template: "<cui-svg\n icon=\"cuiIconClock\"\n color=\"var(--cui-base-500)\"\n></cui-svg>\n<input\n #input\n [ngModel]=\"value\"\n [attr.id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n type=\"text\"\n [maskito]=\"maskOptions\"\n [disabled]=\"isDisabled\"\n class=\"c-input\"\n (input)=\"onInput($event)\"\n (focus)=\"onTouched()\"\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-input);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 var(--cui-focus);border-color:var(--cui-info)}: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-danger)}: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;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;display:flex}\n"] }]
|
|
1906
|
+
}], propDecorators: { mode: [{
|
|
1907
|
+
type: Input
|
|
1908
|
+
}], isDisabled: [{
|
|
1909
|
+
type: HostBinding,
|
|
1910
|
+
args: ['class._disabled']
|
|
1911
|
+
}], input: [{
|
|
1912
|
+
type: ViewChild,
|
|
1913
|
+
args: ['input']
|
|
1914
|
+
}], size: [{
|
|
1915
|
+
type: HostBinding,
|
|
1916
|
+
args: ['attr.data-size']
|
|
1917
|
+
}], isError: [{
|
|
1918
|
+
type: HostBinding,
|
|
1919
|
+
args: ['class._with-error']
|
|
1920
|
+
}], onFocus: [{
|
|
1921
|
+
type: HostListener,
|
|
1922
|
+
args: ['click']
|
|
1923
|
+
}] } });
|
|
1924
|
+
|
|
1925
|
+
class InputTimeModule {
|
|
1926
|
+
}
|
|
1927
|
+
InputTimeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InputTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1928
|
+
InputTimeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: InputTimeModule, declarations: [CuiInputTimeComponent], imports: [CommonModule,
|
|
1929
|
+
FormsModule,
|
|
1930
|
+
CuiSvgModule,
|
|
1931
|
+
MaskitoDirective], exports: [CuiInputTimeComponent] });
|
|
1932
|
+
InputTimeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InputTimeModule, imports: [CommonModule,
|
|
1933
|
+
FormsModule,
|
|
1934
|
+
CuiSvgModule] });
|
|
1935
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InputTimeModule, decorators: [{
|
|
1936
|
+
type: NgModule,
|
|
1937
|
+
args: [{
|
|
1938
|
+
imports: [
|
|
1939
|
+
CommonModule,
|
|
1940
|
+
FormsModule,
|
|
1941
|
+
CuiSvgModule,
|
|
1942
|
+
MaskitoDirective
|
|
1943
|
+
],
|
|
1944
|
+
declarations: [
|
|
1945
|
+
CuiInputTimeComponent
|
|
1946
|
+
],
|
|
1947
|
+
exports: [
|
|
1948
|
+
CuiInputTimeComponent
|
|
1949
|
+
]
|
|
1950
|
+
}]
|
|
1951
|
+
}] });
|
|
1952
|
+
|
|
1835
1953
|
class CuiLabelComponent {
|
|
1836
1954
|
constructor() {
|
|
1837
1955
|
this.isRequired = false;
|
|
@@ -2209,5 +2327,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2209
2327
|
* Generated bundle index. Do not edit.
|
|
2210
2328
|
*/
|
|
2211
2329
|
|
|
2212
|
-
export { CUI_ALERTS, CUI_ALERT_CONTEXT, CUI_ALERT_DEFAULT_OPTIONS, CUI_ALERT_OPTIONS, CUI_BANNER_DEFAULT_OPTIONS, CUI_BANNER_OPTIONS, CUI_BUTTON_DEFAULT_OPTIONS, CUI_BUTTON_OPTIONS, CUI_DEFAULT_THEME, CUI_DIALOGS, CUI_DIALOG_CONTEXT, CUI_DIALOG_DEFAULT_OPTIONS, CUI_DIALOG_OPTIONS, CUI_NOTIFICATION_DEFAULT_OPTIONS, CUI_NOTIFICATION_OPTIONS, CUI_ROOT_SELECTOR, CUI_TAB_ACTIVATE, 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, CUI_THEME, CUI_THEME_STORAGE_DEFAULT_KEY, CUI_THEME_STORAGE_KEY, CuiAccordionComponent, CuiAccordionItemComponent, CuiAccordionModule, CuiAlertComponent, CuiAlertModule, CuiAlertService, CuiAlertsComponent, CuiBadgeComponent, CuiBadgeModule, CuiBannerComponent, CuiBannerModule, CuiBreadcrumbComponent, CuiBreadcrumbsComponent, CuiBreadcrumbsModule, CuiButtonComponent, CuiButtonGroupComponent, CuiButtonGroupModule, CuiButtonModule, CuiCheckboxComponent, CuiCheckboxModule, CuiContextMenuComponent, CuiContextMenuModule, CuiDialogActionsComponent, CuiDialogComponent, CuiDialogHeaderComponent, CuiDialogModule, CuiDialogService, CuiDialogsComponent, CuiFormFieldComponent, CuiFormFieldModule, CuiHintComponent, CuiHintModule, CuiIconButtonComponent, CuiIconButtonModule, CuiInputModule, CuiInputNumberComponent, CuiInputNumberModule, CuiInputPasswordComponent, CuiInputPasswordModule, CuiInputTextComponent, CuiLabelComponent, CuiLabelModule, CuiNotificationComponent, CuiNotificationModule, CuiRadioComponent, CuiRadioModule, CuiRootComponent, CuiRootModule, CuiSelectComponent, CuiSelectModule, CuiSvgComponent, CuiSvgModule, CuiTabComponent, CuiTabsComponent, CuiTabsModule, CuiTextFieldController, CuiTextFieldControllerModule, CuiTextFieldIconLeftDirective, CuiTextFieldIdDirective, CuiTextFieldIsErrorDirective, CuiTextFieldPlaceholderDirective, CuiTextFieldSizeDirective, CuiTextareaComponent, CuiTextareaModule, CuiThemeService, CuiToggleComponent, CuiToggleModule, cuiRemoveSpaces, cuiReplace };
|
|
2330
|
+
export { CUI_ALERTS, CUI_ALERT_CONTEXT, CUI_ALERT_DEFAULT_OPTIONS, CUI_ALERT_OPTIONS, CUI_BANNER_DEFAULT_OPTIONS, CUI_BANNER_OPTIONS, CUI_BUTTON_DEFAULT_OPTIONS, CUI_BUTTON_OPTIONS, CUI_DEFAULT_THEME, CUI_DIALOGS, CUI_DIALOG_CONTEXT, CUI_DIALOG_DEFAULT_OPTIONS, CUI_DIALOG_OPTIONS, CUI_INPUT_TIME_DEFAULT_OPTIONS, CUI_INPUT_TIME_OPTIONS, CUI_NOTIFICATION_DEFAULT_OPTIONS, CUI_NOTIFICATION_OPTIONS, CUI_ROOT_SELECTOR, CUI_TAB_ACTIVATE, 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, CUI_THEME, CUI_THEME_STORAGE_DEFAULT_KEY, CUI_THEME_STORAGE_KEY, CuiAccordionComponent, CuiAccordionItemComponent, CuiAccordionModule, CuiAlertComponent, CuiAlertModule, CuiAlertService, CuiAlertsComponent, CuiBadgeComponent, CuiBadgeModule, CuiBannerComponent, CuiBannerModule, CuiBreadcrumbComponent, CuiBreadcrumbsComponent, CuiBreadcrumbsModule, CuiButtonComponent, CuiButtonGroupComponent, CuiButtonGroupModule, CuiButtonModule, CuiCheckboxComponent, CuiCheckboxModule, CuiContextMenuComponent, CuiContextMenuModule, CuiDialogActionsComponent, CuiDialogComponent, CuiDialogHeaderComponent, CuiDialogModule, CuiDialogService, CuiDialogsComponent, CuiFormFieldComponent, CuiFormFieldModule, CuiHintComponent, CuiHintModule, CuiIconButtonComponent, CuiIconButtonModule, CuiInputModule, CuiInputNumberComponent, CuiInputNumberModule, CuiInputPasswordComponent, CuiInputPasswordModule, CuiInputTextComponent, CuiInputTimeComponent, CuiLabelComponent, CuiLabelModule, CuiNotificationComponent, CuiNotificationModule, CuiRadioComponent, CuiRadioModule, CuiRootComponent, CuiRootModule, CuiSelectComponent, CuiSelectModule, CuiSvgComponent, CuiSvgModule, CuiTabComponent, CuiTabsComponent, CuiTabsModule, CuiTextFieldController, CuiTextFieldControllerModule, CuiTextFieldIconLeftDirective, CuiTextFieldIdDirective, CuiTextFieldIsErrorDirective, CuiTextFieldPlaceholderDirective, CuiTextFieldSizeDirective, CuiTextareaComponent, CuiTextareaModule, CuiThemeService, CuiToggleComponent, CuiToggleModule, InputTimeModule, cuiRemoveSpaces, cuiReplace };
|
|
2213
2331
|
//# sourceMappingURL=cuby-ui-core.mjs.map
|