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

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 (40) hide show
  1. package/components/dialog/dialog.directive.d.ts +4 -3
  2. package/components/dialog/dialog.service.d.ts +5 -2
  3. package/components/index.d.ts +1 -0
  4. package/components/link/link.directive.d.ts +2 -2
  5. package/components/loader/loader.component.d.ts +7 -7
  6. package/components/modal/index.d.ts +2 -0
  7. package/components/modal/modal.component.d.ts +17 -0
  8. package/components/modal/modal.service.d.ts +13 -0
  9. package/components/notification/notification.directive.d.ts +7 -11
  10. package/components/scrollbar/scroll-into-view.directive.d.ts +3 -2
  11. package/components/scrollbar/scrollbar.component.d.ts +2 -2
  12. package/components/scrollbar/scrollbar.directive.d.ts +2 -2
  13. package/components/spin-button/spin-button.component.d.ts +7 -8
  14. package/components/textfield/textfield-multi/textfield-multi.component.d.ts +2 -2
  15. package/components/textfield/textfield.component.d.ts +3 -4
  16. package/components/textfield/textfield.directive.d.ts +9 -12
  17. package/fesm2022/taiga-ui-core-components-calendar.mjs +5 -7
  18. package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
  19. package/fesm2022/taiga-ui-core-components-dialog.mjs +29 -17
  20. package/fesm2022/taiga-ui-core-components-dialog.mjs.map +1 -1
  21. package/fesm2022/taiga-ui-core-components-link.mjs +5 -7
  22. package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
  23. package/fesm2022/taiga-ui-core-components-loader.mjs +12 -25
  24. package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
  25. package/fesm2022/taiga-ui-core-components-modal.mjs +89 -0
  26. package/fesm2022/taiga-ui-core-components-modal.mjs.map +1 -0
  27. package/fesm2022/taiga-ui-core-components-notification.mjs +12 -27
  28. package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
  29. package/fesm2022/taiga-ui-core-components-root.mjs +1 -1
  30. package/fesm2022/taiga-ui-core-components-scrollbar.mjs +35 -40
  31. package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
  32. package/fesm2022/taiga-ui-core-components-spin-button.mjs +12 -24
  33. package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
  34. package/fesm2022/taiga-ui-core-components-textfield.mjs +37 -67
  35. package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
  36. package/fesm2022/taiga-ui-core-components.mjs +1 -0
  37. package/fesm2022/taiga-ui-core-components.mjs.map +1 -1
  38. package/fesm2022/taiga-ui-core-directives-popup.mjs +2 -2
  39. package/fesm2022/taiga-ui-core-directives-popup.mjs.map +1 -1
  40. package/package.json +5 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, Input, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { InjectionToken, inject, computed, input, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { TUI_IS_IOS } from '@taiga-ui/cdk/tokens';
4
4
  import { tuiIsSafari } from '@taiga-ui/cdk/utils/browser';
5
5
  import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
@@ -28,36 +28,23 @@ class TuiLoader {
28
28
  this.isIOS = inject(TUI_IS_IOS);
29
29
  this.options = inject(TUI_LOADER_OPTIONS);
30
30
  this.isApple = tuiIsSafari(tuiInjectElement()) || this.isIOS;
31
- this.size = this.options.size;
32
- this.inheritColor = this.options.inheritColor;
33
- this.overlay = this.options.overlay;
34
- // TODO: Drop alias in v5
35
- this.loading = true;
36
- }
37
- get isHorizontal() {
38
- return !tuiSizeBigger(this.size);
31
+ this.isHorizontal = computed(() => !tuiSizeBigger(this.size()));
32
+ this.size = input(this.options.size);
33
+ this.inheritColor = input(this.options.inheritColor);
34
+ this.overlay = input(this.options.overlay);
35
+ this.textContent = input();
36
+ this.loading = input(true);
39
37
  }
40
38
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLoader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
41
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiLoader, isStandalone: true, selector: "tui-loader", inputs: { size: "size", inheritColor: "inheritColor", overlay: "overlay", textContent: "textContent", loading: ["showLoader", "loading"] }, host: { properties: { "class._loading": "loading", "attr.data-size": "size" } }, ngImport: i0, template: "<fieldset\n class=\"t-content\"\n [attr.inert]=\"loading || null\"\n [class.t-content_has-overlay]=\"overlay && loading\"\n [class.t-content_loading]=\"loading\"\n [disabled]=\"loading && !isApple\"\n>\n <ng-content />\n</fieldset>\n\n@if (loading) {\n <div\n class=\"t-loader\"\n [class.t-loader_horizontal]=\"isHorizontal\"\n [class.t-loader_inherit-color]=\"inheritColor\"\n >\n <svg\n automation-id=\"tui-loader__loader\"\n focusable=\"false\"\n height=\"100%\"\n width=\"100%\"\n class=\"t-icon\"\n >\n <circle\n cx=\"50%\"\n cy=\"50%\"\n class=\"t-circle\"\n />\n </svg>\n @if (textContent) {\n <div\n automation-id=\"tui-loader__text\"\n class=\"t-text\"\n [class.t-text_horizontal]=\"isHorizontal\"\n >\n <ng-container *polymorpheusOutlet=\"textContent as text\">\n {{ text }}\n </ng-container>\n </div>\n }\n </div>\n}\n", styles: [":host{position:relative;display:flex;min-inline-size:1.5rem;--tui-thickness: calc(var(--t-diameter) / 12)}:host._loading{overflow:hidden}:host[data-size=xs]{--t-diameter: .75em}:host[data-size=s]{--t-diameter: 1em}:host[data-size=m]{--t-diameter: 1.5em}:host[data-size=l]{--t-diameter: 2.5em}:host[data-size=xl]{--t-diameter: 3.5em}:host[data-size=xxl]{--t-diameter: 5em}.t-content{z-index:0;min-inline-size:100%;block-size:100%;padding:0;margin:0;border:none}.t-content_has-overlay{opacity:.3}.t-content_loading{pointer-events:none}.t-loader{position:relative;left:-100%;display:flex;inset-inline-start:-100%;flex-direction:column;align-items:center;justify-content:center;min-inline-size:100%;min-block-size:var(--t-diameter);flex-shrink:0;align-self:center;color:var(--tui-text-primary);stroke:var(--tui-background-accent-1);animation:tuiFadeIn var(--tui-duration);font-size:1rem}.t-loader.t-loader_horizontal{flex-direction:row}.t-loader.t-loader_inherit-color{color:inherit;stroke:currentColor}.t-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:var(--tui-font-text-s);margin-block-start:1rem;color:inherit;max-inline-size:100%;text-align:center;stroke-width:0}.t-text_horizontal{margin:0;margin-inline-start:1rem}@keyframes tuiLoaderRotate{0%{transform:rotate(-90deg)}50%{transform:rotate(-90deg) rotate(1turn)}to{transform:rotate(-90deg) rotate(3turn)}}.t-icon{display:block;inline-size:var(--t-diameter);block-size:var(--t-diameter);margin:0 calc(var(--t-diameter) / -2);border-radius:100%;overflow:hidden;animation:tuiLoaderRotate 4s linear infinite}@supports (-webkit-hyphens: none){.t-icon{overflow:visible}}@keyframes tuiLoaderDashOffset{0%{stroke-dashoffset:calc(2 * 3.14159265 * calc(var(--t-diameter) / 2 - var(--tui-thickness)))}50%{stroke-dashoffset:calc(.05 * calc(2 * 3.14159265 * calc(var(--t-diameter) / 2 - var(--tui-thickness))))}to{stroke-dashoffset:calc(2 * 3.14159265 * calc(var(--t-diameter) / 2 - var(--tui-thickness)))}}.t-circle{r:calc(var(--t-diameter) / 2 - var(--tui-thickness));stroke-dasharray:calc(2 * 3.14159265 * calc(var(--t-diameter) / 2 - var(--tui-thickness)));fill:none;stroke:inherit;stroke-width:max(var(--tui-thickness),1.5px);animation:tuiLoaderDashOffset 4s linear infinite}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
39
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiLoader, isStandalone: true, selector: "tui-loader", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, inheritColor: { classPropertyName: "inheritColor", publicName: "inheritColor", isSignal: true, isRequired: false, transformFunction: null }, overlay: { classPropertyName: "overlay", publicName: "overlay", isSignal: true, isRequired: false, transformFunction: null }, textContent: { classPropertyName: "textContent", publicName: "textContent", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class._loading": "loading()", "attr.data-size": "size()" } }, ngImport: i0, template: "<fieldset\n class=\"t-content\"\n [attr.inert]=\"loading() || null\"\n [class.t-content_has-overlay]=\"overlay() && loading()\"\n [class.t-content_loading]=\"loading()\"\n [disabled]=\"loading() && !isApple\"\n>\n <ng-content />\n</fieldset>\n\n@if (loading()) {\n <div\n class=\"t-loader\"\n [class.t-loader_horizontal]=\"isHorizontal()\"\n [class.t-loader_inherit-color]=\"inheritColor()\"\n >\n <svg\n automation-id=\"tui-loader__loader\"\n focusable=\"false\"\n height=\"100%\"\n width=\"100%\"\n class=\"t-icon\"\n >\n <circle\n cx=\"50%\"\n cy=\"50%\"\n class=\"t-circle\"\n />\n </svg>\n @if (textContent()) {\n <div\n automation-id=\"tui-loader__text\"\n class=\"t-text\"\n [class.t-text_horizontal]=\"isHorizontal()\"\n >\n <ng-container *polymorpheusOutlet=\"textContent() as text\">\n {{ text }}\n </ng-container>\n </div>\n }\n </div>\n}\n", styles: [":host{position:relative;display:flex;min-inline-size:1.5rem;--tui-thickness: calc(var(--t-diameter) / 12)}:host._loading{overflow:hidden}:host[data-size=xs]{--t-diameter: .75em}:host[data-size=s]{--t-diameter: 1em}:host[data-size=m]{--t-diameter: 1.5em}:host[data-size=l]{--t-diameter: 2.5em}:host[data-size=xl]{--t-diameter: 3.5em}:host[data-size=xxl]{--t-diameter: 5em}.t-content{z-index:0;min-inline-size:100%;block-size:100%;padding:0;margin:0;border:none}.t-content_has-overlay{opacity:.3}.t-content_loading{pointer-events:none}.t-loader{position:relative;left:-100%;display:flex;inset-inline-start:-100%;flex-direction:column;align-items:center;justify-content:center;min-inline-size:100%;min-block-size:var(--t-diameter);flex-shrink:0;align-self:center;color:var(--tui-text-primary);stroke:var(--tui-background-accent-1);animation:tuiFadeIn var(--tui-duration);font-size:1rem}.t-loader.t-loader_horizontal{flex-direction:row}.t-loader.t-loader_inherit-color{color:inherit;stroke:currentColor}.t-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:var(--tui-font-text-s);margin-block-start:1rem;color:inherit;max-inline-size:100%;text-align:center;stroke-width:0}.t-text_horizontal{margin:0;margin-inline-start:1rem}@keyframes tuiLoaderRotate{0%{transform:rotate(-90deg)}50%{transform:rotate(-90deg) rotate(1turn)}to{transform:rotate(-90deg) rotate(3turn)}}.t-icon{display:block;inline-size:var(--t-diameter);block-size:var(--t-diameter);margin:0 calc(var(--t-diameter) / -2);border-radius:100%;overflow:hidden;animation:tuiLoaderRotate 4s linear infinite}@supports (-webkit-hyphens: none){.t-icon{overflow:visible}}@keyframes tuiLoaderDashOffset{0%{stroke-dashoffset:calc(2 * 3.14159265 * calc(var(--t-diameter) / 2 - var(--tui-thickness)))}50%{stroke-dashoffset:calc(.05 * calc(2 * 3.14159265 * calc(var(--t-diameter) / 2 - var(--tui-thickness))))}to{stroke-dashoffset:calc(2 * 3.14159265 * calc(var(--t-diameter) / 2 - var(--tui-thickness)))}}.t-circle{r:calc(var(--t-diameter) / 2 - var(--tui-thickness));stroke-dasharray:calc(2 * 3.14159265 * calc(var(--t-diameter) / 2 - var(--tui-thickness)));fill:none;stroke:inherit;stroke-width:max(var(--tui-thickness),1.5px);animation:tuiLoaderDashOffset 4s linear infinite}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
42
40
  }
43
41
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLoader, decorators: [{
44
42
  type: Component,
45
43
  args: [{ selector: 'tui-loader', imports: [PolymorpheusOutlet], changeDetection: ChangeDetectionStrategy.OnPush, host: {
46
- '[class._loading]': 'loading',
47
- '[attr.data-size]': 'size',
48
- }, template: "<fieldset\n class=\"t-content\"\n [attr.inert]=\"loading || null\"\n [class.t-content_has-overlay]=\"overlay && loading\"\n [class.t-content_loading]=\"loading\"\n [disabled]=\"loading && !isApple\"\n>\n <ng-content />\n</fieldset>\n\n@if (loading) {\n <div\n class=\"t-loader\"\n [class.t-loader_horizontal]=\"isHorizontal\"\n [class.t-loader_inherit-color]=\"inheritColor\"\n >\n <svg\n automation-id=\"tui-loader__loader\"\n focusable=\"false\"\n height=\"100%\"\n width=\"100%\"\n class=\"t-icon\"\n >\n <circle\n cx=\"50%\"\n cy=\"50%\"\n class=\"t-circle\"\n />\n </svg>\n @if (textContent) {\n <div\n automation-id=\"tui-loader__text\"\n class=\"t-text\"\n [class.t-text_horizontal]=\"isHorizontal\"\n >\n <ng-container *polymorpheusOutlet=\"textContent as text\">\n {{ text }}\n </ng-container>\n </div>\n }\n </div>\n}\n", styles: [":host{position:relative;display:flex;min-inline-size:1.5rem;--tui-thickness: calc(var(--t-diameter) / 12)}:host._loading{overflow:hidden}:host[data-size=xs]{--t-diameter: .75em}:host[data-size=s]{--t-diameter: 1em}:host[data-size=m]{--t-diameter: 1.5em}:host[data-size=l]{--t-diameter: 2.5em}:host[data-size=xl]{--t-diameter: 3.5em}:host[data-size=xxl]{--t-diameter: 5em}.t-content{z-index:0;min-inline-size:100%;block-size:100%;padding:0;margin:0;border:none}.t-content_has-overlay{opacity:.3}.t-content_loading{pointer-events:none}.t-loader{position:relative;left:-100%;display:flex;inset-inline-start:-100%;flex-direction:column;align-items:center;justify-content:center;min-inline-size:100%;min-block-size:var(--t-diameter);flex-shrink:0;align-self:center;color:var(--tui-text-primary);stroke:var(--tui-background-accent-1);animation:tuiFadeIn var(--tui-duration);font-size:1rem}.t-loader.t-loader_horizontal{flex-direction:row}.t-loader.t-loader_inherit-color{color:inherit;stroke:currentColor}.t-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:var(--tui-font-text-s);margin-block-start:1rem;color:inherit;max-inline-size:100%;text-align:center;stroke-width:0}.t-text_horizontal{margin:0;margin-inline-start:1rem}@keyframes tuiLoaderRotate{0%{transform:rotate(-90deg)}50%{transform:rotate(-90deg) rotate(1turn)}to{transform:rotate(-90deg) rotate(3turn)}}.t-icon{display:block;inline-size:var(--t-diameter);block-size:var(--t-diameter);margin:0 calc(var(--t-diameter) / -2);border-radius:100%;overflow:hidden;animation:tuiLoaderRotate 4s linear infinite}@supports (-webkit-hyphens: none){.t-icon{overflow:visible}}@keyframes tuiLoaderDashOffset{0%{stroke-dashoffset:calc(2 * 3.14159265 * calc(var(--t-diameter) / 2 - var(--tui-thickness)))}50%{stroke-dashoffset:calc(.05 * calc(2 * 3.14159265 * calc(var(--t-diameter) / 2 - var(--tui-thickness))))}to{stroke-dashoffset:calc(2 * 3.14159265 * calc(var(--t-diameter) / 2 - var(--tui-thickness)))}}.t-circle{r:calc(var(--t-diameter) / 2 - var(--tui-thickness));stroke-dasharray:calc(2 * 3.14159265 * calc(var(--t-diameter) / 2 - var(--tui-thickness)));fill:none;stroke:inherit;stroke-width:max(var(--tui-thickness),1.5px);animation:tuiLoaderDashOffset 4s linear infinite}\n"] }]
49
- }], propDecorators: { size: [{
50
- type: Input
51
- }], inheritColor: [{
52
- type: Input
53
- }], overlay: [{
54
- type: Input
55
- }], textContent: [{
56
- type: Input
57
- }], loading: [{
58
- type: Input,
59
- args: ['showLoader']
60
- }] } });
44
+ '[class._loading]': 'loading()',
45
+ '[attr.data-size]': 'size()',
46
+ }, template: "<fieldset\n class=\"t-content\"\n [attr.inert]=\"loading() || null\"\n [class.t-content_has-overlay]=\"overlay() && loading()\"\n [class.t-content_loading]=\"loading()\"\n [disabled]=\"loading() && !isApple\"\n>\n <ng-content />\n</fieldset>\n\n@if (loading()) {\n <div\n class=\"t-loader\"\n [class.t-loader_horizontal]=\"isHorizontal()\"\n [class.t-loader_inherit-color]=\"inheritColor()\"\n >\n <svg\n automation-id=\"tui-loader__loader\"\n focusable=\"false\"\n height=\"100%\"\n width=\"100%\"\n class=\"t-icon\"\n >\n <circle\n cx=\"50%\"\n cy=\"50%\"\n class=\"t-circle\"\n />\n </svg>\n @if (textContent()) {\n <div\n automation-id=\"tui-loader__text\"\n class=\"t-text\"\n [class.t-text_horizontal]=\"isHorizontal()\"\n >\n <ng-container *polymorpheusOutlet=\"textContent() as text\">\n {{ text }}\n </ng-container>\n </div>\n }\n </div>\n}\n", styles: [":host{position:relative;display:flex;min-inline-size:1.5rem;--tui-thickness: calc(var(--t-diameter) / 12)}:host._loading{overflow:hidden}:host[data-size=xs]{--t-diameter: .75em}:host[data-size=s]{--t-diameter: 1em}:host[data-size=m]{--t-diameter: 1.5em}:host[data-size=l]{--t-diameter: 2.5em}:host[data-size=xl]{--t-diameter: 3.5em}:host[data-size=xxl]{--t-diameter: 5em}.t-content{z-index:0;min-inline-size:100%;block-size:100%;padding:0;margin:0;border:none}.t-content_has-overlay{opacity:.3}.t-content_loading{pointer-events:none}.t-loader{position:relative;left:-100%;display:flex;inset-inline-start:-100%;flex-direction:column;align-items:center;justify-content:center;min-inline-size:100%;min-block-size:var(--t-diameter);flex-shrink:0;align-self:center;color:var(--tui-text-primary);stroke:var(--tui-background-accent-1);animation:tuiFadeIn var(--tui-duration);font-size:1rem}.t-loader.t-loader_horizontal{flex-direction:row}.t-loader.t-loader_inherit-color{color:inherit;stroke:currentColor}.t-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:var(--tui-font-text-s);margin-block-start:1rem;color:inherit;max-inline-size:100%;text-align:center;stroke-width:0}.t-text_horizontal{margin:0;margin-inline-start:1rem}@keyframes tuiLoaderRotate{0%{transform:rotate(-90deg)}50%{transform:rotate(-90deg) rotate(1turn)}to{transform:rotate(-90deg) rotate(3turn)}}.t-icon{display:block;inline-size:var(--t-diameter);block-size:var(--t-diameter);margin:0 calc(var(--t-diameter) / -2);border-radius:100%;overflow:hidden;animation:tuiLoaderRotate 4s linear infinite}@supports (-webkit-hyphens: none){.t-icon{overflow:visible}}@keyframes tuiLoaderDashOffset{0%{stroke-dashoffset:calc(2 * 3.14159265 * calc(var(--t-diameter) / 2 - var(--tui-thickness)))}50%{stroke-dashoffset:calc(.05 * calc(2 * 3.14159265 * calc(var(--t-diameter) / 2 - var(--tui-thickness))))}to{stroke-dashoffset:calc(2 * 3.14159265 * calc(var(--t-diameter) / 2 - var(--tui-thickness)))}}.t-circle{r:calc(var(--t-diameter) / 2 - var(--tui-thickness));stroke-dasharray:calc(2 * 3.14159265 * calc(var(--t-diameter) / 2 - var(--tui-thickness)));fill:none;stroke:inherit;stroke-width:max(var(--tui-thickness),1.5px);animation:tuiLoaderDashOffset 4s linear infinite}\n"] }]
47
+ }] });
61
48
 
