@taiga-ui/core 3.36.2 → 3.37.0-dev.main.89945b8

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 (65) hide show
  1. package/bundles/taiga-ui-core-components-alert.umd.js +1 -1
  2. package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
  3. package/bundles/taiga-ui-core-components-button.umd.js +1 -1
  4. package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
  5. package/bundles/taiga-ui-core-components-notification.umd.js +21 -21
  6. package/bundles/taiga-ui-core-components-notification.umd.js.map +1 -1
  7. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +10 -6
  8. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
  9. package/bundles/taiga-ui-core-components-root.umd.js +1 -1
  10. package/bundles/taiga-ui-core-components-scroll-controls.umd.js +1 -1
  11. package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
  12. package/bundles/taiga-ui-core-constants.umd.js +9 -0
  13. package/bundles/taiga-ui-core-constants.umd.js.map +1 -1
  14. package/bundles/taiga-ui-core-directives-dropdown.umd.js +1 -1
  15. package/bundles/taiga-ui-core-directives-hint.umd.js +1 -1
  16. package/bundles/taiga-ui-core-tokens.umd.js +8 -4
  17. package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
  18. package/bundles/taiga-ui-core-utils-miscellaneous.umd.js +7 -5
  19. package/bundles/taiga-ui-core-utils-miscellaneous.umd.js.map +1 -1
  20. package/components/notification/notification.component.d.ts +9 -8
  21. package/components/notification/notification.module.d.ts +2 -1
  22. package/components/primitive-textfield/primitive-textfield.component.d.ts +1 -0
  23. package/constants/cache-basting-payload.d.ts +1 -1
  24. package/constants/index.d.ts +1 -0
  25. package/constants/notification-status-icons.d.ts +7 -0
  26. package/esm2015/components/alert/alert.component.js +2 -2
  27. package/esm2015/components/button/button.component.js +1 -1
  28. package/esm2015/components/notification/notification.component.js +17 -16
  29. package/esm2015/components/notification/notification.module.js +5 -4
  30. package/esm2015/components/primitive-textfield/primitive-textfield.component.js +9 -6
  31. package/esm2015/components/primitive-textfield/textfield/textfield.component.js +1 -1
  32. package/esm2015/components/root/root.component.js +1 -1
  33. package/esm2015/components/scroll-controls/scroll-controls.component.js +2 -2
  34. package/esm2015/constants/index.js +2 -1
  35. package/esm2015/constants/notification-status-icons.js +8 -0
  36. package/esm2015/directives/dropdown/dropdown.component.js +1 -1
  37. package/esm2015/directives/hint/hint.component.js +1 -1
  38. package/esm2015/interfaces/alert-options.js +1 -1
  39. package/esm2015/tokens/notification-options.js +3 -1
  40. package/esm2015/utils/miscellaneous/get-border.js +7 -6
  41. package/fesm2015/taiga-ui-core-components-alert.js +1 -1
  42. package/fesm2015/taiga-ui-core-components-alert.js.map +1 -1
  43. package/fesm2015/taiga-ui-core-components-button.js +1 -1
  44. package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
  45. package/fesm2015/taiga-ui-core-components-notification.js +21 -19
  46. package/fesm2015/taiga-ui-core-components-notification.js.map +1 -1
  47. package/fesm2015/taiga-ui-core-components-primitive-textfield.js +10 -7
  48. package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  49. package/fesm2015/taiga-ui-core-components-root.js +1 -1
  50. package/fesm2015/taiga-ui-core-components-scroll-controls.js +1 -1
  51. package/fesm2015/taiga-ui-core-components-scroll-controls.js.map +1 -1
  52. package/fesm2015/taiga-ui-core-constants.js +9 -1
  53. package/fesm2015/taiga-ui-core-constants.js.map +1 -1
  54. package/fesm2015/taiga-ui-core-directives-dropdown.js +1 -1
  55. package/fesm2015/taiga-ui-core-directives-hint.js +1 -1
  56. package/fesm2015/taiga-ui-core-tokens.js +2 -1
  57. package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
  58. package/fesm2015/taiga-ui-core-utils-miscellaneous.js +6 -5
  59. package/fesm2015/taiga-ui-core-utils-miscellaneous.js.map +1 -1
  60. package/interfaces/alert-options.d.ts +2 -2
  61. package/package.json +4 -4
  62. package/styles/mixins/textfield.less +46 -34
  63. package/styles/mixins/textfield.scss +85 -36
  64. package/tokens/notification-options.d.ts +6 -0
  65. package/utils/miscellaneous/get-border.d.ts +2 -1
@@ -1,4 +1,5 @@
1
1
  import { tuiCreateOptions, tuiProvideOptions } from '@taiga-ui/cdk';
2
+ import { STATUS_ICONS } from '@taiga-ui/core/constants';
2
3
  import { TuiNotification } from '@taiga-ui/core/enums';
3
4
  /** Default values for the notification options. */
