@taiga-ui/core 4.12.0 → 4.13.0

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 (48) hide show
  1. package/classes/driver.d.ts +3 -3
  2. package/components/root/root.component.d.ts +2 -1
  3. package/directives/dropdown/dropdown-portal.directive.d.ts +3 -0
  4. package/directives/dropdown/dropdown.driver.d.ts +4 -3
  5. package/directives/dropdown/dropdowns.component.d.ts +1 -1
  6. package/directives/index.d.ts +1 -0
  7. package/directives/popup/index.d.ts +2 -0
  8. package/directives/popup/popup.directive.d.ts +11 -0
  9. package/directives/popup/popup.service.d.ts +6 -0
  10. package/esm2022/classes/driver.mjs +8 -5
  11. package/esm2022/components/alert/alert.component.mjs +3 -3
  12. package/esm2022/components/calendar/calendar.component.mjs +5 -3
  13. package/esm2022/components/dialog/dialog.component.mjs +3 -3
  14. package/esm2022/components/dialog/dialogs.component.mjs +3 -3
  15. package/esm2022/components/notification/notification.directive.mjs +2 -2
  16. package/esm2022/components/root/root.component.mjs +9 -6
  17. package/esm2022/directives/dropdown/dropdown-portal.directive.mjs +4 -1
  18. package/esm2022/directives/dropdown/dropdown.driver.mjs +7 -8
  19. package/esm2022/directives/dropdown/dropdowns.component.mjs +9 -9
  20. package/esm2022/directives/hint/hint-options.directive.mjs +2 -1
  21. package/esm2022/directives/hint/hint.component.mjs +3 -3
  22. package/esm2022/directives/index.mjs +2 -1
  23. package/esm2022/directives/popup/index.mjs +3 -0
  24. package/esm2022/directives/popup/popup.directive.mjs +31 -0
  25. package/esm2022/directives/popup/popup.service.mjs +15 -0
  26. package/esm2022/directives/popup/taiga-ui-core-directives-popup.mjs +5 -0
  27. package/fesm2022/taiga-ui-core-classes.mjs +7 -4
  28. package/fesm2022/taiga-ui-core-classes.mjs.map +1 -1
  29. package/fesm2022/taiga-ui-core-components-alert.mjs +2 -2
  30. package/fesm2022/taiga-ui-core-components-alert.mjs.map +1 -1
  31. package/fesm2022/taiga-ui-core-components-calendar.mjs +4 -2
  32. package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
  33. package/fesm2022/taiga-ui-core-components-dialog.mjs +4 -4
  34. package/fesm2022/taiga-ui-core-components-dialog.mjs.map +1 -1
  35. package/fesm2022/taiga-ui-core-components-notification.mjs +2 -2
  36. package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
  37. package/fesm2022/taiga-ui-core-components-root.mjs +8 -5
  38. package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
  39. package/fesm2022/taiga-ui-core-directives-dropdown.mjs +17 -15
  40. package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
  41. package/fesm2022/taiga-ui-core-directives-hint.mjs +3 -2
  42. package/fesm2022/taiga-ui-core-directives-hint.mjs.map +1 -1
  43. package/fesm2022/taiga-ui-core-directives-popup.mjs +48 -0
  44. package/fesm2022/taiga-ui-core-directives-popup.mjs.map +1 -0
  45. package/fesm2022/taiga-ui-core-directives.mjs +1 -0
  46. package/fesm2022/taiga-ui-core-directives.mjs.map +1 -1
  47. package/package.json +9 -3
  48. package/styles/components/notification.less +56 -13