62
49
  /**
63
50
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-loader.mjs","sources":["../../../projects/core/components/loader/loader.options.ts","../../../projects/core/components/loader/loader.component.ts","../../../projects/core/components/loader/loader.template.html","../../../projects/core/components/loader/taiga-ui-core-components-loader.ts"],"sourcesContent":["import {InjectionToken, type Provider} from '@angular/core';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiSizeXS, type TuiSizeXXL} from '@taiga-ui/core/types';\n\nexport interface TuiLoaderOptions {\n readonly inheritColor: boolean;\n readonly overlay: boolean;\n readonly size: TuiSizeXS | TuiSizeXXL;\n}\n\n/** Default values for the loader options. */\nexport const TUI_LOADER_DEFAULT_OPTIONS: TuiLoaderOptions = {\n size: 'm',\n inheritColor: false,\n overlay: false,\n};\n\n/**\n * Default parameters for loader component\n */\nexport const TUI_LOADER_OPTIONS = new InjectionToken(\n ngDevMode ? 'TUI_LOADER_OPTIONS' : '',\n {\n factory: () => TUI_LOADER_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiLoaderOptionsProvider(options: Partial<TuiLoaderOptions>): Provider {\n return tuiProvideOptions(TUI_LOADER_OPTIONS, options, TUI_LOADER_DEFAULT_OPTIONS);\n}\n","import {ChangeDetectionStrategy, Component, inject, Input} from '@angular/core';\nimport {TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {tuiIsSafari} from '@taiga-ui/cdk/utils/browser';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiSizeBigger} from '@taiga-ui/core/utils/miscellaneous';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TUI_LOADER_OPTIONS} from './loader.options';\n\n@Component({\n selector: 'tui-loader',\n imports: [PolymorpheusOutlet],\n templateUrl: './loader.template.html',\n styleUrl: './loader.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class._loading]': 'loading',\n '[attr.data-size]': 'size',\n },\n})\nexport class TuiLoader {\n private readonly isIOS = inject(TUI_IS_IOS);\n private readonly options = inject(TUI_LOADER_OPTIONS);\n protected readonly isApple = tuiIsSafari(tuiInjectElement()) || this.isIOS;\n\n @Input()\n public size = this.options.size;\n\n @Input()\n public inheritColor = this.options.inheritColor;\n\n @Input()\n public overlay = this.options.overlay;\n\n @Input()\n public textContent: PolymorpheusContent;\n\n // TODO: Drop alias in v5\n @Input('showLoader')\n public loading = true;\n\n protected get isHorizontal(): boolean {\n return !tuiSizeBigger(this.size);\n }\n}\n","<fieldset\n class=\"t-content\"\n [attr.inert]=\"loading || null\"\n [class.t-content_has-overlay]=\"overlay && loading\"\n [class.t-content_loading]=\"loading\"\n [disabled]=\"loading && !isApple\"\n>\n <ng-content />\n</fieldset>\n\n@if (loading) {\n <div\n class=\"t-loader\"\n [class.t-loader_horizontal]=\"isHorizontal\"\n [class.t-loader_inherit-color]=\"inheritColor\"\n >\n <svg\n automation-id=\"tui-loader__loader\"\n focusable=\"false\"\n height=\"100%\"\n width=\"100%\"\n class=\"t-icon\"\n >\n <circle\n cx=\"50%\"\n cy=\"50%\"\n class=\"t-circle\"\n />\n </svg>\n @if (textContent) {\n <div\n automation-id=\"tui-loader__text\"\n class=\"t-text\"\n [class.t-text_horizontal]=\"isHorizontal\"\n >\n <ng-container *polymorpheusOutlet=\"textContent as text\">\n {{ text }}\n </ng-container>\n </div>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAUA;AACa,MAAA,0BAA0B,GAAqB;AACxD,IAAA,IAAI,EAAE,GAAG;AACT,IAAA,YAAY,EAAE,KAAK;AACnB,IAAA,OAAO,EAAE,KAAK;;AAGlB;;AAEG;AACU,MAAA,kBAAkB,GAAG,IAAI,cAAc,CAChD,SAAS,GAAG,oBAAoB,GAAG,EAAE,EACrC;AACI,IAAA,OAAO,EAAE,MAAM,0BAA0B;AAC5C,CAAA;AAGC,SAAU,wBAAwB,CAAC,OAAkC,EAAA;IACvE,OAAO,iBAAiB,CAAC,kBAAkB,EAAE,OAAO,EAAE,0BAA0B,CAAC;AACrF;;MCTa,SAAS,CAAA;AAXtB,IAAA,WAAA,GAAA;AAYqB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC;AAC1B,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,kBAAkB,CAAC;QAClC,IAAO,CAAA,OAAA,GAAG,WAAW,CAAC,gBAAgB,EAAE,CAAC,IAAI,IAAI,CAAC,KAAK;AAGnE,QAAA,IAAA,CAAA,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI;AAGxB,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY;AAGxC,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO;;QAO9B,IAAO,CAAA,OAAA,GAAG,IAAI;AAKxB;AAHG,IAAA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BADb;gBAIM,WAAW,EAAA,CAAA;sBADjB;gBAKM,OAAO,EAAA,CAAA;sBADb,KAAK;uBAAC,YAAY;;;AEtCvB;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-loader.mjs","sources":["../../../projects/core/components/loader/loader.options.ts","../../../projects/core/components/loader/loader.component.ts","../../../projects/core/components/loader/loader.template.html","../../../projects/core/components/loader/taiga-ui-core-components-loader.ts"],"sourcesContent":["import {InjectionToken, type Provider} from '@angular/core';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiSizeXS, type TuiSizeXXL} from '@taiga-ui/core/types';\n\nexport interface TuiLoaderOptions {\n readonly inheritColor: boolean;\n readonly overlay: boolean;\n readonly size: TuiSizeXS | TuiSizeXXL;\n}\n\n/** Default values for the loader options. */\nexport const TUI_LOADER_DEFAULT_OPTIONS: TuiLoaderOptions = {\n size: 'm',\n inheritColor: false,\n overlay: false,\n};\n\n/**\n * Default parameters for loader component\n */\nexport const TUI_LOADER_OPTIONS = new InjectionToken(\n ngDevMode ? 'TUI_LOADER_OPTIONS' : '',\n {\n factory: () => TUI_LOADER_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiLoaderOptionsProvider(options: Partial<TuiLoaderOptions>): Provider {\n return tuiProvideOptions(TUI_LOADER_OPTIONS, options, TUI_LOADER_DEFAULT_OPTIONS);\n}\n","import {ChangeDetectionStrategy, Component, computed, inject, input} from '@angular/core';\nimport {TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {tuiIsSafari} from '@taiga-ui/cdk/utils/browser';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiSizeBigger} from '@taiga-ui/core/utils/miscellaneous';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TUI_LOADER_OPTIONS} from './loader.options';\n\n@Component({\n selector: 'tui-loader',\n imports: [PolymorpheusOutlet],\n templateUrl: './loader.template.html',\n styleUrl: './loader.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class._loading]': 'loading()',\n '[attr.data-size]': 'size()',\n },\n})\nexport class TuiLoader {\n private readonly isIOS = inject(TUI_IS_IOS);\n private readonly options = inject(TUI_LOADER_OPTIONS);\n protected readonly isApple = tuiIsSafari(tuiInjectElement()) || this.isIOS;\n\n protected readonly isHorizontal = computed(() => !tuiSizeBigger(this.size()));\n\n public readonly size = input(this.options.size);\n\n public readonly inheritColor = input(this.options.inheritColor);\n\n public readonly overlay = input(this.options.overlay);\n\n public readonly textContent = input<PolymorpheusContent>();\n\n public readonly loading = input(true);\n}\n","<fieldset\n class=\"t-content\"\n [attr.inert]=\"loading() || null\"\n [class.t-content_has-overlay]=\"overlay() && loading()\"\n [class.t-content_loading]=\"loading()\"\n [disabled]=\"loading() && !isApple\"\n>\n <ng-content />\n</fieldset>\n\n@if (loading()) {\n <div\n class=\"t-loader\"\n [class.t-loader_horizontal]=\"isHorizontal()\"\n [class.t-loader_inherit-color]=\"inheritColor()\"\n >\n <svg\n automation-id=\"tui-loader__loader\"\n focusable=\"false\"\n height=\"100%\"\n width=\"100%\"\n class=\"t-icon\"\n >\n <circle\n cx=\"50%\"\n cy=\"50%\"\n class=\"t-circle\"\n />\n </svg>\n @if (textContent()) {\n <div\n automation-id=\"tui-loader__text\"\n class=\"t-text\"\n [class.t-text_horizontal]=\"isHorizontal()\"\n >\n <ng-container *polymorpheusOutlet=\"textContent() as text\">\n {{ text }}\n </ng-container>\n </div>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAUA;AACa,MAAA,0BAA0B,GAAqB;AACxD,IAAA,IAAI,EAAE,GAAG;AACT,IAAA,YAAY,EAAE,KAAK;AACnB,IAAA,OAAO,EAAE,KAAK;;AAGlB;;AAEG;AACU,MAAA,kBAAkB,GAAG,IAAI,cAAc,CAChD,SAAS,GAAG,oBAAoB,GAAG,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qBAAA,EAAA,QAAA,EAAA,iqCAAA,EAAA,MAAA,EAAA,CAAA,qsEAAA,CAAA,EAAA;;;AElBL;;AAEG;;;;"}
@@ -0,0 +1,89 @@
1
+ import { DOCUMENT } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, signal, ChangeDetectionStrategy, Component, Injectable } from '@angular/core';
4
+ import * as i1 from '@taiga-ui/cdk/directives/active-zone';
5
+ import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
6
+ import * as i2 from '@taiga-ui/cdk/directives/focus-trap';
7
+ import { TuiFocusTrap } from '@taiga-ui/cdk/directives/focus-trap';
8
+ import { tuiGetFocused } from '@taiga-ui/cdk/utils/focus';
9
+ import * as i3 from '@taiga-ui/core/components/scrollbar';
10
+ import { TuiScrollControls, TuiScrollRef } from '@taiga-ui/core/components/scrollbar';
11
+ import { injectContext, PolymorpheusOutlet, PolymorpheusComponent } from '@taiga-ui/polymorpheus';
12
+ import { TUI_LEAVE } from '@taiga-ui/cdk/directives/animated';
13
+ import { TuiPortal } from '@taiga-ui/cdk/portals';
14
+ import { TuiPopupService } from '@taiga-ui/core/directives/popup';
15
+
16
+ class TuiModal {
17
+ constructor() {
18
+ this.current = inject(TuiActiveZone);
19
+ this.parent = findActive(inject(TuiActiveZone, { skipSelf: true }), tuiGetFocused(inject(DOCUMENT)));
20
+ this.context = injectContext();
21
+ this.component = signal(null);
22
+ }
23
+ ngOnInit() {
24
+ this.current.tuiActiveZoneParentSetter = this.parent;
25
+ }
26
+ ngOnDestroy() {
27
+ this.current.tuiActiveZoneParentSetter = null;
28
+ }
29
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiModal, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
30
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiModal, isStandalone: true, selector: "tui-modal", host: { attributes: { "role": "dialog", "aria-modal": "true" }, listeners: { "animationend.self": "$event.target.classList.remove(\"tui-enter\")" }, properties: { "attr.aria-labelledby": "context.id" }, classAttribute: "tui-enter" }, hostDirectives: [{ directive: i1.TuiActiveZone }, { directive: i2.TuiFocusTrap }, { directive: i3.TuiScrollRef }], ngImport: i0, template: `
31
+ <ng-container *polymorpheusOutlet="component(); context: context" />
32
+ <tui-scroll-controls class="t-scrollbars" />
33
+ `, isInline: true, styles: ["@keyframes backdrop{0%{-webkit-backdrop-filter:none;backdrop-filter:none}to{-webkit-backdrop-filter:brightness(.25);backdrop-filter:brightness(.25)}}:host{transition-property:backdrop-filter;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;scrollbar-width:none;-ms-overflow-style:none;position:fixed;display:grid;top:0;right:0;bottom:0;left:0;grid-template-rows:0;place-items:center;outline:none;overflow:auto;overscroll-behavior:none contain;transition-timing-function:linear;animation-timing-function:cubic-bezier(.14,.52,.35,.84);perspective:10rem;transform:translateY(var(--t-root-top))}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host:last-of-type:not(.tui-leave){-webkit-backdrop-filter:brightness(.25);backdrop-filter:brightness(.25)}:host:last-of-type.tui-enter,:host:last-of-type.tui-leave{animation-name:backdrop}:host:not(.tui-leave):has(+::ng-deep tui-modal.tui-leave){-webkit-backdrop-filter:brightness(.25);backdrop-filter:brightness(.25)}:host ::ng-deep>.tui-enter+.t-scrollbars .t-bar_vertical,:host ::ng-deep>.tui-leave+.t-scrollbars .t-bar_vertical{display:none}:host:before{content:\"\";block-size:1px;inline-size:calc(100% + 1px)}::ng-deep tui-modal:nth-last-child(1 of tui-modal:not(.tui-leave)){-webkit-backdrop-filter:brightness(.25);backdrop-filter:brightness(.25)}.t-scrollbars{position:fixed;top:0;right:0;bottom:0;left:0;margin:0;color:#747474}.t-scrollbars ::ng-deep .t-bar_horizontal,.t-scrollbars ::ng-deep .t-bar_vertical .t-thumb[style*=\"height: 100%\"]{display:none}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "component", type: TuiScrollControls, selector: "tui-scroll-controls" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
34
+ }
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiModal, decorators: [{
36
+ type: Component,
37
+ args: [{ selector: 'tui-modal', imports: [PolymorpheusOutlet, TuiScrollControls], template: `
38
+ <ng-container *polymorpheusOutlet="component(); context: context" />
39
+ <tui-scroll-controls class="t-scrollbars" />
40
+ `, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [TuiActiveZone, TuiFocusTrap, TuiScrollRef], host: {
41
+ role: 'dialog',
42
+ class: 'tui-enter',
43
+ 'aria-modal': 'true',
44
+ '[attr.aria-labelledby]': 'context.id',
45
+ '(animationend.self)': '$event.target.classList.remove("tui-enter")',
46
+ }, styles: ["@keyframes backdrop{0%{-webkit-backdrop-filter:none;backdrop-filter:none}to{-webkit-backdrop-filter:brightness(.25);backdrop-filter:brightness(.25)}}:host{transition-property:backdrop-filter;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;scrollbar-width:none;-ms-overflow-style:none;position:fixed;display:grid;top:0;right:0;bottom:0;left:0;grid-template-rows:0;place-items:center;outline:none;overflow:auto;overscroll-behavior:none contain;transition-timing-function:linear;animation-timing-function:cubic-bezier(.14,.52,.35,.84);perspective:10rem;transform:translateY(var(--t-root-top))}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host:last-of-type:not(.tui-leave){-webkit-backdrop-filter:brightness(.25);backdrop-filter:brightness(.25)}:host:last-of-type.tui-enter,:host:last-of-type.tui-leave{animation-name:backdrop}:host:not(.tui-leave):has(+::ng-deep tui-modal.tui-leave){-webkit-backdrop-filter:brightness(.25);backdrop-filter:brightness(.25)}:host ::ng-deep>.tui-enter+.t-scrollbars .t-bar_vertical,:host ::ng-deep>.tui-leave+.t-scrollbars .t-bar_vertical{display:none}:host:before{content:\"\";block-size:1px;inline-size:calc(100% + 1px)}::ng-deep tui-modal:nth-last-child(1 of tui-modal:not(.tui-leave)){-webkit-backdrop-filter:brightness(.25);backdrop-filter:brightness(.25)}.t-scrollbars{position:fixed;top:0;right:0;bottom:0;left:0;margin:0;color:#747474}.t-scrollbars ::ng-deep .t-bar_horizontal,.t-scrollbars ::ng-deep .t-bar_vertical .t-thumb[style*=\"height: 100%\"]{display:none}\n"] }]
47
+ }] });
48
+ function findActive(zone, el) {
49
+ if (!el || !zone.contains(el)) {
50
+ return null;
51
+ }
52
+ const active = zone.children.find((child) => !child['el'].matches('[tuiActiveZoneAdapter]') && child.contains(el));
53
+ return active ? findActive(active, el) : zone;
54
+ }
55
+
56
+ class TuiModalService extends TuiPortal {
57
+ constructor() {
58
+ super(inject(TuiPopupService));
59
+ this.component = TuiModal;
60
+ }
61
+ add(component) {
62
+ const ref = this.service.add(component);
63
+ const el = ref.location.nativeElement;
64
+ ref.instance.component.set(new PolymorpheusComponent(this.content));
65
+ return () => {
66
+ ref.instance.component.set(null);
67
+ ref.changeDetectorRef.detectChanges();
68
+ el.classList.add(TUI_LEAVE);
69
+ Promise.allSettled(getAnimations(el))
70
+ .then(async () => Promise.allSettled(getAnimations(el.firstElementChild)))
71
+ .then(() => ref.destroy());
72
+ };
73
+ }
74
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
75
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiModalService }); }
76
+ }
77
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiModalService, decorators: [{
78
+ type: Injectable
79
+ }], ctorParameters: () => [] });
80
+ function getAnimations(el) {
81
+ return el?.getAnimations().map(async ({ finished }) => finished) || [];
82
+ }
83
+
84
+ /**
85
+ * Generated bundle index. Do not edit.
86
+ */
87
+
88
+ export { TuiModal, TuiModalService };
89
+ //# sourceMappingURL=taiga-ui-core-components-modal.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taiga-ui-core-components-modal.mjs","sources":["../../../projects/core/components/modal/modal.component.ts","../../../projects/core/components/modal/modal.service.ts","../../../projects/core/components/modal/taiga-ui-core-components-modal.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n type OnDestroy,\n type OnInit,\n signal,\n} from '@angular/core';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {TuiFocusTrap} from '@taiga-ui/cdk/directives/focus-trap';\nimport {type TuiPortalContext} from '@taiga-ui/cdk/portals';\nimport {tuiGetFocused} from '@taiga-ui/cdk/utils/focus';\nimport {TuiScrollControls, TuiScrollRef} from '@taiga-ui/core/components/scrollbar';\nimport {\n injectContext,\n type PolymorpheusContent,\n PolymorpheusOutlet,\n} from '@taiga-ui/polymorpheus';\n\n@Component({\n selector: 'tui-modal',\n imports: [PolymorpheusOutlet, TuiScrollControls],\n template: `\n <ng-container *polymorpheusOutlet=\"component(); context: context\" />\n <tui-scroll-controls class=\"t-scrollbars\" />\n `,\n styleUrl: './modal.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiActiveZone, TuiFocusTrap, TuiScrollRef],\n host: {\n role: 'dialog',\n class: 'tui-enter',\n 'aria-modal': 'true',\n '[attr.aria-labelledby]': 'context.id',\n '(animationend.self)': '$event.target.classList.remove(\"tui-enter\")',\n },\n})\nexport class TuiModal<T> implements OnDestroy, OnInit {\n private readonly current = inject(TuiActiveZone);\n private readonly parent = findActive(\n inject(TuiActiveZone, {skipSelf: true}),\n tuiGetFocused(inject(DOCUMENT)),\n );\n\n public readonly context = injectContext<TuiPortalContext<T>>();\n public readonly component = signal<PolymorpheusContent<TuiPortalContext<T>>>(null);\n\n public ngOnInit(): void {\n this.current.tuiActiveZoneParentSetter = this.parent;\n }\n\n public ngOnDestroy(): void {\n this.current.tuiActiveZoneParentSetter = null;\n }\n}\n\nfunction findActive(zone: TuiActiveZone, el: Element | null): TuiActiveZone | null {\n if (!el || !zone.contains(el)) {\n return null;\n }\n\n const active = zone.children.find(\n (child) => !child['el'].matches('[tuiActiveZoneAdapter]') && child.contains(el),\n );\n\n return active ? findActive(active, el) : zone;\n}\n","import {inject, Injectable, type Type} from '@angular/core';\nimport {TUI_LEAVE} from '@taiga-ui/cdk/directives/animated';\nimport {TuiPortal} from '@taiga-ui/cdk/portals';\nimport {TuiPopupService} from '@taiga-ui/core/directives/popup';\nimport {PolymorpheusComponent} from '@taiga-ui/polymorpheus';\n\nimport {TuiModal} from './modal.component';\n\n@Injectable()\nexport abstract class TuiModalService<T, K = void> extends TuiPortal<T, K> {\n protected abstract readonly content: Type<unknown>;\n protected readonly component = TuiModal;\n\n constructor() {\n super(inject(TuiPopupService));\n }\n\n protected override add(component: PolymorpheusComponent<TuiModal<T>>): () => void {\n const ref = this.service.add(component);\n const el: HTMLElement = ref.location.nativeElement;\n\n ref.instance.component.set(new PolymorpheusComponent(this.content));\n\n return () => {\n ref.instance.component.set(null);\n ref.changeDetectorRef.detectChanges();\n el.classList.add(TUI_LEAVE);\n\n Promise.allSettled(getAnimations(el))\n .then(async () => Promise.allSettled(getAnimations(el.firstElementChild)))\n .then(() => ref.destroy());\n };\n }\n}\n\nfunction getAnimations(el: Element | null): ReadonlyArray<Promise<unknown>> {\n return el?.getAnimations().map(async ({finished}) => finished) || [];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAsCa,QAAQ,CAAA;AAlBrB,IAAA,WAAA,GAAA;AAmBqB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,aAAa,CAAC;QAC/B,IAAM,C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directive } from '@angular/core';
3
- import { tuiWithStyles, tuiSetSignal, tuiIsString } from '@taiga-ui/cdk/utils/miscellaneous';
2
+ import { ChangeDetectionStrategy, ViewEncapsulation, Component, inject, computed, input, Directive } from '@angular/core';
3
+ import { tuiIsString, tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
4
4
  import { tuiButtonOptionsProvider } from '@taiga-ui/core/components/button';
5
5
  import { tuiLinkOptionsProvider } from '@taiga-ui/core/components/link';
6
6
  import * as i2 from '@taiga-ui/core/directives/appearance';
7
7
  import { tuiAppearanceOptionsProvider, TuiWithAppearance } from '@taiga-ui/core/directives/appearance';
8
8
  import * as i1 from '@taiga-ui/core/directives/icons';
9
- import { TuiIcons, TuiWithIcons } from '@taiga-ui/core/directives/icons';
9
+ import { tuiIconStart, TuiWithIcons } from '@taiga-ui/core/directives/icons';
10
10
  import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
11
11
 
12
12
  const ICONS = {
@@ -42,28 +42,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
42
42
  class TuiNotification {
43
43
  constructor() {
44
44
  this.options = inject(TUI_NOTIFICATION_OPTIONS);
45
+ this.computedIcon = computed((icon = this.icon()) => tuiIsString(icon) ? icon : icon(this.appearance()));
45
46
  this.nothing = tuiWithStyles(Styles);
46
- this.icons = inject(TuiIcons);
47
- this.appearance = this.options.appearance;
48
- this.icon = this.options.icon;
49
- this.size = this.options.size;
50
- }
51
- ngOnInit() {
52
- this.refresh();
53
- }
54
- ngOnChanges() {
55
- this.refresh();
56
- }
57
- refresh() {
58
- // TODO: Refactor to tuiDirectiveBinding
59
- tuiSetSignal(this.icons.iconStart, tuiIsString(this.icon) ? this.icon : this.icon(this.appearance));
47
+ this.icons = tuiIconStart(this.computedIcon);
48
+ this.appearance = input(this.options.appearance);
49
+ this.icon = input(this.options.icon);
50
+ this.size = input(this.options.size);
60
51
  }
61
52
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNotification, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
62
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiNotification, isStandalone: true, selector: "tui-notification,a[tuiNotification],button[tuiNotification]", inputs: { appearance: "appearance", icon: "icon", size: "size" }, host: { properties: { "attr.data-size": "size" } }, providers: [
53
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiNotification, isStandalone: true, selector: "tui-notification,a[tuiNotification],button[tuiNotification]", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-size": "size()" } }, providers: [
63
54
  tuiAppearanceOptionsProvider(TUI_NOTIFICATION_OPTIONS),
64
55
  tuiLinkOptionsProvider({ appearance: '', pseudo: true }),
65
56
  tuiButtonOptionsProvider({ appearance: 'outline-grayscale', size: 's' }),
66
- ], usesOnChanges: true, hostDirectives: [{ directive: i1.TuiWithIcons }, { directive: i2.TuiWithAppearance }], ngImport: i0 }); }
57
+ ], hostDirectives: [{ directive: i1.TuiWithIcons }, { directive: i2.TuiWithAppearance }], ngImport: i0 }); }
67
58
  }