4
5
  export const TUI_NOTIFICATION_DEFAULT_OPTIONS = {
@@ -8,6 +9,7 @@ export const TUI_NOTIFICATION_DEFAULT_OPTIONS = {
8
9
  hasIcon: true,
9
10
  hasCloseButton: true,
10
11
  defaultAutoCloseTime: 3000,
12
+ icon: ({ $implicit }) => STATUS_ICONS[$implicit],
11
13
  };
12
14
  /**
13
15
  * Default parameters for notification alert component
@@ -16,4 +18,4 @@ export const TUI_NOTIFICATION_OPTIONS = tuiCreateOptions(TUI_NOTIFICATION_DEFAUL
16
18
  export function tuiNotificationOptionsProvider(options) {
17
19
  return tuiProvideOptions(TUI_NOTIFICATION_OPTIONS, options, TUI_NOTIFICATION_DEFAULT_OPTIONS);
18
20
  }
19
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9uLW9wdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL3Rva2Vucy9ub3RpZmljYXRpb24tb3B0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUMsZ0JBQWdCLEVBQUUsaUJBQWlCLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDbEUsT0FBTyxFQUFDLGVBQWUsRUFBQyxNQUFNLHNCQUFzQixDQUFDO0FBUXJELG1EQUFtRDtBQUNuRCxNQUFNLENBQUMsTUFBTSxnQ0FBZ0MsR0FBa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dHRvbjogdHJ1ZSxcbiAgICBkZWZhdWx0QXV0b0Nsb3NlVGltZTogMzAwMCxcbiAgICBpY29uOiAoeyRpbXBsaWNpdH0pID0+IFNUQVRVU19JQ09OU1skaW1wbGljaXRdLFxufTtcblxuLyoqXG4gKiBEZWZhdWx0IHBhcmFtZXRlcnMgZm9yIG5vdGlmaWNhdGlvbiBhbGVydCBjb21wb25lbnRcbiAqL1xuZXhwb3J0IGNvbnN0IFRVSV9OT1RJRklDQVRJT05fT1BUSU9OUyA9IHR1aUNyZWF0ZU9wdGlvbnMoXG4gICAgVFVJX05PVElGSUNBVElPTl9ERUZBVUxUX09QVElPTlMsXG4pO1xuXG5leHBvcnQgZnVuY3Rpb24gdHVpTm90aWZpY2F0aW9uT3B0aW9uc1Byb3ZpZGVyKFxuICAgIG9wdGlvbnM6IFBhcnRpYWw8VHVpTm90aWZpY2F0aW9uRGVmYXVsdE9wdGlvbnM+LFxuKTogUHJvdmlkZXIge1xuICAgIHJldHVybiB0dWlQcm92aWRlT3B0aW9ucyhcbiAgICAgICAgVFVJX05PVElGSUNBVElPTl9PUFRJT05TLFxuICAgICAgICBvcHRpb25zLFxuICAgICAgICBUVUlfTk9USUZJQ0FUSU9OX0RFRkFVTFRfT1BUSU9OUyxcbiAgICApO1xufVxuIl19
@@ -1,19 +1,20 @@
1
1
  const ITEM_SIZE = 1.5;
2
2
  const CONTENT_SIZE = 2.5;
3
- export function tuiGetBorder(hasIcon, hasCleaner = false, hasTooltip = false, hasContent = false) {
3
+ export function tuiGetBorder(hasIcon, hasCleaner = false, hasTooltip = false, hasContent = false, size = `m`) {
4
+ const offset = size === `s` ? 0 : 0.25;
4
5
  let border = 0;
5
6
  if (hasIcon) {
6
- border += ITEM_SIZE;
7
+ border += ITEM_SIZE + offset;
7
8
  }
8
9
  if (hasCleaner) {
9
- border += ITEM_SIZE;
10
+ border += ITEM_SIZE + offset;
10
11
  }
11
12
  if (hasTooltip) {
12
- border += ITEM_SIZE;
13
+ border += ITEM_SIZE + offset;
13
14
  }
14
15
  if (hasContent) {
15
- border += CONTENT_SIZE;
16
+ border += CONTENT_SIZE + offset;
16
17
  }
17
18
  return border;
18
19
  }
19
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LWJvcmRlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvcmUvdXRpbHMvbWlzY2VsbGFuZW91cy9nZXQtYm9yZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sU0FBUyxHQUFHLEdBQUcsQ0FBQztBQUN0QixNQUFNLFlBQVksR0FBRyxHQUFHLENBQUM7QUFFekIsTUFBTSxVQUFVLFlBQVksQ0FDeEIsT0FBZ0IsRUFDaEIsYUFBc0IsS0FBSyxFQUMzQixhQUFzQixLQUFLLEVBQzNCLGFBQXNCLEtBQUs7SUFFM0IsSUFBSSxNQUFNLEdBQUcsQ0FBQyxDQUFDO0lBRWYsSUFBSSxPQUFPLEVBQUU7UUFDVCxNQUFNLElBQUksU0FBUyxDQUFDO0tBQ3ZCO0lBRUQsSUFBSSxVQUFVLEVBQUU7UUFDWixNQUFNLElBQUksU0FBUyxDQUFDO0tBQ3ZCO0lBRUQsSUFBSSxVQUFVLEVBQUU7UUFDWixNQUFNLElBQUksU0FBUyxDQUFDO0tBQ3ZCO0lBRUQsSUFBSSxVQUFVLEVBQUU7UUFDWixNQUFNLElBQUksWUFBWSxDQUFDO0tBQzFCO0lBRUQsT0FBTyxNQUFNLENBQUM7QUFDbEIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImNvbnN0IElURU1fU0laRSA9IDEuNTtcbmNvbnN0IENPTlRFTlRfU0laRSA9IDIuNTtcblxuZXhwb3J0IGZ1bmN0aW9uIHR1aUdldEJvcmRlcihcbiAgICBoYXNJY29uOiBib29sZWFuLFxuICAgIGhhc0NsZWF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kZXIgKz0gSVRFTV9TSVpFICsgb2Zmc2V0O1xuICAgIH1cblxuICAgIGlmIChoYXNUb29sdGlwKSB7XG4gICAgICAgIGJvcmRlciArPSBJVEVNX1NJWkUgKyBvZmZzZXQ7XG4gICAgfVxuXG4gICAgaWYgKGhhc0NvbnRlbnQpIHtcbiAgICAgICAgYm9yZGVyICs9IENPTlRFTlRfU0laRSArIG9mZnNldDtcbiAgICB9XG5cbiAgICByZXR1cm4gYm9yZGVyO1xufVxuIl19
@@ -53,7 +53,7 @@ class TuiAlertComponent {
53
53
  }
54
54
  }
55
55
  TuiAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiAlertComponent, deps: [{ token: ElementRef }, { token: TuiDestroyService, self: true }, { token: TUI_NOTIFICATION_OPTIONS }, { token: TUI_ANIMATION_OPTIONS }, { token: POLYMORPHEUS_CONTEXT }], target: i0.ɵɵFactoryTarget.Component });
56
- TuiAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiAlertComponent, selector: "tui-alert", host: { attributes: { "role": "alert" }, properties: { "@tuiFadeIn": "animation", "@tuiSlideInRight": "animation", "@tuiHeightCollapse": "animation" } }, providers: [TuiDestroyService], ngImport: i0, template: "<tui-notification\n [status]=\"item.status\"\n [hasIcon]=\"item.hasIcon\"\n [hideClose]=\"!item.hasCloseButton\"\n (close)=\"closeNotification()\"\n>\n <label\n *ngIf=\"item.label\"\n automation-id=\"tui-notification-alert__heading\"\n class=\"t-heading\"\n >\n <!-- TODO: Polymorpheus fix type -->\n <ng-container *polymorpheusOutlet=\"$any(item.label) as text; context: item\">\n {{ text }}\n </ng-container>\n </label>\n <div\n automation-id=\"tui-notification-alert__content\"\n class=\"t-content\"\n >\n <!-- TODO: Polymorpheus fix type -->\n <div\n *polymorpheusOutlet=\"item.content as text; context: $any(item)\"\n [innerHTML]=\"text\"\n ></div>\n </div>\n</tui-notification>\n", styles: [":host{box-shadow:0 1.5rem 1rem #00000008,0 .75rem .75rem #0000000a,0 .25rem .375rem #0000000d;display:block;border-radius:var(--tui-radius-m);width:18rem;margin:2rem 3rem 0 auto}:host-context(tui-root._mobile) :host{margin:1rem 1rem 0 auto}:host:not(:first-child){margin-top:.75rem}.t-heading{font:var(--tui-font-text-m);line-height:1.25rem;font-weight:bold;margin:0}.t-content{color:var(--tui-text-01);word-wrap:break-word}.t-content:empty{display:none}\n"], components: [{ type: i1.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "status", "hideClose"], outputs: ["close"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], animations: [tuiFadeIn, tuiSlideInRight, tuiHeightCollapse], changeDetection: i0.ChangeDetectionStrategy.OnPush });
56
+ TuiAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiAlertComponent, selector: "tui-alert", host: { attributes: { "role": "alert" }, properties: { "@tuiFadeIn": "animation", "@tuiSlideInRight": "animation", "@tuiHeightCollapse": "animation" } }, providers: [TuiDestroyService], ngImport: i0, template: "<tui-notification\n [status]=\"item.status\"\n [hasIcon]=\"item.hasIcon\"\n [hideClose]=\"!item.hasCloseButton\"\n (close)=\"closeNotification()\"\n>\n <label\n *ngIf=\"item.label\"\n automation-id=\"tui-notification-alert__heading\"\n class=\"t-heading\"\n >\n <!-- TODO: Polymorpheus fix type -->\n <ng-container *polymorpheusOutlet=\"$any(item.label) as text; context: item\">\n {{ text }}\n </ng-container>\n </label>\n <div\n automation-id=\"tui-notification-alert__content\"\n class=\"t-content\"\n >\n <!-- TODO: Polymorpheus fix type -->\n <div\n *polymorpheusOutlet=\"item.content as text; context: $any(item)\"\n [innerHTML]=\"text\"\n ></div>\n </div>\n</tui-notification>\n", styles: [":host{box-shadow:0 1.5rem 1rem #00000008,0 .75rem .75rem #0000000a,0 .25rem .375rem #0000000d;display:block;border-radius:var(--tui-radius-m);width:18rem;margin:2rem 3rem 0 auto}:host-context(tui-root._mobile) :host{margin:1rem 1rem 0 auto}:host:not(:first-child){margin-top:.75rem}.t-heading{font:var(--tui-font-text-m);line-height:1.25rem;font-weight:bold;margin:0}.t-content{color:var(--tui-text-01);word-wrap:break-word}.t-content:empty{display:none}\n"], components: [{ type: i1.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "icon", "status", "hideClose"], outputs: ["close"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], animations: [tuiFadeIn, tuiSlideInRight, tuiHeightCollapse], changeDetection: i0.ChangeDetectionStrategy.OnPush });
57
57
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiAlertComponent, decorators: [{
58
58
  type: Component,
59
59
  args: [{
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-alert.js","sources":["../../../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/alert.module.ts","../../../projects/core/components/alert/taiga-ui-core-components-alert.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n OnInit,\n Self,\n} from '@angular/core';\nimport {TuiDestroyService, TuiDialog, tuiIsNumber} from '@taiga-ui/cdk';\nimport {tuiFadeIn, tuiHeightCollapse, tuiSlideInRight} from '@taiga-ui/core/animations';\nimport {TuiAlertOptions} from '@taiga-ui/core/interfaces';\nimport {\n TUI_ANIMATION_OPTIONS,\n TUI_NOTIFICATION_OPTIONS,\n TuiNotificationDefaultOptions,\n} from '@taiga-ui/core/tokens';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\nimport {fromEvent, timer} from 'rxjs';\nimport {repeatWhen, takeUntil} from 'rxjs/operators';\n\n// TODO: get rid of $any in template\n@Component({\n selector: 'tui-alert',\n templateUrl: './alert.template.html',\n styleUrls: ['./alert.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService],\n animations: [tuiFadeIn, tuiSlideInRight, tuiHeightCollapse],\n host: {\n role: 'alert',\n '[@tuiFadeIn]': 'animation',\n '[@tuiSlideInRight]': 'animation',\n '[@tuiHeightCollapse]': 'animation',\n },\n})\nexport class TuiAlertComponent<O, I> implements OnInit {\n private readonly autoClose =\n typeof this.item.autoClose === 'function'\n ? this.item.autoClose(this.item.status)\n : this.item.autoClose;\n\n constructor(\n @Inject(ElementRef) private readonly el: ElementRef<HTMLElement>,\n @Self() @Inject(TuiDestroyService) private readonly destroy$: TuiDestroyService,\n @Inject(TUI_NOTIFICATION_OPTIONS)\n private readonly options: TuiNotificationDefaultOptions,\n @Inject(TUI_ANIMATION_OPTIONS) readonly animation: AnimationOptions,\n @Inject(POLYMORPHEUS_CONTEXT) readonly item: TuiDialog<TuiAlertOptions<I>, O>,\n ) {}\n\n ngOnInit(): void {\n this.initAutoClose();\n }\n\n closeNotification(): void {\n this.item.$implicit.complete();\n }\n\n private initAutoClose(): void {\n if (!this.autoClose) {\n return;\n }\n\n timer(\n tuiIsNumber(this.autoClose)\n ? this.autoClose\n : this.options.defaultAutoCloseTime,\n )\n .pipe(\n takeUntil(fromEvent(this.el.nativeElement, 'mouseenter')),\n /**\n * TODO: replace to\n * repeat({\n * delay: () => fromEvent(this.el.nativeElement, 'mouseleave'),\n * })\n *\n * in RxJS 7\n */\n // eslint-disable-next-line rxjs/no-ignored-notifier\n repeatWhen(() => fromEvent(this.el.nativeElement, 'mouseleave')),\n takeUntil(this.destroy$),\n )\n .subscribe(() => this.closeNotification());\n }\n}\n","<tui-notification\n [status]=\"item.status\"\n [hasIcon]=\"item.hasIcon\"\n [hideClose]=\"!item.hasCloseButton\"\n (close)=\"closeNotification()\"\n>\n <label\n *ngIf=\"item.label\"\n automation-id=\"tui-notification-alert__heading\"\n class=\"t-heading\"\n >\n <!-- TODO: Polymorpheus fix type -->\n <ng-container *polymorpheusOutlet=\"$any(item.label) as text; context: item\">\n {{ text }}\n </ng-container>\n </label>\n <div\n automation-id=\"tui-notification-alert__content\"\n class=\"t-content\"\n >\n <!-- TODO: Polymorpheus fix type -->\n <div\n *polymorpheusOutlet=\"item.content as text; context: $any(item)\"\n [innerHTML]=\"text\"\n ></div>\n </div>\n</tui-notification>\n","import {Inject, Injectable} from '@angular/core';\nimport {AbstractTuiDialogService, TuiIdService} from '@taiga-ui/cdk';\nimport {TuiAlertOptions} from '@taiga-ui/core/interfaces';\nimport {TUI_NOTIFICATION_OPTIONS} from '@taiga-ui/core/tokens';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiAlertComponent} from './alert.component';\n\n@Injectable({providedIn: `root`})\nexport class TuiAlertService extends AbstractTuiDialogService<TuiAlertOptions<any>> {\n protected readonly component = new PolymorpheusComponent(TuiAlertComponent);\n\n constructor(\n @Inject(TUI_NOTIFICATION_OPTIONS)\n protected readonly defaultOptions: TuiAlertOptions<any>,\n @Inject(TuiIdService) idService: TuiIdService,\n ) {\n super(idService);\n }\n}\n","import {Directive} from '@angular/core';\nimport {AbstractTuiDialogDirective, AbstractTuiDialogService} from '@taiga-ui/cdk';\nimport {TuiAlertOptions} from '@taiga-ui/core/interfaces';\n\nimport {TuiAlertService} from './alert.service';\n\n@Directive({\n selector: 'ng-template[tuiAlert]',\n providers: [\n {\n provide: AbstractTuiDialogService,\n useExisting: TuiAlertService,\n },\n ],\n inputs: ['options: tuiAlertOptions', 'open: tuiAlert'],\n outputs: ['openChange: tuiAlertChange'],\n})\nexport class TuiAlertDirective<T> extends AbstractTuiDialogDirective<\n TuiAlertOptions<T>\n> {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {tuiAsAlerts} from '@taiga-ui/cdk';\nimport {TuiNotificationModule} from '@taiga-ui/core/components/notification';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiAlertComponent} from './alert.component';\nimport {TuiAlertDirective} from './alert.directive';\nimport {TuiAlertService} from './alert.service';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiNotificationModule],\n declarations: [TuiAlertComponent, TuiAlertDirective],\n exports: [TuiAlertComponent, TuiAlertDirective],\n providers: [tuiAsAlerts(TuiAlertService)],\n})\nexport class TuiAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAqBA;MAea,iBAAiB,CAAA;IAM1B,WACyC,CAAA,EAA2B,EACZ,QAA2B,EAE9D,OAAsC,EACf,SAA2B,EAC5B,IAAsC,EAAA;QALxC,IAAE,CAAA,EAAA,GAAF,EAAE,CAAyB;QACZ,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAmB;QAE9D,IAAO,CAAA,OAAA,GAAP,OAAO,CAA+B;QACf,IAAS,CAAA,SAAA,GAAT,SAAS,CAAkB;QAC5B,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAkC;QAXhE,IAAS,CAAA,SAAA,GACtB,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,KAAK,UAAU;AACrC,cAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;AACvC,cAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;KAS1B;IAEJ,QAAQ,GAAA;QACJ,IAAI,CAAC,aAAa,EAAE,CAAC;KACxB;IAED,iBAAiB,GAAA;AACb,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ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A,CAAA,CAAA;AAGrC,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAFZ,SAAA,EAAA,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,EAHhC,OAAA,EAAA,CAAA,CAAC,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,CAAC,CAAA,EAAA,CAAA,CAAA;4FAKzD,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,CAAC;AAClE,oBAAA,YAAY,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;AACpD,oBAAA,OAAO,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;AAC/C,oBAAA,SAAS,EAAE,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;AAC5C,iBAAA,CAAA;;;ACfD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-alert.js","sources":["../../../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/alert.module.ts","../../../projects/core/components/alert/taiga-ui-core-components-alert.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n OnInit,\n Self,\n} from '@angular/core';\nimport {TuiDestroyService, TuiDialog, tuiIsNumber} from '@taiga-ui/cdk';\nimport {tuiFadeIn, tuiHeightCollapse, tuiSlideInRight} from '@taiga-ui/core/animations';\nimport {TuiAlertOptions} from '@taiga-ui/core/interfaces';\nimport {\n TUI_ANIMATION_OPTIONS,\n TUI_NOTIFICATION_OPTIONS,\n TuiNotificationDefaultOptions,\n} from '@taiga-ui/core/tokens';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\nimport {fromEvent, timer} from 'rxjs';\nimport {repeatWhen, takeUntil} from 'rxjs/operators';\n\n// TODO: get rid of $any in template\n@Component({\n selector: 'tui-alert',\n templateUrl: './alert.template.html',\n styleUrls: ['./alert.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService],\n animations: [tuiFadeIn, tuiSlideInRight, tuiHeightCollapse],\n host: {\n role: 'alert',\n '[@tuiFadeIn]': 'animation',\n '[@tuiSlideInRight]': 'animation',\n '[@tuiHeightCollapse]': 'animation',\n },\n})\nexport class TuiAlertComponent<O, I> implements OnInit {\n private readonly autoClose =\n typeof this.item.autoClose === 'function'\n ? this.item.autoClose(this.item.status)\n : this.item.autoClose;\n\n constructor(\n @Inject(ElementRef) private readonly el: ElementRef<HTMLElement>,\n @Self() @Inject(TuiDestroyService) private readonly destroy$: TuiDestroyService,\n @Inject(TUI_NOTIFICATION_OPTIONS)\n private readonly options: TuiNotificationDefaultOptions,\n @Inject(TUI_ANIMATION_OPTIONS) readonly animation: AnimationOptions,\n @Inject(POLYMORPHEUS_CONTEXT) readonly item: TuiDialog<TuiAlertOptions<I>, O>,\n ) {}\n\n ngOnInit(): void {\n this.initAutoClose();\n }\n\n closeNotification(): void {\n this.item.$implicit.complete();\n }\n\n private initAutoClose(): void {\n if (!this.autoClose) {\n return;\n }\n\n timer(\n tuiIsNumber(this.autoClose)\n ? this.autoClose\n : this.options.defaultAutoCloseTime,\n )\n .pipe(\n takeUntil(fromEvent(this.el.nativeElement, 'mouseenter')),\n /**\n * TODO: replace to\n * repeat({\n * delay: () => fromEvent(this.el.nativeElement, 'mouseleave'),\n * })\n *\n * in RxJS 7\n */\n // eslint-disable-next-line rxjs/no-ignored-notifier\n repeatWhen(() => fromEvent(this.el.nativeElement, 'mouseleave')),\n takeUntil(this.destroy$),\n )\n .subscribe(() => this.closeNotification());\n }\n}\n","<tui-notification\n [status]=\"item.status\"\n [hasIcon]=\"item.hasIcon\"\n [hideClose]=\"!item.hasCloseButton\"\n (close)=\"closeNotification()\"\n>\n <label\n *ngIf=\"item.label\"\n automation-id=\"tui-notification-alert__heading\"\n class=\"t-heading\"\n >\n <!-- TODO: Polymorpheus fix type -->\n <ng-container *polymorpheusOutlet=\"$any(item.label) as text; context: item\">\n {{ text }}\n </ng-container>\n </label>\n <div\n automation-id=\"tui-notification-alert__content\"\n class=\"t-content\"\n >\n <!-- TODO: Polymorpheus fix type -->\n <div\n *polymorpheusOutlet=\"item.content as text; context: $any(item)\"\n [innerHTML]=\"text\"\n ></div>\n </div>\n</tui-notification>\n","import {Inject, Injectable} from '@angular/core';\nimport {AbstractTuiDialogService, TuiIdService} from '@taiga-ui/cdk';\nimport {TuiAlertOptions} from '@taiga-ui/core/interfaces';\nimport {TUI_NOTIFICATION_OPTIONS} from '@taiga-ui/core/tokens';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiAlertComponent} from './alert.component';\n\n@Injectable({providedIn: `root`})\nexport class TuiAlertService extends AbstractTuiDialogService<TuiAlertOptions<any>> {\n protected readonly component = new PolymorpheusComponent(TuiAlertComponent);\n\n constructor(\n @Inject(TUI_NOTIFICATION_OPTIONS)\n protected readonly defaultOptions: TuiAlertOptions<any>,\n @Inject(TuiIdService) idService: TuiIdService,\n ) {\n super(idService);\n }\n}\n","import {Directive} from '@angular/core';\nimport {AbstractTuiDialogDirective, AbstractTuiDialogService} from '@taiga-ui/cdk';\nimport {TuiAlertOptions} from '@taiga-ui/core/interfaces';\n\nimport {TuiAlertService} from './alert.service';\n\n@Directive({\n selector: 'ng-template[tuiAlert]',\n providers: [\n {\n provide: AbstractTuiDialogService,\n useExisting: TuiAlertService,\n },\n ],\n inputs: ['options: tuiAlertOptions', 'open: tuiAlert'],\n outputs: ['openChange: tuiAlertChange'],\n})\nexport class TuiAlertDirective<T> extends AbstractTuiDialogDirective<\n TuiAlertOptions<T>\n> {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {tuiAsAlerts} from '@taiga-ui/cdk';\nimport {TuiNotificationModule} from '@taiga-ui/core/components/notification';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiAlertComponent} from './alert.component';\nimport {TuiAlertDirective} from './alert.directive';\nimport {TuiAlertService} from './alert.service';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiNotificationModule],\n declarations: [TuiAlertComponent, TuiAlertDirective],\n exports: [TuiAlertComponent, TuiAlertDirective],\n providers: [tuiAsAlerts(TuiAlertService)],\n})\nexport class TuiAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAqBA;MAea,iBAAiB,CAAA;IAM1B,WACyC,CAAA,EAA2B,EACZ,QAA2B,EAE9D,OAAsC,EACf,SAA2B,EAC5B,IAAsC,EAAA;QALxC,IAAE,CAAA,EAAA,GAAF,EAAE,CAAyB;QACZ,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAmB;QAE9D,IAAO,CAAA,OAAA,GAAP,OAAO,CAA+B;QACf,IAAS,CAAA,SAAA,GAAT,SAAS,CAAkB;QAC5B,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAkC;QAXhE,IAAS,CAAA,SAAA,GACtB,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,KAAK,UAAU;AACrC,cAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;AACvC,cAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;KAS1B;IAEJ,QAAQ,GAAA;QACJ,IAAI,CAAC,aAAa,EAAE,CAAC;KACxB;IAED,iBAAiB,GAAA;AACb,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;KAClC;IAEO,aAAa,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,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAFZ,SAAA,EAAA,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,EAHhC,OAAA,EAAA,CAAA,CAAC,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,CAAC,CAAA,EAAA,CAAA,CAAA;4FAKzD,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,CAAC;AAClE,oBAAA,YAAY,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;AACpD,oBAAA,OAAO,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;AAC/C,oBAAA,SAAS,EAAE,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;AAC5C,iBAAA,CAAA;;;ACfD;;AAEG;;;;"}
@@ -77,7 +77,7 @@ TuiButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
77
77
  tuiAsFocusableItemAccessor(TuiButtonComponent),
78
78
  TuiDestroyService,
79
79
  TuiFocusVisibleService,
80
- ], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"appearance$ | async\"></ng-container>\n<div\n tuiWrapper\n class=\"t-wrapper\"\n [appearance]=\"computedAppearance\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocusVisible\"\n>\n <span class=\"t-content\">\n <span\n *ngIf=\"icon\"\n class=\"t-left\"\n >\n <tui-svg\n *polymorpheusOutlet=\"icon as text\"\n class=\"t-icon\"\n [src]=\"text\"\n ></tui-svg>\n </span>\n <ng-content></ng-content>\n <span\n *ngIf=\"iconRight\"\n class=\"t-right\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconRight as text\"\n class=\"t-icon\"\n [src]=\"text\"\n ></tui-svg>\n </span>\n </span>\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"t-loader\"\n [size]=\"loaderSize\"\n [inheritColor]=\"true\"\n ></tui-loader>\n</div>\n", styles: [":host{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:inline-block;flex-shrink:0;vertical-align:top;border-radius:var(--tui-radius-m);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-decoration:none;outline:none;color:inherit}:host[data-shape=rounded]{border-radius:6.25rem}:host[data-size=xs]{height:var(--tui-height-xs);font-weight:normal}:host[data-size=xs][data-shape=square],:host[data-size=xs][tuiIconButton]{width:var(--tui-height-xs)}:host[data-size=s]{height:var(--tui-height-s);font-weight:normal}:host[data-size=s][data-shape=square],:host[data-size=s][tuiIconButton]{width:var(--tui-height-s)}:host[data-size=m]{height:var(--tui-height-m);font:var(--tui-font-text-m);font-weight:bold}:host[data-size=m][data-shape=square],:host[data-size=m][tuiIconButton]{width:var(--tui-height-m)}:host[data-size=l]{height:var(--tui-height-l);font:var(--tui-font-text-m);font-weight:bold}:host[data-size=l][data-shape=square],:host[data-size=l][tuiIconButton]{width:var(--tui-height-l)}:host[data-size=xl]{height:3.75rem;font:var(--tui-font-text-m);font-weight:bold}:host[data-size=xl][data-shape=square],:host[data-size=xl][tuiIconButton]{width:3.75rem}:host[tuiIconButton]{font-size:0!important}:host[tuiIconButton] .t-left,:host[tuiIconButton] .t-right{margin:0!important}.t-loader{position:absolute;top:0;left:0;width:100%;height:100%;cursor:default}.t-left{margin-right:.5rem}:host[data-size=s] .t-left,:host[data-size=xs] .t-left{margin-right:.25rem}.t-right{margin:0 -.25rem 0 .25rem}:host[data-size=s] .t-right,:host[data-size=xs] .t-right{margin-right:0 -.125rem 0 .125rem}.t-icon{display:flex;max-width:100%;max-height:100%;align-items:center;justify-content:center}.t-left,.t-right{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem}:host[data-size=s] .t-left,:host[data-size=s] .t-right,:host[data-size=xs] .t-left,:host[data-size=xs] .t-right{width:1rem;height:1rem}:host[tuiIconButton][data-appearance=icon][data-size=s] .t-left,:host[tuiIconButton][data-appearance=icon][data-size=s] .t-right{width:1.5rem;height:1.5rem}.t-wrapper{position:relative;z-index:0;box-sizing:border-box;cursor:pointer}:host[data-size=xs] .t-wrapper{padding:0 var(--tui-padding, .375rem)}:host[data-size=xs] .t-wrapper:after{border-width:1px}:host[data-size=s] .t-wrapper{padding:0 var(--tui-padding, .75rem)}:host[data-size=m] .t-wrapper{padding:0 var(--tui-padding, 1.5rem)}:host[data-size=l] .t-wrapper{padding:0 var(--tui-padding, 2.25rem)}:host[data-size=xl] .t-wrapper{padding:0 var(--tui-padding, 2.5rem)}:host[data-shape=square] .t-wrapper,:host[tuiIconButton] .t-wrapper{padding:0}.t-content{display:flex;height:100%;align-items:center;justify-content:center;text-align:center}:host._loading .t-content{opacity:0}\n"], components: [{ type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i2.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i5.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
80
+ ], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"appearance$ | async\"></ng-container>\n<div\n tuiWrapper\n class=\"t-wrapper\"\n [appearance]=\"computedAppearance\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocusVisible\"\n>\n <span class=\"t-content\">\n <span\n *ngIf=\"icon\"\n class=\"t-left\"\n >\n <tui-svg\n *polymorpheusOutlet=\"icon as text\"\n class=\"t-icon\"\n [src]=\"text\"\n ></tui-svg>\n </span>\n <ng-content></ng-content>\n <span\n *ngIf=\"iconRight\"\n class=\"t-right\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconRight as text\"\n class=\"t-icon\"\n [src]=\"text\"\n ></tui-svg>\n </span>\n </span>\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"t-loader\"\n [size]=\"loaderSize\"\n [inheritColor]=\"true\"\n ></tui-loader>\n</div>\n", styles: [":host{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:inline-block;flex-shrink:0;vertical-align:top;border-radius:var(--tui-radius-m);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-decoration:none;outline:none;color:inherit}:host[data-shape=rounded]{border-radius:6.25rem}:host[data-size=xs]{height:var(--tui-height-xs);font-weight:normal}:host[data-size=xs][data-shape=square],:host[data-size=xs][tuiIconButton]{width:var(--tui-height-xs)}:host[data-size=s]{height:var(--tui-height-s);font-weight:normal}:host[data-size=s][data-shape=square],:host[data-size=s][tuiIconButton]{width:var(--tui-height-s)}:host[data-size=m]{height:var(--tui-height-m);font:var(--tui-font-text-m);font-weight:bold}:host[data-size=m][data-shape=square],:host[data-size=m][tuiIconButton]{width:var(--tui-height-m)}:host[data-size=l]{height:var(--tui-height-l);font:var(--tui-font-text-m);font-weight:bold}:host[data-size=l][data-shape=square],:host[data-size=l][tuiIconButton]{width:var(--tui-height-l)}:host[data-size=xl]{height:3.75rem;font:var(--tui-font-text-m);font-weight:bold}:host[data-size=xl][data-shape=square],:host[data-size=xl][tuiIconButton]{width:3.75rem}:host[tuiIconButton]{font-size:0!important}:host[tuiIconButton] .t-left,:host[tuiIconButton] .t-right{margin:0!important}.t-loader{position:absolute;top:0;left:0;width:100%;height:100%;cursor:default}.t-left{margin-right:.5rem}:host[data-size=s] .t-left{margin-right:.375rem}:host[data-size=xs] .t-left{margin-right:.25rem}.t-right{margin:0 -.25rem 0 .25rem}:host[data-size=s] .t-right{margin:0 -.25rem 0 .375rem}:host[data-size=xs] .t-right{margin:0 -.125rem 0 .25rem}.t-icon{display:flex;max-width:100%;max-height:100%;align-items:center;justify-content:center}.t-left,.t-right{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem}:host[data-size=s] .t-left,:host[data-size=s] .t-right,:host[data-size=xs] .t-left,:host[data-size=xs] .t-right{width:1rem;height:1rem}:host[tuiIconButton][data-appearance=icon][data-size=s] .t-left,:host[tuiIconButton][data-appearance=icon][data-size=s] .t-right{width:1.5rem;height:1.5rem}.t-wrapper{position:relative;z-index:0;box-sizing:border-box;cursor:pointer}:host[data-size=xs] .t-wrapper{padding:0 var(--tui-padding, .375rem)}:host[data-size=xs] .t-wrapper:after{border-width:1px}:host[data-size=s] .t-wrapper{padding:0 var(--tui-padding, .75rem)}:host[data-size=m] .t-wrapper{padding:0 var(--tui-padding, 1.5rem)}:host[data-size=l] .t-wrapper{padding:0 var(--tui-padding, 2.25rem)}:host[data-size=xl] .t-wrapper{padding:0 var(--tui-padding, 2.5rem)}:host[data-shape=square] .t-wrapper,:host[tuiIconButton] .t-wrapper{padding:0}.t-content{display:flex;height:100%;align-items:center;justify-content:center;text-align:center}:host._loading .t-content{opacity:0}\n"], components: [{ type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i2.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i5.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
81
81
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiButtonComponent, decorators: [{
82
82
  type: Component,
83
83
  args: [{
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-button.js","sources":["../../../projects/core/components/button/button.options.ts","../../../projects/core/components/button/button.component.ts","../../../projects/core/components/button/button.template.html","../../../projects/core/components/button/button.module.ts","../../../projects/core/components/button/taiga-ui-core-components-button.ts"],"sourcesContent":["import {Provider} from '@angular/core';\nimport {tuiCreateOptions, tuiProvideOptions} from '@taiga-ui/cdk';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\nimport {TuiSizeXL, TuiSizeXS} from '@taiga-ui/core/types';\n\nexport interface TuiButtonOptions {\n readonly size: TuiSizeXL | TuiSizeXS;\n readonly appearance:\n | TuiAppearance\n | string\n | keyof Record<TuiAppearance, string>\n | null;\n readonly shape: 'rounded' | 'square' | null;\n}\n\nexport const TUI_BUTTON_DEFAULT_OPTIONS: TuiButtonOptions = {\n size: `l`,\n shape: null,\n appearance: TuiAppearance.Primary,\n};\n\n/**\n * Default parameters for button component\n */\nexport const TUI_BUTTON_OPTIONS = tuiCreateOptions(TUI_BUTTON_DEFAULT_OPTIONS);\n\nexport function tuiButtonOptionsProvider(options: Partial<TuiButtonOptions>): Provider {\n return tuiProvideOptions(TUI_BUTTON_OPTIONS, options, TUI_BUTTON_DEFAULT_OPTIONS);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Optional,\n} from '@angular/core';\nimport {\n AbstractTuiInteractive,\n tuiAsFocusableItemAccessor,\n TuiDestroyService,\n TuiFocusableElementAccessor,\n TuiFocusVisibleService,\n tuiIsNativeFocused,\n} from '@taiga-ui/cdk';\nimport {TuiModeDirective} from '@taiga-ui/core/directives';\nimport {TuiSizeS} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {EMPTY, Observable} from 'rxjs';\nimport {distinctUntilChanged, map, startWith} from 'rxjs/operators';\n\nimport {TUI_BUTTON_OPTIONS, TuiButtonOptions} from './button.options';\n\n@Component({\n selector: 'button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]',\n templateUrl: './button.template.html',\n styleUrls: ['./button.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsFocusableItemAccessor(TuiButtonComponent),\n TuiDestroyService,\n TuiFocusVisibleService,\n ],\n})\nexport class TuiButtonComponent\n extends AbstractTuiInteractive\n implements TuiFocusableElementAccessor, TuiButtonOptions\n{\n private readonly mode$: Observable<unknown> = this.mode?.change$ || EMPTY;\n\n @Input()\n appearance: TuiButtonOptions['appearance'] = null;\n\n @Input()\n disabled = false;\n\n @Input()\n icon: PolymorpheusContent;\n\n @Input()\n iconRight: PolymorpheusContent;\n\n @Input()\n @HostBinding('attr.data-shape')\n shape = this.options.shape;\n\n @Input()\n @HostBinding('class._loading')\n showLoader = false;\n\n @Input()\n @HostBinding('attr.data-size')\n size = this.options.size;\n\n readonly appearance$ = this.mode$.pipe(\n startWith(null),\n map(() => this.computedAppearance),\n distinctUntilChanged(),\n );\n\n constructor(\n @Optional()\n @Inject(TuiModeDirective)\n private readonly mode: TuiModeDirective | null,\n @Inject(ElementRef) private readonly el: ElementRef<HTMLElement>,\n @Inject(TuiFocusVisibleService) focusVisible$: TuiFocusVisibleService,\n @Inject(TUI_BUTTON_OPTIONS) private readonly options: TuiButtonOptions,\n ) {\n super();\n focusVisible$.subscribe(focusVisible => {\n this.updateFocusVisible(focusVisible);\n });\n }\n\n get nativeFocusableElement(): HTMLElement | null {\n return this.nativeDisabled ? null : this.el.nativeElement;\n }\n\n get focused(): boolean {\n return !this.showLoader && tuiIsNativeFocused(this.el.nativeElement);\n }\n\n get loaderSize(): TuiSizeS {\n return this.size === 'l' || this.size === 'xl' ? 'm' : 's';\n }\n\n @HostBinding('attr.data-appearance')\n get computedAppearance(): string {\n return this.appearance ?? (this.options.appearance || '');\n }\n\n @HostBinding('attr.disabled')\n get nativeDisabled(): '' | null {\n return this.computedDisabled || this.showLoader ? '' : null;\n }\n\n @HostBinding('tabIndex')\n get tabIndex(): number {\n return this.focusable ? 0 : -1;\n }\n\n @HostListener('focusin', ['true'])\n @HostListener('focusout', ['false'])\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n}\n","<ng-container *ngIf=\"appearance$ | async\"></ng-container>\n<div\n tuiWrapper\n class=\"t-wrapper\"\n [appearance]=\"computedAppearance\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocusVisible\"\n>\n <span class=\"t-content\">\n <span\n *ngIf=\"icon\"\n class=\"t-left\"\n >\n <tui-svg\n *polymorpheusOutlet=\"icon as text\"\n class=\"t-icon\"\n [src]=\"text\"\n ></tui-svg>\n </span>\n <ng-content></ng-content>\n <span\n *ngIf=\"iconRight\"\n class=\"t-right\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconRight as text\"\n class=\"t-icon\"\n [src]=\"text\"\n ></tui-svg>\n </span>\n </span>\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"t-loader\"\n [size]=\"loaderSize\"\n [inheritColor]=\"true\"\n ></tui-loader>\n</div>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLoaderModule} from '@taiga-ui/core/components/loader';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiWrapperModule} from '@taiga-ui/core/directives/wrapper';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiButtonComponent} from './button.component';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiLoaderModule,\n ],\n declarations: [TuiButtonComponent],\n exports: [TuiButtonComponent],\n})\nexport class TuiButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAea,MAAA,0BAA0B,GAAqB;AACxD,IAAA,IAAI,EAAE,CAAG,CAAA,CAAA;AACT,IAAA,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,aAAa,CAAC,OAAO;EACnC;AAEF;;AAEG;MACU,kBAAkB,GAAG,gBAAgB,CAAC,0BAA0B,EAAE;AAEzE,SAAU,wBAAwB,CAAC,OAAkC,EAAA;IACvE,OAAO,iBAAiB,CAAC,kBAAkB,EAAE,OAAO,EAAE,0BAA0B,CAAC,CAAC;AACtF;;ACSM,MAAO,kBACT,SAAQ,sBAAsB,CAAA;AAmC9B,IAAA,WAAA,CAGqB,IAA6B,EACT,EAA2B,EAChC,aAAqC,EACxB,OAAyB,EAAA;;AAEtE,QAAA,KAAK,EAAE,CAAC;QALS,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAyB;QACT,IAAE,CAAA,EAAA,GAAF,EAAE,CAAyB;QAEnB,IAAO,CAAA,OAAA,GAAP,OAAO,CAAkB;QAtCzD,IAAK,CAAA,KAAA,GAAwB,CAAA,CAAA,EAAA,GAAA,IAAI,CAAC,IAAI,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,OAAO,KAAI,KAAK,CAAC;QAG1E,IAAU,CAAA,UAAA,GAAmC,IAAI,CAAC;QAGlD,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;AAUjB,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;QAI3B,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;AAInB,QAAA,IAAA,CAAA,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,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAVf,OAAA,EAAA,CAAA;YACL,YAAY;YACZ,kBAAkB;YAClB,gBAAgB;YAChB,YAAY;YACZ,eAAe;AAClB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAIQ,eAAe,EAAA,UAAA,EAAA,CAAA;kBAX3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,kBAAkB;wBAClB,gBAAgB;wBAChB,YAAY;wBACZ,eAAe;AAClB,qBAAA;oBACD,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAChC,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-button.js","sources":["../../../projects/core/components/button/button.options.ts","../../../projects/core/components/button/button.component.ts","../../../projects/core/components/button/button.template.html","../../../projects/core/components/button/button.module.ts","../../../projects/core/components/button/taiga-ui-core-components-button.ts"],"sourcesContent":["import {Provider} from '@angular/core';\nimport {tuiCreateOptions, tuiProvideOptions} from '@taiga-ui/cdk';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\nimport {TuiSizeXL, TuiSizeXS} from '@taiga-ui/core/types';\n\nexport interface TuiButtonOptions {\n readonly size: TuiSizeXL | TuiSizeXS;\n readonly appearance:\n | TuiAppearance\n | string\n | keyof Record<TuiAppearance, string>\n | null;\n readonly shape: 'rounded' | 'square' | null;\n}\n\nexport const TUI_BUTTON_DEFAULT_OPTIONS: TuiButtonOptions = {\n size: `l`,\n shape: null,\n appearance: TuiAppearance.Primary,\n};\n\n/**\n * Default parameters for button component\n */\nexport const TUI_BUTTON_OPTIONS = tuiCreateOptions(TUI_BUTTON_DEFAULT_OPTIONS);\n\nexport function tuiButtonOptionsProvider(options: Partial<TuiButtonOptions>): Provider {\n return tuiProvideOptions(TUI_BUTTON_OPTIONS, options, TUI_BUTTON_DEFAULT_OPTIONS);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Optional,\n} from '@angular/core';\nimport {\n AbstractTuiInteractive,\n tuiAsFocusableItemAccessor,\n TuiDestroyService,\n TuiFocusableElementAccessor,\n TuiFocusVisibleService,\n tuiIsNativeFocused,\n} from '@taiga-ui/cdk';\nimport {TuiModeDirective} from '@taiga-ui/core/directives';\nimport {TuiSizeS} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {EMPTY, Observable} from 'rxjs';\nimport {distinctUntilChanged, map, startWith} from 'rxjs/operators';\n\nimport {TUI_BUTTON_OPTIONS, TuiButtonOptions} from './button.options';\n\n@Component({\n selector: 'button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]',\n templateUrl: './button.template.html',\n styleUrls: ['./button.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsFocusableItemAccessor(TuiButtonComponent),\n TuiDestroyService,\n TuiFocusVisibleService,\n ],\n})\nexport class TuiButtonComponent\n extends AbstractTuiInteractive\n implements TuiFocusableElementAccessor, TuiButtonOptions\n{\n private readonly mode$: Observable<unknown> = this.mode?.change$ || EMPTY;\n\n @Input()\n appearance: TuiButtonOptions['appearance'] = null;\n\n @Input()\n disabled = false;\n\n @Input()\n icon: PolymorpheusContent;\n\n @Input()\n iconRight: PolymorpheusContent;\n\n @Input()\n @HostBinding('attr.data-shape')\n shape = this.options.shape;\n\n @Input()\n @HostBinding('class._loading')\n showLoader = false;\n\n @Input()\n @HostBinding('attr.data-size')\n size = this.options.size;\n\n readonly appearance$ = this.mode$.pipe(\n startWith(null),\n map(() => this.computedAppearance),\n distinctUntilChanged(),\n );\n\n constructor(\n @Optional()\n @Inject(TuiModeDirective)\n private readonly mode: TuiModeDirective | null,\n @Inject(ElementRef) private readonly el: ElementRef<HTMLElement>,\n @Inject(TuiFocusVisibleService) focusVisible$: TuiFocusVisibleService,\n @Inject(TUI_BUTTON_OPTIONS) private readonly options: TuiButtonOptions,\n ) {\n super();\n focusVisible$.subscribe(focusVisible => {\n this.updateFocusVisible(focusVisible);\n });\n }\n\n get nativeFocusableElement(): HTMLElement | null {\n return this.nativeDisabled ? null : this.el.nativeElement;\n }\n\n get focused(): boolean {\n return !this.showLoader && tuiIsNativeFocused(this.el.nativeElement);\n }\n\n get loaderSize(): TuiSizeS {\n return this.size === 'l' || this.size === 'xl' ? 'm' : 's';\n }\n\n @HostBinding('attr.data-appearance')\n get computedAppearance(): string {\n return this.appearance ?? (this.options.appearance || '');\n }\n\n @HostBinding('attr.disabled')\n get nativeDisabled(): '' | null {\n return this.computedDisabled || this.showLoader ? '' : null;\n }\n\n @HostBinding('tabIndex')\n get tabIndex(): number {\n return this.focusable ? 0 : -1;\n }\n\n @HostListener('focusin', ['true'])\n @HostListener('focusout', ['false'])\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n}\n","<ng-container *ngIf=\"appearance$ | async\"></ng-container>\n<div\n tuiWrapper\n class=\"t-wrapper\"\n [appearance]=\"computedAppearance\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocusVisible\"\n>\n <span class=\"t-content\">\n <span\n *ngIf=\"icon\"\n class=\"t-left\"\n >\n <tui-svg\n *polymorpheusOutlet=\"icon as text\"\n class=\"t-icon\"\n [src]=\"text\"\n ></tui-svg>\n </span>\n <ng-content></ng-content>\n <span\n *ngIf=\"iconRight\"\n class=\"t-right\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconRight as text\"\n class=\"t-icon\"\n [src]=\"text\"\n ></tui-svg>\n </span>\n </span>\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"t-loader\"\n [size]=\"loaderSize\"\n [inheritColor]=\"true\"\n ></tui-loader>\n</div>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLoaderModule} from '@taiga-ui/core/components/loader';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiWrapperModule} from '@taiga-ui/core/directives/wrapper';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiButtonComponent} from './button.component';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiLoaderModule,\n ],\n declarations: [TuiButtonComponent],\n exports: [TuiButtonComponent],\n})\nexport class TuiButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAea,MAAA,0BAA0B,GAAqB;AACxD,IAAA,IAAI,EAAE,CAAG,CAAA,CAAA;AACT,IAAA,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,aAAa,CAAC,OAAO;EACnC;AAEF;;AAEG;MACU,kBAAkB,GAAG,gBAAgB,CAAC,0BAA0B,EAAE;AAEzE,SAAU,wBAAwB,CAAC,OAAkC,EAAA;IACvE,OAAO,iBAAiB,CAAC,kBAAkB,EAAE,OAAO,EAAE,0BAA0B,CAAC,CAAC;AACtF;;ACSM,MAAO,kBACT,SAAQ,sBAAsB,CAAA;AAmC9B,IAAA,WAAA,CAGqB,IAA6B,EACT,EAA2B,EAChC,aAAqC,EACxB,OAAyB,EAAA;;AAEtE,QAAA,KAAK,EAAE,CAAC;QALS,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAyB;QACT,IAAE,CAAA,EAAA,GAAF,EAAE,CAAyB;QAEnB,IAAO,CAAA,OAAA,GAAP,OAAO,CAAkB;QAtCzD,IAAK,CAAA,KAAA,GAAwB,CAAA,CAAA,EAAA,GAAA,IAAI,CAAC,IAAI,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,OAAO,KAAI,KAAK,CAAC;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eAAe,EAAA,YAAA,EAAA,CAHT,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAN7B,YAAY;QACZ,kBAAkB;QAClB,gBAAgB;QAChB,YAAY;AACZ,QAAA,eAAe,aAGT,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAEnB,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAVf,OAAA,EAAA,CAAA;YACL,YAAY;YACZ,kBAAkB;YAClB,gBAAgB;YAChB,YAAY;YACZ,eAAe;AAClB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAIQ,eAAe,EAAA,UAAA,EAAA,CAAA;kBAX3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,kBAAkB;wBAClB,gBAAgB;wBAChB,YAAY;wBACZ,eAAe;AAClB,qBAAA;oBACD,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAChC,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { EventEmitter, Component, ChangeDetectionStrategy, Inject, Input, HostBinding, Output, NgModule } from '@angular/core';
3
- import { tuiIsObserved } from '@taiga-ui/cdk';
3
+ import { tuiIsPresent, tuiIsObserved } from '@taiga-ui/cdk';
4
4
  import { TUI_CLOSE_WORD, TUI_NOTIFICATION_OPTIONS } from '@taiga-ui/core/tokens';
5
5
  import * as i1 from '@taiga-ui/core/components/svg';
6
6
  import { TuiSvgModule } from '@taiga-ui/core/components/svg';
@@ -8,32 +8,32 @@ import * as i2 from '@taiga-ui/core/components/button';
8
8
  import { TuiButtonModule } from '@taiga-ui/core/components/button';
9
9
  import * as i3 from '@angular/common';
10
10
  import { CommonModule } from '@angular/common';
11
- import * as i4 from 'rxjs';
11
+ import * as i4 from '@tinkoff/ng-polymorpheus';
12
+ import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
13
+ import * as i5 from 'rxjs';
12
14
 
13
- const STATUS_ICON = {
14
- info: 'tuiIconInfo',
15
- success: 'tuiIconCheckCircle',
16
- error: 'tuiIconXCircle',
17
- warning: 'tuiIconAlertCircle',
18
- };
19
15
  class TuiNotificationComponent {
20
16
  constructor(closeWord$, options) {
21
17
  this.closeWord$ = closeWord$;
22
18
  this.options = options;
19
+ /**
20
+ * @deprecated Use {@link TuiNotificationComponent.icon} input or TUI_NOTIFICATION_OPTIONS instead
21
+ */
23
22
  this.hasIcon = this.options.hasIcon;
23
+ this.icon = this.options.icon;
24
24
  this.status = this.options.status;
25
25
  this.hideClose = false;
26
26
  this.close = new EventEmitter();
27
27
  }
28
- get icon() {
29
- return STATUS_ICON[this.status];
28
+ get isIconExists() {
29
+ return tuiIsPresent(this.icon) && this.hasIcon;
30
30
  }
31
31
  get hasClose() {
32
32
  return !this.hideClose && tuiIsObserved(this.close);
33
33
  }
34
34
  }
35
35
  TuiNotificationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiNotificationComponent, deps: [{ token: TUI_CLOSE_WORD }, { token: TUI_NOTIFICATION_OPTIONS }], target: i0.ɵɵFactoryTarget.Component });
36
- TuiNotificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiNotificationComponent, selector: "tui-notification", inputs: { hasIcon: "hasIcon", status: "status", hideClose: "hideClose" }, outputs: { close: "close" }, host: { properties: { "class._has-icon": "this.hasIcon", "attr.data-status": "this.status", "class._has-close-button": "this.hasClose" } }, ngImport: i0, template: "<tui-svg\n *ngIf=\"hasIcon\"\n automation-id=\"tui-notification__icon\"\n class=\"t-icon\"\n [src]=\"icon\"\n></tui-svg>\n<div class=\"t-content\">\n <ng-content></ng-content>\n</div>\n<button\n *ngIf=\"hasClose\"\n tuiIconButton\n type=\"button\"\n automation-id=\"tui-notification__close\"\n size=\"xs\"\n icon=\"tuiIconCloseLarge\"\n appearance=\"icon\"\n class=\"t-close\"\n [title]=\"closeWord$ | async\"\n (click)=\"close.emit()\"\n></button>\n", styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;padding:.75rem 1rem;border-radius:var(--tui-radius-m);background:#fff;background:var(--tui-base-01);box-sizing:border-box;overflow:hidden}:host:after{position:absolute;top:0;left:0;width:100%;height:100%;content:\"\";pointer-events:none}:host._has-close-button{padding-right:2rem}:host._has-icon{padding-left:2.75rem}:host[data-status=info]{color:var(--tui-info-fill);background:linear-gradient(var(--tui-info-bg),var(--tui-info-bg)),var(--tui-base-01)}:host[data-status=success]{color:var(--tui-success-fill);background:linear-gradient(var(--tui-success-bg),var(--tui-success-bg)),var(--tui-base-01)}:host[data-status=error]{color:var(--tui-error-fill);background:linear-gradient(var(--tui-error-bg),var(--tui-error-bg)),var(--tui-base-01)}:host[data-status=warning]{color:var(--tui-warning-fill);background:linear-gradient(var(--tui-warning-bg),var(--tui-warning-bg)),var(--tui-base-01)}.t-content{word-wrap:break-word;color:var(--tui-text-01)}.t-icon{position:absolute;top:0;left:1rem;display:flex;width:1rem;height:100%;max-height:3rem;align-items:center}.t-close{position:absolute;top:.625rem;right:.5rem}\n"], components: [{ type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i2.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
36
+ TuiNotificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiNotificationComponent, selector: "tui-notification", inputs: { hasIcon: "hasIcon", icon: "icon", status: "status", hideClose: "hideClose" }, outputs: { close: "close" }, host: { properties: { "attr.data-status": "this.status", "class._has-icon": "this.isIconExists", "class._has-close-button": "this.hasClose" } }, ngImport: i0, template: "<ng-container *ngIf=\"isIconExists\">\n <!-- FIX: types of status input -->\n <tui-svg\n *polymorpheusOutlet=\"icon as iconName; context: {$implicit: $any(status)}\"\n automation-id=\"tui-notification__icon\"\n class=\"t-icon\"\n [src]=\"iconName\"\n ></tui-svg>\n</ng-container>\n\n<div class=\"t-content\">\n <ng-content></ng-content>\n</div>\n<button\n *ngIf=\"hasClose\"\n appearance=\"icon\"\n automation-id=\"tui-notification__close\"\n icon=\"tuiIconCloseLarge\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [title]=\"closeWord$ | async\"\n (click)=\"close.emit()\"\n></button>\n", styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;padding:.75rem 1rem;border-radius:var(--tui-radius-m);background:#fff;background:var(--tui-base-01);box-sizing:border-box;overflow:hidden}:host:after{position:absolute;top:0;left:0;width:100%;height:100%;content:\"\";pointer-events:none}:host._has-close-button{padding-right:2rem}:host._has-icon{padding-left:2.75rem}:host[data-status=info]{color:var(--tui-info-fill);background:linear-gradient(var(--tui-info-bg),var(--tui-info-bg)),var(--tui-base-01)}:host[data-status=success]{color:var(--tui-success-fill);background:linear-gradient(var(--tui-success-bg),var(--tui-success-bg)),var(--tui-base-01)}:host[data-status=error]{color:var(--tui-error-fill);background:linear-gradient(var(--tui-error-bg),var(--tui-error-bg)),var(--tui-base-01)}:host[data-status=warning]{color:var(--tui-warning-fill);background:linear-gradient(var(--tui-warning-bg),var(--tui-warning-bg)),var(--tui-base-01)}.t-content{word-wrap:break-word;color:var(--tui-text-01)}.t-icon{position:absolute;top:0;left:1rem;display:flex;width:1rem;height:100%;max-height:3rem;align-items:center}.t-close{position:absolute;top:.625rem;right:.5rem}\n"], components: [{ type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i2.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
37
37
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiNotificationComponent, decorators: [{
38
38
  type: Component,
39
39
  args: [{
@@ -42,7 +42,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
42
42
  styleUrls: ['./notification.style.less'],
43
43
  changeDetection: ChangeDetectionStrategy.OnPush,
44
44
  }]
45
- }], ctorParameters: function () { return [{ type: i4.Observable, decorators: [{
45
+ }], ctorParameters: function () { return [{ type: i5.Observable, decorators: [{
46
46
  type: Inject,
47
47
  args: [TUI_CLOSE_WORD]
48
48
  }] }, { type: undefined, decorators: [{
@@ -50,9 +50,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
50
50
  args: [TUI_NOTIFICATION_OPTIONS]
51
51
  }] }]; }, propDecorators: { hasIcon: [{
52
52
  type: Input
53
- }, {
54
- type: HostBinding,
55
- args: ['class._has-icon']
53
+ }], icon: [{
54
+ type: Input
56
55
  }], status: [{
57
56
  type: Input
58
57
  }, {
@@ -62,6 +61,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
62
61
  type: Input
63
62
  }], close: [{
64
63
  type: Output
64
+ }], isIconExists: [{
65
+ type: HostBinding,
66
+ args: ['class._has-icon']
65
67
  }], hasClose: [{
66
68
  type: HostBinding,
67
69
  args: ['class._has-close-button']
@@ -70,12 +72,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
70
72
  class TuiNotificationModule {
71
73
  }
72
74
  TuiNotificationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiNotificationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
73
- TuiNotificationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiNotificationModule, declarations: [TuiNotificationComponent], imports: [CommonModule, TuiSvgModule, TuiButtonModule], exports: [TuiNotificationComponent] });
74
- TuiNotificationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiNotificationModule, imports: [[CommonModule, TuiSvgModule, TuiButtonModule]] });
75
+ TuiNotificationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiNotificationModule, declarations: [TuiNotificationComponent], imports: [CommonModule, TuiSvgModule, TuiButtonModule, PolymorpheusModule], exports: [TuiNotificationComponent] });
76
+ TuiNotificationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiNotificationModule, imports: [[CommonModule, TuiSvgModule, TuiButtonModule, PolymorpheusModule]] });
75
77
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiNotificationModule, decorators: [{
76
78
  type: NgModule,
77
79
  args: [{
78
- imports: [CommonModule, TuiSvgModule, TuiButtonModule],
80
+ imports: [CommonModule, TuiSvgModule, TuiButtonModule, PolymorpheusModule],
79
81
  declarations: [TuiNotificationComponent],
80
82
  exports: [TuiNotificationComponent],
81
83
  }]
@@ -85,5 +87,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
85
87
  * Generated bundle index. Do not edit.
86
88
  */
87
89
 
88
- export { STATUS_ICON, TuiNotificationComponent, TuiNotificationModule };
90
+ export { TuiNotificationComponent, TuiNotificationModule };
89
91
  //# sourceMappingURL=taiga-ui-core-components-notification.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-notification.js","sources":["../../../projects/core/components/notification/notification.component.ts","../../../projects/core/components/notification/notification.template.html","../../../projects/core/components/notification/notification.module.ts","../../../projects/core/components/notification/taiga-ui-core-components-notification.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Output,\n} from '@angular/core';\nimport {tuiIsObserved} from '@taiga-ui/cdk';\nimport {\n TUI_CLOSE_WORD,\n TUI_NOTIFICATION_OPTIONS,\n TuiNotificationDefaultOptions,\n} from '@taiga-ui/core/tokens';\nimport {Observable} from 'rxjs';\n\nexport const STATUS_ICON = {\n info: 'tuiIconInfo',\n success: 'tuiIconCheckCircle',\n error: 'tuiIconXCircle',\n warning: 'tuiIconAlertCircle',\n} as const;\n\n@Component({\n selector: 'tui-notification',\n templateUrl: './notification.template.html',\n styleUrls: ['./notification.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiNotificationComponent {\n @Input()\n @HostBinding('class._has-icon')\n hasIcon = this.options.hasIcon;\n\n @Input()\n @HostBinding('attr.data-status')\n status: 'error' | 'info' | 'success' | 'warning' = this.options.status;\n\n @Input()\n hideClose = false;\n\n @Output()\n // eslint-disable-next-line @angular-eslint/no-output-native\n readonly close = new EventEmitter<void>();\n\n constructor(\n @Inject(TUI_CLOSE_WORD) readonly closeWord$: Observable<string>,\n @Inject(TUI_NOTIFICATION_OPTIONS)\n readonly options: TuiNotificationDefaultOptions,\n ) {}\n\n get icon(): string {\n return STATUS_ICON[this.status];\n }\n\n @HostBinding('class._has-close-button')\n get hasClose(): boolean {\n return !this.hideClose && tuiIsObserved(this.close);\n }\n}\n","<tui-svg\n *ngIf=\"hasIcon\"\n automation-id=\"tui-notification__icon\"\n class=\"t-icon\"\n [src]=\"icon\"\n></tui-svg>\n<div class=\"t-content\">\n <ng-content></ng-content>\n</div>\n<button\n *ngIf=\"hasClose\"\n tuiIconButton\n type=\"button\"\n automation-id=\"tui-notification__close\"\n size=\"xs\"\n icon=\"tuiIconCloseLarge\"\n appearance=\"icon\"\n class=\"t-close\"\n [title]=\"closeWord$ | async\"\n (click)=\"close.emit()\"\n></button>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiButtonModule} from '@taiga-ui/core/components/button';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\n\nimport {TuiNotificationComponent} from './notification.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule, TuiButtonModule],\n declarations: [TuiNotificationComponent],\n exports: [TuiNotificationComponent],\n})\nexport class TuiNotificationModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAiBa,MAAA,WAAW,GAAG;AACvB,IAAA,IAAI,EAAE,aAAa;AACnB,IAAA,OAAO,EAAE,oBAAoB;AAC7B,IAAA,KAAK,EAAE,gBAAgB;AACvB,IAAA,OAAO,EAAE,oBAAoB;EACtB;MAQE,wBAAwB,CAAA;IAgBjC,WACqC,CAAA,UAA8B,EAEtD,OAAsC,EAAA;QAFd,IAAU,CAAA,UAAA,GAAV,UAAU,CAAoB;QAEtD,IAAO,CAAA,OAAA,GAAP,OAAO,CAA+B;AAhBnD,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;AAI/B,QAAA,IAAA,CAAA,MAAM,GAA6C,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;QAGvE,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;AAIT,QAAA,IAAA,CAAA,KAAK,GAAG,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,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,eAAe,CAAC;oBACtD,YAAY,EAAE,CAAC,wBAAwB,CAAC;oBACxC,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACtC,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-notification.js","sources":["../../../projects/core/components/notification/notification.component.ts","../../../projects/core/components/notification/notification.template.html","../../../projects/core/components/notification/notification.module.ts","../../../projects/core/components/notification/taiga-ui-core-components-notification.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Output,\n} from '@angular/core';\nimport {TuiContextWithImplicit, tuiIsObserved, tuiIsPresent} from '@taiga-ui/cdk';\nimport {TuiNotification} from '@taiga-ui/core/enums';\nimport {\n TUI_CLOSE_WORD,\n TUI_NOTIFICATION_OPTIONS,\n TuiNotificationDefaultOptions,\n} from '@taiga-ui/core/tokens';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\n@Component({\n selector: 'tui-notification',\n templateUrl: './notification.template.html',\n styleUrls: ['./notification.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiNotificationComponent {\n /**\n * @deprecated Use {@link TuiNotificationComponent.icon} input or TUI_NOTIFICATION_OPTIONS instead\n */\n @Input()\n hasIcon = this.options.hasIcon;\n\n @Input()\n icon: PolymorpheusContent<TuiContextWithImplicit<TuiNotification>> | null =\n this.options.icon;\n\n @Input()\n @HostBinding('attr.data-status')\n status: 'error' | 'info' | 'success' | 'warning' = this.options.status;\n\n @Input()\n hideClose = false;\n\n @Output()\n // eslint-disable-next-line @angular-eslint/no-output-native\n readonly close = new EventEmitter<void>();\n\n constructor(\n @Inject(TUI_CLOSE_WORD) readonly closeWord$: Observable<string>,\n @Inject(TUI_NOTIFICATION_OPTIONS)\n readonly options: TuiNotificationDefaultOptions,\n ) {}\n\n @HostBinding('class._has-icon')\n get isIconExists(): boolean {\n return tuiIsPresent(this.icon) && this.hasIcon;\n }\n\n @HostBinding('class._has-close-button')\n get hasClose(): boolean {\n return !this.hideClose && tuiIsObserved(this.close);\n }\n}\n","<ng-container *ngIf=\"isIconExists\">\n <!-- FIX: types of status input -->\n <tui-svg\n *polymorpheusOutlet=\"icon as iconName; context: {$implicit: $any(status)}\"\n automation-id=\"tui-notification__icon\"\n class=\"t-icon\"\n [src]=\"iconName\"\n ></tui-svg>\n</ng-container>\n\n<div class=\"t-content\">\n <ng-content></ng-content>\n</div>\n<button\n *ngIf=\"hasClose\"\n appearance=\"icon\"\n automation-id=\"tui-notification__close\"\n icon=\"tuiIconCloseLarge\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [title]=\"closeWord$ | async\"\n (click)=\"close.emit()\"\n></button>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiButtonModule} from '@taiga-ui/core/components/button';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiNotificationComponent} from './notification.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule, TuiButtonModule, PolymorpheusModule],\n declarations: [TuiNotificationComponent],\n exports: [TuiNotificationComponent],\n})\nexport class TuiNotificationModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAyBa,wBAAwB,CAAA;IAsBjC,WACqC,CAAA,UAA8B,EAEtD,OAAsC,EAAA;QAFd,IAAU,CAAA,UAAA,GAAV,UAAU,CAAoB;QAEtD,IAAO,CAAA,OAAA,GAAP,OAAO,CAA+B;AAxBnD;;AAEG;AAEH,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;AAG/B,QAAA,IAAA,CAAA,IAAI,GACA,IAAI,CAAC,OAAO,CAAC,IA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A,OAAA,EAAA,CAE/D,wBAAwB,CAAA,EAAA,CAAA,CAAA;oHAEzB,qBAAqB,EAAA,OAAA,EAAA,CAJrB,CAAC,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,kBAAkB,CAAC,CAAA,EAAA,CAAA,CAAA;4FAIjE,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,kBAAkB,CAAC;oBAC1E,YAAY,EAAE,CAAC,wBAAwB,CAAC;oBACxC,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACtC,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
@@ -106,8 +106,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
106
106
  args: ['animationstart']
107
107
  }] } });
