@acorex/components 22.2.29 → 22.3.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-components-button.mjs +182 -39
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown-button.mjs +2 -1
- package/fesm2022/acorex-components-dropdown-button.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +5 -0
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +47 -6
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/package.json +3 -3
- package/types/acorex-components-button.d.ts +23 -6
- package/types/acorex-components-dropdown-button.d.ts +2 -1
- package/types/acorex-components-dropdown.d.ts +5 -0
- package/types/acorex-components-popover.d.ts +8 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { EventEmitter, QueryList, AfterViewInit } from '@angular/core';
|
|
2
|
+
import { OnDestroy, EventEmitter, QueryList, AfterViewInit } from '@angular/core';
|
|
3
3
|
import { MXInteractiveComponent, MXColorComponent, AXClickEvent, AXStyleColorType, AXItemClickEvent, AXStyleLookType, AXHotKeyAction, MXButtonBaseComponent } from '@acorex/cdk/common';
|
|
4
4
|
import * as polytype from 'polytype';
|
|
5
5
|
import { AXLoadingComponent } from '@acorex/components/loading';
|
|
@@ -14,6 +14,7 @@ interface AXButtonItemListItem {
|
|
|
14
14
|
iconOnly?: boolean;
|
|
15
15
|
color?: AXStyleColorType;
|
|
16
16
|
loading?: boolean;
|
|
17
|
+
items?: AXButtonItemListItem[];
|
|
17
18
|
}
|
|
18
19
|
declare const AXButtonItemComponent_base: polytype.Polytype.ClusteredConstructor<[typeof MXInteractiveComponent, typeof MXColorComponent]>;
|
|
19
20
|
/**
|
|
@@ -21,7 +22,12 @@ declare const AXButtonItemComponent_base: polytype.Polytype.ClusteredConstructor
|
|
|
21
22
|
*
|
|
22
23
|
* @category Components
|
|
23
24
|
*/
|
|
24
|
-
declare class AXButtonItemComponent extends AXButtonItemComponent_base {
|
|
25
|
+
declare class AXButtonItemComponent extends AXButtonItemComponent_base implements OnDestroy {
|
|
26
|
+
private readonly childMenuItems;
|
|
27
|
+
private readonly submenuCoordinator;
|
|
28
|
+
private readonly submenuPopover;
|
|
29
|
+
protected readonly submenuTarget: this;
|
|
30
|
+
protected readonly arrowIcon: _angular_core.Signal<"ax-icon-chevron-left" | "ax-icon-chevron-right">;
|
|
25
31
|
/**
|
|
26
32
|
* Text displayed on the button item.
|
|
27
33
|
*/
|
|
@@ -57,6 +63,12 @@ declare class AXButtonItemComponent extends AXButtonItemComponent_base {
|
|
|
57
63
|
* The emitted value is an `AXClickEvent` object containing event details.
|
|
58
64
|
*/
|
|
59
65
|
onClick: EventEmitter<AXClickEvent>;
|
|
66
|
+
/** Whether this item has nested `ax-button-item` children. */
|
|
67
|
+
hasSubItems(): boolean;
|
|
68
|
+
/** Closes the nested submenu flyout when open. */
|
|
69
|
+
closeNestedMenu(): void;
|
|
70
|
+
protected handleSubmenuOpened(): void;
|
|
71
|
+
protected handleSubmenuClosed(): void;
|
|
60
72
|
/**
|
|
61
73
|
* Handles click events on the button item host element.
|
|
62
74
|
* Emits the onClick event if the component is not disabled.
|
|
@@ -64,7 +76,7 @@ declare class AXButtonItemComponent extends AXButtonItemComponent_base {
|
|
|
64
76
|
* @param e - The mouse event that triggered the click.
|
|
65
77
|
* @ignore
|
|
66
78
|
*/
|
|
67
|
-
|
|
79
|
+
handleHostClick(e: MouseEvent): void;
|
|
68
80
|
/**
|
|
69
81
|
* Handles focus events on the button item host element.
|
|
70
82
|
* Emits the onFocus event.
|
|
@@ -72,7 +84,7 @@ declare class AXButtonItemComponent extends AXButtonItemComponent_base {
|
|
|
72
84
|
* @param e - The focus event that was triggered.
|
|
73
85
|
* @ignore
|
|
74
86
|
*/
|
|
75
|
-
|
|
87
|
+
handleHostFocus(e: FocusEvent): void;
|
|
76
88
|
/**
|
|
77
89
|
* Handles blur events on the button item host element.
|
|
78
90
|
* Emits the onBlur event.
|
|
@@ -80,7 +92,8 @@ declare class AXButtonItemComponent extends AXButtonItemComponent_base {
|
|
|
80
92
|
* @param e - The blur event that was triggered.
|
|
81
93
|
* @ignore
|
|
82
94
|
*/
|
|
83
|
-
|
|
95
|
+
handleHostBlur(e: FocusEvent): void;
|
|
96
|
+
ngOnDestroy(): void;
|
|
84
97
|
/**
|
|
85
98
|
* Generates the CSS classes for the button item host element.
|
|
86
99
|
* Includes classes for icon-only state, disabled state, selected state, divided state, and color.
|
|
@@ -96,7 +109,7 @@ declare class AXButtonItemComponent extends AXButtonItemComponent_base {
|
|
|
96
109
|
*/
|
|
97
110
|
tabindex: string;
|
|
98
111
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXButtonItemComponent, never>;
|
|
99
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXButtonItemComponent, "ax-button-item", never, { "color": { "alias": "color"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "text": { "alias": "text"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "divided": { "alias": "divided"; "required": false; }; "data": { "alias": "data"; "required": false; }; "name": { "alias": "name"; "required": false; }; }, { "onClick": "onClick"; "onFocus": "onFocus"; "onBlur": "onBlur"; "disabledChange": "disabledChange"; },
|
|
112
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXButtonItemComponent, "ax-button-item", never, { "color": { "alias": "color"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "text": { "alias": "text"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "divided": { "alias": "divided"; "required": false; }; "data": { "alias": "data"; "required": false; }; "name": { "alias": "name"; "required": false; }; }, { "onClick": "onClick"; "onFocus": "onFocus"; "onBlur": "onBlur"; "disabledChange": "disabledChange"; }, ["childMenuItems"], ["ax-prefix", "ax-loading", "ax-icon", "ax-suffix", "ax-dropdown-panel", "ax-button-item,ax-divider,ax-title"], true, never>;
|
|
100
113
|
}
|
|
101
114
|
|
|
102
115
|
/**
|
|
@@ -106,6 +119,9 @@ declare class AXButtonItemComponent extends AXButtonItemComponent_base {
|
|
|
106
119
|
*/
|
|
107
120
|
declare class AXButtonItemListComponent extends MXInteractiveComponent {
|
|
108
121
|
private parent;
|
|
122
|
+
private destroyRef;
|
|
123
|
+
private submenuCoordinator;
|
|
124
|
+
private readonly boundClickItems;
|
|
109
125
|
protected _contentButtons: QueryList<AXButtonItemComponent>;
|
|
110
126
|
/**
|
|
111
127
|
* The list of button items to display.
|
|
@@ -140,6 +156,7 @@ declare class AXButtonItemListComponent extends MXInteractiveComponent {
|
|
|
140
156
|
* @ignore
|
|
141
157
|
*/
|
|
142
158
|
constructor();
|
|
159
|
+
private bindParentClosed;
|
|
143
160
|
protected isDisabled(item: AXButtonItemListItem): boolean;
|
|
144
161
|
protected hasAnyLoadingItem(): boolean;
|
|
145
162
|
/**
|
|
@@ -10,7 +10,8 @@ import * as i4 from '@acorex/components/loading';
|
|
|
10
10
|
import * as i5 from '@acorex/components/dropdown';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Combines a button and a dropdown menu. Prefer this over composing `ax-dropdown-panel` inside
|
|
14
|
+
* `ax-button`, which is deprecated.
|
|
14
15
|
*
|
|
15
16
|
* @category Components
|
|
16
17
|
*/
|
|
@@ -159,6 +159,11 @@ declare abstract class MXDropdownBoxBaseComponent extends MXInteractiveComponent
|
|
|
159
159
|
/**
|
|
160
160
|
* A panel for displaying dropdown content with configurable width and positioning.
|
|
161
161
|
*
|
|
162
|
+
* Do not compose this component inside `ax-button` for menu triggers; use
|
|
163
|
+
* `AXDropdownButtonComponent` from `@acorex/components/dropdown-button` instead. That pattern is
|
|
164
|
+
* deprecated. `ax-dropdown-panel` remains supported for other hosts (for example `ax-dropdown-box`)
|
|
165
|
+
* and for internal use by `ax-dropdown-button`.
|
|
166
|
+
*
|
|
162
167
|
* @category Components
|
|
163
168
|
*/
|
|
164
169
|
declare class AXDropdownPanelComponent extends MXInteractiveComponent implements OnDestroy {
|
|
@@ -33,6 +33,10 @@ declare class AXPopoverComponent extends MXBaseComponent implements OnDestroy {
|
|
|
33
33
|
/** @ignore */
|
|
34
34
|
private _scrollActivationFrame;
|
|
35
35
|
/** @ignore */
|
|
36
|
+
private _leaveCloseTimer;
|
|
37
|
+
/** @ignore */
|
|
38
|
+
private _overlayLeaveEvents;
|
|
39
|
+
/** @ignore */
|
|
36
40
|
private resizeObserver;
|
|
37
41
|
/** @ignore */
|
|
38
42
|
private resize$;
|
|
@@ -185,6 +189,10 @@ declare class AXPopoverComponent extends MXBaseComponent implements OnDestroy {
|
|
|
185
189
|
/** @ignore */
|
|
186
190
|
private bindOverlayEvents;
|
|
187
191
|
/** @ignore */
|
|
192
|
+
private clearLeaveCloseTimer;
|
|
193
|
+
/** @ignore */
|
|
194
|
+
private scheduleLeaveClose;
|
|
195
|
+
/** @ignore */
|
|
188
196
|
private removeOverlayEvents;
|
|
189
197
|
/** @ignore */
|
|
190
198
|
private setupScrollListener;
|