@taiga-ui/core 4.4.1 → 4.5.0-canary.49229f4
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/calendar/calendar-sheet.component.d.ts +1 -1
- package/components/data-list/data-list.component.d.ts +1 -1
- package/components/dialog/dialog.component.d.ts +1 -1
- package/components/notification/notification.directive.d.ts +1 -1
- package/components/spin-button/spin-button.component.d.ts +1 -1
- package/components/textfield/index.d.ts +1 -0
- package/components/textfield/textfield-content.directive.d.ts +6 -0
- package/components/textfield/textfield.component.d.ts +7 -6
- package/components/textfield/textfield.directive.d.ts +0 -1
- package/directives/appearance/appearance.directive.d.ts +7 -3
- package/directives/appearance/appearance.options.d.ts +6 -1
- package/directives/dropdown/dropdown.directive.d.ts +1 -1
- package/directives/hint/hint.component.d.ts +1 -1
- package/esm2022/components/alert/alert.component.mjs +6 -6
- package/esm2022/components/alert/alerts.component.mjs +4 -3
- package/esm2022/components/button/button.directive.mjs +2 -2
- package/esm2022/components/calendar/calendar-sheet.component.mjs +6 -6
- package/esm2022/components/calendar/calendar-spin.component.mjs +3 -3
- package/esm2022/components/calendar/calendar-year.component.mjs +4 -4
- package/esm2022/components/calendar/calendar.component.mjs +6 -6
- package/esm2022/components/data-list/data-list.component.mjs +6 -6
- package/esm2022/components/dialog/dialog.component.mjs +7 -6
- package/esm2022/components/dialog/dialogs.component.mjs +3 -3
- package/esm2022/components/expand/expand.component.mjs +3 -3
- package/esm2022/components/icon/icon.component.mjs +3 -3
- package/esm2022/components/label/label.directive.mjs +2 -2
- package/esm2022/components/loader/loader.component.mjs +3 -3
- package/esm2022/components/notification/notification.directive.mjs +2 -2
- package/esm2022/components/root/root.component.mjs +8 -8
- package/esm2022/components/scrollbar/scroll-controls.component.mjs +6 -6
- package/esm2022/components/scrollbar/scrollbar.component.mjs +4 -4
- package/esm2022/components/scrollbar/scrollbar.directive.mjs +5 -5
- package/esm2022/components/scrollbar/scrollbar.service.mjs +3 -3
- package/esm2022/components/spin-button/spin-button.component.mjs +3 -3
- package/esm2022/components/textfield/index.mjs +2 -1
- package/esm2022/components/textfield/select.directive.mjs +3 -3
- package/esm2022/components/textfield/textfield-content.directive.mjs +19 -0
- package/esm2022/components/textfield/textfield.component.mjs +18 -13
- package/esm2022/components/textfield/textfield.directive.mjs +3 -5
- package/esm2022/directives/appearance/appearance.bindings.mjs +4 -4
- package/esm2022/directives/appearance/appearance.directive.mjs +19 -9
- package/esm2022/directives/appearance/appearance.options.mjs +1 -1
- package/esm2022/directives/dropdown/dropdown-hover.directive.mjs +3 -3
- package/esm2022/directives/dropdown/dropdown.bindings.mjs +3 -3
- package/esm2022/directives/dropdown/dropdown.component.mjs +3 -3
- package/esm2022/directives/dropdown/dropdown.directive.mjs +4 -2
- package/esm2022/directives/group/group.directive.mjs +5 -5
- package/esm2022/directives/hint/hint-describe.directive.mjs +3 -3
- package/esm2022/directives/hint/hint-unstyled.component.mjs +3 -3
- package/esm2022/directives/hint/hint.component.mjs +6 -5
- package/esm2022/directives/hint/hints.component.mjs +4 -4
- package/esm2022/directives/icons/icons.directive.mjs +2 -2
- package/esm2022/directives/surface/surface.directive.mjs +2 -2
- package/esm2022/directives/title/title.directive.mjs +2 -2
- package/esm2022/pipes/order-week-days/order-week-days.pipe.mjs +2 -5
- package/esm2022/services/breakpoint.service.mjs +3 -3
- package/fesm2022/taiga-ui-core-components-alert.mjs +7 -7
- package/fesm2022/taiga-ui-core-components-alert.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-button.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-calendar.mjs +16 -16
- package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-data-list.mjs +5 -5
- package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-dialog.mjs +8 -8
- package/fesm2022/taiga-ui-core-components-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-expand.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-expand.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-icon.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-label.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-loader.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-notification.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-root.mjs +8 -8
- package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs +12 -12
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-spin-button.mjs +3 -3
- package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-textfield.mjs +39 -19
- package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-appearance.mjs +21 -11
- package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs +8 -8
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-group.mjs +4 -4
- package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-hint.mjs +10 -10
- package/fesm2022/taiga-ui-core-directives-hint.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-icons.mjs +2 -2
- package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-surface.mjs +2 -2
- package/fesm2022/taiga-ui-core-directives-surface.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-title.mjs +2 -2
- package/fesm2022/taiga-ui-core-directives-title.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs +1 -4
- package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-services.mjs +2 -2
- package/fesm2022/taiga-ui-core-services.mjs.map +1 -1
- package/package.json +324 -324
- package/pipes/order-week-days/order-week-days.pipe.d.ts +1 -3
- package/styles/components/button.less +5 -5
- package/styles/components/group.less +12 -35
- package/styles/components/icon.less +10 -3
- package/styles/components/icons.less +2 -2
- package/styles/components/label.less +2 -2
- package/styles/components/notification.less +2 -2
- package/styles/components/textfield.less +23 -16
- package/styles/components/title.less +1 -1
- package/styles/mixins/mixins.less +5 -5
- package/styles/mixins/picker.less +18 -18
- package/styles/mixins/slider.less +2 -2
- package/styles/mixins/slider.scss +2 -2
- package/styles/theme/appearance/floating.less +2 -2
- package/styles/theme/appearance/glass.less +3 -3
- package/styles/theme/appearance/opposite.less +2 -2
- package/styles/theme/appearance/textfield.less +8 -4
- package/styles/theme/palette.less +62 -60
- package/styles/theme/wrapper.less +3 -3
- package/tokens/i18n.d.ts +3 -3
|
@@ -10,7 +10,7 @@ import { TUI_NOTIFICATION_OPTIONS, TuiNotification } from '@taiga-ui/core/compon
|
|
|
10
10
|
import { TuiTitle } from '@taiga-ui/core/directives/title';
|
|
11
11
|
import { TUI_COMMON_ICONS, TUI_ANIMATIONS_SPEED, TUI_CLOSE_WORD } from '@taiga-ui/core/tokens';
|
|
12
12
|
import { tuiToAnimationOptions } from '@taiga-ui/core/utils';
|
|
13
|
-
import {
|
|
13
|
+
import { injectContext, PolymorpheusOutlet, POLYMORPHEUS_CONTEXT } from '@taiga-ui/polymorpheus';
|
|
14
14
|
import { BehaviorSubject, combineLatest, of, map, switchMap, timer, EMPTY, takeUntil, fromEvent, repeat, identity } from 'rxjs';
|
|
15
15
|
import { TUI_IS_MOBILE } from '@taiga-ui/cdk/tokens';
|
|
16
16
|
import { tuiCreateTokenFromFactory, tuiCreateToken } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
@@ -53,7 +53,7 @@ class TuiAlertComponent {
|
|
|
53
53
|
this.options = tuiToAnimationOptions(inject(TUI_ANIMATIONS_SPEED));
|
|
54
54
|
this.close = toSignal(inject(TUI_CLOSE_WORD));
|
|
55
55
|
this.position = inject(TUI_ALERT_POSITION);
|
|
56
|
-
this.item =
|
|
56
|
+
this.item = injectContext();
|
|
57
57
|
this.animation = this.position.endsWith('auto')
|
|
58
58
|
? { ...this.options, value: 'right' }
|
|
59
59
|
: { ...this.options, value: 'left' };
|
|
@@ -64,17 +64,17 @@ class TuiAlertComponent {
|
|
|
64
64
|
.subscribe(() => this.item.$implicit.complete());
|
|
65
65
|
}
|
|
66
66
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
67
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiAlertComponent, isStandalone: true, selector: "tui-alert", host: { attributes: { "role": "alert" }, properties: { "style.margin": "position", "@tuiFadeIn": "options", "@tuiSlideIn": "animation", "@tuiHeightCollapse": "animation" } }, ngImport: i0, template: "<tui-notification\n size=\"m\"\n [appearance]=\"item.appearance\"\n [icon]=\"item.icon\"\n>\n <span tuiTitle>\n <ng-container *polymorpheusOutlet=\"item.label as text; context: item\">\n {{ text }}\n </ng-container>\n <span tuiSubtitle>\n <span\n *polymorpheusOutlet=\"item.content as text; context: item\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n </span>\n <button\n *ngIf=\"item.closeable\"\n tuiIconButton\n [iconStart]=\"icons.close\"\n (click)=\"item.$implicit.complete()\"\n >\n {{ close() }}\n </button>\n</tui-notification>\n", styles: [":host{display:block;
|
|
67
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiAlertComponent, isStandalone: true, selector: "tui-alert", host: { attributes: { "role": "alert" }, properties: { "style.margin": "position", "@tuiFadeIn": "options", "@tuiSlideIn": "animation", "@tuiHeightCollapse": "animation" } }, ngImport: i0, template: "<tui-notification\n size=\"m\"\n [appearance]=\"item.appearance\"\n [icon]=\"item.icon\"\n>\n <span tuiTitle>\n <ng-container *polymorpheusOutlet=\"item.label as text; context: item\">\n {{ text }}\n </ng-container>\n <span tuiSubtitle>\n <span\n *polymorpheusOutlet=\"item.content as text; context: item\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n </span>\n <button\n *ngIf=\"item.closeable\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"icons.close\"\n (click)=\"item.$implicit.complete()\"\n >\n {{ close() }}\n </button>\n</tui-notification>\n", styles: [":host{display:block;inline-size:18rem;flex-shrink:0;word-break:break-word;background:var(--tui-background-elevation-1);border-radius:var(--tui-radius-m);box-shadow:var(--tui-shadow-medium)}:host:not(:first-child){margin-top:.75rem!important}:host:not(:last-child){margin-bottom:0!important}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiNotification, selector: "tui-notification,a[tuiNotification],button[tuiNotification]", inputs: ["appearance", "icon", "size"] }, { kind: "directive", type: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }], animations: [tuiFadeIn, tuiSlideIn, tuiHeightCollapse], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
68
68
|
}
|
|
69
69
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiAlertComponent, decorators: [{
|
|
70
70
|
type: Component,
|
|
71
|
-
args: [{ standalone: true, selector: 'tui-alert', imports: [NgIf, PolymorpheusOutlet,
|
|
71
|
+
args: [{ standalone: true, selector: 'tui-alert', imports: [NgIf, PolymorpheusOutlet, TuiButton, TuiNotification, TuiTitle], changeDetection: ChangeDetectionStrategy.OnPush, animations: [tuiFadeIn, tuiSlideIn, tuiHeightCollapse], host: {
|
|
72
72
|
role: 'alert',
|
|
73
73
|
'[style.margin]': 'position',
|
|
74
74
|
'[@tuiFadeIn]': 'options',
|
|
75
75
|
'[@tuiSlideIn]': 'animation',
|
|
76
76
|
'[@tuiHeightCollapse]': 'animation',
|
|
77
|
-
}, template: "<tui-notification\n size=\"m\"\n [appearance]=\"item.appearance\"\n [icon]=\"item.icon\"\n>\n <span tuiTitle>\n <ng-container *polymorpheusOutlet=\"item.label as text; context: item\">\n {{ text }}\n </ng-container>\n <span tuiSubtitle>\n <span\n *polymorpheusOutlet=\"item.content as text; context: item\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n </span>\n <button\n *ngIf=\"item.closeable\"\n tuiIconButton\n [iconStart]=\"icons.close\"\n (click)=\"item.$implicit.complete()\"\n >\n {{ close() }}\n </button>\n</tui-notification>\n", styles: [":host{display:block;
|
|
77
|
+
}, template: "<tui-notification\n size=\"m\"\n [appearance]=\"item.appearance\"\n [icon]=\"item.icon\"\n>\n <span tuiTitle>\n <ng-container *polymorpheusOutlet=\"item.label as text; context: item\">\n {{ text }}\n </ng-container>\n <span tuiSubtitle>\n <span\n *polymorpheusOutlet=\"item.content as text; context: item\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n </span>\n <button\n *ngIf=\"item.closeable\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"icons.close\"\n (click)=\"item.$implicit.complete()\"\n >\n {{ close() }}\n </button>\n</tui-notification>\n", styles: [":host{display:block;inline-size:18rem;flex-shrink:0;word-break:break-word;background:var(--tui-background-elevation-1);border-radius:var(--tui-radius-m);box-shadow:var(--tui-shadow-medium)}:host:not(:first-child){margin-top:.75rem!important}:host:not(:last-child){margin-bottom:0!important}\n"] }]
|
|
78
78
|
}] });
|
|
79
79
|
|
|
80
80
|
class TuiAlertService extends TuiPopoverService {
|
|
@@ -120,11 +120,11 @@ class TuiAlerts {
|
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
122
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiAlerts, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
123
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiAlerts, isStandalone: true, selector: "tui-alerts", ngImport: i0, template: "<div\n *ngFor=\"let group of alerts$ | async; trackBy: trackBy\"\n class=\"t-wrapper\"\n @tuiParentAnimation\n>\n <ng-container\n *ngFor=\"let item of group\"\n [ngComponentOutlet]=\"item.component.component\"\n [ngComponentOutletInjector]=\"item | tuiMapper: mapper\"\n />\n</div>\n", styles: ["tui-alerts>.t-wrapper{position:fixed;top:0;left:0;
|
|
123
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiAlerts, isStandalone: true, selector: "tui-alerts", ngImport: i0, template: "<div\n *ngFor=\"let group of alerts$ | async; trackBy: trackBy\"\n class=\"t-wrapper\"\n @tuiParentAnimation\n>\n <ng-container\n *ngFor=\"let item of group\"\n [ngComponentOutlet]=\"item.component.component\"\n [ngComponentOutletInjector]=\"item | tuiMapper: mapper\"\n />\n</div>\n", styles: ["tui-alerts>.t-wrapper{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;display:flex;flex-direction:column;pointer-events:none}tui-alerts>.t-wrapper>*{pointer-events:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: TuiMapperPipe, name: "tuiMapper" }], animations: [tuiParentAnimation], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
|
124
124
|
}
|
|
125
125
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiAlerts, decorators: [{
|
|
126
126
|
type: Component,
|
|
127
|
-
args: [{ standalone: true, selector: 'tui-alerts', imports: [CommonModule, TuiMapperPipe], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, animations: [tuiParentAnimation], template: "<div\n *ngFor=\"let group of alerts$ | async; trackBy: trackBy\"\n class=\"t-wrapper\"\n @tuiParentAnimation\n>\n <ng-container\n *ngFor=\"let item of group\"\n [ngComponentOutlet]=\"item.component.component\"\n [ngComponentOutletInjector]=\"item | tuiMapper: mapper\"\n />\n</div>\n", styles: ["tui-alerts>.t-wrapper{position:fixed;top:0;left:0;
|
|
127
|
+
args: [{ standalone: true, selector: 'tui-alerts', imports: [CommonModule, TuiMapperPipe], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, animations: [tuiParentAnimation], template: "<div\n *ngFor=\"let group of alerts$ | async; trackBy: trackBy\"\n class=\"t-wrapper\"\n @tuiParentAnimation\n>\n <ng-container\n *ngFor=\"let item of group\"\n [ngComponentOutlet]=\"item.component.component\"\n [ngComponentOutletInjector]=\"item | tuiMapper: mapper\"\n />\n</div>\n", styles: ["tui-alerts>.t-wrapper{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;display:flex;flex-direction:column;pointer-events:none}tui-alerts>.t-wrapper>*{pointer-events:auto}\n"] }]
|
|
128
128
|
}] });
|
|
129
129
|
|
|
130
130
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-alert.mjs","sources":["../../../projects/core/components/alert/alert.tokens.ts","../../../projects/core/components/alert/alert.component.ts","../../../projects/core/components/alert/alert.template.html","../../../projects/core/components/alert/alert.service.ts","../../../projects/core/components/alert/alert.directive.ts","../../../projects/core/components/alert/alerts.component.ts","../../../projects/core/components/alert/alerts.template.html","../../../projects/core/components/alert/taiga-ui-core-components-alert.ts"],"sourcesContent":["import type {Type} from '@angular/core';\nimport {inject} from '@angular/core';\nimport type {TuiPopover} from '@taiga-ui/cdk/services';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {\n tuiCreateToken,\n tuiCreateTokenFromFactory,\n} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_NOTIFICATION_OPTIONS} from '@taiga-ui/core/components/notification';\nimport {BehaviorSubject, combineLatest, map, of} from 'rxjs';\n\nimport type {TuiAlertOptions} from './alert.interfaces';\n\nexport const TUI_ALERT_DEFAULT_OPTIONS: Omit<TuiAlertOptions, 'appearance' | 'icon'> = {\n autoClose: 3000,\n label: '',\n closeable: true,\n data: undefined,\n};\n\nexport const TUI_ALERT_OPTIONS = tuiCreateTokenFromFactory<TuiAlertOptions>(() => ({\n ...TUI_ALERT_DEFAULT_OPTIONS,\n ...inject(TUI_NOTIFICATION_OPTIONS),\n}));\n\nexport const TUI_ALERT_POSITION = tuiCreateTokenFromFactory<string>(() =>\n inject(TUI_IS_MOBILE) ? '1rem 1rem 0 auto' : '2rem 3rem 0 auto',\n);\n\nexport const TUI_ALERTS = tuiCreateToken(\n new BehaviorSubject<ReadonlyArray<TuiPopover<any, any>>>([]),\n);\n\n/**\n * Grouping alerts by their component\n */\nexport const TUI_ALERTS_GROUPED = tuiCreateTokenFromFactory(() =>\n combineLatest([\n of(new Map<Type<any>, ReadonlyArray<TuiPopover<any, any>>>()),\n inject(TUI_ALERTS),\n ]).pipe(\n map(([map, alerts]) => {\n map.forEach((_, key) => map.set(key, []));\n\n alerts.forEach((alert) => {\n const key = alert.component.component;\n const value = map.get(key) || [];\n\n map.set(key, [...value, alert]);\n });\n\n return Array.from(map.values());\n }),\n ),\n);\n","import {NgIf} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {takeUntilDestroyed, toSignal} from '@angular/core/rxjs-interop';\nimport type {TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiFadeIn, tuiHeightCollapse, tuiSlideIn} from '@taiga-ui/core/animations';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiNotification} from '@taiga-ui/core/components/notification';\nimport {TuiTitle} from '@taiga-ui/core/directives/title';\nimport {\n TUI_ANIMATIONS_SPEED,\n TUI_CLOSE_WORD,\n TUI_COMMON_ICONS,\n} from '@taiga-ui/core/tokens';\nimport {tuiToAnimationOptions} from '@taiga-ui/core/utils';\nimport {POLYMORPHEUS_CONTEXT, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {EMPTY, fromEvent, of, repeat, switchMap, takeUntil, timer} from 'rxjs';\n\nimport type {TuiAlertOptions} from './alert.interfaces';\nimport {TUI_ALERT_POSITION} from './alert.tokens';\n\n@Component({\n standalone: true,\n selector: 'tui-alert',\n imports: [NgIf, PolymorpheusOutlet, TuiNotification, TuiButton, TuiTitle],\n templateUrl: './alert.template.html',\n styleUrls: ['./alert.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiFadeIn, tuiSlideIn, tuiHeightCollapse],\n host: {\n role: 'alert',\n '[style.margin]': 'position',\n '[@tuiFadeIn]': 'options',\n '[@tuiSlideIn]': 'animation',\n '[@tuiHeightCollapse]': 'animation',\n },\n})\nexport class TuiAlertComponent<O, I> {\n private readonly el = tuiInjectElement();\n\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly options = tuiToAnimationOptions(inject(TUI_ANIMATIONS_SPEED));\n protected readonly close = toSignal(inject(TUI_CLOSE_WORD));\n protected readonly position = inject(TUI_ALERT_POSITION);\n protected readonly item =\n inject<TuiPopover<TuiAlertOptions<I>, O>>(POLYMORPHEUS_CONTEXT);\n\n protected readonly animation = this.position.endsWith('auto')\n ? {...this.options, value: 'right'}\n : {...this.options, value: 'left'};\n\n protected readonly sub = of(\n typeof this.item.autoClose === 'function'\n ? this.item.autoClose(this.item.appearance)\n : this.item.autoClose,\n )\n .pipe(\n switchMap((autoClose) => (autoClose ? timer(autoClose) : EMPTY)),\n takeUntil(fromEvent(this.el, 'mouseenter')),\n repeat({delay: () => fromEvent(this.el, 'mouseleave')}),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.item.$implicit.complete());\n}\n","<tui-notification\n size=\"m\"\n [appearance]=\"item.appearance\"\n [icon]=\"item.icon\"\n>\n <span tuiTitle>\n <ng-container *polymorpheusOutlet=\"item.label as text; context: item\">\n {{ text }}\n </ng-container>\n <span tuiSubtitle>\n <span\n *polymorpheusOutlet=\"item.content as text; context: item\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n </span>\n <button\n *ngIf=\"item.closeable\"\n tuiIconButton\n [iconStart]=\"icons.close\"\n (click)=\"item.$implicit.complete()\"\n >\n {{ close() }}\n </button>\n</tui-notification>\n","import {inject, Injectable} from '@angular/core';\nimport {TuiPopoverService} from '@taiga-ui/cdk/services';\n\nimport {TuiAlertComponent} from './alert.component';\nimport type {TuiAlertOptions} from './alert.interfaces';\nimport {TUI_ALERT_OPTIONS, TUI_ALERTS} from './alert.tokens';\n\n@Injectable({\n providedIn: 'root',\n useFactory: () =>\n new TuiAlertService(TUI_ALERTS, TuiAlertComponent, inject(TUI_ALERT_OPTIONS)),\n})\nexport class TuiAlertService extends TuiPopoverService<TuiAlertOptions<any>> {}\n","import {Directive} from '@angular/core';\nimport {TuiPopoverDirective} from '@taiga-ui/cdk/directives/popover';\nimport {tuiAsPopover} from '@taiga-ui/cdk/services';\n\nimport type {TuiAlertOptions} from './alert.interfaces';\nimport {TuiAlertService} from './alert.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiAlert]',\n inputs: ['options: tuiAlertOptions', 'open: tuiAlert'],\n outputs: ['openChange: tuiAlertChange'],\n providers: [tuiAsPopover(TuiAlertService)],\n})\nexport class TuiAlert<T> extends TuiPopoverDirective<TuiAlertOptions<T>> {}\n","import {CommonModule} from '@angular/common';\nimport type {Type} from '@angular/core';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n INJECTOR,\n Injector,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiMapperPipe} from '@taiga-ui/cdk/pipes/mapper';\nimport type {TuiMapper} from '@taiga-ui/cdk/types';\nimport {tuiParentAnimation} from '@taiga-ui/core/animations';\nimport {POLYMORPHEUS_CONTEXT} from '@taiga-ui/polymorpheus';\nimport {identity} from 'rxjs';\n\nimport {TUI_ALERTS_GROUPED} from './alert.tokens';\n\n@Component({\n standalone: true,\n selector: 'tui-alerts',\n imports: [CommonModule, TuiMapperPipe],\n templateUrl: './alerts.template.html',\n styleUrls: ['./alerts.style.less'],\n encapsulation: ViewEncapsulation.None,\n // So that we do not force OnPush on custom alerts\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n animations: [tuiParentAnimation],\n})\nexport class TuiAlerts {\n private readonly injector = inject(INJECTOR);\n\n protected readonly alerts$ = inject(TUI_ALERTS_GROUPED);\n protected readonly trackBy = identity;\n protected readonly mapper: TuiMapper<[Type<any>], Injector> = (useValue) =>\n Injector.create({\n providers: [\n {\n provide: POLYMORPHEUS_CONTEXT,\n useValue,\n },\n ],\n parent: this.injector,\n });\n}\n","<div\n *ngFor=\"let group of alerts$ | async; trackBy: trackBy\"\n class=\"t-wrapper\"\n @tuiParentAnimation\n>\n <ng-container\n *ngFor=\"let item of group\"\n [ngComponentOutlet]=\"item.component.component\"\n [ngComponentOutletInjector]=\"item | tuiMapper: mapper\"\n />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAaa,MAAA,yBAAyB,GAAiD;AACnF,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,IAAI,EAAE,SAAS;EACjB;MAEW,iBAAiB,GAAG,yBAAyB,CAAkB,OAAO;AAC/E,IAAA,GAAG,yBAAyB;IAC5B,GAAG,MAAM,CAAC,wBAAwB,CAAC;AACtC,CAAA,CAAC,EAAE;MAES,kBAAkB,GAAG,yBAAyB,CAAS,MAChE,MAAM,CAAC,aAAa,CAAC,GAAG,kBAAkB,GAAG,kBAAkB,EACjE;AAEK,MAAM,UAAU,GAAG,cAAc,CACpC,IAAI,eAAe,CAAsC,EAAE,CAAC,EAC9D;AAEF;;AAEG;AACU,MAAA,kBAAkB,GAAG,yBAAyB,CAAC,MACxD,aAAa,CAAC;AACV,IAAA,EAAE,CAAC,IAAI,GAAG,EAAkD,CAAC;IAC7D,MAAM,CAAC,UAAU,CAAC;AACrB,CAAA,CAAC,CAAC,IAAI,CACH,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,KAAI;AAClB,IAAA,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;AAE1C,IAAA,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;AACrB,QAAA,MAAM,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;QACtC,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;AAEjC,QAAA,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,KAAK,EAAE,KAA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A,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAAT,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC9BtB,iUAWA,EDUc,MAAA,EAAA,CAAA,gLAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAAY,odAAE,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,UAAA,EAOzB,CAAC,kBAAkB,CAAC,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,OAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;4FAEvB,SAAS,EAAA,UAAA,EAAA,CAAA;kBAZrB,SAAS;AACM,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,YACN,YAAY,EAAA,OAAA,EACb,CAAC,YAAY,EAAE,aAAa,CAAC,EAAA,aAAA,EAGvB,iBAAiB,CAAC,IAAI,mBAGpB,uBAAuB,CAAC,OAAO,EACpC,UAAA,EAAA,CAAC,kBAAkB,CAAC,EAAA,QAAA,EAAA,iUAAA,EAAA,MAAA,EAAA,CAAA,gLAAA,CAAA,EAAA,CAAA;;;AE5BpC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-alert.mjs","sources":["../../../projects/core/components/alert/alert.tokens.ts","../../../projects/core/components/alert/alert.component.ts","../../../projects/core/components/alert/alert.template.html","../../../projects/core/components/alert/alert.service.ts","../../../projects/core/components/alert/alert.directive.ts","../../../projects/core/components/alert/alerts.component.ts","../../../projects/core/components/alert/alerts.template.html","../../../projects/core/components/alert/taiga-ui-core-components-alert.ts"],"sourcesContent":["import type {Type} from '@angular/core';\nimport {inject} from '@angular/core';\nimport type {TuiPopover} from '@taiga-ui/cdk/services';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {\n tuiCreateToken,\n tuiCreateTokenFromFactory,\n} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_NOTIFICATION_OPTIONS} from '@taiga-ui/core/components/notification';\nimport {BehaviorSubject, combineLatest, map, of} from 'rxjs';\n\nimport type {TuiAlertOptions} from './alert.interfaces';\n\nexport const TUI_ALERT_DEFAULT_OPTIONS: Omit<TuiAlertOptions, 'appearance' | 'icon'> = {\n autoClose: 3000,\n label: '',\n closeable: true,\n data: undefined,\n};\n\nexport const TUI_ALERT_OPTIONS = tuiCreateTokenFromFactory<TuiAlertOptions>(() => ({\n ...TUI_ALERT_DEFAULT_OPTIONS,\n ...inject(TUI_NOTIFICATION_OPTIONS),\n}));\n\nexport const TUI_ALERT_POSITION = tuiCreateTokenFromFactory<string>(() =>\n inject(TUI_IS_MOBILE) ? '1rem 1rem 0 auto' : '2rem 3rem 0 auto',\n);\n\nexport const TUI_ALERTS = tuiCreateToken(\n new BehaviorSubject<ReadonlyArray<TuiPopover<any, any>>>([]),\n);\n\n/**\n * Grouping alerts by their component\n */\nexport const TUI_ALERTS_GROUPED = tuiCreateTokenFromFactory(() =>\n combineLatest([\n of(new Map<Type<any>, ReadonlyArray<TuiPopover<any, any>>>()),\n inject(TUI_ALERTS),\n ]).pipe(\n map(([map, alerts]) => {\n map.forEach((_, key) => map.set(key, []));\n\n alerts.forEach((alert) => {\n const key = alert.component.component;\n const value = map.get(key) || [];\n\n map.set(key, [...value, alert]);\n });\n\n return Array.from(map.values());\n }),\n ),\n);\n","import {NgIf} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {takeUntilDestroyed, toSignal} from '@angular/core/rxjs-interop';\nimport type {TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiFadeIn, tuiHeightCollapse, tuiSlideIn} from '@taiga-ui/core/animations';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiNotification} from '@taiga-ui/core/components/notification';\nimport {TuiTitle} from '@taiga-ui/core/directives/title';\nimport {\n TUI_ANIMATIONS_SPEED,\n TUI_CLOSE_WORD,\n TUI_COMMON_ICONS,\n} from '@taiga-ui/core/tokens';\nimport {tuiToAnimationOptions} from '@taiga-ui/core/utils';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {EMPTY, fromEvent, of, repeat, switchMap, takeUntil, timer} from 'rxjs';\n\nimport type {TuiAlertOptions} from './alert.interfaces';\nimport {TUI_ALERT_POSITION} from './alert.tokens';\n\n@Component({\n standalone: true,\n selector: 'tui-alert',\n imports: [NgIf, PolymorpheusOutlet, TuiButton, TuiNotification, TuiTitle],\n templateUrl: './alert.template.html',\n styleUrls: ['./alert.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiFadeIn, tuiSlideIn, tuiHeightCollapse],\n host: {\n role: 'alert',\n '[style.margin]': 'position',\n '[@tuiFadeIn]': 'options',\n '[@tuiSlideIn]': 'animation',\n '[@tuiHeightCollapse]': 'animation',\n },\n})\nexport class TuiAlertComponent<O, I> {\n private readonly el = tuiInjectElement();\n\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly options = tuiToAnimationOptions(inject(TUI_ANIMATIONS_SPEED));\n protected readonly close = toSignal(inject(TUI_CLOSE_WORD));\n protected readonly position = inject(TUI_ALERT_POSITION);\n protected readonly item = injectContext<TuiPopover<TuiAlertOptions<I>, O>>();\n\n protected readonly animation = this.position.endsWith('auto')\n ? {...this.options, value: 'right'}\n : {...this.options, value: 'left'};\n\n protected readonly sub = of(\n typeof this.item.autoClose === 'function'\n ? this.item.autoClose(this.item.appearance)\n : this.item.autoClose,\n )\n .pipe(\n switchMap((autoClose) => (autoClose ? timer(autoClose) : EMPTY)),\n takeUntil(fromEvent(this.el, 'mouseenter')),\n repeat({delay: () => fromEvent(this.el, 'mouseleave')}),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.item.$implicit.complete());\n}\n","<tui-notification\n size=\"m\"\n [appearance]=\"item.appearance\"\n [icon]=\"item.icon\"\n>\n <span tuiTitle>\n <ng-container *polymorpheusOutlet=\"item.label as text; context: item\">\n {{ text }}\n </ng-container>\n <span tuiSubtitle>\n <span\n *polymorpheusOutlet=\"item.content as text; context: item\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n </span>\n <button\n *ngIf=\"item.closeable\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"icons.close\"\n (click)=\"item.$implicit.complete()\"\n >\n {{ close() }}\n </button>\n</tui-notification>\n","import {inject, Injectable} from '@angular/core';\nimport {TuiPopoverService} from '@taiga-ui/cdk/services';\n\nimport {TuiAlertComponent} from './alert.component';\nimport type {TuiAlertOptions} from './alert.interfaces';\nimport {TUI_ALERT_OPTIONS, TUI_ALERTS} from './alert.tokens';\n\n@Injectable({\n providedIn: 'root',\n useFactory: () =>\n new TuiAlertService(TUI_ALERTS, TuiAlertComponent, inject(TUI_ALERT_OPTIONS)),\n})\nexport class TuiAlertService extends TuiPopoverService<TuiAlertOptions<any>> {}\n","import {Directive} from '@angular/core';\nimport {TuiPopoverDirective} from '@taiga-ui/cdk/directives/popover';\nimport {tuiAsPopover} from '@taiga-ui/cdk/services';\n\nimport type {TuiAlertOptions} from './alert.interfaces';\nimport {TuiAlertService} from './alert.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiAlert]',\n inputs: ['options: tuiAlertOptions', 'open: tuiAlert'],\n outputs: ['openChange: tuiAlertChange'],\n providers: [tuiAsPopover(TuiAlertService)],\n})\nexport class TuiAlert<T> extends TuiPopoverDirective<TuiAlertOptions<T>> {}\n","import {CommonModule} from '@angular/common';\nimport type {Type} from '@angular/core';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n INJECTOR,\n Injector,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiMapperPipe} from '@taiga-ui/cdk/pipes/mapper';\nimport type {TuiMapper} from '@taiga-ui/cdk/types';\nimport {tuiParentAnimation} from '@taiga-ui/core/animations';\n// eslint-disable-next-line no-restricted-imports\nimport {POLYMORPHEUS_CONTEXT} from '@taiga-ui/polymorpheus';\nimport {identity} from 'rxjs';\n\nimport {TUI_ALERTS_GROUPED} from './alert.tokens';\n\n@Component({\n standalone: true,\n selector: 'tui-alerts',\n imports: [CommonModule, TuiMapperPipe],\n templateUrl: './alerts.template.html',\n styleUrls: ['./alerts.style.less'],\n encapsulation: ViewEncapsulation.None,\n // So that we do not force OnPush on custom alerts\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n animations: [tuiParentAnimation],\n})\nexport class TuiAlerts {\n private readonly injector = inject(INJECTOR);\n\n protected readonly alerts$ = inject(TUI_ALERTS_GROUPED);\n protected readonly trackBy = identity;\n protected readonly mapper: TuiMapper<[Type<any>], Injector> = (useValue) =>\n Injector.create({\n providers: [\n {\n provide: POLYMORPHEUS_CONTEXT,\n useValue,\n },\n ],\n parent: this.injector,\n });\n}\n","<div\n *ngFor=\"let group of alerts$ | async; trackBy: trackBy\"\n class=\"t-wrapper\"\n @tuiParentAnimation\n>\n <ng-container\n *ngFor=\"let item of group\"\n [ngComponentOutlet]=\"item.component.component\"\n [ngComponentOutletInjector]=\"item | tuiMapper: mapper\"\n />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAaa,MAAA,yBAAyB,GAAiD;AACnF,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,IAAI,EAAE,SAAS;EACjB;MAEW,iBAAiB,GAAG,yBAAyB,CAAkB,OAAO;AAC/E,IAAA,GAAG,yBAAyB;IAC5B,GAAG,MAAM,CAAC,wBAAwB,CAAC;AACtC,CAAA,CAAC,EAAE;MAES,kBAAk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,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;4FAEvB,SAAS,EAAA,UAAA,EAAA,CAAA;kBAZrB,SAAS;AACM,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,YACN,YAAY,EAAA,OAAA,EACb,CAAC,YAAY,EAAE,aAAa,CAAC,EAAA,aAAA,EAGvB,iBAAiB,CAAC,IAAI,mBAGpB,uBAAuB,CAAC,OAAO,EACpC,UAAA,EAAA,CAAC,kBAAkB,CAAC,EAAA,QAAA,EAAA,iUAAA,EAAA,MAAA,EAAA,CAAA,0LAAA,CAAA,EAAA,CAAA;;;AE7BpC;;AAEG;;;;"}
|
|
@@ -17,13 +17,13 @@ function tuiButtonOptionsProvider(options) {
|
|
|
17
17
|
|
|
18
18
|
class TuiButtonStyles {
|
|
19
19
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiButtonStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
20
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiButtonStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-button" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiButton],[tuiIconButton]{--t-size: var(--tui-height-l);--t-radius: var(--tui-radius-l);--t-gap: .25rem;--t-padding: 0 1.25rem;--t-margin: -.25rem;-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;position:relative;display:inline-flex;align-items:center;flex-shrink:0;box-sizing:border-box;white-space:nowrap;overflow:hidden;vertical-align:middle;max-
|
|
20
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiButtonStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-button" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiButton],[tuiIconButton]{--t-size: var(--tui-height-l);--t-radius: var(--tui-radius-l);--t-gap: .25rem;--t-padding: 0 1.25rem;--t-margin: -.25rem;-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;position:relative;display:inline-flex;align-items:center;flex-shrink:0;box-sizing:border-box;white-space:nowrap;overflow:hidden;vertical-align:middle;max-inline-size:100%;gap:calc(var(--t-gap, var(--t-0, 0rem)) - 2 * var(--t-margin, 0rem));block-size:var(--t-size);justify-content:center;border-radius:var(--t-radius);padding:var(--t-padding);-webkit-user-select:none;user-select:none;cursor:pointer;font:var(--tui-font-text-m);font-weight:700}[tuiButton]>img,[tuiIconButton]>img,[tuiButton]>tui-svg,[tuiIconButton]>tui-svg,[tuiButton]>tui-icon,[tuiIconButton]>tui-icon,[tuiButton]>tui-avatar,[tuiIconButton]>tui-avatar,[tuiButton]>tui-badge,[tuiIconButton]>tui-badge,[tuiButton]>[tuiBadge],[tuiIconButton]>[tuiBadge],[tuiButton]>[tuiRadio],[tuiIconButton]>[tuiRadio],[tuiButton]>[tuiSwitch],[tuiIconButton]>[tuiSwitch],[tuiButton]>[tuiCheckbox],[tuiIconButton]>[tuiCheckbox],[tuiButton][tuiIcons]:before,[tuiIconButton][tuiIcons]:before,[tuiButton][tuiIcons]:after,[tuiIconButton][tuiIcons]:after{margin:var(--t-margin)}[tuiButton]>.t-loader,[tuiIconButton]>.t-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}[tuiButton]>.t-loader .t-text,[tuiIconButton]>.t-loader .t-text{position:absolute}[tuiButton][data-size=xs],[tuiIconButton][data-size=xs]{--t-size: var(--tui-height-xs);--t-radius: var(--tui-radius-xs);--t-gap: .125rem;--t-padding: 0 .375rem;--t-margin: -.125rem;font:var(--tui-font-text-s)}[tuiButton][data-size=xs] tui-svg,[tuiIconButton][data-size=xs] tui-svg,[tuiButton][data-size=xs] tui-icon,[tuiIconButton][data-size=xs] tui-icon,[tuiButton][data-size=xs]:before,[tuiIconButton][data-size=xs]:before{font-size:1rem}[tuiButton][data-size=s],[tuiIconButton][data-size=s]{--t-size: var(--tui-height-s);--t-radius: var(--tui-radius-s);--t-gap: .125rem;--t-padding: 0 .625rem;--t-margin: -.125rem;font:var(--tui-font-text-s)}[tuiButton][data-size=s] tui-svg,[tuiIconButton][data-size=s] tui-svg,[tuiButton][data-size=s] tui-icon,[tuiIconButton][data-size=s] tui-icon,[tuiButton][data-size=s]:not([tuiIconButton][data-appearance=icon]):not([tuiIconButton][data-appearance=link]):before,[tuiIconButton][data-size=s]:not([tuiIconButton][data-appearance=icon]):not([tuiIconButton][data-appearance=link]):before{font-size:1rem}[tuiButton][data-size=m],[tuiIconButton][data-size=m]{--t-size: var(--tui-height-m);--t-radius: var(--tui-radius-m);--t-gap: .125rem;--t-padding: 0 1rem;--t-margin: -.375rem;font:var(--tui-font-text-m);font-weight:700}[tuiButton][data-size=m]:after,[tuiIconButton][data-size=m]:after{margin-inline-end:-.125rem}[tuiButton]._loading,[tuiIconButton]._loading{--tui-disabled-opacity: 1;-webkit-text-fill-color:transparent}[tuiButton]._loading>*,[tuiIconButton]._loading>*,[tuiButton]._loading:before,[tuiIconButton]._loading:before,[tuiButton]._loading:after,[tuiIconButton]._loading:after{opacity:0}[tuiButton]._loading>.t-loader,[tuiIconButton]._loading>.t-loader{opacity:1}[tuiButton][tuiIcons]:after,[tuiIconButton][tuiIcons]:after{font-size:1rem}[tuiButton][tuiButtonVertical],[tuiIconButton][tuiButtonVertical]{--t-line-height: 1rem;--t-margin: var(--t-0, 0rem) !important;flex-direction:column;flex-shrink:1;block-size:auto;padding:.75rem;gap:.375rem;min-inline-size:5rem;white-space:pre-line;font:var(--tui-font-text-ui-s)}[tuiButton][tuiButtonVertical]>*,[tuiIconButton][tuiButtonVertical]>*{max-block-size:calc(var(--t-line-height) * 2)}[tuiIconButton]{gap:0;inline-size:var(--t-size);font-size:0!important;padding:0}[tuiIconButton][data-size=l]:after{margin:0}[tuiIconButton][tuiIconButton][style*=\"--t-icon-start:\"]:after{display:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
21
21
|
}
|
|
22
22
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiButtonStyles, decorators: [{
|
|
23
23
|
type: Component,
|
|
24
24
|
args: [{ standalone: true, template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
25
25
|
class: 'tui-button',
|
|
26
|
-
}, styles: ["[tuiButton],[tuiIconButton]{--t-size: var(--tui-height-l);--t-radius: var(--tui-radius-l);--t-gap: .25rem;--t-padding: 0 1.25rem;--t-margin: -.25rem;-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;position:relative;display:inline-flex;align-items:center;flex-shrink:0;box-sizing:border-box;white-space:nowrap;overflow:hidden;vertical-align:middle;max-
|
|
26
|
+
}, styles: ["[tuiButton],[tuiIconButton]{--t-size: var(--tui-height-l);--t-radius: var(--tui-radius-l);--t-gap: .25rem;--t-padding: 0 1.25rem;--t-margin: -.25rem;-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;position:relative;display:inline-flex;align-items:center;flex-shrink:0;box-sizing:border-box;white-space:nowrap;overflow:hidden;vertical-align:middle;max-inline-size:100%;gap:calc(var(--t-gap, var(--t-0, 0rem)) - 2 * var(--t-margin, 0rem));block-size:var(--t-size);justify-content:center;border-radius:var(--t-radius);padding:var(--t-padding);-webkit-user-select:none;user-select:none;cursor:pointer;font:var(--tui-font-text-m);font-weight:700}[tuiButton]>img,[tuiIconButton]>img,[tuiButton]>tui-svg,[tuiIconButton]>tui-svg,[tuiButton]>tui-icon,[tuiIconButton]>tui-icon,[tuiButton]>tui-avatar,[tuiIconButton]>tui-avatar,[tuiButton]>tui-badge,[tuiIconButton]>tui-badge,[tuiButton]>[tuiBadge],[tuiIconButton]>[tuiBadge],[tuiButton]>[tuiRadio],[tuiIconButton]>[tuiRadio],[tuiButton]>[tuiSwitch],[tuiIconButton]>[tuiSwitch],[tuiButton]>[tuiCheckbox],[tuiIconButton]>[tuiCheckbox],[tuiButton][tuiIcons]:before,[tuiIconButton][tuiIcons]:before,[tuiButton][tuiIcons]:after,[tuiIconButton][tuiIcons]:after{margin:var(--t-margin)}[tuiButton]>.t-loader,[tuiIconButton]>.t-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}[tuiButton]>.t-loader .t-text,[tuiIconButton]>.t-loader .t-text{position:absolute}[tuiButton][data-size=xs],[tuiIconButton][data-size=xs]{--t-size: var(--tui-height-xs);--t-radius: var(--tui-radius-xs);--t-gap: .125rem;--t-padding: 0 .375rem;--t-margin: -.125rem;font:var(--tui-font-text-s)}[tuiButton][data-size=xs] tui-svg,[tuiIconButton][data-size=xs] tui-svg,[tuiButton][data-size=xs] tui-icon,[tuiIconButton][data-size=xs] tui-icon,[tuiButton][data-size=xs]:before,[tuiIconButton][data-size=xs]:before{font-size:1rem}[tuiButton][data-size=s],[tuiIconButton][data-size=s]{--t-size: var(--tui-height-s);--t-radius: var(--tui-radius-s);--t-gap: .125rem;--t-padding: 0 .625rem;--t-margin: -.125rem;font:var(--tui-font-text-s)}[tuiButton][data-size=s] tui-svg,[tuiIconButton][data-size=s] tui-svg,[tuiButton][data-size=s] tui-icon,[tuiIconButton][data-size=s] tui-icon,[tuiButton][data-size=s]:not([tuiIconButton][data-appearance=icon]):not([tuiIconButton][data-appearance=link]):before,[tuiIconButton][data-size=s]:not([tuiIconButton][data-appearance=icon]):not([tuiIconButton][data-appearance=link]):before{font-size:1rem}[tuiButton][data-size=m],[tuiIconButton][data-size=m]{--t-size: var(--tui-height-m);--t-radius: var(--tui-radius-m);--t-gap: .125rem;--t-padding: 0 1rem;--t-margin: -.375rem;font:var(--tui-font-text-m);font-weight:700}[tuiButton][data-size=m]:after,[tuiIconButton][data-size=m]:after{margin-inline-end:-.125rem}[tuiButton]._loading,[tuiIconButton]._loading{--tui-disabled-opacity: 1;-webkit-text-fill-color:transparent}[tuiButton]._loading>*,[tuiIconButton]._loading>*,[tuiButton]._loading:before,[tuiIconButton]._loading:before,[tuiButton]._loading:after,[tuiIconButton]._loading:after{opacity:0}[tuiButton]._loading>.t-loader,[tuiIconButton]._loading>.t-loader{opacity:1}[tuiButton][tuiIcons]:after,[tuiIconButton][tuiIcons]:after{font-size:1rem}[tuiButton][tuiButtonVertical],[tuiIconButton][tuiButtonVertical]{--t-line-height: 1rem;--t-margin: var(--t-0, 0rem) !important;flex-direction:column;flex-shrink:1;block-size:auto;padding:.75rem;gap:.375rem;min-inline-size:5rem;white-space:pre-line;font:var(--tui-font-text-ui-s)}[tuiButton][tuiButtonVertical]>*,[tuiIconButton][tuiButtonVertical]>*{max-block-size:calc(var(--t-line-height) * 2)}[tuiIconButton]{gap:0;inline-size:var(--t-size);font-size:0!important;padding:0}[tuiIconButton][data-size=l]:after{margin:0}[tuiIconButton][tuiIconButton][style*=\"--t-icon-start:\"]:after{display:none}\n"] }]
|
|
27
27
|
}] });
|
|
28
28
|
class TuiButton {
|
|
29
29
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-button.mjs","sources":["../../../projects/core/components/button/button.options.ts","../../../projects/core/components/button/button.directive.ts","../../../projects/core/components/button/taiga-ui-core-components-button.ts"],"sourcesContent":["import type {FactoryProvider} from '@angular/core';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport type {TuiAppearanceOptions} from '@taiga-ui/core/directives/appearance';\nimport type {TuiSizeXL, TuiSizeXS} from '@taiga-ui/core/types';\n\nexport interface TuiButtonOptions extends TuiAppearanceOptions {\n readonly size: TuiSizeXL | TuiSizeXS;\n}\n\nexport const TUI_BUTTON_DEFAULT_OPTIONS: TuiButtonOptions = {\n appearance: 'primary',\n size: 'l',\n};\n\nexport const TUI_BUTTON_OPTIONS = tuiCreateToken(TUI_BUTTON_DEFAULT_OPTIONS);\n\nexport function tuiButtonOptionsProvider(\n options: Partial<TuiButtonOptions>,\n): FactoryProvider {\n return tuiProvideOptions(TUI_BUTTON_OPTIONS, options, TUI_BUTTON_DEFAULT_OPTIONS);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n tuiAppearanceOptionsProvider,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {TuiWithIcons} from '@taiga-ui/core/directives/icons';\n\nimport {TUI_BUTTON_OPTIONS} from './button.options';\n\n@Component({\n standalone: true,\n template: '',\n styles: ['@import \"@taiga-ui/core/styles/components/button.less\";'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-button',\n },\n})\nclass TuiButtonStyles {}\n\n@Directive({\n standalone: true,\n selector: 'a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]',\n providers: [tuiAppearanceOptionsProvider(TUI_BUTTON_OPTIONS)],\n hostDirectives: [TuiWithAppearance, TuiWithIcons],\n host: {\n '[attr.data-size]': 'size',\n },\n})\nexport class TuiButton {\n private readonly options = inject(TUI_BUTTON_OPTIONS);\n\n protected readonly nothing = tuiWithStyles(TuiButtonStyles);\n\n @Input()\n public size = this.options.size;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AASa,MAAA,0BAA0B,GAAqB;AACxD,IAAA,UAAU,EAAE,SAAS;AACrB,IAAA,IAAI,EAAE,GAAG;EACX;MAEW,kBAAkB,GAAG,cAAc,CAAC,0BAA0B,EAAE;AAEvE,SAAU,wBAAwB,CACpC,OAAkC,EAAA;IAElC,OAAO,iBAAiB,CAAC,kBAAkB,EAAE,OAAO,EAAE,0BAA0B,CAAC,CAAC;AACtF;;ACHA,MAUM,eAAe,CAAA;+GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,eAAe,gHARP,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-button.mjs","sources":["../../../projects/core/components/button/button.options.ts","../../../projects/core/components/button/button.directive.ts","../../../projects/core/components/button/taiga-ui-core-components-button.ts"],"sourcesContent":["import type {FactoryProvider} from '@angular/core';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport type {TuiAppearanceOptions} from '@taiga-ui/core/directives/appearance';\nimport type {TuiSizeXL, TuiSizeXS} from '@taiga-ui/core/types';\n\nexport interface TuiButtonOptions extends TuiAppearanceOptions {\n readonly size: TuiSizeXL | TuiSizeXS;\n}\n\nexport const TUI_BUTTON_DEFAULT_OPTIONS: TuiButtonOptions = {\n appearance: 'primary',\n size: 'l',\n};\n\nexport const TUI_BUTTON_OPTIONS = tuiCreateToken(TUI_BUTTON_DEFAULT_OPTIONS);\n\nexport function tuiButtonOptionsProvider(\n options: Partial<TuiButtonOptions>,\n): FactoryProvider {\n return tuiProvideOptions(TUI_BUTTON_OPTIONS, options, TUI_BUTTON_DEFAULT_OPTIONS);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n tuiAppearanceOptionsProvider,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {TuiWithIcons} from '@taiga-ui/core/directives/icons';\n\nimport {TUI_BUTTON_OPTIONS} from './button.options';\n\n@Component({\n standalone: true,\n template: '',\n styles: ['@import \"@taiga-ui/core/styles/components/button.less\";'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-button',\n },\n})\nclass TuiButtonStyles {}\n\n@Directive({\n standalone: true,\n selector: 'a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]',\n providers: [tuiAppearanceOptionsProvider(TUI_BUTTON_OPTIONS)],\n hostDirectives: [TuiWithAppearance, TuiWithIcons],\n host: {\n '[attr.data-size]': 'size',\n },\n})\nexport class TuiButton {\n private readonly options = inject(TUI_BUTTON_OPTIONS);\n\n protected readonly nothing = tuiWithStyles(TuiButtonStyles);\n\n @Input()\n public size = this.options.size;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AASa,MAAA,0BAA0B,GAAqB;AACxD,IAAA,UAAU,EAAE,SAAS;AACrB,IAAA,IAAI,EAAE,GAAG;EACX;MAEW,kBAAkB,GAAG,cAAc,CAAC,0BAA0B,EAAE;AAEvE,SAAU,wBAAwB,CACpC,OAAkC,EAAA;IAElC,OAAO,iBAAiB,CAAC,kBAAkB,EAAE,OAAO,EAAE,0BAA0B,CAAC,CAAC;AACtF;;ACHA,MAUM,eAAe,CAAA;+GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,eAAe,gHARP,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,ozHAAA,CAAA,EAAA,eAAA,EAAA,EAAA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oBAAA,QAAQ,EAAE,uEAAuE;AACjF,oBAAA,SAAS,EAAE,CAAC,4BAA4B,CAAC,kBAAkB,CAAC,CAAC;AAC7D,oBAAA,cAAc,EAAE,CAAC,iBAAiB,EAAE,YAAY,CAAC;AACjD,oBAAA,IAAI,EAAE;AACF,wBAAA,kBAAkB,EAAE,MAAM;AAC7B,qBAAA;AACJ,iBAAA,CAAA;8BAOU,IAAI,EAAA,CAAA;sBADV,KAAK;;;AC3CV;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i1 from '@angular/common';
|
|
2
|
-
import { CommonModule,
|
|
2
|
+
import { CommonModule, AsyncPipe, NgIf } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { inject, EventEmitter, Component, ChangeDetectionStrategy, Input, Output } from '@angular/core';
|
|
5
5
|
import { TUI_FALSE_HANDLER } from '@taiga-ui/cdk/constants';
|
|
@@ -105,21 +105,21 @@ class TuiCalendarSheet {
|
|
|
105
105
|
this.hoveredItemChange.emit(day);
|
|
106
106
|
}
|
|
107
107
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiCalendarSheet, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
108
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiCalendarSheet, isStandalone: true, selector: "tui-calendar-sheet", inputs: { month: "month", disabledItemHandler: "disabledItemHandler", markerHandler: "markerHandler", value: "value", hoveredItem: "hoveredItem", showAdjacent: "showAdjacent" }, outputs: { hoveredItemChange: "hoveredItemChange", dayClick: "dayClick" }, host: { properties: { "class._single": "isSingleDayRange" } }, ngImport: i0, template: "<div class=\"t-row t-row_weekday\">\n <div\n *ngFor=\"let day of unorderedWeekDays$ | tuiOrderWeekDays | async\"\n class=\"t-cell\"\n [textContent]=\"day\"\n ></div>\n</div>\n<div *tuiLet=\"month | tuiCalendarSheet: true as sheet\">\n <div\n *tuiRepeatTimes=\"let rowIndex of sheet.length\"\n automation-id=\"tui-calendar-sheet__row\"\n class=\"t-row\"\n >\n <ng-container *tuiRepeatTimes=\"let colIndex of sheet[rowIndex]?.length || 0\">\n <ng-container *tuiLet=\"sheet[rowIndex]?.[colIndex] as item\">\n <div\n *ngIf=\"item && (!itemIsUnavailable(item) || showAdjacent)\"\n automation-id=\"tui-calendar-sheet__cell\"\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"disabledItemHandler(item)\"\n [class.t-cell_interval]=\"itemIsInterval(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n [class.t-cell_unavailable]=\"itemIsUnavailable(item)\"\n (click)=\"onItemClick(item)\"\n (tuiHoveredChange)=\"onItemHovered($event && item)\"\n >\n <div\n automation-id=\"tui-calendar-sheet__item\"\n class=\"t-item\"\n [attr.data-type]=\"item | tuiMapper: dayTypeHandler\"\n [class.t-item_unavailable]=\"itemIsUnavailable(item)\"\n >\n {{ item.day }}\n <div\n *ngIf=\"\n item\n | tuiMapper\n : toMarkers\n : itemIsToday(item)\n : !!getItemRange(item)\n : markerHandler as markers\n \"\n class=\"t-dots\"\n >\n <div\n class=\"t-dot\"\n [style.background]=\"markers?.[0]\"\n ></div>\n <div\n *ngIf=\"markers.length > 1\"\n class=\"t-dot\"\n [style.background]=\"markers?.[1] || ''\"\n ></div>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n </div>\n</div>\n", styles: [":host{display:block;font:var(--tui-font-text-m)}.t-row{position:relative;display:flex;justify-content:space-between;
|
|
108
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiCalendarSheet, isStandalone: true, selector: "tui-calendar-sheet", inputs: { month: "month", disabledItemHandler: "disabledItemHandler", markerHandler: "markerHandler", value: "value", hoveredItem: "hoveredItem", showAdjacent: "showAdjacent" }, outputs: { hoveredItemChange: "hoveredItemChange", dayClick: "dayClick" }, host: { properties: { "class._single": "isSingleDayRange" } }, ngImport: i0, template: "<div class=\"t-row t-row_weekday\">\n <div\n *ngFor=\"let day of unorderedWeekDays$ | tuiOrderWeekDays | async\"\n class=\"t-cell\"\n [textContent]=\"day\"\n ></div>\n</div>\n<div *tuiLet=\"month | tuiCalendarSheet: true as sheet\">\n <div\n *tuiRepeatTimes=\"let rowIndex of sheet.length\"\n automation-id=\"tui-calendar-sheet__row\"\n class=\"t-row\"\n >\n <ng-container *tuiRepeatTimes=\"let colIndex of sheet[rowIndex]?.length || 0\">\n <ng-container *tuiLet=\"sheet[rowIndex]?.[colIndex] as item\">\n <div\n *ngIf=\"item && (!itemIsUnavailable(item) || showAdjacent)\"\n automation-id=\"tui-calendar-sheet__cell\"\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"disabledItemHandler(item)\"\n [class.t-cell_interval]=\"itemIsInterval(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n [class.t-cell_unavailable]=\"itemIsUnavailable(item)\"\n (click)=\"onItemClick(item)\"\n (tuiHoveredChange)=\"onItemHovered($event && item)\"\n >\n <div\n automation-id=\"tui-calendar-sheet__item\"\n class=\"t-item\"\n [attr.data-type]=\"item | tuiMapper: dayTypeHandler\"\n [class.t-item_unavailable]=\"itemIsUnavailable(item)\"\n >\n {{ item.day }}\n <div\n *ngIf=\"\n item\n | tuiMapper\n : toMarkers\n : itemIsToday(item)\n : !!getItemRange(item)\n : markerHandler as markers\n \"\n class=\"t-dots\"\n >\n <div\n class=\"t-dot\"\n [style.background]=\"markers?.[0]\"\n ></div>\n <div\n *ngIf=\"markers.length > 1\"\n class=\"t-dot\"\n [style.background]=\"markers?.[1] || ''\"\n ></div>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n </div>\n</div>\n", styles: [":host{display:block;font:var(--tui-font-text-m)}.t-row{position:relative;display:flex;justify-content:space-between;block-size:2.25rem;isolation:isolate}.t-item{position:relative;flex:1;line-height:2rem;border-radius:var(--tui-radius-m)}.t-item:before,.t-item:after{position:absolute;top:0;left:0;bottom:0;right:0;content:\"\";z-index:-1;border-radius:var(--tui-radius-m)}.t-item:after{border-radius:.5rem}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;inline-size:2.25rem;text-align:center;outline:none;cursor:pointer;background-clip:content-box;box-sizing:border-box;border:.125rem solid transparent}.t-cell:before{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;border-radius:var(--tui-radius-m)}.t-cell_today:after{position:absolute;left:50%;transform:translate(-50%);content:\"\";bottom:.3125rem;block-size:.125rem;inline-size:.75rem;border-radius:.375rem;background:var(--tui-text-primary)}.t-cell_interval:before{background:var(--tui-background-base-alt)}:host._single .t-cell_interval:before{background:var(--tui-background-neutral-1-hover)}.t-cell_interval:not(:last-child):before{right:-.1875rem;border-start-end-radius:0;border-end-end-radius:0}.t-cell_interval:not([data-range=start]):not(:first-child):before{border-start-start-radius:0;border-end-start-radius:0}.t-cell_interval:last-child:first-child:before{right:0}.t-cell_interval:first-child>.t-item{border-start-start-radius:var(--tui-radius-m);border-end-start-radius:var(--tui-radius-m)}.t-cell_interval:last-child>.t-item{border-start-end-radius:var(--tui-radius-m);border-end-end-radius:var(--tui-radius-m)}.t-cell_interval>.t-item{border-radius:0}.t-cell[data-range]:after{background:var(--tui-text-primary-on-accent-1)}.t-cell[data-range]>.t-item{color:var(--tui-text-primary-on-accent-1)}.t-cell[data-range]>.t-item:before,.t-cell[data-range]>.t-item:after{background:var(--tui-background-accent-1)}.t-cell[data-range]:hover>.t-item:before,.t-cell[data-range]:hover>.t-item:after{background:var(--tui-background-accent-1-hover)}.t-cell[data-range]:active>.t-item:before,.t-cell[data-range]:active>.t-item:after{background:var(--tui-background-accent-1-pressed)}.t-cell[data-range=end]:before{background:var(--tui-background-base-alt)}:host._single .t-cell[data-range=end]:before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=end]:not(:first-child):before{border-start-start-radius:0;border-end-start-radius:0}.t-cell[data-range=end]>.t-item:before{left:.625rem;border-start-start-radius:0;border-end-start-radius:0}.t-cell[data-range=end]>.t-item:after{left:-2rem;right:100%;transform:translate(1.6rem) scaleY(.83) scaleX(.5) rotate(45deg)}.t-cell[data-range=start]>.t-item:before{right:.625rem;border-start-end-radius:0;border-end-end-radius:0}.t-cell[data-range=start]>.t-item:after{left:100%;right:-2rem;transform:translate(-1.6rem) scaleY(.83) scaleX(.5) rotate(45deg)}.t-cell[data-range=single]>.t-item:after{display:none}.t-cell_disabled{pointer-events:none}.t-cell_disabled>.t-item{opacity:.36}.t-cell:hover:not([data-range])>.t-item{background:var(--tui-background-neutral-1-hover)}.t-cell:active:not([data-range])>.t-item{background:var(--tui-background-neutral-1-pressed)}:host{inline-size:15.75rem}[data-type=weekday]{color:var(--tui-text-primary)}[data-type=weekend]{color:var(--tui-text-negative)}.t-row{justify-content:flex-start}.t-row:first-child{justify-content:flex-end}.t-row_weekday{font:var(--tui-font-text-s);color:var(--tui-text-secondary);pointer-events:none}.t-item{display:flex;flex-direction:column}.t-item_unavailable{opacity:var(--tui-disabled-opacity)}.t-dots{display:flex;justify-content:center;margin-top:-.5rem;padding-bottom:.25rem}.t-dot{display:inline-block;inline-size:.25rem;block-size:.25rem;border-radius:100%;margin:0 .0625rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: TuiCalendarSheetPipe, name: "tuiCalendarSheet" }, { kind: "directive", type: TuiHovered, selector: "[tuiHoveredChange]", outputs: ["tuiHoveredChange"] }, { kind: "directive", type: TuiLet, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "pipe", type: TuiMapperPipe, name: "tuiMapper" }, { kind: "pipe", type: TuiOrderWeekDaysPipe, name: "tuiOrderWeekDays" }, { kind: "directive", type: TuiRepeatTimes, selector: "[tuiRepeatTimes][tuiRepeatTimesOf]", inputs: ["tuiRepeatTimesOf"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
109
109
|
}
|
|
110
110
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiCalendarSheet, decorators: [{
|
|
111
111
|
type: Component,
|
|
112
112
|
args: [{ standalone: true, selector: 'tui-calendar-sheet', imports: [
|
|
113
113
|
CommonModule,
|
|
114
|
+
TuiCalendarSheetPipe,
|
|
115
|
+
TuiHovered,
|
|
114
116
|
TuiLet,
|
|
115
117
|
TuiMapperPipe,
|
|
116
|
-
TuiRepeatTimes,
|
|
117
|
-
TuiHovered,
|
|
118
|
-
TuiCalendarSheetPipe,
|
|
119
118
|
TuiOrderWeekDaysPipe,
|
|
119
|
+
TuiRepeatTimes,
|
|
120
120
|
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
121
121
|
'[class._single]': 'isSingleDayRange',
|
|
122
|
-
}, template: "<div class=\"t-row t-row_weekday\">\n <div\n *ngFor=\"let day of unorderedWeekDays$ | tuiOrderWeekDays | async\"\n class=\"t-cell\"\n [textContent]=\"day\"\n ></div>\n</div>\n<div *tuiLet=\"month | tuiCalendarSheet: true as sheet\">\n <div\n *tuiRepeatTimes=\"let rowIndex of sheet.length\"\n automation-id=\"tui-calendar-sheet__row\"\n class=\"t-row\"\n >\n <ng-container *tuiRepeatTimes=\"let colIndex of sheet[rowIndex]?.length || 0\">\n <ng-container *tuiLet=\"sheet[rowIndex]?.[colIndex] as item\">\n <div\n *ngIf=\"item && (!itemIsUnavailable(item) || showAdjacent)\"\n automation-id=\"tui-calendar-sheet__cell\"\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"disabledItemHandler(item)\"\n [class.t-cell_interval]=\"itemIsInterval(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n [class.t-cell_unavailable]=\"itemIsUnavailable(item)\"\n (click)=\"onItemClick(item)\"\n (tuiHoveredChange)=\"onItemHovered($event && item)\"\n >\n <div\n automation-id=\"tui-calendar-sheet__item\"\n class=\"t-item\"\n [attr.data-type]=\"item | tuiMapper: dayTypeHandler\"\n [class.t-item_unavailable]=\"itemIsUnavailable(item)\"\n >\n {{ item.day }}\n <div\n *ngIf=\"\n item\n | tuiMapper\n : toMarkers\n : itemIsToday(item)\n : !!getItemRange(item)\n : markerHandler as markers\n \"\n class=\"t-dots\"\n >\n <div\n class=\"t-dot\"\n [style.background]=\"markers?.[0]\"\n ></div>\n <div\n *ngIf=\"markers.length > 1\"\n class=\"t-dot\"\n [style.background]=\"markers?.[1] || ''\"\n ></div>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n </div>\n</div>\n", styles: [":host{display:block;font:var(--tui-font-text-m)}.t-row{position:relative;display:flex;justify-content:space-between;
|
|
122
|
+
}, template: "<div class=\"t-row t-row_weekday\">\n <div\n *ngFor=\"let day of unorderedWeekDays$ | tuiOrderWeekDays | async\"\n class=\"t-cell\"\n [textContent]=\"day\"\n ></div>\n</div>\n<div *tuiLet=\"month | tuiCalendarSheet: true as sheet\">\n <div\n *tuiRepeatTimes=\"let rowIndex of sheet.length\"\n automation-id=\"tui-calendar-sheet__row\"\n class=\"t-row\"\n >\n <ng-container *tuiRepeatTimes=\"let colIndex of sheet[rowIndex]?.length || 0\">\n <ng-container *tuiLet=\"sheet[rowIndex]?.[colIndex] as item\">\n <div\n *ngIf=\"item && (!itemIsUnavailable(item) || showAdjacent)\"\n automation-id=\"tui-calendar-sheet__cell\"\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"disabledItemHandler(item)\"\n [class.t-cell_interval]=\"itemIsInterval(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n [class.t-cell_unavailable]=\"itemIsUnavailable(item)\"\n (click)=\"onItemClick(item)\"\n (tuiHoveredChange)=\"onItemHovered($event && item)\"\n >\n <div\n automation-id=\"tui-calendar-sheet__item\"\n class=\"t-item\"\n [attr.data-type]=\"item | tuiMapper: dayTypeHandler\"\n [class.t-item_unavailable]=\"itemIsUnavailable(item)\"\n >\n {{ item.day }}\n <div\n *ngIf=\"\n item\n | tuiMapper\n : toMarkers\n : itemIsToday(item)\n : !!getItemRange(item)\n : markerHandler as markers\n \"\n class=\"t-dots\"\n >\n <div\n class=\"t-dot\"\n [style.background]=\"markers?.[0]\"\n ></div>\n <div\n *ngIf=\"markers.length > 1\"\n class=\"t-dot\"\n [style.background]=\"markers?.[1] || ''\"\n ></div>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n </div>\n</div>\n", styles: [":host{display:block;font:var(--tui-font-text-m)}.t-row{position:relative;display:flex;justify-content:space-between;block-size:2.25rem;isolation:isolate}.t-item{position:relative;flex:1;line-height:2rem;border-radius:var(--tui-radius-m)}.t-item:before,.t-item:after{position:absolute;top:0;left:0;bottom:0;right:0;content:\"\";z-index:-1;border-radius:var(--tui-radius-m)}.t-item:after{border-radius:.5rem}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;inline-size:2.25rem;text-align:center;outline:none;cursor:pointer;background-clip:content-box;box-sizing:border-box;border:.125rem solid transparent}.t-cell:before{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;border-radius:var(--tui-radius-m)}.t-cell_today:after{position:absolute;left:50%;transform:translate(-50%);content:\"\";bottom:.3125rem;block-size:.125rem;inline-size:.75rem;border-radius:.375rem;background:var(--tui-text-primary)}.t-cell_interval:before{background:var(--tui-background-base-alt)}:host._single .t-cell_interval:before{background:var(--tui-background-neutral-1-hover)}.t-cell_interval:not(:last-child):before{right:-.1875rem;border-start-end-radius:0;border-end-end-radius:0}.t-cell_interval:not([data-range=start]):not(:first-child):before{border-start-start-radius:0;border-end-start-radius:0}.t-cell_interval:last-child:first-child:before{right:0}.t-cell_interval:first-child>.t-item{border-start-start-radius:var(--tui-radius-m);border-end-start-radius:var(--tui-radius-m)}.t-cell_interval:last-child>.t-item{border-start-end-radius:var(--tui-radius-m);border-end-end-radius:var(--tui-radius-m)}.t-cell_interval>.t-item{border-radius:0}.t-cell[data-range]:after{background:var(--tui-text-primary-on-accent-1)}.t-cell[data-range]>.t-item{color:var(--tui-text-primary-on-accent-1)}.t-cell[data-range]>.t-item:before,.t-cell[data-range]>.t-item:after{background:var(--tui-background-accent-1)}.t-cell[data-range]:hover>.t-item:before,.t-cell[data-range]:hover>.t-item:after{background:var(--tui-background-accent-1-hover)}.t-cell[data-range]:active>.t-item:before,.t-cell[data-range]:active>.t-item:after{background:var(--tui-background-accent-1-pressed)}.t-cell[data-range=end]:before{background:var(--tui-background-base-alt)}:host._single .t-cell[data-range=end]:before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=end]:not(:first-child):before{border-start-start-radius:0;border-end-start-radius:0}.t-cell[data-range=end]>.t-item:before{left:.625rem;border-start-start-radius:0;border-end-start-radius:0}.t-cell[data-range=end]>.t-item:after{left:-2rem;right:100%;transform:translate(1.6rem) scaleY(.83) scaleX(.5) rotate(45deg)}.t-cell[data-range=start]>.t-item:before{right:.625rem;border-start-end-radius:0;border-end-end-radius:0}.t-cell[data-range=start]>.t-item:after{left:100%;right:-2rem;transform:translate(-1.6rem) scaleY(.83) scaleX(.5) rotate(45deg)}.t-cell[data-range=single]>.t-item:after{display:none}.t-cell_disabled{pointer-events:none}.t-cell_disabled>.t-item{opacity:.36}.t-cell:hover:not([data-range])>.t-item{background:var(--tui-background-neutral-1-hover)}.t-cell:active:not([data-range])>.t-item{background:var(--tui-background-neutral-1-pressed)}:host{inline-size:15.75rem}[data-type=weekday]{color:var(--tui-text-primary)}[data-type=weekend]{color:var(--tui-text-negative)}.t-row{justify-content:flex-start}.t-row:first-child{justify-content:flex-end}.t-row_weekday{font:var(--tui-font-text-s);color:var(--tui-text-secondary);pointer-events:none}.t-item{display:flex;flex-direction:column}.t-item_unavailable{opacity:var(--tui-disabled-opacity)}.t-dots{display:flex;justify-content:center;margin-top:-.5rem;padding-bottom:.25rem}.t-dot{display:inline-block;inline-size:.25rem;block-size:.25rem;border-radius:100%;margin:0 .0625rem}\n"] }]
|
|
123
123
|
}], propDecorators: { month: [{
|
|
124
124
|
type: Input
|
|
125
125
|
}], disabledItemHandler: [{
|
|
@@ -166,11 +166,11 @@ class TuiCalendarSpin {
|
|
|
166
166
|
this.valueChange.emit(value);
|
|
167
167
|
}
|
|
168
168
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiCalendarSpin, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
169
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiCalendarSpin, isStandalone: true, selector: "tui-calendar-spin", inputs: { value: "value", min: "min", max: "max" }, outputs: { valueChange: "valueChange", yearClick: "yearClick" }, ngImport: i0, template: "<tui-spin-button\n [focusable]=\"false\"\n [leftDisabled]=\"value.monthSameOrBefore(min)\"\n [rightDisabled]=\"value.monthSameOrAfter(max)\"\n (leftClick)=\"append({month: -1})\"\n (rightClick)=\"append({month: 1})\"\n>\n {{ value | tuiMonth | async }}\n <ng-container *ngIf=\"min.year === max.year; else button\">\n {{ value.formattedYear }}\n </ng-container>\n <ng-template #button>\n <button\n id=\"year-btn\"\n automation-id=\"tui-primitive-year-month-pagination__year-button\"\n tabIndex=\"-1\"\n tuiLink\n type=\"button\"\n (click)=\"onYearClick()\"\n >\n {{ value.formattedYear }}\n </button>\n </ng-template>\n</tui-spin-button>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "
|
|
169
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiCalendarSpin, isStandalone: true, selector: "tui-calendar-spin", inputs: { value: "value", min: "min", max: "max" }, outputs: { valueChange: "valueChange", yearClick: "yearClick" }, ngImport: i0, template: "<tui-spin-button\n [focusable]=\"false\"\n [leftDisabled]=\"value.monthSameOrBefore(min)\"\n [rightDisabled]=\"value.monthSameOrAfter(max)\"\n (leftClick)=\"append({month: -1})\"\n (rightClick)=\"append({month: 1})\"\n>\n {{ value | tuiMonth | async }}\n <ng-container *ngIf=\"min.year === max.year; else button\">\n {{ value.formattedYear }}\n </ng-container>\n <ng-template #button>\n <button\n id=\"year-btn\"\n automation-id=\"tui-primitive-year-month-pagination__year-button\"\n tabIndex=\"-1\"\n tuiLink\n type=\"button\"\n (click)=\"onYearClick()\"\n >\n {{ value.formattedYear }}\n </button>\n </ng-template>\n</tui-spin-button>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }, { kind: "pipe", type: TuiMonthPipe, name: "tuiMonth" }, { kind: "component", type: TuiSpinButton, selector: "tui-spin-button", inputs: ["focusable", "disabled", "leftDisabled", "rightDisabled"], outputs: ["leftClick", "rightClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
170
170
|
}
|
|
171
171
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiCalendarSpin, decorators: [{
|
|
172
172
|
type: Component,
|
|
173
|
-
args: [{ standalone: true, selector: 'tui-calendar-spin', imports: [
|
|
173
|
+
args: [{ standalone: true, selector: 'tui-calendar-spin', imports: [AsyncPipe, NgIf, TuiLink, TuiMonthPipe, TuiSpinButton], changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-spin-button\n [focusable]=\"false\"\n [leftDisabled]=\"value.monthSameOrBefore(min)\"\n [rightDisabled]=\"value.monthSameOrAfter(max)\"\n (leftClick)=\"append({month: -1})\"\n (rightClick)=\"append({month: 1})\"\n>\n {{ value | tuiMonth | async }}\n <ng-container *ngIf=\"min.year === max.year; else button\">\n {{ value.formattedYear }}\n </ng-container>\n <ng-template #button>\n <button\n id=\"year-btn\"\n automation-id=\"tui-primitive-year-month-pagination__year-button\"\n tabIndex=\"-1\"\n tuiLink\n type=\"button\"\n (click)=\"onYearClick()\"\n >\n {{ value.formattedYear }}\n </button>\n </ng-template>\n</tui-spin-button>\n", styles: [":host{display:block}\n"] }]
|
|
174
174
|
}], propDecorators: { value: [{
|
|
175
175
|
type: Input
|
|
176
176
|
}], min: [{
|
|
@@ -289,13 +289,13 @@ class TuiCalendarYear {
|
|
|
289
289
|
this.hoveredItem = hovered ? item : null;
|
|
290
290
|
}
|
|
291
291
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiCalendarYear, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
292
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiCalendarYear, isStandalone: true, selector: "tui-calendar-year", inputs: { value: "value", initialItem: "initialItem", min: "min", max: "max", disabledItemHandler: "disabledItemHandler" }, outputs: { yearClick: "yearClick" }, host: { properties: { "class._single": "isSingle" } }, ngImport: i0, template: "<div\n *tuiRepeatTimes=\"let rowIndex of rows\"\n automation-id=\"tui-calendar-year__row\"\n class=\"t-row\"\n>\n <ng-container *tuiRepeatTimes=\"let colIndex of 4\">\n <div\n *tuiLet=\"getItem(rowIndex, colIndex) as item\"\n automation-id=\"tui-calendar-year__cell\"\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"isDisabled(item)\"\n [class.t-cell_interval]=\"itemIsInterval(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n [tuiScrollIntoView]=\"scrollItemIntoView(item)\"\n (click)=\"yearClick.emit(item)\"\n (tuiHoveredChange)=\"onItemHovered($event, item)\"\n >\n <div class=\"t-item\">{{ item }}</div>\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:block;font:var(--tui-font-text-m)}.t-row{position:relative;display:flex;justify-content:space-between;
|
|
292
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiCalendarYear, isStandalone: true, selector: "tui-calendar-year", inputs: { value: "value", initialItem: "initialItem", min: "min", max: "max", disabledItemHandler: "disabledItemHandler" }, outputs: { yearClick: "yearClick" }, host: { properties: { "class._single": "isSingle" } }, ngImport: i0, template: "<div\n *tuiRepeatTimes=\"let rowIndex of rows\"\n automation-id=\"tui-calendar-year__row\"\n class=\"t-row\"\n>\n <ng-container *tuiRepeatTimes=\"let colIndex of 4\">\n <div\n *tuiLet=\"getItem(rowIndex, colIndex) as item\"\n automation-id=\"tui-calendar-year__cell\"\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"isDisabled(item)\"\n [class.t-cell_interval]=\"itemIsInterval(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n [tuiScrollIntoView]=\"scrollItemIntoView(item)\"\n (click)=\"yearClick.emit(item)\"\n (tuiHoveredChange)=\"onItemHovered($event, item)\"\n >\n <div class=\"t-item\">{{ item }}</div>\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:block;font:var(--tui-font-text-m)}.t-row{position:relative;display:flex;justify-content:space-between;block-size:2.25rem;isolation:isolate}.t-item{position:relative;flex:1;line-height:2rem;border-radius:var(--tui-radius-m)}.t-item:before,.t-item:after{position:absolute;top:0;left:0;bottom:0;right:0;content:\"\";z-index:-1;border-radius:var(--tui-radius-m)}.t-item:after{border-radius:.5rem}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;inline-size:3.9375rem;text-align:center;outline:none;cursor:pointer;background-clip:content-box;box-sizing:border-box;border:.125rem solid transparent}.t-cell:before{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;border-radius:var(--tui-radius-m)}.t-cell_today:after{position:absolute;left:50%;transform:translate(-50%);content:\"\";bottom:.3125rem;block-size:.125rem;inline-size:.75rem;border-radius:.375rem;background:var(--tui-text-primary)}.t-cell_interval:before{background:var(--tui-background-base-alt)}:host._single .t-cell_interval:before{background:var(--tui-background-neutral-1-hover)}.t-cell_interval:not(:last-child):before{right:-.1875rem;border-start-end-radius:0;border-end-end-radius:0}.t-cell_interval:not([data-range=start]):not(:first-child):before{border-start-start-radius:0;border-end-start-radius:0}.t-cell_interval:last-child:first-child:before{right:0}.t-cell_interval:first-child>.t-item{border-start-start-radius:var(--tui-radius-m);border-end-start-radius:var(--tui-radius-m)}.t-cell_interval:last-child>.t-item{border-start-end-radius:var(--tui-radius-m);border-end-end-radius:var(--tui-radius-m)}.t-cell_interval>.t-item{border-radius:0}.t-cell[data-range]:after{background:var(--tui-text-primary-on-accent-1)}.t-cell[data-range]>.t-item{color:var(--tui-text-primary-on-accent-1)}.t-cell[data-range]>.t-item:before,.t-cell[data-range]>.t-item:after{background:var(--tui-background-accent-1)}.t-cell[data-range]:hover>.t-item:before,.t-cell[data-range]:hover>.t-item:after{background:var(--tui-background-accent-1-hover)}.t-cell[data-range]:active>.t-item:before,.t-cell[data-range]:active>.t-item:after{background:var(--tui-background-accent-1-pressed)}.t-cell[data-range=end]:before{background:var(--tui-background-base-alt)}:host._single .t-cell[data-range=end]:before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=end]:not(:first-child):before{border-start-start-radius:0;border-end-start-radius:0}.t-cell[data-range=end]>.t-item:before{left:.625rem;border-start-start-radius:0;border-end-start-radius:0}.t-cell[data-range=end]>.t-item:after{left:-2rem;right:100%;transform:translate(1.6rem) scaleY(.83) scaleX(.5) rotate(45deg)}.t-cell[data-range=start]>.t-item:before{right:.625rem;border-start-end-radius:0;border-end-end-radius:0}.t-cell[data-range=start]>.t-item:after{left:100%;right:-2rem;transform:translate(-1.6rem) scaleY(.83) scaleX(.5) rotate(45deg)}.t-cell[data-range=single]>.t-item:after{display:none}.t-cell_disabled{pointer-events:none}.t-cell_disabled>.t-item{opacity:.36}.t-cell:hover:not([data-range])>.t-item{background:var(--tui-background-neutral-1-hover)}.t-cell:active:not([data-range])>.t-item{background:var(--tui-background-neutral-1-pressed)}:host{inline-size:15.75rem}.t-row{margin:.875rem 0}.t-row:first-child{margin-top:0}.t-row:last-child{margin-bottom:0}\n"], dependencies: [{ kind: "directive", type: TuiHovered, selector: "[tuiHoveredChange]", outputs: ["tuiHoveredChange"] }, { kind: "directive", type: TuiLet, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "directive", type: TuiRepeatTimes, selector: "[tuiRepeatTimes][tuiRepeatTimesOf]", inputs: ["tuiRepeatTimesOf"] }, { kind: "directive", type: TuiScrollIntoView, selector: "[tuiScrollIntoView]", inputs: ["tuiScrollIntoView"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
293
293
|
}
|
|
294
294
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiCalendarYear, decorators: [{
|
|
295
295
|
type: Component,
|
|
296
|
-
args: [{ standalone: true, selector: 'tui-calendar-year', imports: [TuiHovered,
|
|
296
|
+
args: [{ standalone: true, selector: 'tui-calendar-year', imports: [TuiHovered, TuiLet, TuiRepeatTimes, TuiScrollIntoView], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
297
297
|
'[class._single]': 'isSingle',
|
|
298
|
-
}, template: "<div\n *tuiRepeatTimes=\"let rowIndex of rows\"\n automation-id=\"tui-calendar-year__row\"\n class=\"t-row\"\n>\n <ng-container *tuiRepeatTimes=\"let colIndex of 4\">\n <div\n *tuiLet=\"getItem(rowIndex, colIndex) as item\"\n automation-id=\"tui-calendar-year__cell\"\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"isDisabled(item)\"\n [class.t-cell_interval]=\"itemIsInterval(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n [tuiScrollIntoView]=\"scrollItemIntoView(item)\"\n (click)=\"yearClick.emit(item)\"\n (tuiHoveredChange)=\"onItemHovered($event, item)\"\n >\n <div class=\"t-item\">{{ item }}</div>\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:block;font:var(--tui-font-text-m)}.t-row{position:relative;display:flex;justify-content:space-between;
|
|
298
|
+
}, template: "<div\n *tuiRepeatTimes=\"let rowIndex of rows\"\n automation-id=\"tui-calendar-year__row\"\n class=\"t-row\"\n>\n <ng-container *tuiRepeatTimes=\"let colIndex of 4\">\n <div\n *tuiLet=\"getItem(rowIndex, colIndex) as item\"\n automation-id=\"tui-calendar-year__cell\"\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"isDisabled(item)\"\n [class.t-cell_interval]=\"itemIsInterval(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n [tuiScrollIntoView]=\"scrollItemIntoView(item)\"\n (click)=\"yearClick.emit(item)\"\n (tuiHoveredChange)=\"onItemHovered($event, item)\"\n >\n <div class=\"t-item\">{{ item }}</div>\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:block;font:var(--tui-font-text-m)}.t-row{position:relative;display:flex;justify-content:space-between;block-size:2.25rem;isolation:isolate}.t-item{position:relative;flex:1;line-height:2rem;border-radius:var(--tui-radius-m)}.t-item:before,.t-item:after{position:absolute;top:0;left:0;bottom:0;right:0;content:\"\";z-index:-1;border-radius:var(--tui-radius-m)}.t-item:after{border-radius:.5rem}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;inline-size:3.9375rem;text-align:center;outline:none;cursor:pointer;background-clip:content-box;box-sizing:border-box;border:.125rem solid transparent}.t-cell:before{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;border-radius:var(--tui-radius-m)}.t-cell_today:after{position:absolute;left:50%;transform:translate(-50%);content:\"\";bottom:.3125rem;block-size:.125rem;inline-size:.75rem;border-radius:.375rem;background:var(--tui-text-primary)}.t-cell_interval:before{background:var(--tui-background-base-alt)}:host._single .t-cell_interval:before{background:var(--tui-background-neutral-1-hover)}.t-cell_interval:not(:last-child):before{right:-.1875rem;border-start-end-radius:0;border-end-end-radius:0}.t-cell_interval:not([data-range=start]):not(:first-child):before{border-start-start-radius:0;border-end-start-radius:0}.t-cell_interval:last-child:first-child:before{right:0}.t-cell_interval:first-child>.t-item{border-start-start-radius:var(--tui-radius-m);border-end-start-radius:var(--tui-radius-m)}.t-cell_interval:last-child>.t-item{border-start-end-radius:var(--tui-radius-m);border-end-end-radius:var(--tui-radius-m)}.t-cell_interval>.t-item{border-radius:0}.t-cell[data-range]:after{background:var(--tui-text-primary-on-accent-1)}.t-cell[data-range]>.t-item{color:var(--tui-text-primary-on-accent-1)}.t-cell[data-range]>.t-item:before,.t-cell[data-range]>.t-item:after{background:var(--tui-background-accent-1)}.t-cell[data-range]:hover>.t-item:before,.t-cell[data-range]:hover>.t-item:after{background:var(--tui-background-accent-1-hover)}.t-cell[data-range]:active>.t-item:before,.t-cell[data-range]:active>.t-item:after{background:var(--tui-background-accent-1-pressed)}.t-cell[data-range=end]:before{background:var(--tui-background-base-alt)}:host._single .t-cell[data-range=end]:before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=end]:not(:first-child):before{border-start-start-radius:0;border-end-start-radius:0}.t-cell[data-range=end]>.t-item:before{left:.625rem;border-start-start-radius:0;border-end-start-radius:0}.t-cell[data-range=end]>.t-item:after{left:-2rem;right:100%;transform:translate(1.6rem) scaleY(.83) scaleX(.5) rotate(45deg)}.t-cell[data-range=start]>.t-item:before{right:.625rem;border-start-end-radius:0;border-end-end-radius:0}.t-cell[data-range=start]>.t-item:after{left:100%;right:-2rem;transform:translate(-1.6rem) scaleY(.83) scaleX(.5) rotate(45deg)}.t-cell[data-range=single]>.t-item:after{display:none}.t-cell_disabled{pointer-events:none}.t-cell_disabled>.t-item{opacity:.36}.t-cell:hover:not([data-range])>.t-item{background:var(--tui-background-neutral-1-hover)}.t-cell:active:not([data-range])>.t-item{background:var(--tui-background-neutral-1-pressed)}:host{inline-size:15.75rem}.t-row{margin:.875rem 0}.t-row:first-child{margin-top:0}.t-row:last-child{margin-bottom:0}\n"] }]
|
|
299
299
|
}], propDecorators: { value: [{
|
|
300
300
|
type: Input
|
|
301
301
|
}], initialItem: [{
|
|
@@ -390,18 +390,18 @@ class TuiCalendar {
|
|
|
390
390
|
this.hoveredItemChange.emit(day);
|
|
391
391
|
}
|
|
392
392
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiCalendar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
393
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiCalendar, isStandalone: true, selector: "tui-calendar", inputs: { month: "month", disabledItemHandler: "disabledItemHandler", min: "min", max: "max", minViewedMonth: "minViewedMonth", maxViewedMonth: "maxViewedMonth", hoveredItem: "hoveredItem", showAdjacent: "showAdjacent", markerHandler: "markerHandler", value: "value", initialView: "initialView" }, outputs: { dayClick: "dayClick", monthChange: "monthChange", hoveredItemChange: "hoveredItemChange" }, ngImport: i0, template: "<tui-scrollbar\n *ngIf=\"isInYearView; else calendar\"\n automation-id=\"tui-calendar__scrollbar\"\n class=\"t-scrollbar\"\n>\n <tui-calendar-year\n automation-id=\"tui-calendar__year\"\n [initialItem]=\"month.year\"\n [max]=\"computedMax.year\"\n [min]=\"computedMin.year\"\n [value]=\"value\"\n (yearClick)=\"onPickerYearClick($event)\"\n />\n</tui-scrollbar>\n<ng-template #calendar>\n <tui-calendar-spin\n automation-id=\"tui-calendar__pagination\"\n class=\"t-pagination\"\n [max]=\"computedMaxViewedMonth\"\n [min]=\"computedMinViewedMonth\"\n [value]=\"month\"\n (valueChange)=\"onPaginationValueChange($event)\"\n (yearClick)=\"onPaginationYearClick()\"\n />\n <tui-calendar-sheet\n automation-id=\"tui-calendar__calendar\"\n [disabledItemHandler]=\"disabledItemHandler | tuiMapper: disabledItemHandlerMapper : computedMin : computedMax\"\n [hoveredItem]=\"hoveredItem\"\n [markerHandler]=\"markerHandler\"\n [month]=\"month\"\n [showAdjacent]=\"showAdjacent\"\n [value]=\"value\"\n (dayClick)=\"onDayClick($event)\"\n (hoveredItemChange)=\"onHoveredItemChange($event)\"\n />\n</ng-template>\n", styles: [":host{display:block;min-
|
|
393
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiCalendar, isStandalone: true, selector: "tui-calendar", inputs: { month: "month", disabledItemHandler: "disabledItemHandler", min: "min", max: "max", minViewedMonth: "minViewedMonth", maxViewedMonth: "maxViewedMonth", hoveredItem: "hoveredItem", showAdjacent: "showAdjacent", markerHandler: "markerHandler", value: "value", initialView: "initialView" }, outputs: { dayClick: "dayClick", monthChange: "monthChange", hoveredItemChange: "hoveredItemChange" }, ngImport: i0, template: "<tui-scrollbar\n *ngIf=\"isInYearView; else calendar\"\n automation-id=\"tui-calendar__scrollbar\"\n class=\"t-scrollbar\"\n>\n <tui-calendar-year\n automation-id=\"tui-calendar__year\"\n [initialItem]=\"month.year\"\n [max]=\"computedMax.year\"\n [min]=\"computedMin.year\"\n [value]=\"value\"\n (yearClick)=\"onPickerYearClick($event)\"\n />\n</tui-scrollbar>\n<ng-template #calendar>\n <tui-calendar-spin\n automation-id=\"tui-calendar__pagination\"\n class=\"t-pagination\"\n [max]=\"computedMaxViewedMonth\"\n [min]=\"computedMinViewedMonth\"\n [value]=\"month\"\n (valueChange)=\"onPaginationValueChange($event)\"\n (yearClick)=\"onPaginationYearClick()\"\n />\n <tui-calendar-sheet\n automation-id=\"tui-calendar__calendar\"\n [disabledItemHandler]=\"disabledItemHandler | tuiMapper: disabledItemHandlerMapper : computedMin : computedMax\"\n [hoveredItem]=\"hoveredItem\"\n [markerHandler]=\"markerHandler\"\n [month]=\"month\"\n [showAdjacent]=\"showAdjacent\"\n [value]=\"value\"\n (dayClick)=\"onDayClick($event)\"\n (hoveredItemChange)=\"onHoveredItemChange($event)\"\n />\n</ng-template>\n", styles: [":host{display:block;min-block-size:18.25rem;inline-size:15.75rem;padding:1rem 1.125rem;box-sizing:content-box}.t-scrollbar{block-size:18.25rem;inline-size:16.875rem}.t-pagination{margin-bottom:1rem}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TuiCalendarSheet, selector: "tui-calendar-sheet", inputs: ["month", "disabledItemHandler", "markerHandler", "value", "hoveredItem", "showAdjacent"], outputs: ["hoveredItemChange", "dayClick"] }, { kind: "component", type: TuiCalendarSpin, selector: "tui-calendar-spin", inputs: ["value", "min", "max"], outputs: ["valueChange", "yearClick"] }, { kind: "component", type: TuiCalendarYear, selector: "tui-calendar-year", inputs: ["value", "initialItem", "min", "max", "disabledItemHandler"], outputs: ["yearClick"] }, { kind: "pipe", type: TuiMapperPipe, name: "tuiMapper" }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar", inputs: ["hidden"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
394
394
|
}
|
|
395
395
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiCalendar, decorators: [{
|
|
396
396
|
type: Component,
|
|
397
397
|
args: [{ standalone: true, selector: 'tui-calendar', imports: [
|
|
398
398
|
NgIf,
|
|
399
|
-
TuiScrollbar,
|
|
400
|
-
TuiCalendarYear,
|
|
401
|
-
TuiCalendarSpin,
|
|
402
399
|
TuiCalendarSheet,
|
|
400
|
+
TuiCalendarSpin,
|
|
401
|
+
TuiCalendarYear,
|
|
403
402
|
TuiMapperPipe,
|
|
404
|
-
|
|
403
|
+
TuiScrollbar,
|
|
404
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-scrollbar\n *ngIf=\"isInYearView; else calendar\"\n automation-id=\"tui-calendar__scrollbar\"\n class=\"t-scrollbar\"\n>\n <tui-calendar-year\n automation-id=\"tui-calendar__year\"\n [initialItem]=\"month.year\"\n [max]=\"computedMax.year\"\n [min]=\"computedMin.year\"\n [value]=\"value\"\n (yearClick)=\"onPickerYearClick($event)\"\n />\n</tui-scrollbar>\n<ng-template #calendar>\n <tui-calendar-spin\n automation-id=\"tui-calendar__pagination\"\n class=\"t-pagination\"\n [max]=\"computedMaxViewedMonth\"\n [min]=\"computedMinViewedMonth\"\n [value]=\"month\"\n (valueChange)=\"onPaginationValueChange($event)\"\n (yearClick)=\"onPaginationYearClick()\"\n />\n <tui-calendar-sheet\n automation-id=\"tui-calendar__calendar\"\n [disabledItemHandler]=\"disabledItemHandler | tuiMapper: disabledItemHandlerMapper : computedMin : computedMax\"\n [hoveredItem]=\"hoveredItem\"\n [markerHandler]=\"markerHandler\"\n [month]=\"month\"\n [showAdjacent]=\"showAdjacent\"\n [value]=\"value\"\n (dayClick)=\"onDayClick($event)\"\n (hoveredItemChange)=\"onHoveredItemChange($event)\"\n />\n</ng-template>\n", styles: [":host{display:block;min-block-size:18.25rem;inline-size:15.75rem;padding:1rem 1.125rem;box-sizing:content-box}.t-scrollbar{block-size:18.25rem;inline-size:16.875rem}.t-pagination{margin-bottom:1rem}\n"] }]
|
|
405
405
|
}], propDecorators: { month: [{
|
|
406
406
|
type: Input
|
|
407
407
|
}], disabledItemHandler: [{
|