@taiga-ui/core 4.52.0-canary.eb5ffe3 → 4.52.0-canary.ec0802b

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.
Files changed (139) hide show
  1. package/README.md +1 -1
  2. package/classes/accessors.d.ts +1 -1
  3. package/components/calendar/calendar-sheet.options.d.ts +1 -3
  4. package/components/data-list/data-list.component.d.ts +6 -8
  5. package/components/data-list/opt-group.directive.d.ts +2 -2
  6. package/components/data-list/option/option.directive.d.ts +5 -6
  7. package/components/dialog/dialog.component.d.ts +2 -3
  8. package/components/dialog/dialog.directive.d.ts +4 -3
  9. package/components/dialog/dialog.options.d.ts +2 -3
  10. package/components/dialog/dialog.providers.d.ts +1 -2
  11. package/components/dialog/dialog.service.d.ts +5 -2
  12. package/components/dialog/index.d.ts +0 -1
  13. package/components/index.d.ts +1 -2
  14. package/components/link/link.directive.d.ts +2 -2
  15. package/components/link/link.options.d.ts +1 -3
  16. package/components/loader/loader.component.d.ts +7 -7
  17. package/components/loader/loader.options.d.ts +1 -3
  18. package/components/modal/index.d.ts +2 -0
  19. package/components/modal/modal.component.d.ts +17 -0
  20. package/components/modal/modal.service.d.ts +13 -0
  21. package/components/notification/index.d.ts +3 -0
  22. package/components/notification/notification.component.d.ts +14 -0
  23. package/components/notification/notification.d.ts +3 -0
  24. package/components/notification/notification.directive.d.ts +7 -12
  25. package/components/notification/notification.options.d.ts +9 -7
  26. package/components/notification/notification.service.d.ts +17 -0
  27. package/components/root/root.component.d.ts +1 -1
  28. package/components/scrollbar/scroll-into-view.directive.d.ts +3 -2
  29. package/components/scrollbar/scrollbar.component.d.ts +2 -2
  30. package/components/scrollbar/scrollbar.directive.d.ts +2 -2
  31. package/components/spin-button/spin-button.component.d.ts +7 -8
  32. package/components/textfield/textfield-multi/textfield-multi.component.d.ts +2 -2
  33. package/components/textfield/textfield.component.d.ts +3 -4
  34. package/components/textfield/textfield.directive.d.ts +9 -12
  35. package/directives/{notification/notification.directive.d.ts → alert/alert.directive.d.ts} +3 -3
  36. package/directives/{notification/notification.service.d.ts → alert/alert.service.d.ts} +3 -3
  37. package/directives/alert/index.d.ts +2 -0
  38. package/directives/date-format/date-format.directive.d.ts +3 -7
  39. package/directives/dropdown/dropdown-hover.options.d.ts +1 -3
  40. package/directives/dropdown/dropdown-position.directive.d.ts +1 -1
  41. package/directives/group/group.options.d.ts +1 -3
  42. package/directives/index.d.ts +1 -1
  43. package/directives/number-format/number-format.directive.d.ts +3 -7
  44. package/fesm2022/taiga-ui-core-classes.mjs +1 -1
  45. package/fesm2022/taiga-ui-core-classes.mjs.map +1 -1
  46. package/fesm2022/taiga-ui-core-components-calendar.mjs +9 -15
  47. package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
  48. package/fesm2022/taiga-ui-core-components-data-list.mjs +36 -70
  49. package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
  50. package/fesm2022/taiga-ui-core-components-dialog.mjs +33 -90
  51. package/fesm2022/taiga-ui-core-components-dialog.mjs.map +1 -1
  52. package/fesm2022/taiga-ui-core-components-icon.mjs +1 -2
  53. package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
  54. package/fesm2022/taiga-ui-core-components-link.mjs +10 -16
  55. package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
  56. package/fesm2022/taiga-ui-core-components-loader.mjs +14 -32
  57. package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
  58. package/fesm2022/taiga-ui-core-components-modal.mjs +89 -0
  59. package/fesm2022/taiga-ui-core-components-modal.mjs.map +1 -0
  60. package/fesm2022/taiga-ui-core-components-notification.mjs +98 -41
  61. package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
  62. package/fesm2022/taiga-ui-core-components-root.mjs +5 -7
  63. package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
  64. package/fesm2022/taiga-ui-core-components-scrollbar.mjs +35 -43
  65. package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
  66. package/fesm2022/taiga-ui-core-components-spin-button.mjs +12 -24
  67. package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
  68. package/fesm2022/taiga-ui-core-components-textfield.mjs +38 -75
  69. package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
  70. package/fesm2022/taiga-ui-core-components.mjs +1 -2
  71. package/fesm2022/taiga-ui-core-components.mjs.map +1 -1
  72. package/fesm2022/taiga-ui-core-directives-alert.mjs +73 -0
  73. package/fesm2022/taiga-ui-core-directives-alert.mjs.map +1 -0
  74. package/fesm2022/taiga-ui-core-directives-appearance.mjs +0 -1
  75. package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
  76. package/fesm2022/taiga-ui-core-directives-date-format.mjs +24 -18
  77. package/fesm2022/taiga-ui-core-directives-date-format.mjs.map +1 -1
  78. package/fesm2022/taiga-ui-core-directives-dropdown.mjs +18 -45
  79. package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
  80. package/fesm2022/taiga-ui-core-directives-group.mjs +4 -8
  81. package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
  82. package/fesm2022/taiga-ui-core-directives-hint.mjs +5 -8
  83. package/fesm2022/taiga-ui-core-directives-hint.mjs.map +1 -1
  84. package/fesm2022/taiga-ui-core-directives-icons.mjs +0 -1
  85. package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
  86. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +0 -3
  87. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
  88. package/fesm2022/taiga-ui-core-directives-number-format.mjs +30 -18
  89. package/fesm2022/taiga-ui-core-directives-number-format.mjs.map +1 -1
  90. package/fesm2022/taiga-ui-core-directives-popup.mjs +2 -2
  91. package/fesm2022/taiga-ui-core-directives-popup.mjs.map +1 -1
  92. package/fesm2022/taiga-ui-core-directives.mjs +1 -1
  93. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs +0 -1
  94. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs.map +1 -1
  95. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs +0 -1
  96. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs.map +1 -1
  97. package/fesm2022/taiga-ui-core-pipes-flag.mjs +0 -1
  98. package/fesm2022/taiga-ui-core-pipes-flag.mjs.map +1 -1
  99. package/fesm2022/taiga-ui-core-pipes-format-date.mjs +0 -1
  100. package/fesm2022/taiga-ui-core-pipes-format-date.mjs.map +1 -1
  101. package/fesm2022/taiga-ui-core-pipes-format-number.mjs +21 -12
  102. package/fesm2022/taiga-ui-core-pipes-format-number.mjs.map +1 -1
  103. package/fesm2022/taiga-ui-core-pipes-initials.mjs +0 -1
  104. package/fesm2022/taiga-ui-core-pipes-initials.mjs.map +1 -1
  105. package/fesm2022/taiga-ui-core-pipes-month.mjs +0 -1
  106. package/fesm2022/taiga-ui-core-pipes-month.mjs.map +1 -1
  107. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs +0 -1
  108. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs.map +1 -1
  109. package/fesm2022/taiga-ui-core-tokens.mjs +21 -15
  110. package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
  111. package/fesm2022/taiga-ui-core-utils-format.mjs +1 -0
  112. package/fesm2022/taiga-ui-core-utils-format.mjs.map +1 -1
  113. package/package.json +13 -14
  114. package/pipes/format-number/format-number.pipe.d.ts +5 -3
  115. package/styles/components/link.less +1 -0
  116. package/styles/mixins/appearance.less +1 -1
  117. package/styles/mixins/mixins.less +0 -5
  118. package/styles/mixins/mixins.scss +0 -5
  119. package/styles/theme/variables.less +2 -4
  120. package/tokens/common-icons.d.ts +1 -3
  121. package/tokens/date-format.d.ts +2 -3
  122. package/tokens/number-format.d.ts +2 -3
  123. package/components/alert/alert.component.d.ts +0 -14
  124. package/components/alert/alert.directive.d.ts +0 -8
  125. package/components/alert/alert.interfaces.d.ts +0 -13
  126. package/components/alert/alert.service.d.ts +0 -11
  127. package/components/alert/alert.tokens.d.ts +0 -6
  128. package/components/alert/index.d.ts +0 -5
  129. package/components/dialog/active-zone-adapter.directive.d.ts +0 -11
  130. package/components/dialog/dialogs.component.d.ts +0 -8
  131. package/components/header/header.directive.d.ts +0 -17
  132. package/components/header/index.d.ts +0 -1
  133. package/directives/notification/index.d.ts +0 -2
  134. package/fesm2022/taiga-ui-core-components-alert.mjs +0 -110
  135. package/fesm2022/taiga-ui-core-components-alert.mjs.map +0 -1
  136. package/fesm2022/taiga-ui-core-components-header.mjs +0 -42
  137. package/fesm2022/taiga-ui-core-components-header.mjs.map +0 -1
  138. package/fesm2022/taiga-ui-core-directives-notification.mjs +0 -73
  139. package/fesm2022/taiga-ui-core-directives-notification.mjs.map +0 -1