68
59
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNotification, decorators: [{
69
60
  type: Directive,
@@ -76,16 +67,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
76
67
  ],
77
68
  hostDirectives: [TuiWithIcons, TuiWithAppearance],
78
69
  host: {
79
- '[attr.data-size]': 'size',
70
+ '[attr.data-size]': 'size()',
80
71
  },
81
72
  }]
82
- }], propDecorators: { appearance: [{
83
- type: Input
84
- }], icon: [{
85
- type: Input
86
- }], size: [{
87
- type: Input
88
- }] } });
73
+ }] });
89
74
 
90
75
  /**
91
76
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-notification.mjs","sources":["../../../projects/core/components/notification/notification.options.ts","../../../projects/core/components/notification/notification.directive.ts","../../../projects/core/components/notification/taiga-ui-core-components-notification.ts"],"sourcesContent":["import {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiAppearanceOptions} from '@taiga-ui/core/directives/appearance';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiNotificationOptions extends TuiAppearanceOptions {\n readonly icon: TuiStringHandler<string> | string;\n readonly size: TuiSizeL | TuiSizeS;\n}\n\nconst ICONS: Record<string, string> = {\n info: '@tui.info',\n positive: '@tui.circle-check',\n negative: '@tui.circle-x',\n warning: '@tui.circle-alert',\n neutral: '@tui.info',\n /* TODO @deprecated remove in v5 */\n success: '@tui.circle-check',\n /* TODO @deprecated remove in v5 */\n error: '@tui.circle-x',\n};\n\n/** Default values for the notification options. */\nexport const TUI_NOTIFICATION_DEFAULT_OPTIONS: TuiNotificationOptions = {\n appearance: 'info',\n icon: (appearance) => ICONS[appearance] ?? '',\n size: 'l',\n};\n\n/**\n * Default parameters for notification alert component\n */\nexport const [TUI_NOTIFICATION_OPTIONS, tuiNotificationOptionsProvider] =\n tuiCreateOptions(TUI_NOTIFICATION_DEFAULT_OPTIONS);\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n type OnChanges,\n type OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {\n tuiIsString,\n tuiSetSignal,\n tuiWithStyles,\n} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\nimport {tuiLinkOptionsProvider} from '@taiga-ui/core/components/link';\nimport {\n tuiAppearanceOptionsProvider,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {TuiIcons, TuiWithIcons} from '@taiga-ui/core/directives/icons';\n\nimport {TUI_NOTIFICATION_OPTIONS} from './notification.options';\n\n@Component({\n template: '',\n styles: '@import \"@taiga-ui/core/styles/components/notification.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-notification'},\n})\nclass Styles {}\n\n@Directive({\n selector: 'tui-notification,a[tuiNotification],button[tuiNotification]',\n providers: [\n tuiAppearanceOptionsProvider(TUI_NOTIFICATION_OPTIONS),\n tuiLinkOptionsProvider({appearance: '', pseudo: true}),\n tuiButtonOptionsProvider({appearance: 'outline-grayscale', size: 's'}),\n ],\n hostDirectives: [TuiWithIcons, TuiWithAppearance],\n host: {\n '[attr.data-size]': 'size',\n },\n})\nexport class TuiNotification implements OnChanges, OnInit {\n private readonly options = inject(TUI_NOTIFICATION_OPTIONS);\n\n protected readonly nothing = tuiWithStyles(Styles);\n protected readonly icons = inject(TuiIcons);\n\n @Input()\n public appearance = this.options.appearance;\n\n @Input()\n public icon: TuiStringHandler<string> | string = this.options.icon;\n\n @Input()\n public size = this.options.size;\n\n public ngOnInit(): void {\n this.refresh();\n }\n\n public ngOnChanges(): void {\n this.refresh();\n }\n\n private refresh(): void {\n // TODO: Refactor to tuiDirectiveBinding\n tuiSetSignal(\n this.icons.iconStart,\n tuiIsString(this.icon) ? this.icon : this.icon(this.appearance),\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAUA,MAAM,KAAK,GAA2B;AAClC,IAAA,IAAI,EAAE,WAAW;AACjB,IAAA,QAAQ,EAAE,mBAAmB;AAC7B,IAAA,QAAQ,EAAE,eAAe;AACzB,IAAA,OAAO,EAAE,mBAAmB;AAC5B,IAAA,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AmB,EAAE,IAAI,EAAE,GAAG,EAAC,CAAC;AACzE,SAAA,EAAA,aAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,YAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAMQ,eAAe,EAAA,UAAA,EAAA,CAAA;kBAZ3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,6DAA6D;AACvE,oBAAA,SAAS,EAAE;wBACP,4BAA4B,CAAC,wBAAwB,CAAC;wBACtD,sBAAsB,CAAC,EAAC,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC,CAAC;wBACtD,wBAAwB,CAAC,EAAC,UAAU,EAAE,mBAAmB,EAAE,IAAI,EAAE,GAAG,EAAC,CAAC;AACzE,qBAAA;AACD,oBAAA,cAAc,EAAE,CAAC,YAAY,EAAE,iBAAiB,CAAC;AACjD,oBAAA,IAAI,EAAE;AACF,wBAAA,kBAAkB,EAAE,MAAM;AAC7B,qBAAA;AACJ,iBAAA;8BAQU,UAAU,EAAA,CAAA;sBADhB;gBAIM,IAAI,EAAA,CAAA;sBADV;gBAIM,IAAI,EAAA,CAAA;sBADV;;;AC3DL;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-notification.mjs","sources":["../../../projects/core/components/notification/notification.options.ts","../../../projects/core/components/notification/notification.directive.ts","../../../projects/core/components/notification/taiga-ui-core-components-notification.ts"],"sourcesContent":["import {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiAppearanceOptions} from '@taiga-ui/core/directives/appearance';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiNotificationOptions extends TuiAppearanceOptions {\n readonly icon: TuiStringHandler<string> | string;\n readonly size: TuiSizeL | TuiSizeS;\n}\n\nconst ICONS: Record<string, string> = {\n info: '@tui.info',\n positive: '@tui.circle-check',\n negative: '@tui.circle-x',\n warning: '@tui.circle-alert',\n neutral: '@tui.info',\n /* TODO @deprecated remove in v5 */\n success: '@tui.circle-check',\n /* TODO @deprecated remove in v5 */\n error: '@tui.circle-x',\n};\n\n/** Default values for the notification options. */\nexport const TUI_NOTIFICATION_DEFAULT_OPTIONS: TuiNotificationOptions = {\n appearance: 'info',\n icon: (appearance) => ICONS[appearance] ?? '',\n size: 'l',\n};\n\n/**\n * Default parameters for notification alert component\n */\nexport const [TUI_NOTIFICATION_OPTIONS, tuiNotificationOptionsProvider] =\n tuiCreateOptions(TUI_NOTIFICATION_DEFAULT_OPTIONS);\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n Directive,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiIsString, tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\nimport {tuiLinkOptionsProvider} from '@taiga-ui/core/components/link';\nimport {\n tuiAppearanceOptionsProvider,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {tuiIconStart, TuiWithIcons} from '@taiga-ui/core/directives/icons';\n\nimport {TUI_NOTIFICATION_OPTIONS} from './notification.options';\n\n@Component({\n template: '',\n styles: '@import \"@taiga-ui/core/styles/components/notification.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-notification'},\n})\nclass Styles {}\n\n@Directive({\n selector: 'tui-notification,a[tuiNotification],button[tuiNotification]',\n providers: [\n tuiAppearanceOptionsProvider(TUI_NOTIFICATION_OPTIONS),\n tuiLinkOptionsProvider({appearance: '', pseudo: true}),\n tuiButtonOptionsProvider({appearance: 'outline-grayscale', size: 's'}),\n ],\n hostDirectives: [TuiWithIcons, TuiWithAppearance],\n host: {\n '[attr.data-size]': 'size()',\n },\n})\nexport class TuiNotification {\n private readonly options = inject(TUI_NOTIFICATION_OPTIONS);\n protected readonly computedIcon = computed((icon = this.icon()) =>\n tuiIsString(icon) ? icon : icon(this.appearance()),\n );\n\n protected readonly nothing = tuiWithStyles(Styles);\n protected readonly icons = tuiIconStart(this.computedIcon);\n\n public readonly appearance = input(this.options.appearance);\n\n public readonly icon = input<TuiStringHandler<string> | string>(this.options.icon);\n\n public readonly size = input(this.options.size);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAUA,MAAM,KAAK,GAA2B;AAClC,IAAA,IAAI,EAAE,WAAW;AACjB,IAAA,QAAQ,EAAE,mBAAmB;AAC7B,IAAA,QAAQ,EAAE,eAAe;AACzB,IAAA,OAAO,EAAE,mBAAmB;AAC5B,IAAA,OAAO,EAAE,WAAW;;AAEpB,IAAA,OAAO,EAAE,mBAAmB;;AAE5B,IAAA,KAAK,EAAE,eAAe;CACzB;AAED;AACa,MAAA,gCAAgC,GAA2B;AACpE,IAAA,UAAU,EAAE,MAAM;IAClB,IAAI,EAAE,CAAC,UAAU,KAAK,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE;AAC7C,IAAA,IAAI,EAAE,GAAG;;AAGb;;AAEG;AACI,MAAM,CAAC,wBAAwB,EAAE,8BAA8B,CAAC,GACnE,gBAAgB,CAAC,gCAAgC;;ACZrD,MAOM,MAAM,CAAA;+GAAN,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAN,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,MAAM,sHANE,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA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S,EAAE;wBACP,4BAA4B,CAAC,wBAAwB,CAAC;wBACtD,sBAAsB,CAAC,EAAC,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC,CAAC;wBACtD,wBAAwB,CAAC,EAAC,UAAU,EAAE,mBAAmB,EAAE,IAAI,EAAE,GAAG,EAAC,CAAC;AACzE,qBAAA;AACD,oBAAA,cAAc,EAAE,CAAC,YAAY,EAAE,iBAAiB,CAAC;AACjD,oBAAA,IAAI,EAAE;AACF,wBAAA,kBAAkB,EAAE,QAAQ;AAC/B,qBAAA;AACJ,iBAAA;;;ACzCD;;AAEG;;;;"}
@@ -37,7 +37,7 @@ class TuiRoot {
37
37
  return this.doc.fullscreenElement === this.el || !this.child;
38
38
  }
39
39
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiRoot, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
40
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiRoot, isStandalone: true, selector: "tui-root", host: { attributes: { "data-tui-version": "4.52.0-canary.eb5ffe3" }, listeners: { "touchstart.passive.zoneless": "0", "document:fullscreenchange": "top.set(parent)" }, properties: { "style.--tui-duration.ms": "duration", "style.--tui-scroll-behavior": "reducedMotion ? \"auto\" : \"smooth\"", "class._mobile": "isMobileRes()" } }, hostDirectives: [{ directive: i1.TuiPlatform }, { directive: i2.TuiVisualViewport }, { directive: i3.TuiFontSize }], ngImport: i0, template: "<div class=\"t-root-content\">\n <ng-content />\n</div>\n@if (top()) {\n @if (scrollbars) {\n <tui-scroll-controls class=\"t-root-scrollbar\" />\n }\n <tui-dialogs />\n <tui-popups>\n <ng-content select=\"tuiOverContent\" />\n </tui-popups>\n}\n", styles: ["@keyframes tuiSkeletonVibe{to{opacity:.5}}@keyframes tuiPresent{to{content:\"\"}}@keyframes tuiFade{0%{opacity:0}}@keyframes tuiSlide{0%{transform:var(--tui-from, translateY(100%))}}@keyframes tuiScale{0%{transform:scale(var(--tui-scale, 0))}}@keyframes tuiCollapse{0%{grid-template-rows:0fr}to{grid-template-rows:1fr}}.tui-enter,.tui-leave{animation-duration:var(--tui-duration);animation-timing-function:ease-in-out;pointer-events:none}.tui-leave{animation-direction:reverse}\n", ".tui-zero-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.tui-zero-scrollbar::-webkit-scrollbar,.tui-zero-scrollbar::-webkit-scrollbar-thumb{display:none}body,input{margin:0}tui-root{position:relative;display:block;font:var(--tui-font-text-s);color:var(--tui-text-primary);flex:1;border-image:conic-gradient(var(--tui-background-base) 0 0) fill 0/0/0 0 100vh 0;-webkit-tap-highlight-color:transparent}:root{--tui-inline-start: left;--tui-inline-end: right;--tui-inline: 1}[dir=rtl]{--tui-inline-start: right;--tui-inline-end: left;--tui-inline: -1}tui-root>.t-root-scrollbar{position:fixed;z-index:0;top:0;right:0;bottom:0;left:0}.t-root-content{position:relative;top:var(--t-root-top);block-size:100%;isolation:isolate}.t-root-content>*{--t-root-top: 0}[tuiDropdownButton][tuiDropdownButton]{display:none}\n"], dependencies: [{ kind: "component", type: TuiDialogs, selector: "tui-dialogs" }, { kind: "component", type: TuiPopups, selector: "tui-popups" }, { kind: "component", type: TuiScrollControls, selector: "tui-scroll-controls" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
40
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiRoot, isStandalone: true, selector: "tui-root", host: { attributes: { "data-tui-version": "4.52.0-canary.ece97e9" }, listeners: { "touchstart.passive.zoneless": "0", "document:fullscreenchange": "top.set(parent)" }, properties: { "style.--tui-duration.ms": "duration", "style.--tui-scroll-behavior": "reducedMotion ? \"auto\" : \"smooth\"", "class._mobile": "isMobileRes()" } }, hostDirectives: [{ directive: i1.TuiPlatform }, { directive: i2.TuiVisualViewport }, { directive: i3.TuiFontSize }], ngImport: i0, template: "<div class=\"t-root-content\">\n <ng-content />\n</div>\n@if (top()) {\n @if (scrollbars) {\n <tui-scroll-controls class=\"t-root-scrollbar\" />\n }\n <tui-dialogs />\n <tui-popups>\n <ng-content select=\"tuiOverContent\" />\n </tui-popups>\n}\n", styles: ["@keyframes tuiSkeletonVibe{to{opacity:.5}}@keyframes tuiPresent{to{content:\"\"}}@keyframes tuiFade{0%{opacity:0}}@keyframes tuiSlide{0%{transform:var(--tui-from, translateY(100%))}}@keyframes tuiScale{0%{transform:scale(var(--tui-scale, 0))}}@keyframes tuiCollapse{0%{grid-template-rows:0fr}to{grid-template-rows:1fr}}.tui-enter,.tui-leave{animation-duration:var(--tui-duration);animation-timing-function:ease-in-out;pointer-events:none}.tui-leave{animation-direction:reverse}\n", ".tui-zero-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.tui-zero-scrollbar::-webkit-scrollbar,.tui-zero-scrollbar::-webkit-scrollbar-thumb{display:none}body,input{margin:0}tui-root{position:relative;display:block;font:var(--tui-font-text-s);color:var(--tui-text-primary);flex:1;border-image:conic-gradient(var(--tui-background-base) 0 0) fill 0/0/0 0 100vh 0;-webkit-tap-highlight-color:transparent}:root{--tui-inline-start: left;--tui-inline-end: right;--tui-inline: 1}[dir=rtl]{--tui-inline-start: right;--tui-inline-end: left;--tui-inline: -1}tui-root>.t-root-scrollbar{position:fixed;z-index:0;top:0;right:0;bottom:0;left:0}.t-root-content{position:relative;top:var(--t-root-top);block-size:100%;isolation:isolate}.t-root-content>*{--t-root-top: 0}[tuiDropdownButton][tuiDropdownButton]{display:none}\n"], dependencies: [{ kind: "component", type: TuiDialogs, selector: "tui-dialogs" }, { kind: "component", type: TuiPopups, selector: "tui-popups" }, { kind: "component", type: TuiScrollControls, selector: "tui-scroll-controls" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
41
41
  }
42
42
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiRoot, decorators: [{
43
43
  type: Component,
@@ -1,6 +1,6 @@
1
1
  import { AsyncPipe } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, Injectable, Input, Directive, ChangeDetectionStrategy, Component, ElementRef, DestroyRef } from '@angular/core';
3
+ import { inject, Injectable, input, Directive, ChangeDetectionStrategy, Component, ElementRef, DestroyRef, effect } from '@angular/core';
4
4
  import { WA_ANIMATION_FRAME } from '@ng-web-apis/common';
5
5
  import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
6
6
  import { tuiTypedFromEvent, tuiZonefree, tuiZonefreeScheduler, tuiScrollFrom, tuiZoneOptimized } from '@taiga-ui/cdk/observables';
@@ -60,7 +60,7 @@ class TuiScrollbarDirective {
60
60
  .pipe(takeUntilDestroyed())
61
61
  .subscribe(([top, left]) => {
62
62
  this.el.style.scrollBehavior = 'auto';
63
- if (this.tuiScrollbar === 'horizontal') {
63
+ if (this.tuiScrollbar() === 'horizontal') {
64
64
  this.el.scrollLeft = left;
65
65
  }
66
66
  else {
@@ -81,7 +81,7 @@ class TuiScrollbarDirective {
81
81
  };
82
82
  const thumb = `${this.getThumb(dimension) * 100}%`;
83
83
  const view = `${this.getView(dimension) * 100}%`;
84
- if (this.tuiScrollbar === 'vertical') {
84
+ if (this.tuiScrollbar() === 'vertical') {
85
85
  this.style.top = thumb;
86
86
  this.style.height = view;
87
87
  }
@@ -91,23 +91,23 @@ class TuiScrollbarDirective {
91
91
  this.style.width = view;
92
92
  }
93
93
  });
94
- this.tuiScrollbar = 'vertical';
94
+ this.tuiScrollbar = input('vertical');
95
95
  }
96
96
  getScrolled(dimension) {
97
- return this.tuiScrollbar === 'vertical'
97
+ return this.tuiScrollbar() === 'vertical'
98
98
  ? dimension.scrollTop / (dimension.scrollHeight - dimension.clientHeight)
99
99
  : dimension.scrollLeft / (dimension.scrollWidth - dimension.clientWidth);
100
100
  }
101
101
  getCompensation(dimension) {
102
102
  if (((dimension.clientHeight * dimension.clientHeight) / dimension.scrollHeight >
103
103
  MIN_WIDTH &&
104
- this.tuiScrollbar === 'vertical') ||
104
+ this.tuiScrollbar() === 'vertical') ||
105
105
  ((dimension.clientWidth * dimension.clientWidth) / dimension.scrollWidth >
106
106
  MIN_WIDTH &&
107
- this.tuiScrollbar === 'horizontal')) {
107
+ this.tuiScrollbar() === 'horizontal')) {
108
108
  return 0;
109
109
  }
110
- return this.tuiScrollbar === 'vertical'
110
+ return this.tuiScrollbar() === 'vertical'
111
111
  ? MIN_WIDTH / dimension.clientHeight
112
112
  : MIN_WIDTH / dimension.clientWidth;
113
113
  }
@@ -116,12 +116,12 @@ class TuiScrollbarDirective {
116
116
  return Math.abs(this.getScrolled(dimension) * (1 - compensation));
117
117
  }
118
118
  getView(dimension) {
119
- return this.tuiScrollbar === 'vertical'
119
+ return this.tuiScrollbar() === 'vertical'
120
120
  ? Math.ceil((dimension.clientHeight / dimension.scrollHeight) * 100) / 100
121
121
  : Math.ceil((dimension.clientWidth / dimension.scrollWidth) * 100) / 100;
122
122
  }
123
123
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollbarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
124
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiScrollbarDirective, isStandalone: true, selector: "[tuiScrollbar]", inputs: { tuiScrollbar: "tuiScrollbar" }, providers: [TuiScrollbarService], ngImport: i0 }); }
124
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiScrollbarDirective, isStandalone: true, selector: "[tuiScrollbar]", inputs: { tuiScrollbar: { classPropertyName: "tuiScrollbar", publicName: "tuiScrollbar", isSignal: true, isRequired: false, transformFunction: null } }, providers: [TuiScrollbarService], ngImport: i0 }); }
125
125
  }
