@taiga-ui/core 4.17.0-canary.d3798a6 → 4.18.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.
- package/components/button/button.options.d.ts +1 -3
- package/components/notification/notification.options.d.ts +1 -3
- package/components/scrollbar/scrollbar.options.d.ts +1 -1
- package/directives/dropdown/dropdown-position.directive.d.ts +5 -2
- package/directives/dropdown/dropdown.directive.d.ts +1 -1
- package/directives/hint/hint-position.directive.d.ts +5 -2
- package/directives/hint/hint.directive.d.ts +1 -1
- package/esm2022/components/button/button.options.mjs +3 -6
- package/esm2022/components/notification/notification.options.mjs +3 -6
- package/esm2022/components/root/root.component.mjs +2 -2
- package/esm2022/directives/dropdown/dropdown-position-sided.directive.mjs +3 -1
- package/esm2022/directives/dropdown/dropdown-position.directive.mjs +18 -5
- package/esm2022/directives/dropdown/dropdown.directive.mjs +9 -3
- package/esm2022/directives/hint/hint-position.directive.mjs +17 -4
- package/esm2022/directives/hint/hint.directive.mjs +3 -2
- package/fesm2022/taiga-ui-core-components-button.mjs +3 -5
- package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-notification.mjs +3 -5
- package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-root.mjs +1 -1
- package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs +25 -6
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-hint.mjs +17 -5
- package/fesm2022/taiga-ui-core-directives-hint.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Component, ViewEncapsulation, ChangeDetectionStrategy, inject, Directive, Input } from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
4
4
|
import * as i1 from '@taiga-ui/core/directives/appearance';
|
|
5
5
|
import { tuiAppearanceOptionsProvider, TuiWithAppearance } from '@taiga-ui/core/directives/appearance';
|
|
6
6
|
import * as i2 from '@taiga-ui/core/directives/icons';
|
|
7
7
|
import { TuiWithIcons } from '@taiga-ui/core/directives/icons';
|
|
8
|
+
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
8
9
|
|
|
9
10
|
const TUI_BUTTON_DEFAULT_OPTIONS = {
|
|
10
11
|
appearance: 'primary',
|
|
11
12
|
size: 'l',
|
|
12
13
|
};
|
|
13
|
-
const TUI_BUTTON_OPTIONS =
|
|
14
|
-
function tuiButtonOptionsProvider(options) {
|
|
15
|
-
return tuiProvideOptions(TUI_BUTTON_OPTIONS, options, TUI_BUTTON_DEFAULT_OPTIONS);
|
|
16
|
-
}
|
|
14
|
+
const [TUI_BUTTON_OPTIONS, tuiButtonOptionsProvider] = tuiCreateOptions(TUI_BUTTON_DEFAULT_OPTIONS);
|
|
17
15
|
|
|
18
16
|
class TuiButtonStyles {
|
|
19
17
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiButtonStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-button.mjs","sources":["../../../projects/core/components/button/button.options.ts","../../../projects/core/components/button/button.directive.ts","../../../projects/core/components/button/taiga-ui-core-components-button.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-button.mjs","sources":["../../../projects/core/components/button/button.options.ts","../../../projects/core/components/button/button.directive.ts","../../../projects/core/components/button/taiga-ui-core-components-button.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport type {TuiAppearanceOptions} from '@taiga-ui/core/directives/appearance';\nimport type {TuiSizeXL, TuiSizeXS} from '@taiga-ui/core/types';\n\nexport interface TuiButtonOptions extends TuiAppearanceOptions {\n readonly size: TuiSizeXL | TuiSizeXS;\n}\n\nexport const TUI_BUTTON_DEFAULT_OPTIONS: TuiButtonOptions = {\n appearance: 'primary',\n size: 'l',\n};\n\nexport const [TUI_BUTTON_OPTIONS, tuiButtonOptionsProvider] = tuiCreateOptions(\n TUI_BUTTON_DEFAULT_OPTIONS,\n);\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n tuiAppearanceOptionsProvider,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {TuiWithIcons} from '@taiga-ui/core/directives/icons';\n\nimport {TUI_BUTTON_OPTIONS} from './button.options';\n\n@Component({\n standalone: true,\n template: '',\n styles: ['@import \"@taiga-ui/core/styles/components/button.less\";'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-button',\n },\n})\nclass TuiButtonStyles {}\n\n@Directive({\n standalone: true,\n selector: 'a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]',\n providers: [tuiAppearanceOptionsProvider(TUI_BUTTON_OPTIONS)],\n hostDirectives: [TuiWithAppearance, TuiWithIcons],\n host: {\n '[attr.data-size]': 'size',\n },\n})\nexport class TuiButton {\n private readonly options = inject(TUI_BUTTON_OPTIONS);\n\n protected readonly nothing = tuiWithStyles(TuiButtonStyles);\n\n @Input()\n public size = this.options.size;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAQa,MAAA,0BAA0B,GAAqB;AACxD,IAAA,UAAU,EAAE,SAAS;AACrB,IAAA,IAAI,EAAE,GAAG;EACX;AAEK,MAAM,CAAC,kBAAkB,EAAE,wBAAwB,CAAC,GAAG,gBAAgB,CAC1E,0BAA0B;;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EAAA,SAAA,EAAA,IAAA,EAAA,SAAS,kMANP,CAAC,4BAA4B,CAAC,kBAAkB,CAAC,CAAC,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAMpD,SAAS,EAAA,UAAA,EAAA,CAAA;kBATrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,uEAAuE;AACjF,oBAAA,SAAS,EAAE,CAAC,4BAA4B,CAAC,kBAAkB,CAAC,CAAC;AAC7D,oBAAA,cAAc,EAAE,CAAC,iBAAiB,EAAE,YAAY,CAAC;AACjD,oBAAA,IAAI,EAAE;AACF,wBAAA,kBAAkB,EAAE,MAAM;AAC7B,qBAAA;AACJ,iBAAA,CAAA;8BAOU,IAAI,EAAA,CAAA;sBADV,KAAK;;;AC3CV;;AAEG;;;;"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Component, ViewEncapsulation, ChangeDetectionStrategy, inject, Directive, Input } from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { tuiWithStyles, tuiIsString } 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
9
|
import { TuiIcons, TuiWithIcons } from '@taiga-ui/core/directives/icons';
|
|
10
|
+
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
10
11
|
|
|
11
12
|
const ICONS = {
|
|
12
13
|
info: '@tui.info',
|
|
@@ -28,10 +29,7 @@ const TUI_NOTIFICATION_DEFAULT_OPTIONS = {
|
|
|
28
29
|
/**
|
|
29
30
|
* Default parameters for notification alert component
|
|
30
31
|
*/
|
|
31
|
-
const TUI_NOTIFICATION_OPTIONS =
|
|
32
|
-
function tuiNotificationOptionsProvider(options) {
|
|
33
|
-
return tuiProvideOptions(TUI_NOTIFICATION_OPTIONS, options, TUI_NOTIFICATION_DEFAULT_OPTIONS);
|
|
34
|
-
}
|
|
32
|
+
const [TUI_NOTIFICATION_OPTIONS, tuiNotificationOptionsProvider] = tuiCreateOptions(TUI_NOTIFICATION_DEFAULT_OPTIONS);
|
|
35
33
|
|
|
36
34
|
class TuiNotificationStyles {
|
|
37
35
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiNotificationStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -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 {
|
|
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, 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 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":";;;;;;;;;;;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,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;AACI,MAAM,CAAC,wBAAwB,EAAE,8BAA8B,CAAC,GACnE,gBAAgB,CAAC,gCAAgC;;ACZrD,MAUM,qBAAqB,CAAA;+GAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAArB,IAAA,SAAA,IAAA,CAAA,I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AA6D;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;;;;"}
|
|
@@ -41,7 +41,7 @@ class TuiRoot extends TuiPortals {
|
|
|
41
41
|
console.assert(!!inject(EVENT_MANAGER_PLUGINS).find((plugin) => plugin instanceof PreventEventPlugin), 'NG_EVENT_PLUGINS is missing from global providers');
|
|
42
42
|
}
|
|
43
43
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiRoot, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
44
|
-
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.
|
|
44
|
+
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.18.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 }); }
|
|
45
45
|
}
|
|
46
46
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiRoot, decorators: [{
|
|
47
47
|
type: Component,
|
|
@@ -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 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} from '@taiga-ui/cdk/observables';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {TuiAlerts} from '@taiga-ui/core/components/alert';\nimport {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 {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 = !(this.nativeScrollbar || inject(TUI_IS_MOBILE));\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;AA+BA,MAoBa,OAAQ,SAAQ,UAAU,CAAA;AAgBnC,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,EAAE,CAAC;AAhBO,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;AAElE,QAAA,IAAA,CAAA,UAAU,GAAG,EAAE,IAAI,CAAC,eAAe,IAAI,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;AAK7E,QAAA,MAAM,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC,YAAY,CACzC,gBAAgB,EAChB,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAClC,CAAC;AAEF,QAAA,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;AACvB,YAAA,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,CAChE,oBAAoB,CACvB,CAAC;AACL,SAAA;QAED,SAAS;YACL,OAAO,CAAC,MAAM,CACV,CAAC,CAAC,MAAM,CAAY,qBAAqB,CAAC,CAAC,IAAI,CAC3C,CAAC,MAAM,KAAK,MAAM,YAAY,kBAAkB,CACnD,EACD,mDAAmD,CACtD,CAAC;KACT;+GArCQ,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAAP,OAAO,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,UAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,kBAAA,EAAA,
|
|
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 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} from '@taiga-ui/cdk/observables';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {TuiAlerts} from '@taiga-ui/core/components/alert';\nimport {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 {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 = !(this.nativeScrollbar || inject(TUI_IS_MOBILE));\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;AA+BA,MAoBa,OAAQ,SAAQ,UAAU,CAAA;AAgBnC,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,EAAE,CAAC;AAhBO,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;AAElE,QAAA,IAAA,CAAA,UAAU,GAAG,EAAE,IAAI,CAAC,eAAe,IAAI,MAAM,CAAC,aAA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';
|
|
2
|
-
import { Injectable, Directive, Optional, Self, SkipSelf, inject, Input, ChangeDetectorRef, INJECTOR, signal, TemplateRef, Component, ChangeDetectionStrategy, computed,
|
|
2
|
+
import { Injectable, Directive, Optional, Self, SkipSelf, inject, Input, EventEmitter, Output, ChangeDetectorRef, INJECTOR, signal, TemplateRef, Component, ChangeDetectionStrategy, computed, ElementRef, ContentChild, ViewContainerRef } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { WA_WINDOW } from '@ng-web-apis/common';
|
|
5
5
|
import * as i1 from '@taiga-ui/cdk/directives/active-zone';
|
|
@@ -141,9 +141,13 @@ class TuiDropdownPosition extends TuiPositionAccessor {
|
|
|
141
141
|
super(...arguments);
|
|
142
142
|
this.options = inject(TUI_DROPDOWN_OPTIONS);
|
|
143
143
|
this.viewport = inject(TUI_VIEWPORT);
|
|
144
|
+
this.directionChange = new EventEmitter();
|
|
144
145
|
this.type = 'dropdown';
|
|
145
146
|
this.accessor = tuiFallbackAccessor('dropdown')(inject(TuiRectAccessor), inject(TuiDropdownDirective, { optional: true }));
|
|
146
147
|
}
|
|
148
|
+
emitDirection(direction) {
|
|
149
|
+
this.directionChange.emit(direction);
|
|
150
|
+
}
|
|
147
151
|
getPosition({ width, height }) {
|
|
148
152
|
if (!width && !height) {
|
|
149
153
|
this.previous = undefined;
|
|
@@ -177,21 +181,28 @@ class TuiDropdownPosition extends TuiPositionAccessor {
|
|
|
177
181
|
const better = available.top > available.bottom ? 'top' : 'bottom';
|
|
178
182
|
if ((available[previous] > minHeight && direction) ||
|
|
179
183
|
available[previous] > height) {
|
|
184
|
+
this.emitDirection(previous);
|
|
180
185
|
return [position[previous], position[align]];
|
|
181
186
|
}
|
|
182
187
|
this.previous = better;
|
|
188
|
+
this.emitDirection(better);
|
|
183
189
|
return [position[better], position[align]];
|
|
184
190
|
}
|
|
185
191
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownPosition, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
186
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiDropdownPosition, isStandalone: true,
|
|
192
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiDropdownPosition, isStandalone: true, outputs: { directionChange: "tuiDropdownDirectionChange" }, usesInheritance: true, ngImport: i0 }); }
|
|
187
193
|
}
|
|
194
|
+
__decorate([
|
|
195
|
+
tuiPure
|
|
196
|
+
], TuiDropdownPosition.prototype, "emitDirection", null);
|
|
188
197
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownPosition, decorators: [{
|
|
189
198
|
type: Directive,
|
|
190
199
|
args: [{
|
|
191
200
|
standalone: true,
|
|
192
|
-
selector: '[tuiDropdownPosition]',
|
|
193
201
|
}]
|
|
194
|
-
}]
|
|
202
|
+
}], propDecorators: { directionChange: [{
|
|
203
|
+
type: Output,
|
|
204
|
+
args: ['tuiDropdownDirectionChange']
|
|
205
|
+
}], emitDirection: [] } });
|
|
195
206
|
|
|
196
207
|
class TuiDropdownDirective {
|
|
197
208
|
constructor() {
|
|
@@ -246,7 +257,7 @@ class TuiDropdownDirective {
|
|
|
246
257
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiDropdownDirective, isStandalone: true, selector: "[tuiDropdown]:not(ng-container):not(ng-template)", inputs: { tuiDropdown: "tuiDropdown" }, providers: [
|
|
247
258
|
tuiAsRectAccessor(TuiDropdownDirective),
|
|
248
259
|
tuiAsVehicle(TuiDropdownDirective),
|
|
249
|
-
], exportAs: ["tuiDropdown"], usesOnChanges: true, hostDirectives: [{ directive: TuiDropdownDriverDirective }, { directive: TuiDropdownPosition }], ngImport: i0 }); }
|
|
260
|
+
], exportAs: ["tuiDropdown"], usesOnChanges: true, hostDirectives: [{ directive: TuiDropdownDriverDirective }, { directive: TuiDropdownPosition, outputs: ["tuiDropdownDirectionChange", "tuiDropdownDirectionChange"] }], ngImport: i0 }); }
|
|
250
261
|
}
|
|
251
262
|
__decorate([
|
|
252
263
|
tuiPure
|
|
@@ -261,7 +272,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
261
272
|
tuiAsVehicle(TuiDropdownDirective),
|
|
262
273
|
],
|
|
263
274
|
exportAs: 'tuiDropdown',
|
|
264
|
-
hostDirectives: [
|
|
275
|
+
hostDirectives: [
|
|
276
|
+
TuiDropdownDriverDirective,
|
|
277
|
+
{
|
|
278
|
+
directive: TuiDropdownPosition,
|
|
279
|
+
outputs: ['tuiDropdownDirectionChange'],
|
|
280
|
+
},
|
|
281
|
+
],
|
|
265
282
|
}]
|
|
266
283
|
}], propDecorators: { tuiDropdown: [{
|
|
267
284
|
type: Input
|
|
@@ -721,9 +738,11 @@ class TuiDropdownPositionSided extends TuiPositionAccessor {
|
|
|
721
738
|
const left = available[align] > width ? position[align] : maxLeft;
|
|
722
739
|
if ((available[this.previous] > minHeight && direction) ||
|
|
723
740
|
this.previous === better) {
|
|
741
|
+
this.vertical.emitDirection(this.previous);
|
|
724
742
|
return [position[this.previous], left];
|
|
725
743
|
}
|
|
726
744
|
this.previous = better;
|
|
745
|
+
this.vertical.emitDirection(better);
|
|
727
746
|
return [position[better], left];
|
|
728
747
|
}
|
|
729
748
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownPositionSided, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|