@ngutil/floating 0.0.27 → 0.0.29
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/esm2022/floating/floating-ref.mjs +2 -1
- package/esm2022/floating/floating.service.mjs +14 -2
- package/esm2022/floating/traits/animation.mjs +55 -0
- package/esm2022/floating/traits/backdrop.mjs +78 -0
- package/esm2022/floating/traits/focus-trap.mjs +27 -0
- package/esm2022/floating/traits/index.mjs +9 -2
- package/esm2022/floating/traits/keystroke.mjs +19 -0
- package/esm2022/floating/traits/modal.mjs +24 -0
- package/esm2022/floating/traits/style.mjs +17 -0
- package/esm2022/floating.module.mjs +18 -0
- package/esm2022/index.mjs +2 -1
- package/esm2022/layer/layer.service.mjs +2 -3
- package/fesm2022/ngutil-floating.mjs +233 -8
- package/fesm2022/ngutil-floating.mjs.map +1 -1
- package/floating/floating.service.d.ts +3 -1
- package/floating/traits/animation.d.ts +18 -0
- package/floating/traits/backdrop.d.ts +20 -0
- package/floating/traits/focus-trap.d.ts +8 -0
- package/floating/traits/index.d.ts +8 -1
- package/floating/traits/keystroke.d.ts +8 -0
- package/floating/traits/modal.d.ts +4 -0
- package/floating/traits/style.d.ts +10 -0
- package/floating.module.d.ts +7 -0
- package/index.d.ts +1 -0
- package/layer/layer.service.d.ts +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import type { BackdropOptions } from "../../layer/backdrop-ref";
|
|
3
|
+
import { type FloatingRef } from "../floating-ref";
|
|
4
|
+
import { FloatingTrait } from "./_base";
|
|
5
|
+
export interface BackdropTraitOptions {
|
|
6
|
+
type: BackdropOptions["type"];
|
|
7
|
+
color: BackdropOptions["color"];
|
|
8
|
+
closeOnClick?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare class BackdropState {
|
|
11
|
+
onClick: Observable<void>;
|
|
12
|
+
}
|
|
13
|
+
export declare class BackdropTrait extends FloatingTrait<BackdropState> {
|
|
14
|
+
#private;
|
|
15
|
+
readonly options: BackdropTraitOptions;
|
|
16
|
+
name: string;
|
|
17
|
+
constructor(options: BackdropTraitOptions);
|
|
18
|
+
connect(floatingRef: FloatingRef<any>): Observable<BackdropState>;
|
|
19
|
+
}
|
|
20
|
+
export declare function backdrop(options: BackdropTraitOptions): BackdropTrait;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { FloatingRef } from "../floating-ref";
|
|
3
|
+
import { FloatingTrait } from "./_base";
|
|
4
|
+
export declare class FocusTrapTrait extends FloatingTrait<unknown> {
|
|
5
|
+
name: string;
|
|
6
|
+
connect(floatingRef: FloatingRef): Observable<unknown>;
|
|
7
|
+
}
|
|
8
|
+
export declare function focusTrap(): FocusTrapTrait;
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./_base";
|
|
2
|
+
export * from "./animation";
|
|
3
|
+
export * from "./backdrop";
|
|
4
|
+
export * from "./focus-trap";
|
|
5
|
+
export * from "./keystroke";
|
|
6
|
+
export * from "./modal";
|
|
2
7
|
export * from "./position-calc";
|
|
8
|
+
export * from "./position";
|
|
9
|
+
export * from "./style";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { FloatingRef } from "../floating-ref";
|
|
3
|
+
import { FloatingTrait } from "./_base";
|
|
4
|
+
export declare class KeystrokeTrait extends FloatingTrait<unknown> {
|
|
5
|
+
name: string;
|
|
6
|
+
connect(floatingRef: FloatingRef): Observable<unknown>;
|
|
7
|
+
}
|
|
8
|
+
export declare function keystroke(): KeystrokeTrait;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export interface ModalOptions {
|
|
2
|
+
closeOnBackdropClick?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function modal(options?: ModalOptions): (import("./animation").AnimationTrait | import("./position").PositionTrait | import("./backdrop").BackdropTrait | import("./focus-trap").FocusTrapTrait | import("./keystroke").KeystrokeTrait)[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { FloatingRef } from "../floating-ref";
|
|
3
|
+
import { FloatingTrait } from "./_base";
|
|
4
|
+
export declare class StyleTrait extends FloatingTrait<Partial<CSSStyleDeclaration>> {
|
|
5
|
+
readonly styles: Partial<CSSStyleDeclaration>;
|
|
6
|
+
name: string;
|
|
7
|
+
constructor(styles: Partial<CSSStyleDeclaration>);
|
|
8
|
+
connect(floatingRef: FloatingRef): Observable<Partial<CSSStyleDeclaration>>;
|
|
9
|
+
}
|
|
10
|
+
export declare function style(styles: Partial<CSSStyleDeclaration>): StyleTrait;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./layer/layer.service";
|
|
3
|
+
export declare class NuFloating {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NuFloating, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NuFloating, never, [typeof i1.RootLayer], [typeof i1.RootLayer]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NuFloating>;
|
|
7
|
+
}
|
package/index.d.ts
CHANGED
package/layer/layer.service.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare abstract class LayerService {
|
|
|
20
20
|
}
|
|
21
21
|
export declare class RootLayer extends LayerService {
|
|
22
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<RootLayer, never>;
|
|
23
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RootLayer, "body",
|
|
23
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RootLayer, "body", never, {}, {}, never, never, true, never>;
|
|
24
24
|
}
|
|
25
25
|
export declare class IndividualLayer extends LayerService {
|
|
26
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<IndividualLayer, never>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngutil/floating",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.29",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"tslib": "^2.6.2"
|
|
6
6
|
},
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"@angular/cdk": "^17.3.6",
|
|
9
9
|
"@angular/common": "^17.3.6",
|
|
10
10
|
"@angular/core": "^17.3.6",
|
|
11
|
-
"@ngutil/aria": "0.0.
|
|
12
|
-
"@ngutil/common": "0.0.
|
|
13
|
-
"@ngutil/style": "0.0.
|
|
11
|
+
"@ngutil/aria": "0.0.29",
|
|
12
|
+
"@ngutil/common": "0.0.29",
|
|
13
|
+
"@ngutil/style": "0.0.29"
|
|
14
14
|
},
|
|
15
15
|
"publishConfig": {
|
|
16
16
|
"access": "public",
|