@radix-ng/primitives 1.0.4 → 1.0.6
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/radix-ng-primitives-accordion.mjs +35 -27
- package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs +34 -34
- package/fesm2022/radix-ng-primitives-arrow.mjs +3 -3
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +5 -4
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-autocomplete.mjs +175 -125
- package/fesm2022/radix-ng-primitives-autocomplete.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-avatar.mjs +25 -19
- package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-button.mjs +11 -7
- package/fesm2022/radix-ng-primitives-button.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-calendar.mjs +140 -90
- package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-checkbox.mjs +61 -40
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collapsible.mjs +35 -24
- package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-combobox.mjs +278 -177
- package/fesm2022/radix-ng-primitives-combobox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-composite.mjs +76 -35
- package/fesm2022/radix-ng-primitives-composite.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-config.mjs +7 -5
- package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-context-menu.mjs +48 -22
- package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-core.mjs +44 -28
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-cropper.mjs +73 -45
- package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-date-field.mjs +70 -40
- package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dialog.mjs +93 -67
- package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-direction-provider.mjs +5 -4
- package/fesm2022/radix-ng-primitives-direction-provider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +20 -16
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-drawer.mjs +107 -81
- package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-editable.mjs +53 -39
- package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-field.mjs +69 -42
- package/fesm2022/radix-ng-primitives-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-fieldset.mjs +8 -7
- package/fesm2022/radix-ng-primitives-fieldset.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs +77 -40
- package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-focus-guards.mjs +3 -3
- package/fesm2022/radix-ng-primitives-focus-scope.mjs +7 -5
- package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-form.mjs +25 -16
- package/fesm2022/radix-ng-primitives-form.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-input.mjs +41 -22
- package/fesm2022/radix-ng-primitives-input.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-label.mjs +7 -5
- package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menu.mjs +274 -154
- package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menubar.mjs +35 -17
- package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-meter.mjs +41 -30
- package/fesm2022/radix-ng-primitives-meter.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs +220 -183
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-number-field.mjs +87 -59
- package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-pagination.mjs +48 -38
- package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popover.mjs +150 -107
- package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popper.mjs +79 -47
- package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-portal.mjs +20 -13
- package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-presence.mjs +3 -3
- package/fesm2022/radix-ng-primitives-preview-card.mjs +119 -74
- package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-progress.mjs +43 -31
- package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +177 -168
- package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-scroll-area.mjs +54 -38
- package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-select.mjs +595 -102
- package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-separator.mjs +7 -5
- package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-slider.mjs +101 -63
- package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-stepper.mjs +53 -39
- package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +44 -25
- package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tabs.mjs +72 -47
- package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-time-field.mjs +72 -41
- package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toast.mjs +75 -56
- package/fesm2022/radix-ng-primitives-toast.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +29 -19
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +16 -11
- package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toolbar.mjs +38 -30
- package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tooltip.mjs +118 -63
- package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs +31 -20
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
- package/package.json +2 -2
- package/types/radix-ng-primitives-autocomplete.d.ts +3 -1
- package/types/radix-ng-primitives-combobox.d.ts +28 -9
- package/types/radix-ng-primitives-composite.d.ts +2 -0
- package/types/radix-ng-primitives-context-menu.d.ts +2 -0
- package/types/radix-ng-primitives-dialog.d.ts +6 -3
- package/types/radix-ng-primitives-floating-focus-manager.d.ts +11 -0
- package/types/radix-ng-primitives-menu.d.ts +47 -15
- package/types/radix-ng-primitives-menubar.d.ts +6 -1
- package/types/radix-ng-primitives-navigation-menu.d.ts +8 -6
- package/types/radix-ng-primitives-popover.d.ts +12 -4
- package/types/radix-ng-primitives-preview-card.d.ts +18 -5
- package/types/radix-ng-primitives-radio.d.ts +100 -65
- package/types/radix-ng-primitives-select.d.ts +186 -391
- package/types/radix-ng-primitives-switch.d.ts +3 -2
- package/types/radix-ng-primitives-tooltip.d.ts +17 -3
|
@@ -4,7 +4,7 @@ import * as i1 from '@radix-ng/primitives/popper';
|
|
|
4
4
|
import { RdxPopperAnchor, RdxPopperArrow, RdxPopper, RdxPopperContentWrapper, provideRdxPopperContentWrapper, provideRdxPopperContentConfig, injectPopperContentWrapperContext, RdxPopperContent } from '@radix-ng/primitives/popper';
|
|
5
5
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
6
6
|
import * as i2 from '@radix-ng/primitives/core';
|
|
7
|
-
import { useFilter, injectId, useListHighlight, useTransitionStatus, createContext, createFloatingRootContext, isItemEqualToValue, isNullish,
|
|
7
|
+
import { useFilter, injectId, useListHighlight, useTransitionStatus, createContext, createFloatingRootContext, isItemEqualToValue, isNullish, createCancelableChangeEventDetails, itemToStringLabel, provideFloatingTree, provideFloatingRootContext, setupInternalBackdrop, RDX_FLOATING_ROOT_CONTEXT, RDX_FLOATING_REGISTRATION, useAnchoredScrollLock, RdxFloatingNodeRegistration, rdxDevError } from '@radix-ng/primitives/core';
|
|
8
8
|
import { injectDirection } from '@radix-ng/primitives/direction-provider';
|
|
9
9
|
import * as i1$1 from '@radix-ng/primitives/dismissable-layer';
|
|
10
10
|
import { RdxFloatingInsideElement, RdxDismiss } from '@radix-ng/primitives/dismissable-layer';
|
|
@@ -23,10 +23,10 @@ import { provideRdxPresenceContext } from '@radix-ng/primitives/presence';
|
|
|
23
23
|
* @group Components
|
|
24
24
|
*/
|
|
25
25
|
class RdxComboboxAnchor {
|
|
26
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
27
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
26
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxAnchor, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
27
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxComboboxAnchor, isStandalone: true, selector: "[rdxComboboxAnchor]", exportAs: ["rdxComboboxAnchor"], hostDirectives: [{ directive: i1.RdxPopperAnchor }], ngImport: i0 }); }
|
|
28
28
|
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxAnchor, decorators: [{
|
|
30
30
|
type: Directive,
|
|
31
31
|
args: [{
|
|
32
32
|
selector: '[rdxComboboxAnchor]',
|
|
@@ -42,10 +42,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
42
42
|
* @group Components
|
|
43
43
|
*/
|
|
44
44
|
class RdxComboboxArrow {
|
|
45
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
46
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
45
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxArrow, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
46
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxComboboxArrow, isStandalone: true, selector: "[rdxComboboxArrow]", exportAs: ["rdxComboboxArrow"], hostDirectives: [{ directive: i1.RdxPopperArrow, inputs: ["width", "width", "height", "height"] }], ngImport: i0 }); }
|
|
47
47
|
}
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxArrow, decorators: [{
|
|
49
49
|
type: Directive,
|
|
50
50
|
args: [{
|
|
51
51
|
selector: '[rdxComboboxArrow]',
|
|
@@ -68,33 +68,40 @@ function useComboboxEngine(config) {
|
|
|
68
68
|
const { injector } = config;
|
|
69
69
|
const defaultFilter = useFilter();
|
|
70
70
|
const listId = injectId(config.listIdPrefix);
|
|
71
|
-
const labelId = signal(undefined,
|
|
72
|
-
|
|
71
|
+
const labelId = signal(undefined, /* @ts-ignore */
|
|
72
|
+
...(ngDevMode ? [{ debugName: "labelId" }] : /* istanbul ignore next */ []));
|
|
73
|
+
const inputElement = signal(null, /* @ts-ignore */
|
|
74
|
+
...(ngDevMode ? [{ debugName: "inputElement" }] : /* istanbul ignore next */ []));
|
|
73
75
|
// Where the text input lives relative to the popup (Base UI's `inputInsidePopup`), reported by the
|
|
74
76
|
// input on mount from its positioner ancestor. Drives the Trigger's role:
|
|
75
77
|
// - `outside` → the input is the tab stop; the Trigger is a `tabindex="-1"` toggle.
|
|
76
78
|
// - `inside` → the Trigger is the focusable `role="combobox"` control (`aria-haspopup="dialog"`).
|
|
77
79
|
// - `unknown` → no input has mounted yet (e.g. the input lives in a not-yet-opened popup); the
|
|
78
80
|
// Trigger stays a normal focusable button so it is reachable by `Tab` before the first open.
|
|
79
|
-
const inputLayout = signal('unknown',
|
|
81
|
+
const inputLayout = signal('unknown', /* @ts-ignore */
|
|
82
|
+
...(ngDevMode ? [{ debugName: "inputLayout" }] : /* istanbul ignore next */ []));
|
|
80
83
|
// Whether the popup was opened by a touch interaction. When the input lives inside the popup, a
|
|
81
84
|
// touch-open focuses the popup (not the input) so Android doesn't raise the virtual keyboard
|
|
82
85
|
// (Base UI; iOS handles this itself). Reset to `false` on keyboard/mouse opens.
|
|
83
|
-
const openedByTouch = signal(false,
|
|
86
|
+
const openedByTouch = signal(false, /* @ts-ignore */
|
|
87
|
+
...(ngDevMode ? [{ debugName: "openedByTouch" }] : /* istanbul ignore next */ []));
|
|
84
88
|
// Whether the popup directive is currently mounted (open through the close/exit animation, until the
|
|
85
89
|
// presence machine unmounts it). Distinguishes "Escape closed the popup" (still mounted this tick)
|
|
86
90
|
// from "Escape on an already-closed combobox" (unmounted) — Base UI's `mounted`, since `open()`
|
|
87
91
|
// flips synchronously when the input's Escape handler (or the dismiss mechanism) closes the popup.
|
|
88
|
-
const popupMounted = signal(false,
|
|
92
|
+
const popupMounted = signal(false, /* @ts-ignore */
|
|
93
|
+
...(ngDevMode ? [{ debugName: "popupMounted" }] : /* istanbul ignore next */ []));
|
|
89
94
|
let triggerElement = null;
|
|
90
95
|
// Tracks whether the last interaction was the keyboard, so the highlight doesn't jump to an item
|
|
91
96
|
// the cursor happens to rest on when arrow-key navigation scrolls the list under a still pointer.
|
|
92
97
|
let keyboardActive = false;
|
|
93
|
-
const _items = signal([],
|
|
98
|
+
const _items = signal([], /* @ts-ignore */
|
|
99
|
+
...(ngDevMode ? [{ debugName: "_items" }] : /* istanbul ignore next */ []));
|
|
94
100
|
const orderedItems = computed(() => {
|
|
95
101
|
const items = [..._items()];
|
|
96
102
|
return items.sort((a, b) => domOrder(a.element, b.element));
|
|
97
|
-
},
|
|
103
|
+
}, /* @ts-ignore */
|
|
104
|
+
...(ngDevMode ? [{ debugName: "orderedItems" }] : /* istanbul ignore next */ []));
|
|
98
105
|
const matchesFilter = (item) => {
|
|
99
106
|
if (!config.filteringEnabled()) {
|
|
100
107
|
return true;
|
|
@@ -114,8 +121,10 @@ function useComboboxEngine(config) {
|
|
|
114
121
|
const matching = orderedItems().filter((item) => matchesFilter(item));
|
|
115
122
|
const limit = config.limit();
|
|
116
123
|
return limit >= 0 ? matching.slice(0, limit) : matching;
|
|
117
|
-
},
|
|
118
|
-
|
|
124
|
+
}, /* @ts-ignore */
|
|
125
|
+
...(ngDevMode ? [{ debugName: "visibleItems" }] : /* istanbul ignore next */ []));
|
|
126
|
+
const visibleSet = computed(() => new Set(visibleItems()), /* @ts-ignore */
|
|
127
|
+
...(ngDevMode ? [{ debugName: "visibleSet" }] : /* istanbul ignore next */ []));
|
|
119
128
|
const isVisible = (item) => visibleSet().has(item);
|
|
120
129
|
const filteredItems = computed(() => {
|
|
121
130
|
const data = config.items();
|
|
@@ -139,8 +148,10 @@ function useComboboxEngine(config) {
|
|
|
139
148
|
return cap(data.filter((value) => filter
|
|
140
149
|
? filter(value, query, config.itemToString)
|
|
141
150
|
: defaultFilter.contains(config.itemToString(value), query)));
|
|
142
|
-
},
|
|
143
|
-
|
|
151
|
+
}, /* @ts-ignore */
|
|
152
|
+
...(ngDevMode ? [{ debugName: "filteredItems" }] : /* istanbul ignore next */ []));
|
|
153
|
+
const visibleCount = computed(() => (config.virtualized() ? filteredItems().length : visibleItems().length), /* @ts-ignore */
|
|
154
|
+
...(ngDevMode ? [{ debugName: "visibleCount" }] : /* istanbul ignore next */ []));
|
|
144
155
|
const highlight = useListHighlight({
|
|
145
156
|
items: orderedItems,
|
|
146
157
|
isNavigable: (item) => isVisible(item) && !item.disabled(),
|
|
@@ -149,8 +160,10 @@ function useComboboxEngine(config) {
|
|
|
149
160
|
injector
|
|
150
161
|
});
|
|
151
162
|
const highlightedItem = highlight.highlightedItem;
|
|
152
|
-
const highlightedIndex = signal(-1,
|
|
153
|
-
|
|
163
|
+
const highlightedIndex = signal(-1, /* @ts-ignore */
|
|
164
|
+
...(ngDevMode ? [{ debugName: "highlightedIndex" }] : /* istanbul ignore next */ []));
|
|
165
|
+
const highlightReason = signal('none', /* @ts-ignore */
|
|
166
|
+
...(ngDevMode ? [{ debugName: "highlightReason" }] : /* istanbul ignore next */ []));
|
|
154
167
|
const itemId = (index) => `${listId}-item-${index}`;
|
|
155
168
|
const activeId = computed(() => {
|
|
156
169
|
if (config.virtualized()) {
|
|
@@ -158,13 +171,16 @@ function useComboboxEngine(config) {
|
|
|
158
171
|
return index >= 0 ? itemId(index) : undefined;
|
|
159
172
|
}
|
|
160
173
|
return highlight.activeId();
|
|
161
|
-
},
|
|
174
|
+
}, /* @ts-ignore */
|
|
175
|
+
...(ngDevMode ? [{ debugName: "activeId" }] : /* istanbul ignore next */ []));
|
|
162
176
|
// `'first-match'` highlights the first item whose label prefix-matches the query (inline modes),
|
|
163
177
|
// so inline completion lands on a real prefix even when the list is static.
|
|
164
|
-
const pendingHighlightEdge = signal(null,
|
|
178
|
+
const pendingHighlightEdge = signal(null, /* @ts-ignore */
|
|
179
|
+
...(ngDevMode ? [{ debugName: "pendingHighlightEdge" }] : /* istanbul ignore next */ []));
|
|
165
180
|
// Inline completion (autocomplete `both` / `inline`): a transient preview of the highlighted item's
|
|
166
181
|
// label mirrored into the input. `null` when off. `suppressInline` skips it for a deleting edit.
|
|
167
|
-
const inlinePreview = signal(null,
|
|
182
|
+
const inlinePreview = signal(null, /* @ts-ignore */
|
|
183
|
+
...(ngDevMode ? [{ debugName: "inlinePreview" }] : /* istanbul ignore next */ []));
|
|
168
184
|
let suppressInline = false;
|
|
169
185
|
/** The first visible, navigable item whose label starts with the query (for inline completion). */
|
|
170
186
|
const firstMatchItem = () => {
|
|
@@ -716,13 +732,17 @@ class RdxComboboxRoot {
|
|
|
716
732
|
open: () => this.open()
|
|
717
733
|
});
|
|
718
734
|
/** Selected value(s). A single value in single mode, an array in `multiple` mode. */
|
|
719
|
-
this.value = model(null,
|
|
735
|
+
this.value = model(null, /* @ts-ignore */
|
|
736
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
720
737
|
/** Initial value when uncontrolled. */
|
|
721
|
-
this.defaultValue = input(
|
|
738
|
+
this.defaultValue = input(/* @ts-ignore */
|
|
739
|
+
...(ngDevMode ? [undefined, { debugName: "defaultValue" }] : /* istanbul ignore next */ []));
|
|
722
740
|
/** The text currently in the input. */
|
|
723
|
-
this.inputValue = model('',
|
|
741
|
+
this.inputValue = model('', /* @ts-ignore */
|
|
742
|
+
...(ngDevMode ? [{ debugName: "inputValue" }] : /* istanbul ignore next */ []));
|
|
724
743
|
/** Whether the popup is open. */
|
|
725
|
-
this.open = model(false,
|
|
744
|
+
this.open = model(false, /* @ts-ignore */
|
|
745
|
+
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
726
746
|
/** Initial open state when uncontrolled. */
|
|
727
747
|
this.defaultOpen = input(false, { ...(ngDevMode ? { debugName: "defaultOpen" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
728
748
|
/** Whether multiple values can be selected. Shorthand for `selectionMode="multiple"`. */
|
|
@@ -731,11 +751,14 @@ class RdxComboboxRoot {
|
|
|
731
751
|
* Selection behavior. `'single'` / `'multiple'` commit a value; `'none'` filters without
|
|
732
752
|
* selecting (a pure search/command UI). Defaults from the `multiple` shorthand.
|
|
733
753
|
*/
|
|
734
|
-
this.selectionMode = input(
|
|
754
|
+
this.selectionMode = input(/* @ts-ignore */
|
|
755
|
+
...(ngDevMode ? [undefined, { debugName: "selectionMode" }] : /* istanbul ignore next */ []));
|
|
735
756
|
/** Resolved selection mode. */
|
|
736
|
-
this.mode = computed(() => this.selectionMode() ?? (this.multipleInput() ? 'multiple' : 'single'),
|
|
757
|
+
this.mode = computed(() => this.selectionMode() ?? (this.multipleInput() ? 'multiple' : 'single'), /* @ts-ignore */
|
|
758
|
+
...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
737
759
|
/** Whether the combobox is in multiple-selection mode. */
|
|
738
|
-
this.multiple = computed(() => this.mode() === 'multiple',
|
|
760
|
+
this.multiple = computed(() => this.mode() === 'multiple', /* @ts-ignore */
|
|
761
|
+
...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
|
|
739
762
|
/** In `'none'` mode, whether pressing an item fills the input with its label. */
|
|
740
763
|
this.fillInputOnItemPress = input(true, { ...(ngDevMode ? { debugName: "fillInputOnItemPress" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
741
764
|
/** Text direction. */
|
|
@@ -766,7 +789,8 @@ class RdxComboboxRoot {
|
|
|
766
789
|
return 'input-change';
|
|
767
790
|
}
|
|
768
791
|
return 'off';
|
|
769
|
-
},
|
|
792
|
+
}, /* @ts-ignore */
|
|
793
|
+
...(ngDevMode ? [{ debugName: "autoHighlightMode" }] : /* istanbul ignore next */ []));
|
|
770
794
|
/**
|
|
771
795
|
* Whether moving the pointer over an item highlights it. `true` (default) paints `data-highlighted`
|
|
772
796
|
* on hover; `false` suppresses hover-driven highlight entirely, letting CSS `:hover` stay distinct
|
|
@@ -791,7 +815,8 @@ class RdxComboboxRoot {
|
|
|
791
815
|
* - a function: custom matching;
|
|
792
816
|
* - `null`: built-in filtering disabled (the consumer controls which items exist).
|
|
793
817
|
*/
|
|
794
|
-
this.filter = input(undefined,
|
|
818
|
+
this.filter = input(undefined, /* @ts-ignore */
|
|
819
|
+
...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
|
|
795
820
|
/** Maximum number of matching items to show. `-1` (default) means no limit. */
|
|
796
821
|
this.limit = input(-1, { ...(ngDevMode ? { debugName: "limit" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
797
822
|
/**
|
|
@@ -799,7 +824,8 @@ class RdxComboboxRoot {
|
|
|
799
824
|
* {@link virtualized} mode (where only a window of `RdxComboboxItem` is mounted). The filtered
|
|
800
825
|
* subset is exposed as {@link filteredItems} for an external virtualizer to render.
|
|
801
826
|
*/
|
|
802
|
-
this.items = input(
|
|
827
|
+
this.items = input(/* @ts-ignore */
|
|
828
|
+
...(ngDevMode ? [undefined, { debugName: "items" }] : /* istanbul ignore next */ []));
|
|
803
829
|
/**
|
|
804
830
|
* Whether the list is externally virtualized — only a window of items is rendered, so navigation
|
|
805
831
|
* runs over {@link items}/{@link filteredItems} by index instead of over mounted DOM elements.
|
|
@@ -814,12 +840,14 @@ class RdxComboboxRoot {
|
|
|
814
840
|
*/
|
|
815
841
|
this.grid = input(false, { ...(ngDevMode ? { debugName: "grid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
816
842
|
/** How item values are compared for equality (a comparator function or an object key). Base UI prop name. */
|
|
817
|
-
this.isItemEqualToValue = input(
|
|
843
|
+
this.isItemEqualToValue = input(/* @ts-ignore */
|
|
844
|
+
...(ngDevMode ? [undefined, { debugName: "isItemEqualToValue" }] : /* istanbul ignore next */ []));
|
|
818
845
|
/** Converts a value to its display label. Defaults to the matching item's text. */
|
|
819
|
-
this.itemToStringLabel = input(
|
|
820
|
-
|
|
846
|
+
this.itemToStringLabel = input(/* @ts-ignore */
|
|
847
|
+
...(ngDevMode ? [undefined, { debugName: "itemToStringLabel" }] : /* istanbul ignore next */ []));
|
|
848
|
+
/** Emits before the selection changes; call `eventDetails.cancel()` to veto it. */
|
|
821
849
|
this.onValueChange = output();
|
|
822
|
-
/** Emits
|
|
850
|
+
/** Emits before the input text changes; call `eventDetails.cancel()` to veto it. */
|
|
823
851
|
this.onInputValueChange = output();
|
|
824
852
|
/** Emits when the popup opens or closes. */
|
|
825
853
|
this.onOpenChange = output();
|
|
@@ -830,23 +858,32 @@ class RdxComboboxRoot {
|
|
|
830
858
|
this.onItemHighlighted = output();
|
|
831
859
|
/** Emits after the open/close transition (including any exit animation) finishes. */
|
|
832
860
|
this.onOpenChangeComplete = output();
|
|
833
|
-
this.cvaDisabled = signal(false,
|
|
834
|
-
|
|
835
|
-
this.
|
|
836
|
-
|
|
837
|
-
this.
|
|
861
|
+
this.cvaDisabled = signal(false, /* @ts-ignore */
|
|
862
|
+
...(ngDevMode ? [{ debugName: "cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
863
|
+
this.disabledState = computed(() => this.disabled() || this.cvaDisabled(), /* @ts-ignore */
|
|
864
|
+
...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
|
|
865
|
+
this.requiredState = computed(() => this.required(), /* @ts-ignore */
|
|
866
|
+
...(ngDevMode ? [{ debugName: "requiredState" }] : /* istanbul ignore next */ []));
|
|
867
|
+
this.preventUnmountOnClose = signal(false, /* @ts-ignore */
|
|
868
|
+
...(ngDevMode ? [{ debugName: "preventUnmountOnClose" }] : /* istanbul ignore next */ []));
|
|
869
|
+
this.present = computed(() => this.open() || this.preventUnmountOnClose(), /* @ts-ignore */
|
|
870
|
+
...(ngDevMode ? [{ debugName: "present" }] : /* istanbul ignore next */ []));
|
|
838
871
|
/**
|
|
839
872
|
* Whether the input text is a fresh user query rather than the current selection's label. While
|
|
840
873
|
* `false` (just opened, or showing a selected label), the list is unfiltered so the user can
|
|
841
874
|
* browse; it flips `true` on the first keystroke.
|
|
842
875
|
*/
|
|
843
|
-
this.typed = signal(false,
|
|
876
|
+
this.typed = signal(false, /* @ts-ignore */
|
|
877
|
+
...(ngDevMode ? [{ debugName: "typed" }] : /* istanbul ignore next */ []));
|
|
844
878
|
/** The active query: the typed text once the user starts typing, otherwise empty (browse mode). */
|
|
845
|
-
this.query = computed(() => (this.typed() ? (this.inputValue() ?? '') : ''),
|
|
879
|
+
this.query = computed(() => (this.typed() ? (this.inputValue() ?? '') : ''), /* @ts-ignore */
|
|
880
|
+
...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
|
|
846
881
|
/** Built-in filtering always applies for combobox (the `none` filter is handled inside the engine). */
|
|
847
|
-
this.filteringEnabled = signal(true,
|
|
882
|
+
this.filteringEnabled = signal(true, /* @ts-ignore */
|
|
883
|
+
...(ngDevMode ? [{ debugName: "filteringEnabled" }] : /* istanbul ignore next */ []));
|
|
848
884
|
/** Combobox never inline-completes (that's an autocomplete mode). */
|
|
849
|
-
this.noInline = signal(false,
|
|
885
|
+
this.noInline = signal(false, /* @ts-ignore */
|
|
886
|
+
...(ngDevMode ? [{ debugName: "noInline" }] : /* istanbul ignore next */ []));
|
|
850
887
|
/** The shared engine: item registry, filtering, highlight navigation, and the open-close transition. */
|
|
851
888
|
this.engine = useComboboxEngine({
|
|
852
889
|
injector: this.injector,
|
|
@@ -979,11 +1016,15 @@ class RdxComboboxRoot {
|
|
|
979
1016
|
}
|
|
980
1017
|
this.markAsTouched();
|
|
981
1018
|
}
|
|
982
|
-
/** Updates the input text from user typing (marks the query as a fresh user query). */
|
|
983
|
-
setInputValue(value) {
|
|
1019
|
+
/** Updates the input text from user typing (marks the query as a fresh user query). Cancelable. */
|
|
1020
|
+
setInputValue(value, event = new Event('combobox.input-value-change')) {
|
|
1021
|
+
const { eventDetails } = createCancelableChangeEventDetails('none', event, this.resolveOpenChangeTrigger(event));
|
|
1022
|
+
this.onInputValueChange.emit({ value, eventDetails });
|
|
1023
|
+
if (eventDetails.isCanceled()) {
|
|
1024
|
+
return;
|
|
1025
|
+
}
|
|
984
1026
|
this.inputValue.set(value);
|
|
985
1027
|
this.typed.set(true);
|
|
986
|
-
this.onInputValueChange.emit(value);
|
|
987
1028
|
// Base UI: emptying the field clears a single selection — but only when the input is OUTSIDE the
|
|
988
1029
|
// popup. With the input inside the popup, the search box and the committed value are independent,
|
|
989
1030
|
// so clearing the search must not deselect. (multiple keeps its chips; `none` has no committed
|
|
@@ -992,18 +1033,22 @@ class RdxComboboxRoot {
|
|
|
992
1033
|
this.mode() === 'single' &&
|
|
993
1034
|
!isNullish(this.value()) &&
|
|
994
1035
|
this.engine.inputLayout() !== 'inside') {
|
|
995
|
-
this.commitValue(null);
|
|
1036
|
+
this.commitValue(null, 'input-clear', event);
|
|
996
1037
|
}
|
|
997
1038
|
// Auto-highlight the first match as the query changes (deferred so it lands after items mount).
|
|
998
1039
|
if (this.autoHighlightMode() !== 'off') {
|
|
999
1040
|
this.engine.setPendingHighlightEdge('first');
|
|
1000
1041
|
}
|
|
1001
1042
|
}
|
|
1002
|
-
/**
|
|
1043
|
+
/**
|
|
1044
|
+
* Sets the input text programmatically (a selection label / revert) — not a user query. Emits
|
|
1045
|
+
* `onInputValueChange` for observability but is not vetoable (it is a derived sync, not a user edit).
|
|
1046
|
+
*/
|
|
1003
1047
|
setLabel(value) {
|
|
1004
1048
|
this.inputValue.set(value);
|
|
1005
1049
|
this.typed.set(false);
|
|
1006
|
-
|
|
1050
|
+
const { eventDetails } = createCancelableChangeEventDetails('none', new Event('combobox.input-value-change'));
|
|
1051
|
+
this.onInputValueChange.emit({ value, eventDetails });
|
|
1007
1052
|
}
|
|
1008
1053
|
/** Resets the input text to the current selection's label (single mode) or empty. */
|
|
1009
1054
|
revertInputValue() {
|
|
@@ -1046,8 +1091,12 @@ class RdxComboboxRoot {
|
|
|
1046
1091
|
const activeBefore = typeof document !== 'undefined' ? document.activeElement : null;
|
|
1047
1092
|
if (this.mode() === 'none') {
|
|
1048
1093
|
// No value is committed; `onValueChange` fires as a pointer/keyboard activation signal so
|
|
1049
|
-
// command-palette consumers can react. Optionally fill the input, then close.
|
|
1050
|
-
this.
|
|
1094
|
+
// command-palette consumers can react (cancelable). Optionally fill the input, then close.
|
|
1095
|
+
const { eventDetails } = createCancelableChangeEventDetails('item-press', event, this.resolveOpenChangeTrigger(event));
|
|
1096
|
+
this.onValueChange.emit({ value, reason: 'item-press', eventDetails });
|
|
1097
|
+
if (eventDetails.isCanceled()) {
|
|
1098
|
+
return;
|
|
1099
|
+
}
|
|
1051
1100
|
if (this.fillInputOnItemPress()) {
|
|
1052
1101
|
this.setLabel(textValue);
|
|
1053
1102
|
}
|
|
@@ -1065,7 +1114,9 @@ class RdxComboboxRoot {
|
|
|
1065
1114
|
else {
|
|
1066
1115
|
current.splice(index, 1);
|
|
1067
1116
|
}
|
|
1068
|
-
this.commitValue(current)
|
|
1117
|
+
if (!this.commitValue(current, 'item-press', event)) {
|
|
1118
|
+
return;
|
|
1119
|
+
}
|
|
1069
1120
|
this.setLabel('');
|
|
1070
1121
|
// Keep the input focused for adding more values — unless the consumer moved focus.
|
|
1071
1122
|
if (typeof document === 'undefined' || document.activeElement === activeBefore) {
|
|
@@ -1073,7 +1124,9 @@ class RdxComboboxRoot {
|
|
|
1073
1124
|
}
|
|
1074
1125
|
}
|
|
1075
1126
|
else {
|
|
1076
|
-
this.commitValue(value)
|
|
1127
|
+
if (!this.commitValue(value, 'item-press', event)) {
|
|
1128
|
+
return;
|
|
1129
|
+
}
|
|
1077
1130
|
this.setLabel(textValue);
|
|
1078
1131
|
this.closePopup(false, 'item-press', event);
|
|
1079
1132
|
this.engine.restoreFocusAfterSelect(activeBefore);
|
|
@@ -1107,7 +1160,7 @@ class RdxComboboxRoot {
|
|
|
1107
1160
|
// In `none` mode there is no committed value to clear — only the input text. Otherwise reset
|
|
1108
1161
|
// the selection. Also drop any highlight (Base UI resets the active/selected indices here).
|
|
1109
1162
|
if (this.mode() !== 'none') {
|
|
1110
|
-
this.commitValue(this.multiple() ? [] : null);
|
|
1163
|
+
this.commitValue(this.multiple() ? [] : null, 'clear-press');
|
|
1111
1164
|
}
|
|
1112
1165
|
this.setLabel('');
|
|
1113
1166
|
this.engine.clearHighlightState();
|
|
@@ -1118,7 +1171,7 @@ class RdxComboboxRoot {
|
|
|
1118
1171
|
return;
|
|
1119
1172
|
}
|
|
1120
1173
|
const next = this.value().filter((v) => !isItemEqualToValue(v, value, this.isItemEqualToValue()));
|
|
1121
|
-
this.commitValue(next);
|
|
1174
|
+
this.commitValue(next, 'chip-remove-press');
|
|
1122
1175
|
}
|
|
1123
1176
|
removeLastValue() {
|
|
1124
1177
|
if (!this.multiple() || !Array.isArray(this.value())) {
|
|
@@ -1126,7 +1179,7 @@ class RdxComboboxRoot {
|
|
|
1126
1179
|
}
|
|
1127
1180
|
const current = this.value();
|
|
1128
1181
|
if (current.length > 0) {
|
|
1129
|
-
this.commitValue(current.slice(0, -1));
|
|
1182
|
+
this.commitValue(current.slice(0, -1), 'chip-remove-press');
|
|
1130
1183
|
}
|
|
1131
1184
|
}
|
|
1132
1185
|
focusInput() {
|
|
@@ -1148,13 +1201,18 @@ class RdxComboboxRoot {
|
|
|
1148
1201
|
* chip removal, Backspace). Read-only / disabled comboboxes never mutate here — programmatic form
|
|
1149
1202
|
* writes go through {@link writeValue}, which is intentionally not guarded. (ADR 0014, Finding 1.)
|
|
1150
1203
|
*/
|
|
1151
|
-
commitValue(value) {
|
|
1204
|
+
commitValue(value, reason = 'none', event = new Event('combobox.value-change')) {
|
|
1152
1205
|
if (this.disabledState() || this.readOnly()) {
|
|
1153
|
-
return;
|
|
1206
|
+
return false;
|
|
1207
|
+
}
|
|
1208
|
+
const { eventDetails } = createCancelableChangeEventDetails(reason, event, this.resolveOpenChangeTrigger(event));
|
|
1209
|
+
this.onValueChange.emit({ value, reason, eventDetails });
|
|
1210
|
+
if (eventDetails.isCanceled()) {
|
|
1211
|
+
return false;
|
|
1154
1212
|
}
|
|
1155
1213
|
this.value.set(value);
|
|
1156
|
-
this.onValueChange.emit(value);
|
|
1157
1214
|
this.onChange?.(value);
|
|
1215
|
+
return true;
|
|
1158
1216
|
}
|
|
1159
1217
|
createOpenChangeEvent(open, reason, event) {
|
|
1160
1218
|
const change = createCancelableChangeEventDetails(reason, event, this.resolveOpenChangeTrigger(event));
|
|
@@ -1190,8 +1248,8 @@ class RdxComboboxRoot {
|
|
|
1190
1248
|
setDisabledState(isDisabled) {
|
|
1191
1249
|
this.cvaDisabled.set(isDisabled);
|
|
1192
1250
|
}
|
|
1193
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1194
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1251
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1252
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxComboboxRoot, isStandalone: true, selector: "[rdxComboboxRoot]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, inputValue: { classPropertyName: "inputValue", publicName: "inputValue", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, defaultOpen: { classPropertyName: "defaultOpen", publicName: "defaultOpen", isSignal: true, isRequired: false, transformFunction: null }, multipleInput: { classPropertyName: "multipleInput", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, fillInputOnItemPress: { classPropertyName: "fillInputOnItemPress", publicName: "fillInputOnItemPress", isSignal: true, isRequired: false, transformFunction: null }, dirInput: { classPropertyName: "dirInput", publicName: "dir", 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 }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, loopFocus: { classPropertyName: "loopFocus", publicName: "loopFocus", isSignal: true, isRequired: false, transformFunction: null }, autoHighlight: { classPropertyName: "autoHighlight", publicName: "autoHighlight", isSignal: true, isRequired: false, transformFunction: null }, highlightItemOnHover: { classPropertyName: "highlightItemOnHover", publicName: "highlightItemOnHover", isSignal: true, isRequired: false, transformFunction: null }, keepHighlight: { classPropertyName: "keepHighlight", publicName: "keepHighlight", isSignal: true, isRequired: false, transformFunction: null }, openOnInputClick: { classPropertyName: "openOnInputClick", publicName: "openOnInputClick", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, submitOnItemClick: { classPropertyName: "submitOnItemClick", publicName: "submitOnItemClick", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, limit: { classPropertyName: "limit", publicName: "limit", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, virtualized: { classPropertyName: "virtualized", publicName: "virtualized", isSignal: true, isRequired: false, transformFunction: null }, grid: { classPropertyName: "grid", publicName: "grid", isSignal: true, isRequired: false, transformFunction: null }, isItemEqualToValue: { classPropertyName: "isItemEqualToValue", publicName: "isItemEqualToValue", isSignal: true, isRequired: false, transformFunction: null }, itemToStringLabel: { classPropertyName: "itemToStringLabel", publicName: "itemToStringLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", inputValue: "inputValueChange", open: "openChange", onValueChange: "onValueChange", onInputValueChange: "onInputValueChange", onOpenChange: "onOpenChange", onItemHighlighted: "onItemHighlighted", onOpenChangeComplete: "onOpenChangeComplete" }, host: { properties: { "attr.data-disabled": "disabledState() ? \"\" : undefined" } }, providers: [
|
|
1195
1253
|
provideComboboxRootContext(context),
|
|
1196
1254
|
{ provide: NG_VALUE_ACCESSOR, useExisting: RdxComboboxRoot, multi: true },
|
|
1197
1255
|
// New floating foundation (ADR 0015/0017) — the dismissal capability reads this shared context.
|
|
@@ -1199,7 +1257,7 @@ class RdxComboboxRoot {
|
|
|
1199
1257
|
provideFloatingRootContext(() => inject(RdxComboboxRoot).floatingContext)
|
|
1200
1258
|
], exportAs: ["rdxComboboxRoot"], hostDirectives: [{ directive: i1.RdxPopper }], ngImport: i0 }); }
|
|
1201
1259
|
}
|
|
1202
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1260
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxRoot, decorators: [{
|
|
1203
1261
|
type: Directive,
|
|
1204
1262
|
args: [{
|
|
1205
1263
|
selector: '[rdxComboboxRoot]',
|
|
@@ -1229,10 +1287,10 @@ class RdxComboboxBackdrop {
|
|
|
1229
1287
|
constructor() {
|
|
1230
1288
|
this.rootContext = injectComboboxRootContext();
|
|
1231
1289
|
}
|
|
1232
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1233
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1290
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxBackdrop, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1291
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxComboboxBackdrop, isStandalone: true, selector: "[rdxComboboxBackdrop]", host: { attributes: { "role": "presentation" }, properties: { "attr.data-open": "rootContext.open() ? \"\" : undefined", "attr.data-closed": "rootContext.open() ? undefined : \"\"" } }, exportAs: ["rdxComboboxBackdrop"], ngImport: i0 }); }
|
|
1234
1292
|
}
|
|
1235
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1293
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxBackdrop, decorators: [{
|
|
1236
1294
|
type: Directive,
|
|
1237
1295
|
args: [{
|
|
1238
1296
|
selector: '[rdxComboboxBackdrop]',
|
|
@@ -1240,7 +1298,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
1240
1298
|
host: {
|
|
1241
1299
|
// A decorative overlay — Base UI marks it `role="presentation"` (excluded from the a11y tree).
|
|
1242
1300
|
role: 'presentation',
|
|
1243
|
-
'[attr.data-state]': 'rootContext.open() ? "open" : "closed"',
|
|
1244
1301
|
'[attr.data-open]': 'rootContext.open() ? "" : undefined',
|
|
1245
1302
|
'[attr.data-closed]': 'rootContext.open() ? undefined : ""'
|
|
1246
1303
|
}
|
|
@@ -1275,10 +1332,10 @@ class RdxComboboxChips {
|
|
|
1275
1332
|
chips[chips.length - 1].focus();
|
|
1276
1333
|
return true;
|
|
1277
1334
|
}
|
|
1278
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1279
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1335
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxChips, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1336
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxComboboxChips, isStandalone: true, selector: "[rdxComboboxChips]", host: { attributes: { "role": "toolbar" } }, exportAs: ["rdxComboboxChips"], hostDirectives: [{ directive: i1$1.RdxFloatingInsideElement }], ngImport: i0 }); }
|
|
1280
1337
|
}
|
|
1281
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1338
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxChips, decorators: [{
|
|
1282
1339
|
type: Directive,
|
|
1283
1340
|
args: [{
|
|
1284
1341
|
selector: '[rdxComboboxChips]',
|
|
@@ -1307,7 +1364,8 @@ class RdxComboboxChip {
|
|
|
1307
1364
|
this.chips = inject(RdxComboboxChips, { optional: true });
|
|
1308
1365
|
this.rootContext = injectComboboxRootContext();
|
|
1309
1366
|
/** The value this chip represents. */
|
|
1310
|
-
this.value = input.required(
|
|
1367
|
+
this.value = input.required(/* @ts-ignore */
|
|
1368
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1311
1369
|
}
|
|
1312
1370
|
onKeydown(event) {
|
|
1313
1371
|
const list = this.chips?.getChips() ?? [];
|
|
@@ -1375,10 +1433,10 @@ class RdxComboboxChip {
|
|
|
1375
1433
|
break;
|
|
1376
1434
|
}
|
|
1377
1435
|
}
|
|
1378
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1379
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1436
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxChip, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1437
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxComboboxChip, isStandalone: true, selector: "[rdxComboboxChip]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "tabindex": "-1" }, listeners: { "keydown": "onKeydown($event)" } }, providers: [provideComboboxChipContext(chipContext)], exportAs: ["rdxComboboxChip"], ngImport: i0 }); }
|
|
1380
1438
|
}
|
|
1381
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1439
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxChip, decorators: [{
|
|
1382
1440
|
type: Directive,
|
|
1383
1441
|
args: [{
|
|
1384
1442
|
selector: '[rdxComboboxChip]',
|
|
@@ -1406,10 +1464,10 @@ class RdxComboboxChipRemove {
|
|
|
1406
1464
|
this.rootContext.removeValue(this.chipContext.value());
|
|
1407
1465
|
this.rootContext.focusInput();
|
|
1408
1466
|
}
|
|
1409
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1410
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1467
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxChipRemove, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1468
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxComboboxChipRemove, isStandalone: true, selector: "button[rdxComboboxChipRemove]", host: { attributes: { "type": "button", "tabindex": "-1", "aria-label": "Remove" }, listeners: { "click": "onClick()" } }, exportAs: ["rdxComboboxChipRemove"], ngImport: i0 }); }
|
|
1411
1469
|
}
|
|
1412
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1470
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxChipRemove, decorators: [{
|
|
1413
1471
|
type: Directive,
|
|
1414
1472
|
args: [{
|
|
1415
1473
|
selector: 'button[rdxComboboxChipRemove]',
|
|
@@ -1433,7 +1491,8 @@ class RdxComboboxClear {
|
|
|
1433
1491
|
this.rootContext = injectComboboxRootContext();
|
|
1434
1492
|
/** Disables just this clear button (in addition to the combobox's own disabled / read-only state). */
|
|
1435
1493
|
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1436
|
-
this.isDisabled = computed(() => this.disabled() || this.rootContext.disabledState() || this.rootContext.readonly(),
|
|
1494
|
+
this.isDisabled = computed(() => this.disabled() || this.rootContext.disabledState() || this.rootContext.readonly(), /* @ts-ignore */
|
|
1495
|
+
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
1437
1496
|
/**
|
|
1438
1497
|
* Whether there is nothing to clear, mirroring Base UI's visibility rule: in `none` mode the
|
|
1439
1498
|
* button tracks the input text (a pure search field has no selection), otherwise it tracks the
|
|
@@ -1448,7 +1507,8 @@ class RdxComboboxClear {
|
|
|
1448
1507
|
return value.length === 0;
|
|
1449
1508
|
}
|
|
1450
1509
|
return value === null || value === undefined;
|
|
1451
|
-
},
|
|
1510
|
+
}, /* @ts-ignore */
|
|
1511
|
+
...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
|
|
1452
1512
|
}
|
|
1453
1513
|
// Keep focus on the input — don't let the button take it on pointer/mouse down.
|
|
1454
1514
|
onPointerDown(event) {
|
|
@@ -1457,10 +1517,10 @@ class RdxComboboxClear {
|
|
|
1457
1517
|
onClick() {
|
|
1458
1518
|
this.rootContext.clearSelection();
|
|
1459
1519
|
}
|
|
1460
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1461
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1520
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxClear, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1521
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxComboboxClear, isStandalone: true, selector: "button[rdxComboboxClear]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button", "tabindex": "-1", "aria-label": "Clear" }, listeners: { "pointerdown": "onPointerDown($event)", "mousedown": "onPointerDown($event)", "click": "onClick()" }, properties: { "hidden": "isEmpty()", "attr.disabled": "isDisabled() ? \"\" : undefined" } }, exportAs: ["rdxComboboxClear"], hostDirectives: [{ directive: i1$1.RdxFloatingInsideElement }], ngImport: i0 }); }
|
|
1462
1522
|
}
|
|
1463
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1523
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxClear, decorators: [{
|
|
1464
1524
|
type: Directive,
|
|
1465
1525
|
args: [{
|
|
1466
1526
|
selector: 'button[rdxComboboxClear]',
|
|
@@ -1493,16 +1553,17 @@ class RdxComboboxEmpty {
|
|
|
1493
1553
|
constructor() {
|
|
1494
1554
|
this.rootContext = injectComboboxRootContext();
|
|
1495
1555
|
/** Whether no items match the current query (drives projection of the message). */
|
|
1496
|
-
this.isEmpty = computed(() => this.rootContext.visibleCount() === 0,
|
|
1556
|
+
this.isEmpty = computed(() => this.rootContext.visibleCount() === 0, /* @ts-ignore */
|
|
1557
|
+
...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
|
|
1497
1558
|
}
|
|
1498
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1499
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1559
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxEmpty, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1560
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: RdxComboboxEmpty, isStandalone: true, selector: "[rdxComboboxEmpty]", host: { attributes: { "role": "status", "aria-live": "polite", "aria-atomic": "true" }, properties: { "attr.data-empty": "isEmpty() ? \"\" : undefined" } }, exportAs: ["rdxComboboxEmpty"], ngImport: i0, template: `
|
|
1500
1561
|
@if (isEmpty()) {
|
|
1501
1562
|
<ng-content />
|
|
1502
1563
|
}
|
|
1503
1564
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1504
1565
|
}
|
|
1505
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1566
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxEmpty, decorators: [{
|
|
1506
1567
|
type: Component,
|
|
1507
1568
|
args: [{
|
|
1508
1569
|
selector: '[rdxComboboxEmpty]',
|
|
@@ -1542,10 +1603,14 @@ const [injectComboboxGroupContext, provideComboboxGroupContext] = createContext(
|
|
|
1542
1603
|
class RdxComboboxGroup {
|
|
1543
1604
|
constructor() {
|
|
1544
1605
|
this.rootContext = injectComboboxRootContext();
|
|
1545
|
-
this.labelId = signal(undefined,
|
|
1546
|
-
|
|
1547
|
-
this.
|
|
1548
|
-
|
|
1606
|
+
this.labelId = signal(undefined, /* @ts-ignore */
|
|
1607
|
+
...(ngDevMode ? [{ debugName: "labelId" }] : /* istanbul ignore next */ []));
|
|
1608
|
+
this.items = signal([], /* @ts-ignore */
|
|
1609
|
+
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
1610
|
+
this.hasItems = computed(() => this.items().length > 0, /* @ts-ignore */
|
|
1611
|
+
...(ngDevMode ? [{ debugName: "hasItems" }] : /* istanbul ignore next */ []));
|
|
1612
|
+
this.hasVisibleItems = computed(() => this.items().some((item) => this.rootContext.isVisible(item)), /* @ts-ignore */
|
|
1613
|
+
...(ngDevMode ? [{ debugName: "hasVisibleItems" }] : /* istanbul ignore next */ []));
|
|
1549
1614
|
}
|
|
1550
1615
|
registerItem(item) {
|
|
1551
1616
|
this.items.update((items) => [...items, item]);
|
|
@@ -1553,10 +1618,10 @@ class RdxComboboxGroup {
|
|
|
1553
1618
|
unregisterItem(item) {
|
|
1554
1619
|
this.items.update((items) => items.filter((i) => i !== item));
|
|
1555
1620
|
}
|
|
1556
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1557
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1621
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1622
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxComboboxGroup, isStandalone: true, selector: "[rdxComboboxGroup]", host: { attributes: { "role": "group" }, properties: { "attr.aria-labelledby": "labelId()", "hidden": "hasItems() && !hasVisibleItems()" } }, providers: [provideComboboxGroupContext(groupContext)], exportAs: ["rdxComboboxGroup"], ngImport: i0 }); }
|
|
1558
1623
|
}
|
|
1559
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1624
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxGroup, decorators: [{
|
|
1560
1625
|
type: Directive,
|
|
1561
1626
|
args: [{
|
|
1562
1627
|
selector: '[rdxComboboxGroup]',
|
|
@@ -1587,10 +1652,10 @@ class RdxComboboxGroupLabel {
|
|
|
1587
1652
|
}
|
|
1588
1653
|
});
|
|
1589
1654
|
}
|
|
1590
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1591
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1655
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxGroupLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1656
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxComboboxGroupLabel, isStandalone: true, selector: "[rdxComboboxGroupLabel]", host: { properties: { "attr.id": "id" } }, exportAs: ["rdxComboboxGroupLabel"], ngImport: i0 }); }
|
|
1592
1657
|
}
|
|
1593
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1658
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxGroupLabel, decorators: [{
|
|
1594
1659
|
type: Directive,
|
|
1595
1660
|
args: [{
|
|
1596
1661
|
selector: '[rdxComboboxGroupLabel]',
|
|
@@ -1607,10 +1672,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
1607
1672
|
* @group Components
|
|
1608
1673
|
*/
|
|
1609
1674
|
class RdxComboboxIcon {
|
|
1610
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1611
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1675
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1676
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxComboboxIcon, isStandalone: true, selector: "[rdxComboboxIcon]", host: { attributes: { "aria-hidden": "true" } }, exportAs: ["rdxComboboxIcon"], ngImport: i0 }); }
|
|
1612
1677
|
}
|
|
1613
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1678
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxIcon, decorators: [{
|
|
1614
1679
|
type: Directive,
|
|
1615
1680
|
args: [{
|
|
1616
1681
|
selector: '[rdxComboboxIcon]',
|
|
@@ -1646,13 +1711,13 @@ class RdxComboboxPositioner extends RdxPopperContentWrapper {
|
|
|
1646
1711
|
cutout: () => rootContext.inputElement() ?? null
|
|
1647
1712
|
}));
|
|
1648
1713
|
}
|
|
1649
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1650
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1714
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxPositioner, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1715
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxComboboxPositioner, isStandalone: true, selector: "[rdxComboboxPositioner]", providers: [
|
|
1651
1716
|
...provideRdxPopperContentWrapper(RdxComboboxPositioner),
|
|
1652
1717
|
provideRdxPopperContentConfig({ sideOffset: 4, align: 'start' })
|
|
1653
1718
|
], exportAs: ["rdxComboboxPositioner"], usesInheritance: true, ngImport: i0 }); }
|
|
1654
1719
|
}
|
|
1655
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1720
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxPositioner, decorators: [{
|
|
1656
1721
|
type: Directive,
|
|
1657
1722
|
args: [{
|
|
1658
1723
|
selector: '[rdxComboboxPositioner]',
|
|
@@ -1677,21 +1742,28 @@ class RdxComboboxInput {
|
|
|
1677
1742
|
this.element = inject(ElementRef).nativeElement;
|
|
1678
1743
|
this.fieldRootContext = injectFieldRootContext(true);
|
|
1679
1744
|
/** The input id; Field labels and descriptions reference it for accessible relationships. */
|
|
1680
|
-
this.id = input(injectId('rdx-combobox-input-'),
|
|
1745
|
+
this.id = input(injectId('rdx-combobox-input-'), /* @ts-ignore */
|
|
1746
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
1681
1747
|
/** Marks the input as invalid independently of any Field state. */
|
|
1682
1748
|
this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1683
|
-
this.invalidState = computed(() => this.invalid() || Boolean(this.fieldRootContext?.invalidState()),
|
|
1684
|
-
|
|
1685
|
-
this.
|
|
1686
|
-
|
|
1687
|
-
this.
|
|
1749
|
+
this.invalidState = computed(() => this.invalid() || Boolean(this.fieldRootContext?.invalidState()), /* @ts-ignore */
|
|
1750
|
+
...(ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []));
|
|
1751
|
+
this.disabledState = computed(() => this.rootContext.disabledState() || Boolean(this.fieldRootContext?.disabledState()), /* @ts-ignore */
|
|
1752
|
+
...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
|
|
1753
|
+
this.requiredState = computed(() => this.rootContext.requiredState() || Boolean(this.fieldRootContext?.requiredState()), /* @ts-ignore */
|
|
1754
|
+
...(ngDevMode ? [{ debugName: "requiredState" }] : /* istanbul ignore next */ []));
|
|
1755
|
+
this.filledState = computed(() => !this.isEmptyValue() || Boolean(this.fieldRootContext?.filledState()), /* @ts-ignore */
|
|
1756
|
+
...(ngDevMode ? [{ debugName: "filledState" }] : /* istanbul ignore next */ []));
|
|
1757
|
+
this.focusedState = computed(() => Boolean(this.fieldRootContext?.focusedState()), /* @ts-ignore */
|
|
1758
|
+
...(ngDevMode ? [{ debugName: "focusedState" }] : /* istanbul ignore next */ []));
|
|
1688
1759
|
this.isEmptyValue = computed(() => {
|
|
1689
1760
|
const value = this.rootContext.value();
|
|
1690
1761
|
if (Array.isArray(value)) {
|
|
1691
1762
|
return value.length === 0;
|
|
1692
1763
|
}
|
|
1693
1764
|
return value === null || value === undefined;
|
|
1694
|
-
},
|
|
1765
|
+
}, /* @ts-ignore */
|
|
1766
|
+
...(ngDevMode ? [{ debugName: "isEmptyValue" }] : /* istanbul ignore next */ []));
|
|
1695
1767
|
this.describedBy = computed(() => {
|
|
1696
1768
|
if (!this.fieldRootContext) {
|
|
1697
1769
|
return undefined;
|
|
@@ -1701,7 +1773,8 @@ class RdxComboboxInput {
|
|
|
1701
1773
|
...(this.fieldRootContext.invalidState() ? this.fieldRootContext.errorIds() : [])
|
|
1702
1774
|
];
|
|
1703
1775
|
return ids.length ? ids.join(' ') : undefined;
|
|
1704
|
-
},
|
|
1776
|
+
}, /* @ts-ignore */
|
|
1777
|
+
...(ngDevMode ? [{ debugName: "describedBy" }] : /* istanbul ignore next */ []));
|
|
1705
1778
|
/** Whether an IME composition is in progress (CJK). While composing, don't filter or select. */
|
|
1706
1779
|
this.composing = false;
|
|
1707
1780
|
this.dataAttr = attr$1;
|
|
@@ -1872,10 +1945,10 @@ class RdxComboboxInput {
|
|
|
1872
1945
|
event.preventDefault();
|
|
1873
1946
|
}
|
|
1874
1947
|
}
|
|
1875
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1876
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1948
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1949
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxComboboxInput, isStandalone: true, selector: "input[rdxComboboxInput]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "combobox", "autocomplete": "off", "aria-autocomplete": "list" }, listeners: { "input": "onInput($event)", "click": "onClick($event)", "focus": "onFocus()", "blur": "onBlur()", "keydown": "onKeydown($event)", "compositionstart": "composing = true", "compositionend": "onCompositionEnd($event)" }, properties: { "attr.id": "id()", "attr.aria-haspopup": "rootContext.grid() ? \"grid\" : \"listbox\"", "attr.aria-expanded": "rootContext.open()", "attr.aria-controls": "rootContext.listId", "attr.aria-labelledby": "rootContext.labelId()", "attr.aria-activedescendant": "rootContext.activeId()", "attr.aria-describedby": "describedBy()", "attr.aria-invalid": "invalidState() ? \"true\" : undefined", "attr.aria-required": "requiredState() ? \"true\" : undefined", "attr.aria-disabled": "disabledState() ? \"true\" : undefined", "attr.disabled": "disabledState() ? \"\" : undefined", "attr.readonly": "rootContext.readonly() ? \"\" : undefined", "attr.required": "requiredState() ? \"\" : undefined", "value": "rootContext.inputValue()", "attr.data-popup-open": "dataAttr(rootContext.open())", "attr.data-list-empty": "dataAttr(rootContext.visibleCount() === 0)", "attr.data-placeholder": "dataAttr(isEmptyValue())", "attr.data-invalid": "dataAttr(invalidState())", "attr.data-valid": "dataAttr(!invalidState())", "attr.data-disabled": "dataAttr(disabledState())", "attr.data-required": "dataAttr(requiredState())", "attr.data-filled": "dataAttr(filledState())", "attr.data-focused": "dataAttr(focusedState())" } }, exportAs: ["rdxComboboxInput"], hostDirectives: [{ directive: i1.RdxPopperAnchor }, { directive: i1$1.RdxFloatingInsideElement }], ngImport: i0 }); }
|
|
1877
1950
|
}
|
|
1878
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1951
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxInput, decorators: [{
|
|
1879
1952
|
type: Directive,
|
|
1880
1953
|
args: [{
|
|
1881
1954
|
selector: 'input[rdxComboboxInput]',
|
|
@@ -1936,13 +2009,14 @@ class RdxComboboxInputGroup {
|
|
|
1936
2009
|
return value.length > 0;
|
|
1937
2010
|
}
|
|
1938
2011
|
return value !== null && value !== undefined;
|
|
1939
|
-
},
|
|
2012
|
+
}, /* @ts-ignore */
|
|
2013
|
+
...(ngDevMode ? [{ debugName: "filled" }] : /* istanbul ignore next */ []));
|
|
1940
2014
|
this.dataAttr = attr;
|
|
1941
2015
|
}
|
|
1942
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1943
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2016
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxInputGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2017
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxComboboxInputGroup, isStandalone: true, selector: "[rdxComboboxInputGroup]", host: { properties: { "attr.data-popup-open": "dataAttr(rootContext.open())", "attr.data-disabled": "dataAttr(rootContext.disabledState())", "attr.data-required": "dataAttr(rootContext.requiredState())", "attr.data-filled": "dataAttr(filled())" } }, exportAs: ["rdxComboboxInputGroup"], ngImport: i0 }); }
|
|
1944
2018
|
}
|
|
1945
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2019
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxInputGroup, decorators: [{
|
|
1946
2020
|
type: Directive,
|
|
1947
2021
|
args: [{
|
|
1948
2022
|
selector: '[rdxComboboxInputGroup]',
|
|
@@ -1964,10 +2038,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
1964
2038
|
* @group Components
|
|
1965
2039
|
*/
|
|
1966
2040
|
class RdxComboboxRow {
|
|
1967
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1968
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2041
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxRow, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2042
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxComboboxRow, isStandalone: true, selector: "[rdxComboboxRow]", host: { attributes: { "role": "row" } }, exportAs: ["rdxComboboxRow"], ngImport: i0 }); }
|
|
1969
2043
|
}
|
|
1970
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2044
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxRow, decorators: [{
|
|
1971
2045
|
type: Directive,
|
|
1972
2046
|
args: [{
|
|
1973
2047
|
selector: '[rdxComboboxRow]',
|
|
@@ -2001,7 +2075,8 @@ class RdxComboboxItem {
|
|
|
2001
2075
|
this.element = inject(ElementRef).nativeElement;
|
|
2002
2076
|
this.id = injectId('rdx-combobox-item-');
|
|
2003
2077
|
/** The option's value. */
|
|
2004
|
-
this.value = input.required(
|
|
2078
|
+
this.value = input.required(/* @ts-ignore */
|
|
2079
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2005
2080
|
/** Explicit text matched against the query. Defaults to the element's text content. */
|
|
2006
2081
|
this.textValueInput = input('', { ...(ngDevMode ? { debugName: "textValueInput" } : /* istanbul ignore next */ {}), alias: 'textValue' });
|
|
2007
2082
|
/** Whether the option is disabled. */
|
|
@@ -2010,30 +2085,41 @@ class RdxComboboxItem {
|
|
|
2010
2085
|
* The option's index in the list. Required in virtualized mode — it drives the deterministic id
|
|
2011
2086
|
* (for `aria-activedescendant`), highlight matching, and selection when only a window is mounted.
|
|
2012
2087
|
*/
|
|
2013
|
-
this.index = input(
|
|
2088
|
+
this.index = input(/* @ts-ignore */
|
|
2089
|
+
...(ngDevMode ? [undefined, { debugName: "index" }] : /* istanbul ignore next */ []));
|
|
2014
2090
|
this.virtualized = this.rootContext.virtualized;
|
|
2015
|
-
this.autoTextValue = signal('',
|
|
2016
|
-
|
|
2091
|
+
this.autoTextValue = signal('', /* @ts-ignore */
|
|
2092
|
+
...(ngDevMode ? [{ debugName: "autoTextValue" }] : /* istanbul ignore next */ []));
|
|
2093
|
+
this.textValue = computed(() => this.textValueInput() || this.autoTextValue(), /* @ts-ignore */
|
|
2094
|
+
...(ngDevMode ? [{ debugName: "textValue" }] : /* istanbul ignore next */ []));
|
|
2017
2095
|
/** Host id: deterministic per-index in virtualized mode, otherwise a generated unique id. */
|
|
2018
|
-
this.elementId = computed(() => this.virtualized() ? this.rootContext.itemId(this.index() ?? -1) : this.id,
|
|
2019
|
-
|
|
2020
|
-
this.
|
|
2096
|
+
this.elementId = computed(() => this.virtualized() ? this.rootContext.itemId(this.index() ?? -1) : this.id, /* @ts-ignore */
|
|
2097
|
+
...(ngDevMode ? [{ debugName: "elementId" }] : /* istanbul ignore next */ []));
|
|
2098
|
+
this.ariaSetSize = computed(() => this.virtualized() ? this.rootContext.filteredItems().length : undefined, /* @ts-ignore */
|
|
2099
|
+
...(ngDevMode ? [{ debugName: "ariaSetSize" }] : /* istanbul ignore next */ []));
|
|
2100
|
+
this.ariaPosInSet = computed(() => (this.virtualized() ? (this.index() ?? -1) + 1 : undefined), /* @ts-ignore */
|
|
2101
|
+
...(ngDevMode ? [{ debugName: "ariaPosInSet" }] : /* istanbul ignore next */ []));
|
|
2021
2102
|
/** The nearest enclosing grid row, if any (drives the `gridcell` role). */
|
|
2022
2103
|
this.row = inject(RdxComboboxRow, { optional: true });
|
|
2023
2104
|
/** `gridcell` only when actually inside a `RdxComboboxRow` of a grid list; otherwise `option`. */
|
|
2024
|
-
this.role = computed(() => (this.rootContext.grid() && this.row ? 'gridcell' : 'option'),
|
|
2105
|
+
this.role = computed(() => (this.rootContext.grid() && this.row ? 'gridcell' : 'option'), /* @ts-ignore */
|
|
2106
|
+
...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
|
|
2025
2107
|
/**
|
|
2026
2108
|
* Whether selection is a meaningful concept here (Base UI's `selectable`). In `selectionMode="none"`
|
|
2027
2109
|
* (every autocomplete option, and a pure-search combobox) options carry no selection state, so
|
|
2028
2110
|
* `aria-selected` / `data-selected` are omitted entirely rather than rendered as `false`.
|
|
2029
2111
|
*/
|
|
2030
|
-
this.selectable = computed(() => this.rootContext.selectionMode() !== 'none',
|
|
2112
|
+
this.selectable = computed(() => this.rootContext.selectionMode() !== 'none', /* @ts-ignore */
|
|
2113
|
+
...(ngDevMode ? [{ debugName: "selectable" }] : /* istanbul ignore next */ []));
|
|
2031
2114
|
// Virtualized items are always rendered (the consumer only mounts the filtered window).
|
|
2032
|
-
this.isVisible = computed(() => (this.virtualized() ? true : this.rootContext.isVisible(this)),
|
|
2033
|
-
|
|
2115
|
+
this.isVisible = computed(() => (this.virtualized() ? true : this.rootContext.isVisible(this)), /* @ts-ignore */
|
|
2116
|
+
...(ngDevMode ? [{ debugName: "isVisible" }] : /* istanbul ignore next */ []));
|
|
2117
|
+
this.isSelected = computed(() => this.rootContext.isSelected(this.value()), /* @ts-ignore */
|
|
2118
|
+
...(ngDevMode ? [{ debugName: "isSelected" }] : /* istanbul ignore next */ []));
|
|
2034
2119
|
this.isHighlighted = computed(() => this.virtualized()
|
|
2035
2120
|
? this.rootContext.highlightedIndex() === this.index()
|
|
2036
|
-
: this.rootContext.highlightedItem() === this,
|
|
2121
|
+
: this.rootContext.highlightedItem() === this, /* @ts-ignore */
|
|
2122
|
+
...(ngDevMode ? [{ debugName: "isHighlighted" }] : /* istanbul ignore next */ []));
|
|
2037
2123
|
this.group = injectComboboxGroupContext(true);
|
|
2038
2124
|
// Whether a primary-button pointerdown started on **this** item. A normal press+release here is
|
|
2039
2125
|
// committed by `click`; `mouseup` is only the drag-end fallback for a press that began *elsewhere*.
|
|
@@ -2153,10 +2239,10 @@ class RdxComboboxItem {
|
|
|
2153
2239
|
}
|
|
2154
2240
|
this.rootContext.clearHighlight();
|
|
2155
2241
|
}
|
|
2156
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2157
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
2242
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2243
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxComboboxItem, isStandalone: true, selector: "[rdxComboboxItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, textValueInput: { classPropertyName: "textValueInput", publicName: "textValue", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "pointerdown": "onPointerDown($event)", "mousedown": "onMouseDown($event)", "mouseup": "onMouseUp($event)", "click": "onClick($event)", "pointermove": "onPointerMove()", "pointerleave": "onPointerLeave($event)" }, properties: { "attr.role": "role()", "attr.id": "elementId()", "attr.aria-selected": "selectable() ? isSelected() : undefined", "attr.aria-disabled": "disabled() ? \"true\" : undefined", "attr.aria-setsize": "ariaSetSize()", "attr.aria-posinset": "ariaPosInSet()", "attr.data-selected": "selectable() && isSelected() ? \"\" : undefined", "attr.data-highlighted": "isHighlighted() ? \"\" : undefined", "attr.data-disabled": "disabled() ? \"\" : undefined", "hidden": "!isVisible()", "attr.data-hidden": "isVisible() ? undefined : \"\"" } }, providers: [provideComboboxItemContext(itemContext)], exportAs: ["rdxComboboxItem"], ngImport: i0 }); }
|
|
2158
2244
|
}
|
|
2159
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxItem, decorators: [{
|
|
2160
2246
|
type: Directive,
|
|
2161
2247
|
args: [{
|
|
2162
2248
|
selector: '[rdxComboboxItem]',
|
|
@@ -2193,10 +2279,10 @@ class RdxComboboxItemIndicator {
|
|
|
2193
2279
|
constructor() {
|
|
2194
2280
|
this.itemContext = injectComboboxItemContext();
|
|
2195
2281
|
}
|
|
2196
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2197
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2282
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxItemIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2283
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxComboboxItemIndicator, isStandalone: true, selector: "[rdxComboboxItemIndicator]", host: { attributes: { "aria-hidden": "true" }, properties: { "hidden": "!itemContext.isSelected()" } }, exportAs: ["rdxComboboxItemIndicator"], ngImport: i0 }); }
|
|
2198
2284
|
}
|
|
2199
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2285
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxItemIndicator, decorators: [{
|
|
2200
2286
|
type: Directive,
|
|
2201
2287
|
args: [{
|
|
2202
2288
|
selector: '[rdxComboboxItemIndicator]',
|
|
@@ -2221,10 +2307,10 @@ class RdxComboboxLabel {
|
|
|
2221
2307
|
this.rootContext.setLabelId(this.id);
|
|
2222
2308
|
inject(DestroyRef).onDestroy(() => this.rootContext.setLabelId(undefined));
|
|
2223
2309
|
}
|
|
2224
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2225
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2310
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2311
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxComboboxLabel, isStandalone: true, selector: "[rdxComboboxLabel]", host: { properties: { "attr.id": "id" } }, exportAs: ["rdxComboboxLabel"], ngImport: i0 }); }
|
|
2226
2312
|
}
|
|
2227
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2313
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxLabel, decorators: [{
|
|
2228
2314
|
type: Directive,
|
|
2229
2315
|
args: [{
|
|
2230
2316
|
selector: '[rdxComboboxLabel]',
|
|
@@ -2265,10 +2351,10 @@ class RdxComboboxList {
|
|
|
2265
2351
|
this.rootContext.selectHighlighted();
|
|
2266
2352
|
}
|
|
2267
2353
|
}
|
|
2268
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2269
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2354
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxList, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2355
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxComboboxList, isStandalone: true, selector: "[rdxComboboxList]", host: { attributes: { "tabindex": "-1" }, listeners: { "keydown": "onKeydown($event)" }, properties: { "attr.role": "rootContext.grid() ? \"grid\" : \"listbox\"", "attr.id": "rootContext.listId", "attr.aria-multiselectable": "rootContext.multiple() ? \"true\" : undefined", "attr.data-empty": "rootContext.visibleCount() === 0 ? \"\" : undefined" } }, exportAs: ["rdxComboboxList"], ngImport: i0 }); }
|
|
2270
2356
|
}
|
|
2271
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2357
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxList, decorators: [{
|
|
2272
2358
|
type: Directive,
|
|
2273
2359
|
args: [{
|
|
2274
2360
|
selector: '[rdxComboboxList]',
|
|
@@ -2369,10 +2455,10 @@ class RdxComboboxPopup {
|
|
|
2369
2455
|
input.focus();
|
|
2370
2456
|
}
|
|
2371
2457
|
}
|
|
2372
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2373
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2458
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxPopup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2459
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxComboboxPopup, isStandalone: true, selector: "[rdxComboboxPopup]", host: { attributes: { "tabindex": "-1" }, listeners: { "focusin": "onFocusIn($event)" }, properties: { "attr.role": "rootContext.inputLayout() === \"inside\" ? \"dialog\" : \"presentation\"", "attr.data-open": "rootContext.open() ? \"\" : undefined", "attr.data-closed": "rootContext.open() ? undefined : \"\"", "attr.data-empty": "rootContext.visibleCount() === 0 ? \"\" : undefined", "attr.data-starting-style": "rootContext.transitionStatus() === \"starting\" ? \"\" : undefined", "attr.data-ending-style": "rootContext.transitionStatus() === \"ending\" ? \"\" : undefined" } }, exportAs: ["rdxComboboxPopup"], hostDirectives: [{ directive: i1.RdxPopperContent }, { directive: i2.RdxFloatingNodeRegistration }], ngImport: i0 }); }
|
|
2374
2460
|
}
|
|
2375
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2461
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxPopup, decorators: [{
|
|
2376
2462
|
type: Directive,
|
|
2377
2463
|
args: [{
|
|
2378
2464
|
selector: '[rdxComboboxPopup]',
|
|
@@ -2383,9 +2469,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
2383
2469
|
// a presentational wrapper around the `listbox` (the List part owns the listbox role).
|
|
2384
2470
|
tabindex: '-1',
|
|
2385
2471
|
'[attr.role]': 'rootContext.inputLayout() === "inside" ? "dialog" : "presentation"',
|
|
2386
|
-
'[attr.data-state]': 'rootContext.open() ? "open" : "closed"',
|
|
2387
2472
|
'[attr.data-open]': 'rootContext.open() ? "" : undefined',
|
|
2388
2473
|
'[attr.data-closed]': 'rootContext.open() ? undefined : ""',
|
|
2474
|
+
'[attr.data-empty]': 'rootContext.visibleCount() === 0 ? "" : undefined',
|
|
2389
2475
|
'[attr.data-starting-style]': 'rootContext.transitionStatus() === "starting" ? "" : undefined',
|
|
2390
2476
|
'[attr.data-ending-style]': 'rootContext.transitionStatus() === "ending" ? "" : undefined',
|
|
2391
2477
|
'(focusin)': 'onFocusIn($event)'
|
|
@@ -2410,12 +2496,13 @@ class RdxComboboxPortal {
|
|
|
2410
2496
|
* forwarded to the composed {@link RdxPortalPresence}) so the autocomplete portal can re-expose it
|
|
2411
2497
|
* through its own `hostDirectives`.
|
|
2412
2498
|
*/
|
|
2413
|
-
this.container = input(
|
|
2499
|
+
this.container = input(/* @ts-ignore */
|
|
2500
|
+
...(ngDevMode ? [undefined, { debugName: "container" }] : /* istanbul ignore next */ []));
|
|
2414
2501
|
}
|
|
2415
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2416
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
2502
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxPortal, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2503
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxComboboxPortal, isStandalone: true, selector: "ng-template[rdxComboboxPortal]", inputs: { container: { classPropertyName: "container", publicName: "container", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideRdxPresenceContext(() => ({ present: injectComboboxRootContext().present }))], exportAs: ["rdxComboboxPortal"], hostDirectives: [{ directive: i1$2.RdxPortalPresence, inputs: ["container", "container"] }], ngImport: i0 }); }
|
|
2417
2504
|
}
|
|
2418
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2505
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxPortal, decorators: [{
|
|
2419
2506
|
type: Directive,
|
|
2420
2507
|
args: [{
|
|
2421
2508
|
selector: 'ng-template[rdxComboboxPortal]',
|
|
@@ -2439,10 +2526,10 @@ class RdxComboboxPortalMisuseGuard {
|
|
|
2439
2526
|
'rdxComboboxPortalPresence has been removed.', 'components/combobox');
|
|
2440
2527
|
}
|
|
2441
2528
|
}
|
|
2442
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2443
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2529
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxPortalMisuseGuard, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2530
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxComboboxPortalMisuseGuard, isStandalone: true, selector: "[rdxComboboxPortal]:not(ng-template)", ngImport: i0 }); }
|
|
2444
2531
|
}
|
|
2445
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2532
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxPortalMisuseGuard, decorators: [{
|
|
2446
2533
|
type: Directive,
|
|
2447
2534
|
args: [{
|
|
2448
2535
|
selector: '[rdxComboboxPortal]:not(ng-template)'
|
|
@@ -2456,10 +2543,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
2456
2543
|
* @group Components
|
|
2457
2544
|
*/
|
|
2458
2545
|
class RdxComboboxSeparator {
|
|
2459
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2460
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2546
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxSeparator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2547
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxComboboxSeparator, isStandalone: true, selector: "[rdxComboboxSeparator]", host: { attributes: { "role": "separator", "aria-orientation": "horizontal" } }, exportAs: ["rdxComboboxSeparator"], ngImport: i0 }); }
|
|
2461
2548
|
}
|
|
2462
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2549
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxSeparator, decorators: [{
|
|
2463
2550
|
type: Directive,
|
|
2464
2551
|
args: [{
|
|
2465
2552
|
selector: '[rdxComboboxSeparator]',
|
|
@@ -2477,10 +2564,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
2477
2564
|
* @group Components
|
|
2478
2565
|
*/
|
|
2479
2566
|
class RdxComboboxStatus {
|
|
2480
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2481
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2567
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxStatus, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2568
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxComboboxStatus, isStandalone: true, selector: "[rdxComboboxStatus]", host: { attributes: { "role": "status", "aria-live": "polite", "aria-atomic": "true" } }, exportAs: ["rdxComboboxStatus"], ngImport: i0 }); }
|
|
2482
2569
|
}
|
|
2483
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2570
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxStatus, decorators: [{
|
|
2484
2571
|
type: Directive,
|
|
2485
2572
|
args: [{
|
|
2486
2573
|
selector: '[rdxComboboxStatus]',
|
|
@@ -2512,12 +2599,18 @@ class RdxComboboxTrigger {
|
|
|
2512
2599
|
constructor() {
|
|
2513
2600
|
this.rootContext = injectComboboxRootContext();
|
|
2514
2601
|
this.element = inject(ElementRef).nativeElement;
|
|
2602
|
+
/** Whether the trigger is currently pressed (pointer down), for Base UI's `data-pressed`. */
|
|
2603
|
+
this.pressed = signal(false, /* @ts-ignore */
|
|
2604
|
+
...(ngDevMode ? [{ debugName: "pressed" }] : /* istanbul ignore next */ []));
|
|
2515
2605
|
this.rootContext.registerTrigger(this.element);
|
|
2516
2606
|
inject(DestroyRef).onDestroy(() => this.rootContext.registerTrigger(null));
|
|
2517
2607
|
}
|
|
2518
2608
|
// Record whether the opening interaction is touch, so the popup can keep focus off the inner input
|
|
2519
2609
|
// (and Android's virtual keyboard closed) when the input lives inside the popup.
|
|
2520
2610
|
onPointerDown(event) {
|
|
2611
|
+
if (!this.rootContext.disabledState()) {
|
|
2612
|
+
this.pressed.set(true);
|
|
2613
|
+
}
|
|
2521
2614
|
this.rootContext.setOpenedByTouch(event.pointerType === 'touch');
|
|
2522
2615
|
}
|
|
2523
2616
|
onClick(event) {
|
|
@@ -2542,10 +2635,10 @@ class RdxComboboxTrigger {
|
|
|
2542
2635
|
this.rootContext.openAndHighlight(event.key === 'ArrowUp' ? 'last' : 'first', 'list-navigation', event);
|
|
2543
2636
|
}
|
|
2544
2637
|
}
|
|
2545
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2546
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2638
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2639
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxComboboxTrigger, isStandalone: true, selector: "button[rdxComboboxTrigger]", host: { attributes: { "type": "button" }, listeners: { "pointerdown": "onPointerDown($event)", "pointerup": "pressed.set(false)", "pointercancel": "pressed.set(false)", "pointerleave": "pressed.set(false)", "click": "onClick($event)", "keydown": "onKeydown($event)" }, properties: { "attr.tabindex": "rootContext.inputLayout() === \"outside\" ? \"-1\" : \"0\"", "attr.role": "rootContext.inputLayout() === \"inside\" ? \"combobox\" : undefined", "attr.aria-haspopup": "rootContext.inputLayout() === \"inside\" ? \"dialog\" : \"listbox\"", "attr.aria-expanded": "rootContext.open()", "attr.aria-controls": "rootContext.listId", "attr.aria-labelledby": "rootContext.labelId()", "attr.aria-required": "rootContext.inputLayout() === \"inside\" && rootContext.requiredState() ? \"true\" : undefined", "attr.disabled": "rootContext.disabledState() ? \"\" : undefined", "attr.data-popup-open": "rootContext.open() ? \"\" : undefined", "attr.data-pressed": "pressed() ? \"\" : undefined", "attr.data-disabled": "rootContext.disabledState() ? \"\" : undefined" } }, exportAs: ["rdxComboboxTrigger"], hostDirectives: [{ directive: i1$1.RdxFloatingInsideElement }], ngImport: i0 }); }
|
|
2547
2640
|
}
|
|
2548
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2641
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxTrigger, decorators: [{
|
|
2549
2642
|
type: Directive,
|
|
2550
2643
|
args: [{
|
|
2551
2644
|
selector: 'button[rdxComboboxTrigger]',
|
|
@@ -2562,8 +2655,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
2562
2655
|
'[attr.aria-required]': 'rootContext.inputLayout() === "inside" && rootContext.requiredState() ? "true" : undefined',
|
|
2563
2656
|
'[attr.disabled]': 'rootContext.disabledState() ? "" : undefined',
|
|
2564
2657
|
'[attr.data-popup-open]': 'rootContext.open() ? "" : undefined',
|
|
2658
|
+
'[attr.data-pressed]': 'pressed() ? "" : undefined',
|
|
2565
2659
|
'[attr.data-disabled]': 'rootContext.disabledState() ? "" : undefined',
|
|
2566
2660
|
'(pointerdown)': 'onPointerDown($event)',
|
|
2661
|
+
'(pointerup)': 'pressed.set(false)',
|
|
2662
|
+
'(pointercancel)': 'pressed.set(false)',
|
|
2663
|
+
'(pointerleave)': 'pressed.set(false)',
|
|
2567
2664
|
'(click)': 'onClick($event)',
|
|
2568
2665
|
'(keydown)': 'onKeydown($event)'
|
|
2569
2666
|
}
|
|
@@ -2584,7 +2681,8 @@ class RdxComboboxValue {
|
|
|
2584
2681
|
constructor() {
|
|
2585
2682
|
this.rootContext = injectComboboxRootContext();
|
|
2586
2683
|
/** Text shown when there is no selection. */
|
|
2587
|
-
this.placeholder = input(
|
|
2684
|
+
this.placeholder = input(/* @ts-ignore */
|
|
2685
|
+
...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
2588
2686
|
/** The label(s) of the current selection, resolved via the root's `itemToStringLabel`/items. */
|
|
2589
2687
|
this.selectedLabels = computed(() => {
|
|
2590
2688
|
const value = this.rootContext.value();
|
|
@@ -2592,18 +2690,21 @@ class RdxComboboxValue {
|
|
|
2592
2690
|
return value.map((v) => this.rootContext.labelFor(v)).filter(Boolean);
|
|
2593
2691
|
}
|
|
2594
2692
|
return isNullish(value) ? [] : [this.rootContext.labelFor(value)].filter(Boolean);
|
|
2595
|
-
},
|
|
2596
|
-
|
|
2693
|
+
}, /* @ts-ignore */
|
|
2694
|
+
...(ngDevMode ? [{ debugName: "selectedLabels" }] : /* istanbul ignore next */ []));
|
|
2695
|
+
this.isEmpty = computed(() => this.selectedLabels().length === 0, /* @ts-ignore */
|
|
2696
|
+
...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
|
|
2597
2697
|
/** The selection joined for display, or the `placeholder` when empty. */
|
|
2598
2698
|
this.slotText = computed(() => {
|
|
2599
2699
|
const labels = this.selectedLabels();
|
|
2600
2700
|
return labels.length ? labels.join(', ') : (this.placeholder() ?? '');
|
|
2601
|
-
},
|
|
2701
|
+
}, /* @ts-ignore */
|
|
2702
|
+
...(ngDevMode ? [{ debugName: "slotText" }] : /* istanbul ignore next */ []));
|
|
2602
2703
|
}
|
|
2603
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2604
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
2704
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxValue, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2705
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxComboboxValue, isStandalone: true, selector: "[rdxComboboxValue]", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-placeholder": "isEmpty() ? \"\" : undefined" } }, exportAs: ["rdxComboboxValue"], ngImport: i0 }); }
|
|
2605
2706
|
}
|
|
2606
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2707
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxValue, decorators: [{
|
|
2607
2708
|
type: Directive,
|
|
2608
2709
|
args: [{
|
|
2609
2710
|
selector: '[rdxComboboxValue]',
|
|
@@ -2644,8 +2745,8 @@ const _importsCombobox = [
|
|
|
2644
2745
|
RdxComboboxChipRemove
|
|
2645
2746
|
];
|
|
2646
2747
|
class RdxComboboxModule {
|
|
2647
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2648
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2748
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2749
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxModule, imports: [RdxComboboxRoot,
|
|
2649
2750
|
RdxComboboxAnchor,
|
|
2650
2751
|
RdxComboboxLabel,
|
|
2651
2752
|
RdxComboboxInput,
|
|
@@ -2698,9 +2799,9 @@ class RdxComboboxModule {
|
|
|
2698
2799
|
RdxComboboxChips,
|
|
2699
2800
|
RdxComboboxChip,
|
|
2700
2801
|
RdxComboboxChipRemove] }); }
|
|
2701
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2802
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxModule }); }
|
|
2702
2803
|
}
|
|
2703
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2804
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxComboboxModule, decorators: [{
|
|
2704
2805
|
type: NgModule,
|
|
2705
2806
|
args: [{
|
|
2706
2807
|
imports: [..._importsCombobox],
|