@@ -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 {Provider} from '@angular/core';\nimport type {TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport type {TuiAppearanceOptions} from '@taiga-ui/core/directives/appearance';\nimport type {TuiSizeL, 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 = tuiCreateToken(TUI_NOTIFICATION_DEFAULT_OPTIONS);\n\nexport function tuiNotificationOptionsProvider(\n options: Partial<TuiNotificationOptions>,\n): Provider {\n return tuiProvideOptions(\n TUI_NOTIFICATION_OPTIONS,\n options,\n TUI_NOTIFICATION_DEFAULT_OPTIONS,\n );\n}\n","import type {OnChanges, OnInit} from '@angular/core';\nimport {\n ChangeDetectionStrategy,\n Component,\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 {TuiIcons, TuiWithIcons} from '@taiga-ui/core/directives/icons';\n\nimport {TUI_NOTIFICATION_OPTIONS} from './notification.options';\n\n@Component({\n standalone: true,\n template: '',\n styles: ['@import \"@taiga-ui/core/styles/components/notification.less\";'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-notification',\n },\n})\nclass TuiNotificationStyles {}\n\n@Directive({\n standalone: true,\n selector: 'tui-notification,a[tuiNotification],button[tuiNotification]',\n providers: [\n tuiAppearanceOptionsProvider(TUI_NOTIFICATION_OPTIONS),\n tuiLinkOptionsProvider({\n appearance: '',\n pseudo: true,\n }),\n tuiButtonOptionsProvider({\n appearance: 'outline-grayscale',\n size: 's',\n }),\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(TuiNotificationStyles);\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 this.icons.iconStart = tuiIsString(this.icon)\n ? this.icon\n : this.icon(this.appearance);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAWA,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,CAAC;AAEF;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;EACX;AAEF;;AAEG;MACU,wBAAwB,GAAG,cAAc,CAAC,gCAAgC,EAAE;AAEnF,SAAU,8BAA8B,CAC1C,OAAwC,EAAA;IAExC,OAAO,iBAAiB,CACpB,wBAAwB,EACxB,OAAO,EACP,gCAAgC,CACnC,CAAC;AACN;;ACtBA,MAUM,qBAAqB,CAAA;+GAArB,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,eAAe,EAAA,UAAA,EAAA,CAAA;kBAnB3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,6DAA6D;AACvE,oBAAA,SAAS,EAAE;wBACP,4BAA4B,CAAC,wBAAwB,CAAC;AACtD,wBAAA,sBAAsB,CAAC;AACnB,4BAAA,UAAU,EAAE,EAAE;AACd,4BAAA,MAAM,EAAE,IAAI;yBACf,CAAC;AACF,wBAAA,wBAAwB,CAAC;AACrB,4BAAA,UAAU,EAAE,mBAAmB;AAC/B,4BAAA,IAAI,EAAE,GAAG;yBACZ,CAAC;AACL,qBAAA;AACD,oBAAA,cAAc,EAAE,CAAC,YAAY,EAAE,iBAAiB,CAAC;AACjD,oBAAA,IAAI,EAAE;AACF,wBAAA,kBAAkB,EAAE,MAAM;AAC7B,qBAAA;AACJ,iBAAA,CAAA;8BAQU,UAAU,EAAA,CAAA;sBADhB,KAAK;gBAIC,IAAI,EAAA,CAAA;sBADV,KAAK;gBAIC,IAAI,EAAA,CAAA;sBADV,KAAK;;;AChEV;;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 {Provider} from '@angular/core';\nimport type {TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport type {TuiAppearanceOptions} from '@taiga-ui/core/directives/appearance';\nimport type {TuiSizeL, 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 = tuiCreateToken(TUI_NOTIFICATION_DEFAULT_OPTIONS);\n\nexport function tuiNotificationOptionsProvider(\n options: Partial<TuiNotificationOptions>,\n): Provider {\n return tuiProvideOptions(\n TUI_NOTIFICATION_OPTIONS,\n options,\n TUI_NOTIFICATION_DEFAULT_OPTIONS,\n );\n}\n","import type {OnChanges, OnInit} from '@angular/core';\nimport {\n ChangeDetectionStrategy,\n Component,\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 {TuiIcons, TuiWithIcons} from '@taiga-ui/core/directives/icons';\n\nimport {TUI_NOTIFICATION_OPTIONS} from './notification.options';\n\n@Component({\n standalone: true,\n template: '',\n styles: ['@import \"@taiga-ui/core/styles/components/notification.less\";'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-notification',\n },\n})\nclass TuiNotificationStyles {}\n\n@Directive({\n standalone: true,\n selector: 'tui-notification,a[tuiNotification],button[tuiNotification]',\n providers: [\n tuiAppearanceOptionsProvider(TUI_NOTIFICATION_OPTIONS),\n tuiLinkOptionsProvider({\n appearance: '',\n pseudo: true,\n }),\n tuiButtonOptionsProvider({\n appearance: 'outline-grayscale',\n size: 's',\n }),\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(TuiNotificationStyles);\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 this.icons.iconStart = tuiIsString(this.icon)\n ? this.icon\n : this.icon(this.appearance);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAWA,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,CAAC;AAEF;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;EACX;AAEF;;AAEG;MACU,wBAAwB,GAAG,cAAc,CAAC,gCAAgC,EAAE;AAEnF,SAAU,8BAA8B,CAC1C,OAAwC,EAAA;IAExC,OAAO,iBAAiB,CACpB,wBAAwB,EACxB,OAAO,EACP,gCAAgC,CACnC,CAAC;AACN;;ACtBA,MAUM,qBAAqB,CAAA;+GAArB,qBAAqB,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AAA,UAAA,EAAA,CAAA;kBAnB3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,6DAA6D;AACvE,oBAAA,SAAS,EAAE;wBACP,4BAA4B,CAAC,wBAAwB,CAAC;AACtD,wBAAA,sBAAsB,CAAC;AACnB,4BAAA,UAAU,EAAE,EAAE;AACd,4BAAA,MAAM,EAAE,IAAI;yBACf,CAAC;AACF,wBAAA,wBAAwB,CAAC;AACrB,4BAAA,UAAU,EAAE,mBAAmB;AAC/B,4BAAA,IAAI,EAAE,GAAG;yBACZ,CAAC;AACL,qBAAA;AACD,oBAAA,cAAc,EAAE,CAAC,YAAY,EAAE,iBAAiB,CAAC;AACjD,oBAAA,IAAI,EAAE;AACF,wBAAA,kBAAkB,EAAE,MAAM;AAC7B,qBAAA;AACJ,iBAAA,CAAA;8BAQU,UAAU,EAAA,CAAA;sBADhB,KAAK;gBAIC,IAAI,EAAA,CAAA;sBADV,KAAK;gBAIC,IAAI,EAAA,CAAA;sBADV,KAAK;;;AChEV;;AAEG;;;;"}
@@ -3,6 +3,7 @@ import * as i0 from '@angular/core';
3
3
  import { inject, signal, Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
4
4
  import { toSignal } from '@angular/core/rxjs-interop';
5
5
  import { EVENT_MANAGER_PLUGINS } from '@angular/platform-browser';
6
+ import { TuiPortals, tuiAsPortal } from '@taiga-ui/cdk/classes';
6
7
  import { TUI_VERSION } from '@taiga-ui/cdk/constants';
7
8
  import * as i1 from '@taiga-ui/cdk/directives/platform';
8
9
  import { TuiPlatform } from '@taiga-ui/cdk/directives/platform';
@@ -13,8 +14,9 @@ import { TUI_IS_MOBILE } from '@taiga-ui/cdk/tokens';
13
14
  import { TuiAlerts } from '@taiga-ui/core/components/alert';
14
15
  import { TUI_DIALOGS, TuiDialogs } from '@taiga-ui/core/components/dialog';
15
16
  import { TUI_SCROLLBAR_OPTIONS, TuiScrollControls } from '@taiga-ui/core/components/scrollbar';
16
- import { TuiDropdowns } from '@taiga-ui/core/directives';
17
+ import { TuiDropdowns } from '@taiga-ui/core/directives/dropdown';
17
18
  import { TuiHints } from '@taiga-ui/core/directives/hint';
19
+ import { TuiPopupService } from '@taiga-ui/core/directives/popup';
18
20
  import { TuiBreakpointService } from '@taiga-ui/core/services';
19
21
  import { TUI_REDUCED_MOTION, TUI_ANIMATIONS_SPEED, TUI_THEME } from '@taiga-ui/core/tokens';
20
22
  import { tuiGetDuration } from '@taiga-ui/core/utils';
@@ -23,8 +25,9 @@ import { map, debounceTime } from 'rxjs';
23
25
 
24
26
  /// <reference types="@taiga-ui/tsconfig/ng-dev-mode" />
25
27
  /// <reference types="@taiga-ui/tsconfig/ng-dev-mode" />
26
- class TuiRoot {
28
+ class TuiRoot extends TuiPortals {
27
29
  constructor() {
30
+ super();
28
31
  this.reducedMotion = inject(TUI_REDUCED_MOTION);
29
32
  this.duration = tuiGetDuration(inject(TUI_ANIMATIONS_SPEED));
30
33
  this.isMobileRes = toSignal(inject(TuiBreakpointService).pipe(map((breakpoint) => breakpoint === 'mobile'), tuiWatch()), { initialValue: false });
@@ -40,18 +43,18 @@ class TuiRoot {
40
43
  console.assert(!!inject(EVENT_MANAGER_PLUGINS).find((plugin) => plugin instanceof PreventEventPlugin), 'NG_EVENT_PLUGINS is missing from global providers');
41
44
  }
42
45
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiRoot, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
43
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiRoot, isStandalone: true, selector: "tui-root", host: { attributes: { "data-tui-version": "4.12.0" }, listeners: { "touchstart.passive.silent": "0" }, properties: { "style.--tui-duration.ms": "duration", "style.--tui-scroll-behavior": "reducedMotion ? \"auto\" : \"smooth\"", "class._mobile": "isMobileRes()" } }, hostDirectives: [{ directive: i1.TuiPlatform }, { directive: i2.TuiVisualViewport }], ngImport: i0, template: "<tui-scroll-controls\n *ngIf=\"scrollbars()\"\n class=\"t-root-scrollbar\"\n/>\n<tui-dropdowns>\n <div class=\"t-root-content\">\n <ng-content />\n </div>\n <ng-content select=\"tuiOverContent\" />\n <tui-dialogs />\n <ng-content select=\"tuiOverDialogs\" />\n <tui-alerts />\n <ng-content select=\"tuiOverAlerts\" />\n</tui-dropdowns>\n<ng-content select=\"tuiOverDropdowns\" />\n<tui-hints />\n<ng-content select=\"tuiOverHints\" />\n", styles: ["@keyframes tuiPresent{to{content:\"\"}}@keyframes tuiSkeletonVibe{to{opacity:.5}}.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}tui-root>.t-root-scrollbar{position:fixed;top:0;left:0;bottom:0;right:0;display:none;margin:0}[data-tui-theme] tui-root>.t-root-scrollbar{display:block}.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: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TuiAlerts, selector: "tui-alerts" }, { kind: "component", type: TuiDialogs, selector: "tui-dialogs" }, { kind: "component", type: TuiDropdowns, selector: "tui-dropdowns" }, { kind: "component", type: TuiHints, selector: "tui-hints" }, { kind: "component", type: TuiScrollControls, selector: "tui-scroll-controls" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
46
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiRoot, isStandalone: true, selector: "tui-root", host: { attributes: { "data-tui-version": "4.13.0" }, listeners: { "touchstart.passive.silent": "0" }, properties: { "style.--tui-duration.ms": "duration", "style.--tui-scroll-behavior": "reducedMotion ? \"auto\" : \"smooth\"", "class._mobile": "isMobileRes()" } }, usesInheritance: true, hostDirectives: [{ directive: i1.TuiPlatform }, { directive: i2.TuiVisualViewport }], ngImport: i0, template: "<div class=\"t-root-content\"><ng-content /></div>\n<tui-scroll-controls\n *ngIf=\"scrollbars()\"\n class=\"t-root-scrollbar\"\n/>\n<ng-container #viewContainer />\n<ng-content select=\"tuiOverContent\" />\n<tui-dialogs />\n<ng-content select=\"tuiOverDialogs\" />\n<tui-alerts />\n<ng-content select=\"tuiOverAlerts\" />\n<tui-dropdowns />\n<ng-content select=\"tuiOverDropdowns\" />\n<tui-hints />\n<ng-content select=\"tuiOverHints\" />\n", styles: ["@keyframes tuiPresent{to{content:\"\"}}@keyframes tuiSkeletonVibe{to{opacity:.5}}.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}tui-root>.t-root-scrollbar{position:fixed;top:0;left:0;bottom:0;right:0;z-index:0;display:none;margin:0}[data-tui-theme] tui-root>.t-root-scrollbar{display:block}.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: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TuiAlerts, selector: "tui-alerts" }, { kind: "component", type: TuiDialogs, selector: "tui-dialogs" }, { kind: "component", type: TuiDropdowns, selector: "tui-dropdowns" }, { kind: "component", type: TuiHints, selector: "tui-hints" }, { kind: "component", type: TuiScrollControls, selector: "tui-scroll-controls" }], viewProviders: [tuiAsPortal(TuiPopupService)], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
44
47
  }
45
48
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiRoot, decorators: [{
46
49
  type: Component,
47
- args: [{ standalone: true, selector: 'tui-root', imports: [NgIf, TuiAlerts, TuiDialogs, TuiDropdowns, TuiHints, TuiScrollControls], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, hostDirectives: [TuiPlatform, TuiVisualViewport], host: {
50
+ args: [{ standalone: true, selector: 'tui-root', imports: [NgIf, TuiAlerts, TuiDialogs, TuiDropdowns, TuiHints, TuiScrollControls], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, viewProviders: [tuiAsPortal(TuiPopupService)], hostDirectives: [TuiPlatform, TuiVisualViewport], host: {
48
51
  'data-tui-version': TUI_VERSION,
49
52
  '[style.--tui-duration.ms]': 'duration',
50
53
  '[style.--tui-scroll-behavior]': 'reducedMotion ? "auto" : "smooth"',
51
54
  '[class._mobile]': 'isMobileRes()',
52
55
  // Required for the :active state to work in Safari. https://stackoverflow.com/a/33681490
53
56
  '(touchstart.passive.silent)': '0',
54
- }, template: "<tui-scroll-controls\n *ngIf=\"scrollbars()\"\n class=\"t-root-scrollbar\"\n/>\n<tui-dropdowns>\n <div class=\"t-root-content\">\n <ng-content />\n </div>\n <ng-content select=\"tuiOverContent\" />\n <tui-dialogs />\n <ng-content select=\"tuiOverDialogs\" />\n <tui-alerts />\n <ng-content select=\"tuiOverAlerts\" />\n</tui-dropdowns>\n<ng-content select=\"tuiOverDropdowns\" />\n<tui-hints />\n<ng-content select=\"tuiOverHints\" />\n", styles: ["@keyframes tuiPresent{to{content:\"\"}}@keyframes tuiSkeletonVibe{to{opacity:.5}}.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}tui-root>.t-root-scrollbar{position:fixed;top:0;left:0;bottom:0;right:0;display:none;margin:0}[data-tui-theme] tui-root>.t-root-scrollbar{display:block}.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"] }]
57
+ }, template: "<div class=\"t-root-content\"><ng-content /></div>\n<tui-scroll-controls\n *ngIf=\"scrollbars()\"\n class=\"t-root-scrollbar\"\n/>\n<ng-container #viewContainer />\n<ng-content select=\"tuiOverContent\" />\n<tui-dialogs />\n<ng-content select=\"tuiOverDialogs\" />\n<tui-alerts />\n<ng-content select=\"tuiOverAlerts\" />\n<tui-dropdowns />\n<ng-content select=\"tuiOverDropdowns\" />\n<tui-hints />\n<ng-content select=\"tuiOverHints\" />\n", styles: ["@keyframes tuiPresent{to{content:\"\"}}@keyframes tuiSkeletonVibe{to{opacity:.5}}.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}tui-root>.t-root-scrollbar{position:fixed;top:0;left:0;bottom:0;right:0;z-index:0;display:none;margin:0}[data-tui-theme] tui-root>.t-root-scrollbar{display:block}.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"] }]
55
58
  }], ctorParameters: function () { return []; } });
56
59
 
57
60
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-root.mjs","sources":["../../../projects/core/components/root/root.component.ts","../../../projects/core/components/root/root.template.html","../../../projects/core/components/root/taiga-ui-core-components-root.ts"],"sourcesContent":["/// <reference types=\"@taiga-ui/tsconfig/ng-dev-mode\" />\nimport {DOCUMENT, NgIf} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {EVENT_MANAGER_PLUGINS} from '@angular/platform-browser';\nimport {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {TuiPlatform} from '@taiga-ui/cdk/directives/platform';\nimport {TuiVisualViewport} from '@taiga-ui/cdk/directives/visual-viewport';\nimport {tuiWatch, tuiZonefreeScheduler} from '@taiga-ui/cdk/observables';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {TuiAlerts} from '@taiga-ui/core/components/alert';\nimport {TUI_DIALOGS, TuiDialogs} from '@taiga-ui/core/components/dialog';\nimport {\n TUI_SCROLLBAR_OPTIONS,\n TuiScrollControls,\n} from '@taiga-ui/core/components/scrollbar';\nimport {TuiDropdowns} from '@taiga-ui/core/directives';\nimport {TuiHints} from '@taiga-ui/core/directives/hint';\nimport {TuiBreakpointService} from '@taiga-ui/core/services';\nimport {TUI_ANIMATIONS_SPEED, TUI_REDUCED_MOTION, TUI_THEME} from '@taiga-ui/core/tokens';\nimport {tuiGetDuration} from '@taiga-ui/core/utils';\nimport {PreventEventPlugin} from '@taiga-ui/event-plugins';\nimport type {Observable} from 'rxjs';\nimport {debounceTime, map} from 'rxjs';\n\n@Component({\n standalone: true,\n selector: 'tui-root',\n imports: [NgIf, TuiAlerts, TuiDialogs, TuiDropdowns, TuiHints, TuiScrollControls],\n templateUrl: './root.template.html',\n styleUrls: ['./root.style.less'],\n encapsulation: ViewEncapsulation.None,\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n hostDirectives: [TuiPlatform, TuiVisualViewport],\n host: {\n 'data-tui-version': TUI_VERSION,\n '[style.--tui-duration.ms]': 'duration',\n '[style.--tui-scroll-behavior]': 'reducedMotion ? \"auto\" : \"smooth\"',\n '[class._mobile]': 'isMobileRes()',\n // Required for the :active state to work in Safari. https://stackoverflow.com/a/33681490\n '(touchstart.passive.silent)': '0',\n },\n})\nexport class TuiRoot {\n protected readonly reducedMotion = inject(TUI_REDUCED_MOTION);\n protected readonly duration = tuiGetDuration(inject(TUI_ANIMATIONS_SPEED));\n\n protected readonly isMobileRes = toSignal(\n inject(TuiBreakpointService).pipe(\n map((breakpoint) => breakpoint === 'mobile'),\n tuiWatch(),\n ),\n {initialValue: false},\n );\n\n protected readonly nativeScrollbar = inject(TUI_SCROLLBAR_OPTIONS).mode === 'native';\n\n protected readonly scrollbars =\n this.nativeScrollbar || inject(TUI_IS_MOBILE)\n ? signal(false)\n : toSignal(\n inject<Observable<readonly unknown[]>>(TUI_DIALOGS).pipe(\n map(({length}) => !length),\n debounceTime(0, tuiZonefreeScheduler()),\n ),\n {initialValue: false},\n );\n\n constructor() {\n inject(DOCUMENT).documentElement.setAttribute(\n 'data-tui-theme',\n inject(TUI_THEME).toLowerCase(),\n );\n\n if (!this.nativeScrollbar) {\n inject(DOCUMENT).defaultView?.document.documentElement.classList.add(\n 'tui-zero-scrollbar',\n );\n }\n\n ngDevMode &&\n console.assert(\n !!inject<unknown[]>(EVENT_MANAGER_PLUGINS).find(\n (plugin) => plugin instanceof PreventEventPlugin,\n ),\n 'NG_EVENT_PLUGINS is missing from global providers',\n );\n }\n}\n","<tui-scroll-controls\n *ngIf=\"scrollbars()\"\n class=\"t-root-scrollbar\"\n/>\n<tui-dropdowns>\n <div class=\"t-root-content\">\n <ng-content />\n </div>\n <ng-content select=\"tuiOverContent\" />\n <tui-dialogs />\n <ng-content select=\"tuiOverDialogs\" />\n <tui-alerts />\n <ng-content select=\"tuiOverAlerts\" />\n</tui-dropdowns>\n<ng-content select=\"tuiOverDropdowns\" />\n<tui-hints />\n<ng-content select=\"tuiOverHints\" />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AA+BA,MAmBa,OAAO,CAAA;AAyBhB,IAAA,WAAA,GAAA;AAxBmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;QAC3C,IAAQ,CAAA,QAAA,GAAG,cAAc,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC;AAExD,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CACrC,MAAM,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAC7B,GAAG,CAAC,CAAC,UAAU,KAAK,UAAU,KAAK,QAAQ,CAAC,EAC5C,QAAQ,EAAE,CACb,EACD,EAAC,YAAY,EAAE,KAAK,EAAC,CACxB,CAAC;QAEiB,IAAe,CAAA,eAAA,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC;QAElE,IAAU,CAAA,UAAA,GACzB,IAAI,CAAC,eAAe,IAAI,MAAM,CAAC,aAAa,CAAC;AACzC,cAAE,MAAM,CAAC,KAAK,CAAC;AACf,cAAE,QAAQ,CACJ,MAAM,CAAiC,WAAW,CAAC,CAAC,IAAI,CACpD,GAAG,CAAC,CAAC,EAAC,MAAM,EAAC,KAAK,CAAC,MAAM,CAAC,EAC1B,YAAY,CAAC,CAAC,EAAE,oBAAoB,EAAE,CAAC,CAC1C,EACD,EAAC,YAAY,EAAE,KAAK,EAAC,CACxB,CAAC;AAGR,QAAA,MAAM,CAAC,QAA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,CAAA,EAAA,CAAA;;;AEhDL;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-root.mjs","sources":["../../../projects/core/components/root/root.component.ts","../../../projects/core/components/root/root.template.html","../../../projects/core/components/root/taiga-ui-core-components-root.ts"],"sourcesContent":["/// <reference types=\"@taiga-ui/tsconfig/ng-dev-mode\" />\nimport {DOCUMENT, NgIf} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {EVENT_MANAGER_PLUGINS} from '@angular/platform-browser';\nimport {tuiAsPortal, TuiPortals} from '@taiga-ui/cdk/classes';\nimport {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {TuiPlatform} from '@taiga-ui/cdk/directives/platform';\nimport {TuiVisualViewport} from '@taiga-ui/cdk/directives/visual-viewport';\nimport {tuiWatch, tuiZonefreeScheduler} from '@taiga-ui/cdk/observables';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {TuiAlerts} from '@taiga-ui/core/components/alert';\nimport {TUI_DIALOGS, TuiDialogs} from '@taiga-ui/core/components/dialog';\nimport {\n TUI_SCROLLBAR_OPTIONS,\n TuiScrollControls,\n} from '@taiga-ui/core/components/scrollbar';\nimport {TuiDropdowns} from '@taiga-ui/core/directives/dropdown';\nimport {TuiHints} from '@taiga-ui/core/directives/hint';\nimport {TuiPopupService} from '@taiga-ui/core/directives/popup';\nimport {TuiBreakpointService} from '@taiga-ui/core/services';\nimport {TUI_ANIMATIONS_SPEED, TUI_REDUCED_MOTION, TUI_THEME} from '@taiga-ui/core/tokens';\nimport {tuiGetDuration} from '@taiga-ui/core/utils';\nimport {PreventEventPlugin} from '@taiga-ui/event-plugins';\nimport type {Observable} from 'rxjs';\nimport {debounceTime, map} from 'rxjs';\n\n@Component({\n standalone: true,\n selector: 'tui-root',\n imports: [NgIf, TuiAlerts, TuiDialogs, TuiDropdowns, TuiHints, TuiScrollControls],\n templateUrl: './root.template.html',\n styleUrls: ['./root.style.less'],\n encapsulation: ViewEncapsulation.None,\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n viewProviders: [tuiAsPortal(TuiPopupService)],\n hostDirectives: [TuiPlatform, TuiVisualViewport],\n host: {\n 'data-tui-version': TUI_VERSION,\n '[style.--tui-duration.ms]': 'duration',\n '[style.--tui-scroll-behavior]': 'reducedMotion ? \"auto\" : \"smooth\"',\n '[class._mobile]': 'isMobileRes()',\n // Required for the :active state to work in Safari. https://stackoverflow.com/a/33681490\n '(touchstart.passive.silent)': '0',\n },\n})\nexport class TuiRoot extends TuiPortals {\n protected readonly reducedMotion = inject(TUI_REDUCED_MOTION);\n protected readonly duration = tuiGetDuration(inject(TUI_ANIMATIONS_SPEED));\n\n protected readonly isMobileRes = toSignal(\n inject(TuiBreakpointService).pipe(\n map((breakpoint) => breakpoint === 'mobile'),\n tuiWatch(),\n ),\n {initialValue: false},\n );\n\n protected readonly nativeScrollbar = inject(TUI_SCROLLBAR_OPTIONS).mode === 'native';\n\n protected readonly scrollbars =\n this.nativeScrollbar || inject(TUI_IS_MOBILE)\n ? signal(false)\n : toSignal(\n inject<Observable<readonly unknown[]>>(TUI_DIALOGS).pipe(\n map(({length}) => !length),\n debounceTime(0, tuiZonefreeScheduler()),\n ),\n {initialValue: false},\n );\n\n constructor() {\n super();\n\n inject(DOCUMENT).documentElement.setAttribute(\n 'data-tui-theme',\n inject(TUI_THEME).toLowerCase(),\n );\n\n if (!this.nativeScrollbar) {\n inject(DOCUMENT).defaultView?.document.documentElement.classList.add(\n 'tui-zero-scrollbar',\n );\n }\n\n ngDevMode &&\n console.assert(\n !!inject<unknown[]>(EVENT_MANAGER_PLUGINS).find(\n (plugin) => plugin instanceof PreventEventPlugin,\n ),\n 'NG_EVENT_PLUGINS is missing from global providers',\n );\n }\n}\n","<div class=\"t-root-content\"><ng-content /></div>\n<tui-scroll-controls\n *ngIf=\"scrollbars()\"\n class=\"t-root-scrollbar\"\n/>\n<ng-container #viewContainer />\n<ng-content select=\"tuiOverContent\" />\n<tui-dialogs />\n<ng-content select=\"tuiOverDialogs\" />\n<tui-alerts />\n<ng-content select=\"tuiOverAlerts\" />\n<tui-dropdowns />\n<ng-content select=\"tuiOverDropdowns\" />\n<tui-hints />\n<ng-content select=\"tuiOverHints\" />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAiCA,MAoBa,OAAQ,SAAQ,UAAU,CAAA;AAyBnC,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,EAAE,CAAC;AAzBO,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;QAC3C,IAAQ,CAAA,QAAA,GAAG,cAAc,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC;AAExD,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CACrC,MAAM,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAC7B,GAAG,CAAC,CAAC,UAAU,KAAK,UAAU,KAAK,QAAQ,CAAC,EAC5C,QAAQ,EAAE,CACb,EACD,EAAC,YAAY,EAAE,KAAK,EAAC,CACxB,CAAC;QAEiB,IAAe,CAAA,eAAA,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC;QAElE,IAAU,CAAA,UAAA,GACzB,IAAI,CAAC,eAAe,IAAI,MAAM,CAAC,aAAa,CAAC;AACzC,cAAE,MAAM,CAAC,KAAK,CAAC;AACf,cAAE,QAAQ,CACJ,MAAM,CAAiC,WAAW,CAAC,CAAC,IAAI,CACpD,GAAG,CAAC,CAAC,EAAC,MAAM,EAAC,KAAK,CAAC,MAAM,CAAC,EAC1B,YAAY,CAAC,CAAC,EAAE,oBAAoB,EAAE,CAAC,CAC1C,EACD,EA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iPositionService } from '@taiga-ui/core/ser
14
14
  import { TUI_VIEWPORT, TUI_ANIMATIONS_SPEED, TUI_SELECTION_STREAM } from '@taiga-ui/core/tokens';
15
15
  import { tuiOverrideOptions, tuiCheckFixedPosition, tuiToAnimationOptions, tuiGetWordRange } from '@taiga-ui/core/utils';
16
16
  import { PolymorpheusComponent, PolymorpheusTemplate, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
17
- import { Subject, throttleTime, takeWhile, map, merge, filter, fromEvent, distinctUntilChanged, switchMap, of, delay, tap, share, BehaviorSubject, combineLatest } from 'rxjs';
17
+ import { BehaviorSubject, Subject, throttleTime, takeWhile, map, merge, filter, fromEvent, distinctUntilChanged, switchMap, of, delay, tap, share, combineLatest } from 'rxjs';
18
18
  import { __decorate } from 'tslib';
19
19
  import { tuiZonefreeScheduler, tuiWatch, tuiTypedFromEvent, tuiZoneOptimized } from '@taiga-ui/cdk/observables';
20
20
  import { TuiPortalService, TuiPortals, tuiAsPortal } from '@taiga-ui/cdk/classes';
@@ -27,30 +27,29 @@ import { TuiObscured } from '@taiga-ui/cdk/directives/obscured';
27
27
  import { tuiIsNativeKeyboardFocusable, tuiGetClosestFocusable, tuiIsNativeFocusedIn, tuiGetNativeFocused } from '@taiga-ui/cdk/utils/focus';
28
28
  import { tuiIsEditingKey, tuiOverrideOptions as tuiOverrideOptions$1 } from '@taiga-ui/core/utils/miscellaneous';
29
29
 
30
- class TuiDropdownDriver extends Subject {
30
+ class TuiDropdownDriver extends BehaviorSubject {
31
31
  constructor() {
32
- super(...arguments);
32
+ super(false);
33
33
  this.type = 'dropdown';
34
34
  }
35
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownDriver, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
35
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownDriver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
36
36
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownDriver }); }
37
37
  }
38
38
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownDriver, decorators: [{
39
39
  type: Injectable
40
- }] });
40
+ }], ctorParameters: function () { return []; } });
41
41
  class TuiDropdownDriverDirective extends TuiDriverDirective {
42
42
  constructor() {
43
43
  super(...arguments);
44
44
  this.type = 'dropdown';
45
45
  }
46
46
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownDriverDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
47
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiDropdownDriverDirective, isStandalone: true, selector: "[tuiDropdownDriver]", usesInheritance: true, ngImport: i0 }); }
47
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiDropdownDriverDirective, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
48
48
  }
