@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
|
@@ -2,13 +2,43 @@ import { MXInteractiveComponent, MXColorComponent, AXComponent, AXClosableCompon
|
|
|
2
2
|
import { AXDecoratorGenericComponent, AXDecoratorIconComponent } from '@acorex/components/decorators';
|
|
3
3
|
import { AXLoadingComponent } from '@acorex/components/loading';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { EventEmitter, HostBinding,
|
|
5
|
+
import { Injectable, contentChildren, inject, viewChild, computed, EventEmitter, HostBinding, Output, Input, ViewEncapsulation, Component, DestroyRef, input, afterNextRender, ContentChildren, contentChild, model, NgModule } from '@angular/core';
|
|
6
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
|
+
import * as i1 from '@angular/common';
|
|
8
|
+
import { CommonModule, NgTemplateOutlet } from '@angular/common';
|
|
9
|
+
import { AXPopoverComponent } from '@acorex/components/popover';
|
|
10
|
+
import { AXHtmlUtil } from '@acorex/core/utils';
|
|
6
11
|
import * as i2 from '@acorex/core/translation';
|
|
7
12
|
import { AXTranslationModule } from '@acorex/core/translation';
|
|
8
|
-
import * as i1 from '@angular/common';
|
|
9
|
-
import { CommonModule } from '@angular/common';
|
|
10
13
|
import { classes } from 'polytype';
|
|
11
14
|
|
|
15
|
+
/** Coordinates which nested `ax-button-item` submenu is open within one `ax-button-item-list`. */
|
|
16
|
+
class AXButtonItemSubmenuCoordinator {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.current = null;
|
|
19
|
+
}
|
|
20
|
+
requestOpen(item) {
|
|
21
|
+
if (this.current && this.current !== item) {
|
|
22
|
+
this.current.closeNestedMenu();
|
|
23
|
+
}
|
|
24
|
+
this.current = item;
|
|
25
|
+
}
|
|
26
|
+
clear(item) {
|
|
27
|
+
if (this.current === item) {
|
|
28
|
+
this.current = null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
closeAll() {
|
|
32
|
+
this.current?.closeNestedMenu();
|
|
33
|
+
this.current = null;
|
|
34
|
+
}
|
|
35
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXButtonItemSubmenuCoordinator, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
36
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXButtonItemSubmenuCoordinator }); }
|
|
37
|
+
}
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXButtonItemSubmenuCoordinator, decorators: [{
|
|
39
|
+
type: Injectable
|
|
40
|
+
}] });
|
|
41
|
+
|
|
12
42
|
/**
|
|
13
43
|
* Represents a button item with optional content like icons, text, and dropdowns.
|
|
14
44
|
*
|
|
@@ -17,6 +47,16 @@ import { classes } from 'polytype';
|
|
|
17
47
|
class AXButtonItemComponent extends classes(MXInteractiveComponent, MXColorComponent) {
|
|
18
48
|
constructor() {
|
|
19
49
|
super(...arguments);
|
|
50
|
+
this.childMenuItems = contentChildren(AXButtonItemComponent, { ...(ngDevMode ? { debugName: "childMenuItems" } : /* istanbul ignore next */ {}), descendants: false });
|
|
51
|
+
this.submenuCoordinator = inject(AXButtonItemSubmenuCoordinator, { optional: true });
|
|
52
|
+
this.submenuPopover = viewChild('submenuPopover', /* @ts-ignore */
|
|
53
|
+
...(ngDevMode ? [{ debugName: "submenuPopover" }] : /* istanbul ignore next */ []));
|
|
54
|
+
this.submenuTarget = this;
|
|
55
|
+
this.arrowIcon = computed(() => {
|
|
56
|
+
const isRtl = AXHtmlUtil.isRtl(this.getHostElement());
|
|
57
|
+
return isRtl ? 'ax-icon-chevron-left' : 'ax-icon-chevron-right';
|
|
58
|
+
}, /* @ts-ignore */
|
|
59
|
+
...(ngDevMode ? [{ debugName: "arrowIcon" }] : /* istanbul ignore next */ []));
|
|
20
60
|
/**
|
|
21
61
|
* Whether the item is visually separated from other items.
|
|
22
62
|
* @defaultValue false
|
|
@@ -48,6 +88,20 @@ class AXButtonItemComponent extends classes(MXInteractiveComponent, MXColorCompo
|
|
|
48
88
|
this._selected = v;
|
|
49
89
|
this.cdr.markForCheck();
|
|
50
90
|
}
|
|
91
|
+
/** Whether this item has nested `ax-button-item` children. */
|
|
92
|
+
hasSubItems() {
|
|
93
|
+
return this.childMenuItems().length > 0;
|
|
94
|
+
}
|
|
95
|
+
/** Closes the nested submenu flyout when open. */
|
|
96
|
+
closeNestedMenu() {
|
|
97
|
+
this.submenuPopover()?.close();
|
|
98
|
+
}
|
|
99
|
+
handleSubmenuOpened() {
|
|
100
|
+
this.submenuCoordinator?.requestOpen(this);
|
|
101
|
+
}
|
|
102
|
+
handleSubmenuClosed() {
|
|
103
|
+
this.submenuCoordinator?.clear(this);
|
|
104
|
+
}
|
|
51
105
|
/**
|
|
52
106
|
* Handles click events on the button item host element.
|
|
53
107
|
* Emits the onClick event if the component is not disabled.
|
|
@@ -55,14 +109,20 @@ class AXButtonItemComponent extends classes(MXInteractiveComponent, MXColorCompo
|
|
|
55
109
|
* @param e - The mouse event that triggered the click.
|
|
56
110
|
* @ignore
|
|
57
111
|
*/
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
112
|
+
handleHostClick(e) {
|
|
113
|
+
e.stopPropagation();
|
|
114
|
+
if (this.disabled) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (this.hasSubItems()) {
|
|
118
|
+
this.submenuCoordinator?.requestOpen(this);
|
|
119
|
+
this.submenuPopover()?.open();
|
|
65
120
|
}
|
|
121
|
+
this.onClick.emit({
|
|
122
|
+
component: this,
|
|
123
|
+
htmlElement: this.getHostElement(),
|
|
124
|
+
nativeEvent: e,
|
|
125
|
+
});
|
|
66
126
|
}
|
|
67
127
|
/**
|
|
68
128
|
* Handles focus events on the button item host element.
|
|
@@ -71,7 +131,7 @@ class AXButtonItemComponent extends classes(MXInteractiveComponent, MXColorCompo
|
|
|
71
131
|
* @param e - The focus event that was triggered.
|
|
72
132
|
* @ignore
|
|
73
133
|
*/
|
|
74
|
-
|
|
134
|
+
handleHostFocus(e) {
|
|
75
135
|
this.emitOnFocusEvent(e);
|
|
76
136
|
}
|
|
77
137
|
/**
|
|
@@ -81,9 +141,13 @@ class AXButtonItemComponent extends classes(MXInteractiveComponent, MXColorCompo
|
|
|
81
141
|
* @param e - The blur event that was triggered.
|
|
82
142
|
* @ignore
|
|
83
143
|
*/
|
|
84
|
-
|
|
144
|
+
handleHostBlur(e) {
|
|
85
145
|
this.emitOnBlurEvent(e);
|
|
86
146
|
}
|
|
147
|
+
ngOnDestroy() {
|
|
148
|
+
this.closeNestedMenu();
|
|
149
|
+
this.submenuCoordinator?.clear(this);
|
|
150
|
+
}
|
|
87
151
|
/**
|
|
88
152
|
* Generates the CSS classes for the button item host element.
|
|
89
153
|
* Includes classes for icon-only state, disabled state, selected state, divided state, and color.
|
|
@@ -98,6 +162,7 @@ class AXButtonItemComponent extends classes(MXInteractiveComponent, MXColorCompo
|
|
|
98
162
|
'ax-state-selected': this.selected,
|
|
99
163
|
'ax-divided': this.divided,
|
|
100
164
|
'ax-action-item': true,
|
|
165
|
+
'ax-has-submenu': this.hasSubItems(),
|
|
101
166
|
};
|
|
102
167
|
cssClasses[`${this.color}`] = true;
|
|
103
168
|
return Object.entries(cssClasses)
|
|
@@ -106,7 +171,7 @@ class AXButtonItemComponent extends classes(MXInteractiveComponent, MXColorCompo
|
|
|
106
171
|
.join(' ');
|
|
107
172
|
}
|
|
108
173
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXButtonItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
109
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AXButtonItemComponent, isStandalone: true, selector: "ax-button-item", inputs: { color: "color", disabled: "disabled", text: "text", selected: "selected", divided: "divided", data: "data", name: "name" }, outputs: { onClick: "onClick", onFocus: "onFocus", onBlur: "onBlur", disabledChange: "disabledChange" }, host: { listeners: { "click": "
|
|
174
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AXButtonItemComponent, isStandalone: true, selector: "ax-button-item", inputs: { color: "color", disabled: "disabled", text: "text", selected: "selected", divided: "divided", data: "data", name: "name" }, outputs: { onClick: "onClick", onFocus: "onFocus", onBlur: "onBlur", disabledChange: "disabledChange" }, host: { listeners: { "click": "handleHostClick($event)", "focus": "handleHostFocus($event)", "blur": "handleHostBlur($event)" }, properties: { "class": "this.__hostClass", "attr.tabindex": "this.tabindex" } }, providers: [{ provide: AXComponent, useExisting: AXButtonItemComponent }], queries: [{ propertyName: "childMenuItems", predicate: AXButtonItemComponent, isSignal: true }], viewQueries: [{ propertyName: "submenuPopover", first: true, predicate: ["submenuPopover"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
110
175
|
<div class="ax-action-item-prefix">
|
|
111
176
|
<ng-content select="ax-prefix"> </ng-content>
|
|
112
177
|
<ng-content select="ax-loading"> </ng-content>
|
|
@@ -117,9 +182,30 @@ class AXButtonItemComponent extends classes(MXInteractiveComponent, MXColorCompo
|
|
|
117
182
|
</div>
|
|
118
183
|
<div class="ax-action-item-suffix">
|
|
119
184
|
<ng-content select="ax-suffix"> </ng-content>
|
|
185
|
+
@if (hasSubItems()) {
|
|
186
|
+
<i class="ax-icon ax-icon-solid {{ arrowIcon() }}"></i>
|
|
187
|
+
}
|
|
120
188
|
</div>
|
|
121
189
|
<ng-content select="ax-dropdown-panel"> </ng-content>
|
|
122
|
-
|
|
190
|
+
@if (hasSubItems()) {
|
|
191
|
+
<ax-popover
|
|
192
|
+
#submenuPopover
|
|
193
|
+
[target]="submenuTarget"
|
|
194
|
+
openOn="hover"
|
|
195
|
+
closeOn="leave"
|
|
196
|
+
placement="end-top"
|
|
197
|
+
[closeOnScroll]="false"
|
|
198
|
+
visualContextScope="theme"
|
|
199
|
+
panelClass="ax-button-item-submenu-panel"
|
|
200
|
+
(onOpened)="handleSubmenuOpened()"
|
|
201
|
+
(onClosed)="handleSubmenuClosed()"
|
|
202
|
+
>
|
|
203
|
+
<div class="ax-button-item-submenu ax-action-list ax-action-list-vertical">
|
|
204
|
+
<ng-content select="ax-button-item,ax-divider,ax-title"></ng-content>
|
|
205
|
+
</div>
|
|
206
|
+
</ax-popover>
|
|
207
|
+
}
|
|
208
|
+
`, isInline: true, styles: ["@layer properties;@layer components{ax-button-item{display:flex;height:calc(var(--spacing, .25rem) * 9);width:100%;cursor:pointer;align-items:center;justify-content:space-between;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-leading: calc(var(--spacing, .25rem) * 5);line-height:calc(var(--spacing, .25rem) * 5);padding-inline:var(--ax-comp-action-item-padding-inline, .875rem);color:var(--ax-comp-bg, var(--color-on-surface))}ax-button-item.ax-state-selected{background-color:rgba(var(--ax-sys-color-surface))}ax-button-item:hover:not(.ax-state-disabled,.ax-state-selected){background-color:rgba(var(--ax-sys-color-surface))}ax-button-item>div{display:flex;align-items:center;justify-content:center}ax-button-item>div.ax-action-item-prefix,ax-button-item>div.ax-action-item-suffix{gap:calc(var(--spacing, .25rem) * 2)}ax-button-item.ax-has-submenu>.ax-action-item-suffix{gap:calc(var(--spacing, .25rem) * 1)}.ax-button-item-submenu{min-width:12rem;padding-block:var(--ax-comp-button-item-list-padding-block, .25rem)}}@property --tw-leading{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "visualContextScope", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "closeOnScroll", "closeOnNavigation", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
123
209
|
}
|
|
124
210
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXButtonItemComponent, decorators: [{
|
|
125
211
|
type: Component,
|
|
@@ -134,10 +220,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
134
220
|
</div>
|
|
135
221
|
<div class="ax-action-item-suffix">
|
|
136
222
|
<ng-content select="ax-suffix"> </ng-content>
|
|
223
|
+
@if (hasSubItems()) {
|
|
224
|
+
<i class="ax-icon ax-icon-solid {{ arrowIcon() }}"></i>
|
|
225
|
+
}
|
|
137
226
|
</div>
|
|
138
227
|
<ng-content select="ax-dropdown-panel"> </ng-content>
|
|
139
|
-
|
|
140
|
-
|
|
228
|
+
@if (hasSubItems()) {
|
|
229
|
+
<ax-popover
|
|
230
|
+
#submenuPopover
|
|
231
|
+
[target]="submenuTarget"
|
|
232
|
+
openOn="hover"
|
|
233
|
+
closeOn="leave"
|
|
234
|
+
placement="end-top"
|
|
235
|
+
[closeOnScroll]="false"
|
|
236
|
+
visualContextScope="theme"
|
|
237
|
+
panelClass="ax-button-item-submenu-panel"
|
|
238
|
+
(onOpened)="handleSubmenuOpened()"
|
|
239
|
+
(onClosed)="handleSubmenuClosed()"
|
|
240
|
+
>
|
|
241
|
+
<div class="ax-button-item-submenu ax-action-list ax-action-list-vertical">
|
|
242
|
+
<ng-content select="ax-button-item,ax-divider,ax-title"></ng-content>
|
|
243
|
+
</div>
|
|
244
|
+
</ax-popover>
|
|
245
|
+
}
|
|
246
|
+
`, encapsulation: ViewEncapsulation.None, inputs: ['color', 'disabled'], outputs: ['onClick', 'onFocus', 'onBlur', 'disabledChange'], imports: [CommonModule, AXDecoratorGenericComponent, AXTranslationModule, AXPopoverComponent], providers: [{ provide: AXComponent, useExisting: AXButtonItemComponent }], host: {
|
|
247
|
+
'(click)': 'handleHostClick($event)',
|
|
248
|
+
'(focus)': 'handleHostFocus($event)',
|
|
249
|
+
'(blur)': 'handleHostBlur($event)',
|
|
250
|
+
}, styles: ["@layer properties;@layer components{ax-button-item{display:flex;height:calc(var(--spacing, .25rem) * 9);width:100%;cursor:pointer;align-items:center;justify-content:space-between;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-leading: calc(var(--spacing, .25rem) * 5);line-height:calc(var(--spacing, .25rem) * 5);padding-inline:var(--ax-comp-action-item-padding-inline, .875rem);color:var(--ax-comp-bg, var(--color-on-surface))}ax-button-item.ax-state-selected{background-color:rgba(var(--ax-sys-color-surface))}ax-button-item:hover:not(.ax-state-disabled,.ax-state-selected){background-color:rgba(var(--ax-sys-color-surface))}ax-button-item>div{display:flex;align-items:center;justify-content:center}ax-button-item>div.ax-action-item-prefix,ax-button-item>div.ax-action-item-suffix{gap:calc(var(--spacing, .25rem) * 2)}ax-button-item.ax-has-submenu>.ax-action-item-suffix{gap:calc(var(--spacing, .25rem) * 1)}.ax-button-item-submenu{min-width:12rem;padding-block:var(--ax-comp-button-item-list-padding-block, .25rem)}}@property --tw-leading{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
|
|
251
|
+
}], propDecorators: { childMenuItems: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => AXButtonItemComponent), { ...{ descendants: false }, isSignal: true }] }], submenuPopover: [{ type: i0.ViewChild, args: ['submenuPopover', { isSignal: true }] }], text: [{
|
|
141
252
|
type: Input
|
|
142
253
|
}], selected: [{
|
|
143
254
|
type: Input
|
|
@@ -149,15 +260,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
149
260
|
type: Input
|
|
150
261
|
}], onClick: [{
|
|
151
262
|
type: Output
|
|
152
|
-
}], __hostClick: [{
|
|
153
|
-
type: HostListener,
|
|
154
|
-
args: ['click', ['$event']]
|
|
155
|
-
}], __hostFocus: [{
|
|
156
|
-
type: HostListener,
|
|
157
|
-
args: ['focus', ['$event']]
|
|
158
|
-
}], __hostBlur: [{
|
|
159
|
-
type: HostListener,
|
|
160
|
-
args: ['blur', ['$event']]
|
|
161
263
|
}], __hostClass: [{
|
|
162
264
|
type: HostBinding,
|
|
163
265
|
args: ['class']
|
|
@@ -181,6 +283,9 @@ class AXButtonItemListComponent extends MXInteractiveComponent {
|
|
|
181
283
|
constructor() {
|
|
182
284
|
super();
|
|
183
285
|
this.parent = inject(AXClosableComponent, { optional: true });
|
|
286
|
+
this.destroyRef = inject(DestroyRef);
|
|
287
|
+
this.submenuCoordinator = inject(AXButtonItemSubmenuCoordinator);
|
|
288
|
+
this.boundClickItems = new WeakSet();
|
|
184
289
|
/**
|
|
185
290
|
* The list of button items to display.
|
|
186
291
|
*
|
|
@@ -215,6 +320,13 @@ class AXButtonItemListComponent extends MXInteractiveComponent {
|
|
|
215
320
|
this._contentButtons.changes.subscribe(() => {
|
|
216
321
|
this._initContents();
|
|
217
322
|
});
|
|
323
|
+
this.bindParentClosed();
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
bindParentClosed() {
|
|
327
|
+
const closable = this.parent;
|
|
328
|
+
closable?.onClosed?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
329
|
+
this.submenuCoordinator.closeAll();
|
|
218
330
|
});
|
|
219
331
|
}
|
|
220
332
|
isDisabled(item) {
|
|
@@ -251,10 +363,13 @@ class AXButtonItemListComponent extends MXInteractiveComponent {
|
|
|
251
363
|
*/
|
|
252
364
|
_bindEvents() {
|
|
253
365
|
this._contentButtons?.forEach((b) => {
|
|
254
|
-
if (
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
366
|
+
if (this.boundClickItems.has(b)) {
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
this.boundClickItems.add(b);
|
|
370
|
+
b.onClick.subscribe((c) => {
|
|
371
|
+
this._handleOnItemClick(c);
|
|
372
|
+
});
|
|
258
373
|
});
|
|
259
374
|
}
|
|
260
375
|
/**
|
|
@@ -276,10 +391,12 @@ class AXButtonItemListComponent extends MXInteractiveComponent {
|
|
|
276
391
|
* @ignore
|
|
277
392
|
*/
|
|
278
393
|
_handleOnItemClick(e) {
|
|
279
|
-
|
|
394
|
+
const item = e.component;
|
|
395
|
+
this._emitOnItemClickEvent(e, item);
|
|
396
|
+
if (this.closeParentOnClick() && !item.hasSubItems()) {
|
|
397
|
+
this.submenuCoordinator.closeAll();
|
|
280
398
|
this.parent?.close();
|
|
281
399
|
}
|
|
282
|
-
this._emitOnItemClickEvent(e, e.component);
|
|
283
400
|
}
|
|
284
401
|
/**
|
|
285
402
|
* Emits the onItemClick event with details about the clicked item.
|
|
@@ -315,8 +432,16 @@ class AXButtonItemListComponent extends MXInteractiveComponent {
|
|
|
315
432
|
return `ax-action-list ax-action-list-vertical`;
|
|
316
433
|
}
|
|
317
434
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXButtonItemListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
318
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AXButtonItemListComponent, isStandalone: true, selector: "ax-button-item-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, closeParentOnClick: { classPropertyName: "closeParentOnClick", publicName: "closeParentOnClick", isSignal: true, isRequired: false, transformFunction: null }, lockOnLoading: { classPropertyName: "lockOnLoading", publicName: "lockOnLoading", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onItemClick: "onItemClick" }, host: { properties: { "class": "this.__hostClass" } }, providers: [
|
|
435
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AXButtonItemListComponent, isStandalone: true, selector: "ax-button-item-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, closeParentOnClick: { classPropertyName: "closeParentOnClick", publicName: "closeParentOnClick", isSignal: true, isRequired: false, transformFunction: null }, lockOnLoading: { classPropertyName: "lockOnLoading", publicName: "lockOnLoading", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onItemClick: "onItemClick" }, host: { properties: { "class": "this.__hostClass" } }, providers: [
|
|
436
|
+
{ provide: AXComponent, useExisting: AXButtonItemListComponent },
|
|
437
|
+
AXButtonItemSubmenuCoordinator,
|
|
438
|
+
], queries: [{ propertyName: "_contentButtons", predicate: AXButtonItemComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
319
439
|
@for (item of items(); track item.name) {
|
|
440
|
+
<ng-container [ngTemplateOutlet]="itemTemplate" [ngTemplateOutletContext]="{ $implicit: item }"></ng-container>
|
|
441
|
+
}
|
|
442
|
+
<ng-content></ng-content>
|
|
443
|
+
|
|
444
|
+
<ng-template #itemTemplate let-item>
|
|
320
445
|
<ax-button-item
|
|
321
446
|
[text]="item.text"
|
|
322
447
|
[name]="item.name"
|
|
@@ -332,18 +457,25 @@ class AXButtonItemListComponent extends MXInteractiveComponent {
|
|
|
332
457
|
<ax-icon [icon]="item.icon"></ax-icon>
|
|
333
458
|
</ax-prefix>
|
|
334
459
|
}
|
|
460
|
+
@for (child of item.items ?? []; track child.name ?? child.text) {
|
|
461
|
+
<ng-container [ngTemplateOutlet]="itemTemplate" [ngTemplateOutletContext]="{ $implicit: child }"></ng-container>
|
|
462
|
+
}
|
|
335
463
|
</ax-button-item>
|
|
336
464
|
@if (item.divided) {
|
|
337
465
|
<ax-divider></ax-divider>
|
|
338
466
|
}
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
`, isInline: true, styles: ["@layer components{ax-button-item-list.ax-action-list{padding-block:var(--ax-comp-button-item-list-padding-block, .25rem)}ax-button-item-list .ax-button-item-loading{display:inline-flex;align-items:center;justify-content:center;inline-size:1.5rem;block-size:1.5rem}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
467
|
+
</ng-template>
|
|
468
|
+
`, isInline: true, styles: ["@layer components{ax-button-item-list.ax-action-list{padding-block:var(--ax-comp-button-item-list-padding-block, .25rem)}ax-button-item-list .ax-button-item-loading{display:inline-flex;align-items:center;justify-content:center;inline-size:1.5rem;block-size:1.5rem}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
342
469
|
}
|
|
343
470
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXButtonItemListComponent, decorators: [{
|
|
344
471
|
type: Component,
|
|
345
472
|
args: [{ selector: 'ax-button-item-list', template: `
|
|
346
473
|
@for (item of items(); track item.name) {
|
|
474
|
+
<ng-container [ngTemplateOutlet]="itemTemplate" [ngTemplateOutletContext]="{ $implicit: item }"></ng-container>
|
|
475
|
+
}
|
|
476
|
+
<ng-content></ng-content>
|
|
477
|
+
|
|
478
|
+
<ng-template #itemTemplate let-item>
|
|
347
479
|
<ax-button-item
|
|
348
480
|
[text]="item.text"
|
|
349
481
|
[name]="item.name"
|
|
@@ -359,16 +491,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
359
491
|
<ax-icon [icon]="item.icon"></ax-icon>
|
|
360
492
|
</ax-prefix>
|
|
361
493
|
}
|
|
494
|
+
@for (child of item.items ?? []; track child.name ?? child.text) {
|
|
495
|
+
<ng-container [ngTemplateOutlet]="itemTemplate" [ngTemplateOutletContext]="{ $implicit: child }"></ng-container>
|
|
496
|
+
}
|
|
362
497
|
</ax-button-item>
|
|
363
498
|
@if (item.divided) {
|
|
364
499
|
<ax-divider></ax-divider>
|
|
365
500
|
}
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
501
|
+
</ng-template>
|
|
502
|
+
`, encapsulation: ViewEncapsulation.None, imports: [
|
|
503
|
+
NgTemplateOutlet,
|
|
504
|
+
AXButtonItemComponent,
|
|
505
|
+
AXDecoratorGenericComponent,
|
|
506
|
+
AXDecoratorIconComponent,
|
|
507
|
+
AXLoadingComponent,
|
|
508
|
+
], providers: [
|
|
509
|
+
{ provide: AXComponent, useExisting: AXButtonItemListComponent },
|
|
510
|
+
AXButtonItemSubmenuCoordinator,
|
|
511
|
+
], styles: ["@layer components{ax-button-item-list.ax-action-list{padding-block:var(--ax-comp-button-item-list-padding-block, .25rem)}ax-button-item-list .ax-button-item-loading{display:inline-flex;align-items:center;justify-content:center;inline-size:1.5rem;block-size:1.5rem}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
|
|
369
512
|
}], ctorParameters: () => [], propDecorators: { _contentButtons: [{
|
|
370
513
|
type: ContentChildren,
|
|
371
|
-
args: [AXButtonItemComponent]
|
|
514
|
+
args: [AXButtonItemComponent, { descendants: true }]
|
|
372
515
|
}], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], closeParentOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeParentOnClick", required: false }] }], lockOnLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "lockOnLoading", required: false }] }], onItemClick: [{
|
|
373
516
|
type: Output
|
|
374
517
|
}], __hostClass: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-button.mjs","sources":["../../../../packages/components/button/src/lib/button-item.component.ts","../../../../packages/components/button/src/lib/button-item-list.component.ts","../../../../packages/components/button/src/lib/button.component.ts","../../../../packages/components/button/src/lib/button.component.html","../../../../packages/components/button/src/lib/button.module.ts","../../../../packages/components/button/src/acorex-components-button.ts"],"sourcesContent":["import {\n AXClickEvent,\n AXComponent,\n AXStyleColorType,\n MXColorComponent,\n MXInteractiveComponent,\n} from '@acorex/cdk/common';\nimport { AXDecoratorGenericComponent } from '@acorex/components/decorators';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\n\nimport { Component, EventEmitter, HostBinding, HostListener, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { classes } from 'polytype';\n\nexport interface AXButtonItemListItem {\n name: string;\n text: string;\n icon: string;\n divided?: boolean;\n disabled?: boolean;\n selected?: boolean;\n iconOnly?: boolean;\n color?: AXStyleColorType;\n loading?: boolean;\n}\n\n/**\n * Represents a button item with optional content like icons, text, and dropdowns.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-button-item',\n template: `\n <div class=\"ax-action-item-prefix\">\n <ng-content select=\"ax-prefix\"> </ng-content>\n <ng-content select=\"ax-loading\"> </ng-content>\n <ng-content select=\"ax-icon\"> </ng-content>\n @if (text) {\n <ax-text>{{ text | translate | async }}</ax-text>\n }\n </div>\n <div class=\"ax-action-item-suffix\">\n <ng-content select=\"ax-suffix\"> </ng-content>\n </div>\n <ng-content select=\"ax-dropdown-panel\"> </ng-content>\n `,\n encapsulation: ViewEncapsulation.None,\n\n inputs: ['color', 'disabled'],\n outputs: ['onClick', 'onFocus', 'onBlur', 'disabledChange'],\n imports: [CommonModule, AXDecoratorGenericComponent, AXTranslationModule],\n providers: [{ provide: AXComponent, useExisting: AXButtonItemComponent }],\n styleUrl: './button-item.component.css',\n})\nexport class AXButtonItemComponent extends classes(MXInteractiveComponent, MXColorComponent) {\n /**\n * Text displayed on the button item.\n */\n @Input()\n text: string;\n\n /**\n * @ignore\n */\n private _selected: boolean;\n\n /**\n * Indicates whether the button item is selected.\n *\n * @param v - A boolean indicating the selected state.\n * Updates the view when the value changes.\n */\n @Input()\n public get selected(): boolean {\n return this._selected;\n }\n public set selected(v: boolean) {\n this._selected = v;\n this.cdr.markForCheck();\n }\n\n /**\n * Whether the item is visually separated from other items.\n * @defaultValue false\n */\n @Input()\n divided = false;\n\n /**\n * Data associated with the button item.\n */\n @Input()\n data: unknown;\n\n /**\n * The name of the button item.\n */\n @Input()\n name: string;\n\n /**\n * Emitted when the button item is clicked.\n * @event\n * The emitted value is an `AXClickEvent` object containing event details.\n */\n @Output()\n onClick: EventEmitter<AXClickEvent> = new EventEmitter<AXClickEvent>();\n\n /**\n * Handles click events on the button item host element.\n * Emits the onClick event if the component is not disabled.\n *\n * @param e - The mouse event that triggered the click.\n * @ignore\n */\n @HostListener('click', ['$event'])\n __hostClick(e: MouseEvent) {\n if (!this.disabled) {\n this.onClick.emit({\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e,\n });\n }\n }\n /**\n * Handles focus events on the button item host element.\n * Emits the onFocus event.\n *\n * @param e - The focus event that was triggered.\n * @ignore\n */\n @HostListener('focus', ['$event'])\n __hostFocus(e: FocusEvent) {\n this.emitOnFocusEvent(e);\n }\n\n /**\n * Handles blur events on the button item host element.\n * Emits the onBlur event.\n *\n * @param e - The blur event that was triggered.\n * @ignore\n */\n @HostListener('blur', ['$event'])\n __hostBlur(e: FocusEvent) {\n this.emitOnBlurEvent(e);\n }\n\n /**\n * Generates the CSS classes for the button item host element.\n * Includes classes for icon-only state, disabled state, selected state, divided state, and color.\n *\n * @returns string - The space-separated CSS class names.\n * @ignore\n */\n @HostBinding('class')\n private get __hostClass(): string {\n const cssClasses = {\n 'ax-button-icon': !this.text,\n 'ax-state-disabled': this.disabled,\n 'ax-state-selected': this.selected,\n 'ax-divided': this.divided,\n 'ax-action-item': true,\n };\n cssClasses[`${this.color}`] = true;\n return Object.entries(cssClasses)\n .filter((c) => c[1])\n .map((c) => c[0])\n .join(' ');\n }\n\n /**\n * Sets the tabindex attribute for keyboard navigation.\n *\n * @ignore\n */\n @HostBinding('attr.tabindex') tabindex = '0';\n}\n","import {\n AXClickEvent,\n AXClosableComponent,\n AXComponent,\n AXItemClickEvent,\n MXInteractiveComponent,\n} from '@acorex/cdk/common';\nimport { AXDecoratorGenericComponent, AXDecoratorIconComponent } from '@acorex/components/decorators';\nimport { AXLoadingComponent } from '@acorex/components/loading';\nimport {\n Component,\n ContentChildren,\n EventEmitter,\n HostBinding,\n Output,\n QueryList,\n ViewEncapsulation,\n afterNextRender,\n inject,\n input,\n} from '@angular/core';\nimport { AXButtonItemComponent, AXButtonItemListItem } from './button-item.component';\n\n/**\n * A component for rendering a list of button items with optional dividers between them.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-button-item-list',\n template: `\n @for (item of items(); track item.name) {\n <ax-button-item\n [text]=\"item.text\"\n [name]=\"item.name\"\n [disabled]=\"isDisabled(item)\"\n [color]=\"item.color\"\n [selected]=\"item.selected\"\n (onClick)=\"_handleOnItemClick($event)\"\n >\n @if (item.loading) {\n <ax-loading class=\"ax-button-item-loading\"></ax-loading>\n } @else if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"></ax-icon>\n </ax-prefix>\n }\n </ax-button-item>\n @if (item.divided) {\n <ax-divider></ax-divider>\n }\n }\n <ng-content></ng-content>\n `,\n styleUrls: ['./button-item-list.component.css'],\n\n encapsulation: ViewEncapsulation.None,\n imports: [AXButtonItemComponent, AXDecoratorGenericComponent, AXDecoratorIconComponent, AXLoadingComponent],\n providers: [{ provide: AXComponent, useExisting: AXButtonItemListComponent }],\n})\nexport class AXButtonItemListComponent extends MXInteractiveComponent {\n private parent = inject<AXClosableComponent>(AXClosableComponent, { optional: true });\n\n @ContentChildren(AXButtonItemComponent)\n protected _contentButtons: QueryList<AXButtonItemComponent>;\n\n /**\n * The list of button items to display.\n *\n * @defaultValue []\n */\n items = input<AXButtonItemListItem[]>([]);\n\n /**\n * Determines if the parent closable component should be closed automatically when\n * an item is clicked.\n *\n * @defaultValue true\n */\n closeParentOnClick = input(true);\n\n /**\n * Locks interaction for all items when any item is loading.\n *\n * @defaultValue false\n */\n lockOnLoading = input(false);\n\n /**\n * Emits an event when an item is clicked.\n * The event contains details about the clicked item.\n *\n * @event {AXItemClickEvent<AXButtonItemComponent>} - The event object containing clicked item details.\n */\n @Output()\n onItemClick: EventEmitter<AXItemClickEvent<AXButtonItemComponent>> = new EventEmitter<\n AXItemClickEvent<AXButtonItemComponent>\n >();\n\n /**\n * Initializes the button item list component.\n * Sets up content change detection and initializes content after the next render.\n *\n * @ignore\n */\n constructor() {\n super();\n afterNextRender(() => {\n this._initContents();\n this._contentButtons.changes.subscribe(() => {\n this._initContents();\n });\n });\n }\n\n protected isDisabled(item: AXButtonItemListItem): boolean {\n if (item.disabled) {\n return true;\n }\n if (item.loading) {\n return true;\n }\n if (this.lockOnLoading() && this.hasAnyLoadingItem()) {\n return true;\n }\n return false;\n }\n\n protected hasAnyLoadingItem(): boolean {\n return this.items().some((item) => !!item.loading);\n }\n /**\n * Initializes the content of the button item list.\n * Binds events and properties to content button items and marks for change detection.\n *\n * @ignore\n */\n private _initContents() {\n this._bindEvents();\n this._bindProps();\n this.cdr.markForCheck();\n }\n\n /**\n * Binds click events to content button items.\n * Subscribes to onClick events of child button items if not already subscribed.\n *\n * @ignore\n */\n private _bindEvents() {\n this._contentButtons?.forEach((b) => {\n if (!b.onClick.length)\n b.onClick.subscribe((c) => {\n this._handleOnItemClick(c);\n });\n });\n }\n\n /**\n * Binds properties to content button items.\n * Sets the disabled state of child button items based on the parent's disabled state.\n *\n * @ignore\n */\n private _bindProps() {\n this._contentButtons?.forEach((b) => {\n b.disabled = b.disabled ?? this.disabled;\n });\n }\n\n /**\n * Handles click events from button items.\n * Closes the parent component if available and emits the item click event.\n *\n * @param e - The click event from the button item.\n * @ignore\n */\n protected _handleOnItemClick(e: AXClickEvent) {\n if (this.closeParentOnClick()) {\n this.parent?.close();\n }\n this._emitOnItemClickEvent(e, e.component);\n }\n\n /**\n * Emits the onItemClick event with details about the clicked item.\n *\n * @param e - The click event from the button item.\n * @param item - The button item component that was clicked.\n * @ignore\n */\n _emitOnItemClickEvent(e: AXClickEvent, item: AXButtonItemComponent): void {\n this.onItemClick.emit({\n component: this,\n item,\n htmlElement: this.getHostElement(),\n nativeEvent: e.nativeEvent,\n name: item.name,\n data: item.data,\n });\n }\n\n /**\n * Closes the parent closable component if available.\n */\n public closeParent(): void {\n this.parent?.close();\n }\n\n /**\n * Generates the CSS classes for the button item list host element.\n * Includes classes for action list and vertical layout.\n *\n * @returns string - The space-separated CSS class names.\n * @ignore\n */\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-action-list ax-action-list-vertical`;\n }\n}\n","import {\n AXClickEvent,\n AXComponent,\n AXFocusableComponent,\n AXRippleDirective,\n MXButtonBaseComponent,\n} from '@acorex/cdk/common';\nimport { AXLoadingComponent } from '@acorex/components/loading';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport {\n AfterViewInit,\n Component,\n EventEmitter,\n HostBinding,\n ViewEncapsulation,\n computed,\n contentChild,\n input,\n model,\n} from '@angular/core';\nimport { AXButtonType } from './button-item.class';\nimport { AXButtonItemComponent } from './button-item.component';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-button',\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.css'],\n inputs: ['disabled', 'tabIndex', 'color', 'look', 'text', 'toggleable', 'selected'],\n outputs: [\n 'onBlur',\n 'onFocus',\n 'onClick',\n 'selectedChange',\n 'toggleableChange',\n 'lookChange',\n 'colorChange',\n 'disabledChange',\n ],\n\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXButtonComponent },\n { provide: AXButtonItemComponent, useExisting: AXButtonComponent },\n { provide: AXFocusableComponent, useExisting: AXButtonComponent },\n ],\n imports: [AXRippleDirective, AXTranslationModule, CommonModule],\n})\nexport class AXButtonComponent extends MXButtonBaseComponent implements AfterViewInit {\n iconOnly = input(false);\n\n protected showIcon = computed(() => {\n return !this.hasLoadingIcon();\n });\n protected loadingIcon = contentChild(AXLoadingComponent);\n protected hasLoadingIcon = computed(() => this.loadingIcon() != null);\n\n /**\n * Fires each time the user clicks the button.\n * @event\n */\n onClick: EventEmitter<AXClickEvent> = new EventEmitter<AXClickEvent>();\n\n /**\n * Specifies the type of button to be used in the action sheet.\n *\n * @defaultValue 'button'\n */\n type = input<AXButtonType>('button');\n\n /**\n * Defines the text displayed while the action sheet is loading.\n *\n * @defaultValue null\n */\n loadingText = model<string | null>(null);\n\n /**\n * @ignore\n */\n ngAfterViewInit(): void {\n this.getHostElement().removeAttribute('tabindex');\n }\n\n /**\n * @ignore\n */\n private getButton(): HTMLButtonElement {\n return this.getHostElement().firstElementChild as HTMLButtonElement;\n }\n\n /**\n * @ignore\n */\n _handleClick(e: MouseEvent) {\n if (this.disabled) {\n e.preventDefault();\n return;\n }\n if (this.toggleable) {\n this.selected = !this.selected;\n }\n this.onClick.emit({\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e,\n });\n\n // TODO: check keyboard event\n setTimeout(() => {\n this.blur();\n });\n }\n\n /**\n * Triggers a click event on the button element.\n */\n click() {\n this.getButton()?.click();\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n private get __hostClass(): string[] {\n const list = Object.entries(this.cssClasses)\n .filter((c) => c[1])\n .map((c) => c[0]);\n if (this.iconOnly()) {\n list.push('ax-button-icon');\n }\n return list;\n }\n\n protected override emitOnFocusEvent(e?: FocusEvent): void {\n this.getButton()?.classList.add('ax-state-focus');\n super.emitOnFocusEvent(e);\n }\n\n protected override emitOnBlurEvent(e?: FocusEvent): void {\n this.getButton()?.classList.remove('ax-state-focus');\n super.emitOnBlurEvent(e);\n }\n\n override focus() {\n this.getButton()?.focus();\n }\n\n override blur() {\n this.getButton()?.blur();\n }\n}\n","<button\n [axRipple]\n [attr.type]=\"type()\"\n [disabled]=\"disabled\"\n [attr.tabindex]=\"tabIndex\"\n (click)=\"_handleClick($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n (focus)=\"emitOnFocusEvent($event)\"\n class=\"{{ color }}\n {{ interactiveLook }} \n {{ selected ? 'ax-state-selected' : '' }} \n {{ disabled ? 'ax-state-disabled' : '' }}\"\n>\n <ng-content select=\"ax-loading, ax-loading-spinner\"> </ng-content>\n\n @if (showIcon()) {\n <ng-content select=\"ax-prefix, ax-icon\"> </ng-content>\n }\n\n <ng-content select=\"ax-content\"> </ng-content>\n\n @if (text && !loadingText() && !iconOnly()) {\n <span class=\"ax-button-text\">{{ text | translate | async }}</span>\n }\n\n @if (loadingText()) {\n <span class=\"ax-button-text\">{{ loadingText() }}</span>\n }\n\n <ng-content select=\"ax-suffix\"> </ng-content>\n <ng-content select=\"ax-dropdown-panel\"> </ng-content>\n <ng-content select=\".tab-content\"> </ng-content>\n\n <ng-content></ng-content>\n</button>\n","import { NgModule } from '@angular/core';\nimport { AXButtonItemListComponent } from './button-item-list.component';\nimport { AXButtonItemComponent } from './button-item.component';\nimport { AXButtonComponent } from './button.component';\n\n@NgModule({\n imports: [AXButtonComponent, AXButtonItemComponent, AXButtonItemListComponent],\n exports: [AXButtonComponent, AXButtonItemComponent, AXButtonItemListComponent],\n})\nexport class AXButtonModule {}\n","/**\n * Generated bundle index. Do not edit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AAA,EAAA,CAHf,iBAAiB,EAAE,qBAAqB,EAAE,yBAAyB,CAAA,EAAA,CAAA,CAAA;;2FAGlE,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,iBAAiB,EAAE,qBAAqB,EAAE,yBAAyB,CAAC;AAC9E,oBAAA,OAAO,EAAE,CAAC,iBAAiB,EAAE,qBAAqB,EAAE,yBAAyB,CAAC;AAC/E,iBAAA;;;ACRD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-components-button.mjs","sources":["../../../../packages/components/button/src/lib/button-item-submenu.service.ts","../../../../packages/components/button/src/lib/button-item.component.ts","../../../../packages/components/button/src/lib/button-item-list.component.ts","../../../../packages/components/button/src/lib/button.component.ts","../../../../packages/components/button/src/lib/button.component.html","../../../../packages/components/button/src/lib/button.module.ts","../../../../packages/components/button/src/acorex-components-button.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport type { AXButtonItemComponent } from './button-item.component';\n\n/** Coordinates which nested `ax-button-item` submenu is open within one `ax-button-item-list`. */\n@Injectable()\nexport class AXButtonItemSubmenuCoordinator {\n private current: AXButtonItemComponent | null = null;\n\n requestOpen(item: AXButtonItemComponent): void {\n if (this.current && this.current !== item) {\n this.current.closeNestedMenu();\n }\n this.current = item;\n }\n\n clear(item: AXButtonItemComponent): void {\n if (this.current === item) {\n this.current = null;\n }\n }\n\n closeAll(): void {\n this.current?.closeNestedMenu();\n this.current = null;\n }\n}\n","import {\n AXClickEvent,\n AXComponent,\n AXStyleColorType,\n MXColorComponent,\n MXInteractiveComponent,\n} from '@acorex/cdk/common';\nimport { AXDecoratorGenericComponent } from '@acorex/components/decorators';\nimport { AXPopoverComponent } from '@acorex/components/popover';\nimport { AXHtmlUtil } from '@acorex/core/utils';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\n\nimport {\n Component,\n EventEmitter,\n HostBinding,\n Input,\n OnDestroy,\n Output,\n ViewEncapsulation,\n computed,\n contentChildren,\n inject,\n viewChild,\n} from '@angular/core';\nimport { classes } from 'polytype';\nimport { AXButtonItemSubmenuCoordinator } from './button-item-submenu.service';\n\nexport interface AXButtonItemListItem {\n name: string;\n text: string;\n icon: string;\n divided?: boolean;\n disabled?: boolean;\n selected?: boolean;\n iconOnly?: boolean;\n color?: AXStyleColorType;\n loading?: boolean;\n items?: AXButtonItemListItem[];\n}\n\n/**\n * Represents a button item with optional content like icons, text, and dropdowns.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-button-item',\n template: `\n <div class=\"ax-action-item-prefix\">\n <ng-content select=\"ax-prefix\"> </ng-content>\n <ng-content select=\"ax-loading\"> </ng-content>\n <ng-content select=\"ax-icon\"> </ng-content>\n @if (text) {\n <ax-text>{{ text | translate | async }}</ax-text>\n }\n </div>\n <div class=\"ax-action-item-suffix\">\n <ng-content select=\"ax-suffix\"> </ng-content>\n @if (hasSubItems()) {\n <i class=\"ax-icon ax-icon-solid {{ arrowIcon() }}\"></i>\n }\n </div>\n <ng-content select=\"ax-dropdown-panel\"> </ng-content>\n @if (hasSubItems()) {\n <ax-popover\n #submenuPopover\n [target]=\"submenuTarget\"\n openOn=\"hover\"\n closeOn=\"leave\"\n placement=\"end-top\"\n [closeOnScroll]=\"false\"\n visualContextScope=\"theme\"\n panelClass=\"ax-button-item-submenu-panel\"\n (onOpened)=\"handleSubmenuOpened()\"\n (onClosed)=\"handleSubmenuClosed()\"\n >\n <div class=\"ax-button-item-submenu ax-action-list ax-action-list-vertical\">\n <ng-content select=\"ax-button-item,ax-divider,ax-title\"></ng-content>\n </div>\n </ax-popover>\n }\n `,\n encapsulation: ViewEncapsulation.None,\n\n inputs: ['color', 'disabled'],\n outputs: ['onClick', 'onFocus', 'onBlur', 'disabledChange'],\n imports: [CommonModule, AXDecoratorGenericComponent, AXTranslationModule, AXPopoverComponent],\n providers: [{ provide: AXComponent, useExisting: AXButtonItemComponent }],\n styleUrl: './button-item.component.css',\n host: {\n '(click)': 'handleHostClick($event)',\n '(focus)': 'handleHostFocus($event)',\n '(blur)': 'handleHostBlur($event)',\n },\n})\nexport class AXButtonItemComponent extends classes(MXInteractiveComponent, MXColorComponent) implements OnDestroy {\n private readonly childMenuItems = contentChildren(AXButtonItemComponent, { descendants: false });\n private readonly submenuCoordinator = inject(AXButtonItemSubmenuCoordinator, { optional: true });\n private readonly submenuPopover = viewChild<AXPopoverComponent>('submenuPopover');\n\n protected readonly submenuTarget = this;\n\n protected readonly arrowIcon = computed(() => {\n const isRtl = AXHtmlUtil.isRtl(this.getHostElement());\n return isRtl ? 'ax-icon-chevron-left' : 'ax-icon-chevron-right';\n });\n\n /**\n * Text displayed on the button item.\n */\n @Input()\n text: string;\n\n /**\n * @ignore\n */\n private _selected: boolean;\n\n /**\n * Indicates whether the button item is selected.\n *\n * @param v - A boolean indicating the selected state.\n * Updates the view when the value changes.\n */\n @Input()\n public get selected(): boolean {\n return this._selected;\n }\n public set selected(v: boolean) {\n this._selected = v;\n this.cdr.markForCheck();\n }\n\n /**\n * Whether the item is visually separated from other items.\n * @defaultValue false\n */\n @Input()\n divided = false;\n\n /**\n * Data associated with the button item.\n */\n @Input()\n data: unknown;\n\n /**\n * The name of the button item.\n */\n @Input()\n name: string;\n\n /**\n * Emitted when the button item is clicked.\n * @event\n * The emitted value is an `AXClickEvent` object containing event details.\n */\n @Output()\n onClick: EventEmitter<AXClickEvent> = new EventEmitter<AXClickEvent>();\n\n /** Whether this item has nested `ax-button-item` children. */\n hasSubItems(): boolean {\n return this.childMenuItems().length > 0;\n }\n\n /** Closes the nested submenu flyout when open. */\n closeNestedMenu(): void {\n this.submenuPopover()?.close();\n }\n\n protected handleSubmenuOpened(): void {\n this.submenuCoordinator?.requestOpen(this);\n }\n\n protected handleSubmenuClosed(): void {\n this.submenuCoordinator?.clear(this);\n }\n\n /**\n * Handles click events on the button item host element.\n * Emits the onClick event if the component is not disabled.\n *\n * @param e - The mouse event that triggered the click.\n * @ignore\n */\n handleHostClick(e: MouseEvent) {\n e.stopPropagation();\n if (this.disabled) {\n return;\n }\n\n if (this.hasSubItems()) {\n this.submenuCoordinator?.requestOpen(this);\n this.submenuPopover()?.open();\n }\n\n this.onClick.emit({\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e,\n });\n }\n\n /**\n * Handles focus events on the button item host element.\n * Emits the onFocus event.\n *\n * @param e - The focus event that was triggered.\n * @ignore\n */\n handleHostFocus(e: FocusEvent) {\n this.emitOnFocusEvent(e);\n }\n\n /**\n * Handles blur events on the button item host element.\n * Emits the onBlur event.\n *\n * @param e - The blur event that was triggered.\n * @ignore\n */\n handleHostBlur(e: FocusEvent) {\n this.emitOnBlurEvent(e);\n }\n\n ngOnDestroy(): void {\n this.closeNestedMenu();\n this.submenuCoordinator?.clear(this);\n }\n\n /**\n * Generates the CSS classes for the button item host element.\n * Includes classes for icon-only state, disabled state, selected state, divided state, and color.\n *\n * @returns string - The space-separated CSS class names.\n * @ignore\n */\n @HostBinding('class')\n private get __hostClass(): string {\n const cssClasses = {\n 'ax-button-icon': !this.text,\n 'ax-state-disabled': this.disabled,\n 'ax-state-selected': this.selected,\n 'ax-divided': this.divided,\n 'ax-action-item': true,\n 'ax-has-submenu': this.hasSubItems(),\n };\n cssClasses[`${this.color}`] = true;\n return Object.entries(cssClasses)\n .filter((c) => c[1])\n .map((c) => c[0])\n .join(' ');\n }\n\n /**\n * Sets the tabindex attribute for keyboard navigation.\n *\n * @ignore\n */\n @HostBinding('attr.tabindex') tabindex = '0';\n}\n","import {\n AXClickEvent,\n AXClosableComponent,\n AXComponent,\n AXEvent,\n AXItemClickEvent,\n MXInteractiveComponent,\n} from '@acorex/cdk/common';\nimport { AXDecoratorGenericComponent, AXDecoratorIconComponent } from '@acorex/components/decorators';\nimport { AXLoadingComponent } from '@acorex/components/loading';\nimport {\n Component,\n ContentChildren,\n DestroyRef,\n EventEmitter,\n HostBinding,\n Output,\n QueryList,\n ViewEncapsulation,\n afterNextRender,\n inject,\n input,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { AXButtonItemSubmenuCoordinator } from './button-item-submenu.service';\nimport { AXButtonItemComponent, AXButtonItemListItem } from './button-item.component';\n\n/**\n * A component for rendering a list of button items with optional dividers between them.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-button-item-list',\n template: `\n @for (item of items(); track item.name) {\n <ng-container [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n }\n <ng-content></ng-content>\n\n <ng-template #itemTemplate let-item>\n <ax-button-item\n [text]=\"item.text\"\n [name]=\"item.name\"\n [disabled]=\"isDisabled(item)\"\n [color]=\"item.color\"\n [selected]=\"item.selected\"\n (onClick)=\"_handleOnItemClick($event)\"\n >\n @if (item.loading) {\n <ax-loading class=\"ax-button-item-loading\"></ax-loading>\n } @else if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"></ax-icon>\n </ax-prefix>\n }\n @for (child of item.items ?? []; track child.name ?? child.text) {\n <ng-container [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-button-item>\n @if (item.divided) {\n <ax-divider></ax-divider>\n }\n </ng-template>\n `,\n styleUrls: ['./button-item-list.component.css'],\n\n encapsulation: ViewEncapsulation.None,\n imports: [\n NgTemplateOutlet,\n AXButtonItemComponent,\n AXDecoratorGenericComponent,\n AXDecoratorIconComponent,\n AXLoadingComponent,\n ],\n providers: [\n { provide: AXComponent, useExisting: AXButtonItemListComponent },\n AXButtonItemSubmenuCoordinator,\n ],\n})\nexport class AXButtonItemListComponent extends MXInteractiveComponent {\n private parent = inject<AXClosableComponent>(AXClosableComponent, { optional: true });\n private destroyRef = inject(DestroyRef);\n private submenuCoordinator = inject(AXButtonItemSubmenuCoordinator);\n private readonly boundClickItems = new WeakSet<AXButtonItemComponent>();\n\n @ContentChildren(AXButtonItemComponent, { descendants: true })\n protected _contentButtons: QueryList<AXButtonItemComponent>;\n\n /**\n * The list of button items to display.\n *\n * @defaultValue []\n */\n items = input<AXButtonItemListItem[]>([]);\n\n /**\n * Determines if the parent closable component should be closed automatically when\n * an item is clicked.\n *\n * @defaultValue true\n */\n closeParentOnClick = input(true);\n\n /**\n * Locks interaction for all items when any item is loading.\n *\n * @defaultValue false\n */\n lockOnLoading = input(false);\n\n /**\n * Emits an event when an item is clicked.\n * The event contains details about the clicked item.\n *\n * @event {AXItemClickEvent<AXButtonItemComponent>} - The event object containing clicked item details.\n */\n @Output()\n onItemClick: EventEmitter<AXItemClickEvent<AXButtonItemComponent>> = new EventEmitter<\n AXItemClickEvent<AXButtonItemComponent>\n >();\n\n /**\n * Initializes the button item list component.\n * Sets up content change detection and initializes content after the next render.\n *\n * @ignore\n */\n constructor() {\n super();\n afterNextRender(() => {\n this._initContents();\n this._contentButtons.changes.subscribe(() => {\n this._initContents();\n });\n this.bindParentClosed();\n });\n }\n\n private bindParentClosed(): void {\n const closable = this.parent as { onClosed?: EventEmitter<AXEvent> } | null;\n closable?.onClosed?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n this.submenuCoordinator.closeAll();\n });\n }\n\n protected isDisabled(item: AXButtonItemListItem): boolean {\n if (item.disabled) {\n return true;\n }\n if (item.loading) {\n return true;\n }\n if (this.lockOnLoading() && this.hasAnyLoadingItem()) {\n return true;\n }\n return false;\n }\n\n protected hasAnyLoadingItem(): boolean {\n return this.items().some((item) => !!item.loading);\n }\n /**\n * Initializes the content of the button item list.\n * Binds events and properties to content button items and marks for change detection.\n *\n * @ignore\n */\n private _initContents() {\n this._bindEvents();\n this._bindProps();\n this.cdr.markForCheck();\n }\n\n /**\n * Binds click events to content button items.\n * Subscribes to onClick events of child button items if not already subscribed.\n *\n * @ignore\n */\n private _bindEvents() {\n this._contentButtons?.forEach((b) => {\n if (this.boundClickItems.has(b)) {\n return;\n }\n this.boundClickItems.add(b);\n b.onClick.subscribe((c) => {\n this._handleOnItemClick(c);\n });\n });\n }\n\n /**\n * Binds properties to content button items.\n * Sets the disabled state of child button items based on the parent's disabled state.\n *\n * @ignore\n */\n private _bindProps() {\n this._contentButtons?.forEach((b) => {\n b.disabled = b.disabled ?? this.disabled;\n });\n }\n\n /**\n * Handles click events from button items.\n * Closes the parent component if available and emits the item click event.\n *\n * @param e - The click event from the button item.\n * @ignore\n */\n protected _handleOnItemClick(e: AXClickEvent) {\n const item = e.component as AXButtonItemComponent;\n this._emitOnItemClickEvent(e, item);\n if (this.closeParentOnClick() && !item.hasSubItems()) {\n this.submenuCoordinator.closeAll();\n this.parent?.close();\n }\n }\n\n /**\n * Emits the onItemClick event with details about the clicked item.\n *\n * @param e - The click event from the button item.\n * @param item - The button item component that was clicked.\n * @ignore\n */\n _emitOnItemClickEvent(e: AXClickEvent, item: AXButtonItemComponent): void {\n this.onItemClick.emit({\n component: this,\n item,\n htmlElement: this.getHostElement(),\n nativeEvent: e.nativeEvent,\n name: item.name,\n data: item.data,\n });\n }\n\n /**\n * Closes the parent closable component if available.\n */\n public closeParent(): void {\n this.parent?.close();\n }\n\n /**\n * Generates the CSS classes for the button item list host element.\n * Includes classes for action list and vertical layout.\n *\n * @returns string - The space-separated CSS class names.\n * @ignore\n */\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-action-list ax-action-list-vertical`;\n }\n}\n","import {\n AXClickEvent,\n AXComponent,\n AXFocusableComponent,\n AXRippleDirective,\n MXButtonBaseComponent,\n} from '@acorex/cdk/common';\nimport { AXLoadingComponent } from '@acorex/components/loading';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport {\n AfterViewInit,\n Component,\n EventEmitter,\n HostBinding,\n ViewEncapsulation,\n computed,\n contentChild,\n input,\n model,\n} from '@angular/core';\nimport { AXButtonType } from './button-item.class';\nimport { AXButtonItemComponent } from './button-item.component';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-button',\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.css'],\n inputs: ['disabled', 'tabIndex', 'color', 'look', 'text', 'toggleable', 'selected'],\n outputs: [\n 'onBlur',\n 'onFocus',\n 'onClick',\n 'selectedChange',\n 'toggleableChange',\n 'lookChange',\n 'colorChange',\n 'disabledChange',\n ],\n\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXButtonComponent },\n { provide: AXButtonItemComponent, useExisting: AXButtonComponent },\n { provide: AXFocusableComponent, useExisting: AXButtonComponent },\n ],\n imports: [AXRippleDirective, AXTranslationModule, CommonModule],\n})\nexport class AXButtonComponent extends MXButtonBaseComponent implements AfterViewInit {\n iconOnly = input(false);\n\n protected showIcon = computed(() => {\n return !this.hasLoadingIcon();\n });\n protected loadingIcon = contentChild(AXLoadingComponent);\n protected hasLoadingIcon = computed(() => this.loadingIcon() != null);\n\n /**\n * Fires each time the user clicks the button.\n * @event\n */\n onClick: EventEmitter<AXClickEvent> = new EventEmitter<AXClickEvent>();\n\n /**\n * Specifies the type of button to be used in the action sheet.\n *\n * @defaultValue 'button'\n */\n type = input<AXButtonType>('button');\n\n /**\n * Defines the text displayed while the action sheet is loading.\n *\n * @defaultValue null\n */\n loadingText = model<string | null>(null);\n\n /**\n * @ignore\n */\n ngAfterViewInit(): void {\n this.getHostElement().removeAttribute('tabindex');\n }\n\n /**\n * @ignore\n */\n private getButton(): HTMLButtonElement {\n return this.getHostElement().firstElementChild as HTMLButtonElement;\n }\n\n /**\n * @ignore\n */\n _handleClick(e: MouseEvent) {\n if (this.disabled) {\n e.preventDefault();\n return;\n }\n if (this.toggleable) {\n this.selected = !this.selected;\n }\n this.onClick.emit({\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e,\n });\n\n // TODO: check keyboard event\n setTimeout(() => {\n this.blur();\n });\n }\n\n /**\n * Triggers a click event on the button element.\n */\n click() {\n this.getButton()?.click();\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n private get __hostClass(): string[] {\n const list = Object.entries(this.cssClasses)\n .filter((c) => c[1])\n .map((c) => c[0]);\n if (this.iconOnly()) {\n list.push('ax-button-icon');\n }\n return list;\n }\n\n protected override emitOnFocusEvent(e?: FocusEvent): void {\n this.getButton()?.classList.add('ax-state-focus');\n super.emitOnFocusEvent(e);\n }\n\n protected override emitOnBlurEvent(e?: FocusEvent): void {\n this.getButton()?.classList.remove('ax-state-focus');\n super.emitOnBlurEvent(e);\n }\n\n override focus() {\n this.getButton()?.focus();\n }\n\n override blur() {\n this.getButton()?.blur();\n }\n}\n","<button\n [axRipple]\n [attr.type]=\"type()\"\n [disabled]=\"disabled\"\n [attr.tabindex]=\"tabIndex\"\n (click)=\"_handleClick($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n (focus)=\"emitOnFocusEvent($event)\"\n class=\"{{ color }}\n {{ interactiveLook }} \n {{ selected ? 'ax-state-selected' : '' }} \n {{ disabled ? 'ax-state-disabled' : '' }}\"\n>\n <ng-content select=\"ax-loading, ax-loading-spinner\"> </ng-content>\n\n @if (showIcon()) {\n <ng-content select=\"ax-prefix, ax-icon\"> </ng-content>\n }\n\n <ng-content select=\"ax-content\"> </ng-content>\n\n @if (text && !loadingText() && !iconOnly()) {\n <span class=\"ax-button-text\">{{ text | translate | async }}</span>\n }\n\n @if (loadingText()) {\n <span class=\"ax-button-text\">{{ loadingText() }}</span>\n }\n\n <ng-content select=\"ax-suffix\"> </ng-content>\n <ng-content select=\"ax-dropdown-panel\"> </ng-content>\n <ng-content select=\".tab-content\"> </ng-content>\n\n <ng-content></ng-content>\n</button>\n","import { NgModule } from '@angular/core';\nimport { AXButtonItemListComponent } from './button-item-list.component';\nimport { AXButtonItemComponent } from './button-item.component';\nimport { AXButtonComponent } from './button.component';\n\n@NgModule({\n imports: [AXButtonComponent, AXButtonItemComponent, AXButtonItemListComponent],\n exports: [AXButtonComponent, AXButtonItemComponent, AXButtonItemListComponent],\n})\nexport class AXButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;AAGA;MAEa,8BAA8B,CAAA;AAD3C,IAAA,WAAA,GAAA;QAEU,IAAA,CAAA,OAAO,GAAiC,IAAI;AAmBrD,IAAA;AAjBC,IAAA,WAAW,CAAC,IAA2B,EAAA;QACrC,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,EAAE;AACzC,YAAA,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE;QAChC;AACA,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;IACrB;AAEA,IAAA,KAAK,CAAC,IAA2B,EAAA;AAC/B,QAAA,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,EAAE;AACzB,YAAA,IAAI,CAAC,OAAO,GAAG,IAAI;QACrB;IACF;IAEA,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,OAAO,EAAE,eAAe,EAAE;AAC/B,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;IACrB;8GAnBW,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAA9B,8BAA8B,EAAA,CAAA,CAAA;;2FAA9B,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAD1C;;;ACsCD;;;;AAIG;AAmDG,MAAO,qBAAsB,SAAQ,OAAO,CAAC,sBAAsB,EAAE,gBAAgB,CAAC,CAAA;AAlD5F,IAAA,WAAA,GAAA;;QAmDmB,IAAA,CAAA,cAAc,GAAG,eAAe,CAAC,qBAAqB,sFAAI,WAAW,EAAE,KAAK,EAAA,CAAG;QAC/E,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,8BAA8B,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAC/E,IA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;AAElE,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAAA,OAAA,EAAA,CAHf,iBAAiB,EAAE,qBAAqB,EAAE,yBAAyB,CAAA,EAAA,CAAA,CAAA;;2FAGlE,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,iBAAiB,EAAE,qBAAqB,EAAE,yBAAyB,CAAC;AAC9E,oBAAA,OAAO,EAAE,CAAC,iBAAiB,EAAE,qBAAqB,EAAE,yBAAyB,CAAC;AAC/E,iBAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -9,7 +9,8 @@ import { AXLoadingModule } from '@acorex/components/loading';
|
|
|
9
9
|
|
|
10
10
|
// import { AXButtonType } from './button-item.class';
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Combines a button and a dropdown menu. Prefer this over composing `ax-dropdown-panel` inside
|
|
13
|
+
* `ax-button`, which is deprecated.
|
|
13
14
|
*
|
|
14
15
|
* @category Components
|
|
15
16
|
*/
|