@acorex/components 22.1.0-next.0 → 22.1.0-next.1
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/combo-box/README.md +7 -2
- package/fesm2022/acorex-components-action-sheet.mjs +1 -0
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +2 -2
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-combo-box.mjs +240 -17
- package/fesm2022/acorex-components-combo-box.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +2 -2
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +19 -3
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +4 -2
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +2 -2
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +4 -4
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-fab.mjs +2 -2
- package/fesm2022/acorex-components-fab.mjs.map +1 -1
- package/fesm2022/acorex-components-list.mjs +2 -2
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-lookup.mjs +722 -175
- package/fesm2022/acorex-components-lookup.mjs.map +1 -1
- package/fesm2022/acorex-components-map.mjs +2 -2
- package/fesm2022/acorex-components-map.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +26 -6
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-notification.mjs +9 -2
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +1 -1
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +7 -6
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +4 -2
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +6 -6
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +13 -2
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-text-area.mjs +2 -2
- package/fesm2022/acorex-components-text-area.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +9 -2
- package/fesm2022/acorex-components-toast.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +2 -2
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/lookup/README.md +13 -8
- package/package.json +3 -3
- package/select-box/README.md +5 -0
- package/types/acorex-components-action-sheet.d.ts +9 -1
- package/types/acorex-components-combo-box.d.ts +101 -11
- package/types/acorex-components-decorators.d.ts +1 -0
- package/types/acorex-components-dialog.d.ts +9 -0
- package/types/acorex-components-lookup.d.ts +260 -90
- package/types/acorex-components-menu.d.ts +2 -0
- package/types/acorex-components-notification.d.ts +11 -1
- package/types/acorex-components-popover.d.ts +4 -1
- package/types/acorex-components-popup.d.ts +9 -1
- package/types/acorex-components-select-box.d.ts +8 -2
- package/types/acorex-components-toast.d.ts +10 -1
|
@@ -1,29 +1,43 @@
|
|
|
1
|
-
import { NXComponent, AXComponent } from '@acorex/cdk/common';
|
|
1
|
+
import { NXComponent, AXComponent, AXClearableComponent, AXClosableComponent } from '@acorex/cdk/common';
|
|
2
|
+
import * as i1 from '@acorex/components/decorators';
|
|
3
|
+
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
2
4
|
import { AXPopoverComponent } from '@acorex/components/popover';
|
|
5
|
+
import { AXPlatform } from '@acorex/core/platform';
|
|
3
6
|
import { AXTranslatorPipe } from '@acorex/core/translation';
|
|
4
7
|
import { Combobox, ComboboxPopup, ComboboxWidget } from '@angular/aria/combobox';
|
|
5
8
|
import { Listbox, Option } from '@angular/aria/listbox';
|
|
6
|
-
import { AsyncPipe } from '@angular/common';
|
|
9
|
+
import { NgTemplateOutlet, AsyncPipe } from '@angular/common';
|
|
7
10
|
import * as i0 from '@angular/core';
|
|
8
|
-
import { input, model, output, signal, computed, linkedSignal, viewChild, effect, untracked, afterRenderEffect, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
|
11
|
+
import { inject, DestroyRef, input, model, output, signal, computed, linkedSignal, viewChild, effect, untracked, afterRenderEffect, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
|
12
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
9
13
|
|
|
10
14
|
/**
|
|
11
15
|
* A minimal combo box for selecting a single value from a list of items.
|
|
12
16
|
*
|
|
13
17
|
* Built on top of the `@angular/aria/combobox` directives, it supports two behaviors:
|
|
14
18
|
* - `searchable="true"` (default): an input with typeahead filtering (matches `id`).
|
|
15
|
-
* - `searchable="false"`: a select-like trigger (same input
|
|
19
|
+
* - `searchable="false"`: a select-like, non-editable trigger (same input; typing blocked without
|
|
20
|
+
* Combobox `readonly`, so Tab focus and keyboard open/select keep working).
|
|
21
|
+
*
|
|
22
|
+
* With `adaptivityEnabled` (default `true`), the list opens as a bottom actionsheet on small
|
|
23
|
+
* screens instead of an anchored dropdown — the same alternate presentation as `ax-select-box`.
|
|
16
24
|
*
|
|
17
25
|
* Items use `text` for display, `id` for search/identity, and `value` as the submitted model value.
|
|
26
|
+
* Implements {@link FormValueControl} so `[(ngModel)]` / signal forms work via the `value` model
|
|
27
|
+
* (no `ControlValueAccessor`).
|
|
18
28
|
*
|
|
19
29
|
* @category Components
|
|
20
30
|
*/
|
|
21
31
|
class AXComboBoxComponent extends NXComponent {
|
|
32
|
+
#platform;
|
|
33
|
+
#destroyRef;
|
|
22
34
|
#isUserInteraction;
|
|
23
35
|
#lastValue;
|
|
24
36
|
#lastExpanded;
|
|
25
37
|
constructor() {
|
|
26
38
|
super();
|
|
39
|
+
this.#platform = inject(AXPlatform);
|
|
40
|
+
this.#destroyRef = inject(DestroyRef);
|
|
27
41
|
/**
|
|
28
42
|
* The list of items the user can select from.
|
|
29
43
|
* Each item has `id` (search/identity), `text` (display), and `value` (submitted).
|
|
@@ -32,24 +46,60 @@ class AXComboBoxComponent extends NXComponent {
|
|
|
32
46
|
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
33
47
|
/**
|
|
34
48
|
* Whether the combo box accepts typing and filters the list (`true`),
|
|
35
|
-
* or is a select-like,
|
|
49
|
+
* or is a select-like, non-editable trigger (`false`).
|
|
36
50
|
*/
|
|
37
51
|
this.searchable = input(true, /* @ts-ignore */
|
|
38
52
|
...(ngDevMode ? [{ debugName: "searchable" }] : /* istanbul ignore next */ []));
|
|
53
|
+
/**
|
|
54
|
+
* When `true` (default), the popup list uses the alternate actionsheet presentation on small
|
|
55
|
+
* screens (`SM`). When `false`, the list always opens as an anchored dropdown.
|
|
56
|
+
*/
|
|
57
|
+
this.adaptivityEnabled = input(true, /* @ts-ignore */
|
|
58
|
+
...(ngDevMode ? [{ debugName: "adaptivityEnabled" }] : /* istanbul ignore next */ []));
|
|
59
|
+
/**
|
|
60
|
+
* Title shown in the actionsheet header on small screens. Falls back to `placeholder`.
|
|
61
|
+
*/
|
|
62
|
+
this.caption = input('', /* @ts-ignore */
|
|
63
|
+
...(ngDevMode ? [{ debugName: "caption" }] : /* istanbul ignore next */ []));
|
|
64
|
+
/**
|
|
65
|
+
* When `true`, list rows use alternating background colors for easier scanning.
|
|
66
|
+
*/
|
|
67
|
+
this.alternate = input(false, /* @ts-ignore */
|
|
68
|
+
...(ngDevMode ? [{ debugName: "alternate" }] : /* istanbul ignore next */ []));
|
|
39
69
|
/**
|
|
40
70
|
* The placeholder text shown when no value is selected.
|
|
41
71
|
*/
|
|
42
72
|
this.placeholder = input('', /* @ts-ignore */
|
|
43
73
|
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
74
|
+
/**
|
|
75
|
+
* Custom template rendered when the filtered list has no items.
|
|
76
|
+
* When omitted, a default "no result found" message is shown.
|
|
77
|
+
*/
|
|
78
|
+
this.emptyTemplate = input(undefined, /* @ts-ignore */
|
|
79
|
+
...(ngDevMode ? [{ debugName: "emptyTemplate" }] : /* istanbul ignore next */ []));
|
|
80
|
+
/**
|
|
81
|
+
* Custom template rendered for each item in the popup list.
|
|
82
|
+
* Context: `{ $implicit: AXComboBoxItem }`.
|
|
83
|
+
*/
|
|
84
|
+
this.itemTemplate = input(undefined, /* @ts-ignore */
|
|
85
|
+
...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
|
|
86
|
+
/**
|
|
87
|
+
* Custom template rendered for the selected value in the trigger.
|
|
88
|
+
* Context: `{ $implicit: AXComboBoxItem }`.
|
|
89
|
+
* When `searchable` is true, the template is shown while the popup is closed and the input
|
|
90
|
+
* still reflects the selected text; typing/opening falls back to the plain input.
|
|
91
|
+
*/
|
|
92
|
+
this.selectedTemplate = input(undefined, /* @ts-ignore */
|
|
93
|
+
...(ngDevMode ? [{ debugName: "selectedTemplate" }] : /* istanbul ignore next */ []));
|
|
44
94
|
/**
|
|
45
95
|
* Whether the combo box is disabled.
|
|
46
96
|
*/
|
|
47
|
-
this.disabled =
|
|
97
|
+
this.disabled = input(false, /* @ts-ignore */
|
|
48
98
|
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
49
99
|
/**
|
|
50
100
|
* Whether the combo box is readonly.
|
|
51
101
|
*/
|
|
52
|
-
this.readonly =
|
|
102
|
+
this.readonly = input(false, /* @ts-ignore */
|
|
53
103
|
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
54
104
|
/**
|
|
55
105
|
* Predefined look scheme of the editor container. Same looks as other editor components like ax-text-box.
|
|
@@ -57,7 +107,8 @@ class AXComboBoxComponent extends NXComponent {
|
|
|
57
107
|
this.look = model('solid', /* @ts-ignore */
|
|
58
108
|
...(ngDevMode ? [{ debugName: "look" }] : /* istanbul ignore next */ []));
|
|
59
109
|
/**
|
|
60
|
-
* The selected item's `value`. Supports
|
|
110
|
+
* The selected item's `value`. Supports `[(value)]`, `[(ngModel)]`, and signal forms
|
|
111
|
+
* via {@link FormValueControl}.
|
|
61
112
|
*/
|
|
62
113
|
this.value = model(null, /* @ts-ignore */
|
|
63
114
|
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
@@ -65,6 +116,22 @@ class AXComboBoxComponent extends NXComponent {
|
|
|
65
116
|
* Emitted when the selected value changes.
|
|
66
117
|
*/
|
|
67
118
|
this.onValueChanged = output();
|
|
119
|
+
/**
|
|
120
|
+
* Emitted when the trigger receives focus.
|
|
121
|
+
*/
|
|
122
|
+
this.onFocus = output();
|
|
123
|
+
/**
|
|
124
|
+
* Emitted when the trigger loses focus.
|
|
125
|
+
*/
|
|
126
|
+
this.onBlur = output();
|
|
127
|
+
/**
|
|
128
|
+
* Emitted when a list item is clicked.
|
|
129
|
+
*/
|
|
130
|
+
this.onItemClick = output();
|
|
131
|
+
/**
|
|
132
|
+
* Emitted when a list item is selected (click or keyboard).
|
|
133
|
+
*/
|
|
134
|
+
this.onItemSelected = output();
|
|
68
135
|
/**
|
|
69
136
|
* Emitted when the popup list opens.
|
|
70
137
|
*/
|
|
@@ -76,6 +143,9 @@ class AXComboBoxComponent extends NXComponent {
|
|
|
76
143
|
/** Whether the popup is expanded. */
|
|
77
144
|
this.expanded = signal(false, /* @ts-ignore */
|
|
78
145
|
...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
146
|
+
/** Whether the list is currently shown as a bottom actionsheet (small screens + adaptivity). */
|
|
147
|
+
this.isActionsheetStyle = signal(false, /* @ts-ignore */
|
|
148
|
+
...(ngDevMode ? [{ debugName: "isActionsheetStyle" }] : /* istanbul ignore next */ []));
|
|
79
149
|
/** The item whose `value` matches the current model value. */
|
|
80
150
|
this.selectedItem = computed(() => {
|
|
81
151
|
const value = this.value();
|
|
@@ -91,6 +161,17 @@ class AXComboBoxComponent extends NXComponent {
|
|
|
91
161
|
/** The text typed in the searchable input. Resets to the selected item's text. */
|
|
92
162
|
this.searchText = linkedSignal(() => this.displayText(), /* @ts-ignore */
|
|
93
163
|
...(ngDevMode ? [{ debugName: "searchText" }] : /* istanbul ignore next */ []));
|
|
164
|
+
/** Whether the trigger should render `selectedTemplate` instead of the plain input text. */
|
|
165
|
+
this.showSelectedTemplate = computed(() => {
|
|
166
|
+
if (!this.selectedTemplate() || !this.selectedItem()) {
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
if (!this.searchable()) {
|
|
170
|
+
return true;
|
|
171
|
+
}
|
|
172
|
+
return !this.expanded() && this.searchText() === this.displayText();
|
|
173
|
+
}, /* @ts-ignore */
|
|
174
|
+
...(ngDevMode ? [{ debugName: "showSelectedTemplate" }] : /* istanbul ignore next */ []));
|
|
94
175
|
/** The listbox selection (item ids), kept in sync with the selected value. */
|
|
95
176
|
this.selection = linkedSignal(() => {
|
|
96
177
|
const id = this.selectedItem()?.id;
|
|
@@ -122,6 +203,19 @@ class AXComboBoxComponent extends NXComponent {
|
|
|
122
203
|
this.#lastExpanded = undefined;
|
|
123
204
|
effect(() => this.#emitValueChanged(this.value()));
|
|
124
205
|
effect(() => this.#emitOpenedOrClosed(this.expanded()));
|
|
206
|
+
effect(() => {
|
|
207
|
+
this.adaptivityEnabled();
|
|
208
|
+
untracked(() => this.#syncActionsheetStyle());
|
|
209
|
+
});
|
|
210
|
+
this.#platform.resize.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => {
|
|
211
|
+
this.#syncActionsheetStyle();
|
|
212
|
+
// Match dropdown-box: close anchored dropdowns on resize; keep actionsheet open.
|
|
213
|
+
if (this.expanded() && !this.isActionsheetStyle()) {
|
|
214
|
+
this.close();
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
// Seed the actionsheet flag once.
|
|
218
|
+
this.#syncActionsheetStyle();
|
|
125
219
|
// Open during CD (before render) so the overlay exists before Aria DeferredContent
|
|
126
220
|
// creates the list in its after-render hook.
|
|
127
221
|
effect(() => {
|
|
@@ -145,6 +239,14 @@ class AXComboBoxComponent extends NXComponent {
|
|
|
145
239
|
}
|
|
146
240
|
});
|
|
147
241
|
}
|
|
242
|
+
#syncActionsheetStyle() {
|
|
243
|
+
this.isActionsheetStyle.set(this.adaptivityEnabled() && this.#platform.is('SM'));
|
|
244
|
+
}
|
|
245
|
+
/** Stable unique key for `@for` — avoids NG0955 when `id` is missing or duplicated. */
|
|
246
|
+
trackItemKey(index, item) {
|
|
247
|
+
const id = item?.id?.trim();
|
|
248
|
+
return id ? id : `item-${index}`;
|
|
249
|
+
}
|
|
148
250
|
/** Emits onValueChanged when the value actually changes (skips the initial value). */
|
|
149
251
|
#emitValueChanged(value) {
|
|
150
252
|
const previous = this.#lastValue;
|
|
@@ -189,6 +291,33 @@ class AXComboBoxComponent extends NXComponent {
|
|
|
189
291
|
}
|
|
190
292
|
this.expanded.update((open) => !open);
|
|
191
293
|
}
|
|
294
|
+
/**
|
|
295
|
+
* Non-searchable keyboard: open with Enter/Space when collapsed; commit with Space when expanded.
|
|
296
|
+
* (Aria relays Enter for editable inputs, but not Space.)
|
|
297
|
+
*/
|
|
298
|
+
onTriggerKeydown(event) {
|
|
299
|
+
if (this.disabled() || this.readonly() || this.searchable()) {
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
if (event.key !== 'Enter' && event.key !== ' ') {
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
if (!this.expanded()) {
|
|
306
|
+
event.preventDefault();
|
|
307
|
+
this.expanded.set(true);
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
if (event.key === ' ') {
|
|
311
|
+
event.preventDefault();
|
|
312
|
+
this.commit();
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
/** Blocks typing in non-searchable mode without Combobox `readonly` (keeps Tab/keyboard working). */
|
|
316
|
+
onBeforeInput(event) {
|
|
317
|
+
if (!this.searchable() || this.readonly()) {
|
|
318
|
+
event.preventDefault();
|
|
319
|
+
}
|
|
320
|
+
}
|
|
192
321
|
/**
|
|
193
322
|
* Keeps the combobox expanded state in sync when the popover closes (e.g. click outside).
|
|
194
323
|
*/
|
|
@@ -196,25 +325,119 @@ class AXComboBoxComponent extends NXComponent {
|
|
|
196
325
|
this.expanded.set(false);
|
|
197
326
|
}
|
|
198
327
|
/**
|
|
199
|
-
*
|
|
328
|
+
* Clears the selected value (sets it to `null`) and closes the popup.
|
|
329
|
+
* Used by projected `ax-clear-button`.
|
|
330
|
+
*
|
|
331
|
+
* @param isUserInteraction - Whether the clear was triggered by the user.
|
|
200
332
|
*/
|
|
201
|
-
|
|
202
|
-
|
|
333
|
+
reset(isUserInteraction = false) {
|
|
334
|
+
if (this.disabled() || this.readonly() || this.value() == null) {
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
this.#isUserInteraction = isUserInteraction;
|
|
338
|
+
this.value.set(null);
|
|
339
|
+
this.selection.set([]);
|
|
340
|
+
this.expanded.set(false);
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Closes the popup list.
|
|
344
|
+
*/
|
|
345
|
+
close() {
|
|
346
|
+
this.expanded.set(false);
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Closes the popup list (alias for {@link close}, required by `AXClosableComponent`).
|
|
350
|
+
*/
|
|
351
|
+
closeAll() {
|
|
352
|
+
this.close();
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Commits the highlighted (active) or clicked list item as the component value and closes the popup.
|
|
356
|
+
*
|
|
357
|
+
* With `selectionMode="explicit"`, arrow keys only move the active item; Enter/Space must resolve
|
|
358
|
+
* that option. Clicks resolve from the event target so we do not depend on listener order vs ngListbox.
|
|
359
|
+
*/
|
|
360
|
+
commit(event) {
|
|
361
|
+
const listbox = this.listboxRef();
|
|
362
|
+
let selectedId;
|
|
363
|
+
if (event?.type === 'click' && event.target instanceof Element) {
|
|
364
|
+
const optionEl = event.target.closest('[role="option"]');
|
|
365
|
+
const match = listbox?._pattern.inputs.items().find((item) => item.element() === optionEl);
|
|
366
|
+
const value = match?.value();
|
|
367
|
+
selectedId = typeof value === 'string' ? value : undefined;
|
|
368
|
+
}
|
|
369
|
+
else {
|
|
370
|
+
const activeValue = listbox?._pattern.inputs.activeItem()?.value();
|
|
371
|
+
selectedId = typeof activeValue === 'string' ? activeValue : this.selection()[0];
|
|
372
|
+
}
|
|
203
373
|
const item = selectedId != null ? this.items().find((i) => i.id === selectedId) : undefined;
|
|
204
|
-
if (item != null
|
|
205
|
-
|
|
206
|
-
|
|
374
|
+
if (item != null) {
|
|
375
|
+
if (event?.type === 'click') {
|
|
376
|
+
this.onItemClick.emit({
|
|
377
|
+
component: this,
|
|
378
|
+
item,
|
|
379
|
+
htmlElement: this.nativeElement,
|
|
380
|
+
isUserInteraction: true,
|
|
381
|
+
nativeEvent: event,
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
this.onItemSelected.emit({
|
|
385
|
+
component: this,
|
|
386
|
+
item,
|
|
387
|
+
htmlElement: this.nativeElement,
|
|
388
|
+
isUserInteraction: true,
|
|
389
|
+
});
|
|
390
|
+
if (item.value !== this.value()) {
|
|
391
|
+
this.#isUserInteraction = true;
|
|
392
|
+
this.value.set(item.value);
|
|
393
|
+
this.selection.set([item.id]);
|
|
394
|
+
}
|
|
207
395
|
}
|
|
208
396
|
this.expanded.set(false);
|
|
209
397
|
this.comboboxRef()?.element.focus();
|
|
210
398
|
}
|
|
399
|
+
/** Forwards native focus from the trigger input. */
|
|
400
|
+
emitOnFocus(e) {
|
|
401
|
+
this.onFocus.emit({
|
|
402
|
+
component: this,
|
|
403
|
+
htmlElement: this.nativeElement,
|
|
404
|
+
nativeEvent: e,
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
/** Forwards native blur from the trigger input. */
|
|
408
|
+
emitOnBlur(e) {
|
|
409
|
+
this.onBlur.emit({
|
|
410
|
+
component: this,
|
|
411
|
+
htmlElement: this.nativeElement,
|
|
412
|
+
nativeEvent: e,
|
|
413
|
+
});
|
|
414
|
+
}
|
|
211
415
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXComboBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
212
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXComboBoxComponent, isStandalone: true, selector: "ax-combo-box", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", readonly: "readonlyChange", look: "lookChange", value: "valueChange", onValueChanged: "onValueChanged", onOpened: "onOpened", onClosed: "onClosed" }, providers: [{ provide: AXComponent, useExisting: AXComboBoxComponent }], viewQueries: [{ propertyName: "comboboxRef", first: true, predicate: Combobox, descendants: true, isSignal: true }, { propertyName: "listboxRef", first: true, predicate: Listbox, descendants: true, isSignal: true }, { propertyName: "popoverRef", first: true, predicate: AXPopoverComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n #origin\n class=\"ax-editor-container ax-{{ look() }} ax-default\"\n [class.ax-combo-box-trigger]=\"!searchable()\"\n [class.ax-state-disabled]=\"disabled()\"\n [class.ax-state-readonly]=\"readonly()\"\n>\n <ng-content select=\"ax-prefix\"></ng-content>\n\n <input\n ngCombobox\n #combobox=\"ngCombobox\"\n type=\"text\"\n class=\"ax-input\"\n [class.ax-combo-box-select-input]=\"!searchable()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly() || !searchable()\"\n [(value)]=\"searchText\"\n [(expanded)]=\"expanded\"\n (click)=\"onTriggerClick()\"\n />\n\n <button\n type=\"button\"\n class=\"ax-general-button-icon\"\n tabindex=\"-1\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"onTriggerClick()\"\n >\n <span\n class=\"ax-icon\"\n [class.ax-icon-chevron-down]=\"!expanded()\"\n [class.ax-icon-chevron-up]=\"expanded()\"\n ></span>\n </button>\n <ng-content select=\"ax-suffix\"></ng-content>\n</div>\n\n<ax-popover\n [target]=\"origin\"\n [openOn]=\"'manual'\"\n [closeOn]=\"'clickOut'\"\n [placement]=\"'bottom-start'\"\n [width]=\"origin.offsetWidth + 'px'\"\n [disabled]=\"disabled() || readonly()\"\n (onClosed)=\"onPopoverClosed()\"\n>\n <ng-template ngComboboxPopup [combobox]=\"combobox\">\n <div class=\"ax-combo-box-popup\" [class.ax-is-empty]=\"filteredItems().length === 0\">\n @if (filteredItems().length === 0) {\n <div class=\"ax-combo-box-empty\">{{ '@acorex:common.general.no-result-found' | translate | async }}</div>\n }\n <div\n ngListbox\n ngComboboxWidget\n #listbox=\"ngListbox\"\n class=\"ax-combo-box-listbox\"\n [class.ax-hidden]=\"filteredItems().length === 0\"\n focusMode=\"activedescendant\"\n selectionMode=\"explicit\"\n [tabindex]=\"-1\"\n [activeDescendant]=\"listbox.activeDescendant()\"\n [(value)]=\"selection\"\n (click)=\"commit()\"\n (keydown.enter)=\"commit()\"\n >\n @for (item of filteredItems(); track item.id) {\n <div ngOption class=\"ax-combo-box-option\" [value]=\"item.id\" [label]=\"item.text\">\n <span class=\"ax-combo-box-option-label\">{{ item.text }}</span>\n <span class=\"ax-combo-box-option-check\" aria-hidden=\"true\"></span>\n </div>\n }\n </div>\n </div>\n </ng-template>\n</ax-popover>\n", styles: ["@layer properties;@layer components{ax-combo-box{display:block;width:100%}ax-combo-box .ax-editor-container{justify-content:flex-start;gap:calc(var(--spacing, .25rem) * 1)}ax-combo-box .ax-editor-container.ax-state-disabled{cursor:not-allowed;opacity:50%}ax-combo-box .ax-editor-container.ax-state-disabled .ax-input,ax-combo-box .ax-editor-container.ax-state-disabled .ax-editor{cursor:not-allowed}ax-combo-box .ax-editor-container.ax-state-readonly{opacity:75%}ax-combo-box .ax-combo-box-trigger{cursor:pointer;--tw-outline-style: none;outline-style:none;-webkit-user-select:none;user-select:none}ax-combo-box .ax-combo-box-select-input{cursor:pointer;caret-color:transparent;-webkit-user-select:none;user-select:none}.ax-combo-box-popup{--ax-comp-combo-box-popup-max-height: 15rem;box-sizing:border-box;width:100%;overflow:hidden;border-radius:var(--ax-sys-border-radius);border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-sys-color-border-surface));background-color:rgba(var(--ax-sys-color-lightest-surface));--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ax-combo-box-popup:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-darkest-surface))}.ax-combo-box-popup.ax-is-empty{display:flex;min-height:calc(var(--spacing, .25rem) * 12);align-items:center;justify-content:center}.ax-combo-box-listbox{display:flex;max-height:var(--ax-comp-combo-box-popup-max-height);flex-direction:column;gap:calc(var(--spacing, .25rem) * .5);overflow:auto;padding:calc(var(--spacing, .25rem) * 1);--tw-outline-style: none;outline-style:none}.ax-combo-box-listbox.ax-hidden{display:none}.ax-combo-box-empty{width:100%;padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 3);text-align:center;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-combo-box-empty{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 60%,transparent)}}.ax-combo-box-option{display:flex;cursor:pointer;align-items:center;justify-content:space-between;border-radius:var(--ax-sys-border-radius);border-style:var(--tw-border-style);border-width:1px;border-color:transparent;padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface));--tw-outline-style: none;outline-style:none}.ax-combo-box-option:hover{background-color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-combo-box-option:hover{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 5%,transparent)}}.ax-combo-box-option[data-active=true]{border-color:rgba(var(--ax-sys-color-primary-surface))}.ax-combo-box-option[aria-selected=true]{border-color:rgba(var(--ax-sys-color-primary-surface));background-color:rgba(var(--ax-sys-color-primary-lightest-surface));color:rgba(var(--ax-sys-color-primary-surface))}.ax-combo-box-option[aria-selected=true]:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-primary-darkest-surface))}@supports (color: color-mix(in lab,red,red)){.ax-combo-box-option[aria-selected=true]:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-darkest-surface)) 25%,transparent)}}.ax-combo-box-option[aria-selected=true] .ax-combo-box-option-check{display:block;width:calc(var(--spacing, .25rem) * 2);height:calc(var(--spacing, .25rem) * 2);rotate:45deg;border-right-style:var(--tw-border-style);border-right-width:2px;border-bottom-style:var(--tw-border-style);border-bottom-width:2px;border-color:rgba(var(--ax-sys-color-primary-surface))}.ax-combo-box-option .ax-combo-box-option-check{display:none}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@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-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: Combobox, selector: "[ngCombobox]", inputs: ["disabled", "readonly", "softDisabled", "alwaysExpanded", "tabindex", "expanded", "value", "inlineSuggestion"], outputs: ["expandedChange", "valueChange"], exportAs: ["ngCombobox"] }, { kind: "directive", type: ComboboxPopup, selector: "ng-template[ngComboboxPopup]", inputs: ["combobox", "popupType"], exportAs: ["ngComboboxPopup"] }, { kind: "directive", type: ComboboxWidget, selector: "[ngComboboxWidget]", inputs: ["activeDescendant"], exportAs: ["ngComboboxWidget"] }, { kind: "directive", type: Listbox, selector: "[ngListbox]", inputs: ["id", "orientation", "multi", "wrap", "softDisabled", "focusMode", "selectionMode", "typeaheadDelay", "disabled", "readonly", "tabindex", "value"], outputs: ["valueChange"], exportAs: ["ngListbox"] }, { kind: "directive", type: Option, selector: "[ngOption]", inputs: ["id", "value", "disabled", "label"], exportAs: ["ngOption"] }, { kind: "component", type: AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "closeOnScroll", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
416
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXComboBoxComponent, isStandalone: true, selector: "ax-combo-box", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, adaptivityEnabled: { classPropertyName: "adaptivityEnabled", publicName: "adaptivityEnabled", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, alternate: { classPropertyName: "alternate", publicName: "alternate", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, emptyTemplate: { classPropertyName: "emptyTemplate", publicName: "emptyTemplate", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null }, selectedTemplate: { classPropertyName: "selectedTemplate", publicName: "selectedTemplate", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { look: "lookChange", value: "valueChange", onValueChanged: "onValueChanged", onFocus: "onFocus", onBlur: "onBlur", onItemClick: "onItemClick", onItemSelected: "onItemSelected", onOpened: "onOpened", onClosed: "onClosed" }, providers: [
|
|
417
|
+
{ provide: AXComponent, useExisting: AXComboBoxComponent },
|
|
418
|
+
{ provide: AXClearableComponent, useExisting: AXComboBoxComponent },
|
|
419
|
+
{ provide: AXClosableComponent, useExisting: AXComboBoxComponent },
|
|
420
|
+
], viewQueries: [{ propertyName: "comboboxRef", first: true, predicate: Combobox, descendants: true, isSignal: true }, { propertyName: "listboxRef", first: true, predicate: Listbox, descendants: true, isSignal: true }, { propertyName: "popoverRef", first: true, predicate: AXPopoverComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n #origin\n class=\"ax-editor-container ax-{{ look() }} ax-default\"\n [class.ax-combo-box-trigger]=\"!searchable()\"\n [class.ax-state-disabled]=\"disabled()\"\n [class.ax-state-readonly]=\"readonly()\"\n>\n <ng-content select=\"ax-prefix\"></ng-content>\n\n <div class=\"ax-combo-box-value\">\n @if (showSelectedTemplate()) {\n <div class=\"ax-combo-box-selected-content\" aria-hidden=\"true\">\n <ng-container\n [ngTemplateOutlet]=\"selectedTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: selectedItem() }\"\n />\n </div>\n }\n\n <input\n ngCombobox\n #combobox=\"ngCombobox\"\n type=\"text\"\n class=\"ax-input\"\n [class.ax-combo-box-select-input]=\"!searchable()\"\n [class.ax-combo-box-input-overlay]=\"showSelectedTemplate()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.inputmode]=\"searchable() ? null : 'none'\"\n [(value)]=\"searchText\"\n [(expanded)]=\"expanded\"\n (click)=\"onTriggerClick()\"\n (keydown)=\"onTriggerKeydown($event)\"\n (beforeinput)=\"onBeforeInput($event)\"\n (focus)=\"emitOnFocus($event)\"\n (blur)=\"emitOnBlur($event)\"\n />\n </div>\n\n @if (value() != null && !disabled() && !readonly()) {\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n\n <button\n type=\"button\"\n class=\"ax-general-button-icon\"\n tabindex=\"-1\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"onTriggerClick()\"\n >\n <span class=\"ax-icon\" [class.ax-icon-chevron-down]=\"!expanded()\" [class.ax-icon-chevron-up]=\"expanded()\"></span>\n </button>\n <ng-content select=\"ax-suffix\"></ng-content>\n</div>\n\n<ax-popover\n [target]=\"origin\"\n [openOn]=\"'manual'\"\n [closeOn]=\"'clickOut'\"\n [placement]=\"'bottom-start'\"\n [width]=\"isActionsheetStyle() ? '100%' : origin.offsetWidth + 'px'\"\n [adaptivityEnabled]=\"isActionsheetStyle()\"\n [disabled]=\"disabled() || readonly()\"\n (onClosed)=\"onPopoverClosed()\"\n>\n <ng-template ngComboboxPopup [combobox]=\"combobox\">\n <div\n class=\"ax-combo-box-popup\"\n [class.ax-is-empty]=\"filteredItems().length === 0\"\n [class.ax-is-actionsheet]=\"isActionsheetStyle()\"\n >\n @if (isActionsheetStyle()) {\n <ax-header class=\"ax-solid\">\n <ax-title>{{ caption() || placeholder() || ('@acorex:selectbox.popover.title' | translate | async) }}</ax-title>\n <ax-close-button></ax-close-button>\n </ax-header>\n }\n <ng-content select=\"ax-header\"></ng-content>\n @if (expanded()) {\n @if (filteredItems().length === 0) {\n @if (emptyTemplate()) {\n <ng-container [ngTemplateOutlet]=\"emptyTemplate()!\" />\n } @else {\n <div class=\"ax-combo-box-empty\">{{ '@acorex:common.general.no-result-found' | translate | async }}</div>\n }\n }\n <div\n ngListbox\n ngComboboxWidget\n #listbox=\"ngListbox\"\n class=\"ax-combo-box-listbox\"\n [class.ax-hidden]=\"filteredItems().length === 0\"\n focusMode=\"activedescendant\"\n selectionMode=\"explicit\"\n [tabindex]=\"-1\"\n [activeDescendant]=\"listbox.activeDescendant()\"\n [(value)]=\"selection\"\n (click)=\"commit($event)\"\n (keydown.enter)=\"commit()\"\n (keydown.space)=\"commit()\"\n >\n @for (item of filteredItems(); track trackItemKey($index, item); let odd = $odd) {\n <div\n ngOption\n class=\"ax-combo-box-option-host\"\n [class.ax-combo-box-option]=\"!itemTemplate()\"\n [class.ax-state-alternate]=\"alternate() && odd\"\n [value]=\"item.id\"\n [label]=\"item.text\"\n >\n @if (itemTemplate()) {\n <ng-container [ngTemplateOutlet]=\"itemTemplate()!\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n } @else {\n <span class=\"ax-combo-box-option-label\">{{ item.text }}</span>\n @if (selectedItem()?.id === item.id) {\n <ax-icon class=\"ax-combo-box-option-check ax-icon ax-icon-check\" aria-hidden=\"true\"></ax-icon>\n }\n }\n </div>\n }\n </div>\n }\n <ng-content select=\"ax-footer\"></ng-content>\n </div>\n </ng-template>\n</ax-popover>\n", styles: ["@layer properties;@layer components{ax-combo-box{display:block;width:100%}ax-combo-box .ax-editor-container{justify-content:flex-start;gap:calc(var(--spacing, .25rem) * 1)}ax-combo-box .ax-editor-container.ax-state-disabled{cursor:not-allowed;opacity:50%}ax-combo-box .ax-editor-container.ax-state-disabled .ax-input,ax-combo-box .ax-editor-container.ax-state-disabled .ax-editor{cursor:not-allowed}ax-combo-box .ax-editor-container.ax-state-readonly{opacity:75%}ax-combo-box .ax-combo-box-trigger{cursor:pointer;-webkit-user-select:none;user-select:none}ax-combo-box .ax-combo-box-value{position:relative;display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;align-items:center;overflow:hidden}ax-combo-box .ax-combo-box-selected-content{pointer-events:none;position:relative;z-index:0;display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;align-items:center;overflow:hidden}ax-combo-box .ax-combo-box-select-input{cursor:pointer;caret-color:transparent;-webkit-user-select:none;user-select:none}ax-combo-box .ax-combo-box-input-overlay{position:absolute;inset:calc(var(--spacing, .25rem) * 0);z-index:10;margin:calc(var(--spacing, .25rem) * 0)!important;height:100%;width:100%;border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0)!important;color:transparent;caret-color:transparent}.ax-combo-box-popup{--ax-comp-combo-box-popup-max-height: 15rem;box-sizing:border-box;display:flex;width:100%;flex-direction:column;overflow:hidden;border-radius:var(--ax-sys-border-radius);border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-sys-color-border-surface));background-color:rgba(var(--ax-sys-color-lightest-surface));--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ax-combo-box-popup:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-darkest-surface))}.ax-combo-box-popup.ax-is-empty{min-height:calc(var(--spacing, .25rem) * 12)}.ax-combo-box-popup.ax-is-actionsheet{--ax-comp-combo-box-popup-max-height: min(50vh, 24rem);border-bottom-right-radius:0;border-bottom-left-radius:0;--tw-shadow: 0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ax-combo-box-popup.ax-is-actionsheet>ax-header.ax-solid{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-lightest-surface))}.ax-combo-box-popup.ax-is-actionsheet>ax-header.ax-solid .ax-icon-check{color:rgba(var(--ax-sys-color-primary-surface))}.ax-combo-box-popup.ax-is-actionsheet>ax-header.ax-solid ax-title{font-size:var(--text-base, 1rem);line-height:var(--tw-leading, var(--text-base--line-height, 1.5 ));--tw-leading: calc(var(--spacing, .25rem) * 6);line-height:calc(var(--spacing, .25rem) * 6);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}.ax-combo-box-popup>ax-header:not(.ax-solid),.ax-combo-box-popup>ax-footer{flex-shrink:0;border-color:rgba(var(--ax-sys-color-border-lightest-surface))}.ax-combo-box-popup>ax-header:not(.ax-solid){border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.ax-combo-box-popup>ax-footer{border-top-style:var(--tw-border-style);border-top-width:1px}.ax-combo-box-listbox{display:flex;max-height:var(--ax-comp-combo-box-popup-max-height);flex-direction:column;overflow:auto;--tw-outline-style: none;outline-style:none}.ax-combo-box-listbox.ax-hidden{display:none}.ax-combo-box-empty{width:100%;padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 3);text-align:center;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-combo-box-empty{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 60%,transparent)}}.ax-combo-box-option-host{box-sizing:border-box;cursor:pointer;border-style:var(--tw-border-style);border-width:1px;border-color:transparent;--tw-outline-style: none;outline-style:none}.ax-combo-box-option-host.ax-state-alternate{background-color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-combo-box-option-host.ax-state-alternate{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 5%,transparent)}}.ax-combo-box-option-host:hover,.ax-combo-box-option-host[data-active=true]{background-color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-combo-box-option-host:hover,.ax-combo-box-option-host[data-active=true]{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 10%,transparent)}}.ax-combo-box-option-host.ax-state-alternate:hover,.ax-combo-box-option-host.ax-state-alternate[data-active=true]{background-color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-combo-box-option-host.ax-state-alternate:hover,.ax-combo-box-option-host.ax-state-alternate[data-active=true]{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 15%,transparent)}}.ax-combo-box-option-host[aria-selected=true],.ax-combo-box-option-host[aria-selected=true]:hover,.ax-combo-box-option-host[aria-selected=true][data-active=true],.ax-combo-box-option-host.ax-state-alternate[aria-selected=true],.ax-combo-box-option-host.ax-state-alternate[aria-selected=true]:hover,.ax-combo-box-option-host.ax-state-alternate[aria-selected=true][data-active=true]{background-color:rgba(var(--ax-sys-color-primary-lightest-surface))}:is(.ax-combo-box-option-host[aria-selected=true],.ax-combo-box-option-host[aria-selected=true]:hover,.ax-combo-box-option-host[aria-selected=true][data-active=true],.ax-combo-box-option-host.ax-state-alternate[aria-selected=true],.ax-combo-box-option-host.ax-state-alternate[aria-selected=true]:hover,.ax-combo-box-option-host.ax-state-alternate[aria-selected=true][data-active=true]):where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-primary-darkest-surface))}@supports (color: color-mix(in lab,red,red)){:is(.ax-combo-box-option-host[aria-selected=true],.ax-combo-box-option-host[aria-selected=true]:hover,.ax-combo-box-option-host[aria-selected=true][data-active=true],.ax-combo-box-option-host.ax-state-alternate[aria-selected=true],.ax-combo-box-option-host.ax-state-alternate[aria-selected=true]:hover,.ax-combo-box-option-host.ax-state-alternate[aria-selected=true][data-active=true]):where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-darkest-surface)) 25%,transparent)}}.ax-combo-box-option-host[aria-selected=true][data-active=true],.ax-combo-box-option-host.ax-state-alternate[aria-selected=true][data-active=true]{background-color:rgba(var(--ax-sys-color-primary-lightest-surface))}@supports (color: color-mix(in lab,red,red)){.ax-combo-box-option-host[aria-selected=true][data-active=true],.ax-combo-box-option-host.ax-state-alternate[aria-selected=true][data-active=true]{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-lightest-surface)) 80%,transparent)}}:is(.ax-combo-box-option-host[aria-selected=true][data-active=true],.ax-combo-box-option-host.ax-state-alternate[aria-selected=true][data-active=true]):where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-primary-darkest-surface))}@supports (color: color-mix(in lab,red,red)){:is(.ax-combo-box-option-host[aria-selected=true][data-active=true],.ax-combo-box-option-host.ax-state-alternate[aria-selected=true][data-active=true]):where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-darkest-surface)) 40%,transparent)}}.ax-combo-box-option{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2);padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}.ax-combo-box-option[aria-selected=true]{color:rgba(var(--ax-sys-color-primary-surface))}.ax-combo-box-option .ax-combo-box-option-check{flex-shrink:0;color:rgba(var(--ax-sys-color-primary-surface))}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{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-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-leading: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i1.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["closeAll", "icon"] }, { kind: "component", type: i1.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: "directive", type: Combobox, selector: "[ngCombobox]", inputs: ["disabled", "readonly", "softDisabled", "alwaysExpanded", "tabindex", "expanded", "value", "inlineSuggestion"], outputs: ["expandedChange", "valueChange"], exportAs: ["ngCombobox"] }, { kind: "directive", type: ComboboxPopup, selector: "ng-template[ngComboboxPopup]", inputs: ["combobox", "popupType"], exportAs: ["ngComboboxPopup"] }, { kind: "directive", type: ComboboxWidget, selector: "[ngComboboxWidget]", inputs: ["activeDescendant"], exportAs: ["ngComboboxWidget"] }, { kind: "directive", type: Listbox, selector: "[ngListbox]", inputs: ["id", "orientation", "multi", "wrap", "softDisabled", "focusMode", "selectionMode", "typeaheadDelay", "disabled", "readonly", "tabindex", "value"], outputs: ["valueChange"], exportAs: ["ngListbox"] }, { kind: "directive", type: Option, selector: "[ngOption]", inputs: ["id", "value", "disabled", "label"], exportAs: ["ngOption"] }, { kind: "component", type: AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "visualContextScope", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "closeOnScroll", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
213
421
|
}
|
|
214
422
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXComboBoxComponent, decorators: [{
|
|
215
423
|
type: Component,
|
|
216
|
-
args: [{ selector: 'ax-combo-box', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
217
|
-
|
|
424
|
+
args: [{ selector: 'ax-combo-box', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
425
|
+
AXDecoratorModule,
|
|
426
|
+
Combobox,
|
|
427
|
+
ComboboxPopup,
|
|
428
|
+
ComboboxWidget,
|
|
429
|
+
Listbox,
|
|
430
|
+
Option,
|
|
431
|
+
AXPopoverComponent,
|
|
432
|
+
AXTranslatorPipe,
|
|
433
|
+
AsyncPipe,
|
|
434
|
+
NgTemplateOutlet,
|
|
435
|
+
], providers: [
|
|
436
|
+
{ provide: AXComponent, useExisting: AXComboBoxComponent },
|
|
437
|
+
{ provide: AXClearableComponent, useExisting: AXComboBoxComponent },
|
|
438
|
+
{ provide: AXClosableComponent, useExisting: AXComboBoxComponent },
|
|
439
|
+
], template: "<div\n #origin\n class=\"ax-editor-container ax-{{ look() }} ax-default\"\n [class.ax-combo-box-trigger]=\"!searchable()\"\n [class.ax-state-disabled]=\"disabled()\"\n [class.ax-state-readonly]=\"readonly()\"\n>\n <ng-content select=\"ax-prefix\"></ng-content>\n\n <div class=\"ax-combo-box-value\">\n @if (showSelectedTemplate()) {\n <div class=\"ax-combo-box-selected-content\" aria-hidden=\"true\">\n <ng-container\n [ngTemplateOutlet]=\"selectedTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: selectedItem() }\"\n />\n </div>\n }\n\n <input\n ngCombobox\n #combobox=\"ngCombobox\"\n type=\"text\"\n class=\"ax-input\"\n [class.ax-combo-box-select-input]=\"!searchable()\"\n [class.ax-combo-box-input-overlay]=\"showSelectedTemplate()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [attr.inputmode]=\"searchable() ? null : 'none'\"\n [(value)]=\"searchText\"\n [(expanded)]=\"expanded\"\n (click)=\"onTriggerClick()\"\n (keydown)=\"onTriggerKeydown($event)\"\n (beforeinput)=\"onBeforeInput($event)\"\n (focus)=\"emitOnFocus($event)\"\n (blur)=\"emitOnBlur($event)\"\n />\n </div>\n\n @if (value() != null && !disabled() && !readonly()) {\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n\n <button\n type=\"button\"\n class=\"ax-general-button-icon\"\n tabindex=\"-1\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"onTriggerClick()\"\n >\n <span class=\"ax-icon\" [class.ax-icon-chevron-down]=\"!expanded()\" [class.ax-icon-chevron-up]=\"expanded()\"></span>\n </button>\n <ng-content select=\"ax-suffix\"></ng-content>\n</div>\n\n<ax-popover\n [target]=\"origin\"\n [openOn]=\"'manual'\"\n [closeOn]=\"'clickOut'\"\n [placement]=\"'bottom-start'\"\n [width]=\"isActionsheetStyle() ? '100%' : origin.offsetWidth + 'px'\"\n [adaptivityEnabled]=\"isActionsheetStyle()\"\n [disabled]=\"disabled() || readonly()\"\n (onClosed)=\"onPopoverClosed()\"\n>\n <ng-template ngComboboxPopup [combobox]=\"combobox\">\n <div\n class=\"ax-combo-box-popup\"\n [class.ax-is-empty]=\"filteredItems().length === 0\"\n [class.ax-is-actionsheet]=\"isActionsheetStyle()\"\n >\n @if (isActionsheetStyle()) {\n <ax-header class=\"ax-solid\">\n <ax-title>{{ caption() || placeholder() || ('@acorex:selectbox.popover.title' | translate | async) }}</ax-title>\n <ax-close-button></ax-close-button>\n </ax-header>\n }\n <ng-content select=\"ax-header\"></ng-content>\n @if (expanded()) {\n @if (filteredItems().length === 0) {\n @if (emptyTemplate()) {\n <ng-container [ngTemplateOutlet]=\"emptyTemplate()!\" />\n } @else {\n <div class=\"ax-combo-box-empty\">{{ '@acorex:common.general.no-result-found' | translate | async }}</div>\n }\n }\n <div\n ngListbox\n ngComboboxWidget\n #listbox=\"ngListbox\"\n class=\"ax-combo-box-listbox\"\n [class.ax-hidden]=\"filteredItems().length === 0\"\n focusMode=\"activedescendant\"\n selectionMode=\"explicit\"\n [tabindex]=\"-1\"\n [activeDescendant]=\"listbox.activeDescendant()\"\n [(value)]=\"selection\"\n (click)=\"commit($event)\"\n (keydown.enter)=\"commit()\"\n (keydown.space)=\"commit()\"\n >\n @for (item of filteredItems(); track trackItemKey($index, item); let odd = $odd) {\n <div\n ngOption\n class=\"ax-combo-box-option-host\"\n [class.ax-combo-box-option]=\"!itemTemplate()\"\n [class.ax-state-alternate]=\"alternate() && odd\"\n [value]=\"item.id\"\n [label]=\"item.text\"\n >\n @if (itemTemplate()) {\n <ng-container [ngTemplateOutlet]=\"itemTemplate()!\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n } @else {\n <span class=\"ax-combo-box-option-label\">{{ item.text }}</span>\n @if (selectedItem()?.id === item.id) {\n <ax-icon class=\"ax-combo-box-option-check ax-icon ax-icon-check\" aria-hidden=\"true\"></ax-icon>\n }\n }\n </div>\n }\n </div>\n }\n <ng-content select=\"ax-footer\"></ng-content>\n </div>\n </ng-template>\n</ax-popover>\n", styles: ["@layer properties;@layer components{ax-combo-box{display:block;width:100%}ax-combo-box .ax-editor-container{justify-content:flex-start;gap:calc(var(--spacing, .25rem) * 1)}ax-combo-box .ax-editor-container.ax-state-disabled{cursor:not-allowed;opacity:50%}ax-combo-box .ax-editor-container.ax-state-disabled .ax-input,ax-combo-box .ax-editor-container.ax-state-disabled .ax-editor{cursor:not-allowed}ax-combo-box .ax-editor-container.ax-state-readonly{opacity:75%}ax-combo-box .ax-combo-box-trigger{cursor:pointer;-webkit-user-select:none;user-select:none}ax-combo-box .ax-combo-box-value{position:relative;display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;align-items:center;overflow:hidden}ax-combo-box .ax-combo-box-selected-content{pointer-events:none;position:relative;z-index:0;display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;align-items:center;overflow:hidden}ax-combo-box .ax-combo-box-select-input{cursor:pointer;caret-color:transparent;-webkit-user-select:none;user-select:none}ax-combo-box .ax-combo-box-input-overlay{position:absolute;inset:calc(var(--spacing, .25rem) * 0);z-index:10;margin:calc(var(--spacing, .25rem) * 0)!important;height:100%;width:100%;border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0)!important;color:transparent;caret-color:transparent}.ax-combo-box-popup{--ax-comp-combo-box-popup-max-height: 15rem;box-sizing:border-box;display:flex;width:100%;flex-direction:column;overflow:hidden;border-radius:var(--ax-sys-border-radius);border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-sys-color-border-surface));background-color:rgba(var(--ax-sys-color-lightest-surface));--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ax-combo-box-popup:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-darkest-surface))}.ax-combo-box-popup.ax-is-empty{min-height:calc(var(--spacing, .25rem) * 12)}.ax-combo-box-popup.ax-is-actionsheet{--ax-comp-combo-box-popup-max-height: min(50vh, 24rem);border-bottom-right-radius:0;border-bottom-left-radius:0;--tw-shadow: 0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ax-combo-box-popup.ax-is-actionsheet>ax-header.ax-solid{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-lightest-surface))}.ax-combo-box-popup.ax-is-actionsheet>ax-header.ax-solid .ax-icon-check{color:rgba(var(--ax-sys-color-primary-surface))}.ax-combo-box-popup.ax-is-actionsheet>ax-header.ax-solid ax-title{font-size:var(--text-base, 1rem);line-height:var(--tw-leading, var(--text-base--line-height, 1.5 ));--tw-leading: calc(var(--spacing, .25rem) * 6);line-height:calc(var(--spacing, .25rem) * 6);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}.ax-combo-box-popup>ax-header:not(.ax-solid),.ax-combo-box-popup>ax-footer{flex-shrink:0;border-color:rgba(var(--ax-sys-color-border-lightest-surface))}.ax-combo-box-popup>ax-header:not(.ax-solid){border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.ax-combo-box-popup>ax-footer{border-top-style:var(--tw-border-style);border-top-width:1px}.ax-combo-box-listbox{display:flex;max-height:var(--ax-comp-combo-box-popup-max-height);flex-direction:column;overflow:auto;--tw-outline-style: none;outline-style:none}.ax-combo-box-listbox.ax-hidden{display:none}.ax-combo-box-empty{width:100%;padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 3);text-align:center;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-combo-box-empty{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 60%,transparent)}}.ax-combo-box-option-host{box-sizing:border-box;cursor:pointer;border-style:var(--tw-border-style);border-width:1px;border-color:transparent;--tw-outline-style: none;outline-style:none}.ax-combo-box-option-host.ax-state-alternate{background-color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-combo-box-option-host.ax-state-alternate{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 5%,transparent)}}.ax-combo-box-option-host:hover,.ax-combo-box-option-host[data-active=true]{background-color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-combo-box-option-host:hover,.ax-combo-box-option-host[data-active=true]{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 10%,transparent)}}.ax-combo-box-option-host.ax-state-alternate:hover,.ax-combo-box-option-host.ax-state-alternate[data-active=true]{background-color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-combo-box-option-host.ax-state-alternate:hover,.ax-combo-box-option-host.ax-state-alternate[data-active=true]{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 15%,transparent)}}.ax-combo-box-option-host[aria-selected=true],.ax-combo-box-option-host[aria-selected=true]:hover,.ax-combo-box-option-host[aria-selected=true][data-active=true],.ax-combo-box-option-host.ax-state-alternate[aria-selected=true],.ax-combo-box-option-host.ax-state-alternate[aria-selected=true]:hover,.ax-combo-box-option-host.ax-state-alternate[aria-selected=true][data-active=true]{background-color:rgba(var(--ax-sys-color-primary-lightest-surface))}:is(.ax-combo-box-option-host[aria-selected=true],.ax-combo-box-option-host[aria-selected=true]:hover,.ax-combo-box-option-host[aria-selected=true][data-active=true],.ax-combo-box-option-host.ax-state-alternate[aria-selected=true],.ax-combo-box-option-host.ax-state-alternate[aria-selected=true]:hover,.ax-combo-box-option-host.ax-state-alternate[aria-selected=true][data-active=true]):where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-primary-darkest-surface))}@supports (color: color-mix(in lab,red,red)){:is(.ax-combo-box-option-host[aria-selected=true],.ax-combo-box-option-host[aria-selected=true]:hover,.ax-combo-box-option-host[aria-selected=true][data-active=true],.ax-combo-box-option-host.ax-state-alternate[aria-selected=true],.ax-combo-box-option-host.ax-state-alternate[aria-selected=true]:hover,.ax-combo-box-option-host.ax-state-alternate[aria-selected=true][data-active=true]):where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-darkest-surface)) 25%,transparent)}}.ax-combo-box-option-host[aria-selected=true][data-active=true],.ax-combo-box-option-host.ax-state-alternate[aria-selected=true][data-active=true]{background-color:rgba(var(--ax-sys-color-primary-lightest-surface))}@supports (color: color-mix(in lab,red,red)){.ax-combo-box-option-host[aria-selected=true][data-active=true],.ax-combo-box-option-host.ax-state-alternate[aria-selected=true][data-active=true]{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-lightest-surface)) 80%,transparent)}}:is(.ax-combo-box-option-host[aria-selected=true][data-active=true],.ax-combo-box-option-host.ax-state-alternate[aria-selected=true][data-active=true]):where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-primary-darkest-surface))}@supports (color: color-mix(in lab,red,red)){:is(.ax-combo-box-option-host[aria-selected=true][data-active=true],.ax-combo-box-option-host.ax-state-alternate[aria-selected=true][data-active=true]):where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-darkest-surface)) 40%,transparent)}}.ax-combo-box-option{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2);padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}.ax-combo-box-option[aria-selected=true]{color:rgba(var(--ax-sys-color-primary-surface))}.ax-combo-box-option .ax-combo-box-option-check{flex-shrink:0;color:rgba(var(--ax-sys-color-primary-surface))}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{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-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-leading: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
|
|
440
|
+
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], adaptivityEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "adaptivityEnabled", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], alternate: [{ type: i0.Input, args: [{ isSignal: true, alias: "alternate", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], emptyTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyTemplate", required: false }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], selectedTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedTemplate", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], look: [{ type: i0.Input, args: [{ isSignal: true, alias: "look", required: false }] }, { type: i0.Output, args: ["lookChange"] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], onValueChanged: [{ type: i0.Output, args: ["onValueChanged"] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], onItemClick: [{ type: i0.Output, args: ["onItemClick"] }], onItemSelected: [{ type: i0.Output, args: ["onItemSelected"] }], onOpened: [{ type: i0.Output, args: ["onOpened"] }], onClosed: [{ type: i0.Output, args: ["onClosed"] }], comboboxRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => Combobox), { isSignal: true }] }], listboxRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => Listbox), { isSignal: true }] }], popoverRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXPopoverComponent), { isSignal: true }] }] } });
|
|
218
441
|
|
|
219
442
|
class AXComboBoxModule {
|
|
220
443
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXComboBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|