@tociva/tailng-cdk 0.6.0 → 0.10.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/README.md +4 -4
- package/fesm2022/tociva-tailng-cdk-a11y.mjs +22 -0
- package/fesm2022/tociva-tailng-cdk-a11y.mjs.map +1 -0
- package/fesm2022/tociva-tailng-cdk-keyboard.mjs +22 -0
- package/fesm2022/tociva-tailng-cdk-keyboard.mjs.map +1 -0
- package/fesm2022/tociva-tailng-cdk-scroll.mjs +22 -0
- package/fesm2022/tociva-tailng-cdk-scroll.mjs.map +1 -0
- package/fesm2022/tociva-tailng-cdk-util.mjs +22 -0
- package/fesm2022/tociva-tailng-cdk-util.mjs.map +1 -0
- package/fesm2022/tociva-tailng-cdk.mjs +1 -5
- package/fesm2022/tociva-tailng-cdk.mjs.map +1 -1
- package/package.json +17 -1
- package/types/tociva-tailng-cdk-a11y.d.ts +43 -0
- package/types/tociva-tailng-cdk-a11y.d.ts.map +1 -0
- package/types/tociva-tailng-cdk-keyboard.d.ts +21 -0
- package/types/tociva-tailng-cdk-keyboard.d.ts.map +1 -0
- package/types/tociva-tailng-cdk-scroll.d.ts +11 -0
- package/types/tociva-tailng-cdk-scroll.d.ts.map +1 -0
- package/types/tociva-tailng-cdk-util.d.ts +11 -0
- package/types/tociva-tailng-cdk-util.d.ts.map +1 -0
- package/types/tociva-tailng-cdk.d.ts +7 -73
- package/types/tociva-tailng-cdk.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -32,12 +32,12 @@ Manage focus trapping in modals, dialogs, and overlays:
|
|
|
32
32
|
|
|
33
33
|
```typescript
|
|
34
34
|
import { Component } from '@angular/core';
|
|
35
|
-
import {
|
|
35
|
+
import { TngFocusTrap } from '@tociva/tailng-cdk';
|
|
36
36
|
|
|
37
37
|
@Component({
|
|
38
38
|
selector: 'app-modal',
|
|
39
39
|
standalone: true,
|
|
40
|
-
imports: [
|
|
40
|
+
imports: [TngFocusTrap],
|
|
41
41
|
template: `
|
|
42
42
|
<div tngFocusTrap>
|
|
43
43
|
<h2>Modal Content</h2>
|
|
@@ -97,11 +97,11 @@ scrollActiveIntoView({
|
|
|
97
97
|
|
|
98
98
|
### Directives
|
|
99
99
|
|
|
100
|
-
- **`
|
|
100
|
+
- **`TngFocusTrap`**: Standalone directive for trapping focus within an element
|
|
101
101
|
|
|
102
102
|
### Utilities
|
|
103
103
|
|
|
104
|
-
- **`
|
|
104
|
+
- **`createTngFocusTrap`**: Create a focus trap instance
|
|
105
105
|
- **`keyboardNavigation`**: Keyboard navigation state management
|
|
106
106
|
- **`scrollActiveIntoView`**: Scroll an element into view
|
|
107
107
|
- **`OptionTplContext`**: Type for option template context
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports$1) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./lib"), exports);
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Generated bundle index. Do not edit.
|
|
21
|
+
*/
|
|
22
|
+
//# sourceMappingURL=tociva-tailng-cdk-a11y.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tociva-tailng-cdk-a11y.mjs","sources":["../../../../libs/cdk/a11y/src/public-api.ts","../../../../libs/cdk/a11y/src/tociva-tailng-cdk-a11y.ts"],"sourcesContent":["export * from './lib';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,YAAA,CAAA,OAAA,CAAA,OAAA,CAAA,EAAA,OAAA,CAAA;;ACAA;;AAEG"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports$1) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./lib"), exports);
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Generated bundle index. Do not edit.
|
|
21
|
+
*/
|
|
22
|
+
//# sourceMappingURL=tociva-tailng-cdk-keyboard.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tociva-tailng-cdk-keyboard.mjs","sources":["../../../../libs/cdk/keyboard/src/public-api.ts","../../../../libs/cdk/keyboard/src/tociva-tailng-cdk-keyboard.ts"],"sourcesContent":["export * from './lib';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,YAAA,CAAA,OAAA,CAAA,OAAA,CAAA,EAAA,OAAA,CAAA;;ACAA;;AAEG"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports$1) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./lib"), exports);
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Generated bundle index. Do not edit.
|
|
21
|
+
*/
|
|
22
|
+
//# sourceMappingURL=tociva-tailng-cdk-scroll.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tociva-tailng-cdk-scroll.mjs","sources":["../../../../libs/cdk/scroll/src/public-api.ts","../../../../libs/cdk/scroll/src/tociva-tailng-cdk-scroll.ts"],"sourcesContent":["export * from './lib'","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,YAAA,CAAA,OAAA,CAAA,OAAA,CAAA,EAAA,OAAA,CAAA;;ACAA;;AAEG"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports$1) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./lib"), exports);
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Generated bundle index. Do not edit.
|
|
21
|
+
*/
|
|
22
|
+
//# sourceMappingURL=tociva-tailng-cdk-util.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tociva-tailng-cdk-util.mjs","sources":["../../../../libs/cdk/util/src/public-api.ts","../../../../libs/cdk/util/src/tociva-tailng-cdk-util.ts"],"sourcesContent":["export * from './lib'","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,YAAA,CAAA,OAAA,CAAA,OAAA,CAAA,EAAA,OAAA,CAAA;;ACAA;;AAEG"}
|
|
@@ -14,11 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports$1) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./util/option-list.util"), exports);
|
|
19
|
-
__exportStar(require("./a11y"), exports);
|
|
20
|
-
__exportStar(require("./keyboard"), exports);
|
|
21
|
-
__exportStar(require("./scroll"), exports);
|
|
17
|
+
__exportStar(require("./info/info.component"), exports);
|
|
22
18
|
|
|
23
19
|
/**
|
|
24
20
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tociva-tailng-cdk.mjs","sources":["../../../../libs/cdk/src/public-api.ts","../../../../libs/cdk/src/tociva-tailng-cdk.ts"],"sourcesContent":["export * from './
|
|
1
|
+
{"version":3,"file":"tociva-tailng-cdk.mjs","sources":["../../../../libs/cdk/src/public-api.ts","../../../../libs/cdk/src/tociva-tailng-cdk.ts"],"sourcesContent":["export * from './info/info.component';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA,CAAA;;ACAA;;AAEG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tociva/tailng-cdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Headless Angular utilities and primitives for Tailng",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -35,6 +35,22 @@
|
|
|
35
35
|
".": {
|
|
36
36
|
"types": "./types/tociva-tailng-cdk.d.ts",
|
|
37
37
|
"default": "./fesm2022/tociva-tailng-cdk.mjs"
|
|
38
|
+
},
|
|
39
|
+
"./a11y": {
|
|
40
|
+
"types": "./types/tociva-tailng-cdk-a11y.d.ts",
|
|
41
|
+
"default": "./fesm2022/tociva-tailng-cdk-a11y.mjs"
|
|
42
|
+
},
|
|
43
|
+
"./keyboard": {
|
|
44
|
+
"types": "./types/tociva-tailng-cdk-keyboard.d.ts",
|
|
45
|
+
"default": "./fesm2022/tociva-tailng-cdk-keyboard.mjs"
|
|
46
|
+
},
|
|
47
|
+
"./scroll": {
|
|
48
|
+
"types": "./types/tociva-tailng-cdk-scroll.d.ts",
|
|
49
|
+
"default": "./fesm2022/tociva-tailng-cdk-scroll.mjs"
|
|
50
|
+
},
|
|
51
|
+
"./util": {
|
|
52
|
+
"types": "./types/tociva-tailng-cdk-util.d.ts",
|
|
53
|
+
"default": "./fesm2022/tociva-tailng-cdk-util.mjs"
|
|
38
54
|
}
|
|
39
55
|
}
|
|
40
56
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { FocusTrap, FocusTrapFactory } from '@angular/cdk/a11y';
|
|
2
|
+
import * as _angular_core from '@angular/core';
|
|
3
|
+
import { OnDestroy } from '@angular/core';
|
|
4
|
+
|
|
5
|
+
type TngFocusTrapOptions = {
|
|
6
|
+
/** CDK 21 signature uses this boolean */
|
|
7
|
+
deferCaptureElements?: boolean;
|
|
8
|
+
/** tailng behavior */
|
|
9
|
+
autoCapture?: boolean;
|
|
10
|
+
/** tailng behavior */
|
|
11
|
+
restoreFocus?: boolean;
|
|
12
|
+
};
|
|
13
|
+
type TngFocusTrapHandle = {
|
|
14
|
+
trap: FocusTrap;
|
|
15
|
+
activate: () => void;
|
|
16
|
+
destroy: () => void;
|
|
17
|
+
};
|
|
18
|
+
declare const createTngFocusTrap: (factory: FocusTrapFactory, element: HTMLElement, options?: TngFocusTrapOptions) => TngFocusTrapHandle;
|
|
19
|
+
|
|
20
|
+
declare class TngFocusTrap implements OnDestroy {
|
|
21
|
+
/** Enable / disable focus trapping */
|
|
22
|
+
readonly tngFocusTrap: _angular_core.InputSignal<boolean>;
|
|
23
|
+
/** CDK 21: FocusTrapFactory.create(element, deferCaptureElements?: boolean) */
|
|
24
|
+
readonly deferCaptureElements: _angular_core.InputSignal<boolean>;
|
|
25
|
+
/** tailng behavior */
|
|
26
|
+
readonly autoCapture: _angular_core.InputSignal<boolean>;
|
|
27
|
+
/** tailng behavior */
|
|
28
|
+
readonly restoreFocus: _angular_core.InputSignal<boolean>;
|
|
29
|
+
private readonly host;
|
|
30
|
+
private readonly injector;
|
|
31
|
+
private readonly focusTrapFactory;
|
|
32
|
+
private handle;
|
|
33
|
+
constructor();
|
|
34
|
+
private enable;
|
|
35
|
+
private disable;
|
|
36
|
+
ngOnDestroy(): void;
|
|
37
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TngFocusTrap, never>;
|
|
38
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TngFocusTrap, "[tngFocusTrap]", never, { "tngFocusTrap": { "alias": "tngFocusTrap"; "required": false; "isSignal": true; }; "deferCaptureElements": { "alias": "deferCaptureElements"; "required": false; "isSignal": true; }; "autoCapture": { "alias": "autoCapture"; "required": false; "isSignal": true; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { TngFocusTrap, createTngFocusTrap };
|
|
42
|
+
export type { TngFocusTrapHandle, TngFocusTrapOptions };
|
|
43
|
+
//# sourceMappingURL=tociva-tailng-cdk-a11y.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tociva-tailng-cdk-a11y.d.ts","sources":["../../../../libs/cdk/a11y/src/lib/focus-trap/focus-trap.util.ts","../../../../libs/cdk/a11y/src/lib/focus-trap/focus-trap.directive.ts"],"sourcesContent":[null,null],"names":[],"mappings":";;;;AAEM,KAAA,mBAAA;;;;;;;;AAWA,KAAA,kBAAA;;;;;AAMN,cAAA,kBAAA,YAAA,gBAAA,WAAA,WAAA,YAAA,mBAAA,KAAA,kBAAA;;ACFA,cAAA,YAAA,YAAA,SAAA;;2BAMuB,aAAA,CAAA,WAAA;;mCAGQ,aAAA,CAAA,WAAA;;0BAGT,aAAA,CAAA,WAAA;;2BAGC,aAAA,CAAA,WAAA;AAErB;AACA;AAGA;;;AAoBA;AAgBA;AAKA;;;AAGD;;;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type KeyboardAction = {
|
|
2
|
+
type: 'move';
|
|
3
|
+
index: number;
|
|
4
|
+
} | {
|
|
5
|
+
type: 'select';
|
|
6
|
+
index: number;
|
|
7
|
+
} | {
|
|
8
|
+
type: 'close';
|
|
9
|
+
} | {
|
|
10
|
+
type: 'noop';
|
|
11
|
+
};
|
|
12
|
+
interface KeyboardNavigationState {
|
|
13
|
+
activeIndex: number;
|
|
14
|
+
itemCount: number;
|
|
15
|
+
loop?: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare function handleListKeyboardEvent(event: KeyboardEvent, state: KeyboardNavigationState): KeyboardAction;
|
|
18
|
+
|
|
19
|
+
export { handleListKeyboardEvent };
|
|
20
|
+
export type { KeyboardAction, KeyboardNavigationState };
|
|
21
|
+
//# sourceMappingURL=tociva-tailng-cdk-keyboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tociva-tailng-cdk-keyboard.d.ts","sources":["../../../../libs/cdk/keyboard/src/lib/keyboard-navigation.ts"],"sourcesContent":[null],"names":[],"mappings":"AACM,KAAA,cAAA;;;;;;;;;;;;;;;AAUL;AAED,iBAAA,uBAAA,QAAA,aAAA,SAAA,uBAAA,GAAA,cAAA;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface ScrollActiveIntoViewOptions {
|
|
2
|
+
container: HTMLElement | null | undefined;
|
|
3
|
+
activeIndex: number;
|
|
4
|
+
itemSelector?: string;
|
|
5
|
+
behavior?: ScrollBehavior;
|
|
6
|
+
}
|
|
7
|
+
declare function scrollActiveIntoView({ container, activeIndex, itemSelector, behavior, }: ScrollActiveIntoViewOptions): void;
|
|
8
|
+
|
|
9
|
+
export { scrollActiveIntoView };
|
|
10
|
+
export type { ScrollActiveIntoViewOptions };
|
|
11
|
+
//# sourceMappingURL=tociva-tailng-cdk-scroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tociva-tailng-cdk-scroll.d.ts","sources":["../../../../libs/cdk/scroll/src/lib/scroll-active-into-view.ts"],"sourcesContent":[null],"names":[],"mappings":";AACE,eAAA,WAAA;;;;AAID;AAED,iBAAA,oBAAA,sDAAA,2BAAA;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const coerceBoolean: (value: unknown) => boolean;
|
|
2
|
+
|
|
3
|
+
type OptionTplContext<T> = {
|
|
4
|
+
$implicit: T;
|
|
5
|
+
index: number;
|
|
6
|
+
active: boolean;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export { coerceBoolean };
|
|
10
|
+
export type { OptionTplContext };
|
|
11
|
+
//# sourceMappingURL=tociva-tailng-cdk-util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tociva-tailng-cdk-util.d.ts","sources":["../../../../libs/cdk/util/src/lib/coerce.ts","../../../../libs/cdk/util/src/lib/option-list.util.ts"],"sourcesContent":[null,null],"names":[],"mappings":"AAAA,cAAA,aAAA;;ACAM,KAAA,gBAAA;;;;;;;;"}
|
|
@@ -1,77 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as _angular_core from '@angular/core';
|
|
3
|
-
import { OnDestroy } from '@angular/core';
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
4
2
|
|
|
5
|
-
declare
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
active: boolean;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
type TailngFocusTrapOptions = {
|
|
14
|
-
/** CDK 21 signature uses this boolean */
|
|
15
|
-
deferCaptureElements?: boolean;
|
|
16
|
-
/** tailng behavior */
|
|
17
|
-
autoCapture?: boolean;
|
|
18
|
-
/** tailng behavior */
|
|
19
|
-
restoreFocus?: boolean;
|
|
20
|
-
};
|
|
21
|
-
type TailngFocusTrapHandle = {
|
|
22
|
-
trap: FocusTrap;
|
|
23
|
-
activate: () => void;
|
|
24
|
-
destroy: () => void;
|
|
25
|
-
};
|
|
26
|
-
declare const createTailngFocusTrap: (factory: FocusTrapFactory, element: HTMLElement, options?: TailngFocusTrapOptions) => TailngFocusTrapHandle;
|
|
27
|
-
|
|
28
|
-
declare class TailngFocusTrapDirective implements OnDestroy {
|
|
29
|
-
/** Enable / disable focus trapping */
|
|
30
|
-
readonly tngFocusTrap: _angular_core.InputSignal<boolean>;
|
|
31
|
-
/** CDK 21: FocusTrapFactory.create(element, deferCaptureElements?: boolean) */
|
|
32
|
-
readonly deferCaptureElements: _angular_core.InputSignal<boolean>;
|
|
33
|
-
/** tailng behavior */
|
|
34
|
-
readonly autoCapture: _angular_core.InputSignal<boolean>;
|
|
35
|
-
/** tailng behavior */
|
|
36
|
-
readonly restoreFocus: _angular_core.InputSignal<boolean>;
|
|
37
|
-
private readonly host;
|
|
38
|
-
private readonly injector;
|
|
39
|
-
private readonly focusTrapFactory;
|
|
40
|
-
private handle;
|
|
41
|
-
constructor();
|
|
42
|
-
private enable;
|
|
43
|
-
private disable;
|
|
44
|
-
ngOnDestroy(): void;
|
|
45
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TailngFocusTrapDirective, never>;
|
|
46
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TailngFocusTrapDirective, "[tngFocusTrap]", never, { "tngFocusTrap": { "alias": "tngFocusTrap"; "required": false; "isSignal": true; }; "deferCaptureElements": { "alias": "deferCaptureElements"; "required": false; "isSignal": true; }; "autoCapture": { "alias": "autoCapture"; "required": false; "isSignal": true; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
type KeyboardAction = {
|
|
50
|
-
type: 'move';
|
|
51
|
-
index: number;
|
|
52
|
-
} | {
|
|
53
|
-
type: 'select';
|
|
54
|
-
index: number;
|
|
55
|
-
} | {
|
|
56
|
-
type: 'close';
|
|
57
|
-
} | {
|
|
58
|
-
type: 'noop';
|
|
59
|
-
};
|
|
60
|
-
interface KeyboardNavigationState {
|
|
61
|
-
activeIndex: number;
|
|
62
|
-
itemCount: number;
|
|
63
|
-
loop?: boolean;
|
|
64
|
-
}
|
|
65
|
-
declare function handleListKeyboardEvent(event: KeyboardEvent, state: KeyboardNavigationState): KeyboardAction;
|
|
66
|
-
|
|
67
|
-
interface ScrollActiveIntoViewOptions {
|
|
68
|
-
container: HTMLElement | null | undefined;
|
|
69
|
-
activeIndex: number;
|
|
70
|
-
itemSelector?: string;
|
|
71
|
-
behavior?: ScrollBehavior;
|
|
3
|
+
declare class TngInfo {
|
|
4
|
+
readonly docsUrl = "https://tailng.dev";
|
|
5
|
+
readonly githubUrl = "https://github.com/tociva/tailng";
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TngInfo, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TngInfo, "tng-info", never, {}, {}, never, never, true, never>;
|
|
72
8
|
}
|
|
73
|
-
declare function scrollActiveIntoView({ container, activeIndex, itemSelector, behavior, }: ScrollActiveIntoViewOptions): void;
|
|
74
9
|
|
|
75
|
-
export {
|
|
76
|
-
export type { KeyboardAction, KeyboardNavigationState, OptionTplContext, ScrollActiveIntoViewOptions, TailngFocusTrapHandle, TailngFocusTrapOptions };
|
|
10
|
+
export { TngInfo };
|
|
77
11
|
//# sourceMappingURL=tociva-tailng-cdk.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tociva-tailng-cdk.d.ts","sources":["../../../../libs/cdk/src/
|
|
1
|
+
{"version":3,"file":"tociva-tailng-cdk.d.ts","sources":["../../../../libs/cdk/src/info/info.component.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA,cAAA,OAAA;;;;;AAQC;;;;"}
|