108
108
 
109
- const ICON_PADDING_L = 1.75;
110
- const ICON_PADDING = 1.625;
109
+ const TUI_ICON_PADDINGS = {
110
+ s: 1.25,
111
+ m: 1.75,
112
+ l: 2.25,
113
+ };
111
114
  class TuiPrimitiveTextfieldComponent extends AbstractTuiInteractive {
112
115
  constructor(controller, hintOptions, options, el) {
113
116
  super();
@@ -203,7 +206,7 @@ class TuiPrimitiveTextfieldComponent extends AbstractTuiInteractive {
203
206
  return this.iconLeftContent ? this.iconPaddingLeft : 0;
204
207
  }
205
208
  get borderEnd() {
206
- return tuiGetBorder(!!this.iconContent, this.hasCleaner, this.hasTooltip, this.hasCustomContent);
209
+ return tuiGetBorder(!!this.iconContent, this.hasCleaner, this.hasTooltip, this.hasCustomContent, this.size);
207
210
  }
208
211
  get iconContent() {
209
212
  return this.controller.icon;
@@ -254,7 +257,7 @@ class TuiPrimitiveTextfieldComponent extends AbstractTuiInteractive {
254
257
  this.updateAutofilled(autofilled);
255
258
  }
256
259
  get iconPaddingLeft() {
257
- return this.size === 'l' ? ICON_PADDING_L : ICON_PADDING;
260
+ return TUI_ICON_PADDINGS[this.size];
258
261
  }
259
262
  get placeholderRaisable() {
260
263
  return this.size !== 's' && !this.controller.labelOutside;
@@ -274,7 +277,7 @@ TuiPrimitiveTextfieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12
274
277
  TuiPrimitiveTextfieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: { editable: "editable", textfieldFiller: ["filler", "textfieldFiller"], iconCleaner: "iconCleaner", readOnly: "readOnly", invalid: "invalid", disabled: "disabled", textfieldPrefix: ["prefix", "textfieldPrefix"], textfieldPostfix: ["postfix", "textfieldPostfix"], value: "value" }, outputs: { valueChange: "valueChange" }, host: { listeners: { "focusin": "onFocused(true)", "focusout": "onFocused(false)" }, properties: { "class._autofilled": "autofilled", "class._label-outside": "controller.labelOutside", "class._readonly": "this.readOnly", "attr.data-size": "this.size", "class._invalid": "this.computedInvalid", "class._hidden": "this.inputHidden", "style.--border-start.rem": "this.borderStart", "style.--border-end.rem": "this.borderEnd" } }, providers: [
275
278
  tuiAsFocusableItemAccessor(TuiPrimitiveTextfieldComponent),
276
279
  TEXTFIELD_CONTROLLER_PROVIDER,
277
- ], queries: [{ propertyName: "content", predicate: PolymorpheusOutletDirective, descendants: true }], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"content?.changes | async\"></ng-container>\n<ng-container *ngIf=\"hintOptions?.change$ | async\"></ng-container>\n<div\n tuiWrapper\n automation-id=\"tui-primitive-textfield__wrapper\"\n [appearance]=\"appearance\"\n [readOnly]=\"readOnly\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n [style.--text-indent.px]=\"decor.pre$ | async\"\n (mousedown)=\"onMouseDown($event)\"\n (click.prevent.silent)=\"(0)\"\n (tuiAutofilledChange)=\"onAutofilled($event)\"\n>\n <ng-content select=\"input\"></ng-content>\n <ng-content select=\"select\"></ng-content>\n <input\n #focusableElement\n tuiMaskAccessor\n automation-id=\"tui-primitive-textfield__native-input\"\n class=\"t-input\"\n [disabled]=\"computedDisabled\"\n [attr.name]=\"name\"\n [attr.aria-invalid]=\"computedInvalid\"\n [id]=\"id\"\n [readOnly]=\"readOnly || !editable\"\n [tuiFocusable]=\"computedFocusable\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n />\n <div\n *ngIf=\"inputHidden\"\n automation-id=\"tui-primitive-textfield__value\"\n class=\"t-input t-input_template\"\n >\n <ng-content select=\"tuiContent\"></ng-content>\n </div>\n <div class=\"t-content\">\n <div\n *ngIf=\"iconLeftContent\"\n class=\"t-icon t-icon_left t-textfield-icon\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconLeftContent as src; context: {$implicit: size}\"\n tuiWrapper\n appearance=\"icon\"\n [src]=\"src\"\n ></tui-svg>\n </div>\n <div class=\"t-wrapper\">\n <label\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-primitive-textfield__placeholder\"\n class=\"t-placeholder\"\n [class.t-placeholder_raised]=\"placeholderRaised\"\n [for]=\"computedId\"\n >\n <ng-content></ng-content>\n </label>\n <div class=\"t-wrapper-value-decoration\">\n <tui-value-decoration\n #decor\n automation-id=\"tui-primitive-textfield__value-decoration\"\n aria-hidden=\"true\"\n class=\"t-value-decoration\"\n [class.t-has-value]=\"value\"\n [style.textIndent.px]=\"getIndent$(focusableElement) | async\"\n ></tui-value-decoration>\n </div>\n </div>\n <div\n *ngIf=\"hasCustomContent\"\n automation-id=\"tui-primitive-textfield__custom-content\"\n class=\"t-custom-content\"\n >\n <tui-svg\n *polymorpheusOutlet=\"controller.customContent as src\"\n class=\"t-custom-icon\"\n [src]=\"src\"\n ></tui-svg>\n </div>\n <span\n *ngIf=\"hasCleaner\"\n tuiWrapper\n appearance=\"icon\"\n automation-id=\"tui-primitive-textfield__cleaner\"\n class=\"t-cleaner\"\n (click.stop)=\"clear()\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconCleaner || controller.options.iconCleaner as src; context: {$implicit: size}\"\n [src]=\"src\"\n ></tui-svg>\n </span>\n <tui-tooltip\n *ngIf=\"showHint\"\n automation-id=\"tui-primitive-textfield__tooltip\"\n class=\"t-tooltip\"\n [describeId]=\"computedId\"\n [content]=\"hintOptions?.content\"\n ></tui-tooltip>\n <div\n *ngIf=\"iconContent\"\n class=\"t-icon t-textfield-icon\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconContent as src; context: {$implicit: size}\"\n tuiWrapper\n appearance=\"icon\"\n [src]=\"src\"\n ></tui-svg>\n </div>\n </div>\n</div>\n", styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;border-radius:var(--tui-radius-m);text-align:left;height:var(--tui-height);min-height:var(--tui-height);max-height:var(--tui-height)}:host[data-size=s]{--tui-height: var(--tui-height-s)}:host[data-size=m]{--tui-height: var(--tui-height-m)}:host[data-size=l]{--tui-height: var(--tui-height-l);font:var(--tui-font-text-m);line-height:1.25rem}.t-input{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;margin:0;border:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;padding:0 var(--tui-padding-m);border:solid transparent;border-width:0 var(--border-end, 0) 0 var(--border-start, 0);border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit;resize:none}.t-input:-webkit-autofill,.t-input:-webkit-autofill:hover,.t-input:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}.t-input:-webkit-autofill,.t-input:-webkit-autofill:first-line{font-size:inherit;line-height:inherit}.t-input::-webkit-caps-lock-indicator,.t-input::-webkit-contacts-auto-fill-button,.t-input::-webkit-credit-card-auto-fill-button,.t-input::-webkit-credentials-auto-fill-button,.t-input::-webkit-strong-password-auto-fill-button{content:none!important;position:absolute;left:-62.4375rem;top:-62.4375rem;z-index:-999;display:none!important;background:transparent!important;pointer-events:none!important}.t-input::placeholder{color:var(--tui-text-03);opacity:0}:host._focused:not(._readonly) .t-input::placeholder,:host-context(tui-primitive-textfield._focused:not(._readonly)) .t-input::placeholder,:host-context(tui-text-area._focused:not(._readonly)) .t-input::placeholder{opacity:1}[tuiWrapper][data-mode=onDark] .t-input:-webkit-autofill,.t-input :host-context([tuiWrapper][data-mode=\"onDark\"]):-webkit-autofill,[tuiWrapper][data-mode=onDark] .t-input:-webkit-autofill:hover,.t-input :host-context([tuiWrapper][data-mode=\"onDark\"]):-webkit-autofill:hover,[tuiWrapper][data-mode=onDark] .t-input:-webkit-autofill:focus,.t-input :host-context([tuiWrapper][data-mode=\"onDark\"]):-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill-night) inset!important}[tuiWrapper][data-mode=onDark] .t-input::placeholder,.t-input :host-context([tuiWrapper][data-mode=\"onDark\"])::placeholder{color:var(--tui-text-03-night)}:host[data-size=s] .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"s\"]):not(tui-primitive-textfield),.t-input :host-context(tui-text-area[data-size=\"s\"]):not(tui-text-area){padding:0 var(--tui-padding-s)}:host[data-size=l] .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"l\"]):not(tui-primitive-textfield),.t-input :host-context(tui-text-area[data-size=\"l\"]):not(tui-text-area){padding:0 var(--tui-padding-l)}:host._disabled .t-input,.t-input :host-context(tui-primitive-textfield._disabled),.t-input :host-context(tui-text-area._disabled){pointer-events:none}:host[data-size=l]:not(._label-outside) .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)):not(tui-primitive-textfield){padding-top:1.25rem}:host[data-size=l]:not(._label-outside) .t-input:-webkit-autofill+.t-content .t-placeholder,.t-input :host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.t-content .t-placeholder{font-size:.8156rem;transform:translateY(-.625rem)}:host[data-size=m]:not(._label-outside) .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)):not(tui-primitive-textfield){padding-top:1rem}:host[data-size=m]:not(._label-outside) .t-input:-webkit-autofill+.t-content .t-placeholder,.t-input :host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.t-content .t-placeholder{font-size:.69rem;transform:translateY(-.5rem)}:host._hidden input.t-input,.t-input :host-context(tui-primitive-textfield._hidden){opacity:0;text-indent:-10em;-webkit-user-select:none}.t-content{display:flex;height:100%;width:100%;padding:0 var(--tui-padding-m);box-sizing:border-box;align-items:center;overflow:hidden}:host[data-size=s] .t-content{padding:0 var(--tui-padding-s)}:host[data-size=l] .t-content{padding:0 var(--tui-padding-l)}.t-content:after{content:\"\";margin-right:-.25rem}:host[data-size=m] .t-content:after{display:none}.t-wrapper{flex:1;min-width:0;padding-right:.25rem;-webkit-padding-end:.25rem;padding-inline-end:.25rem;-webkit-padding-start:0;padding-inline-start:0}.t-wrapper+*{margin:0}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;font:var(--tui-font-text-s);color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0)}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size=m] .t-placeholder_raised{font:var(--tui-font-text-xs);line-height:1.25rem;transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill)}:host._invalid:not(._focused) [tuiWrapper][data-mode=onDark] .t-placeholder_raised,:host._invalid:not(._focused):hover [tuiWrapper][data-mode=onDark] .t-placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .t-placeholder,:host[data-size=m]._focused._label-outside .t-placeholder,:host[data-size=l]._focused._label-outside .t-placeholder{color:var(--tui-text-03)}:host[data-size=l] .t-placeholder{font:var(--tui-font-text-m);line-height:1.25rem}:host[data-size=l] .t-placeholder_raised{font-size:.8156rem}:host[data-size=m]._focused:not(._label-outside) .t-placeholder,:host[data-size=l]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01)}[tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size=m]._focused:not(._label-outside) [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=l]._focused:not(._label-outside) [tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-01-night)}:host._focused [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=m]._focused._label-outside [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=l]._focused._label-outside [tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}@supports (-webkit-hyphens: none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}.t-cleaner{position:relative;display:flex;width:1.5rem;height:1.5rem;margin:0 0 0 .25rem;-webkit-margin-start:.25rem;margin-inline-start:.25rem;-webkit-margin-end:0;margin-inline-end:0;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer}:host._readonly .t-cleaner,:host._disabled .t-cleaner{pointer-events:none}.t-icon{position:relative;display:flex;width:1.5rem;height:1.5rem;margin:0 0 0 .25rem;-webkit-margin-start:.25rem;margin-inline-start:.25rem;-webkit-margin-end:0;margin-inline-end:0;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none}.t-icon_left{margin:0 .375rem 0 -.25rem;-webkit-margin-start:-.25rem;margin-inline-start:-.25rem;-webkit-margin-end:.375rem;margin-inline-end:.375rem}:host[data-size=l] .t-icon_left{margin:0 .5rem 0 -.25rem;-webkit-margin-start:-.25rem;margin-inline-start:-.25rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}:host._autofilled .t-value-decoration:not(.t-has-value){visibility:hidden}:host._autofilled[data-size=s]:not(._focused) .t-placeholder,:host._autofilled[data-size=m]:not(._focused) .t-placeholder{visibility:hidden}.t-custom-content{position:relative;display:flex;align-items:center;justify-content:center;min-width:2rem;height:2rem;pointer-events:none}.t-custom-icon{width:2rem;height:100%}.t-tooltip{margin:0 0 0 .25rem;-webkit-margin-start:.25rem;margin-inline-start:.25rem;-webkit-margin-end:0;margin-inline-end:0}.t-input:not(:first-child){display:none}:host[data-size] .t-input_template{display:flex;width:calc(100% - 1rem);max-width:calc(100% - 1rem);align-items:center;pointer-events:none;-webkit-padding-end:0;padding-inline-end:0}.t-text-template{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-wrapper-value-decoration{position:relative;pointer-events:none}\n"], components: [{ type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: TuiValueDecorationComponent, selector: "tui-value-decoration" }, { type: i3.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i6.TuiAutofilledDirective, selector: "[tuiAutofilledChange]", outputs: ["tuiAutofilledChange"] }, { type: i7.TuiMaskAccessorDirective, selector: "input[tuiMaskAccessor]" }, { type: i8.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
280
+ ], queries: [{ propertyName: "content", predicate: PolymorpheusOutletDirective, descendants: true }], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"content?.changes | async\"></ng-container>\n<ng-container *ngIf=\"hintOptions?.change$ | async\"></ng-container>\n<div\n tuiWrapper\n automation-id=\"tui-primitive-textfield__wrapper\"\n [appearance]=\"appearance\"\n [readOnly]=\"readOnly\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n [style.--text-indent.px]=\"decor.pre$ | async\"\n (mousedown)=\"onMouseDown($event)\"\n (click.prevent.silent)=\"(0)\"\n (tuiAutofilledChange)=\"onAutofilled($event)\"\n>\n <ng-content select=\"input\"></ng-content>\n <ng-content select=\"select\"></ng-content>\n <input\n #focusableElement\n tuiMaskAccessor\n automation-id=\"tui-primitive-textfield__native-input\"\n class=\"t-input\"\n [disabled]=\"computedDisabled\"\n [attr.name]=\"name\"\n [attr.aria-invalid]=\"computedInvalid\"\n [id]=\"id\"\n [readOnly]=\"readOnly || !editable\"\n [tuiFocusable]=\"computedFocusable\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n />\n <div\n *ngIf=\"inputHidden\"\n automation-id=\"tui-primitive-textfield__value\"\n class=\"t-input t-input_template\"\n >\n <ng-content select=\"tuiContent\"></ng-content>\n </div>\n <div class=\"t-content\">\n <div\n *ngIf=\"iconLeftContent\"\n class=\"t-icon t-icon_left t-textfield-icon\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconLeftContent as src; context: {$implicit: size}\"\n tuiWrapper\n appearance=\"icon\"\n [src]=\"src\"\n ></tui-svg>\n </div>\n <div class=\"t-wrapper\">\n <label\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-primitive-textfield__placeholder\"\n class=\"t-placeholder\"\n [class.t-placeholder_raised]=\"placeholderRaised\"\n [for]=\"computedId\"\n >\n <ng-content></ng-content>\n </label>\n <div class=\"t-wrapper-value-decoration\">\n <tui-value-decoration\n #decor\n automation-id=\"tui-primitive-textfield__value-decoration\"\n aria-hidden=\"true\"\n class=\"t-value-decoration\"\n [class.t-has-value]=\"value\"\n [style.textIndent.px]=\"getIndent$(focusableElement) | async\"\n ></tui-value-decoration>\n </div>\n </div>\n <div class=\"t-icons\">\n <div\n *ngIf=\"hasCustomContent\"\n automation-id=\"tui-primitive-textfield__custom-content\"\n class=\"t-custom-content\"\n >\n <tui-svg\n *polymorpheusOutlet=\"controller.customContent as src\"\n class=\"t-custom-icon\"\n [src]=\"src\"\n ></tui-svg>\n </div>\n <span\n *ngIf=\"hasCleaner\"\n tuiWrapper\n appearance=\"icon\"\n automation-id=\"tui-primitive-textfield__cleaner\"\n class=\"t-cleaner\"\n (click.stop)=\"clear()\"\n >\n <tui-svg\n *polymorpheusOutlet=\"\n iconCleaner || controller.options.iconCleaner as src;\n context: {$implicit: size}\n \"\n [src]=\"src\"\n ></tui-svg>\n </span>\n <tui-tooltip\n *ngIf=\"showHint\"\n automation-id=\"tui-primitive-textfield__tooltip\"\n class=\"t-tooltip\"\n [describeId]=\"computedId\"\n [content]=\"hintOptions?.content\"\n ></tui-tooltip>\n <div\n *ngIf=\"iconContent\"\n class=\"t-icon t-textfield-icon\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconContent as src; context: {$implicit: size}\"\n tuiWrapper\n appearance=\"icon\"\n [src]=\"src\"\n ></tui-svg>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;text-align:left;border-radius:var(--tui-radius-m);height:var(--tui-height);min-height:var(--tui-height);max-height:var(--tui-height)}:host[data-size=s]{--tui-height: var(--tui-height-s)}:host[data-size=m]{--tui-height: var(--tui-height-m)}:host[data-size=l]{--tui-height: var(--tui-height-l);font:var(--tui-font-text-m);line-height:1.25rem}.t-input{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;margin:0;border:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;border:solid transparent;border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit;resize:none}.t-input:-webkit-autofill,.t-input:-webkit-autofill:hover,.t-input:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}.t-input:-webkit-autofill,.t-input:-webkit-autofill:first-line{font-size:inherit;line-height:inherit}.t-input::-webkit-caps-lock-indicator,.t-input::-webkit-contacts-auto-fill-button,.t-input::-webkit-credit-card-auto-fill-button,.t-input::-webkit-credentials-auto-fill-button,.t-input::-webkit-strong-password-auto-fill-button{content:none!important;position:absolute;left:-62.4375rem;top:-62.4375rem;z-index:-999;display:none!important;background:transparent!important;pointer-events:none!important}.t-input::placeholder{color:var(--tui-text-03);opacity:0}:host._focused:not(._readonly) .t-input::placeholder,:host-context(tui-primitive-textfield._focused:not(._readonly)) .t-input::placeholder,:host-context(tui-text-area._focused:not(._readonly)) .t-input::placeholder{opacity:1}[tuiWrapper][data-mode=onDark] .t-input:-webkit-autofill,.t-input :host-context([tuiWrapper][data-mode=\"onDark\"]):-webkit-autofill,[tuiWrapper][data-mode=onDark] .t-input:-webkit-autofill:hover,.t-input :host-context([tuiWrapper][data-mode=\"onDark\"]):-webkit-autofill:hover,[tuiWrapper][data-mode=onDark] .t-input:-webkit-autofill:focus,.t-input :host-context([tuiWrapper][data-mode=\"onDark\"]):-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill-night) inset!important}[tuiWrapper][data-mode=onDark] .t-input::placeholder,.t-input :host-context([tuiWrapper][data-mode=\"onDark\"])::placeholder{color:var(--tui-text-03-night)}:host[data-size=s] .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"s\"]):not(tui-primitive-textfield),.t-input :host-context(tui-text-area[data-size=\"s\"]):not(tui-text-area){padding:0 var(--tui-padding-s)}:host[data-size=m] .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"m\"]):not(tui-primitive-textfield),.t-input :host-context(tui-text-area[data-size=\"m\"]):not(tui-text-area){padding:0 var(--tui-padding-m)}:host[data-size=l] .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"l\"]):not(tui-primitive-textfield),.t-input :host-context(tui-text-area[data-size=\"l\"]):not(tui-text-area){padding:0 var(--tui-padding-l)}:host._disabled .t-input,.t-input :host-context(tui-primitive-textfield._disabled),.t-input :host-context(tui-text-area._disabled){pointer-events:none}:host[data-size=l]:not(._label-outside) .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)):not(tui-primitive-textfield){padding-top:1.25rem}:host[data-size=l]:not(._label-outside) .t-input:-webkit-autofill+.t-content .t-placeholder,.t-input :host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.t-content .t-placeholder{font-size:.8156rem;transform:translateY(-.625rem)}:host[data-size=m]:not(._label-outside) .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)):not(tui-primitive-textfield){padding-top:1rem}:host[data-size=m]:not(._label-outside) .t-input:-webkit-autofill+.t-content .t-placeholder,.t-input :host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.t-content .t-placeholder{font-size:.69rem;transform:translateY(-.5rem)}:host._hidden input.t-input,.t-input :host-context(tui-primitive-textfield._hidden){opacity:0;text-indent:-10em;-webkit-user-select:none}.t-content{display:flex;height:100%;width:100%;box-sizing:border-box;align-items:center;overflow:hidden}:host[data-size=s] .t-content{padding:0 var(--tui-padding-s)}:host[data-size=m] .t-content{padding:0 var(--tui-padding-m)}:host[data-size=l] .t-content{padding:0 var(--tui-padding-l)}.t-wrapper{flex:1;min-width:0;-webkit-padding-end:.25rem;padding-inline-end:.25rem}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;font:var(--tui-font-text-s);color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0)}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size=m] .t-placeholder_raised{font:var(--tui-font-text-xs);line-height:1.25rem;transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill)}:host._invalid:not(._focused) [tuiWrapper][data-mode=onDark] .t-placeholder_raised,:host._invalid:not(._focused):hover [tuiWrapper][data-mode=onDark] .t-placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .t-placeholder,:host[data-size=m]._focused._label-outside .t-placeholder,:host[data-size=l]._focused._label-outside .t-placeholder{color:var(--tui-text-03)}:host[data-size=l] .t-placeholder{font:var(--tui-font-text-m);line-height:1.25rem}:host[data-size=l] .t-placeholder_raised{font-size:.8156rem}:host[data-size=m]._focused:not(._label-outside) .t-placeholder,:host[data-size=l]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01)}[tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size=m]._focused:not(._label-outside) [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=l]._focused:not(._label-outside) [tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-01-night)}:host._focused [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=m]._focused._label-outside [tuiWrapper][data-mode=onDark] .t-placeholder,:host[data-size=l]._focused._label-outside [tuiWrapper][data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}@supports (-webkit-hyphens: none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}.t-cleaner{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none;pointer-events:auto}:host._readonly .t-cleaner,:host._disabled .t-cleaner{pointer-events:none}.t-icon{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none}:host[data-size=s] .t-icon_left{-webkit-margin-start:-.375rem;margin-inline-start:-.375rem}:host[data-size=m] .t-icon_left{-webkit-margin-start:-.125rem;margin-inline-start:-.125rem;-webkit-margin-end:.375rem;margin-inline-end:.375rem}:host[data-size=l] .t-icon_left{-webkit-margin-end:.75rem;margin-inline-end:.75rem}.t-icons{display:flex;align-items:center}:host[data-size=m] .t-icons{-webkit-margin-end:-.125rem;margin-inline-end:-.125rem}:host[data-size=s] .t-icons{-webkit-margin-end:-.375rem;margin-inline-end:-.375rem}:host:not([data-size=\"s\"]) .t-icons>:not(:first-child){-webkit-margin-start:.25rem;margin-inline-start:.25rem}:host._autofilled .t-value-decoration:not(.t-has-value){visibility:hidden}:host._autofilled[data-size=s]:not(._focused) .t-placeholder,:host._autofilled[data-size=m]:not(._focused) .t-placeholder{visibility:hidden}.t-custom-content{position:relative;display:flex;align-items:center;justify-content:center;min-width:2rem;height:2rem;pointer-events:none}.t-custom-icon{width:2rem;height:100%}.t-input:not(:first-child){display:none}:host[data-size] .t-input_template{display:flex;width:calc(100% - 1rem);max-width:calc(100% - 1rem);align-items:center;pointer-events:none;-webkit-padding-end:0;padding-inline-end:0}.t-text-template{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-wrapper-value-decoration{position:relative;pointer-events:none}\n"], components: [{ type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: TuiValueDecorationComponent, selector: "tui-value-decoration" }, { type: i3.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i6.TuiAutofilledDirective, selector: "[tuiAutofilledChange]", outputs: ["tuiAutofilledChange"] }, { type: i7.TuiMaskAccessorDirective, selector: "input[tuiMaskAccessor]" }, { type: i8.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
278
281
  __decorate([
279
282
  tuiPure
280
283
  ], TuiPrimitiveTextfieldComponent.prototype, "getIndent$", null);
@@ -410,7 +413,7 @@ class TuiTextfieldComponent {
410
413
  }
411
414
  }
412
415
  TuiTextfieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiTextfieldComponent, deps: [{ token: TUI_TEXTFIELD_HOST }, { token: TUI_TEXTFIELD_WATCHED_CONTROLLER$1 }, { token: ElementRef }, { token: TuiIdService }, { token: TUI_LEGACY_MASK, optional: true }], target: i0.ɵɵFactoryTarget.Component });
413
- TuiTextfieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]", host: { attributes: { "type": "text" }, listeners: { "input": "!legacyMask && host.onValueChange($event.target.value)" }, properties: { "attr.id": "id", "attr.inputMode": "inputMode", "attr.aria-invalid": "host.invalid", "attr.disabled": "host.disabled || null", "tabIndex": "host.focusable ? 0 : -1", "readOnly": "host.readOnly", "value": "host.value" } }, providers: [TEXTFIELD_CONTROLLER_PROVIDER$1], ngImport: i0, template: '', isInline: true, styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;margin:0;border:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;padding:0 var(--tui-padding-m);border:solid transparent;border-width:0 var(--border-end, 0) 0 var(--border-start, 0);border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit;resize:none}:host:-webkit-autofill,:host:-webkit-autofill:hover,:host:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}:host:-webkit-autofill,:host:-webkit-autofill:first-line{font-size:inherit;line-height:inherit}:host::-webkit-caps-lock-indicator,:host::-webkit-contacts-auto-fill-button,:host::-webkit-credit-card-auto-fill-button,:host::-webkit-credentials-auto-fill-button,:host::-webkit-strong-password-auto-fill-button{content:none!important;position:absolute;left:-62.4375rem;top:-62.4375rem;z-index:-999;display:none!important;background:transparent!important;pointer-events:none!important}:host::placeholder{color:var(--tui-text-03);opacity:0}:host._focused:not(._readonly) :host::placeholder,:host-context(tui-primitive-textfield._focused:not(._readonly)) :host::placeholder,:host-context(tui-text-area._focused:not(._readonly)) :host::placeholder{opacity:1}[tuiWrapper][data-mode=onDark] :host:-webkit-autofill,:host :host-context([tuiWrapper][data-mode=\"onDark\"]):-webkit-autofill,[tuiWrapper][data-mode=onDark] :host:-webkit-autofill:hover,:host :host-context([tuiWrapper][data-mode=\"onDark\"]):-webkit-autofill:hover,[tuiWrapper][data-mode=onDark] :host:-webkit-autofill:focus,:host :host-context([tuiWrapper][data-mode=\"onDark\"]):-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill-night) inset!important}[tuiWrapper][data-mode=onDark] :host::placeholder,:host :host-context([tuiWrapper][data-mode=\"onDark\"])::placeholder{color:var(--tui-text-03-night)}:host[data-size=s] :host,:host :host-context(tui-primitive-textfield[data-size=\"s\"]):not(tui-primitive-textfield),:host :host-context(tui-text-area[data-size=\"s\"]):not(tui-text-area){padding:0 var(--tui-padding-s)}:host[data-size=l] :host,:host :host-context(tui-primitive-textfield[data-size=\"l\"]):not(tui-primitive-textfield),:host :host-context(tui-text-area[data-size=\"l\"]):not(tui-text-area){padding:0 var(--tui-padding-l)}:host._disabled :host,:host :host-context(tui-primitive-textfield._disabled),:host :host-context(tui-text-area._disabled){pointer-events:none}:host[data-size=l]:not(._label-outside) :host,:host :host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)):not(tui-primitive-textfield){padding-top:1.25rem}:host[data-size=l]:not(._label-outside) :host:-webkit-autofill+.t-content .t-placeholder,:host :host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.t-content .t-placeholder{font-size:.8156rem;transform:translateY(-.625rem)}:host[data-size=m]:not(._label-outside) :host,:host :host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)):not(tui-primitive-textfield){padding-top:1rem}:host[data-size=m]:not(._label-outside) :host:-webkit-autofill+.t-content .t-placeholder,:host :host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.t-content .t-placeholder{font-size:.69rem;transform:translateY(-.5rem)}:host._hidden input:host,:host :host-context(tui-primitive-textfield._hidden){opacity:0;text-indent:-10em;-webkit-user-select:none}textarea:host{white-space:pre-wrap}textarea:host :host-context(tui-text-area._ios){padding-left:.8125rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
416
+ TuiTextfieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]", host: { attributes: { "type": "text" }, listeners: { "input": "!legacyMask && host.onValueChange($event.target.value)" }, properties: { "attr.id": "id", "attr.inputMode": "inputMode", "attr.aria-invalid": "host.invalid", "attr.disabled": "host.disabled || null", "tabIndex": "host.focusable ? 0 : -1", "readOnly": "host.readOnly", "value": "host.value" } }, providers: [TEXTFIELD_CONTROLLER_PROVIDER$1], ngImport: i0, template: '', isInline: true, styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;margin:0;border:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;border:solid transparent;border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit;resize:none}:host:-webkit-autofill,:host:-webkit-autofill:hover,:host:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}:host:-webkit-autofill,:host:-webkit-autofill:first-line{font-size:inherit;line-height:inherit}:host::-webkit-caps-lock-indicator,:host::-webkit-contacts-auto-fill-button,:host::-webkit-credit-card-auto-fill-button,:host::-webkit-credentials-auto-fill-button,:host::-webkit-strong-password-auto-fill-button{content:none!important;position:absolute;left:-62.4375rem;top:-62.4375rem;z-index:-999;display:none!important;background:transparent!important;pointer-events:none!important}:host::placeholder{color:var(--tui-text-03);opacity:0}:host._focused:not(._readonly) :host::placeholder,:host-context(tui-primitive-textfield._focused:not(._readonly)) :host::placeholder,:host-context(tui-text-area._focused:not(._readonly)) :host::placeholder{opacity:1}[tuiWrapper][data-mode=onDark] :host:-webkit-autofill,:host :host-context([tuiWrapper][data-mode=\"onDark\"]):-webkit-autofill,[tuiWrapper][data-mode=onDark] :host:-webkit-autofill:hover,:host :host-context([tuiWrapper][data-mode=\"onDark\"]):-webkit-autofill:hover,[tuiWrapper][data-mode=onDark] :host:-webkit-autofill:focus,:host :host-context([tuiWrapper][data-mode=\"onDark\"]):-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill-night) inset!important}[tuiWrapper][data-mode=onDark] :host::placeholder,:host :host-context([tuiWrapper][data-mode=\"onDark\"])::placeholder{color:var(--tui-text-03-night)}:host[data-size=s] :host,:host :host-context(tui-primitive-textfield[data-size=\"s\"]):not(tui-primitive-textfield),:host :host-context(tui-text-area[data-size=\"s\"]):not(tui-text-area){padding:0 var(--tui-padding-s)}:host[data-size=m] :host,:host :host-context(tui-primitive-textfield[data-size=\"m\"]):not(tui-primitive-textfield),:host :host-context(tui-text-area[data-size=\"m\"]):not(tui-text-area){padding:0 var(--tui-padding-m)}:host[data-size=l] :host,:host :host-context(tui-primitive-textfield[data-size=\"l\"]):not(tui-primitive-textfield),:host :host-context(tui-text-area[data-size=\"l\"]):not(tui-text-area){padding:0 var(--tui-padding-l)}:host._disabled :host,:host :host-context(tui-primitive-textfield._disabled),:host :host-context(tui-text-area._disabled){pointer-events:none}:host[data-size=l]:not(._label-outside) :host,:host :host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)):not(tui-primitive-textfield){padding-top:1.25rem}:host[data-size=l]:not(._label-outside) :host:-webkit-autofill+.t-content .t-placeholder,:host :host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.t-content .t-placeholder{font-size:.8156rem;transform:translateY(-.625rem)}:host[data-size=m]:not(._label-outside) :host,:host :host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)):not(tui-primitive-textfield){padding-top:1rem}:host[data-size=m]:not(._label-outside) :host:-webkit-autofill+.t-content .t-placeholder,:host :host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.t-content .t-placeholder{font-size:.69rem;transform:translateY(-.5rem)}:host._hidden input:host,:host :host-context(tui-primitive-textfield._hidden){opacity:0;text-indent:-10em;-webkit-user-select:none}textarea:host{white-space:pre-wrap}textarea:host :host-context(tui-text-area._ios){padding-left:.8125rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
414
417
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiTextfieldComponent, decorators: [{
415
418
  type: Component,
416
419
  args: [{
@@ -526,5 +529,5 @@ const tuiPrimitiveTextfieldOptionsProvider = tuiTextfieldOptionsProvider;
526
529
  * Generated bundle index. Do not edit.
527
530
  */
528
531
 
529
- export { TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS, TUI_PRIMITIVE_TEXTFIELD_OPTIONS, TuiPrimitiveTextfieldComponent, TuiPrimitiveTextfieldDirective, TuiPrimitiveTextfieldModule, TuiTextfieldComponent, TuiValueDecorationComponent, tuiPrimitiveTextfieldOptionsProvider };
532
+ export { TUI_ICON_PADDINGS, TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS, TUI_PRIMITIVE_TEXTFIELD_OPTIONS, TuiPrimitiveTextfieldComponent, TuiPrimitiveTextfieldDirective, TuiPrimitiveTextfieldModule, TuiTextfieldComponent, TuiValueDecorationComponent, tuiPrimitiveTextfieldOptionsProvider };
530
533
  //# sourceMappingURL=taiga-ui-core-components-primitive-textfield.js.map