@angular/aria 21.1.0-next.1 → 21.1.0-next.3
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/fesm2022/_accordion-chunk.mjs +108 -0
- package/fesm2022/_accordion-chunk.mjs.map +1 -0
- package/fesm2022/_combobox-chunk.mjs +425 -0
- package/fesm2022/_combobox-chunk.mjs.map +1 -0
- package/fesm2022/_combobox-listbox-chunk.mjs +240 -0
- package/fesm2022/_combobox-listbox-chunk.mjs.map +1 -0
- package/fesm2022/_combobox-tree-chunk.mjs +331 -0
- package/fesm2022/_combobox-tree-chunk.mjs.map +1 -0
- package/fesm2022/_deferred-content-chunk.mjs +124 -0
- package/fesm2022/_deferred-content-chunk.mjs.map +1 -0
- package/fesm2022/_expansion-chunk.mjs +41 -0
- package/fesm2022/_expansion-chunk.mjs.map +1 -0
- package/fesm2022/_list-chunk.mjs +287 -0
- package/fesm2022/_list-chunk.mjs.map +1 -0
- package/fesm2022/_list-navigation-chunk.mjs +116 -0
- package/fesm2022/_list-navigation-chunk.mjs.map +1 -0
- package/fesm2022/_menu-chunk.mjs +515 -0
- package/fesm2022/_menu-chunk.mjs.map +1 -0
- package/fesm2022/_pointer-event-manager-chunk.mjs +54 -0
- package/fesm2022/_pointer-event-manager-chunk.mjs.map +1 -0
- package/fesm2022/_signal-like-chunk.mjs +118 -0
- package/fesm2022/_signal-like-chunk.mjs.map +1 -0
- package/fesm2022/_tabs-chunk.mjs +159 -0
- package/fesm2022/_tabs-chunk.mjs.map +1 -0
- package/fesm2022/_toolbar-widget-group-chunk.mjs +148 -0
- package/fesm2022/_toolbar-widget-group-chunk.mjs.map +1 -0
- package/fesm2022/_widget-chunk.mjs +5 -246
- package/fesm2022/_widget-chunk.mjs.map +1 -1
- package/fesm2022/accordion.mjs +73 -55
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -1
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox.mjs +166 -153
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid.mjs +287 -261
- package/fesm2022/grid.mjs.map +1 -1
- package/fesm2022/listbox.mjs +211 -197
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +308 -286
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs +15 -2329
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/tabs.mjs +221 -199
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +64 -48
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree.mjs +54 -44
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +2 -2
- package/types/_accordion-chunk.d.ts +100 -0
- package/types/_combobox-chunk.d.ts +194 -0
- package/types/_deferred-content-chunk.d.ts +42 -0
- package/types/_expansion-chunk.d.ts +40 -0
- package/types/_grid-chunk.d.ts +43 -250
- package/types/_keyboard-event-manager-chunk.d.ts +68 -0
- package/types/_list-chunk.d.ts +211 -0
- package/types/_list-navigation-chunk.d.ts +119 -0
- package/types/_listbox-chunk.d.ts +107 -0
- package/types/_menu-chunk.d.ts +267 -0
- package/types/_pointer-event-manager-chunk.d.ts +34 -0
- package/types/_tabs-chunk.d.ts +153 -0
- package/types/_toolbar-chunk.d.ts +124 -0
- package/types/_tree-chunk.d.ts +185 -0
- package/types/accordion.d.ts +65 -54
- package/types/aria.d.ts +1 -1
- package/types/combobox.d.ts +86 -56
- package/types/grid.d.ts +47 -32
- package/types/listbox.d.ts +22 -7
- package/types/menu.d.ts +135 -117
- package/types/private.d.ts +28 -1376
- package/types/tabs.d.ts +109 -88
- package/types/toolbar.d.ts +77 -66
- package/types/tree.d.ts +118 -104
- package/_adev_assets/aria-accordion.json +0 -743
- package/_adev_assets/aria-combobox.json +0 -603
- package/_adev_assets/aria-grid.json +0 -893
- package/_adev_assets/aria-listbox.json +0 -540
- package/_adev_assets/aria-menu.json +0 -1049
- package/_adev_assets/aria-tabs.json +0 -880
- package/_adev_assets/aria-toolbar.json +0 -545
- package/_adev_assets/aria-tree.json +0 -853
package/fesm2022/tabs.mjs
CHANGED
|
@@ -1,81 +1,24 @@
|
|
|
1
|
-
import { _IdGenerator } from '@angular/cdk/a11y';
|
|
2
|
-
import { Directionality } from '@angular/cdk/bidi';
|
|
3
1
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { inject, ElementRef, signal, computed,
|
|
5
|
-
import
|
|
6
|
-
import { TabListPattern,
|
|
2
|
+
import { InjectionToken, inject, ElementRef, signal, computed, input, booleanAttribute, model, afterRenderEffect, Directive } from '@angular/core';
|
|
3
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
4
|
+
import { TabListPattern, TabPanelPattern, TabPattern } from './_tabs-chunk.mjs';
|
|
5
|
+
import { _IdGenerator } from '@angular/cdk/a11y';
|
|
6
|
+
import { DeferredContentAware, DeferredContent } from './_deferred-content-chunk.mjs';
|
|
7
|
+
import './_expansion-chunk.mjs';
|
|
8
|
+
import './_signal-like-chunk.mjs';
|
|
9
|
+
import '@angular/core/primitives/signals';
|
|
10
|
+
import './_list-navigation-chunk.mjs';
|
|
11
|
+
import './_pointer-event-manager-chunk.mjs';
|
|
7
12
|
|
|
13
|
+
const TABS = new InjectionToken('TABS');
|
|
8
14
|
function sortDirectives(a, b) {
|
|
9
15
|
return (a.element.compareDocumentPosition(b.element) & Node.DOCUMENT_POSITION_PRECEDING) > 0 ? 1 : -1;
|
|
10
16
|
}
|
|
11
|
-
|
|
12
|
-
_elementRef = inject(ElementRef);
|
|
13
|
-
element = this._elementRef.nativeElement;
|
|
14
|
-
_tablist = signal(undefined, ...(ngDevMode ? [{
|
|
15
|
-
debugName: "_tablist"
|
|
16
|
-
}] : []));
|
|
17
|
-
_unorderedPanels = signal(new Set(), ...(ngDevMode ? [{
|
|
18
|
-
debugName: "_unorderedPanels"
|
|
19
|
-
}] : []));
|
|
20
|
-
_tabPatterns = computed(() => this._tablist()?._tabPatterns(), ...(ngDevMode ? [{
|
|
21
|
-
debugName: "_tabPatterns"
|
|
22
|
-
}] : []));
|
|
23
|
-
_unorderedTabpanelPatterns = computed(() => [...this._unorderedPanels()].map(tabpanel => tabpanel._pattern), ...(ngDevMode ? [{
|
|
24
|
-
debugName: "_unorderedTabpanelPatterns"
|
|
25
|
-
}] : []));
|
|
26
|
-
_register(child) {
|
|
27
|
-
if (child instanceof TabList) {
|
|
28
|
-
this._tablist.set(child);
|
|
29
|
-
}
|
|
30
|
-
if (child instanceof TabPanel) {
|
|
31
|
-
this._unorderedPanels().add(child);
|
|
32
|
-
this._unorderedPanels.set(new Set(this._unorderedPanels()));
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
_unregister(child) {
|
|
36
|
-
if (child instanceof TabList) {
|
|
37
|
-
this._tablist.set(undefined);
|
|
38
|
-
}
|
|
39
|
-
if (child instanceof TabPanel) {
|
|
40
|
-
this._unorderedPanels().delete(child);
|
|
41
|
-
this._unorderedPanels.set(new Set(this._unorderedPanels()));
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
45
|
-
minVersion: "12.0.0",
|
|
46
|
-
version: "21.0.0",
|
|
47
|
-
ngImport: i0,
|
|
48
|
-
type: Tabs,
|
|
49
|
-
deps: [],
|
|
50
|
-
target: i0.ɵɵFactoryTarget.Directive
|
|
51
|
-
});
|
|
52
|
-
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
53
|
-
minVersion: "14.0.0",
|
|
54
|
-
version: "21.0.0",
|
|
55
|
-
type: Tabs,
|
|
56
|
-
isStandalone: true,
|
|
57
|
-
selector: "[ngTabs]",
|
|
58
|
-
exportAs: ["ngTabs"],
|
|
59
|
-
ngImport: i0
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
63
|
-
minVersion: "12.0.0",
|
|
64
|
-
version: "21.0.0",
|
|
65
|
-
ngImport: i0,
|
|
66
|
-
type: Tabs,
|
|
67
|
-
decorators: [{
|
|
68
|
-
type: Directive,
|
|
69
|
-
args: [{
|
|
70
|
-
selector: '[ngTabs]',
|
|
71
|
-
exportAs: 'ngTabs'
|
|
72
|
-
}]
|
|
73
|
-
}]
|
|
74
|
-
});
|
|
17
|
+
|
|
75
18
|
class TabList {
|
|
76
19
|
_elementRef = inject(ElementRef);
|
|
77
20
|
element = this._elementRef.nativeElement;
|
|
78
|
-
_tabs = inject(
|
|
21
|
+
_tabs = inject(TABS);
|
|
79
22
|
_unorderedTabs = signal(new Set(), ...(ngDevMode ? [{
|
|
80
23
|
debugName: "_unorderedTabs"
|
|
81
24
|
}] : []));
|
|
@@ -86,18 +29,18 @@ class TabList {
|
|
|
86
29
|
orientation = input('horizontal', ...(ngDevMode ? [{
|
|
87
30
|
debugName: "orientation"
|
|
88
31
|
}] : []));
|
|
89
|
-
wrap = input(true,
|
|
90
|
-
|
|
32
|
+
wrap = input(true, {
|
|
33
|
+
...(ngDevMode ? {
|
|
34
|
+
debugName: "wrap"
|
|
35
|
+
} : {}),
|
|
91
36
|
transform: booleanAttribute
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
transform: booleanAttribute
|
|
98
|
-
}] : [{
|
|
37
|
+
});
|
|
38
|
+
softDisabled = input(true, {
|
|
39
|
+
...(ngDevMode ? {
|
|
40
|
+
debugName: "softDisabled"
|
|
41
|
+
} : {}),
|
|
99
42
|
transform: booleanAttribute
|
|
100
|
-
}
|
|
43
|
+
});
|
|
101
44
|
focusMode = input('roving', ...(ngDevMode ? [{
|
|
102
45
|
debugName: "focusMode"
|
|
103
46
|
}] : []));
|
|
@@ -107,12 +50,12 @@ class TabList {
|
|
|
107
50
|
selectedTab = model(...(ngDevMode ? [undefined, {
|
|
108
51
|
debugName: "selectedTab"
|
|
109
52
|
}] : []));
|
|
110
|
-
disabled = input(false,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
53
|
+
disabled = input(false, {
|
|
54
|
+
...(ngDevMode ? {
|
|
55
|
+
debugName: "disabled"
|
|
56
|
+
} : {}),
|
|
114
57
|
transform: booleanAttribute
|
|
115
|
-
}
|
|
58
|
+
});
|
|
116
59
|
_pattern = new TabListPattern({
|
|
117
60
|
...this,
|
|
118
61
|
items: this._tabPatterns,
|
|
@@ -137,7 +80,10 @@ class TabList {
|
|
|
137
80
|
afterRenderEffect(() => {
|
|
138
81
|
const value = this.selectedTab();
|
|
139
82
|
if (value) {
|
|
140
|
-
this.
|
|
83
|
+
this._tabPatterns().forEach(tab => tab.expanded.set(false));
|
|
84
|
+
const tab = this._tabPatterns().find(t => t.value() === value);
|
|
85
|
+
this._pattern.selectedTab.set(tab);
|
|
86
|
+
tab?.expanded.set(true);
|
|
141
87
|
}
|
|
142
88
|
});
|
|
143
89
|
}
|
|
@@ -163,7 +109,7 @@ class TabList {
|
|
|
163
109
|
}
|
|
164
110
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
165
111
|
minVersion: "12.0.0",
|
|
166
|
-
version: "21.0.
|
|
112
|
+
version: "21.0.3",
|
|
167
113
|
ngImport: i0,
|
|
168
114
|
type: TabList,
|
|
169
115
|
deps: [],
|
|
@@ -171,7 +117,7 @@ class TabList {
|
|
|
171
117
|
});
|
|
172
118
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
173
119
|
minVersion: "17.1.0",
|
|
174
|
-
version: "21.0.
|
|
120
|
+
version: "21.0.3",
|
|
175
121
|
type: TabList,
|
|
176
122
|
isStandalone: true,
|
|
177
123
|
selector: "[ngTabList]",
|
|
@@ -251,7 +197,7 @@ class TabList {
|
|
|
251
197
|
}
|
|
252
198
|
i0.ɵɵngDeclareClassMetadata({
|
|
253
199
|
minVersion: "12.0.0",
|
|
254
|
-
version: "21.0.
|
|
200
|
+
version: "21.0.3",
|
|
255
201
|
ngImport: i0,
|
|
256
202
|
type: TabList,
|
|
257
203
|
decorators: [{
|
|
@@ -334,65 +280,51 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
334
280
|
}]
|
|
335
281
|
}
|
|
336
282
|
});
|
|
337
|
-
|
|
283
|
+
|
|
284
|
+
class TabPanel {
|
|
338
285
|
_elementRef = inject(ElementRef);
|
|
339
286
|
element = this._elementRef.nativeElement;
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
id = input(inject(_IdGenerator).getId('ng-
|
|
287
|
+
_deferredContentAware = inject(DeferredContentAware);
|
|
288
|
+
_tabs = inject(TABS);
|
|
289
|
+
id = input(inject(_IdGenerator).getId('ng-tabpanel-', true), ...(ngDevMode ? [{
|
|
343
290
|
debugName: "id"
|
|
344
291
|
}] : []));
|
|
345
|
-
|
|
346
|
-
debugName: "
|
|
347
|
-
}] : []));
|
|
348
|
-
_tabpanelPattern = computed(() => this._tabs._unorderedTabpanelPatterns().find(tabpanel => tabpanel.value() === this.value()), ...(ngDevMode ? [{
|
|
349
|
-
debugName: "_tabpanelPattern"
|
|
292
|
+
_tabPattern = computed(() => this._tabs._tabPatterns()?.find(tab => tab.value() === this.value()), ...(ngDevMode ? [{
|
|
293
|
+
debugName: "_tabPattern"
|
|
350
294
|
}] : []));
|
|
351
|
-
disabled = input(false, ...(ngDevMode ? [{
|
|
352
|
-
debugName: "disabled",
|
|
353
|
-
transform: booleanAttribute
|
|
354
|
-
}] : [{
|
|
355
|
-
transform: booleanAttribute
|
|
356
|
-
}]));
|
|
357
295
|
value = input.required(...(ngDevMode ? [{
|
|
358
296
|
debugName: "value"
|
|
359
297
|
}] : []));
|
|
360
|
-
|
|
361
|
-
debugName: "
|
|
362
|
-
}] : []));
|
|
363
|
-
selected = computed(() => this._pattern.selected(), ...(ngDevMode ? [{
|
|
364
|
-
debugName: "selected"
|
|
298
|
+
visible = computed(() => !this._pattern.hidden(), ...(ngDevMode ? [{
|
|
299
|
+
debugName: "visible"
|
|
365
300
|
}] : []));
|
|
366
|
-
_pattern = new
|
|
301
|
+
_pattern = new TabPanelPattern({
|
|
367
302
|
...this,
|
|
368
|
-
|
|
369
|
-
tabpanel: this._tabpanelPattern,
|
|
370
|
-
expanded: signal(false),
|
|
371
|
-
element: () => this.element
|
|
303
|
+
tab: this._tabPattern
|
|
372
304
|
});
|
|
373
|
-
|
|
374
|
-
this.
|
|
305
|
+
constructor() {
|
|
306
|
+
afterRenderEffect(() => this._deferredContentAware.contentVisible.set(this.visible()));
|
|
375
307
|
}
|
|
376
308
|
ngOnInit() {
|
|
377
|
-
this.
|
|
309
|
+
this._tabs._register(this);
|
|
378
310
|
}
|
|
379
311
|
ngOnDestroy() {
|
|
380
|
-
this.
|
|
312
|
+
this._tabs._unregister(this);
|
|
381
313
|
}
|
|
382
314
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
383
315
|
minVersion: "12.0.0",
|
|
384
|
-
version: "21.0.
|
|
316
|
+
version: "21.0.3",
|
|
385
317
|
ngImport: i0,
|
|
386
|
-
type:
|
|
318
|
+
type: TabPanel,
|
|
387
319
|
deps: [],
|
|
388
320
|
target: i0.ɵɵFactoryTarget.Directive
|
|
389
321
|
});
|
|
390
322
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
391
323
|
minVersion: "17.1.0",
|
|
392
|
-
version: "21.0.
|
|
393
|
-
type:
|
|
324
|
+
version: "21.0.3",
|
|
325
|
+
type: TabPanel,
|
|
394
326
|
isStandalone: true,
|
|
395
|
-
selector: "[
|
|
327
|
+
selector: "[ngTabPanel]",
|
|
396
328
|
inputs: {
|
|
397
329
|
id: {
|
|
398
330
|
classPropertyName: "id",
|
|
@@ -401,13 +333,6 @@ class Tab {
|
|
|
401
333
|
isRequired: false,
|
|
402
334
|
transformFunction: null
|
|
403
335
|
},
|
|
404
|
-
disabled: {
|
|
405
|
-
classPropertyName: "disabled",
|
|
406
|
-
publicName: "disabled",
|
|
407
|
-
isSignal: true,
|
|
408
|
-
isRequired: false,
|
|
409
|
-
transformFunction: null
|
|
410
|
-
},
|
|
411
336
|
value: {
|
|
412
337
|
classPropertyName: "value",
|
|
413
338
|
publicName: "value",
|
|
@@ -418,42 +343,47 @@ class Tab {
|
|
|
418
343
|
},
|
|
419
344
|
host: {
|
|
420
345
|
attributes: {
|
|
421
|
-
"role": "
|
|
346
|
+
"role": "tabpanel"
|
|
422
347
|
},
|
|
423
348
|
properties: {
|
|
424
|
-
"attr.data-active": "active()",
|
|
425
349
|
"attr.id": "_pattern.id()",
|
|
426
350
|
"attr.tabindex": "_pattern.tabIndex()",
|
|
427
|
-
"attr.
|
|
428
|
-
"attr.aria-
|
|
429
|
-
"attr.aria-controls": "_pattern.controls()"
|
|
351
|
+
"attr.inert": "!visible() ? true : null",
|
|
352
|
+
"attr.aria-labelledby": "_pattern.labelledBy()"
|
|
430
353
|
}
|
|
431
354
|
},
|
|
432
|
-
exportAs: ["
|
|
355
|
+
exportAs: ["ngTabPanel"],
|
|
356
|
+
hostDirectives: [{
|
|
357
|
+
directive: DeferredContentAware,
|
|
358
|
+
inputs: ["preserveContent", "preserveContent"]
|
|
359
|
+
}],
|
|
433
360
|
ngImport: i0
|
|
434
361
|
});
|
|
435
362
|
}
|
|
436
363
|
i0.ɵɵngDeclareClassMetadata({
|
|
437
364
|
minVersion: "12.0.0",
|
|
438
|
-
version: "21.0.
|
|
365
|
+
version: "21.0.3",
|
|
439
366
|
ngImport: i0,
|
|
440
|
-
type:
|
|
367
|
+
type: TabPanel,
|
|
441
368
|
decorators: [{
|
|
442
369
|
type: Directive,
|
|
443
370
|
args: [{
|
|
444
|
-
selector: '[
|
|
445
|
-
exportAs: '
|
|
371
|
+
selector: '[ngTabPanel]',
|
|
372
|
+
exportAs: 'ngTabPanel',
|
|
446
373
|
host: {
|
|
447
|
-
'role': '
|
|
448
|
-
'[attr.data-active]': 'active()',
|
|
374
|
+
'role': 'tabpanel',
|
|
449
375
|
'[attr.id]': '_pattern.id()',
|
|
450
376
|
'[attr.tabindex]': '_pattern.tabIndex()',
|
|
451
|
-
'[attr.
|
|
452
|
-
'[attr.aria-
|
|
453
|
-
|
|
454
|
-
|
|
377
|
+
'[attr.inert]': '!visible() ? true : null',
|
|
378
|
+
'[attr.aria-labelledby]': '_pattern.labelledBy()'
|
|
379
|
+
},
|
|
380
|
+
hostDirectives: [{
|
|
381
|
+
directive: DeferredContentAware,
|
|
382
|
+
inputs: ['preserveContent']
|
|
383
|
+
}]
|
|
455
384
|
}]
|
|
456
385
|
}],
|
|
386
|
+
ctorParameters: () => [],
|
|
457
387
|
propDecorators: {
|
|
458
388
|
id: [{
|
|
459
389
|
type: i0.Input,
|
|
@@ -463,14 +393,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
463
393
|
required: false
|
|
464
394
|
}]
|
|
465
395
|
}],
|
|
466
|
-
disabled: [{
|
|
467
|
-
type: i0.Input,
|
|
468
|
-
args: [{
|
|
469
|
-
isSignal: true,
|
|
470
|
-
alias: "disabled",
|
|
471
|
-
required: false
|
|
472
|
-
}]
|
|
473
|
-
}],
|
|
474
396
|
value: [{
|
|
475
397
|
type: i0.Input,
|
|
476
398
|
args: [{
|
|
@@ -481,50 +403,139 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
481
403
|
}]
|
|
482
404
|
}
|
|
483
405
|
});
|
|
484
|
-
|
|
406
|
+
|
|
407
|
+
class Tabs {
|
|
485
408
|
_elementRef = inject(ElementRef);
|
|
486
409
|
element = this._elementRef.nativeElement;
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
410
|
+
_tablist = signal(undefined, ...(ngDevMode ? [{
|
|
411
|
+
debugName: "_tablist"
|
|
412
|
+
}] : []));
|
|
413
|
+
_unorderedPanels = signal(new Set(), ...(ngDevMode ? [{
|
|
414
|
+
debugName: "_unorderedPanels"
|
|
415
|
+
}] : []));
|
|
416
|
+
_tabPatterns = computed(() => this._tablist()?._tabPatterns(), ...(ngDevMode ? [{
|
|
417
|
+
debugName: "_tabPatterns"
|
|
418
|
+
}] : []));
|
|
419
|
+
_unorderedTabpanelPatterns = computed(() => [...this._unorderedPanels()].map(tabpanel => tabpanel._pattern), ...(ngDevMode ? [{
|
|
420
|
+
debugName: "_unorderedTabpanelPatterns"
|
|
421
|
+
}] : []));
|
|
422
|
+
_register(child) {
|
|
423
|
+
if (child instanceof TabList) {
|
|
424
|
+
this._tablist.set(child);
|
|
425
|
+
}
|
|
426
|
+
if (child instanceof TabPanel) {
|
|
427
|
+
this._unorderedPanels().add(child);
|
|
428
|
+
this._unorderedPanels.set(new Set(this._unorderedPanels()));
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
_unregister(child) {
|
|
432
|
+
if (child instanceof TabList) {
|
|
433
|
+
this._tablist.set(undefined);
|
|
434
|
+
}
|
|
435
|
+
if (child instanceof TabPanel) {
|
|
436
|
+
this._unorderedPanels().delete(child);
|
|
437
|
+
this._unorderedPanels.set(new Set(this._unorderedPanels()));
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
441
|
+
minVersion: "12.0.0",
|
|
442
|
+
version: "21.0.3",
|
|
443
|
+
ngImport: i0,
|
|
444
|
+
type: Tabs,
|
|
445
|
+
deps: [],
|
|
446
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
447
|
+
});
|
|
448
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
449
|
+
minVersion: "14.0.0",
|
|
450
|
+
version: "21.0.3",
|
|
451
|
+
type: Tabs,
|
|
452
|
+
isStandalone: true,
|
|
453
|
+
selector: "[ngTabs]",
|
|
454
|
+
providers: [{
|
|
455
|
+
provide: TABS,
|
|
456
|
+
useExisting: Tabs
|
|
457
|
+
}],
|
|
458
|
+
exportAs: ["ngTabs"],
|
|
459
|
+
ngImport: i0
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
463
|
+
minVersion: "12.0.0",
|
|
464
|
+
version: "21.0.3",
|
|
465
|
+
ngImport: i0,
|
|
466
|
+
type: Tabs,
|
|
467
|
+
decorators: [{
|
|
468
|
+
type: Directive,
|
|
469
|
+
args: [{
|
|
470
|
+
selector: '[ngTabs]',
|
|
471
|
+
exportAs: 'ngTabs',
|
|
472
|
+
providers: [{
|
|
473
|
+
provide: TABS,
|
|
474
|
+
useExisting: Tabs
|
|
475
|
+
}]
|
|
476
|
+
}]
|
|
477
|
+
}]
|
|
478
|
+
});
|
|
479
|
+
|
|
480
|
+
class Tab {
|
|
481
|
+
_elementRef = inject(ElementRef);
|
|
482
|
+
element = this._elementRef.nativeElement;
|
|
483
|
+
_tabs = inject(TABS);
|
|
484
|
+
_tabList = inject(TabList);
|
|
485
|
+
id = input(inject(_IdGenerator).getId('ng-tab-', true), ...(ngDevMode ? [{
|
|
490
486
|
debugName: "id"
|
|
491
487
|
}] : []));
|
|
492
|
-
|
|
493
|
-
debugName: "
|
|
488
|
+
_tablistPattern = computed(() => this._tabList._pattern, ...(ngDevMode ? [{
|
|
489
|
+
debugName: "_tablistPattern"
|
|
490
|
+
}] : []));
|
|
491
|
+
_tabpanelPattern = computed(() => this._tabs._unorderedTabpanelPatterns().find(tabpanel => tabpanel.value() === this.value()), ...(ngDevMode ? [{
|
|
492
|
+
debugName: "_tabpanelPattern"
|
|
494
493
|
}] : []));
|
|
494
|
+
disabled = input(false, {
|
|
495
|
+
...(ngDevMode ? {
|
|
496
|
+
debugName: "disabled"
|
|
497
|
+
} : {}),
|
|
498
|
+
transform: booleanAttribute
|
|
499
|
+
});
|
|
495
500
|
value = input.required(...(ngDevMode ? [{
|
|
496
501
|
debugName: "value"
|
|
497
502
|
}] : []));
|
|
498
|
-
|
|
499
|
-
debugName: "
|
|
503
|
+
active = computed(() => this._pattern.active(), ...(ngDevMode ? [{
|
|
504
|
+
debugName: "active"
|
|
500
505
|
}] : []));
|
|
501
|
-
|
|
506
|
+
selected = computed(() => this._pattern.selected(), ...(ngDevMode ? [{
|
|
507
|
+
debugName: "selected"
|
|
508
|
+
}] : []));
|
|
509
|
+
_pattern = new TabPattern({
|
|
502
510
|
...this,
|
|
503
|
-
|
|
511
|
+
tablist: this._tablistPattern,
|
|
512
|
+
tabpanel: this._tabpanelPattern,
|
|
513
|
+
expanded: signal(false),
|
|
514
|
+
element: () => this.element
|
|
504
515
|
});
|
|
505
|
-
|
|
506
|
-
|
|
516
|
+
open() {
|
|
517
|
+
this._pattern.open();
|
|
507
518
|
}
|
|
508
519
|
ngOnInit() {
|
|
509
|
-
this.
|
|
520
|
+
this._tabList._register(this);
|
|
510
521
|
}
|
|
511
522
|
ngOnDestroy() {
|
|
512
|
-
this.
|
|
523
|
+
this._tabList._unregister(this);
|
|
513
524
|
}
|
|
514
525
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
515
526
|
minVersion: "12.0.0",
|
|
516
|
-
version: "21.0.
|
|
527
|
+
version: "21.0.3",
|
|
517
528
|
ngImport: i0,
|
|
518
|
-
type:
|
|
529
|
+
type: Tab,
|
|
519
530
|
deps: [],
|
|
520
531
|
target: i0.ɵɵFactoryTarget.Directive
|
|
521
532
|
});
|
|
522
533
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
523
534
|
minVersion: "17.1.0",
|
|
524
|
-
version: "21.0.
|
|
525
|
-
type:
|
|
535
|
+
version: "21.0.3",
|
|
536
|
+
type: Tab,
|
|
526
537
|
isStandalone: true,
|
|
527
|
-
selector: "[
|
|
538
|
+
selector: "[ngTab]",
|
|
528
539
|
inputs: {
|
|
529
540
|
id: {
|
|
530
541
|
classPropertyName: "id",
|
|
@@ -533,6 +544,13 @@ class TabPanel {
|
|
|
533
544
|
isRequired: false,
|
|
534
545
|
transformFunction: null
|
|
535
546
|
},
|
|
547
|
+
disabled: {
|
|
548
|
+
classPropertyName: "disabled",
|
|
549
|
+
publicName: "disabled",
|
|
550
|
+
isSignal: true,
|
|
551
|
+
isRequired: false,
|
|
552
|
+
transformFunction: null
|
|
553
|
+
},
|
|
536
554
|
value: {
|
|
537
555
|
classPropertyName: "value",
|
|
538
556
|
publicName: "value",
|
|
@@ -543,47 +561,42 @@ class TabPanel {
|
|
|
543
561
|
},
|
|
544
562
|
host: {
|
|
545
563
|
attributes: {
|
|
546
|
-
"role": "
|
|
564
|
+
"role": "tab"
|
|
547
565
|
},
|
|
548
566
|
properties: {
|
|
567
|
+
"attr.data-active": "active()",
|
|
549
568
|
"attr.id": "_pattern.id()",
|
|
550
569
|
"attr.tabindex": "_pattern.tabIndex()",
|
|
551
|
-
"attr.
|
|
552
|
-
"attr.aria-
|
|
570
|
+
"attr.aria-selected": "selected()",
|
|
571
|
+
"attr.aria-disabled": "_pattern.disabled()",
|
|
572
|
+
"attr.aria-controls": "_pattern.controls()"
|
|
553
573
|
}
|
|
554
574
|
},
|
|
555
|
-
exportAs: ["
|
|
556
|
-
hostDirectives: [{
|
|
557
|
-
directive: i1.DeferredContentAware,
|
|
558
|
-
inputs: ["preserveContent", "preserveContent"]
|
|
559
|
-
}],
|
|
575
|
+
exportAs: ["ngTab"],
|
|
560
576
|
ngImport: i0
|
|
561
577
|
});
|
|
562
578
|
}
|
|
563
579
|
i0.ɵɵngDeclareClassMetadata({
|
|
564
580
|
minVersion: "12.0.0",
|
|
565
|
-
version: "21.0.
|
|
581
|
+
version: "21.0.3",
|
|
566
582
|
ngImport: i0,
|
|
567
|
-
type:
|
|
583
|
+
type: Tab,
|
|
568
584
|
decorators: [{
|
|
569
585
|
type: Directive,
|
|
570
586
|
args: [{
|
|
571
|
-
selector: '[
|
|
572
|
-
exportAs: '
|
|
587
|
+
selector: '[ngTab]',
|
|
588
|
+
exportAs: 'ngTab',
|
|
573
589
|
host: {
|
|
574
|
-
'role': '
|
|
590
|
+
'role': 'tab',
|
|
591
|
+
'[attr.data-active]': 'active()',
|
|
575
592
|
'[attr.id]': '_pattern.id()',
|
|
576
593
|
'[attr.tabindex]': '_pattern.tabIndex()',
|
|
577
|
-
'[attr.
|
|
578
|
-
'[attr.aria-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
directive: DeferredContentAware,
|
|
582
|
-
inputs: ['preserveContent']
|
|
583
|
-
}]
|
|
594
|
+
'[attr.aria-selected]': 'selected()',
|
|
595
|
+
'[attr.aria-disabled]': '_pattern.disabled()',
|
|
596
|
+
'[attr.aria-controls]': '_pattern.controls()'
|
|
597
|
+
}
|
|
584
598
|
}]
|
|
585
599
|
}],
|
|
586
|
-
ctorParameters: () => [],
|
|
587
600
|
propDecorators: {
|
|
588
601
|
id: [{
|
|
589
602
|
type: i0.Input,
|
|
@@ -593,6 +606,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
593
606
|
required: false
|
|
594
607
|
}]
|
|
595
608
|
}],
|
|
609
|
+
disabled: [{
|
|
610
|
+
type: i0.Input,
|
|
611
|
+
args: [{
|
|
612
|
+
isSignal: true,
|
|
613
|
+
alias: "disabled",
|
|
614
|
+
required: false
|
|
615
|
+
}]
|
|
616
|
+
}],
|
|
596
617
|
value: [{
|
|
597
618
|
type: i0.Input,
|
|
598
619
|
args: [{
|
|
@@ -603,10 +624,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
603
624
|
}]
|
|
604
625
|
}
|
|
605
626
|
});
|
|
627
|
+
|
|
606
628
|
class TabContent {
|
|
607
629
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
608
630
|
minVersion: "12.0.0",
|
|
609
|
-
version: "21.0.
|
|
631
|
+
version: "21.0.3",
|
|
610
632
|
ngImport: i0,
|
|
611
633
|
type: TabContent,
|
|
612
634
|
deps: [],
|
|
@@ -614,20 +636,20 @@ class TabContent {
|
|
|
614
636
|
});
|
|
615
637
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
616
638
|
minVersion: "14.0.0",
|
|
617
|
-
version: "21.0.
|
|
639
|
+
version: "21.0.3",
|
|
618
640
|
type: TabContent,
|
|
619
641
|
isStandalone: true,
|
|
620
642
|
selector: "ng-template[ngTabContent]",
|
|
621
643
|
exportAs: ["ngTabContent"],
|
|
622
644
|
hostDirectives: [{
|
|
623
|
-
directive:
|
|
645
|
+
directive: DeferredContent
|
|
624
646
|
}],
|
|
625
647
|
ngImport: i0
|
|
626
648
|
});
|
|
627
649
|
}
|
|
628
650
|
i0.ɵɵngDeclareClassMetadata({
|
|
629
651
|
minVersion: "12.0.0",
|
|
630
|
-
version: "21.0.
|
|
652
|
+
version: "21.0.3",
|
|
631
653
|
ngImport: i0,
|
|
632
654
|
type: TabContent,
|
|
633
655
|
decorators: [{
|
|
@@ -640,5 +662,5 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
640
662
|
}]
|
|
641
663
|
});
|
|
642
664
|
|
|
643
|
-
export { Tab, TabContent, TabList, TabPanel, Tabs };
|
|
665
|
+
export { Tab, TabContent, TabList, TabPanel, Tabs, DeferredContent as ɵɵDeferredContent, DeferredContentAware as ɵɵDeferredContentAware };
|
|
644
666
|
//# sourceMappingURL=tabs.mjs.map
|