49
49
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownDriverDirective, decorators: [{
50
50
  type: Directive,
51
51
  args: [{
52
52
  standalone: true,
53
- selector: '[tuiDropdownDriver]',
54
53
  }]
55
54
  }] });
56
55
 
@@ -650,6 +649,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
650
649
  type: Input
651
650
  }] } });
652
651
 
652
+ /**
653
+ * @deprecated use {@link TuiPopup} directive instead
654
+ */
653
655
  class TuiDropdownPortal {
654
656
  constructor() {
655
657
  this.template = inject(TemplateRef);
@@ -915,17 +917,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
915
917
  */
916
918
  class TuiDropdowns extends TuiPortals {
917
919
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdowns, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
918
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDropdowns, isStandalone: true, selector: "tui-dropdowns", providers: [tuiAsPortal(TuiDropdownService)], usesInheritance: true, ngImport: i0, template: `
919
- <ng-content></ng-content>
920
- <ng-container #viewContainer></ng-container>
921
- `, isInline: true, styles: [":host{display:block;height:100%;isolation:isolate}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
920
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDropdowns, isStandalone: true, selector: "tui-dropdowns", providers: [tuiAsPortal(TuiDropdownService)], usesInheritance: true, ngImport: i0, template: '<ng-container #viewContainer />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
922
921
  }
923
922
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdowns, decorators: [{
924
923
  type: Component,
925
- args: [{ standalone: true, selector: 'tui-dropdowns', template: `
926
- <ng-content></ng-content>
927
- <ng-container #viewContainer></ng-container>
928
- `, changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiAsPortal(TuiDropdownService)], styles: [":host{display:block;height:100%;isolation:isolate}\n"] }]
924
+ args: [{
925
+ standalone: true,
926
+ selector: 'tui-dropdowns',
927
+ template: '<ng-container #viewContainer />',
928
+ changeDetection: ChangeDetectionStrategy.OnPush,
929
+ providers: [tuiAsPortal(TuiDropdownService)],
930
+ }]
929
931
  }] });
930
932
 
931
933
  class TuiWithDropdownOpen {