@@ -1,11 +1,6 @@
1
1
  @import 'browsers.less';
2
2
 
3
3
  .interactive(@ruleset) {
4
- // TODO remove after dropping Safari 13 support
5
- &:matches(a, button, select, textarea, input, label, .tui-interactive):not(:disabled) {
6
- @ruleset();
7
- }
8
-
9
4
  &:is(a, button, select, textarea, input, label, .tui-interactive):not(:disabled) {
10
5
  @ruleset();
11
6
  }
@@ -1,11 +1,6 @@
1
1
  @import 'browsers.scss';
2
2
 
3
3
  @mixin interactive {
4
- // TODO remove after dropping Safari 13 support
5
- &:matches(a, button, select, textarea, input, label, .tui-interactive):not(:disabled) {
6
- @content;
7
- }
8
-
9
4
  &:is(a, button, select, textarea, input, label, .tui-interactive):not(:disabled) {
10
5
  @content;
11
6
  }
@@ -1,10 +1,8 @@
1
- @font-fallback: -apple-system, 'BlinkMacSystemFont', system-ui, 'Roboto', 'Segoe UI', 'Helvetica Neue', sans-serif;
2
-
3
1
  &:root,
4
2
  &:host {
5
3
  // Fonts
6
- --tui-font-heading: 'Manrope', @font-fallback;
7
- --tui-font-text: 'Manrope', @font-fallback;
4
+ --tui-font-heading: 'Manrope', system-ui, sans-serif;
5
+ --tui-font-text: 'Manrope', system-ui, sans-serif;
8
6
  --tui-font-offset: ~'0rem';
9
7
  // Heading
10
8
  --tui-font-heading-1: bold calc(var(--tui-font-offset) + 3.125rem) / 3.5rem var(--tui-font-heading);
@@ -1,4 +1,3 @@
1
- import { InjectionToken, type Provider } from '@angular/core';
2
1
  export interface TuiCommonIcons {
3
2
  readonly check: string;
4
3
  readonly close: string;
@@ -7,5 +6,4 @@ export interface TuiCommonIcons {
7
6
  readonly search: string;
8
7
  readonly ellipsis: string;
9
8
  }
10
- export declare const TUI_COMMON_ICONS: InjectionToken<TuiCommonIcons>;
11
- export declare function tuiCommonIconsProvider(icons: Partial<TuiCommonIcons>): Provider;
9
+ export declare const TUI_COMMON_ICONS: import("@angular/core").InjectionToken<TuiCommonIcons>, tuiCommonIconsProvider: (item: Partial<TuiCommonIcons> | (() => Partial<TuiCommonIcons>)) => import("@angular/core").FactoryProvider;
@@ -1,6 +1,5 @@
1
- import { InjectionToken, type Provider } from '@angular/core';
1
+ import { InjectionToken, type Provider, type Signal } from '@angular/core';
2
2
  import { type TuiDateMode } from '@taiga-ui/cdk/date-time';
3
- import { type Observable } from 'rxjs';
4
3
  /**
5
4
  * Formatting configuration for displayed dates
6
5
  */
@@ -19,5 +18,5 @@ export declare const TUI_DEFAULT_DATE_FORMAT: TuiDateFormatSettings;
19
18
  /**
20
19
  * Formatting configuration for displayed dates
21
20
  */
22
- export declare const TUI_DATE_FORMAT: InjectionToken<Observable<TuiDateFormatSettings>>;
21
+ export declare const TUI_DATE_FORMAT: InjectionToken<Signal<TuiDateFormatSettings>>;
23
22
  export declare function tuiDateFormatProvider(options: Partial<TuiDateFormatSettings>): Provider;
@@ -1,6 +1,5 @@
1
- import { InjectionToken, type Provider } from '@angular/core';
1
+ import { InjectionToken, type Provider, type Signal } from '@angular/core';
2
2
  import { type TuiRounding } from '@taiga-ui/cdk/types';
3
- import { type Observable } from 'rxjs';
4
3
  export type TuiDecimalMode = 'always' | 'not-zero' | 'pad';
5
4
  export type TuiDecimalSymbol = ',' | '.';
6
5
  /**
@@ -35,5 +34,5 @@ export declare const TUI_DEFAULT_NUMBER_FORMAT: TuiNumberFormatSettings;
35
34
  /**
36
35
  * Formatting configuration for displayed numbers
37
36
  */
38
- export declare const TUI_NUMBER_FORMAT: InjectionToken<Observable<TuiNumberFormatSettings>>;
37
+ export declare const TUI_NUMBER_FORMAT: InjectionToken<Signal<TuiNumberFormatSettings>>;
39
38
  export declare function tuiNumberFormatProvider(options: Partial<TuiNumberFormatSettings>): Provider;
@@ -1,14 +0,0 @@
1
- import { type TuiPortalContext } from '@taiga-ui/cdk/portals';
2
- import { type TuiAlertOptions } from './alert.interfaces';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "@taiga-ui/cdk/directives/animated";
5
- import * as i2 from "@taiga-ui/core/directives";
6
- export declare class TuiAlertComponent<O, I> {
7
- private readonly el;
8
- protected readonly icons: import("@taiga-ui/core/tokens").TuiCommonIcons;
9
- protected readonly close: import("@angular/core").Signal<string>;
10
- protected readonly item: TuiPortalContext<TuiAlertOptions<I>, O>;
11
- protected readonly sub: import("rxjs").Subscription;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiAlertComponent<any, any>, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiAlertComponent<any, any>, "tui-alert", never, {}, {}, never, never, true, [{ directive: typeof i1.TuiAnimated; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiNotificationDirective; inputs: {}; outputs: {}; }]>;
14
- }
@@ -1,8 +0,0 @@
1
- import { type TuiAlertOptions } from './alert.interfaces';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "@taiga-ui/cdk/portals";
4
- export declare class TuiAlert<T> {
5
- readonly tuiAlertOptions: import("@angular/core").InputSignal<Partial<TuiAlertOptions<T>>>;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiAlert<any>, never>;
7
- static ɵdir: i0.ɵɵDirectiveDeclaration<TuiAlert<any>, "ng-template[tuiAlert]", never, { "tuiAlertOptions": { "alias": "tuiAlertOptions"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.TuiPortalDirective; inputs: { "options": "tuiAlertOptions"; "open": "tuiAlert"; }; outputs: { "openChange": "tuiAlertChange"; }; }]>;
8
- }
@@ -1,13 +0,0 @@
1
- import { type TuiPopoverContext } from '@taiga-ui/cdk/services';
2
- import { type TuiHandler } from '@taiga-ui/cdk/types';
3
- import { type TuiNotificationOptions } from '@taiga-ui/core/components/notification';
4
- import { type TuiPositionOptions } from '@taiga-ui/core/directives';
5
- import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
6
- export interface TuiAlertOptions<I = undefined> extends Omit<TuiNotificationOptions, 'size'>, TuiPositionOptions {
7
- readonly autoClose: TuiHandler<string, number> | number;
8
- readonly data: I;
9
- readonly closable: boolean;
10
- readonly label: PolymorpheusContent<TuiAlertOptions<I>>;
11
- }
12
- export interface TuiAlertContext<O = void, I = undefined> extends TuiPopoverContext<O>, TuiAlertOptions<I> {
13
- }
@@ -1,11 +0,0 @@
1
- import { TuiNotificationService } from '@taiga-ui/core/directives/notification';
2
- import { TuiAlertComponent } from './alert.component';
3
- import { type TuiAlertOptions } from './alert.interfaces';
4
- import * as i0 from "@angular/core";
5
- export declare class TuiAlertService extends TuiNotificationService<TuiAlertOptions<any>> {
6
- protected readonly options: TuiAlertOptions<undefined>;
7
- protected readonly component: typeof TuiAlertComponent;
8
- constructor();
9
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiAlertService, never>;
10
- static ɵprov: i0.ɵɵInjectableDeclaration<TuiAlertService>;
11
- }
@@ -1,6 +0,0 @@
1
- import { type FactoryProvider, InjectionToken } from '@angular/core';
2
- import { type TuiAlertOptions } from './alert.interfaces';
3
- export declare const TUI_ALERT_CONCURRENCY: InjectionToken<number>;
4
- export declare const TUI_ALERT_DEFAULT_OPTIONS: Omit<TuiAlertOptions, 'appearance' | 'icon'>;
5
- export declare const TUI_ALERT_OPTIONS: InjectionToken<TuiAlertOptions<undefined>>;
6
- export declare function tuiAlertOptionsProvider(options: Partial<TuiAlertOptions>): FactoryProvider;
@@ -1,5 +0,0 @@
1
- export * from './alert.component';
2
- export * from './alert.directive';
3
- export type * from './alert.interfaces';
4
- export * from './alert.service';
5
- export * from './alert.tokens';
@@ -1,11 +0,0 @@
1
- import { type OnDestroy, type OnInit } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "@taiga-ui/cdk/directives/active-zone";
4
- export declare class TuiActiveZoneAdapter implements OnDestroy, OnInit {
5
- private readonly current;
6
- private readonly parent;
7
- ngOnInit(): void;
8
- ngOnDestroy(): void;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiActiveZoneAdapter, never>;
10
- static ɵdir: i0.ɵɵDirectiveDeclaration<TuiActiveZoneAdapter, "[tuiActiveZoneAdapter]", never, {}, {}, never, never, true, [{ directive: typeof i1.TuiActiveZone; inputs: {}; outputs: {}; }]>;
11
- }
@@ -1,8 +0,0 @@
1
- import { type Signal } from '@angular/core';
2
- import { type TuiPopover } from '@taiga-ui/cdk/services';
3
- import * as i0 from "@angular/core";
4
- export declare class TuiDialogs {
5
- protected readonly dialogs: Signal<ReadonlyArray<TuiPopover<any, any>>>;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiDialogs, never>;
7
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiDialogs, "tui-dialogs", never, {}, {}, never, never, true, never>;
8
- }
@@ -1,17 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare const TUI_HEADER_OPTIONS: import("@angular/core").InjectionToken<{
3
- size: "" | "body-l" | "body-m" | "body-xl" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
4
- }>, tuiHeaderOptionsProvider: (item: Partial<{
5
- size: "" | "body-l" | "body-m" | "body-xl" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
6
- }> | (() => Partial<{
7
- size: "" | "body-l" | "body-m" | "body-xl" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
8
- }>)) => import("@angular/core").FactoryProvider;
9
- export declare class TuiHeader {
10
- protected readonly nothing: undefined;
11
- protected readonly options: {
12
- size: "" | "body-l" | "body-m" | "body-xl" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
13
- };
14
- readonly tuiHeader: import("@angular/core").InputSignal<"" | "body-l" | "body-m" | "body-xl" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6">;
15
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiHeader, never>;
16
- static ɵdir: i0.ɵɵDirectiveDeclaration<TuiHeader, "[tuiHeader]", never, { "tuiHeader": { "alias": "tuiHeader"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
17
- }
@@ -1 +0,0 @@
1
- export * from './header.directive';
@@ -1,2 +0,0 @@
1
- export * from './notification.directive';
2
- export * from './notification.service';
@@ -1,110 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, ChangeDetectionStrategy, Component, InjectionToken, Injectable, input, Directive } from '@angular/core';
3
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
- import * as i1 from '@taiga-ui/cdk/directives/animated';
5
- import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
6
- import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
7
- import { TuiButton } from '@taiga-ui/core/components/button';
8
- import { TuiNotification, TUI_NOTIFICATION_OPTIONS } from '@taiga-ui/core/components/notification';
9
- import * as i2 from '@taiga-ui/core/directives';
10
- import { TuiNotificationDirective } from '@taiga-ui/core/directives';
11
- import { TuiTitle } from '@taiga-ui/core/directives/title';
12
- import { TUI_COMMON_ICONS, TUI_CLOSE_WORD } from '@taiga-ui/core/tokens';
13
- import { injectContext, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
14
- import { of, switchMap, timer, EMPTY, takeUntil, fromEvent, repeat } from 'rxjs';
15
- import * as i1$1 from '@taiga-ui/cdk/portals';
16
- import { tuiAsPortal, TuiPortalDirective } from '@taiga-ui/cdk/portals';
17
- import { TuiNotificationService } from '@taiga-ui/core/directives/notification';
18
- import { tuiCreateToken } from '@taiga-ui/cdk/utils/miscellaneous';
19
-
20
- class TuiAlertComponent {
21
- constructor() {
22
- this.el = tuiInjectElement();
23
- this.icons = inject(TUI_COMMON_ICONS);
24
- this.close = inject(TUI_CLOSE_WORD);
25
- this.item = injectContext();
26
- this.sub = of(typeof this.item.autoClose === 'function'
27
- ? this.item.autoClose(this.item.appearance)
28
- : this.item.autoClose)
29
- .pipe(switchMap((autoClose) => (autoClose ? timer(autoClose) : EMPTY)), takeUntil(fromEvent(this.el, 'mouseenter')), repeat({ delay: () => fromEvent(this.el, 'mouseleave') }), takeUntilDestroyed())
30
- .subscribe(() => this.item.$implicit.complete());
31
- }
32
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
33
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiAlertComponent, isStandalone: true, selector: "tui-alert", host: { attributes: { "role": "alert" } }, hostDirectives: [{ directive: i1.TuiAnimated }, { directive: i2.TuiNotificationDirective }], ngImport: i0, template: "<div class=\"t-wrapper\">\n <tui-notification\n size=\"m\"\n [appearance]=\"item.appearance\"\n [class.t-closable]=\"item.closable\"\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 @if (item.closable) {\n <button\n tuiIconButton\n type=\"button\"\n [iconStart]=\"icons.close\"\n (click)=\"item.$implicit.complete()\"\n >\n {{ close() }}\n </button>\n }\n </tui-notification>\n</div>\n", styles: [":host{inline-size:18rem;margin:1.625rem 3rem;word-break:break-word;transform:translateZ(0);filter:drop-shadow(0 .375rem 1rem rgba(0,0,0,.12))}:host :host-context(tui-root._mobile){margin:.625rem 1rem}.t-wrapper{background:var(--tui-background-base);clip-path:inset(.375rem 0 round var(--tui-radius-m))}.t-closable{padding-inline-end:2.5rem}\n"], dependencies: [{ 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
34
- }
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAlertComponent, decorators: [{
36
- type: Component,
37
- args: [{ selector: 'tui-alert', imports: [PolymorpheusOutlet, TuiButton, TuiNotification, TuiTitle], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [TuiAnimated, TuiNotificationDirective], host: { role: 'alert' }, template: "<div class=\"t-wrapper\">\n <tui-notification\n size=\"m\"\n [appearance]=\"item.appearance\"\n [class.t-closable]=\"item.closable\"\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 @if (item.closable) {\n <button\n tuiIconButton\n type=\"button\"\n [iconStart]=\"icons.close\"\n (click)=\"item.$implicit.complete()\"\n >\n {{ close() }}\n </button>\n }\n </tui-notification>\n</div>\n", styles: [":host{inline-size:18rem;margin:1.625rem 3rem;word-break:break-word;transform:translateZ(0);filter:drop-shadow(0 .375rem 1rem rgba(0,0,0,.12))}:host :host-context(tui-root._mobile){margin:.625rem 1rem}.t-wrapper{background:var(--tui-background-base);clip-path:inset(.375rem 0 round var(--tui-radius-m))}.t-closable{padding-inline-end:2.5rem}\n"] }]
38
- }] });
39
-
40
- const TUI_ALERT_CONCURRENCY = tuiCreateToken(5);
41
- const TUI_ALERT_DEFAULT_OPTIONS = {
42
- autoClose: 3000,
43
- label: '',
44
- closable: true,
45
- data: undefined,
46
- block: 'start',
47
- inline: 'end',
48
- };
49
- const TUI_ALERT_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_ALERT_OPTIONS' : '', {
50
- factory: () => ({
51
- ...TUI_ALERT_DEFAULT_OPTIONS,
52
- ...inject(TUI_NOTIFICATION_OPTIONS),
53
- }),
54
- });
55
- function tuiAlertOptionsProvider(options) {
56
- return {
57
- provide: TUI_ALERT_OPTIONS,
58
- useFactory: () => ({
59
- ...TUI_ALERT_DEFAULT_OPTIONS,
60
- ...(inject(TUI_ALERT_OPTIONS, { optional: true, skipSelf: true }) ||
61
- inject(TUI_NOTIFICATION_OPTIONS)),
62
- ...options,
63
- }),
64
- };
65
- }
66
-
67
- class TuiAlertService extends TuiNotificationService {
68
- constructor() {
69
- super(inject(TUI_ALERT_CONCURRENCY));
70
- this.options = inject(TUI_ALERT_OPTIONS);
71
- this.component = TuiAlertComponent;
72
- }
73
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAlertService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
74
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAlertService, providedIn: 'root' }); }
75
- }
76
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAlertService, decorators: [{
77
- type: Injectable,
78
- args: [{
79
- providedIn: 'root',
80
- }]
81
- }], ctorParameters: () => [] });
82
-
83
- class TuiAlert {
84
- constructor() {
85
- this.tuiAlertOptions = input({});
86
- }
87
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAlert, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
88
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiAlert, isStandalone: true, selector: "ng-template[tuiAlert]", inputs: { tuiAlertOptions: { classPropertyName: "tuiAlertOptions", publicName: "tuiAlertOptions", isSignal: true, isRequired: false, transformFunction: null } }, providers: [tuiAsPortal(TuiAlertService)], hostDirectives: [{ directive: i1$1.TuiPortalDirective, inputs: ["options", "tuiAlertOptions", "open", "tuiAlert"], outputs: ["openChange", "tuiAlertChange"] }], ngImport: i0 }); }
89
- }
90
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAlert, decorators: [{
91
- type: Directive,
92
- args: [{
93
- selector: 'ng-template[tuiAlert]',
94
- providers: [tuiAsPortal(TuiAlertService)],
95
- hostDirectives: [
96
- {
97
- directive: TuiPortalDirective,
98
- inputs: ['options: tuiAlertOptions', 'open: tuiAlert'],
99
- outputs: ['openChange: tuiAlertChange'],
100
- },
101
- ],
102
- }]
103
- }] });
104
-
105
- /**
106
- * Generated bundle index. Do not edit.
107
- */
108
-
109
- export { TUI_ALERT_CONCURRENCY, TUI_ALERT_DEFAULT_OPTIONS, TUI_ALERT_OPTIONS, TuiAlert, TuiAlertComponent, TuiAlertService, tuiAlertOptionsProvider };
110
- //# sourceMappingURL=taiga-ui-core-components-alert.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-core-components-alert.mjs","sources":["../../../projects/core/components/alert/alert.component.ts","../../../projects/core/components/alert/alert.template.html","../../../projects/core/components/alert/alert.tokens.ts","../../../projects/core/components/alert/alert.service.ts","../../../projects/core/components/alert/alert.directive.ts","../../../projects/core/components/alert/taiga-ui-core-components-alert.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {type TuiPortalContext} from '@taiga-ui/cdk/portals';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiNotification} from '@taiga-ui/core/components/notification';\nimport {TuiNotificationDirective} from '@taiga-ui/core/directives';\nimport {TuiTitle} from '@taiga-ui/core/directives/title';\nimport {TUI_CLOSE_WORD, TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {EMPTY, fromEvent, of, repeat, switchMap, takeUntil, timer} from 'rxjs';\n\nimport {type TuiAlertOptions} from './alert.interfaces';\n\n@Component({\n selector: 'tui-alert',\n imports: [PolymorpheusOutlet, TuiButton, TuiNotification, TuiTitle],\n templateUrl: './alert.template.html',\n styleUrl: './alert.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiAnimated, TuiNotificationDirective],\n host: {role: 'alert'},\n})\nexport class TuiAlertComponent<O, I> {\n private readonly el = tuiInjectElement();\n\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly close = inject(TUI_CLOSE_WORD);\n protected readonly item = injectContext<TuiPortalContext<TuiAlertOptions<I>, O>>();\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","<div class=\"t-wrapper\">\n <tui-notification\n size=\"m\"\n [appearance]=\"item.appearance\"\n [class.t-closable]=\"item.closable\"\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 @if (item.closable) {\n <button\n tuiIconButton\n type=\"button\"\n [iconStart]=\"icons.close\"\n (click)=\"item.$implicit.complete()\"\n >\n {{ close() }}\n </button>\n }\n </tui-notification>\n</div>\n","import {type FactoryProvider, inject, InjectionToken} from '@angular/core';\nimport {tuiCreateToken} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_NOTIFICATION_OPTIONS} from '@taiga-ui/core/components/notification';\n\nimport {type TuiAlertOptions} from './alert.interfaces';\n\nexport const TUI_ALERT_CONCURRENCY = tuiCreateToken<number>(5);\n\nexport const TUI_ALERT_DEFAULT_OPTIONS: Omit<TuiAlertOptions, 'appearance' | 'icon'> = {\n autoClose: 3000,\n label: '',\n closable: true,\n data: undefined,\n block: 'start',\n inline: 'end',\n};\n\nexport const TUI_ALERT_OPTIONS = new InjectionToken<TuiAlertOptions>(\n ngDevMode ? 'TUI_ALERT_OPTIONS' : '',\n {\n factory: () => ({\n ...TUI_ALERT_DEFAULT_OPTIONS,\n ...inject(TUI_NOTIFICATION_OPTIONS),\n }),\n },\n);\n\nexport function tuiAlertOptionsProvider(\n options: Partial<TuiAlertOptions>,\n): FactoryProvider {\n return {\n provide: TUI_ALERT_OPTIONS,\n useFactory: (): TuiAlertOptions => ({\n ...TUI_ALERT_DEFAULT_OPTIONS,\n ...(inject(TUI_ALERT_OPTIONS, {optional: true, skipSelf: true}) ||\n inject(TUI_NOTIFICATION_OPTIONS)),\n ...options,\n }),\n };\n}\n","import {inject, Injectable} from '@angular/core';\nimport {TuiNotificationService} from '@taiga-ui/core/directives/notification';\n\nimport {TuiAlertComponent} from './alert.component';\nimport {type TuiAlertOptions} from './alert.interfaces';\nimport {TUI_ALERT_CONCURRENCY, TUI_ALERT_OPTIONS} from './alert.tokens';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiAlertService extends TuiNotificationService<TuiAlertOptions<any>> {\n protected override readonly options = inject(TUI_ALERT_OPTIONS);\n protected override readonly component = TuiAlertComponent;\n\n constructor() {\n super(inject(TUI_ALERT_CONCURRENCY));\n }\n}\n","import {Directive, input} from '@angular/core';\nimport {tuiAsPortal, TuiPortalDirective} from '@taiga-ui/cdk/portals';\n\nimport {type TuiAlertOptions} from './alert.interfaces';\nimport {TuiAlertService} from './alert.service';\n\n@Directive({\n selector: 'ng-template[tuiAlert]',\n providers: [tuiAsPortal(TuiAlertService)],\n hostDirectives: [\n {\n directive: TuiPortalDirective,\n inputs: ['options: tuiAlertOptions', 'open: tuiAlert'],\n outputs: ['openChange: tuiAlertChange'],\n },\n ],\n})\nexport class TuiAlert<T> {\n public readonly tuiAlertOptions = input<Partial<TuiAlertOptions<T>>>({});\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;MAwBa,iBAAiB,CAAA;AAT9B,IAAA,WAAA,GAAA;QAUqB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AAErB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAChC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;QAC9B,IAAI,CAAA,IAAA,GAAG,aAAa,EAA2C;QAE/D,IAAG,CAAA,GAAA,GAAG,EAAE,CACvB,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,KAAK;AAC3B,cAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU;AAC1C,cAAE,IAAI,CAAC,IAAI,CAAC,SAAS;aAExB,IAAI,CACD,SAAS,CAAC,CAAC,SAAS,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,CAAC,EAChE,SAAS,CAAC,SAAS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;kBAXpB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,SAAS,EAAE,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;AACzC,oBAAA,cAAc,EAAE;AACZ,wBAAA;AACI,4BAAA,SAAS,EAAE,kBAAkB;AAC7B,4BAAA,MAAM,EAAE,CAAC,0BAA0B,EAAE,gBAAgB,CAAC;4BACtD,OAAO,EAAE,CAAC,4BAA4B,CAAC;AAC1C,yBAAA;AACJ,qBAAA;AACJ,iBAAA;;;AChBD;;AAEG;;;;"}
@@ -1,42 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { ChangeDetectionStrategy, ViewEncapsulation, Component, inject, input, Directive } from '@angular/core';
3
- import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
4
- import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
5
- import { tuiButtonOptionsProvider } from '@taiga-ui/core/components/button';
6
-
7
- const [TUI_HEADER_OPTIONS, tuiHeaderOptionsProvider] = tuiCreateOptions({ size: 'h5' });
8
- class Styles {
9
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
10
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: Styles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-header" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiHeader]{position:relative;display:flex;align-items:flex-start;box-sizing:content-box;color:var(--tui-text-primary);margin:0;text-align:start;overflow-wrap:break-word}[tuiHeader] p{margin:.25rem 0 0;font:var(--tui-font-text-m)}[tuiHeader] p:empty{display:none}[tuiHeader] [tuiTitle]{flex-grow:2;margin:0}[tuiHeader] [tuiTitle]:empty{display:none}[tuiHeader] [tuiAccessories]{display:flex;align-items:center;gap:.75rem;white-space:nowrap}[tuiHeader] [tuiAccessories]:has([tuiLink]){align-items:baseline}[tuiHeader] [tuiAccessories]:before{content:\"\\200b\";visibility:hidden}[tuiHeader] [tuiSubtitle]{font:var(--tui-font-text-m);color:var(--tui-text-secondary);margin:0}[tuiHeader] [tuiLink]{font:var(--tui-font-text-m)}[tuiHeader] [tuiCaption]{font:var(--tui-font-text-s);color:var(--tui-text-secondary);font-weight:500;text-transform:uppercase;margin:0}[tuiHeader][data-size=h1] [tuiTitle],[tuiHeader][data-size=h1] [tuiAccessories]{font:var(--tui-font-heading-1)}[tuiHeader][data-size=h2] [tuiTitle],[tuiHeader][data-size=h2] [tuiAccessories]{font:var(--tui-font-heading-2)}[tuiHeader][data-size=h3] [tuiTitle],[tuiHeader][data-size=h3] [tuiAccessories]{font:var(--tui-font-heading-3)}[tuiHeader][data-size=h4] [tuiTitle],[tuiHeader][data-size=h4] [tuiAccessories]{font:var(--tui-font-heading-4)}[tuiHeader][data-size=h5] [tuiTitle],[tuiHeader][data-size=h5] [tuiAccessories]{font:var(--tui-font-heading-5)}[tuiHeader][data-size=h6] [tuiTitle],[tuiHeader][data-size=h6] [tuiAccessories]{font:var(--tui-font-heading-6)}[tuiHeader][data-size=body-xl] [tuiTitle],[tuiHeader][data-size=body-xl] [tuiAccessories]{font:var(--tui-font-text-xl)}[tuiHeader][data-size=body-xl] [tuiTitle]{font-weight:700}[tuiHeader][data-size=body-l] [tuiTitle],[tuiHeader][data-size=body-l] [tuiAccessories]{font:var(--tui-font-text-l)}[tuiHeader][data-size=body-l] [tuiTitle]{font-weight:700}[tuiHeader][data-size=body-m] [tuiTitle],[tuiHeader][data-size=body-m] [tuiAccessories]{font:var(--tui-font-text-m)}[tuiHeader][data-size=body-m] [tuiTitle]{gap:.125rem;font-weight:700}[tuiHeader][data-size=body-m] [tuiSubtitle],[tuiHeader][data-size=body-l] [tuiSubtitle],[tuiHeader][data-size=body-m] [tuiLink],[tuiHeader][data-size=body-l] [tuiLink]{font:var(--tui-font-text-s)}[tuiHeader][data-size=h1] [tuiSubtitle],[tuiHeader][data-size=h2] [tuiSubtitle],[tuiHeader][data-size=h3] [tuiSubtitle],[tuiHeader][data-size=h1] [tuiLink],[tuiHeader][data-size=h2] [tuiLink],[tuiHeader][data-size=h3] [tuiLink]{font:var(--tui-font-text-l)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
11
- }
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, decorators: [{
13
- type: Component,
14
- args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tui-header' }, styles: ["[tuiHeader]{position:relative;display:flex;align-items:flex-start;box-sizing:content-box;color:var(--tui-text-primary);margin:0;text-align:start;overflow-wrap:break-word}[tuiHeader] p{margin:.25rem 0 0;font:var(--tui-font-text-m)}[tuiHeader] p:empty{display:none}[tuiHeader] [tuiTitle]{flex-grow:2;margin:0}[tuiHeader] [tuiTitle]:empty{display:none}[tuiHeader] [tuiAccessories]{display:flex;align-items:center;gap:.75rem;white-space:nowrap}[tuiHeader] [tuiAccessories]:has([tuiLink]){align-items:baseline}[tuiHeader] [tuiAccessories]:before{content:\"\\200b\";visibility:hidden}[tuiHeader] [tuiSubtitle]{font:var(--tui-font-text-m);color:var(--tui-text-secondary);margin:0}[tuiHeader] [tuiLink]{font:var(--tui-font-text-m)}[tuiHeader] [tuiCaption]{font:var(--tui-font-text-s);color:var(--tui-text-secondary);font-weight:500;text-transform:uppercase;margin:0}[tuiHeader][data-size=h1] [tuiTitle],[tuiHeader][data-size=h1] [tuiAccessories]{font:var(--tui-font-heading-1)}[tuiHeader][data-size=h2] [tuiTitle],[tuiHeader][data-size=h2] [tuiAccessories]{font:var(--tui-font-heading-2)}[tuiHeader][data-size=h3] [tuiTitle],[tuiHeader][data-size=h3] [tuiAccessories]{font:var(--tui-font-heading-3)}[tuiHeader][data-size=h4] [tuiTitle],[tuiHeader][data-size=h4] [tuiAccessories]{font:var(--tui-font-heading-4)}[tuiHeader][data-size=h5] [tuiTitle],[tuiHeader][data-size=h5] [tuiAccessories]{font:var(--tui-font-heading-5)}[tuiHeader][data-size=h6] [tuiTitle],[tuiHeader][data-size=h6] [tuiAccessories]{font:var(--tui-font-heading-6)}[tuiHeader][data-size=body-xl] [tuiTitle],[tuiHeader][data-size=body-xl] [tuiAccessories]{font:var(--tui-font-text-xl)}[tuiHeader][data-size=body-xl] [tuiTitle]{font-weight:700}[tuiHeader][data-size=body-l] [tuiTitle],[tuiHeader][data-size=body-l] [tuiAccessories]{font:var(--tui-font-text-l)}[tuiHeader][data-size=body-l] [tuiTitle]{font-weight:700}[tuiHeader][data-size=body-m] [tuiTitle],[tuiHeader][data-size=body-m] [tuiAccessories]{font:var(--tui-font-text-m)}[tuiHeader][data-size=body-m] [tuiTitle]{gap:.125rem;font-weight:700}[tuiHeader][data-size=body-m] [tuiSubtitle],[tuiHeader][data-size=body-l] [tuiSubtitle],[tuiHeader][data-size=body-m] [tuiLink],[tuiHeader][data-size=body-l] [tuiLink]{font:var(--tui-font-text-s)}[tuiHeader][data-size=h1] [tuiSubtitle],[tuiHeader][data-size=h2] [tuiSubtitle],[tuiHeader][data-size=h3] [tuiSubtitle],[tuiHeader][data-size=h1] [tuiLink],[tuiHeader][data-size=h2] [tuiLink],[tuiHeader][data-size=h3] [tuiLink]{font:var(--tui-font-text-l)}\n"] }]
15
- }] });
16
- class TuiHeader {
17
- constructor() {
18
- this.nothing = tuiWithStyles(Styles);
19
- this.options = inject(TUI_HEADER_OPTIONS);
20
- this.tuiHeader = input(this.options.size);
21
- }
22
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHeader, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
23
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiHeader, isStandalone: true, selector: "[tuiHeader]", inputs: { tuiHeader: { classPropertyName: "tuiHeader", publicName: "tuiHeader", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "tuiHeader": "" }, properties: { "attr.data-size": "tuiHeader() || options.size || \"h5\"" } }, providers: [tuiButtonOptionsProvider({ size: 's' })], ngImport: i0 }); }
24
- }
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHeader, decorators: [{
26
- type: Directive,
27
- args: [{
28
- selector: '[tuiHeader]',
29
- providers: [tuiButtonOptionsProvider({ size: 's' })],
30
- host: {
31
- tuiHeader: '',
32
- '[attr.data-size]': 'tuiHeader() || options.size || "h5"',
33
- },
34
- }]
35
- }] });
36
-
37
- /**
38
- * Generated bundle index. Do not edit.
39
- */
40
-
41
- export { TUI_HEADER_OPTIONS, TuiHeader, tuiHeaderOptionsProvider };
42
- //# sourceMappingURL=taiga-ui-core-components-header.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-core-components-header.mjs","sources":["../../../projects/core/components/header/header.directive.ts","../../../projects/core/components/header/taiga-ui-core-components-header.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\n\nexport const [TUI_HEADER_OPTIONS, tuiHeaderOptionsProvider] = tuiCreateOptions<{\n size: '' | 'body-l' | 'body-m' | 'body-xl' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n}>({size: 'h5'});\n\n@Component({\n template: '',\n styleUrl: './header.styles.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-header'},\n})\nclass Styles {}\n\n@Directive({\n selector: '[tuiHeader]',\n providers: [tuiButtonOptionsProvider({size: 's'})],\n host: {\n tuiHeader: '',\n '[attr.data-size]': 'tuiHeader() || options.size || \"h5\"',\n },\n})\nexport class TuiHeader {\n protected readonly nothing = tuiWithStyles(Styles);\n protected readonly options = inject(TUI_HEADER_OPTIONS);\n\n public readonly tuiHeader = input(this.options.size);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAYa,MAAA,CAAC,kBAAkB,EAAE,wBAAwB,CAAC,GAAG,gBAAgB,CAE3E,EAAC,IAAI,EAAE,IAAI,EAAC;AAEf,MAOM,MAAM,CAAA;+GAAN,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAN,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,MAAM,gHANE,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,m9EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAMV,MAAM,EAAA,UAAA,EAAA,CAAA;kBAPX,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAE,EAEG,aAAA,EAAA,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA,EAAC,KAAK,EAAE,YAAY,EAAC,EAAA,MAAA,EAAA,CAAA,m9EAAA,CAAA,EAAA;;MAYlB,SAAS,CAAA;AARtB,IAAA,WAAA,GAAA;AASuB,QAAA,IAAA,CAAA,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC;AAC/B,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,kBAAkB,CAAC;QAEvC,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;AACvD;+GALY,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAT,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,WAAA,EAAA,EAAA,EAAA,EAAA,UAAA,EAAA,EAAA,gBAAA,EAAA,uCAAA,EAAA,EAAA,EAAA,SAAA,EANP,CAAC,wBAAwB,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,CAAC,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAMzC,SAAS,EAAA,UAAA,EAAA,CAAA;kBARrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,aAAa;oBACvB,SAAS,EAAE,CAAC,wBAAwB,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,CAAC;AAClD,oBAAA,IAAI,EAAE;AACF,wBAAA,SAAS,EAAE,EAAE;AACb,wBAAA,kBAAkB,EAAE,qCAAqC;AAC5D,qBAAA;AACJ,iBAAA;;;AChCD;;AAEG;;;;"}
@@ -1,73 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { ChangeDetectionStrategy, ViewEncapsulation, Component, Directive, inject, Injectable } from '@angular/core';
3
- import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
4
- import { injectContext } from '@taiga-ui/polymorpheus';
5
- import { TuiPortal } from '@taiga-ui/cdk/portals';
6
- import { TuiPopupService } from '@taiga-ui/core/directives/popup';
7
-
8
- class Styles {
9
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
10
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: Styles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-notification-styles" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiPopover]{position:relative;display:grid;grid-column:1;place-self:start start;isolation:isolate;--tui-from: translateX(-100%)}[tuiPopover][data-inline=end]{justify-self:end;--tui-from: translateX(100%)}[tuiPopover][data-inline=center]{justify-self:center;--tui-from: translateY(-100%)}[tuiPopover][data-block=end]{align-self:end}[tuiPopover][data-block=end][data-inline=center]{--tui-from: translateY(100%)}[tuiPopover][data-block=end]:nth-of-type(1){grid-row:11}[tuiPopover][data-block=end]:nth-of-type(2){grid-row:12}[tuiPopover][data-block=end]:nth-of-type(3){grid-row:13}[tuiPopover][data-block=end]:nth-of-type(4){grid-row:14}[tuiPopover][data-block=end]:nth-of-type(5){grid-row:15}[tuiPopover][data-block=end]:nth-of-type(6){grid-row:16}[tuiPopover][data-block=end]:nth-of-type(7){grid-row:17}[tuiPopover][data-block=end]:nth-of-type(8){grid-row:18}[tuiPopover].tui-enter,[tuiPopover].tui-leave{animation-name:tuiFade,tuiSlide,tuiCollapse}[tuiPopover]:not(:first-of-type){margin-block-start:0}[tuiPopover]:not(:last-of-type){margin-block-end:0}[tuiPopover]:nth-of-type(1){grid-row:5}[tuiPopover]:nth-of-type(2){grid-row:6}[tuiPopover]:nth-of-type(3){grid-row:7}[tuiPopover]:nth-of-type(4){grid-row:8}[tuiPopover]:nth-of-type(5){grid-row:9}[tuiPopover]>*{grid-row:1 / span 2}[tuiPopover]>*:before,[tuiPopover]>*:after{content:\"\";display:block;block-size:.375rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
11
- }
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, decorators: [{
13
- type: Component,
14
- args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tui-notification-styles' }, styles: ["[tuiPopover]{position:relative;display:grid;grid-column:1;place-self:start start;isolation:isolate;--tui-from: translateX(-100%)}[tuiPopover][data-inline=end]{justify-self:end;--tui-from: translateX(100%)}[tuiPopover][data-inline=center]{justify-self:center;--tui-from: translateY(-100%)}[tuiPopover][data-block=end]{align-self:end}[tuiPopover][data-block=end][data-inline=center]{--tui-from: translateY(100%)}[tuiPopover][data-block=end]:nth-of-type(1){grid-row:11}[tuiPopover][data-block=end]:nth-of-type(2){grid-row:12}[tuiPopover][data-block=end]:nth-of-type(3){grid-row:13}[tuiPopover][data-block=end]:nth-of-type(4){grid-row:14}[tuiPopover][data-block=end]:nth-of-type(5){grid-row:15}[tuiPopover][data-block=end]:nth-of-type(6){grid-row:16}[tuiPopover][data-block=end]:nth-of-type(7){grid-row:17}[tuiPopover][data-block=end]:nth-of-type(8){grid-row:18}[tuiPopover].tui-enter,[tuiPopover].tui-leave{animation-name:tuiFade,tuiSlide,tuiCollapse}[tuiPopover]:not(:first-of-type){margin-block-start:0}[tuiPopover]:not(:last-of-type){margin-block-end:0}[tuiPopover]:nth-of-type(1){grid-row:5}[tuiPopover]:nth-of-type(2){grid-row:6}[tuiPopover]:nth-of-type(3){grid-row:7}[tuiPopover]:nth-of-type(4){grid-row:8}[tuiPopover]:nth-of-type(5){grid-row:9}[tuiPopover]>*{grid-row:1 / span 2}[tuiPopover]>*:before,[tuiPopover]>*:after{content:\"\";display:block;block-size:.375rem}\n"] }]
15
- }] });
16
- class TuiNotificationDirective {
17
- constructor() {
18
- this.nothing = tuiWithStyles(Styles);
19
- this.context = injectContext();
20
- }
21
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNotificationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
22
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiNotificationDirective, isStandalone: true, host: { attributes: { "role": "alert", "tuiPopover": "" }, properties: { "attr.data-block": "context.block", "attr.data-inline": "context.inline" } }, ngImport: i0 }); }
23
- }
24
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNotificationDirective, decorators: [{
25
- type: Directive,
26
- args: [{
27
- host: {
28
- role: 'alert',
29
- tuiPopover: '',
30
- '[attr.data-block]': 'context.block',
31
- '[attr.data-inline]': 'context.inline',
32
- },
33
- }]
34
- }] });
35
-
36
- class TuiNotificationService extends TuiPortal {
37
- constructor(concurrency) {
38
- super(inject(TuiPopupService));
39
- this.current = new Map();
40
- this.queue = new Set();
41
- this.concurrency = Math.min(concurrency, 5);
42
- }
43
- add(component) {
44
- if (this.current.size < this.concurrency) {
45
- this.current.set(component, this.service.add(component));
46
- }
47
- else {
48
- this.queue.add(component);
49
- }
50
- return () => {
51
- this.current.get(component)?.destroy();
52
- this.current.delete(component);
53
- this.queue.delete(component);
54
- const [next] = this.queue;
55
- if (this.current.size < this.concurrency && next) {
56
- this.current.set(next, this.service.add(next));
57
- this.queue.delete(next);
58
- }
59
- };
60
- }
61
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNotificationService, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable }); }
62
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNotificationService }); }
63
- }
64
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNotificationService, decorators: [{
65
- type: Injectable
66
- }], ctorParameters: () => [{ type: undefined }] });
67
-
68
- /**
69
- * Generated bundle index. Do not edit.
70
- */
71
-
72
- export { TuiNotificationDirective, TuiNotificationService };
73
- //# sourceMappingURL=taiga-ui-core-directives-notification.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-core-directives-notification.mjs","sources":["../../../projects/core/directives/notification/notification.directive.ts","../../../projects/core/directives/notification/notification.service.ts","../../../projects/core/directives/notification/taiga-ui-core-directives-notification.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {injectContext} from '@taiga-ui/polymorpheus';\n\nexport interface TuiPositionOptions {\n readonly block: 'end' | 'start';\n readonly inline: 'center' | 'end' | 'start';\n}\n\n@Component({\n template: '',\n styleUrl: './notification.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-notification-styles'},\n})\nclass Styles {}\n\n@Directive({\n host: {\n role: 'alert',\n tuiPopover: '',\n '[attr.data-block]': 'context.block',\n '[attr.data-inline]': 'context.inline',\n },\n})\nexport class TuiNotificationDirective {\n protected readonly nothing = tuiWithStyles(Styles);\n protected readonly context = injectContext<TuiPositionOptions>();\n}\n","import {type ComponentRef, inject, Injectable} from '@angular/core';\nimport {TuiPortal} from '@taiga-ui/cdk/portals';\nimport {TuiPopupService} from '@taiga-ui/core/directives/popup';\nimport {type PolymorpheusComponent} from '@taiga-ui/polymorpheus';\n\n@Injectable()\nexport abstract class TuiNotificationService<T, K = void> extends TuiPortal<T, K> {\n private readonly concurrency: number;\n private readonly current = new Map<unknown, ComponentRef<unknown>>();\n private readonly queue = new Set<PolymorpheusComponent<unknown>>();\n\n constructor(concurrency: number) {\n super(inject(TuiPopupService));\n this.concurrency = Math.min(concurrency, 5);\n }\n\n protected override add(component: PolymorpheusComponent<unknown>): () => void {\n if (this.current.size < this.concurrency) {\n this.current.set(component, this.service.add(component));\n } else {\n this.queue.add(component);\n }\n\n return () => {\n this.current.get(component)?.destroy();\n this.current.delete(component);\n this.queue.delete(component);\n\n const [next] = this.queue;\n\n if (this.current.size < this.concurrency && next) {\n this.current.set(next, this.service.add(next));\n this.queue.delete(next);\n }\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAcA,MAOM,MAAM,CAAA;+GAAN,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAN,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,MAAM,6HANE,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,g2CAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAMV,MAAM,EAAA,UAAA,EAAA,CAAA;kBAPX,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAE,EAEG,aAAA,EAAA,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA,EAAC,KAAK,EAAE,yBAAyB,EAAC,EAAA,MAAA,EAAA,CAAA,g2CAAA,CAAA,EAAA;;MAY/B,wBAAwB,CAAA;AARrC,IAAA,WAAA,GAAA;AASuB,QAAA,IAAA,CAAA,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC;QAC/B,IAAO,CAAA,OAAA,GAAG,aAAa,EAAsB;AACnE;+GAHY,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EA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