@taiga-ui/core 4.74.1 → 4.75.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/data-list/data-list.component.d.ts +1 -0
- package/components/textfield/textfield.component.d.ts +1 -0
- package/components/textfield/textfield.directive.d.ts +7 -4
- package/directives/dropdown/dropdown-a11y.directive.d.ts +11 -0
- package/directives/dropdown/dropdown-context.directive.d.ts +2 -1
- package/directives/dropdown/dropdown-open.directive.d.ts +4 -3
- package/directives/dropdown/dropdown.d.ts +2 -1
- package/directives/dropdown/dropdown.directive.d.ts +3 -2
- package/directives/dropdown/dropdown.providers.d.ts +2 -1
- package/directives/dropdown/index.d.ts +1 -0
- package/esm2022/components/data-list/data-list.component.mjs +8 -2
- package/esm2022/components/root/root.component.mjs +1 -1
- package/esm2022/components/textfield/textfield-multi/textfield-multi.component.mjs +7 -7
- package/esm2022/components/textfield/textfield.component.mjs +15 -9
- package/esm2022/components/textfield/textfield.directive.mjs +10 -5
- package/esm2022/directives/dropdown/dropdown-a11y.directive.mjs +52 -0
- package/esm2022/directives/dropdown/dropdown-context.directive.mjs +12 -15
- package/esm2022/directives/dropdown/dropdown-open.directive.mjs +44 -36
- package/esm2022/directives/dropdown/dropdown.directive.mjs +11 -5
- package/esm2022/directives/dropdown/dropdown.mjs +3 -1
- package/esm2022/directives/dropdown/dropdown.providers.mjs +2 -1
- package/esm2022/directives/dropdown/index.mjs +2 -1
- package/fesm2022/taiga-ui-core-components-data-list.mjs +7 -1
- package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-root.mjs +1 -1
- package/fesm2022/taiga-ui-core-components-textfield.mjs +30 -21
- package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs +105 -47
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
- package/package.json +3 -3
- package/styles/mixins/hitbox.less +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Directive, InjectionToken, Optional, Self, SkipSelf, inject, Input, EventEmitter, Output, ChangeDetectorRef, INJECTOR,
|
|
2
|
+
import { Injectable, Directive, InjectionToken, Optional, Self, SkipSelf, inject, Input, EventEmitter, Output, effect, signal, ChangeDetectorRef, INJECTOR, TemplateRef, ElementRef, computed, Component, ChangeDetectionStrategy, NgZone, ContentChild, ViewContainerRef } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { EMPTY_CLIENT_RECT, TUI_TRUE_HANDLER, CHAR_ZERO_WIDTH_SPACE, CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk/constants';
|
|
5
5
|
import * as i1 from '@taiga-ui/cdk/directives/active-zone';
|
|
@@ -20,9 +20,9 @@ import { tuiZonefreeScheduler, tuiTypedFromEvent, tuiZonefree, tuiIfMap, tuiClos
|
|
|
20
20
|
import { tuiOverrideOptions, tuiCheckFixedPosition, tuiGetWordRange } from '@taiga-ui/core/utils';
|
|
21
21
|
import { TuiPortalService, TuiPortals, tuiAsPortal } from '@taiga-ui/cdk/classes';
|
|
22
22
|
import { __decorate } from 'tslib';
|
|
23
|
+
import { TuiIdService } from '@taiga-ui/cdk/services';
|
|
23
24
|
import { DOCUMENT } from '@angular/common';
|
|
24
25
|
import { TUI_IS_TOUCH, TUI_RANGE } from '@taiga-ui/cdk/tokens';
|
|
25
|
-
import { shouldCall } from '@taiga-ui/event-plugins';
|
|
26
26
|
import * as i1$1 from '@taiga-ui/cdk/directives/obscured';
|
|
27
27
|
import { TuiObscured } from '@taiga-ui/cdk/directives/obscured';
|
|
28
28
|
import { tuiIsNativeKeyboardFocusable, tuiGetClosestFocusable, tuiIsNativeFocusedIn, tuiGetFocused } from '@taiga-ui/cdk/utils/focus';
|
|
@@ -61,6 +61,7 @@ const TUI_DROPDOWN_COMPONENT = new InjectionToken(ngDevMode ? 'TUI_DROPDOWN_COMP
|
|
|
61
61
|
factory: () => TuiDropdownComponent,
|
|
62
62
|
});
|
|
63
63
|
const TUI_DROPDOWN_CONTEXT = new InjectionToken(ngDevMode ? 'TUI_DROPDOWN_CONTEXT' : '');
|
|
64
|
+
const TUI_DROPDOWN_HOST = new InjectionToken(ngDevMode ? 'TUI_DROPDOWN_HOST' : '');
|
|
64
65
|
|
|
65
66
|
class TuiDropdownService extends TuiPortalService {
|
|
66
67
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -218,6 +219,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
218
219
|
args: ['tuiDropdownDirectionChange']
|
|
219
220
|
}], emitDirection: [] } });
|
|
220
221
|
|
|
222
|
+
class TuiDropdownA11y {
|
|
223
|
+
constructor() {
|
|
224
|
+
this.id = inject(TuiIdService).generate();
|
|
225
|
+
this.host = inject(TUI_DROPDOWN_HOST);
|
|
226
|
+
this.dropdown = inject(TuiDropdownDirective);
|
|
227
|
+
this.sync = effect(() => {
|
|
228
|
+
const content = this.dropdown._content();
|
|
229
|
+
const dropdown = this.dropdown.ref();
|
|
230
|
+
const host = this.host.nativeElement;
|
|
231
|
+
host.setAttribute('aria-expanded', String(!!dropdown));
|
|
232
|
+
host.setAttribute('aria-controls', this.id);
|
|
233
|
+
host.setAttribute('aria-haspopup', this._tuiDropdownRole());
|
|
234
|
+
if (host.matches('input')) {
|
|
235
|
+
if (content) {
|
|
236
|
+
host.setAttribute('role', 'combobox');
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
host.removeAttribute('role');
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
dropdown?.location.nativeElement.setAttribute('role', this._tuiDropdownRole());
|
|
243
|
+
dropdown?.location.nativeElement.setAttribute('id', this.id);
|
|
244
|
+
if (content) {
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
host.removeAttribute('aria-expanded');
|
|
248
|
+
host.removeAttribute('aria-controls');
|
|
249
|
+
host.removeAttribute('aria-haspopup');
|
|
250
|
+
});
|
|
251
|
+
// TODO: refactor to signal inputs after Angular update
|
|
252
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
253
|
+
this._tuiDropdownRole = signal('listbox');
|
|
254
|
+
}
|
|
255
|
+
set tuiDropdownRole(role) {
|
|
256
|
+
this._tuiDropdownRole.set(role);
|
|
257
|
+
}
|
|
258
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownA11y, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
259
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiDropdownA11y, isStandalone: true, selector: "[tuiDropdownA11y]", inputs: { tuiDropdownRole: "tuiDropdownRole" }, ngImport: i0 }); }
|
|
260
|
+
}
|
|
261
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownA11y, decorators: [{
|
|
262
|
+
type: Directive,
|
|
263
|
+
args: [{ standalone: true, selector: '[tuiDropdownA11y]' }]
|
|
264
|
+
}], propDecorators: { tuiDropdownRole: [{
|
|
265
|
+
type: Input
|
|
266
|
+
}] } });
|
|
267
|
+
|
|
221
268
|
class TuiDropdownDirective {
|
|
222
269
|
constructor() {
|
|
223
270
|
this.refresh$ = new Subject();
|
|
@@ -286,7 +333,8 @@ class TuiDropdownDirective {
|
|
|
286
333
|
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" }, host: { properties: { "class.tui-dropdown-open": "ref()" } }, providers: [
|
|
287
334
|
tuiAsRectAccessor(TuiDropdownDirective),
|
|
288
335
|
tuiAsVehicle(TuiDropdownDirective),
|
|
289
|
-
|
|
336
|
+
tuiProvide(TUI_DROPDOWN_HOST, ElementRef),
|
|
337
|
+
], exportAs: ["tuiDropdown"], hostDirectives: [{ directive: TuiDropdownDriverDirective }, { directive: TuiDropdownA11y, inputs: ["tuiDropdownRole", "tuiDropdownRole"] }, { directive: TuiDropdownPosition, outputs: ["tuiDropdownDirectionChange", "tuiDropdownDirectionChange"] }], ngImport: i0 }); }
|
|
290
338
|
}
|
|
291
339
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownDirective, decorators: [{
|
|
292
340
|
type: Directive,
|
|
@@ -296,10 +344,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
296
344
|
providers: [
|
|
297
345
|
tuiAsRectAccessor(TuiDropdownDirective),
|
|
298
346
|
tuiAsVehicle(TuiDropdownDirective),
|
|
347
|
+
tuiProvide(TUI_DROPDOWN_HOST, ElementRef),
|
|
299
348
|
],
|
|
300
349
|
exportAs: 'tuiDropdown',
|
|
301
350
|
hostDirectives: [
|
|
302
351
|
TuiDropdownDriverDirective,
|
|
352
|
+
{ directive: TuiDropdownA11y, inputs: ['tuiDropdownRole'] },
|
|
303
353
|
{
|
|
304
354
|
directive: TuiDropdownPosition,
|
|
305
355
|
outputs: ['tuiDropdownDirectionChange'],
|
|
@@ -385,13 +435,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
385
435
|
}, 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;isolation:isolate;pointer-events:auto;--tui-from: translateY(-1rem)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}: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"] }]
|
|
386
436
|
}] });
|
|
387
437
|
|
|
388
|
-
function activeZoneFilter(event) {
|
|
389
|
-
return (!event ||
|
|
390
|
-
(this.driver.value && !this.activeZone.contains(tuiGetActualTarget(event))));
|
|
391
|
-
}
|
|
392
438
|
class TuiDropdownContext extends TuiRectAccessor {
|
|
393
439
|
constructor() {
|
|
394
440
|
super(...arguments);
|
|
441
|
+
this.zone = inject(NgZone);
|
|
395
442
|
this.isTouch = inject(TUI_IS_TOUCH);
|
|
396
443
|
this.currentRect = EMPTY_CLIENT_RECT;
|
|
397
444
|
this.userSelect = computed(() => (this.isTouch() ? 'none' : null));
|
|
@@ -406,9 +453,14 @@ class TuiDropdownContext extends TuiRectAccessor {
|
|
|
406
453
|
getClientRect() {
|
|
407
454
|
return this.currentRect;
|
|
408
455
|
}
|
|
409
|
-
closeDropdown(
|
|
410
|
-
|
|
411
|
-
|
|
456
|
+
closeDropdown(event) {
|
|
457
|
+
if (!event ||
|
|
458
|
+
(this.driver.value && !this.activeZone.contains(tuiGetActualTarget(event)))) {
|
|
459
|
+
this.zone.run(() => {
|
|
460
|
+
this.driver.next(false);
|
|
461
|
+
this.currentRect = EMPTY_CLIENT_RECT;
|
|
462
|
+
});
|
|
463
|
+
}
|
|
412
464
|
}
|
|
413
465
|
onContextMenu(x, y) {
|
|
414
466
|
this.currentRect = tuiPointToClientRect(x, y);
|
|
@@ -422,9 +474,6 @@ class TuiDropdownContext extends TuiRectAccessor {
|
|
|
422
474
|
tuiAsRectAccessor(TuiDropdownContext),
|
|
423
475
|
], usesInheritance: true, ngImport: i0 }); }
|
|
424
476
|
}
|
|
425
|
-
__decorate([
|
|
426
|
-
shouldCall(activeZoneFilter)
|
|
427
|
-
], TuiDropdownContext.prototype, "closeDropdown", null);
|
|
428
477
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownContext, decorators: [{
|
|
429
478
|
type: Directive,
|
|
430
479
|
args: [{
|
|
@@ -444,7 +493,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
444
493
|
'(longtap)': 'onContextMenu($event.detail.clientX, $event.detail.clientY)',
|
|
445
494
|
},
|
|
446
495
|
}]
|
|
447
|
-
}]
|
|
496
|
+
}] });
|
|
448
497
|
|
|
449
498
|
/** Default values for hint options */
|
|
450
499
|
const TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS = {
|
|
@@ -461,22 +510,13 @@ function tuiDropdownHoverOptionsProvider(options) {
|
|
|
461
510
|
return tuiProvideOptions(TUI_DROPDOWN_HOVER_OPTIONS, options, TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS);
|
|
462
511
|
}
|
|
463
512
|
|
|
464
|
-
function shouldClose(event) {
|
|
465
|
-
return (
|
|
466
|
-
// @ts-ignore
|
|
467
|
-
typeof CloseWatcher === 'undefined' &&
|
|
468
|
-
// ?. for auto fill events
|
|
469
|
-
event.key?.toLowerCase() === 'escape' &&
|
|
470
|
-
this.tuiDropdownEnabled &&
|
|
471
|
-
!!this.tuiDropdownOpen &&
|
|
472
|
-
!this['dropdown']()?.nextElementSibling);
|
|
473
|
-
}
|
|
474
513
|
class TuiDropdownOpen {
|
|
475
514
|
constructor() {
|
|
476
515
|
this.directive = inject(TuiDropdownDirective);
|
|
477
516
|
this.el = tuiInjectElement();
|
|
478
517
|
this.obscured = inject(TuiObscured);
|
|
479
518
|
this.activeZone = inject(TuiActiveZone);
|
|
519
|
+
this.zone = inject(NgZone);
|
|
480
520
|
this.dropdown = computed(() => this.directive.ref()?.location.nativeElement);
|
|
481
521
|
this.tuiDropdownEnabled = true;
|
|
482
522
|
this.tuiDropdownOpen = false;
|
|
@@ -484,7 +524,7 @@ class TuiDropdownOpen {
|
|
|
484
524
|
// TODO: make it private when all legacy controls will be deleted from @taiga-ui/legacy (5.0)
|
|
485
525
|
this.driver = inject(TuiDropdownDriver);
|
|
486
526
|
this.sub = this.driver
|
|
487
|
-
.pipe(tuiIfMap(() => merge(tuiCloseWatcher(), this.obscured.tuiObscured.pipe(filter(Boolean)), this.activeZone.tuiActiveZoneChange.pipe(filter((a) => !a)), fromEvent(this.el, 'focusin').pipe(filter((event) => !this.
|
|
527
|
+
.pipe(tuiIfMap(() => merge(tuiCloseWatcher(), this.obscured.tuiObscured.pipe(filter(Boolean)), this.activeZone.tuiActiveZoneChange.pipe(filter((a) => !a)), fromEvent(this.el, 'focusin').pipe(filter((event) => !this.nativeElement.contains(tuiGetActualTarget(event)) ||
|
|
488
528
|
!this.directive.ref())))), tuiZonefull(), tuiWatch(), takeUntilDestroyed())
|
|
489
529
|
.subscribe(() => this.toggle(false));
|
|
490
530
|
this.sync = this.driver.pipe(takeUntilDestroyed()).subscribe((open) => {
|
|
@@ -493,28 +533,46 @@ class TuiDropdownOpen {
|
|
|
493
533
|
}
|
|
494
534
|
});
|
|
495
535
|
}
|
|
536
|
+
get nativeElement() {
|
|
537
|
+
const initial = this.dropdownHost?.nativeElement || this.el;
|
|
538
|
+
const focusable = tuiIsNativeKeyboardFocusable(initial)
|
|
539
|
+
? initial
|
|
540
|
+
: tuiGetClosestFocusable({ initial, root: this.el });
|
|
541
|
+
return this.dropdownHost?.nativeElement || focusable || this.el;
|
|
542
|
+
}
|
|
496
543
|
ngOnChanges() {
|
|
497
544
|
this.drive(!!this.tuiDropdownOpen);
|
|
498
545
|
this.tuiDropdownOpenChange.emit(!!this.tuiDropdownOpen);
|
|
499
546
|
}
|
|
500
547
|
toggle(open) {
|
|
501
548
|
if (this.focused && !open) {
|
|
502
|
-
this.
|
|
549
|
+
this.nativeElement.focus({ preventScroll: true });
|
|
503
550
|
}
|
|
504
551
|
this.update(open);
|
|
505
552
|
}
|
|
506
553
|
onEsc(event) {
|
|
507
|
-
|
|
508
|
-
|
|
554
|
+
if (
|
|
555
|
+
// @ts-ignore
|
|
556
|
+
typeof CloseWatcher === 'undefined' &&
|
|
557
|
+
// ?. for autofill events
|
|
558
|
+
event.key?.toLowerCase() === 'escape' &&
|
|
559
|
+
this.tuiDropdownEnabled &&
|
|
560
|
+
!!this.tuiDropdownOpen &&
|
|
561
|
+
!this.dropdown()?.nextElementSibling) {
|
|
562
|
+
this.zone.run(() => {
|
|
563
|
+
event.preventDefault();
|
|
564
|
+
this.toggle(false);
|
|
565
|
+
});
|
|
566
|
+
}
|
|
509
567
|
}
|
|
510
568
|
onClick(target) {
|
|
511
|
-
if (!this.editable && this.
|
|
569
|
+
if (!this.editable && this.nativeElement.contains(target)) {
|
|
512
570
|
this.update(!this.tuiDropdownOpen);
|
|
513
571
|
}
|
|
514
572
|
}
|
|
515
573
|
onArrow(event, up) {
|
|
516
574
|
if (!tuiIsElement(event.target) ||
|
|
517
|
-
!this.
|
|
575
|
+
!this.nativeElement.contains(event.target) ||
|
|
518
576
|
!this.tuiDropdownEnabled ||
|
|
519
577
|
!this.directive._content()) {
|
|
520
578
|
return;
|
|
@@ -530,21 +588,15 @@ class TuiDropdownOpen {
|
|
|
530
588
|
this.focused &&
|
|
531
589
|
tuiIsHTMLElement(target) &&
|
|
532
590
|
!tuiIsElementEditable(target)) {
|
|
533
|
-
this.
|
|
591
|
+
this.nativeElement.focus({ preventScroll: true });
|
|
534
592
|
}
|
|
535
593
|
}
|
|
536
|
-
get host() {
|
|
537
|
-
const initial = this.dropdownHost?.nativeElement || this.el;
|
|
538
|
-
const focusable = tuiIsNativeKeyboardFocusable(initial)
|
|
539
|
-
? initial
|
|
540
|
-
: tuiGetClosestFocusable({ initial, root: this.el });
|
|
541
|
-
return this.dropdownHost?.nativeElement || focusable || this.el;
|
|
542
|
-
}
|
|
543
594
|
get editable() {
|
|
544
|
-
return tuiIsElementEditable(this.
|
|
595
|
+
return tuiIsElementEditable(this.nativeElement);
|
|
545
596
|
}
|
|
546
597
|
get focused() {
|
|
547
|
-
return tuiIsNativeFocusedIn(this.
|
|
598
|
+
return (tuiIsNativeFocusedIn(this.nativeElement) ||
|
|
599
|
+
tuiIsNativeFocusedIn(this.dropdown()));
|
|
548
600
|
}
|
|
549
601
|
update(open) {
|
|
550
602
|
if (open && !this.tuiDropdownEnabled) {
|
|
@@ -572,17 +624,22 @@ class TuiDropdownOpen {
|
|
|
572
624
|
focusable?.focus();
|
|
573
625
|
}
|
|
574
626
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownOpen, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
575
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiDropdownOpen, isStandalone: true, selector: "[tuiDropdown][tuiDropdownOpen],[tuiDropdown][tuiDropdownOpenChange]", inputs: { tuiDropdownEnabled: "tuiDropdownEnabled", tuiDropdownOpen: "tuiDropdownOpen" }, outputs: { tuiDropdownOpenChange: "tuiDropdownOpenChange" }, host: { listeners: { "click": "onClick($event.target)", "keydown.arrowDown": "onArrow($event, false)", "keydown.arrowUp": "onArrow($event, true)", "document:keydown.zoneless.capture": "onEsc($event)", "document:keydown.zoneless": "onKeydown($event)", "tuiActiveZoneChange": "0" } }, providers: [
|
|
627
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiDropdownOpen, isStandalone: true, selector: "[tuiDropdown][tuiDropdownOpen],[tuiDropdown][tuiDropdownOpenChange]", inputs: { tuiDropdownEnabled: "tuiDropdownEnabled", tuiDropdownOpen: "tuiDropdownOpen" }, outputs: { tuiDropdownOpenChange: "tuiDropdownOpenChange" }, host: { listeners: { "click": "onClick($event.target)", "keydown.arrowDown": "onArrow($event, false)", "keydown.arrowUp": "onArrow($event, true)", "document:keydown.zoneless.capture": "onEsc($event)", "document:keydown.zoneless": "onKeydown($event)", "tuiActiveZoneChange": "0" } }, providers: [
|
|
628
|
+
TuiDropdownDriver,
|
|
629
|
+
tuiAsDriver(TuiDropdownDriver),
|
|
630
|
+
tuiProvide(TUI_DROPDOWN_HOST, TuiDropdownOpen),
|
|
631
|
+
], queries: [{ propertyName: "dropdownHost", first: true, predicate: ["tuiDropdownHost"], descendants: true, read: ElementRef }], usesOnChanges: true, hostDirectives: [{ directive: i1$1.TuiObscured }, { directive: i1.TuiActiveZone, inputs: ["tuiActiveZoneParent", "tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange", "tuiActiveZoneChange"] }], ngImport: i0 }); }
|
|
576
632
|
}
|
|
577
|
-
__decorate([
|
|
578
|
-
shouldCall(shouldClose)
|
|
579
|
-
], TuiDropdownOpen.prototype, "onEsc", null);
|
|
580
633
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownOpen, decorators: [{
|
|
581
634
|
type: Directive,
|
|
582
635
|
args: [{
|
|
583
636
|
standalone: true,
|
|
584
637
|
selector: '[tuiDropdown][tuiDropdownOpen],[tuiDropdown][tuiDropdownOpenChange]',
|
|
585
|
-
providers: [
|
|
638
|
+
providers: [
|
|
639
|
+
TuiDropdownDriver,
|
|
640
|
+
tuiAsDriver(TuiDropdownDriver),
|
|
641
|
+
tuiProvide(TUI_DROPDOWN_HOST, TuiDropdownOpen),
|
|
642
|
+
],
|
|
586
643
|
hostDirectives: [
|
|
587
644
|
TuiObscured,
|
|
588
645
|
{
|
|
@@ -610,7 +667,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
610
667
|
type: Input
|
|
611
668
|
}], tuiDropdownOpenChange: [{
|
|
612
669
|
type: Output
|
|
613
|
-
}]
|
|
670
|
+
}] } });
|
|
614
671
|
|
|
615
672
|
class TuiDropdownHover extends TuiDriver {
|
|
616
673
|
constructor() {
|
|
@@ -989,6 +1046,7 @@ const TuiDropdown = [
|
|
|
989
1046
|
TuiDropdownPosition,
|
|
990
1047
|
TuiDropdownPositionSided,
|
|
991
1048
|
TuiDropdownSelection,
|
|
1049
|
+
TuiDropdownA11y,
|
|
992
1050
|
];
|
|
993
1051
|
|
|
994
1052
|
function tuiDropdown(value) {
|
|
@@ -1077,5 +1135,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1077
1135
|
* Generated bundle index. Do not edit.
|
|
1078
1136
|
*/
|
|
1079
1137
|
|
|
1080
|
-
export { TUI_DROPDOWN_COMPONENT, TUI_DROPDOWN_CONTEXT, TUI_DROPDOWN_DEFAULT_OPTIONS, TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS, TUI_DROPDOWN_HOVER_OPTIONS, TUI_DROPDOWN_OPTIONS, TuiDropdown, TuiDropdownAuto, TuiDropdownComponent, TuiDropdownContext, TuiDropdownDirective, TuiDropdownDriver, TuiDropdownDriverDirective, TuiDropdownFixed, TuiDropdownHover, TuiDropdownManual, TuiDropdownOpen, TuiDropdownOpenLegacy, TuiDropdownOptionsDirective, TuiDropdownPortal, TuiDropdownPosition, TuiDropdownPositionSided, TuiDropdownSelection, TuiDropdownService, TuiDropdowns, TuiWithDropdownOpen, tuiDropdown, tuiDropdownEnabled, tuiDropdownHoverOptionsProvider, tuiDropdownOpen, tuiDropdownOptionsProvider };
|
|
1138
|
+
export { TUI_DROPDOWN_COMPONENT, TUI_DROPDOWN_CONTEXT, TUI_DROPDOWN_DEFAULT_OPTIONS, TUI_DROPDOWN_HOST, TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS, TUI_DROPDOWN_HOVER_OPTIONS, TUI_DROPDOWN_OPTIONS, TuiDropdown, TuiDropdownA11y, TuiDropdownAuto, TuiDropdownComponent, TuiDropdownContext, TuiDropdownDirective, TuiDropdownDriver, TuiDropdownDriverDirective, TuiDropdownFixed, TuiDropdownHover, TuiDropdownManual, TuiDropdownOpen, TuiDropdownOpenLegacy, TuiDropdownOptionsDirective, TuiDropdownPortal, TuiDropdownPosition, TuiDropdownPositionSided, TuiDropdownSelection, TuiDropdownService, TuiDropdowns, TuiWithDropdownOpen, tuiDropdown, tuiDropdownEnabled, tuiDropdownHoverOptionsProvider, tuiDropdownOpen, tuiDropdownOptionsProvider };
|
|
1081
1139
|
//# sourceMappingURL=taiga-ui-core-directives-dropdown.mjs.map
|