@taiga-ui/core 4.17.0 → 4.18.0-canary.cabef9a
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/expand/expand.component.mjs +3 -3
- package/esm2022/components/icon/icon.component.mjs +2 -2
- package/esm2022/components/notification/notification.options.mjs +3 -6
- package/esm2022/components/root/root.component.mjs +2 -2
- package/esm2022/directives/dropdown/dropdown-open.directive.mjs +3 -3
- 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.component.mjs +3 -3
- 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-expand.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-expand.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-icon.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-icon.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 +29 -10
- 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
- package/styles/components/icon.less +0 -1
|
@@ -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-canary.cabef9a" }, 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,I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A,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,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,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AA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;4FAWpC,OAAO,EAAA,UAAA,EAAA,CAAA;kBApBnB,SAAS;AACM,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,YACN,UAAU,EAAA,OAAA,EACX,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,iBAAiB,CAAC,EAGlE,aAAA,EAAA,iBAAiB,CAAC,IAAI,mBAEpB,uBAAuB,CAAC,OAAO,EAAA,aAAA,EACjC,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,EAC7B,cAAA,EAAA,CAAC,WAAW,EAAE,iBAAiB,CAAC,EAC1C,IAAA,EAAA;AACF,wBAAA,kBAAkB,EAAE,WAAW;AAC/B,wBAAA,2BAA2B,EAAE,UAAU;AACvC,wBAAA,+BAA+B,EAAE,mCAAmC;AACpE,wBAAA,iBAAiB,EAAE,eAAe;;AAElC,wBAAA,6BAA6B,EAAE,GAAG;AACrC,qBAAA,EAAA,QAAA,EAAA,+bAAA,EAAA,MAAA,EAAA,CAAA,g0BAAA,CAAA,EAAA,CAAA;;;AEjDL;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
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
|
|
@@ -325,7 +342,7 @@ class TuiDropdownComponent {
|
|
|
325
342
|
TuiPositionService,
|
|
326
343
|
tuiPositionAccessorFor('dropdown', TuiDropdownPosition),
|
|
327
344
|
tuiRectAccessorFor('dropdown', TuiDropdownDirective),
|
|
328
|
-
], hostDirectives: [{ directive: i1.TuiActiveZone }], ngImport: i0, template: "<tui-scrollbar class=\"t-scroll\">\n <div\n *polymorpheusOutlet=\"directive.content as text; context: {$implicit: close}\"\n class=\"t-primitive\"\n >\n {{ text }}\n </div>\n</tui-scrollbar>\n", styles: [":host{position:absolute;display:flex;box-shadow:var(--tui-shadow-medium);color:var(--tui-text-primary);background:var(--tui-background-elevation-3);border-radius:var(--tui-radius-m);overflow:hidden;border:1px solid var(--tui-border-normal);box-sizing:border-box;max-inline-size:calc(100% - 8px);isolation:isolate;pointer-events:auto}:host.ng-animating{pointer-events:none}:host:not([style*=top]){visibility:hidden}.t-scroll{flex-grow:1;max-inline-size:100%;overscroll-behavior:none}.t-primitive{padding:1rem}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar", inputs: ["hidden"] }], animations: [tuiDropdownAnimation], changeDetection: i0.ChangeDetectionStrategy.Default }); }
|
|
345
|
+
], hostDirectives: [{ directive: i1.TuiActiveZone }], ngImport: i0, template: "<tui-scrollbar class=\"t-scroll\">\n <div\n *polymorpheusOutlet=\"directive.content as text; context: {$implicit: close}\"\n class=\"t-primitive\"\n >\n {{ text }}\n </div>\n</tui-scrollbar>\n", styles: [":host{position:absolute;display:flex;box-shadow:var(--tui-shadow-medium);color:var(--tui-text-primary);background:var(--tui-background-elevation-3);border-radius:var(--tui-radius-m);overflow:hidden;border:1px solid var(--tui-border-normal);box-sizing:border-box;max-inline-size:calc(100% - 8px);isolation:isolate;pointer-events:auto}:host.ng-animating{pointer-events:none}:host:not([style*=top]){visibility:hidden}.t-scroll{flex-grow:1;max-inline-size:100%;inline-size:-webkit-max-content;inline-size:max-content;overscroll-behavior:none}.t-primitive{padding:1rem}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar", inputs: ["hidden"] }], animations: [tuiDropdownAnimation], changeDetection: i0.ChangeDetectionStrategy.Default }); }
|
|
329
346
|
}
|
|
330
347
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownComponent, decorators: [{
|
|
331
348
|
type: Component,
|
|
@@ -337,7 +354,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
337
354
|
'[@tuiDropdownAnimation]': 'animation',
|
|
338
355
|
'[attr.data-appearance]': 'options.appearance',
|
|
339
356
|
'[attr.tuiTheme]': 'theme',
|
|
340
|
-
}, template: "<tui-scrollbar class=\"t-scroll\">\n <div\n *polymorpheusOutlet=\"directive.content as text; context: {$implicit: close}\"\n class=\"t-primitive\"\n >\n {{ text }}\n </div>\n</tui-scrollbar>\n", styles: [":host{position:absolute;display:flex;box-shadow:var(--tui-shadow-medium);color:var(--tui-text-primary);background:var(--tui-background-elevation-3);border-radius:var(--tui-radius-m);overflow:hidden;border:1px solid var(--tui-border-normal);box-sizing:border-box;max-inline-size:calc(100% - 8px);isolation:isolate;pointer-events:auto}:host.ng-animating{pointer-events:none}:host:not([style*=top]){visibility:hidden}.t-scroll{flex-grow:1;max-inline-size:100%;overscroll-behavior:none}.t-primitive{padding:1rem}\n"] }]
|
|
357
|
+
}, template: "<tui-scrollbar class=\"t-scroll\">\n <div\n *polymorpheusOutlet=\"directive.content as text; context: {$implicit: close}\"\n class=\"t-primitive\"\n >\n {{ text }}\n </div>\n</tui-scrollbar>\n", styles: [":host{position:absolute;display:flex;box-shadow:var(--tui-shadow-medium);color:var(--tui-text-primary);background:var(--tui-background-elevation-3);border-radius:var(--tui-radius-m);overflow:hidden;border:1px solid var(--tui-border-normal);box-sizing:border-box;max-inline-size:calc(100% - 8px);isolation:isolate;pointer-events:auto}:host.ng-animating{pointer-events:none}:host:not([style*=top]){visibility:hidden}.t-scroll{flex-grow:1;max-inline-size:100%;inline-size:-webkit-max-content;inline-size:max-content;overscroll-behavior:none}.t-primitive{padding:1rem}\n"] }]
|
|
341
358
|
}] });
|
|
342
359
|
|
|
343
360
|
function activeZoneFilter(event) {
|
|
@@ -434,7 +451,7 @@ class TuiDropdownOpen {
|
|
|
434
451
|
this.driver = inject(TuiDropdownDriver);
|
|
435
452
|
}
|
|
436
453
|
ngOnChanges() {
|
|
437
|
-
this.update(!!this.tuiDropdownOpen
|
|
454
|
+
this.update(!!this.tuiDropdownOpen);
|
|
438
455
|
}
|
|
439
456
|
toggle(open) {
|
|
440
457
|
if (this.focused && !open) {
|
|
@@ -488,7 +505,7 @@ class TuiDropdownOpen {
|
|
|
488
505
|
}
|
|
489
506
|
update(open) {
|
|
490
507
|
if (open && !this.tuiDropdownEnabled) {
|
|
491
|
-
return;
|
|
508
|
+
return this.drive();
|
|
492
509
|
}
|
|
493
510
|
this.tuiDropdownOpen = open;
|
|
494
511
|
this.tuiDropdownOpenChange.emit(open);
|
|
@@ -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 }); }
|