@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@radix-ng/primitives",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Headless, signals-first UI primitives for Angular.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"headless"
|
|
20
20
|
],
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"@angular/core": "^21.0.0",
|
|
22
|
+
"@angular/core": "^21.0.0 || ^22.0.0",
|
|
23
23
|
"@floating-ui/dom": "^1.7.6",
|
|
24
24
|
"@internationalized/date": "^3.12.2",
|
|
25
25
|
"@internationalized/number": "^3.6.7"
|
|
@@ -3,7 +3,7 @@ import * as _radix_ng_primitives_combobox from '@radix-ng/primitives/combobox';
|
|
|
3
3
|
import { RdxComboboxOpenChange, ComboboxItemHighlightedDetails, ComboboxInputLayout, ComboboxItemRef, RdxComboboxOpenChangeReason, ComboboxHighlightReason } from '@radix-ng/primitives/combobox';
|
|
4
4
|
export { ComboboxHighlightReason as AutocompleteHighlightReason, ComboboxItemHighlightedDetails as AutocompleteItemHighlightedDetails } from '@radix-ng/primitives/combobox';
|
|
5
5
|
import * as _radix_ng_primitives_core from '@radix-ng/primitives/core';
|
|
6
|
-
import { AcceptableValue, RdxFloatingRootContext, Direction, BooleanInput, ItemValueComparator } from '@radix-ng/primitives/core';
|
|
6
|
+
import { AcceptableValue, RdxCancelableChangeEventDetails, RdxFloatingRootContext, Direction, BooleanInput, ItemValueComparator } from '@radix-ng/primitives/core';
|
|
7
7
|
import { ControlValueAccessor } from '@angular/forms';
|
|
8
8
|
import * as i1 from '@radix-ng/primitives/popper';
|
|
9
9
|
import { RdxPopperContentWrapper } from '@radix-ng/primitives/popper';
|
|
@@ -45,6 +45,8 @@ interface AutocompleteValueChangeDetails {
|
|
|
45
45
|
value: string;
|
|
46
46
|
/** What caused the change (e.g. skip `'item-press'` to avoid overwriting an external value). */
|
|
47
47
|
reason: AutocompleteChangeReason;
|
|
48
|
+
/** Cancelable details — call `eventDetails.cancel()` to veto the change. */
|
|
49
|
+
eventDetails: RdxCancelableChangeEventDetails<AutocompleteChangeReason>;
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
/**
|
|
@@ -3,7 +3,7 @@ import { Signal, Injector } from '@angular/core';
|
|
|
3
3
|
import * as i1 from '@radix-ng/primitives/popper';
|
|
4
4
|
import { RdxPopperContentWrapper } from '@radix-ng/primitives/popper';
|
|
5
5
|
import * as _radix_ng_primitives_core from '@radix-ng/primitives/core';
|
|
6
|
-
import { AcceptableValue, RdxFloatingRootContext, Direction, BooleanInput, ItemValueComparator
|
|
6
|
+
import { AcceptableValue, RdxCancelableChangeEventDetails, RdxFloatingRootContext, Direction, BooleanInput, ItemValueComparator } from '@radix-ng/primitives/core';
|
|
7
7
|
import { ControlValueAccessor } from '@angular/forms';
|
|
8
8
|
import * as _radix_ng_primitives_combobox from '@radix-ng/primitives/combobox';
|
|
9
9
|
import * as i1$1 from '@radix-ng/primitives/dismissable-layer';
|
|
@@ -196,6 +196,20 @@ interface RdxComboboxOpenChange {
|
|
|
196
196
|
trigger: HTMLElement | undefined;
|
|
197
197
|
eventDetails: RdxComboboxOpenChangeEventDetails;
|
|
198
198
|
}
|
|
199
|
+
/** Why the selected value changed (Base UI value-change `reason`). */
|
|
200
|
+
type RdxComboboxValueChangeReason = 'item-press' | 'clear-press' | 'chip-remove-press' | 'input-clear' | 'none';
|
|
201
|
+
type RdxComboboxValueChangeEventDetails = RdxCancelableChangeEventDetails<RdxComboboxValueChangeReason>;
|
|
202
|
+
/** Payload of {@link RdxComboboxRoot.onValueChange} — cancelable via `eventDetails.cancel()`. */
|
|
203
|
+
interface RdxComboboxValueChange {
|
|
204
|
+
value: ComboboxValue | null;
|
|
205
|
+
reason: RdxComboboxValueChangeReason;
|
|
206
|
+
eventDetails: RdxComboboxValueChangeEventDetails;
|
|
207
|
+
}
|
|
208
|
+
/** Payload of {@link RdxComboboxRoot.onInputValueChange} — cancelable via `eventDetails.cancel()`. */
|
|
209
|
+
interface RdxComboboxInputValueChange {
|
|
210
|
+
value: string;
|
|
211
|
+
eventDetails: RdxComboboxValueChangeEventDetails;
|
|
212
|
+
}
|
|
199
213
|
|
|
200
214
|
declare const context: () => {
|
|
201
215
|
listId: string;
|
|
@@ -516,10 +530,10 @@ declare class RdxComboboxRoot implements ControlValueAccessor {
|
|
|
516
530
|
readonly isItemEqualToValue: _angular_core.InputSignal<ItemValueComparator<AcceptableValue> | undefined>;
|
|
517
531
|
/** Converts a value to its display label. Defaults to the matching item's text. */
|
|
518
532
|
readonly itemToStringLabel: _angular_core.InputSignal<((value: AcceptableValue) => string) | undefined>;
|
|
519
|
-
/** Emits
|
|
520
|
-
readonly onValueChange: _angular_core.OutputEmitterRef<
|
|
521
|
-
/** Emits
|
|
522
|
-
readonly onInputValueChange: _angular_core.OutputEmitterRef<
|
|
533
|
+
/** Emits before the selection changes; call `eventDetails.cancel()` to veto it. */
|
|
534
|
+
readonly onValueChange: _angular_core.OutputEmitterRef<RdxComboboxValueChange>;
|
|
535
|
+
/** Emits before the input text changes; call `eventDetails.cancel()` to veto it. */
|
|
536
|
+
readonly onInputValueChange: _angular_core.OutputEmitterRef<RdxComboboxInputValueChange>;
|
|
523
537
|
/** Emits when the popup opens or closes. */
|
|
524
538
|
readonly onOpenChange: _angular_core.OutputEmitterRef<RdxComboboxOpenChange>;
|
|
525
539
|
/**
|
|
@@ -576,9 +590,12 @@ declare class RdxComboboxRoot implements ControlValueAccessor {
|
|
|
576
590
|
isSelected(value: AcceptableValue): boolean;
|
|
577
591
|
setOpen(open: boolean, reason?: RdxComboboxOpenChangeReason, event?: Event): boolean;
|
|
578
592
|
closePopup(revert?: boolean, reason?: RdxComboboxOpenChangeReason, event?: Event): void;
|
|
579
|
-
/** Updates the input text from user typing (marks the query as a fresh user query). */
|
|
580
|
-
setInputValue(value: string): void;
|
|
581
|
-
/**
|
|
593
|
+
/** Updates the input text from user typing (marks the query as a fresh user query). Cancelable. */
|
|
594
|
+
setInputValue(value: string, event?: Event): void;
|
|
595
|
+
/**
|
|
596
|
+
* Sets the input text programmatically (a selection label / revert) — not a user query. Emits
|
|
597
|
+
* `onInputValueChange` for observability but is not vetoable (it is a derived sync, not a user edit).
|
|
598
|
+
*/
|
|
582
599
|
private setLabel;
|
|
583
600
|
/** Resets the input text to the current selection's label (single mode) or empty. */
|
|
584
601
|
private revertInputValue;
|
|
@@ -938,6 +955,8 @@ declare class RdxComboboxTrigger {
|
|
|
938
955
|
markAsTouched: () => void;
|
|
939
956
|
};
|
|
940
957
|
private readonly element;
|
|
958
|
+
/** Whether the trigger is currently pressed (pointer down), for Base UI's `data-pressed`. */
|
|
959
|
+
protected readonly pressed: _angular_core.WritableSignal<boolean>;
|
|
941
960
|
constructor();
|
|
942
961
|
onPointerDown(event: PointerEvent): void;
|
|
943
962
|
onClick(event: MouseEvent): void;
|
|
@@ -1696,4 +1715,4 @@ declare class RdxComboboxModule {
|
|
|
1696
1715
|
}
|
|
1697
1716
|
|
|
1698
1717
|
export { RdxComboboxAnchor, RdxComboboxArrow, RdxComboboxBackdrop, RdxComboboxChip, RdxComboboxChipRemove, RdxComboboxChips, RdxComboboxClear, RdxComboboxEmpty, RdxComboboxGroup, RdxComboboxGroupLabel, RdxComboboxIcon, RdxComboboxInput, RdxComboboxInputGroup, RdxComboboxItem, RdxComboboxItemIndicator, RdxComboboxLabel, RdxComboboxList, RdxComboboxModule, RdxComboboxPopup, RdxComboboxPortal, RdxComboboxPortalMisuseGuard, RdxComboboxPositioner, RdxComboboxRoot, RdxComboboxRow, RdxComboboxSeparator, RdxComboboxStatus, RdxComboboxTrigger, RdxComboboxValue, _importsCombobox, injectComboboxChipContext, injectComboboxGroupContext, injectComboboxItemContext, injectComboboxRootContext, provideComboboxChipContext, provideComboboxGroupContext, provideComboboxItemContext, provideComboboxRootContext, useComboboxEngine };
|
|
1699
|
-
export type { ComboboxFilter, ComboboxHighlightReason, ComboboxInputLayout, ComboboxItemHighlightedDetails, ComboboxItemRef, ComboboxValue, RdxComboboxChipContext, RdxComboboxGroupContext, RdxComboboxItemContext, RdxComboboxOpenChange, RdxComboboxOpenChangeEventDetails, RdxComboboxOpenChangeReason, RdxComboboxRootContext };
|
|
1718
|
+
export type { ComboboxFilter, ComboboxHighlightReason, ComboboxInputLayout, ComboboxItemHighlightedDetails, ComboboxItemRef, ComboboxValue, RdxComboboxChipContext, RdxComboboxGroupContext, RdxComboboxInputValueChange, RdxComboboxItemContext, RdxComboboxOpenChange, RdxComboboxOpenChangeEventDetails, RdxComboboxOpenChangeReason, RdxComboboxRootContext, RdxComboboxValueChange, RdxComboboxValueChangeEventDetails, RdxComboboxValueChangeReason };
|
|
@@ -150,6 +150,8 @@ declare class RdxCompositeRoot {
|
|
|
150
150
|
setHighlightedIndex(index: number, shouldScrollIntoView?: boolean): void;
|
|
151
151
|
relayKeyboardEvent(event: KeyboardEvent): void;
|
|
152
152
|
protected handleKeydown(event: KeyboardEvent): void;
|
|
153
|
+
/** Select the whole value when focus lands on a native text input item (Base UI parity). */
|
|
154
|
+
protected handleFocusIn(event: FocusEvent): void;
|
|
153
155
|
private handleCompositeKeydown;
|
|
154
156
|
private getNextIndex;
|
|
155
157
|
private elements;
|
|
@@ -57,6 +57,8 @@ declare class RdxContextMenuTrigger {
|
|
|
57
57
|
readonly disabled: i0.InputSignalWithTransform<boolean, BooleanInput>;
|
|
58
58
|
/** How long (ms) a touch must be held before the menu opens. */
|
|
59
59
|
readonly longPressDelay: i0.InputSignalWithTransform<number, NumberInput>;
|
|
60
|
+
/** Whether the trigger is mid-press (Base UI `data-pressed`). */
|
|
61
|
+
protected readonly pressed: i0.WritableSignal<boolean>;
|
|
60
62
|
private longPressTimer;
|
|
61
63
|
private allowMouseUpTimer;
|
|
62
64
|
private longPressOrigin;
|
|
@@ -112,6 +112,8 @@ interface RdxDialogRootContext {
|
|
|
112
112
|
/** Whether this dialog is nested in another; constant, fixed at construction. */
|
|
113
113
|
nested: boolean;
|
|
114
114
|
nestedDialogOpen: Signal<boolean>;
|
|
115
|
+
/** Number of currently-open dialogs nested directly inside this one (Base UI `--nested-dialogs`). */
|
|
116
|
+
nestedOpenCount: Signal<number>;
|
|
115
117
|
setTitleId: (id: string | undefined) => void;
|
|
116
118
|
setDescriptionId: (id: string | undefined) => void;
|
|
117
119
|
registerTransitionElement: (element: HTMLElement) => () => void;
|
|
@@ -160,13 +162,14 @@ declare class RdxDialogRoot {
|
|
|
160
162
|
*/
|
|
161
163
|
readonly modal: _angular_core.InputSignalWithTransform<RdxDialogModal, BooleanInput>;
|
|
162
164
|
/**
|
|
163
|
-
* Determines whether the dialog should close on outside clicks.
|
|
165
|
+
* Determines whether the dialog should close on outside clicks. For a non-modal dialog this also
|
|
166
|
+
* prevents the dialog from closing when focus moves outside of it.
|
|
164
167
|
*/
|
|
165
168
|
readonly disablePointerDismissal: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
166
169
|
/**
|
|
167
170
|
* Associates this root with detached trigger elements rendered outside of it.
|
|
168
171
|
*/
|
|
169
|
-
readonly handle: _angular_core.InputSignal<RdxDialogHandle<
|
|
172
|
+
readonly handle: _angular_core.InputSignal<RdxDialogHandle<unknown> | undefined>;
|
|
170
173
|
/**
|
|
171
174
|
* Event handler called when the dialog is opened or closed.
|
|
172
175
|
*/
|
|
@@ -227,7 +230,7 @@ declare class RdxDialogTrigger {
|
|
|
227
230
|
/**
|
|
228
231
|
* Associates this trigger with a detached dialog root.
|
|
229
232
|
*/
|
|
230
|
-
readonly handle: _angular_core.InputSignal<RdxDialogHandle<
|
|
233
|
+
readonly handle: _angular_core.InputSignal<RdxDialogHandle<unknown> | undefined>;
|
|
231
234
|
/**
|
|
232
235
|
* Data associated with this trigger while it is active.
|
|
233
236
|
*/
|
|
@@ -200,6 +200,17 @@ declare class RdxFloatingFocusManager {
|
|
|
200
200
|
* The marker keep-set is intentionally narrow: the popup/focus host only. Own sibling roots such as a
|
|
201
201
|
* user backdrop are DOM-footprint bookkeeping, not marker keep-set members.
|
|
202
202
|
*/
|
|
203
|
+
/**
|
|
204
|
+
* The kept ("avoid") subtree for the `markOthers` background-isolation passes — the floating element
|
|
205
|
+
* and any primitive-declared inside elements (e.g. a combobox input that must stay interactive).
|
|
206
|
+
*
|
|
207
|
+
* It deliberately excludes `previous/nextFocusableElement`: those exist for focus-guard tabbability and
|
|
208
|
+
* return-focus (Base UI's `markOthers(insideElements)` aria-hidden pass keeps them, but its **marker**
|
|
209
|
+
* pass — `markOthers([floating, ...portalNodes])` — does not). A modal popover declares its trigger as
|
|
210
|
+
* `previousFocusableElement`; sparing it here used to leak the trigger's whole ancestor chain (the app
|
|
211
|
+
* root) out of the isolation, so a modal popover failed to inert/mark the dimmed background. Keeping the
|
|
212
|
+
* isolation tied to the floating subtree restores full modality.
|
|
213
|
+
*/
|
|
203
214
|
private avoidElements;
|
|
204
215
|
private isFloatingOpen;
|
|
205
216
|
/** Whether `relatedTarget` is inside the popup, its trigger(s), or an ancestor / descendant popup. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { Signal, WritableSignal } from '@angular/core';
|
|
2
|
+
import { InjectionToken, Signal, WritableSignal } from '@angular/core';
|
|
3
3
|
import * as _radix_ng_primitives_core from '@radix-ng/primitives/core';
|
|
4
|
-
import { RdxFloatingRootContext, BooleanInput, Direction, RdxCancelableChangeEventDetails, NumberInput } from '@radix-ng/primitives/core';
|
|
4
|
+
import { RdxFloatingRootContext, BooleanInput, Direction, RdxCancelableChangeEventDetails, NumberInput, DataOrientation } from '@radix-ng/primitives/core';
|
|
5
5
|
import * as _radix_ng_primitives_floating_focus_manager from '@radix-ng/primitives/floating-focus-manager';
|
|
6
6
|
import { RdxInteractionType } from '@radix-ng/primitives/floating-focus-manager';
|
|
7
7
|
import * as i1 from '@radix-ng/primitives/popper';
|
|
@@ -12,6 +12,12 @@ import * as i1$2 from '@radix-ng/primitives/portal';
|
|
|
12
12
|
import { RdxOutsidePressDomEvent } from '@radix-ng/primitives/dismissable-layer';
|
|
13
13
|
|
|
14
14
|
type RdxMenuTransitionStatus = 'starting' | 'ending' | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Why an open/close happened instantly (no transition). Mirrors Base UI's menu `data-instant`:
|
|
17
|
+
* `'click'` (opened by click/keyboard), `'dismiss'` (closed by Escape / outside-press / focus-out),
|
|
18
|
+
* `'group'`, or `'trigger-change'` (menubar switching between sibling menus).
|
|
19
|
+
*/
|
|
20
|
+
type RdxMenuInstantType = 'click' | 'dismiss' | 'group' | 'trigger-change';
|
|
15
21
|
/**
|
|
16
22
|
* How focus moves into the popup when it opens.
|
|
17
23
|
* - `'first'` / `'last'` — focus and highlight the first / last item (keyboard opening).
|
|
@@ -63,6 +69,8 @@ interface RdxMenuRootContext {
|
|
|
63
69
|
parentType: Signal<RdxMenuParentType>;
|
|
64
70
|
/** The reason for the most recent open-change (Base UI open-change `reason`). */
|
|
65
71
|
lastOpenChangeReason: Signal<RdxMenuOpenChangeReason>;
|
|
72
|
+
/** Why the open/close was instant (Base UI `data-instant`), or `undefined` when it animates. */
|
|
73
|
+
instantType: Signal<RdxMenuInstantType | undefined>;
|
|
66
74
|
/** Whether a trigger-originated press may activate an item on the following mouseup. */
|
|
67
75
|
allowMouseUpTrigger: Signal<boolean>;
|
|
68
76
|
/** Whether the current open was initiated by touch (ADR 0016 §3 — gates the anchored scroll lock). */
|
|
@@ -133,6 +141,12 @@ type RdxMenuTriggerInteraction = {
|
|
|
133
141
|
type RdxMenuTriggerInteractionHandler = (interaction: RdxMenuTriggerInteraction) => boolean;
|
|
134
142
|
declare const injectRdxMenuRootContext: _radix_ng_primitives_core.InjectContext<RdxMenuRootContext>;
|
|
135
143
|
declare const provideRdxMenuRootContext: (useFactory: () => RdxMenuRootContext) => _angular_core.Provider;
|
|
144
|
+
/**
|
|
145
|
+
* Ambient modality for a menu, provided by a coordinator (e.g. `Menubar`) so its child menus inherit
|
|
146
|
+
* the coordinator's `modal` setting instead of each defaulting independently. A top-level menu prefers
|
|
147
|
+
* this over its own `modal` input when present; submenus stay non-modal regardless.
|
|
148
|
+
*/
|
|
149
|
+
declare const RDX_MENU_AMBIENT_MODAL: InjectionToken<Signal<boolean>>;
|
|
136
150
|
/**
|
|
137
151
|
* Groups all parts of a menu.
|
|
138
152
|
*/
|
|
@@ -140,6 +154,8 @@ declare class RdxMenuRoot {
|
|
|
140
154
|
private readonly popper;
|
|
141
155
|
readonly parentRoot: RdxMenuRoot | null;
|
|
142
156
|
private readonly providedDirection;
|
|
157
|
+
/** Ambient modality from an enclosing coordinator (e.g. Menubar). Overrides own `modal` for top-level menus. */
|
|
158
|
+
private readonly ambientModal;
|
|
143
159
|
/**
|
|
144
160
|
* The shared per-popup floating context (ADR 0015 §1) — `open` mirrors this menu's open state, the
|
|
145
161
|
* trigger registry is bridged from {@link registerTrigger}, and the reference / floating elements are
|
|
@@ -208,6 +224,8 @@ declare class RdxMenuRoot {
|
|
|
208
224
|
readonly effectiveModal: Signal<boolean>;
|
|
209
225
|
readonly state: Signal<"open" | "closed">;
|
|
210
226
|
readonly present: Signal<boolean>;
|
|
227
|
+
/** Base UI `data-instant`: the open/close reason classified into the instant-suppression bucket. */
|
|
228
|
+
readonly instantType: Signal<RdxMenuInstantType | undefined>;
|
|
211
229
|
constructor();
|
|
212
230
|
show(autoFocus?: RdxMenuAutoFocusInput, reason?: RdxMenuOpenChangeReason, event?: Event): void;
|
|
213
231
|
close(reason?: RdxMenuOpenChangeReason, event?: Event): void;
|
|
@@ -262,6 +280,8 @@ declare class RdxMenuTrigger {
|
|
|
262
280
|
/** Delay before hover leave closes the menu, in milliseconds. */
|
|
263
281
|
readonly closeDelay: _angular_core.InputSignalWithTransform<number | undefined, NumberInput>;
|
|
264
282
|
protected readonly nativeButtonState: _angular_core.Signal<boolean>;
|
|
283
|
+
/** Whether the trigger is currently pressed (pointer down), for Base UI's `data-pressed`. */
|
|
284
|
+
protected readonly pressed: _angular_core.WritableSignal<boolean>;
|
|
265
285
|
protected readonly isDisabled: _angular_core.Signal<boolean>;
|
|
266
286
|
protected readonly triggerInteraction: _radix_ng_primitives_floating_focus_manager.RdxTriggerInteraction;
|
|
267
287
|
constructor();
|
|
@@ -584,8 +604,10 @@ declare class RdxMenuGroupLabel {
|
|
|
584
604
|
* A visual separator between groups of menu items.
|
|
585
605
|
*/
|
|
586
606
|
declare class RdxMenuSeparator {
|
|
607
|
+
/** The orientation of the separator. Matches Base UI's `Separator.orientation`. */
|
|
608
|
+
readonly orientation: _angular_core.InputSignal<DataOrientation>;
|
|
587
609
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuSeparator, never>;
|
|
588
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuSeparator, "[rdxMenuSeparator]", ["rdxMenuSeparator"], {}, {}, never, never, true, never>;
|
|
610
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuSeparator, "[rdxMenuSeparator]", ["rdxMenuSeparator"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
589
611
|
}
|
|
590
612
|
|
|
591
613
|
type CheckedState = boolean | 'indeterminate';
|
|
@@ -595,6 +617,11 @@ declare function getCheckedState(checked: CheckedState): 'checked' | 'unchecked'
|
|
|
595
617
|
interface RdxMenuCheckboxItemContext {
|
|
596
618
|
checked: Signal<CheckedState>;
|
|
597
619
|
}
|
|
620
|
+
/** Payload of {@link RdxMenuCheckboxItem.onCheckedChange} — cancelable via `eventDetails.cancel()`. */
|
|
621
|
+
interface RdxMenuCheckboxChangeEvent {
|
|
622
|
+
checked: CheckedState;
|
|
623
|
+
eventDetails: RdxCancelableChangeEventDetails<'none'>;
|
|
624
|
+
}
|
|
598
625
|
declare const injectRdxMenuCheckboxItemContext: _radix_ng_primitives_core.InjectContext<RdxMenuCheckboxItemContext>;
|
|
599
626
|
declare const provideRdxMenuCheckboxItemContext: (useFactory: () => RdxMenuCheckboxItemContext) => _angular_core.Provider;
|
|
600
627
|
/**
|
|
@@ -613,12 +640,11 @@ declare class RdxMenuCheckboxItem {
|
|
|
613
640
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
614
641
|
/** The checked state of the item. */
|
|
615
642
|
readonly checked: _angular_core.ModelSignal<CheckedState>;
|
|
616
|
-
/** Emits
|
|
617
|
-
readonly onCheckedChange: _angular_core.OutputEmitterRef<
|
|
643
|
+
/** Emits before the checked state changes; call `eventDetails.cancel()` to veto it. */
|
|
644
|
+
readonly onCheckedChange: _angular_core.OutputEmitterRef<RdxMenuCheckboxChangeEvent>;
|
|
618
645
|
protected readonly highlighted: Signal<boolean>;
|
|
619
646
|
protected readonly effectiveDisabled: Signal<boolean>;
|
|
620
647
|
protected readonly isIndeterminate: typeof isIndeterminate;
|
|
621
|
-
protected readonly getCheckedState: typeof getCheckedState;
|
|
622
648
|
constructor();
|
|
623
649
|
onFocus(): void;
|
|
624
650
|
onBlur(): void;
|
|
@@ -627,6 +653,7 @@ declare class RdxMenuCheckboxItem {
|
|
|
627
653
|
onItemClick(): void;
|
|
628
654
|
onMouseUp(event: MouseEvent): void;
|
|
629
655
|
protected onActivate(event: Event): void;
|
|
656
|
+
/** Emits the cancelable change, applies it unless vetoed, and reports whether it was applied. */
|
|
630
657
|
private toggleChecked;
|
|
631
658
|
private setActiveIndex;
|
|
632
659
|
private clearActiveIndex;
|
|
@@ -642,7 +669,8 @@ declare class RdxMenuCheckboxItemIndicator {
|
|
|
642
669
|
private readonly itemContext;
|
|
643
670
|
/** Keep the indicator in the DOM when unchecked so CSS exit animations can play. */
|
|
644
671
|
readonly keepMounted: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
645
|
-
protected readonly
|
|
672
|
+
protected readonly checked: _angular_core.Signal<_radix_ng_primitives_menu.CheckedState>;
|
|
673
|
+
protected readonly isIndeterminate: typeof isIndeterminate;
|
|
646
674
|
protected readonly isVisible: _angular_core.Signal<boolean>;
|
|
647
675
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuCheckboxItemIndicator, never>;
|
|
648
676
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuCheckboxItemIndicator, "[rdxMenuCheckboxItemIndicator]", ["rdxMenuCheckboxItemIndicator"], { "keepMounted": { "alias": "keepMounted"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -651,7 +679,12 @@ declare class RdxMenuCheckboxItemIndicator {
|
|
|
651
679
|
interface RdxMenuRadioGroupContext<T = unknown> {
|
|
652
680
|
value: Signal<T | undefined>;
|
|
653
681
|
disabled: Signal<boolean>;
|
|
654
|
-
selectValue: (value: T) => void;
|
|
682
|
+
selectValue: (value: T, event?: Event) => void;
|
|
683
|
+
}
|
|
684
|
+
/** Payload of {@link RdxMenuRadioGroup.onValueChange} — cancelable via `eventDetails.cancel()`. */
|
|
685
|
+
interface RdxMenuRadioGroupValueChangeEvent<T = unknown> {
|
|
686
|
+
value: T;
|
|
687
|
+
eventDetails: RdxCancelableChangeEventDetails<'none'>;
|
|
655
688
|
}
|
|
656
689
|
declare const injectRdxMenuRadioGroupContext: _radix_ng_primitives_core.InjectContext<RdxMenuRadioGroupContext<unknown>>;
|
|
657
690
|
declare const provideRdxMenuRadioGroupContext: (useFactory: () => RdxMenuRadioGroupContext<unknown>) => _angular_core.Provider;
|
|
@@ -669,12 +702,12 @@ declare class RdxMenuRadioGroup<T = unknown> {
|
|
|
669
702
|
/** Whether all radio items in the group are disabled. */
|
|
670
703
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
671
704
|
/**
|
|
672
|
-
* Emits
|
|
705
|
+
* Emits before the selected value changes; call `eventDetails.cancel()` to veto it.
|
|
673
706
|
*/
|
|
674
|
-
readonly onValueChange: _angular_core.OutputEmitterRef<T
|
|
707
|
+
readonly onValueChange: _angular_core.OutputEmitterRef<RdxMenuRadioGroupValueChangeEvent<T>>;
|
|
675
708
|
readonly labelId: _angular_core.WritableSignal<string | undefined>;
|
|
676
709
|
constructor();
|
|
677
|
-
selectValue(newValue: T): void;
|
|
710
|
+
selectValue(newValue: T, event?: Event): void;
|
|
678
711
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuRadioGroup<any>, never>;
|
|
679
712
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuRadioGroup<any>, "[rdxMenuRadioGroup]", ["rdxMenuRadioGroup"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "onValueChange": "onValueChange"; }, never, never, true, never>;
|
|
680
713
|
}
|
|
@@ -706,7 +739,6 @@ declare class RdxMenuRadioItem<T = unknown> {
|
|
|
706
739
|
readonly checked: Signal<boolean>;
|
|
707
740
|
protected readonly highlighted: Signal<boolean>;
|
|
708
741
|
protected readonly effectiveDisabled: Signal<boolean>;
|
|
709
|
-
protected readonly getCheckedState: typeof getCheckedState;
|
|
710
742
|
constructor();
|
|
711
743
|
onFocus(): void;
|
|
712
744
|
onBlur(): void;
|
|
@@ -730,7 +762,7 @@ declare class RdxMenuRadioItemIndicator {
|
|
|
730
762
|
private readonly itemContext;
|
|
731
763
|
/** Keep the indicator in the DOM when unselected so CSS exit animations can play. */
|
|
732
764
|
readonly keepMounted: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
733
|
-
protected readonly
|
|
765
|
+
protected readonly checked: _angular_core.Signal<boolean>;
|
|
734
766
|
protected readonly isVisible: _angular_core.Signal<boolean>;
|
|
735
767
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuRadioItemIndicator, never>;
|
|
736
768
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuRadioItemIndicator, "[rdxMenuRadioItemIndicator]", ["rdxMenuRadioItemIndicator"], { "keepMounted": { "alias": "keepMounted"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -748,5 +780,5 @@ declare class RdxMenuModule {
|
|
|
748
780
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<RdxMenuModule>;
|
|
749
781
|
}
|
|
750
782
|
|
|
751
|
-
export { RdxMenuArrow, RdxMenuBackdrop, RdxMenuCheckboxItem, RdxMenuCheckboxItemIndicator, RdxMenuGroup, RdxMenuGroupLabel, RdxMenuItem, RdxMenuLinkItem, RdxMenuModule, RdxMenuPopup, RdxMenuPortal, RdxMenuPortalMisuseGuard, RdxMenuPositioner, RdxMenuRadioGroup, RdxMenuRadioItem, RdxMenuRadioItemIndicator, RdxMenuRoot, RdxMenuSeparator, RdxMenuSubTrigger, RdxMenuTrigger, RdxMenuViewport, getCheckedState, injectRdxMenuCheckboxItemContext, injectRdxMenuGroupContext, injectRdxMenuRadioGroupContext, injectRdxMenuRadioItemContext, injectRdxMenuRootContext, isIndeterminate, provideRdxMenuCheckboxItemContext, provideRdxMenuGroupContext, provideRdxMenuRadioGroupContext, provideRdxMenuRadioItemContext, provideRdxMenuRootContext };
|
|
752
|
-
export type { CheckedState, RdxMenuAutoFocus, RdxMenuAutoFocusInput, RdxMenuCheckboxItemContext, RdxMenuGroupContext, RdxMenuOpenChange, RdxMenuOpenChangeEventDetails, RdxMenuOpenChangeReason, RdxMenuOrientation, RdxMenuParentType, RdxMenuRadioGroupContext, RdxMenuRadioItemContext, RdxMenuRootContext, RdxMenuTransitionStatus, RdxMenuTriggerInteraction, RdxMenuTriggerInteractionHandler };
|
|
783
|
+
export { RDX_MENU_AMBIENT_MODAL, RdxMenuArrow, RdxMenuBackdrop, RdxMenuCheckboxItem, RdxMenuCheckboxItemIndicator, RdxMenuGroup, RdxMenuGroupLabel, RdxMenuItem, RdxMenuLinkItem, RdxMenuModule, RdxMenuPopup, RdxMenuPortal, RdxMenuPortalMisuseGuard, RdxMenuPositioner, RdxMenuRadioGroup, RdxMenuRadioItem, RdxMenuRadioItemIndicator, RdxMenuRoot, RdxMenuSeparator, RdxMenuSubTrigger, RdxMenuTrigger, RdxMenuViewport, getCheckedState, injectRdxMenuCheckboxItemContext, injectRdxMenuGroupContext, injectRdxMenuRadioGroupContext, injectRdxMenuRadioItemContext, injectRdxMenuRootContext, isIndeterminate, provideRdxMenuCheckboxItemContext, provideRdxMenuGroupContext, provideRdxMenuRadioGroupContext, provideRdxMenuRadioItemContext, provideRdxMenuRootContext };
|
|
784
|
+
export type { CheckedState, RdxMenuAutoFocus, RdxMenuAutoFocusInput, RdxMenuCheckboxChangeEvent, RdxMenuCheckboxItemContext, RdxMenuGroupContext, RdxMenuInstantType, RdxMenuOpenChange, RdxMenuOpenChangeEventDetails, RdxMenuOpenChangeReason, RdxMenuOrientation, RdxMenuParentType, RdxMenuRadioGroupContext, RdxMenuRadioGroupValueChangeEvent, RdxMenuRadioItemContext, RdxMenuRootContext, RdxMenuTransitionStatus, RdxMenuTriggerInteraction, RdxMenuTriggerInteractionHandler };
|
|
@@ -9,6 +9,7 @@ interface RdxMenubarContext {
|
|
|
9
9
|
activeId: Signal<string | null>;
|
|
10
10
|
isAnyOpen: Signal<boolean>;
|
|
11
11
|
disabled: Signal<boolean>;
|
|
12
|
+
modal: Signal<boolean>;
|
|
12
13
|
orientation: Signal<RdxMenubarOrientation>;
|
|
13
14
|
registerItem: (id: string, el: HTMLElement, open: () => void, close: () => void, disabled: () => boolean) => () => void;
|
|
14
15
|
activateItem: (id: string) => void;
|
|
@@ -32,12 +33,16 @@ declare class RdxMenubarRoot {
|
|
|
32
33
|
private readonly itemsVersion;
|
|
33
34
|
/** Whether every menubar trigger is disabled. */
|
|
34
35
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
36
|
+
/** Whether the child menus block outside interaction and lock scroll while open (Base UI default `true`). */
|
|
37
|
+
readonly modal: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
35
38
|
/** Whether arrow-key navigation wraps at the first/last trigger. */
|
|
36
39
|
readonly loopFocus: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
37
40
|
/** The menubar orientation. */
|
|
38
41
|
readonly orientation: _angular_core.InputSignal<RdxMenubarOrientation>;
|
|
39
42
|
readonly activeId: _angular_core.WritableSignal<string | null>;
|
|
40
43
|
readonly isAnyOpen: Signal<boolean>;
|
|
44
|
+
/** Whether a **nested submenu** is currently open (Base UI `data-has-submenu-open` — not top-level menus). */
|
|
45
|
+
readonly hasSubmenuOpen: Signal<boolean>;
|
|
41
46
|
constructor();
|
|
42
47
|
registerItem(id: string, el: HTMLElement, open: () => void, close: () => void, disabled: () => boolean): () => void;
|
|
43
48
|
activateItem(id: string): void;
|
|
@@ -61,7 +66,7 @@ declare class RdxMenubarRoot {
|
|
|
61
66
|
private syncDisabledIndices;
|
|
62
67
|
private syncTabIndices;
|
|
63
68
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenubarRoot, never>;
|
|
64
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenubarRoot, "[rdxMenubarRoot]", ["rdxMenubarRoot"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loopFocus": { "alias": "loopFocus"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; }, {}, ["menuRoots"], never, true, [{ directive: typeof i1.RdxCompositeRoot; inputs: {}; outputs: {}; }]>;
|
|
69
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenubarRoot, "[rdxMenubarRoot]", ["rdxMenubarRoot"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "modal": { "alias": "modal"; "required": false; "isSignal": true; }; "loopFocus": { "alias": "loopFocus"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; }, {}, ["menuRoots"], never, true, [{ directive: typeof i1.RdxCompositeRoot; inputs: {}; outputs: {}; }]>;
|
|
65
70
|
}
|
|
66
71
|
|
|
67
72
|
declare class RdxMenubarModule {
|
|
@@ -42,7 +42,7 @@ declare class RdxNavigationMenuPortalMisuseGuard {
|
|
|
42
42
|
|
|
43
43
|
type NavigationMenuOrientation = 'horizontal' | 'vertical';
|
|
44
44
|
type NavigationMenuDirection = 'ltr' | 'rtl';
|
|
45
|
-
type RdxNavigationMenuOpenChangeReason = 'trigger-hover' | 'trigger-press' | 'list-navigation' | 'outside-press' | 'focus-out' | 'escape-key' | 'link-
|
|
45
|
+
type RdxNavigationMenuOpenChangeReason = 'trigger-hover' | 'trigger-press' | 'list-navigation' | 'outside-press' | 'focus-out' | 'escape-key' | 'link-press' | 'list-leave' | 'none';
|
|
46
46
|
type RdxNavigationMenuOpenChangeEventDetails = RdxCancelableChangeEventDetails<RdxNavigationMenuOpenChangeReason>;
|
|
47
47
|
interface RdxNavigationMenuOpenChange {
|
|
48
48
|
value: string | null;
|
|
@@ -237,10 +237,10 @@ declare class RdxNavigationMenuList {
|
|
|
237
237
|
*/
|
|
238
238
|
declare class RdxNavigationMenuItem {
|
|
239
239
|
private readonly rootContext;
|
|
240
|
-
/**
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
readonly value: _angular_core.
|
|
240
|
+
/** A unique value that identifies the item. Falls back to a stable generated id. */
|
|
241
|
+
readonly valueInput: _angular_core.InputSignal<string | undefined>;
|
|
242
|
+
private readonly generatedValue;
|
|
243
|
+
readonly value: _angular_core.Signal<string>;
|
|
244
244
|
/** The trigger element, set by the trigger directive. */
|
|
245
245
|
readonly triggerRef: _angular_core.WritableSignal<HTMLElement | null>;
|
|
246
246
|
/** Whether this item is the currently open one. */
|
|
@@ -248,7 +248,7 @@ declare class RdxNavigationMenuItem {
|
|
|
248
248
|
readonly triggerId: _angular_core.Signal<string>;
|
|
249
249
|
readonly contentId: _angular_core.Signal<string>;
|
|
250
250
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxNavigationMenuItem, never>;
|
|
251
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxNavigationMenuItem, "[rdxNavigationMenuItem]", ["rdxNavigationMenuItem"], { "
|
|
251
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxNavigationMenuItem, "[rdxNavigationMenuItem]", ["rdxNavigationMenuItem"], { "valueInput": { "alias": "value"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
/**
|
|
@@ -267,6 +267,8 @@ declare class RdxNavigationMenuTrigger {
|
|
|
267
267
|
* Whether the content should also open when the trigger is hovered.
|
|
268
268
|
*/
|
|
269
269
|
readonly openOnHover: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
270
|
+
/** Whether the trigger is currently pressed (pointer down), for Base UI's `data-pressed`. */
|
|
271
|
+
protected readonly pressed: _angular_core.WritableSignal<boolean>;
|
|
270
272
|
protected readonly open: _angular_core.Signal<boolean>;
|
|
271
273
|
constructor();
|
|
272
274
|
protected onClick(event: MouseEvent): void;
|
|
@@ -48,6 +48,12 @@ declare class RdxPopoverHandle<Payload = unknown> {
|
|
|
48
48
|
declare function createRdxPopoverHandle<Payload = unknown>(): RdxPopoverHandle<Payload>;
|
|
49
49
|
|
|
50
50
|
type RdxPopoverModal = boolean | 'trap-focus';
|
|
51
|
+
/**
|
|
52
|
+
* Why the open/close happened instantly (no transition). Mirrors Base UI's `data-instant` value
|
|
53
|
+
* (`'click' | 'dismiss' | 'focus' | 'trigger-change'`) so consumers can disable transitions
|
|
54
|
+
* per-reason instead of only knowing that *some* instant change occurred.
|
|
55
|
+
*/
|
|
56
|
+
type RdxPopoverInstantType = 'click' | 'dismiss' | 'focus' | 'trigger-change';
|
|
51
57
|
type RdxPopoverOpenChangeReason = 'trigger-hover' | 'trigger-focus' | 'trigger-press' | 'outside-press' | 'escape-key' | 'close-press' | 'focus-out' | 'imperative-action' | 'none';
|
|
52
58
|
type RdxPopoverOpenChangeEventDetails = RdxCancelableChangeEventDetails<RdxPopoverOpenChangeReason>;
|
|
53
59
|
interface RdxPopoverOpenChange {
|
|
@@ -70,6 +76,7 @@ interface RdxPopoverRootContext {
|
|
|
70
76
|
hasPopupClose: Signal<boolean>;
|
|
71
77
|
isHoverActive: Signal<boolean>;
|
|
72
78
|
instant: Signal<boolean>;
|
|
79
|
+
instantType: Signal<RdxPopoverInstantType | undefined>;
|
|
73
80
|
openChangeReason: Signal<RdxPopoverOpenChangeReason>;
|
|
74
81
|
isPointerDownOnTrigger: Signal<boolean>;
|
|
75
82
|
/** Whether the current open was initiated by touch (ADR 0016 §3 — gates the anchored scroll lock). */
|
|
@@ -119,6 +126,7 @@ declare class RdxPopoverRoot {
|
|
|
119
126
|
private readonly transition;
|
|
120
127
|
readonly isHoverActive: _angular_core.WritableSignal<boolean>;
|
|
121
128
|
readonly instant: _angular_core.WritableSignal<boolean>;
|
|
129
|
+
readonly instantType: _angular_core.WritableSignal<RdxPopoverInstantType | undefined>;
|
|
122
130
|
readonly openChangeReason: _angular_core.WritableSignal<RdxPopoverOpenChangeReason>;
|
|
123
131
|
readonly transitionStatus: Signal<RdxTransitionStatus>;
|
|
124
132
|
/**
|
|
@@ -144,7 +152,7 @@ declare class RdxPopoverRoot {
|
|
|
144
152
|
/**
|
|
145
153
|
* Associates this root with detached trigger elements.
|
|
146
154
|
*/
|
|
147
|
-
readonly handle: _angular_core.InputSignal<RdxPopoverHandle<
|
|
155
|
+
readonly handle: _angular_core.InputSignal<RdxPopoverHandle<unknown> | undefined>;
|
|
148
156
|
readonly contentId: string;
|
|
149
157
|
readonly beforeContentFocusGuard: _angular_core.WritableSignal<HTMLElement | null>;
|
|
150
158
|
readonly descriptionId: _angular_core.WritableSignal<string | undefined>;
|
|
@@ -200,7 +208,7 @@ declare class RdxPopoverTrigger {
|
|
|
200
208
|
/**
|
|
201
209
|
* Associates this trigger with a detached popover root.
|
|
202
210
|
*/
|
|
203
|
-
readonly handle: _angular_core.InputSignal<RdxPopoverHandle<
|
|
211
|
+
readonly handle: _angular_core.InputSignal<RdxPopoverHandle<unknown> | undefined>;
|
|
204
212
|
/**
|
|
205
213
|
* Data associated with this trigger while it is active.
|
|
206
214
|
*/
|
|
@@ -371,7 +379,7 @@ declare class RdxPopoverClose {
|
|
|
371
379
|
* until its CSS animation or transition completes.
|
|
372
380
|
*/
|
|
373
381
|
declare class RdxPopoverViewport {
|
|
374
|
-
|
|
382
|
+
protected readonly rootContext: _radix_ng_primitives_popover.RdxPopoverRootContext;
|
|
375
383
|
private readonly elementRef;
|
|
376
384
|
private readonly destroyRef;
|
|
377
385
|
private previous;
|
|
@@ -397,4 +405,4 @@ declare class RdxPopoverModule {
|
|
|
397
405
|
}
|
|
398
406
|
|
|
399
407
|
export { RdxPopoverArrow, RdxPopoverBackdrop, RdxPopoverClose, RdxPopoverDescription, RdxPopoverHandle, RdxPopoverModule, RdxPopoverPopup, RdxPopoverPortal, RdxPopoverPortalMisuseGuard, RdxPopoverPositioner, RdxPopoverRoot, RdxPopoverTitle, RdxPopoverTrigger, RdxPopoverViewport, createRdxPopoverHandle, injectRdxPopoverRootContext, popoverImports, provideRdxPopoverRootContext };
|
|
400
|
-
export type { RdxPopoverModal, RdxPopoverOpenChange, RdxPopoverOpenChangeEventDetails, RdxPopoverOpenChangeReason, RdxPopoverRootContext, RdxPopoverTransitionStatus };
|
|
408
|
+
export type { RdxPopoverInstantType, RdxPopoverModal, RdxPopoverOpenChange, RdxPopoverOpenChangeEventDetails, RdxPopoverOpenChangeReason, RdxPopoverRootContext, RdxPopoverTransitionStatus };
|
|
@@ -46,6 +46,12 @@ declare class RdxPreviewCardHandle<Payload = unknown> {
|
|
|
46
46
|
}
|
|
47
47
|
declare function createRdxPreviewCardHandle<Payload = unknown>(): RdxPreviewCardHandle<Payload>;
|
|
48
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Why an open/close happened instantly (no transition). Mirrors Base UI's preview-card `data-instant`:
|
|
51
|
+
* `'focus'` (opened by focus) or `'dismiss'` (closed by pressing the trigger or Escape). Hover
|
|
52
|
+
* opens/closes and outside-press closes are animated (`undefined`).
|
|
53
|
+
*/
|
|
54
|
+
type RdxPreviewCardInstantType = 'dismiss' | 'focus';
|
|
49
55
|
type RdxPreviewCardOpenChangeReason = 'trigger-hover' | 'trigger-focus' | 'trigger-press' | 'outside-press' | 'escape-key' | 'imperative-action' | 'none';
|
|
50
56
|
type RdxPreviewCardOpenChangeEventDetails = RdxCancelableChangeEventDetails<RdxPreviewCardOpenChangeReason>;
|
|
51
57
|
interface RdxPreviewCardOpenChange {
|
|
@@ -64,6 +70,8 @@ interface RdxPreviewCardRootContext {
|
|
|
64
70
|
triggers: Signal<HTMLElement[]>;
|
|
65
71
|
isHoverActive: Signal<boolean>;
|
|
66
72
|
instant: Signal<boolean>;
|
|
73
|
+
/** Why the open/close was instant (Base UI `data-instant`), or `undefined` when it animates. */
|
|
74
|
+
instantType: Signal<RdxPreviewCardInstantType | undefined>;
|
|
67
75
|
openChangeReason: Signal<RdxPreviewCardOpenChangeReason>;
|
|
68
76
|
isPointerDownOnTrigger: Signal<boolean>;
|
|
69
77
|
close: (reason?: RdxPreviewCardOpenChangeReason, event?: Event) => void;
|
|
@@ -128,7 +136,7 @@ declare class RdxPreviewCardRoot {
|
|
|
128
136
|
/**
|
|
129
137
|
* Associates this root with detached trigger elements.
|
|
130
138
|
*/
|
|
131
|
-
readonly handle: _angular_core.InputSignal<RdxPreviewCardHandle<
|
|
139
|
+
readonly handle: _angular_core.InputSignal<RdxPreviewCardHandle<unknown> | undefined>;
|
|
132
140
|
readonly contentId: string;
|
|
133
141
|
readonly trigger: _angular_core.WritableSignal<HTMLElement | undefined>;
|
|
134
142
|
readonly triggers: _angular_core.WritableSignal<HTMLElement[]>;
|
|
@@ -139,8 +147,13 @@ declare class RdxPreviewCardRoot {
|
|
|
139
147
|
readonly onOpenChangeComplete: _angular_core.OutputEmitterRef<boolean>;
|
|
140
148
|
private readonly registeredTriggers;
|
|
141
149
|
private readonly viewportTriggerChange;
|
|
142
|
-
readonly state: Signal<"open" | "closed">;
|
|
143
150
|
readonly present: Signal<boolean>;
|
|
151
|
+
/**
|
|
152
|
+
* Base UI `data-instant` enum, derived from the instant flag + reason: `'focus'` for a focus open,
|
|
153
|
+
* `'dismiss'` for a trigger-press / Escape close, `undefined` otherwise — including an outside-press
|
|
154
|
+
* close and a trigger switch, which Base UI animates rather than marking instant.
|
|
155
|
+
*/
|
|
156
|
+
readonly instantType: Signal<RdxPreviewCardInstantType | undefined>;
|
|
144
157
|
constructor();
|
|
145
158
|
show(trigger?: HTMLElement | undefined, payload?: unknown, triggerId?: string, reason?: RdxPreviewCardOpenChangeReason, event?: Event, fromHover?: boolean): void;
|
|
146
159
|
close(reason?: RdxPreviewCardOpenChangeReason, event?: Event): void;
|
|
@@ -172,7 +185,7 @@ declare class RdxPreviewCardTrigger {
|
|
|
172
185
|
/**
|
|
173
186
|
* Associates this trigger with a detached preview-card root.
|
|
174
187
|
*/
|
|
175
|
-
readonly handle: _angular_core.InputSignal<RdxPreviewCardHandle<
|
|
188
|
+
readonly handle: _angular_core.InputSignal<RdxPreviewCardHandle<unknown> | undefined>;
|
|
176
189
|
/**
|
|
177
190
|
* Data associated with this trigger while it is active.
|
|
178
191
|
*/
|
|
@@ -298,7 +311,7 @@ declare class RdxPreviewCardArrow {
|
|
|
298
311
|
* until its CSS animation or transition completes.
|
|
299
312
|
*/
|
|
300
313
|
declare class RdxPreviewCardViewport {
|
|
301
|
-
|
|
314
|
+
protected readonly rootContext: _radix_ng_primitives_preview_card.RdxPreviewCardRootContext;
|
|
302
315
|
private readonly elementRef;
|
|
303
316
|
private readonly destroyRef;
|
|
304
317
|
private previous;
|
|
@@ -324,4 +337,4 @@ declare class RdxPreviewCardModule {
|
|
|
324
337
|
}
|
|
325
338
|
|
|
326
339
|
export { RdxPreviewCardArrow, RdxPreviewCardBackdrop, RdxPreviewCardHandle, RdxPreviewCardModule, RdxPreviewCardPopup, RdxPreviewCardPortal, RdxPreviewCardPortalMisuseGuard, RdxPreviewCardPositioner, RdxPreviewCardRoot, RdxPreviewCardTrigger, RdxPreviewCardViewport, createRdxPreviewCardHandle, injectRdxPreviewCardRootContext, previewCardImports, provideRdxPreviewCardRootContext };
|
|
327
|
-
export type { RdxPreviewCardOpenChange, RdxPreviewCardOpenChangeEventDetails, RdxPreviewCardOpenChangeReason, RdxPreviewCardRootContext, RdxPreviewCardTransitionStatus };
|
|
340
|
+
export type { RdxPreviewCardInstantType, RdxPreviewCardOpenChange, RdxPreviewCardOpenChangeEventDetails, RdxPreviewCardOpenChangeReason, RdxPreviewCardRootContext, RdxPreviewCardTransitionStatus };
|