126
126
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollbarDirective, decorators: [{
127
127
  type: Directive,
@@ -130,9 +130,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
130
130
  selector: '[tuiScrollbar]',
131
131
  providers: [TuiScrollbarService],
132
132
  }]
133
- }], propDecorators: { tuiScrollbar: [{
134
- type: Input
135
- }] } });
133
+ }] });
136
134
 
137
135
  const TUI_DEFAULT_SCROLLBAR_OPTIONS = {
138
136
  mode: 'always',
@@ -178,7 +176,7 @@ class TuiScrollbar {
178
176
  /**
179
177
  * @deprecated: use tuiScrollbarOptionsProvider({ mode: 'hidden' })
180
178
  */
181
- this.hidden = this.options.mode === 'hidden';
179
+ this.hidden = input(this.options.mode === 'hidden');
182
180
  }
183
181
  get delegated() {
184
182
  return this.scrollRef !== this.el || this.options.mode === 'native';
@@ -200,12 +198,12 @@ class TuiScrollbar {
200
198
  this.scrollRef.scrollTo?.(scrollLeft, scrollTop);
201
199
  }
202
200
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollbar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
203
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiScrollbar, isStandalone: true, selector: "tui-scrollbar", inputs: { hidden: "hidden" }, host: { listeners: { "tui-scrollable.stop": "scrollRef = $event.detail", "tui-scroll-into-view.stop": "scrollIntoView($event.detail)" }, properties: { "class._native-hidden": "options.mode !== \"native\" && (!isIOS || hidden)" } }, providers: [
201
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiScrollbar, isStandalone: true, selector: "tui-scrollbar", inputs: { hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "tui-scrollable.stop": "scrollRef = $event.detail", "tui-scroll-into-view.stop": "scrollIntoView($event.detail)" }, properties: { "class._native-hidden": "options.mode !== \"native\" && (!isIOS || hidden())" } }, providers: [
204
202
  {
205
203
  provide: TUI_SCROLL_REF,
206
204
  useFactory: () => inject(TuiScrollbar).browserScrollRef,
207
205
  },
208
- ], ngImport: i0, template: "@if (!hidden && !isIOS && options.mode !== 'native') {\n <tui-scroll-controls\n class=\"t-bars\"\n [class.t-hover-mode]=\"options.mode === 'hover'\"\n />\n}\n<div\n class=\"t-content\"\n [class.t-content_delegated]=\"delegated\"\n>\n <ng-content />\n</div>\n", styles: [":host{position:relative;display:flex;max-block-size:100%;isolation:isolate;overflow:auto}:host._native-hidden{scrollbar-width:none;-ms-overflow-style:none}:host._native-hidden::-webkit-scrollbar,:host._native-hidden::-webkit-scrollbar-thumb{display:none}:host .t-hover-mode:not(:active){transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:0}:host:hover .t-hover-mode{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:1}.t-content{isolation:isolate;flex:1;flex-basis:auto;inline-size:100%;block-size:max-content}.t-content_delegated{block-size:100%}.t-bars{color:var(--tui-text-primary)}\n"], dependencies: [{ kind: "component", type: TuiScrollControls, selector: "tui-scroll-controls" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
206
+ ], ngImport: i0, template: "@if (!hidden() && !isIOS && options.mode !== 'native') {\n <tui-scroll-controls\n class=\"t-bars\"\n [class.t-hover-mode]=\"options.mode === 'hover'\"\n />\n}\n<div\n class=\"t-content\"\n [class.t-content_delegated]=\"delegated\"\n>\n <ng-content />\n</div>\n", styles: [":host{position:relative;display:flex;max-block-size:100%;isolation:isolate;overflow:auto}:host._native-hidden{scrollbar-width:none;-ms-overflow-style:none}:host._native-hidden::-webkit-scrollbar,:host._native-hidden::-webkit-scrollbar-thumb{display:none}:host .t-hover-mode:not(:active){transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:0}:host:hover .t-hover-mode{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:1}.t-content{isolation:isolate;flex:1;flex-basis:auto;inline-size:100%;block-size:max-content}.t-content_delegated{block-size:100%}.t-bars{color:var(--tui-text-primary)}\n"], dependencies: [{ kind: "component", type: TuiScrollControls, selector: "tui-scroll-controls" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
209
207
  }
210
208
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollbar, decorators: [{
211
209
  type: Component,
@@ -215,13 +213,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
215
213
  useFactory: () => inject(TuiScrollbar).browserScrollRef,
216
214
  },
217
215
  ], host: {
218
- '[class._native-hidden]': 'options.mode !== "native" && (!isIOS || hidden)',
216
+ '[class._native-hidden]': 'options.mode !== "native" && (!isIOS || hidden())',
219
217
  [`(${TUI_SCROLLABLE}.stop)`]: 'scrollRef = $event.detail',
220
218
  [`(${TUI_SCROLL_INTO_VIEW}.stop)`]: 'scrollIntoView($event.detail)',
221
- }, template: "@if (!hidden && !isIOS && options.mode !== 'native') {\n <tui-scroll-controls\n class=\"t-bars\"\n [class.t-hover-mode]=\"options.mode === 'hover'\"\n />\n}\n<div\n class=\"t-content\"\n [class.t-content_delegated]=\"delegated\"\n>\n <ng-content />\n</div>\n", styles: [":host{position:relative;display:flex;max-block-size:100%;isolation:isolate;overflow:auto}:host._native-hidden{scrollbar-width:none;-ms-overflow-style:none}:host._native-hidden::-webkit-scrollbar,:host._native-hidden::-webkit-scrollbar-thumb{display:none}:host .t-hover-mode:not(:active){transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:0}:host:hover .t-hover-mode{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:1}.t-content{isolation:isolate;flex:1;flex-basis:auto;inline-size:100%;block-size:max-content}.t-content_delegated{block-size:100%}.t-bars{color:var(--tui-text-primary)}\n"] }]
222
- }], propDecorators: { hidden: [{
223
- type: Input
224
- }] } });
219
+ }, template: "@if (!hidden() && !isIOS && options.mode !== 'native') {\n <tui-scroll-controls\n class=\"t-bars\"\n [class.t-hover-mode]=\"options.mode === 'hover'\"\n />\n}\n<div\n class=\"t-content\"\n [class.t-content_delegated]=\"delegated\"\n>\n <ng-content />\n</div>\n", styles: [":host{position:relative;display:flex;max-block-size:100%;isolation:isolate;overflow:auto}:host._native-hidden{scrollbar-width:none;-ms-overflow-style:none}:host._native-hidden::-webkit-scrollbar,:host._native-hidden::-webkit-scrollbar-thumb{display:none}:host .t-hover-mode:not(:active){transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:0}:host:hover .t-hover-mode{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:1}.t-content{isolation:isolate;flex:1;flex-basis:auto;inline-size:100%;block-size:max-content}.t-content_delegated{block-size:100%}.t-bars{color:var(--tui-text-primary)}\n"] }]
220
+ }] });
225
221
 
