@radix-ng/primitives 0.51.0 → 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/radix-ng-primitives-accordion.mjs +105 -38
- package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs +221 -129
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-arrow.mjs +20 -4
- package/fesm2022/radix-ng-primitives-arrow.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-avatar.mjs +54 -61
- package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-button.mjs +123 -0
- package/fesm2022/radix-ng-primitives-button.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-calendar.mjs +95 -83
- package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-checkbox.mjs +378 -54
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collapsible.mjs +182 -81
- package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collection.mjs +40 -57
- package/fesm2022/radix-ng-primitives-collection.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-context-menu.mjs +140 -424
- package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-core.mjs +845 -744
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-cropper.mjs +288 -308
- package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-date-field.mjs +104 -58
- package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dialog.mjs +655 -327
- package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +70 -46
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-drawer.mjs +960 -0
- package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-editable.mjs +304 -23
- package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-field.mjs +363 -0
- package/fesm2022/radix-ng-primitives-field.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-fieldset.mjs +79 -0
- package/fesm2022/radix-ng-primitives-fieldset.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-focus-scope.mjs +23 -8
- package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-input.mjs +172 -0
- package/fesm2022/radix-ng-primitives-input.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-label.mjs +6 -6
- package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menu.mjs +1907 -363
- package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menubar.mjs +290 -162
- package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-meter.mjs +271 -0
- package/fesm2022/radix-ng-primitives-meter.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs +1052 -1553
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-number-field.mjs +1102 -367
- package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popover.mjs +978 -989
- package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popper.mjs +111 -44
- package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-portal.mjs +34 -10
- package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-presence.mjs +134 -246
- package/fesm2022/radix-ng-primitives-presence.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-preview-card.mjs +997 -0
- package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-progress.mjs +223 -84
- package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +191 -51
- package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-roving-focus.mjs +96 -50
- package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-scroll-area.mjs +923 -0
- package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-select.mjs +791 -509
- package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-separator.mjs +12 -35
- package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-slider.mjs +969 -717
- package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-stepper.mjs +15 -19
- package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +125 -113
- package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tabs.mjs +390 -108
- package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-time-field.mjs +55 -46
- package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toast.mjs +839 -0
- package/fesm2022/radix-ng-primitives-toast.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +121 -247
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +98 -61
- package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toolbar.mjs +303 -92
- package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tooltip.mjs +699 -1072
- package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs +25 -66
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
- package/meter/README.md +3 -0
- package/navigation-menu/README.md +2 -1
- package/package.json +39 -18
- package/portal/README.md +2 -0
- package/preview-card/README.md +3 -0
- package/schematics/collection.json +1 -0
- package/schematics/ng-add/index.d.ts +3 -2
- package/schematics/ng-add/index.js +62 -31
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/package-config.d.ts +4 -2
- package/schematics/ng-add/package-config.js +10 -2
- package/schematics/ng-add/package-config.js.map +1 -1
- package/schematics/ng-add/schema.d.ts +3 -0
- package/schematics/ng-add/schema.js +3 -0
- package/schematics/ng-add/schema.js.map +1 -0
- package/schematics/ng-add/schema.json +14 -0
- package/select/README.md +2 -0
- package/types/radix-ng-primitives-accordion.d.ts +51 -16
- package/types/radix-ng-primitives-alert-dialog.d.ts +95 -38
- package/types/radix-ng-primitives-arrow.d.ts +1 -1
- package/types/radix-ng-primitives-aspect-ratio.d.ts +1 -1
- package/types/radix-ng-primitives-avatar.d.ts +7 -11
- package/types/radix-ng-primitives-button.d.ts +73 -0
- package/types/radix-ng-primitives-calendar.d.ts +39 -20
- package/types/radix-ng-primitives-checkbox.d.ts +204 -35
- package/types/radix-ng-primitives-collapsible.d.ts +114 -40
- package/types/radix-ng-primitives-collection.d.ts +38 -34
- package/types/radix-ng-primitives-config.d.ts +1 -1
- package/types/radix-ng-primitives-context-menu.d.ts +61 -116
- package/types/radix-ng-primitives-core.d.ts +345 -235
- package/types/radix-ng-primitives-cropper.d.ts +89 -56
- package/types/radix-ng-primitives-date-field.d.ts +49 -28
- package/types/radix-ng-primitives-dialog.d.ts +283 -165
- package/types/radix-ng-primitives-dismissable-layer.d.ts +15 -7
- package/types/radix-ng-primitives-drawer.d.ts +426 -0
- package/types/radix-ng-primitives-editable.d.ts +91 -14
- package/types/radix-ng-primitives-field.d.ts +374 -0
- package/types/radix-ng-primitives-fieldset.d.ts +49 -0
- package/types/radix-ng-primitives-focus-scope.d.ts +15 -6
- package/types/radix-ng-primitives-input.d.ts +87 -0
- package/types/radix-ng-primitives-label.d.ts +0 -1
- package/types/radix-ng-primitives-menu.d.ts +584 -99
- package/types/radix-ng-primitives-menubar.d.ts +61 -50
- package/types/radix-ng-primitives-meter.d.ts +194 -0
- package/types/radix-ng-primitives-navigation-menu.d.ts +422 -340
- package/types/radix-ng-primitives-number-field.d.ts +405 -145
- package/types/radix-ng-primitives-pagination.d.ts +2 -2
- package/types/radix-ng-primitives-popover.d.ts +366 -351
- package/types/radix-ng-primitives-popper.d.ts +68 -11
- package/types/radix-ng-primitives-portal.d.ts +14 -6
- package/types/radix-ng-primitives-presence.d.ts +28 -76
- package/types/radix-ng-primitives-preview-card.d.ts +359 -0
- package/types/radix-ng-primitives-progress.d.ts +175 -48
- package/types/radix-ng-primitives-radio.d.ts +55 -25
- package/types/radix-ng-primitives-roving-focus.d.ts +33 -23
- package/types/radix-ng-primitives-scroll-area.d.ts +253 -0
- package/types/radix-ng-primitives-select.d.ts +475 -177
- package/types/radix-ng-primitives-separator.d.ts +7 -32
- package/types/radix-ng-primitives-slider.d.ts +315 -201
- package/types/radix-ng-primitives-stepper.d.ts +5 -7
- package/types/radix-ng-primitives-switch.d.ts +86 -71
- package/types/radix-ng-primitives-tabs.d.ts +213 -79
- package/types/radix-ng-primitives-time-field.d.ts +42 -27
- package/types/radix-ng-primitives-toast.d.ts +378 -0
- package/types/radix-ng-primitives-toggle-group.d.ts +86 -164
- package/types/radix-ng-primitives-toggle.d.ts +43 -53
- package/types/radix-ng-primitives-toolbar.d.ts +164 -38
- package/types/radix-ng-primitives-tooltip.d.ts +348 -384
- package/types/radix-ng-primitives-visually-hidden.d.ts +19 -19
- package/dropdown-menu/README.md +0 -1
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +0 -581
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-hover-card.mjs +0 -1238
- package/fesm2022/radix-ng-primitives-hover-card.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-select2.mjs +0 -897
- package/fesm2022/radix-ng-primitives-select2.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-tooltip2.mjs +0 -735
- package/fesm2022/radix-ng-primitives-tooltip2.mjs.map +0 -1
- package/hover-card/README.md +0 -3
- package/select2/README.md +0 -3
- package/tooltip2/README.md +0 -3
- package/types/radix-ng-primitives-dropdown-menu.d.ts +0 -171
- package/types/radix-ng-primitives-hover-card.d.ts +0 -471
- package/types/radix-ng-primitives-select2.d.ts +0 -511
- package/types/radix-ng-primitives-tooltip2.d.ts +0 -325
|
@@ -1,139 +1,624 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { BooleanInput, NumberInput } from '@
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Signal, ElementRef } from '@angular/core';
|
|
3
|
+
import * as _radix_ng_primitives_core from '@radix-ng/primitives/core';
|
|
4
|
+
import { BooleanInput, NumberInput } from '@radix-ng/primitives/core';
|
|
5
|
+
import * as i1 from '@radix-ng/primitives/popper';
|
|
6
|
+
import { RdxPopperContentWrapper, RdxPopperAnchorElement } from '@radix-ng/primitives/popper';
|
|
7
|
+
import * as _radix_ng_primitives_menu from '@radix-ng/primitives/menu';
|
|
8
|
+
import * as i2 from '@radix-ng/primitives/dismissable-layer';
|
|
9
|
+
import * as i1$1 from '@radix-ng/primitives/portal';
|
|
10
|
+
import { RdxPortalContainer } from '@radix-ng/primitives/portal';
|
|
11
|
+
import * as i3 from '@radix-ng/primitives/focus-scope';
|
|
5
12
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
13
|
+
type RdxMenuTransitionStatus = 'starting' | 'ending' | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* How focus moves into the popup when it opens.
|
|
16
|
+
* - `'first'` / `'last'` — focus and highlight the first / last item (keyboard opening).
|
|
17
|
+
* - `'popup'` — focus the popup container without highlighting any item (pointer opening, e.g. a
|
|
18
|
+
* context menu opened by right click).
|
|
19
|
+
* - `false` — leave focus on the trigger.
|
|
20
|
+
*/
|
|
21
|
+
type RdxMenuAutoFocus = 'first' | 'last' | 'popup' | false;
|
|
22
|
+
type RdxMenuAutoFocusInput = boolean | RdxMenuAutoFocus;
|
|
23
|
+
type RdxMenuOrientation = 'horizontal' | 'vertical';
|
|
24
|
+
interface RdxMenuRootContext {
|
|
25
|
+
isOpen: Signal<boolean>;
|
|
26
|
+
disabled: Signal<boolean>;
|
|
27
|
+
modal: Signal<boolean>;
|
|
28
|
+
loopFocus: Signal<boolean>;
|
|
29
|
+
highlightItemOnHover: Signal<boolean>;
|
|
30
|
+
orientation: Signal<RdxMenuOrientation>;
|
|
31
|
+
closeParentOnEsc: Signal<boolean>;
|
|
32
|
+
/** Whether the popup should focus its first item when it opens. */
|
|
33
|
+
autoFocus: Signal<RdxMenuAutoFocus>;
|
|
34
|
+
isSubmenu: Signal<boolean>;
|
|
35
|
+
hasTriggerInteractionHandler: Signal<boolean>;
|
|
36
|
+
trigger: Signal<HTMLElement | undefined>;
|
|
37
|
+
/** The popup element, once mounted. Used by submenu safe-polygon geometry. */
|
|
38
|
+
popupElement: Signal<HTMLElement | undefined>;
|
|
39
|
+
transitionStatus: Signal<RdxMenuTransitionStatus>;
|
|
40
|
+
close: () => void;
|
|
41
|
+
toggle: () => void;
|
|
42
|
+
show: (autoFocus?: RdxMenuAutoFocusInput) => void;
|
|
43
|
+
/** Open the menu without moving focus into the popup (used for menubar hover-switching). */
|
|
44
|
+
showWithoutAutoFocus: () => void;
|
|
45
|
+
registerTrigger: (el: HTMLElement) => () => void;
|
|
46
|
+
registerPopup: (el: HTMLElement) => () => void;
|
|
47
|
+
registerTransitionElement: (element: HTMLElement) => () => void;
|
|
48
|
+
registerPopupArrowNavigationHandler: (handler: (offset: 1 | -1) => boolean) => () => void;
|
|
49
|
+
registerTriggerInteractionHandler: (handler: RdxMenuTriggerInteractionHandler) => () => void;
|
|
50
|
+
markAsSubmenu: () => void;
|
|
51
|
+
closeParent: () => void;
|
|
52
|
+
handlePopupArrowNavigation: (offset: 1 | -1) => boolean;
|
|
53
|
+
handleTriggerInteraction: (interaction: RdxMenuTriggerInteraction) => boolean;
|
|
54
|
+
}
|
|
55
|
+
type RdxMenuTriggerInteraction = {
|
|
56
|
+
type: 'click';
|
|
57
|
+
} | {
|
|
58
|
+
type: 'pointerenter';
|
|
59
|
+
event: PointerEvent;
|
|
60
|
+
} | {
|
|
61
|
+
type: 'arrowdown';
|
|
62
|
+
event: Event;
|
|
63
|
+
} | {
|
|
64
|
+
type: 'arrowup';
|
|
65
|
+
event: Event;
|
|
66
|
+
} | {
|
|
67
|
+
type: 'arrowleft';
|
|
68
|
+
event: Event;
|
|
69
|
+
} | {
|
|
70
|
+
type: 'arrowright';
|
|
71
|
+
event: Event;
|
|
72
|
+
} | {
|
|
73
|
+
type: 'home';
|
|
74
|
+
event: Event;
|
|
75
|
+
} | {
|
|
76
|
+
type: 'end';
|
|
77
|
+
event: Event;
|
|
78
|
+
} | {
|
|
79
|
+
type: 'escape';
|
|
80
|
+
event: Event;
|
|
81
|
+
};
|
|
82
|
+
type RdxMenuTriggerInteractionHandler = (interaction: RdxMenuTriggerInteraction) => boolean;
|
|
83
|
+
declare const injectRdxMenuRootContext: _radix_ng_primitives_core.InjectContext<RdxMenuRootContext>;
|
|
84
|
+
declare const provideRdxMenuRootContext: (useFactory: () => RdxMenuRootContext) => _angular_core.Provider;
|
|
85
|
+
/**
|
|
86
|
+
* Groups all parts of a menu.
|
|
87
|
+
*/
|
|
88
|
+
declare class RdxMenuRoot {
|
|
89
|
+
private readonly popper;
|
|
90
|
+
/** Shared open/close transition state machine (completes on the real animationend). */
|
|
91
|
+
private readonly transition;
|
|
92
|
+
private registeredTrigger;
|
|
93
|
+
private popupArrowNavigationHandler;
|
|
94
|
+
private triggerInteractionHandler;
|
|
95
|
+
private hasAppliedDefaultOpen;
|
|
96
|
+
/** Whether the menu is currently open. */
|
|
97
|
+
readonly open: _angular_core.ModelSignal<boolean>;
|
|
98
|
+
/** Whether the menu is initially open. */
|
|
99
|
+
readonly defaultOpen: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
100
|
+
/** Whether interactions with the menu are disabled. */
|
|
101
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
102
|
+
/** Whether the menu should block outside interactions. */
|
|
103
|
+
readonly modal: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
104
|
+
/** Whether keyboard navigation wraps at list boundaries. */
|
|
105
|
+
readonly loopFocus: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
106
|
+
/** Whether moving the pointer over items should highlight them. */
|
|
107
|
+
readonly highlightItemOnHover: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
108
|
+
/** The menu orientation. */
|
|
109
|
+
readonly orientation: _angular_core.InputSignal<RdxMenuOrientation>;
|
|
110
|
+
/** Whether pressing Escape inside a submenu closes the whole menu chain. */
|
|
111
|
+
readonly closeParentOnEsc: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
112
|
+
/** Emits when the open state changes. */
|
|
113
|
+
readonly onOpenChange: _angular_core.OutputEmitterRef<boolean>;
|
|
114
|
+
/** Emits when the open/close CSS transition or animation finishes. */
|
|
115
|
+
readonly onOpenChangeComplete: _angular_core.OutputEmitterRef<boolean>;
|
|
116
|
+
readonly trigger: _angular_core.WritableSignal<HTMLElement | undefined>;
|
|
117
|
+
readonly popupElement: _angular_core.WritableSignal<HTMLElement | undefined>;
|
|
118
|
+
readonly transitionStatus: Signal<_radix_ng_primitives_core.RdxTransitionStatus>;
|
|
119
|
+
/** Whether the popup grabs focus when it opens. Set false for menubar hover-switching. */
|
|
120
|
+
readonly autoFocus: _angular_core.WritableSignal<RdxMenuAutoFocus>;
|
|
121
|
+
readonly isSubmenu: _angular_core.WritableSignal<boolean>;
|
|
122
|
+
readonly hasTriggerInteractionHandler: _angular_core.WritableSignal<boolean>;
|
|
123
|
+
readonly state: Signal<"open" | "closed">;
|
|
124
|
+
constructor();
|
|
125
|
+
show(autoFocus?: RdxMenuAutoFocusInput): void;
|
|
126
|
+
close(): void;
|
|
127
|
+
toggle(): void;
|
|
128
|
+
registerTrigger(el: HTMLElement): () => void;
|
|
129
|
+
registerPopup(el: HTMLElement): () => void;
|
|
130
|
+
registerTransitionElement(element: HTMLElement): () => void;
|
|
131
|
+
registerPopupArrowNavigationHandler(handler: (offset: 1 | -1) => boolean): () => void;
|
|
132
|
+
handlePopupArrowNavigation(offset: 1 | -1): boolean;
|
|
133
|
+
registerTriggerInteractionHandler(handler: RdxMenuTriggerInteractionHandler): () => void;
|
|
134
|
+
handleTriggerInteraction(interaction: RdxMenuTriggerInteraction): boolean;
|
|
135
|
+
markAsSubmenu(): void;
|
|
136
|
+
closeParent(): void;
|
|
137
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuRoot, never>;
|
|
138
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuRoot, "[rdxMenuRoot],[rdxMenuSubmenuRoot]", ["rdxMenuRoot"], { "open": { "alias": "open"; "required": false; "isSignal": true; }; "defaultOpen": { "alias": "defaultOpen"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "modal": { "alias": "modal"; "required": false; "isSignal": true; }; "loopFocus": { "alias": "loopFocus"; "required": false; "isSignal": true; }; "highlightItemOnHover": { "alias": "highlightItemOnHover"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "closeParentOnEsc": { "alias": "closeParentOnEsc"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "onOpenChange": "onOpenChange"; "onOpenChangeComplete": "onOpenChangeComplete"; }, never, never, true, [{ directive: typeof i1.RdxPopper; inputs: {}; outputs: {}; }]>;
|
|
9
139
|
}
|
|
10
140
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
private readonly
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
141
|
+
/**
|
|
142
|
+
* A button that opens the menu.
|
|
143
|
+
*/
|
|
144
|
+
declare class RdxMenuTrigger {
|
|
145
|
+
protected readonly rootContext: _radix_ng_primitives_menu.RdxMenuRootContext;
|
|
146
|
+
private readonly elementRef;
|
|
147
|
+
private readonly destroyRef;
|
|
148
|
+
private readonly dismissableLayersContext;
|
|
149
|
+
private openTimer;
|
|
150
|
+
private closeTimer;
|
|
151
|
+
/** Whether this trigger should be treated as a native button. Auto-detected for `<button>`. */
|
|
152
|
+
readonly nativeButton: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
153
|
+
/** Whether this trigger is disabled. */
|
|
154
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
155
|
+
/** Whether hovering the trigger opens the menu. */
|
|
156
|
+
readonly openOnHover: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
157
|
+
/** Delay before hover opens the menu, in milliseconds. */
|
|
158
|
+
readonly delay: _angular_core.InputSignalWithTransform<number | undefined, NumberInput>;
|
|
159
|
+
/** Delay before hover leave closes the menu, in milliseconds. */
|
|
160
|
+
readonly closeDelay: _angular_core.InputSignalWithTransform<number | undefined, NumberInput>;
|
|
161
|
+
protected readonly nativeButtonState: _angular_core.Signal<boolean>;
|
|
162
|
+
protected readonly isDisabled: _angular_core.Signal<boolean>;
|
|
23
163
|
constructor();
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
protected
|
|
28
|
-
protected
|
|
29
|
-
|
|
30
|
-
|
|
164
|
+
protected handleClick(): void;
|
|
165
|
+
protected handleArrowDown(event: Event): void;
|
|
166
|
+
protected handleArrowUp(event: Event): void;
|
|
167
|
+
protected handleArrowLeft(event: Event): void;
|
|
168
|
+
protected handleArrowRight(event: Event): void;
|
|
169
|
+
protected handleHome(event: Event): void;
|
|
170
|
+
protected handleEnd(event: Event): void;
|
|
171
|
+
protected handleEscape(event: Event): void;
|
|
172
|
+
protected handleKeyboardToggle(event: Event): void;
|
|
173
|
+
protected handlePointerEnter(event: PointerEvent): void;
|
|
174
|
+
protected handlePointerLeave(event: PointerEvent): void;
|
|
175
|
+
private clearOpenTimer;
|
|
176
|
+
private clearCloseTimer;
|
|
177
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuTrigger, never>;
|
|
178
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuTrigger, "[rdxMenuTrigger]", ["rdxMenuTrigger"], { "nativeButton": { "alias": "nativeButton"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "openOnHover": { "alias": "openOnHover"; "required": false; "isSignal": true; }; "delay": { "alias": "delay"; "required": false; "isSignal": true; }; "closeDelay": { "alias": "closeDelay"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.RdxPopperAnchor; inputs: {}; outputs: {}; }]>;
|
|
31
179
|
}
|
|
32
180
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
181
|
+
/**
|
|
182
|
+
* An item inside a parent menu that opens a nested submenu.
|
|
183
|
+
*
|
|
184
|
+
* Place this inside `ng-container rdxMenuRoot` that wraps both the trigger
|
|
185
|
+
* and the submenu positioner. The inner root provides the submenu context;
|
|
186
|
+
* the outer popup discovers this element via `[rdxMenuSubTrigger]` in its
|
|
187
|
+
* ITEM_SELECTOR and includes it in keyboard navigation.
|
|
188
|
+
*/
|
|
189
|
+
declare class RdxMenuSubTrigger {
|
|
190
|
+
protected readonly submenuContext: _radix_ng_primitives_menu.RdxMenuRootContext;
|
|
191
|
+
private readonly submenuRoot;
|
|
192
|
+
private readonly elementRef;
|
|
193
|
+
private readonly destroyRef;
|
|
194
|
+
private readonly isBrowser;
|
|
40
195
|
private readonly isFocused;
|
|
196
|
+
private openTimer;
|
|
197
|
+
private closeTimer;
|
|
198
|
+
/** Cursor position from the last pointer move over the trigger (safe-polygon apex). */
|
|
199
|
+
private lastPointer;
|
|
200
|
+
/** Whether the current open was initiated by hover (vs keyboard / click). */
|
|
201
|
+
private openedByHover;
|
|
202
|
+
/** Whether this trigger (and therefore the submenu) is disabled. */
|
|
203
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
204
|
+
/** Whether this trigger should be treated as a native button. Auto-detected for `<button>`. */
|
|
205
|
+
readonly nativeButton: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
206
|
+
/** Whether hovering the trigger opens the submenu. */
|
|
207
|
+
readonly openOnHover: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
208
|
+
/** Delay before hover opens the submenu, in milliseconds. */
|
|
209
|
+
readonly delay: _angular_core.InputSignalWithTransform<number | undefined, NumberInput>;
|
|
210
|
+
/** Delay before a pending hover close runs, in milliseconds. */
|
|
211
|
+
readonly closeDelay: _angular_core.InputSignalWithTransform<number | undefined, NumberInput>;
|
|
212
|
+
/** Explicit typeahead label. When set, overrides textContent for character search. */
|
|
213
|
+
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
214
|
+
/** Highlighted when focused OR while the submenu is open. */
|
|
215
|
+
protected readonly highlighted: _angular_core.Signal<boolean>;
|
|
216
|
+
protected readonly nativeButtonState: _angular_core.Signal<boolean>;
|
|
41
217
|
constructor();
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
protected
|
|
46
|
-
|
|
47
|
-
|
|
218
|
+
private scheduleClose;
|
|
219
|
+
protected onFocus(): void;
|
|
220
|
+
protected onBlur(): void;
|
|
221
|
+
protected onClick(): void;
|
|
222
|
+
protected onArrowRight(event: Event): void;
|
|
223
|
+
protected onPointerMove(event: PointerEvent): void;
|
|
224
|
+
protected onPointerLeave(): void;
|
|
225
|
+
protected clearHighlight(): void;
|
|
226
|
+
private closeSiblingSubmenus;
|
|
227
|
+
private clearSiblingHighlights;
|
|
228
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuSubTrigger, never>;
|
|
229
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuSubTrigger, "[rdxMenuSubTrigger]", ["rdxMenuSubTrigger"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "nativeButton": { "alias": "nativeButton"; "required": false; "isSignal": true; }; "openOnHover": { "alias": "openOnHover"; "required": false; "isSignal": true; }; "delay": { "alias": "delay"; "required": false; "isSignal": true; }; "closeDelay": { "alias": "closeDelay"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.RdxPopperAnchor; inputs: {}; outputs: {}; }, { directive: typeof i2.RdxDismissableLayerBranch; inputs: {}; outputs: {}; }]>;
|
|
48
230
|
}
|
|
49
231
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
232
|
+
/**
|
|
233
|
+
* Moves the menu to a different part of the DOM.
|
|
234
|
+
* Applied on ng-template — no host bindings (ng-template is not a real DOM node).
|
|
235
|
+
*/
|
|
236
|
+
declare class RdxMenuPortal {
|
|
237
|
+
/**
|
|
238
|
+
* Optional container to portal the content into. Defaults to `document.body`.
|
|
239
|
+
*/
|
|
240
|
+
readonly container: _angular_core.InputSignal<RdxPortalContainer | undefined>;
|
|
241
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuPortal, never>;
|
|
242
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuPortal, "[rdxMenuPortal]", ["rdxMenuPortal"], { "container": { "alias": "container"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1$1.RdxPortal; inputs: { "container": "container"; }; outputs: {}; }]>;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Positions the menu against its trigger.
|
|
247
|
+
*/
|
|
248
|
+
declare class RdxMenuPositioner {
|
|
249
|
+
protected readonly rootContext: _radix_ng_primitives_menu.RdxMenuRootContext;
|
|
250
|
+
protected readonly wrapper: RdxPopperContentWrapper;
|
|
251
|
+
/**
|
|
252
|
+
* An element to position the popup against. Defaults to the trigger.
|
|
253
|
+
*/
|
|
254
|
+
readonly anchor: _angular_core.InputSignal<RdxPopperAnchorElement>;
|
|
255
|
+
/**
|
|
256
|
+
* The preferred side of the trigger to render against when open.
|
|
257
|
+
*/
|
|
258
|
+
readonly side: _angular_core.InputSignal<"top" | "right" | "bottom" | "left">;
|
|
259
|
+
/**
|
|
260
|
+
* Distance between the trigger and the popup in pixels.
|
|
261
|
+
*/
|
|
262
|
+
readonly sideOffset: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
263
|
+
/**
|
|
264
|
+
* How to align the popup relative to the specified side.
|
|
265
|
+
*/
|
|
266
|
+
readonly align: _angular_core.InputSignal<"end" | "start" | "center">;
|
|
267
|
+
/**
|
|
268
|
+
* An offset in pixels from the `start` or `end` alignment options.
|
|
269
|
+
*/
|
|
270
|
+
readonly alignOffset: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
271
|
+
/**
|
|
272
|
+
* Minimum distance to maintain between the arrow and the edges of the popup.
|
|
273
|
+
*/
|
|
274
|
+
readonly arrowPadding: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
275
|
+
/**
|
|
276
|
+
* Whether to override side and alignment preferences to prevent collisions.
|
|
277
|
+
*/
|
|
278
|
+
readonly avoidCollisions: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
279
|
+
/**
|
|
280
|
+
* The element used as the collision boundary.
|
|
281
|
+
*/
|
|
282
|
+
readonly collisionBoundary: _angular_core.InputSignal<ElementRef<HTMLElement> | ElementRef<HTMLElement>[] | undefined>;
|
|
283
|
+
/**
|
|
284
|
+
* Distance in pixels from the boundary edges where collision detection should occur.
|
|
285
|
+
*/
|
|
286
|
+
readonly collisionPadding: _angular_core.InputSignal<number | Partial<Record<"top" | "right" | "bottom" | "left", number>>>;
|
|
287
|
+
/**
|
|
288
|
+
* The sticky behavior on the alignment axis.
|
|
289
|
+
*/
|
|
290
|
+
readonly sticky: _angular_core.InputSignal<"always" | "partial">;
|
|
291
|
+
/**
|
|
292
|
+
* Whether to hide the popup when the trigger becomes fully occluded.
|
|
293
|
+
*/
|
|
294
|
+
readonly hideWhenDetached: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
295
|
+
/**
|
|
296
|
+
* The CSS position strategy used by Floating UI.
|
|
297
|
+
*/
|
|
298
|
+
readonly positionStrategy: _angular_core.InputSignal<"fixed" | "absolute">;
|
|
299
|
+
/**
|
|
300
|
+
* Whether to update position on every animation frame.
|
|
301
|
+
*/
|
|
302
|
+
readonly updatePositionStrategy: _angular_core.InputSignal<"always" | "optimized">;
|
|
303
|
+
/**
|
|
304
|
+
* Emits when the popup has been placed.
|
|
305
|
+
*/
|
|
306
|
+
readonly placed: _angular_core.OutputRef<void>;
|
|
307
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuPositioner, never>;
|
|
308
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuPositioner, "[rdxMenuPositioner]", ["rdxMenuPositioner"], { "anchor": { "alias": "anchor"; "required": false; "isSignal": true; }; "side": { "alias": "side"; "required": false; "isSignal": true; }; "sideOffset": { "alias": "sideOffset"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "alignOffset": { "alias": "alignOffset"; "required": false; "isSignal": true; }; "arrowPadding": { "alias": "arrowPadding"; "required": false; "isSignal": true; }; "avoidCollisions": { "alias": "avoidCollisions"; "required": false; "isSignal": true; }; "collisionBoundary": { "alias": "collisionBoundary"; "required": false; "isSignal": true; }; "collisionPadding": { "alias": "collisionPadding"; "required": false; "isSignal": true; }; "sticky": { "alias": "sticky"; "required": false; "isSignal": true; }; "hideWhenDetached": { "alias": "hideWhenDetached"; "required": false; "isSignal": true; }; "positionStrategy": { "alias": "positionStrategy"; "required": false; "isSignal": true; }; "updatePositionStrategy": { "alias": "updatePositionStrategy"; "required": false; "isSignal": true; }; }, { "placed": "placed"; }, never, never, true, [{ directive: typeof i1.RdxPopperContentWrapper; inputs: { "anchor": "anchor"; "side": "side"; "sideOffset": "sideOffset"; "align": "align"; "alignOffset": "alignOffset"; "arrowPadding": "arrowPadding"; "avoidCollisions": "avoidCollisions"; "collisionBoundary": "collisionBoundary"; "collisionPadding": "collisionPadding"; "sticky": "sticky"; "hideWhenDetached": "hideWhenDetached"; "positionStrategy": "positionStrategy"; "updatePositionStrategy": "updatePositionStrategy"; }; outputs: {}; }]>;
|
|
57
309
|
}
|
|
58
310
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
readonly
|
|
311
|
+
/**
|
|
312
|
+
* A container for the menu contents.
|
|
313
|
+
*/
|
|
314
|
+
declare class RdxMenuPopup {
|
|
315
|
+
protected readonly rootContext: _radix_ng_primitives_menu.RdxMenuRootContext;
|
|
316
|
+
private readonly dismissableLayer;
|
|
317
|
+
private readonly focusScope;
|
|
318
|
+
private readonly wrapper;
|
|
319
|
+
private readonly elementRef;
|
|
320
|
+
private readonly dismissableLayersContext;
|
|
321
|
+
private search;
|
|
322
|
+
private searchTimer;
|
|
323
|
+
protected readonly align: _angular_core.Signal<"end" | "start" | "center" | undefined>;
|
|
324
|
+
protected readonly side: _angular_core.Signal<"top" | "right" | "bottom" | "left" | undefined>;
|
|
64
325
|
/**
|
|
65
|
-
*
|
|
326
|
+
* Event handler called when the escape key is pressed. Can be prevented.
|
|
66
327
|
*/
|
|
67
|
-
readonly
|
|
68
|
-
readonly align: i0.InputSignal<RdxMenuAlign | undefined>;
|
|
328
|
+
readonly escapeKeyDown: _angular_core.OutputRef<KeyboardEvent>;
|
|
69
329
|
/**
|
|
70
|
-
*
|
|
330
|
+
* Event handler called when a pointerdown event happens outside of the popup. Can be prevented.
|
|
71
331
|
*/
|
|
72
|
-
readonly
|
|
332
|
+
readonly pointerDownOutside: _angular_core.OutputRef<PointerEvent>;
|
|
73
333
|
/**
|
|
74
|
-
*
|
|
334
|
+
* Event handler called when focus moves outside of the popup. Can be prevented.
|
|
75
335
|
*/
|
|
76
|
-
readonly
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
336
|
+
readonly focusOutside: _angular_core.OutputRef<FocusEvent>;
|
|
337
|
+
/**
|
|
338
|
+
* Event handler called when an interaction happens outside of the popup. Can be prevented.
|
|
339
|
+
*/
|
|
340
|
+
readonly interactOutside: _angular_core.OutputRef<PointerEvent | FocusEvent>;
|
|
341
|
+
/**
|
|
342
|
+
* Event handler called before focus moves into the popup. Can be prevented.
|
|
343
|
+
*/
|
|
344
|
+
readonly openAutoFocus: _angular_core.OutputRef<Event>;
|
|
345
|
+
/**
|
|
346
|
+
* Event handler called before focus returns after the popup is removed. Can be prevented.
|
|
347
|
+
*/
|
|
348
|
+
readonly closeAutoFocus: _angular_core.OutputRef<Event>;
|
|
81
349
|
constructor();
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
private fireNgOnChanges;
|
|
87
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RdxMenuTriggerDirective, never>;
|
|
88
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxMenuTriggerDirective, "[RdxMenuTrigger]", never, { "menuTriggerFor": { "alias": "menuTriggerFor"; "required": true; "isSignal": true; }; "side": { "alias": "side"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "sideOffset": { "alias": "sideOffset"; "required": false; "isSignal": true; }; "alignOffset": { "alias": "alignOffset"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.CdkMenuTrigger; inputs: { "cdkMenuTriggerFor": "menuTriggerFor"; "cdkMenuPosition": "menuPosition"; }; outputs: {}; }]>;
|
|
350
|
+
protected handleCloseParent(event: Event): void;
|
|
351
|
+
protected handleKeydown(event: KeyboardEvent): void;
|
|
352
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuPopup, never>;
|
|
353
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuPopup, "[rdxMenuPopup]", ["rdxMenuPopup"], {}, { "escapeKeyDown": "escapeKeyDown"; "pointerDownOutside": "pointerDownOutside"; "focusOutside": "focusOutside"; "interactOutside": "interactOutside"; "openAutoFocus": "openAutoFocus"; "closeAutoFocus": "closeAutoFocus"; }, never, never, true, [{ directive: typeof i1.RdxPopperContent; inputs: {}; outputs: {}; }, { directive: typeof i2.RdxDismissableLayer; inputs: {}; outputs: {}; }, { directive: typeof i3.RdxFocusScope; inputs: {}; outputs: {}; }]>;
|
|
89
354
|
}
|
|
90
355
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
356
|
+
/**
|
|
357
|
+
* A viewport that smoothly animates the popup size when its content changes
|
|
358
|
+
* (e.g. switching menubar menus of different sizes, or expanding a section).
|
|
359
|
+
*
|
|
360
|
+
* It measures its content with a `ResizeObserver` and exposes the current size
|
|
361
|
+
* as `--popup-width` / `--popup-height` CSS variables on the host. Drive the
|
|
362
|
+
* animation from the consumer side, for example:
|
|
363
|
+
*
|
|
364
|
+
* ```css
|
|
365
|
+
* [rdxMenuPopup] {
|
|
366
|
+
* width: var(--popup-width);
|
|
367
|
+
* height: var(--popup-height);
|
|
368
|
+
* transition: width 200ms, height 200ms;
|
|
369
|
+
* }
|
|
370
|
+
* ```
|
|
371
|
+
*
|
|
372
|
+
* `data-transitioning` is present while a size change is in flight.
|
|
373
|
+
*/
|
|
374
|
+
declare class RdxMenuViewport {
|
|
375
|
+
private readonly elementRef;
|
|
376
|
+
private readonly destroyRef;
|
|
377
|
+
private observer;
|
|
378
|
+
private transitionTimer;
|
|
379
|
+
protected readonly width: _angular_core.WritableSignal<number | undefined>;
|
|
380
|
+
protected readonly height: _angular_core.WritableSignal<number | undefined>;
|
|
381
|
+
protected readonly transitioning: _angular_core.WritableSignal<boolean>;
|
|
382
|
+
constructor();
|
|
383
|
+
private markTransitioning;
|
|
384
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuViewport, never>;
|
|
385
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuViewport, "[rdxMenuViewport]", ["rdxMenuViewport"], {}, {}, never, never, true, never>;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* An optional overlay rendered behind the menu popup.
|
|
390
|
+
* Style it with `position: fixed; inset: 0` and use `data-open` / `data-closed`
|
|
391
|
+
* for CSS animations.
|
|
392
|
+
*/
|
|
393
|
+
declare class RdxMenuBackdrop {
|
|
394
|
+
protected readonly rootContext: _radix_ng_primitives_menu.RdxMenuRootContext;
|
|
395
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuBackdrop, never>;
|
|
396
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuBackdrop, "[rdxMenuBackdrop]", ["rdxMenuBackdrop"], {}, {}, never, never, true, never>;
|
|
94
397
|
}
|
|
95
398
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
399
|
+
/**
|
|
400
|
+
* An optional visual arrow connecting the popup to its trigger.
|
|
401
|
+
* Place it inside `rdxMenuPopup`. Positioning is handled by the shared Popper Arrow primitive.
|
|
402
|
+
*/
|
|
403
|
+
declare class RdxMenuArrow {
|
|
404
|
+
protected readonly rootContext: _radix_ng_primitives_menu.RdxMenuRootContext;
|
|
405
|
+
private readonly wrapper;
|
|
406
|
+
protected readonly side: _angular_core.Signal<"top" | "right" | "bottom" | "left" | undefined>;
|
|
407
|
+
protected readonly align: _angular_core.Signal<"end" | "start" | "center" | undefined>;
|
|
408
|
+
protected readonly uncentered: _angular_core.Signal<boolean>;
|
|
409
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuArrow, never>;
|
|
410
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuArrow, "[rdxMenuArrow]", ["rdxMenuArrow"], {}, {}, never, never, true, [{ directive: typeof i1.RdxPopperArrow; inputs: {}; outputs: {}; }]>;
|
|
99
411
|
}
|
|
100
412
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
413
|
+
/**
|
|
414
|
+
* An individual menu item.
|
|
415
|
+
*/
|
|
416
|
+
declare class RdxMenuItem {
|
|
417
|
+
private readonly rootContext;
|
|
418
|
+
private readonly elementRef;
|
|
105
419
|
private readonly isFocused;
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
420
|
+
/** Whether this item is disabled. */
|
|
421
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
422
|
+
/** Whether selecting this item closes the menu. */
|
|
423
|
+
readonly closeOnClick: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
424
|
+
/** Explicit typeahead label. When set, overrides textContent for character search. */
|
|
425
|
+
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
426
|
+
/** Emits when the item is selected. */
|
|
427
|
+
readonly onSelect: _angular_core.OutputEmitterRef<void>;
|
|
428
|
+
protected readonly highlighted: _angular_core.Signal<boolean>;
|
|
429
|
+
onFocus(): void;
|
|
430
|
+
onBlur(): void;
|
|
431
|
+
onPointerMove(event: PointerEvent): void;
|
|
432
|
+
onPointerLeave(event: PointerEvent): void;
|
|
433
|
+
onItemClick(): void;
|
|
434
|
+
protected onActivate(event: Event): void;
|
|
435
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuItem, never>;
|
|
436
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuItem, "[rdxMenuItem]", ["rdxMenuItem"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "closeOnClick": { "alias": "closeOnClick"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, { "onSelect": "onSelect"; }, never, never, true, never>;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* A menu item that renders as a link.
|
|
441
|
+
*/
|
|
442
|
+
declare class RdxMenuLinkItem {
|
|
443
|
+
private readonly rootContext;
|
|
444
|
+
private readonly elementRef;
|
|
445
|
+
private readonly isFocused;
|
|
446
|
+
/** Whether this item is disabled. */
|
|
447
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
448
|
+
/** Whether selecting this item closes the menu. Defaults to false — links navigate by default. */
|
|
449
|
+
readonly closeOnClick: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
450
|
+
/** Explicit typeahead label. When set, overrides textContent for character search. */
|
|
451
|
+
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
452
|
+
/** Emits when the item is selected. */
|
|
453
|
+
readonly onSelect: _angular_core.OutputEmitterRef<void>;
|
|
454
|
+
protected readonly highlighted: _angular_core.Signal<boolean>;
|
|
110
455
|
onFocus(): void;
|
|
111
456
|
onBlur(): void;
|
|
112
457
|
onPointerMove(event: PointerEvent): void;
|
|
113
|
-
|
|
114
|
-
|
|
458
|
+
onPointerLeave(event: PointerEvent): void;
|
|
459
|
+
onItemClick(event: MouseEvent): void;
|
|
460
|
+
protected onActivate(event: Event): void;
|
|
461
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuLinkItem, never>;
|
|
462
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuLinkItem, "a[rdxMenuLinkItem]", ["rdxMenuLinkItem"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "closeOnClick": { "alias": "closeOnClick"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, { "onSelect": "onSelect"; }, never, never, true, never>;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Groups related menu items together.
|
|
467
|
+
*/
|
|
468
|
+
declare class RdxMenuGroup {
|
|
469
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuGroup, never>;
|
|
470
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuGroup, "[rdxMenuGroup]", ["rdxMenuGroup"], {}, {}, never, never, true, never>;
|
|
115
471
|
}
|
|
116
472
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
473
|
+
/**
|
|
474
|
+
* A label for a menu group.
|
|
475
|
+
*/
|
|
476
|
+
declare class RdxMenuGroupLabel {
|
|
477
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuGroupLabel, never>;
|
|
478
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuGroupLabel, "[rdxMenuGroupLabel]", ["rdxMenuGroupLabel"], {}, {}, never, never, true, never>;
|
|
120
479
|
}
|
|
121
480
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
481
|
+
/**
|
|
482
|
+
* A visual separator between groups of menu items.
|
|
483
|
+
*/
|
|
484
|
+
declare class RdxMenuSeparator {
|
|
485
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuSeparator, never>;
|
|
486
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuSeparator, "[rdxMenuSeparator]", ["rdxMenuSeparator"], {}, {}, never, never, true, never>;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
type CheckedState = boolean | 'indeterminate';
|
|
490
|
+
declare function isIndeterminate(checked?: CheckedState): checked is 'indeterminate';
|
|
491
|
+
declare function getCheckedState(checked: CheckedState): 'checked' | 'unchecked' | 'indeterminate';
|
|
492
|
+
|
|
493
|
+
interface RdxMenuCheckboxItemContext {
|
|
494
|
+
checked: Signal<CheckedState>;
|
|
495
|
+
}
|
|
496
|
+
declare const injectRdxMenuCheckboxItemContext: _radix_ng_primitives_core.InjectContext<RdxMenuCheckboxItemContext>;
|
|
497
|
+
declare const provideRdxMenuCheckboxItemContext: (useFactory: () => RdxMenuCheckboxItemContext) => _angular_core.Provider;
|
|
498
|
+
/**
|
|
499
|
+
* A menu item that can be checked or unchecked.
|
|
500
|
+
*/
|
|
501
|
+
declare class RdxMenuCheckboxItem {
|
|
502
|
+
private readonly rootContext;
|
|
503
|
+
private readonly elementRef;
|
|
504
|
+
private readonly isFocused;
|
|
505
|
+
/** Whether this item is disabled. */
|
|
506
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
507
|
+
/** Whether toggling closes the menu. Defaults to false — checkbox items stay open. */
|
|
508
|
+
readonly closeOnClick: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
509
|
+
/** Explicit typeahead label. When set, overrides textContent for character search. */
|
|
510
|
+
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
511
|
+
/** The checked state of the item. */
|
|
512
|
+
readonly checked: _angular_core.ModelSignal<CheckedState>;
|
|
513
|
+
/** Emits when the checked state changes. */
|
|
514
|
+
readonly onCheckedChange: _angular_core.OutputEmitterRef<CheckedState>;
|
|
515
|
+
protected readonly highlighted: Signal<boolean>;
|
|
516
|
+
protected readonly isIndeterminate: typeof isIndeterminate;
|
|
517
|
+
protected readonly getCheckedState: typeof getCheckedState;
|
|
518
|
+
onFocus(): void;
|
|
519
|
+
onBlur(): void;
|
|
520
|
+
onPointerMove(event: PointerEvent): void;
|
|
521
|
+
onPointerLeave(event: PointerEvent): void;
|
|
522
|
+
onItemClick(): void;
|
|
523
|
+
protected onActivate(event: Event): void;
|
|
524
|
+
private toggleChecked;
|
|
525
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuCheckboxItem, never>;
|
|
526
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuCheckboxItem, "[rdxMenuCheckboxItem]", ["rdxMenuCheckboxItem"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "closeOnClick": { "alias": "closeOnClick"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "onCheckedChange": "onCheckedChange"; }, never, never, true, never>;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Renders when the parent checkbox item is checked or indeterminate.
|
|
531
|
+
* Set `keepMounted` to keep the element in the DOM when unchecked (enables CSS animations).
|
|
532
|
+
*/
|
|
533
|
+
declare class RdxMenuCheckboxItemIndicator {
|
|
534
|
+
private readonly itemContext;
|
|
535
|
+
/** Keep the indicator in the DOM when unchecked so CSS exit animations can play. */
|
|
536
|
+
readonly keepMounted: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
537
|
+
protected readonly dataState: _angular_core.Signal<"indeterminate" | "checked" | "unchecked">;
|
|
538
|
+
protected readonly isVisible: _angular_core.Signal<boolean>;
|
|
539
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuCheckboxItemIndicator, never>;
|
|
540
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuCheckboxItemIndicator, "[rdxMenuCheckboxItemIndicator]", ["rdxMenuCheckboxItemIndicator"], { "keepMounted": { "alias": "keepMounted"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
interface RdxMenuRadioGroupContext {
|
|
544
|
+
value: Signal<string | undefined>;
|
|
545
|
+
selectValue: (value: string) => void;
|
|
546
|
+
}
|
|
547
|
+
declare const injectRdxMenuRadioGroupContext: _radix_ng_primitives_core.InjectContext<RdxMenuRadioGroupContext>;
|
|
548
|
+
declare const provideRdxMenuRadioGroupContext: (useFactory: () => RdxMenuRadioGroupContext) => _angular_core.Provider;
|
|
549
|
+
/**
|
|
550
|
+
* Groups radio items in a menu.
|
|
551
|
+
*/
|
|
552
|
+
declare class RdxMenuRadioGroup {
|
|
553
|
+
/**
|
|
554
|
+
* The currently selected value.
|
|
555
|
+
*/
|
|
556
|
+
readonly value: _angular_core.ModelSignal<string | undefined>;
|
|
557
|
+
/**
|
|
558
|
+
* Emits when the selected value changes.
|
|
559
|
+
*/
|
|
560
|
+
readonly onValueChange: _angular_core.OutputEmitterRef<string>;
|
|
561
|
+
selectValue(newValue: string): void;
|
|
562
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuRadioGroup, never>;
|
|
563
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuRadioGroup, "[rdxMenuRadioGroup]", ["rdxMenuRadioGroup"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "onValueChange": "onValueChange"; }, never, never, true, never>;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
interface RdxMenuRadioItemContext {
|
|
567
|
+
checked: Signal<boolean>;
|
|
568
|
+
}
|
|
569
|
+
declare const injectRdxMenuRadioItemContext: _radix_ng_primitives_core.InjectContext<RdxMenuRadioItemContext>;
|
|
570
|
+
declare const provideRdxMenuRadioItemContext: (useFactory: () => RdxMenuRadioItemContext) => _angular_core.Provider;
|
|
571
|
+
/**
|
|
572
|
+
* A radio item within a menu radio group.
|
|
573
|
+
*/
|
|
574
|
+
declare class RdxMenuRadioItem {
|
|
575
|
+
private readonly rootContext;
|
|
576
|
+
private readonly radioGroupContext;
|
|
577
|
+
private readonly elementRef;
|
|
578
|
+
private readonly isFocused;
|
|
579
|
+
/** The value of this radio item. */
|
|
580
|
+
readonly value: _angular_core.InputSignal<string>;
|
|
581
|
+
/** Whether this item is disabled. */
|
|
582
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
583
|
+
/** Whether selecting closes the menu. Defaults to false — radio items stay open. */
|
|
584
|
+
readonly closeOnClick: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
585
|
+
/** Explicit typeahead label. When set, overrides textContent for character search. */
|
|
586
|
+
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
587
|
+
/** Emits when this item is selected. */
|
|
588
|
+
readonly onSelect: _angular_core.OutputEmitterRef<string>;
|
|
589
|
+
readonly checked: Signal<boolean>;
|
|
590
|
+
protected readonly highlighted: Signal<boolean>;
|
|
591
|
+
protected readonly getCheckedState: typeof getCheckedState;
|
|
592
|
+
onFocus(): void;
|
|
593
|
+
onBlur(): void;
|
|
594
|
+
onPointerMove(event: PointerEvent): void;
|
|
595
|
+
onPointerLeave(event: PointerEvent): void;
|
|
596
|
+
onItemClick(): void;
|
|
597
|
+
protected onActivate(event: Event): void;
|
|
598
|
+
private selectItem;
|
|
599
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuRadioItem, never>;
|
|
600
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuRadioItem, "[rdxMenuRadioItem]", ["rdxMenuRadioItem"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "closeOnClick": { "alias": "closeOnClick"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, { "onSelect": "onSelect"; }, never, never, true, never>;
|
|
125
601
|
}
|
|
126
602
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
603
|
+
/**
|
|
604
|
+
* Renders when the parent radio item is selected.
|
|
605
|
+
* Set `keepMounted` to keep the element in the DOM when unselected (enables CSS animations).
|
|
606
|
+
*/
|
|
607
|
+
declare class RdxMenuRadioItemIndicator {
|
|
608
|
+
private readonly itemContext;
|
|
609
|
+
/** Keep the indicator in the DOM when unselected so CSS exit animations can play. */
|
|
610
|
+
readonly keepMounted: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
611
|
+
protected readonly dataState: _angular_core.Signal<"indeterminate" | "checked" | "unchecked">;
|
|
612
|
+
protected readonly isVisible: _angular_core.Signal<boolean>;
|
|
613
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuRadioItemIndicator, never>;
|
|
614
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuRadioItemIndicator, "[rdxMenuRadioItemIndicator]", ["rdxMenuRadioItemIndicator"], { "keepMounted": { "alias": "keepMounted"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
130
615
|
}
|
|
131
616
|
|
|
132
617
|
declare class RdxMenuModule {
|
|
133
|
-
static ɵfac:
|
|
134
|
-
static ɵmod:
|
|
135
|
-
static ɵinj:
|
|
618
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuModule, never>;
|
|
619
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<RdxMenuModule, never, [typeof RdxMenuRoot, typeof RdxMenuTrigger, typeof RdxMenuSubTrigger, typeof RdxMenuPortal, typeof RdxMenuPositioner, typeof RdxMenuPopup, typeof RdxMenuViewport, typeof RdxMenuBackdrop, typeof RdxMenuArrow, typeof RdxMenuItem, typeof RdxMenuLinkItem, typeof RdxMenuGroup, typeof RdxMenuGroupLabel, typeof RdxMenuSeparator, typeof RdxMenuCheckboxItem, typeof RdxMenuCheckboxItemIndicator, typeof RdxMenuRadioGroup, typeof RdxMenuRadioItem, typeof RdxMenuRadioItemIndicator], [typeof RdxMenuRoot, typeof RdxMenuTrigger, typeof RdxMenuSubTrigger, typeof RdxMenuPortal, typeof RdxMenuPositioner, typeof RdxMenuPopup, typeof RdxMenuViewport, typeof RdxMenuBackdrop, typeof RdxMenuArrow, typeof RdxMenuItem, typeof RdxMenuLinkItem, typeof RdxMenuGroup, typeof RdxMenuGroupLabel, typeof RdxMenuSeparator, typeof RdxMenuCheckboxItem, typeof RdxMenuCheckboxItemIndicator, typeof RdxMenuRadioGroup, typeof RdxMenuRadioItem, typeof RdxMenuRadioItemIndicator]>;
|
|
620
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<RdxMenuModule>;
|
|
136
621
|
}
|
|
137
622
|
|
|
138
|
-
export {
|
|
139
|
-
export type {
|
|
623
|
+
export { RdxMenuArrow, RdxMenuBackdrop, RdxMenuCheckboxItem, RdxMenuCheckboxItemIndicator, RdxMenuGroup, RdxMenuGroupLabel, RdxMenuItem, RdxMenuLinkItem, RdxMenuModule, RdxMenuPopup, RdxMenuPortal, RdxMenuPositioner, RdxMenuRadioGroup, RdxMenuRadioItem, RdxMenuRadioItemIndicator, RdxMenuRoot, RdxMenuSeparator, RdxMenuSubTrigger, RdxMenuTrigger, RdxMenuViewport, getCheckedState, injectRdxMenuCheckboxItemContext, injectRdxMenuRadioGroupContext, injectRdxMenuRadioItemContext, injectRdxMenuRootContext, isIndeterminate, provideRdxMenuCheckboxItemContext, provideRdxMenuRadioGroupContext, provideRdxMenuRadioItemContext, provideRdxMenuRootContext };
|
|
624
|
+
export type { CheckedState, RdxMenuAutoFocus, RdxMenuAutoFocusInput, RdxMenuCheckboxItemContext, RdxMenuOrientation, RdxMenuRadioGroupContext, RdxMenuRadioItemContext, RdxMenuRootContext, RdxMenuTransitionStatus, RdxMenuTriggerInteraction, RdxMenuTriggerInteractionHandler };
|