@acorex/cdk 22.0.0-next.8 → 22.0.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/fesm2022/acorex-cdk-common.mjs +160 -23
- package/fesm2022/acorex-cdk-common.mjs.map +1 -1
- package/fesm2022/acorex-cdk-gesture.mjs +173 -0
- package/fesm2022/acorex-cdk-gesture.mjs.map +1 -0
- package/fesm2022/acorex-cdk-horizontal-scroll.mjs +111 -9
- package/fesm2022/acorex-cdk-horizontal-scroll.mjs.map +1 -1
- package/fesm2022/acorex-cdk-input-mask.mjs +12 -4
- package/fesm2022/acorex-cdk-input-mask.mjs.map +1 -1
- package/fesm2022/acorex-cdk-outline.mjs +49 -12
- package/fesm2022/acorex-cdk-outline.mjs.map +1 -1
- package/fesm2022/acorex-cdk-overlay.mjs +123 -17
- package/fesm2022/acorex-cdk-overlay.mjs.map +1 -1
- package/fesm2022/acorex-cdk-sliding-item.mjs +70 -60
- package/fesm2022/acorex-cdk-sliding-item.mjs.map +1 -1
- package/gesture/README.md +3 -0
- package/horizontal-scroll/README.md +1 -1
- package/package.json +8 -3
- package/sliding-item/README.md +4 -2
- package/types/acorex-cdk-common.d.ts +77 -61
- package/types/acorex-cdk-gesture.d.ts +120 -0
- package/types/acorex-cdk-horizontal-scroll.d.ts +26 -7
- package/types/acorex-cdk-overlay.d.ts +35 -3
- package/types/acorex-cdk-sliding-item.d.ts +22 -4
|
@@ -4,6 +4,27 @@ import { AXZToken } from '@acorex/core/z-index';
|
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { ElementRef, EmbeddedViewRef, ComponentRef } from '@angular/core';
|
|
6
6
|
|
|
7
|
+
type AXOverlayVisualContextScope = 'full' | 'theme';
|
|
8
|
+
interface AXOverlayVisualContext {
|
|
9
|
+
appearance?: string;
|
|
10
|
+
theme?: 'ax-light' | 'ax-dark';
|
|
11
|
+
contrast?: string;
|
|
12
|
+
size?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const APPEARANCE_CLASSES: readonly ["ax-appearance-flat", "ax-appearance-depth", "ax-appearance-translucent"];
|
|
15
|
+
declare const THEME_CLASSES: readonly ["ax-light", "ax-dark"];
|
|
16
|
+
declare const CONTRAST_CLASSES: readonly ["ax-contrast-enhanced", "ax-contrast-high"];
|
|
17
|
+
declare const SIZE_CLASSES: readonly ["ax-xs", "ax-sm", "ax-md", "ax-lg", "ax-xl"];
|
|
18
|
+
declare const MANAGED_OVERLAY_VISUAL_CLASSES: readonly ["ax-appearance-flat", "ax-appearance-depth", "ax-appearance-translucent", "ax-light", "ax-dark", "ax-contrast-enhanced", "ax-contrast-high", "ax-xs", "ax-sm", "ax-md", "ax-lg", "ax-xl"];
|
|
19
|
+
/**
|
|
20
|
+
* Resolves the nearest effective visual context from an anchor or context source.
|
|
21
|
+
* Theme uses nearest ax-light / ax-dark so nested Light overrides Dark ancestors.
|
|
22
|
+
*/
|
|
23
|
+
declare function resolveVisualContext(source: HTMLElement | null | undefined, fallbackRoot?: HTMLElement | null): AXOverlayVisualContext;
|
|
24
|
+
/** Applies resolved visual context classes to an overlay container. */
|
|
25
|
+
declare function applyVisualContext(target: HTMLElement, context: AXOverlayVisualContext, scope?: AXOverlayVisualContextScope): void;
|
|
26
|
+
declare function resolveContextElement(contextElement: HTMLElement | ElementRef<HTMLElement> | undefined, anchor: HTMLElement | ElementRef<HTMLElement> | undefined, fallbackRoot: HTMLElement): HTMLElement;
|
|
27
|
+
|
|
7
28
|
interface AXOverlayRef<T> {
|
|
8
29
|
instance: EmbeddedViewRef<T> | ComponentRef<T>;
|
|
9
30
|
/** Updates the overlay position relative to the anchor */
|
|
@@ -54,6 +75,17 @@ interface AXOverlayOptions extends AXComponentOptions {
|
|
|
54
75
|
actionSheetStyle?: boolean;
|
|
55
76
|
/** Base z-index for this overlay */
|
|
56
77
|
zIndexBase?: number;
|
|
78
|
+
/**
|
|
79
|
+
* Visual context source for anchorless overlays (toast, dialog, notification).
|
|
80
|
+
* Falls back to anchor, then document root.
|
|
81
|
+
*/
|
|
82
|
+
contextElement?: HTMLElement | ElementRef<HTMLElement>;
|
|
83
|
+
/**
|
|
84
|
+
* Which visual context dimensions propagate to the overlay shell.
|
|
85
|
+
* `theme` keeps light/dark (+ size) only; floating surfaces opt out of
|
|
86
|
+
* appearance/contrast classes (popup, toast, dropdown).
|
|
87
|
+
*/
|
|
88
|
+
visualContextScope?: AXOverlayVisualContextScope;
|
|
57
89
|
}
|
|
58
90
|
/**
|
|
59
91
|
* Calculates the position of an overlay element relative to an anchor element.
|
|
@@ -126,10 +158,10 @@ declare class AXOverlayService {
|
|
|
126
158
|
* Positions the overlay container relative to the anchor element.
|
|
127
159
|
*/
|
|
128
160
|
private positionOverlay;
|
|
129
|
-
private
|
|
161
|
+
private applyOverlayVisualContext;
|
|
130
162
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXOverlayService, never>;
|
|
131
163
|
static ɵprov: i0.ɵɵInjectableDeclaration<AXOverlayService>;
|
|
132
164
|
}
|
|
133
165
|
|
|
134
|
-
export { AXOverlayService, calculateAnchorPosition, clampToViewport, findBestPosition, fitsInViewport };
|
|
135
|
-
export type { AXOverlayAnchorOptions, AXOverlayOptions, AXOverlayRef };
|
|
166
|
+
export { APPEARANCE_CLASSES, AXOverlayService, CONTRAST_CLASSES, MANAGED_OVERLAY_VISUAL_CLASSES, SIZE_CLASSES, THEME_CLASSES, applyVisualContext, calculateAnchorPosition, clampToViewport, findBestPosition, fitsInViewport, resolveContextElement, resolveVisualContext };
|
|
167
|
+
export type { AXOverlayAnchorOptions, AXOverlayOptions, AXOverlayRef, AXOverlayVisualContext, AXOverlayVisualContextScope };
|
|
@@ -1,18 +1,36 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as i1 from '@acorex/cdk/gesture';
|
|
2
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Enables horizontal sliding on the host via the hosted AXGestureDirective pan events.
|
|
6
|
+
*
|
|
7
|
+
* Do not put `axGesture` on the same element; this directive already hosts it.
|
|
8
|
+
*/
|
|
3
9
|
declare class AXSlidingItemDirective {
|
|
4
10
|
#private;
|
|
5
|
-
private hostElement;
|
|
6
|
-
private
|
|
7
|
-
private
|
|
11
|
+
private readonly hostElement;
|
|
12
|
+
private readonly gesture;
|
|
13
|
+
private readonly destroyRef;
|
|
8
14
|
currentX: _angular_core.WritableSignal<number>;
|
|
9
15
|
stopPoint: _angular_core.WritableSignal<number>;
|
|
10
16
|
disableSlidingRight: _angular_core.WritableSignal<boolean>;
|
|
11
17
|
disableSlidingLeft: _angular_core.WritableSignal<boolean>;
|
|
18
|
+
protected readonly cursor: _angular_core.WritableSignal<string>;
|
|
19
|
+
private originX;
|
|
20
|
+
constructor();
|
|
21
|
+
private handlePanStart;
|
|
22
|
+
private handlePanMove;
|
|
23
|
+
private handlePanEnd;
|
|
12
24
|
private dismiss;
|
|
25
|
+
/**
|
|
26
|
+
* Sets the position of the sliding element.
|
|
27
|
+
*
|
|
28
|
+
* @param pos - The horizontal position in pixels to set the element to
|
|
29
|
+
* @returns void - No return value. The element's transform is updated to the specified position.
|
|
30
|
+
*/
|
|
13
31
|
setPosition(pos: number): void;
|
|
14
32
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXSlidingItemDirective, never>;
|
|
15
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXSlidingItemDirective, "[axSlidingItem]", never, {}, {}, never, never, true,
|
|
33
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXSlidingItemDirective, "[axSlidingItem]", never, {}, {}, never, never, true, [{ directive: typeof i1.AXGestureDirective; inputs: {}; outputs: {}; }]>;
|
|
16
34
|
}
|
|
17
35
|
|
|
18
36
|
export { AXSlidingItemDirective };
|