226
222
  /**
227
223
  * Directive scrolls element into view inside tui-scrollbar
@@ -230,34 +226,33 @@ class TuiScrollIntoView {
230
226
  constructor() {
231
227
  this.el = tuiInjectElement();
232
228
  this.destroyRef = inject(DestroyRef);
233
- }
234
- set tuiScrollIntoView(scroll) {
235
- if (!scroll) {
236
- return;
237
- }
238
- // Timeout is necessary in order to give element render cycle to get into its final spot
239
- // (for example if it is inside dropdown box which has to be positioned first)
240
- timer(0)
241
- .pipe(takeUntilDestroyed(this.destroyRef))
242
- .subscribe(() => {
243
- this.el.dispatchEvent(new CustomEvent(TUI_SCROLL_INTO_VIEW, {
244
- bubbles: true,
245
- detail: this.el,
246
- }));
229
+ this.tuiScrollIntoView = input();
230
+ this.dispatchEvent = effect(() => {
231
+ const scroll = this.tuiScrollIntoView();
232
+ if (!scroll) {
233
+ return;
234
+ }
235
+ // Timeout is necessary in order to give element render cycle to get into its final spot
236
+ // (for example if it is inside dropdown box which has to be positioned first)
237
+ timer(0)
238
+ .pipe(takeUntilDestroyed(this.destroyRef))
239
+ .subscribe(() => {
240
+ this.el.dispatchEvent(new CustomEvent(TUI_SCROLL_INTO_VIEW, {
241
+ bubbles: true,
242
+ detail: this.el,
243
+ }));
244
+ });
247
245
  });
248
246
  }
249
247
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollIntoView, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
250
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiScrollIntoView, isStandalone: true, selector: "[tuiScrollIntoView]", inputs: { tuiScrollIntoView: "tuiScrollIntoView" }, ngImport: i0 }); }
248
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiScrollIntoView, isStandalone: true, selector: "[tuiScrollIntoView]", inputs: { tuiScrollIntoView: { classPropertyName: "tuiScrollIntoView", publicName: "tuiScrollIntoView", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
251
249
  }
252
250
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollIntoView, decorators: [{
253
251
  type: Directive,
254
252
  args: [{
255
- standalone: true,
256
253
  selector: '[tuiScrollIntoView]',
257
254
  }]
258
- }], propDecorators: { tuiScrollIntoView: [{
259
- type: Input
260
- }] } });
255
+ }] });
261
256
 
262
257
  const SCROLL_REF_SELECTOR = '[tuiScrollRef]';
263
258
  class TuiScrollRef {