@cngx/ui 0.1.0-rc.6 → 0.1.0-rc.8
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/README.md +112 -1
- package/a11y/README.md +87 -0
- package/accordion/README.md +4 -2
- package/breadcrumb/README.md +262 -0
- package/collection/README.md +6 -0
- package/command-palette/README.md +224 -0
- package/context-menu/README.md +98 -0
- package/data-grid-accordion/README.md +103 -2
- package/feedback/README.md +42 -0
- package/fesm2022/cngx-ui-a11y.mjs +452 -0
- package/fesm2022/cngx-ui-a11y.mjs.map +1 -0
- package/fesm2022/cngx-ui-accordion.mjs +116 -38
- package/fesm2022/cngx-ui-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-action-button.mjs +115 -50
- package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
- package/fesm2022/cngx-ui-breadcrumb.mjs +181 -96
- package/fesm2022/cngx-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/cngx-ui-chart-panel.mjs +586 -0
- package/fesm2022/cngx-ui-chart-panel.mjs.map +1 -0
- package/fesm2022/cngx-ui-collection.mjs +207 -66
- package/fesm2022/cngx-ui-collection.mjs.map +1 -1
- package/fesm2022/cngx-ui-command-palette.mjs +1281 -0
- package/fesm2022/cngx-ui-command-palette.mjs.map +1 -0
- package/fesm2022/cngx-ui-context-menu.mjs +857 -0
- package/fesm2022/cngx-ui-context-menu.mjs.map +1 -0
- package/fesm2022/cngx-ui-data-grid-accordion.mjs +498 -111
- package/fesm2022/cngx-ui-data-grid-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-empty-state.mjs +16 -6
- package/fesm2022/cngx-ui-empty-state.mjs.map +1 -1
- package/fesm2022/cngx-ui-feedback.mjs +1095 -521
- package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
- package/fesm2022/cngx-ui-layout.mjs +18 -9
- package/fesm2022/cngx-ui-layout.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-accordion.mjs +84 -16
- package/fesm2022/cngx-ui-mat-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-paginator.mjs +67 -24
- package/fesm2022/cngx-ui-mat-paginator.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-stepper.mjs +72 -47
- package/fesm2022/cngx-ui-mat-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-tabs.mjs +370 -203
- package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-overlay.mjs +69 -13
- package/fesm2022/cngx-ui-overlay.mjs.map +1 -1
- package/fesm2022/cngx-ui-paginator.mjs +501 -182
- package/fesm2022/cngx-ui-paginator.mjs.map +1 -1
- package/fesm2022/cngx-ui-sidenav.mjs +327 -106
- package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
- package/fesm2022/cngx-ui-skeleton.mjs +22 -21
- package/fesm2022/cngx-ui-skeleton.mjs.map +1 -1
- package/fesm2022/cngx-ui-speak.mjs +107 -8
- package/fesm2022/cngx-ui-speak.mjs.map +1 -1
- package/fesm2022/cngx-ui-stat-card.mjs +718 -0
- package/fesm2022/cngx-ui-stat-card.mjs.map +1 -0
- package/fesm2022/cngx-ui-stepper.mjs +217 -76
- package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-tabs.mjs +40 -19
- package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-timeline.mjs +548 -0
- package/fesm2022/cngx-ui-timeline.mjs.map +1 -0
- package/fesm2022/cngx-ui-toc.mjs +748 -0
- package/fesm2022/cngx-ui-toc.mjs.map +1 -0
- package/fesm2022/cngx-ui.mjs +16 -21
- package/fesm2022/cngx-ui.mjs.map +1 -1
- package/mat-accordion/README.md +1 -1
- package/mat-paginator/README.md +9 -2
- package/mat-tabs/styles/mat-tabs.css +29 -27
- package/overlay/README.md +9 -4
- package/package.json +32 -1
- package/paginator/README.md +8 -4
- package/sidenav/README.md +33 -11
- package/skeleton/README.md +2 -0
- package/speak/README.md +3 -2
- package/stepper/README.md +15 -3
- package/timeline/README.md +350 -0
- package/toc/README.md +186 -0
- package/types/cngx-ui-a11y.d.ts +394 -0
- package/types/cngx-ui-accordion.d.ts +100 -30
- package/types/cngx-ui-action-button.d.ts +47 -3
- package/types/cngx-ui-breadcrumb.d.ts +159 -58
- package/types/cngx-ui-chart-panel.d.ts +382 -0
- package/types/cngx-ui-collection.d.ts +159 -58
- package/types/cngx-ui-command-palette.d.ts +565 -0
- package/types/cngx-ui-context-menu.d.ts +559 -0
- package/types/cngx-ui-data-grid-accordion.d.ts +344 -51
- package/types/cngx-ui-empty-state.d.ts +9 -2
- package/types/cngx-ui-feedback.d.ts +664 -73
- package/types/cngx-ui-layout.d.ts +8 -3
- package/types/cngx-ui-mat-accordion.d.ts +32 -4
- package/types/cngx-ui-mat-paginator.d.ts +37 -8
- package/types/cngx-ui-mat-stepper.d.ts +23 -11
- package/types/cngx-ui-mat-tabs.d.ts +218 -23
- package/types/cngx-ui-overlay.d.ts +56 -10
- package/types/cngx-ui-paginator.d.ts +416 -132
- package/types/cngx-ui-sidenav.d.ts +248 -74
- package/types/cngx-ui-skeleton.d.ts +18 -7
- package/types/cngx-ui-speak.d.ts +118 -5
- package/types/cngx-ui-stat-card.d.ts +411 -0
- package/types/cngx-ui-stepper.d.ts +81 -29
- package/types/cngx-ui-tabs.d.ts +22 -6
- package/types/cngx-ui-timeline.d.ts +495 -0
- package/types/cngx-ui-toc.d.ts +581 -0
- package/types/cngx-ui.d.ts +8 -5
|
@@ -0,0 +1,559 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef, InjectionToken, Signal } from '@angular/core';
|
|
3
|
+
import * as i1$1 from '@cngx/common/interactive';
|
|
4
|
+
import { CngxContextMenuTriggerPopoverRef, CngxMenuHost, CngxMenu, CngxMenuSubmenuWiring, CngxMenuItemIcon, CngxMenuSubmenuPopoverRef } from '@cngx/common/interactive';
|
|
5
|
+
import * as i1 from '@cngx/common/popover';
|
|
6
|
+
import { CngxPopover } from '@cngx/common/popover';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Context handed to a `*cngxContextMenuContent` template. `$implicit` is the
|
|
10
|
+
* per-open datum the trigger resolved for the target the menu opened over
|
|
11
|
+
* (`null` while the menu is closed). Read it with `let-row`.
|
|
12
|
+
*
|
|
13
|
+
* @category ui/context-menu
|
|
14
|
+
*/
|
|
15
|
+
interface CngxContextMenuContentContext<T = unknown> {
|
|
16
|
+
/** The per-open datum, or `null` while the menu is closed. Usable as `let-row`. */
|
|
17
|
+
readonly $implicit: T | null;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Lazy content slot for {@link CngxContextMenu}. The template renders only
|
|
21
|
+
* while the menu is open and receives the trigger's per-open datum as
|
|
22
|
+
* `$implicit`, so one panel declaration serves every target of a delegated
|
|
23
|
+
* trigger with row-correct content.
|
|
24
|
+
*
|
|
25
|
+
* ```html
|
|
26
|
+
* <cngx-context-menu #menu ariaLabel="Row actions">
|
|
27
|
+
* <ng-template cngxContextMenuContent let-row>
|
|
28
|
+
* <cngx-context-menu-item (select)="edit(row)">Edit {{ row.name }}</cngx-context-menu-item>
|
|
29
|
+
* </ng-template>
|
|
30
|
+
* </cngx-context-menu>
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* <example-url>http://localhost:4200/#/ui/context-menu/grid/delegated-resolver</example-url>
|
|
34
|
+
* <example-url>http://localhost:4200/#/ui/context-menu/table/row-context-data</example-url>
|
|
35
|
+
* @category ui/context-menu
|
|
36
|
+
* @wcag AA
|
|
37
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/context-menu/context-menu-content.directive.ts
|
|
38
|
+
* @since 0.1.0
|
|
39
|
+
* @relatedTo CngxContextMenu, CngxContextMenuFor
|
|
40
|
+
*/
|
|
41
|
+
declare class CngxContextMenuContent<T = unknown> {
|
|
42
|
+
/** The projected `<ng-template>`, rendered by the panel while open. */
|
|
43
|
+
readonly templateRef: TemplateRef<CngxContextMenuContentContext<T>>;
|
|
44
|
+
/** Narrows `let-` bindings to {@link CngxContextMenuContentContext} under strict templates. */
|
|
45
|
+
static ngTemplateContextGuard<T>(_dir: CngxContextMenuContent<T>, _ctx: unknown): _ctx is CngxContextMenuContentContext<T>;
|
|
46
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxContextMenuContent<any>, never>;
|
|
47
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxContextMenuContent<any>, "ng-template[cngxContextMenuContent]", ["cngxContextMenuContent"], {}, {}, never, never, true, never>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Structural contract a context-menu panel exposes to `CngxContextMenuFor`.
|
|
52
|
+
* The trigger depends on this interface rather than the concrete
|
|
53
|
+
* `CngxContextMenu` class so an ejected panel skin (decompose) or a future
|
|
54
|
+
* second panel can satisfy the same seam - the `CngxMenuHost` precedent
|
|
55
|
+
* (`CNGX_MENU_HOST`) applied to the panel surface.
|
|
56
|
+
*
|
|
57
|
+
* @category ui/context-menu
|
|
58
|
+
*/
|
|
59
|
+
interface CngxContextMenuPanel<T = unknown> {
|
|
60
|
+
/** Popover surface the trigger drives at pointer coordinates. */
|
|
61
|
+
readonly popover: CngxContextMenuTriggerPopoverRef;
|
|
62
|
+
/** Menu brain the popover wraps (`role="menu"`, active-descendant registry). */
|
|
63
|
+
readonly menuHost: CngxMenuHost;
|
|
64
|
+
/** The per-open datum while visible, `null` once closed. */
|
|
65
|
+
readonly context: Signal<T | null>;
|
|
66
|
+
/** Store the per-open datum. Called by the trigger before the popover opens. */
|
|
67
|
+
setContext(value: T | null): void;
|
|
68
|
+
/**
|
|
69
|
+
* @internal The trigger that owns the current open, `null` while unowned.
|
|
70
|
+
* N triggers can dock one panel; only the opener may report
|
|
71
|
+
* `aria-expanded="true"`, forward keydown, and run its dismiss binding.
|
|
72
|
+
* A direct open (`openAsSubmenu`, programmatic `popover.show()`) claims no
|
|
73
|
+
* owner, so every docked trigger stays collapsed. Optional: an ejected
|
|
74
|
+
* panel skin may omit it, in which case a docked trigger falls back to
|
|
75
|
+
* mirroring plain popover visibility.
|
|
76
|
+
*/
|
|
77
|
+
readonly openOwner?: Signal<unknown>;
|
|
78
|
+
/**
|
|
79
|
+
* @internal Claim the current open for `owner`. Called by the opening
|
|
80
|
+
* trigger synchronously in its open gesture, before the popover shows, so
|
|
81
|
+
* the handler registration that follows belongs to the opener even when
|
|
82
|
+
* other triggers dock the same panel. A claim always marks a ROOT open -
|
|
83
|
+
* the panel resets any sticky submenu policy a previous `openAsSubmenu`
|
|
84
|
+
* installed. Optional alongside {@link openOwner}.
|
|
85
|
+
*/
|
|
86
|
+
claimOpen?(owner: unknown): void;
|
|
87
|
+
/**
|
|
88
|
+
* @internal Release the open claim if `owner` still holds it. A trigger
|
|
89
|
+
* calls this when the popover closes, when its panel binding swaps, and on
|
|
90
|
+
* destroy; the owner guard keeps a stale release from clobbering a newer
|
|
91
|
+
* claim. Optional alongside {@link openOwner}.
|
|
92
|
+
*/
|
|
93
|
+
releaseOpen?(owner: unknown): void;
|
|
94
|
+
/**
|
|
95
|
+
* @internal Open this panel as a nested submenu of a parent item: flank the
|
|
96
|
+
* inline-end (`right-start` + the submenu flip chain), open non-exclusively so
|
|
97
|
+
* the parent panel survives, and mirror the parent's per-open datum. Owns the
|
|
98
|
+
* submenu placement policy so a projected item drives one seam instead of
|
|
99
|
+
* reaching into the popover's override signals. Optional: an ejected panel
|
|
100
|
+
* skin may omit it and drive its own popover directly.
|
|
101
|
+
*/
|
|
102
|
+
openAsSubmenu?(context: T | null): void;
|
|
103
|
+
/**
|
|
104
|
+
* @internal Register the trigger core's keydown handler so the panel can
|
|
105
|
+
* forward ArrowRight/ArrowLeft/Escape submenu routing to it. The core owns
|
|
106
|
+
* that routing, but open moves focus into the panel (a sibling of the
|
|
107
|
+
* trigger), so the panel - not the trigger host - is where those keys land.
|
|
108
|
+
* `null` deregisters. Optional: an ejected panel skin may omit it, in which
|
|
109
|
+
* case keyboard submenu routing is simply not wired.
|
|
110
|
+
*/
|
|
111
|
+
setKeydownHandler?(handler: ((event: KeyboardEvent) => void) | null): void;
|
|
112
|
+
/**
|
|
113
|
+
* @internal Register the trigger core's activation handler. The panel
|
|
114
|
+
* subscribes to its menu brain's `CngxActiveDescendant.activated` output and
|
|
115
|
+
* invokes this on every activation, so pointer click and Enter/Space open a
|
|
116
|
+
* submenu-parent deterministically off the `activated` event rather than a
|
|
117
|
+
* forwarded keydown that races the AD's own listener. `null` deregisters.
|
|
118
|
+
* Optional: an ejected panel skin may omit it.
|
|
119
|
+
*/
|
|
120
|
+
setActivationHandler?(handler: (() => void) | null): void;
|
|
121
|
+
/**
|
|
122
|
+
* @internal Register the trigger core's push-only "submenu opened" handler.
|
|
123
|
+
* A projected item calls {@link noteActiveSubmenuOpened} after its
|
|
124
|
+
* `openAsSubmenu` terminal ran; the panel forwards to this handler so the
|
|
125
|
+
* trigger's focus stack records an externally opened submenu (hover and
|
|
126
|
+
* click already route through the stack and no-op here). `null`
|
|
127
|
+
* deregisters. Optional: an ejected panel skin may omit it.
|
|
128
|
+
*/
|
|
129
|
+
setSubmenuNoteHandler?(handler: (() => void) | null): void;
|
|
130
|
+
/**
|
|
131
|
+
* @internal Called by a projected item after its `openAsSubmenu` terminal
|
|
132
|
+
* showed the submenu, so the trigger's focus stack records it when the open
|
|
133
|
+
* did not come from the stack itself (programmatic opens; idempotent no-op
|
|
134
|
+
* for hover/click). Routes to the handler registered via
|
|
135
|
+
* {@link setSubmenuNoteHandler}; a no-op when none is wired.
|
|
136
|
+
*/
|
|
137
|
+
noteActiveSubmenuOpened?(): void;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* @internal DI token the panel provides via `useExisting` so a projected
|
|
141
|
+
* `CngxContextMenuItem` can read its enclosing panel's `context()` and mirror
|
|
142
|
+
* it into a sibling-declared submenu. Not part of the public API - the child
|
|
143
|
+
* talks to the panel through this structural seam rather than injecting the
|
|
144
|
+
* concrete `CngxContextMenu` class (`CNGX_MENU_HOST` precedent).
|
|
145
|
+
*/
|
|
146
|
+
declare const CNGX_CONTEXT_MENU_PANEL: InjectionToken<CngxContextMenuPanel<unknown>>;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Declarative context-menu panel. Stacks `CngxPopover` (the top-layer popup
|
|
150
|
+
* surface) and `CngxMenu` (the `role="menu"` keyboard + ARIA brain) as host
|
|
151
|
+
* directives on its own element, so projected items and the lazy content
|
|
152
|
+
* template resolve `CngxActiveDescendant` / `CNGX_MENU_HOST` against the panel
|
|
153
|
+
* host's injector chain. Pair it with `[cngxContextMenuFor]` on a target.
|
|
154
|
+
*
|
|
155
|
+
* The brains live on the host - not inside an inner `[cngxMenu]` element -
|
|
156
|
+
* because Angular resolves DI for projected and template content at the
|
|
157
|
+
* declaration site, not the projection site; an inner menu directive would
|
|
158
|
+
* be invisible to items rendered through `<ng-content>` or the content slot.
|
|
159
|
+
* Construction mirrors `CngxPopoverPanel`.
|
|
160
|
+
*
|
|
161
|
+
* `context()` is derived, never synced: it reads the trigger's per-open datum
|
|
162
|
+
* while the popover is visible and `null` once it closes - no manual reset on
|
|
163
|
+
* dismiss (Pillar 1).
|
|
164
|
+
*
|
|
165
|
+
* ### Static menu
|
|
166
|
+
* ```html
|
|
167
|
+
* <div [cngxContextMenuFor]="menu">Right-click me</div>
|
|
168
|
+
* <cngx-context-menu #menu ariaLabel="Actions">
|
|
169
|
+
* <cngx-context-menu-item (select)="copy()">Copy</cngx-context-menu-item>
|
|
170
|
+
* <cngx-context-menu-item (select)="paste()">Paste</cngx-context-menu-item>
|
|
171
|
+
* </cngx-context-menu>
|
|
172
|
+
* ```
|
|
173
|
+
*
|
|
174
|
+
* ### Per-row content
|
|
175
|
+
* ```html
|
|
176
|
+
* <cngx-context-menu #menu ariaLabel="Row actions">
|
|
177
|
+
* <ng-template cngxContextMenuContent let-row>
|
|
178
|
+
* <cngx-context-menu-item (select)="edit(row)">Edit {{ row.name }}</cngx-context-menu-item>
|
|
179
|
+
* </ng-template>
|
|
180
|
+
* </cngx-context-menu>
|
|
181
|
+
* ```
|
|
182
|
+
*
|
|
183
|
+
* <example-url>http://localhost:4200/#/ui/context-menu/basic/static-items</example-url>
|
|
184
|
+
* <example-url>http://localhost:4200/#/ui/context-menu/grid/delegated-resolver</example-url>
|
|
185
|
+
* <example-url>http://localhost:4200/#/ui/context-menu/submenu/nested-export-menu</example-url>
|
|
186
|
+
* <example-url>http://localhost:4200/#/ui/context-menu/selection/checkbox-radio-items</example-url>
|
|
187
|
+
* @category ui/context-menu
|
|
188
|
+
* @docsKind primary
|
|
189
|
+
* @wcag AA
|
|
190
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/context-menu/context-menu.component.ts
|
|
191
|
+
* @since 0.1.0
|
|
192
|
+
* @relatedTo CngxContextMenuFor, CngxContextMenuItem, CngxContextMenuContent, CngxMenu, CngxPopover
|
|
193
|
+
* @slot cngxContextMenuContent Replaces the projected items with lazy content rendered only while the menu is open; gets the trigger's per-open datum as $implicit (let-row).
|
|
194
|
+
*/
|
|
195
|
+
declare class CngxContextMenu<T = unknown> implements CngxContextMenuPanel<T> {
|
|
196
|
+
/** The popover surface this panel drives. Consumed by the trigger core. */
|
|
197
|
+
readonly popover: CngxPopover;
|
|
198
|
+
/** The menu brain (`role="menu"`, active-descendant registry). */
|
|
199
|
+
readonly menuHost: CngxMenu;
|
|
200
|
+
/** Per-open datum set by the trigger before `show()`. */
|
|
201
|
+
private readonly datum;
|
|
202
|
+
/** Backing state for {@link openOwner}. */
|
|
203
|
+
private readonly openOwnerState;
|
|
204
|
+
/**
|
|
205
|
+
* @internal The trigger that owns the current open, `null` while unowned.
|
|
206
|
+
* Claimed by the opening `CngxContextMenuFor` before the popover shows;
|
|
207
|
+
* direct opens (`openAsSubmenu`, programmatic `popover.show()`) leave it
|
|
208
|
+
* `null`, so docked triggers keep `aria-expanded="false"` for opens they
|
|
209
|
+
* did not perform.
|
|
210
|
+
*/
|
|
211
|
+
readonly openOwner: _angular_core.Signal<unknown>;
|
|
212
|
+
/**
|
|
213
|
+
* The datum the menu opened over while visible, `null` once closed. Gated on
|
|
214
|
+
* `popover.isVisible()` so the reset on dismiss is derived, not synced.
|
|
215
|
+
*/
|
|
216
|
+
readonly context: _angular_core.Signal<T | null>;
|
|
217
|
+
protected readonly contentTemplate: _angular_core.Signal<CngxContextMenuContent<any> | undefined>;
|
|
218
|
+
/**
|
|
219
|
+
* @internal Store the per-open datum. Called by `CngxContextMenuFor` in the
|
|
220
|
+
* `contextmenu` event path, before the popover opens.
|
|
221
|
+
*/
|
|
222
|
+
setContext(value: T | null): void;
|
|
223
|
+
/** @internal Claim the current open for `owner`. See {@link CngxContextMenuPanel.claimOpen}. */
|
|
224
|
+
claimOpen(owner: unknown): void;
|
|
225
|
+
/** @internal Release the open claim if `owner` still holds it. */
|
|
226
|
+
releaseOpen(owner: unknown): void;
|
|
227
|
+
/**
|
|
228
|
+
* @internal Open this panel as a nested submenu of a parent item. Installs the
|
|
229
|
+
* inline-end placement + flip chain, opens non-exclusively (the parent panel
|
|
230
|
+
* survives), mirrors the parent's per-open datum, then shows. Owns the submenu
|
|
231
|
+
* placement policy so `CngxContextMenuItem` drives one seam rather than
|
|
232
|
+
* reaching into the popover's `@internal` override setters - the ejected item
|
|
233
|
+
* skin stays off `CngxPopover` internals (decompose).
|
|
234
|
+
*/
|
|
235
|
+
openAsSubmenu(context: T | null): void;
|
|
236
|
+
/** Keydown forwarder registered by the trigger; `null` while none is bound. */
|
|
237
|
+
private keydownHandler;
|
|
238
|
+
/** Activation forwarder registered by the trigger; `null` while none bound. */
|
|
239
|
+
private activationHandler;
|
|
240
|
+
/** Push-only submenu-note forwarder registered by the trigger; `null` while none bound. */
|
|
241
|
+
private submenuNoteHandler;
|
|
242
|
+
constructor();
|
|
243
|
+
/**
|
|
244
|
+
* @internal Register the trigger core's keydown handler. The core owns
|
|
245
|
+
* submenu ArrowRight/ArrowLeft/Escape routing, but open moves focus into
|
|
246
|
+
* this panel, so keydown lands here rather than on the trigger host.
|
|
247
|
+
*/
|
|
248
|
+
setKeydownHandler(handler: ((event: KeyboardEvent) => void) | null): void;
|
|
249
|
+
/**
|
|
250
|
+
* @internal Register the trigger core's activation handler, invoked on every
|
|
251
|
+
* `CngxActiveDescendant.activated` (keyboard activation + pointer click) so a
|
|
252
|
+
* submenu parent opens deterministically off the event rather than a racing
|
|
253
|
+
* keydown.
|
|
254
|
+
*/
|
|
255
|
+
setActivationHandler(handler: (() => void) | null): void;
|
|
256
|
+
/** @internal Register the trigger core's push-only submenu-note handler. */
|
|
257
|
+
setSubmenuNoteHandler(handler: (() => void) | null): void;
|
|
258
|
+
/** @internal A projected item calls this after its openAsSubmenu terminal
|
|
259
|
+
* ran, so the trigger's focus stack records an externally opened submenu
|
|
260
|
+
* (idempotent no-op for stack-driven hover/click opens). */
|
|
261
|
+
noteActiveSubmenuOpened(): void;
|
|
262
|
+
protected handleKeydown(event: KeyboardEvent): void;
|
|
263
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxContextMenu<any>, never>;
|
|
264
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxContextMenu<any>, "cngx-context-menu", ["cngxContextMenu"], {}, {}, ["contentTemplate"], ["*"], true, [{ directive: typeof i1.CngxPopover; inputs: { "offset": "offset"; "closeOnEscape": "closeOnEscape"; }; outputs: {}; }, { directive: typeof i1$1.CngxMenu; inputs: { "label": "ariaLabel"; }; outputs: {}; }]>;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Docks a {@link CngxContextMenu} onto a target element. Opens the panel at
|
|
269
|
+
* pointer coordinates on `contextmenu` (right-click) or `Shift+F10`, feeding
|
|
270
|
+
* the panel a per-open datum so one declaration serves many targets.
|
|
271
|
+
*
|
|
272
|
+
* Three ways to obtain the datum `T`:
|
|
273
|
+
* - `[cngxContextMenuData]` - a fixed datum for this single target.
|
|
274
|
+
* - `[cngxContextMenuResolve]` - a resolver run against the `contextmenu`
|
|
275
|
+
* event, so a container (table, grid, treetable, virtualized list) keeps a
|
|
276
|
+
* single trigger instance and derives the row from `event.target`. The
|
|
277
|
+
* resolver wins when both are bound. A `null` resolver result leaves the
|
|
278
|
+
* native context menu untouched (no `preventDefault`, no open).
|
|
279
|
+
* - `[cngxContextMenuKeyboardResolve]` - the keyboard counterpart, run
|
|
280
|
+
* against the `Shift+F10` keydown so a delegated container derives the
|
|
281
|
+
* row from the focused element (`event.target`). Without it a keyboard
|
|
282
|
+
* open commits `[cngxContextMenuData]` (or `null` in resolver-only mode).
|
|
283
|
+
*
|
|
284
|
+
* A thin shell over `createContextMenuTriggerCore` (shared with
|
|
285
|
+
* `CngxContextMenuTrigger`): the core owns the preventDefault decision through
|
|
286
|
+
* its `resolveOpen` seam, so the veto lives in one place and this directive
|
|
287
|
+
* only feeds the resolver.
|
|
288
|
+
*
|
|
289
|
+
* Many triggers may dock the same panel. Each open claims ownership on the
|
|
290
|
+
* panel, so only the opening trigger reports `aria-expanded="true"`, forwards
|
|
291
|
+
* the panel's keydown into its core, and runs its dismiss binding - sibling
|
|
292
|
+
* triggers stay collapsed and inert for opens they did not perform.
|
|
293
|
+
*
|
|
294
|
+
* ```html
|
|
295
|
+
* <tr [cngxContextMenuFor]="menu" [cngxContextMenuData]="row" tabindex="0"></tr>
|
|
296
|
+
* <cngx-context-menu #menu ariaLabel="Row actions">…</cngx-context-menu>
|
|
297
|
+
* ```
|
|
298
|
+
*
|
|
299
|
+
* <example-url>http://localhost:4200/#/ui/context-menu/grid/delegated-resolver</example-url>
|
|
300
|
+
* <example-url>http://localhost:4200/#/ui/context-menu/basic/static-items</example-url>
|
|
301
|
+
* @category ui/context-menu
|
|
302
|
+
* @wcag AA
|
|
303
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/context-menu/context-menu-for.directive.ts
|
|
304
|
+
* @since 0.1.0
|
|
305
|
+
* @relatedTo CngxContextMenu, CngxContextMenuItem, CngxContextMenuTrigger
|
|
306
|
+
*/
|
|
307
|
+
declare class CngxContextMenuFor<T = unknown> {
|
|
308
|
+
/** Panel this trigger opens. Typed to the {@link CngxContextMenuPanel} seam. */
|
|
309
|
+
readonly panel: _angular_core.InputSignal<CngxContextMenuPanel<T>>;
|
|
310
|
+
/** Fixed datum handed to the panel for this single target. */
|
|
311
|
+
readonly data: _angular_core.InputSignal<T | undefined>;
|
|
312
|
+
/**
|
|
313
|
+
* Resolver run against the `contextmenu` event. Return the datum to open
|
|
314
|
+
* with, or `null` to let the native menu show. Wins over `[cngxContextMenuData]`.
|
|
315
|
+
* Keyboard opens (`Shift+F10`) carry no pointer event - they resolve via
|
|
316
|
+
* `[cngxContextMenuKeyboardResolve]`, or fall back to the fixed datum.
|
|
317
|
+
*/
|
|
318
|
+
readonly resolve: _angular_core.InputSignal<((event: MouseEvent) => T | null) | undefined>;
|
|
319
|
+
/**
|
|
320
|
+
* Resolver run against the `Shift+F10` keydown. `event.target` is the
|
|
321
|
+
* focused element inside this trigger's host, so a delegated container
|
|
322
|
+
* (focusable rows, roving grid cells) derives the row for keyboard users
|
|
323
|
+
* exactly like `[cngxContextMenuResolve]` does for pointer users. Return
|
|
324
|
+
* `null` to skip the open (the browser's own Shift+F10 behaviour stays
|
|
325
|
+
* untouched). Wins over `[cngxContextMenuData]` for keyboard opens.
|
|
326
|
+
*/
|
|
327
|
+
readonly keyboardResolve: _angular_core.InputSignal<((event: KeyboardEvent) => T | null) | undefined>;
|
|
328
|
+
/**
|
|
329
|
+
* `true` while the panel is visible AND this trigger performed the open.
|
|
330
|
+
* N triggers can dock one panel; each reports `aria-expanded` only for its
|
|
331
|
+
* own opens (a shared panel opened by a sibling trigger, `openAsSubmenu`,
|
|
332
|
+
* or a programmatic `popover.show()` leaves this trigger collapsed).
|
|
333
|
+
* Panels without the ownership seam fall back to plain visibility.
|
|
334
|
+
*/
|
|
335
|
+
readonly isOpen: _angular_core.Signal<boolean>;
|
|
336
|
+
private readonly core;
|
|
337
|
+
/** Panel-forwarded seams, stable identities so registration is idempotent. */
|
|
338
|
+
private readonly forwardKeydown;
|
|
339
|
+
private readonly forwardActivation;
|
|
340
|
+
private readonly forwardSubmenuNote;
|
|
341
|
+
/**
|
|
342
|
+
* Claim the shared panel for this trigger's open: record ownership, then
|
|
343
|
+
* register the keydown/activation/submenu-note forwarders. Registration
|
|
344
|
+
* happens on open (not on construction), so the OPENING trigger owns the
|
|
345
|
+
* handlers instead of whichever sibling was constructed last.
|
|
346
|
+
*/
|
|
347
|
+
private claimPanel;
|
|
348
|
+
/**
|
|
349
|
+
* Clear the panel's forwarders and release the claim - but only while this
|
|
350
|
+
* trigger still owns the open (or the panel has no ownership seam). A stale
|
|
351
|
+
* release must never clobber a sibling's newer claim.
|
|
352
|
+
*/
|
|
353
|
+
private releasePanel;
|
|
354
|
+
constructor();
|
|
355
|
+
protected handleContextMenu(event: MouseEvent): void;
|
|
356
|
+
protected handleKeydown(event: KeyboardEvent): void;
|
|
357
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxContextMenuFor<any>, never>;
|
|
358
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxContextMenuFor<any>, "[cngxContextMenuFor]", ["cngxContextMenuFor"], { "panel": { "alias": "cngxContextMenuFor"; "required": true; "isSignal": true; }; "data": { "alias": "cngxContextMenuData"; "required": false; "isSignal": true; }; "resolve": { "alias": "cngxContextMenuResolve"; "required": false; "isSignal": true; }; "keyboardResolve": { "alias": "cngxContextMenuKeyboardResolve"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* A single actionable context-menu item. Thin shell over `CngxMenuItem`: the
|
|
363
|
+
* brain owns `role="menuitem"`, the active-descendant registration, the
|
|
364
|
+
* keyboard/pointer activation and the disabled semantics. Dual selector, so it
|
|
365
|
+
* works both as an element and as an attribute on a native `<button>` (the
|
|
366
|
+
* `button[mat-menu-item]` precedent).
|
|
367
|
+
*
|
|
368
|
+
* Emits `select` when this item is activated by click or Enter/Space. Give
|
|
369
|
+
* each item a distinct `[value]` (forwarded to the brain) so pointer
|
|
370
|
+
* activation targets the right row - matching the base `CngxMenuItem`
|
|
371
|
+
* convention; a value-less item still works when it is the only item.
|
|
372
|
+
*
|
|
373
|
+
* ### Submenu
|
|
374
|
+
* Bind `[submenu]` to a sibling `<cngx-context-menu>` to open a nested menu.
|
|
375
|
+
* The `CngxMenuItemSubmenu` brain (a host directive here) is wired internally
|
|
376
|
+
* through `CNGX_MENU_SUBMENU_WIRING`, so the consumer needs no `[exclusive]`
|
|
377
|
+
* handgrip and no popover plumbing - just the sibling reference. The nested
|
|
378
|
+
* panel opens non-exclusively (the parent stays open) and inherits the parent
|
|
379
|
+
* panel's row context.
|
|
380
|
+
*
|
|
381
|
+
* ```html
|
|
382
|
+
* <cngx-context-menu-item value="copy" kbd="⌘C" (select)="copy()">Copy</cngx-context-menu-item>
|
|
383
|
+
* <button cngxContextMenuItem value="delete" [disabled]="locked()" (select)="remove()">Delete</button>
|
|
384
|
+
*
|
|
385
|
+
* <cngx-context-menu-item [submenu]="exportMenu">Export</cngx-context-menu-item>
|
|
386
|
+
* <cngx-context-menu #exportMenu ariaLabel="Export as">
|
|
387
|
+
* <cngx-context-menu-item (select)="export('pdf')">PDF</cngx-context-menu-item>
|
|
388
|
+
* </cngx-context-menu>
|
|
389
|
+
* ```
|
|
390
|
+
*
|
|
391
|
+
* <example-url>http://localhost:4200/#/ui/context-menu/basic/static-items</example-url>
|
|
392
|
+
* <example-url>http://localhost:4200/#/ui/context-menu/submenu/nested-export-menu</example-url>
|
|
393
|
+
* <example-url>http://localhost:4200/#/ui/context-menu/attribute-form/native-buttons</example-url>
|
|
394
|
+
* @category ui/context-menu
|
|
395
|
+
* @wcag AA
|
|
396
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/context-menu/context-menu-item.component.ts
|
|
397
|
+
* @since 0.1.0
|
|
398
|
+
* @relatedTo CngxContextMenu, CngxContextMenuDivider, CngxMenuItem, CngxMenuItemSubmenu
|
|
399
|
+
*/
|
|
400
|
+
declare class CngxContextMenuItem implements CngxMenuSubmenuWiring {
|
|
401
|
+
/**
|
|
402
|
+
* Leading glyph shorthand rendered in the icon slot (decorative,
|
|
403
|
+
* `aria-hidden`). A convenience for single-character icons; suppressed when
|
|
404
|
+
* the consumer projects a richer `[cngxMenuItemIcon]` marker (SVG / icon
|
|
405
|
+
* component), which wins.
|
|
406
|
+
*/
|
|
407
|
+
readonly icon: _angular_core.InputSignal<string | undefined>;
|
|
408
|
+
/**
|
|
409
|
+
* A consumer-projected `[cngxMenuItemIcon]` marker, when present. Gates the
|
|
410
|
+
* string `[icon]` shorthand off so the projected icon is the only one drawn.
|
|
411
|
+
*/
|
|
412
|
+
protected readonly projectedIcon: _angular_core.Signal<CngxMenuItemIcon | undefined>;
|
|
413
|
+
/** Keyboard-shortcut hint rendered in the kbd slot (decorative). */
|
|
414
|
+
readonly kbd: _angular_core.InputSignal<string | undefined>;
|
|
415
|
+
/**
|
|
416
|
+
* Sibling `<cngx-context-menu>` opened as a nested submenu. When set, the
|
|
417
|
+
* item renders a caret, gains `aria-haspopup="menu"` (from the submenu
|
|
418
|
+
* brain) and routes ArrowRight/ArrowLeft into the nested panel.
|
|
419
|
+
*/
|
|
420
|
+
readonly submenu: _angular_core.InputSignal<CngxContextMenu<unknown> | undefined>;
|
|
421
|
+
/** Fires when this item is activated by click or Enter/Space. */
|
|
422
|
+
readonly select: _angular_core.OutputEmitterRef<void>;
|
|
423
|
+
/** @internal Decorative caret rendered while `submenu` is set. RTL flip is
|
|
424
|
+
* a CSS concern (`.cngx-menu-item__suffix` under `[dir='rtl']`), not a
|
|
425
|
+
* swapped glyph. */
|
|
426
|
+
protected readonly caret: "▸";
|
|
427
|
+
private readonly parentPanel;
|
|
428
|
+
/**
|
|
429
|
+
* Facade the submenu brain drives instead of a `[cngxMenuItemSubmenu]`
|
|
430
|
+
* input. `show()` opens the target panel non-exclusively and mirrors the
|
|
431
|
+
* parent panel's row context in first; every other member delegates to the
|
|
432
|
+
* target's `CngxPopover`. Built once, reads `submenu()` lazily so it stays
|
|
433
|
+
* valid across target changes. The adapter itself lives in
|
|
434
|
+
* `createContextMenuItemSubmenuFacade` so this class stays a thin shell.
|
|
435
|
+
*/
|
|
436
|
+
private readonly submenuPopoverFacade;
|
|
437
|
+
constructor();
|
|
438
|
+
/** @internal `CngxMenuSubmenuWiring` - the nested panel's menu brain, or
|
|
439
|
+
* `undefined` while no `[submenu]` is bound so the brain stays inert. */
|
|
440
|
+
menu(): CngxMenuHost | undefined;
|
|
441
|
+
/** @internal `CngxMenuSubmenuWiring` - the popover facade the brain drives,
|
|
442
|
+
* or `undefined` while no `[submenu]` is bound so the brain stays inert. */
|
|
443
|
+
popover(): CngxMenuSubmenuPopoverRef | undefined;
|
|
444
|
+
private openSubmenu;
|
|
445
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxContextMenuItem, never>;
|
|
446
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxContextMenuItem, "cngx-context-menu-item, button[cngxContextMenuItem]", ["cngxContextMenuItem"], { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "kbd": { "alias": "kbd"; "required": false; "isSignal": true; }; "submenu": { "alias": "submenu"; "required": false; "isSignal": true; }; }, { "select": "select"; }, ["projectedIcon"], ["[cngxMenuItemIcon]", "*"], true, [{ directive: typeof i1$1.CngxMenuItem; inputs: { "disabled": "disabled"; "value": "value"; }; outputs: {}; }, { directive: typeof i1$1.CngxMenuItemSubmenu; inputs: {}; outputs: {}; }]>;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Non-interactive separator between context-menu item groups. Thin shell over
|
|
451
|
+
* `CngxMenuSeparator` (`role="separator"`, `aria-orientation="horizontal"`),
|
|
452
|
+
* skipped by active-descendant navigation and typeahead. Dual selector: use as
|
|
453
|
+
* an element or as an attribute on a native `<hr>`.
|
|
454
|
+
*
|
|
455
|
+
* ```html
|
|
456
|
+
* <cngx-context-menu-divider />
|
|
457
|
+
* <hr cngxContextMenuDivider />
|
|
458
|
+
* ```
|
|
459
|
+
*
|
|
460
|
+
* <example-url>http://localhost:4200/#/ui/context-menu/basic/static-items</example-url>
|
|
461
|
+
* <example-url>http://localhost:4200/#/ui/context-menu/attribute-form/native-buttons</example-url>
|
|
462
|
+
* @category ui/context-menu
|
|
463
|
+
* @wcag AA
|
|
464
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/context-menu/context-menu-divider.component.ts
|
|
465
|
+
* @since 0.1.0
|
|
466
|
+
* @relatedTo CngxContextMenu, CngxContextMenuItem, CngxMenuSeparator
|
|
467
|
+
*/
|
|
468
|
+
declare class CngxContextMenuDivider {
|
|
469
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxContextMenuDivider, never>;
|
|
470
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxContextMenuDivider, "cngx-context-menu-divider, hr[cngxContextMenuDivider]", ["cngxContextMenuDivider"], {}, {}, never, never, true, [{ directive: typeof i1$1.CngxMenuSeparator; inputs: {}; outputs: {}; }]>;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* A checkable context-menu item (`role="menuitemcheckbox"`). Thin shell over
|
|
475
|
+
* `CngxMenuItemCheckbox`: the brain owns the role, the active-descendant
|
|
476
|
+
* registration, the toggle-on-activation semantics and the reactive
|
|
477
|
+
* `aria-checked`. `checked` is a two-way model forwarded through the host
|
|
478
|
+
* directive, so `[(checked)]` binds straight to consumer state.
|
|
479
|
+
*
|
|
480
|
+
* ```html
|
|
481
|
+
* <cngx-context-menu-item-checkbox [(checked)]="wrap">Word wrap</cngx-context-menu-item-checkbox>
|
|
482
|
+
* ```
|
|
483
|
+
*
|
|
484
|
+
* <example-url>http://localhost:4200/#/ui/context-menu/selection/checkbox-radio-items</example-url>
|
|
485
|
+
* @category ui/context-menu
|
|
486
|
+
* @wcag AA
|
|
487
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/context-menu/context-menu-item-checkbox.component.ts
|
|
488
|
+
* @since 0.1.0
|
|
489
|
+
* @relatedTo CngxContextMenu, CngxContextMenuItem, CngxContextMenuItemRadio, CngxMenuItemCheckbox
|
|
490
|
+
*/
|
|
491
|
+
declare class CngxContextMenuItemCheckbox {
|
|
492
|
+
/**
|
|
493
|
+
* Leading glyph shorthand rendered in the icon slot (decorative,
|
|
494
|
+
* `aria-hidden`). Suppressed when the consumer projects a richer
|
|
495
|
+
* `[cngxMenuItemIcon]` marker. The checked-indicator gutter renders
|
|
496
|
+
* independently of the icon, so a checked item stays visibly checked beside
|
|
497
|
+
* a custom icon.
|
|
498
|
+
*/
|
|
499
|
+
readonly icon: _angular_core.InputSignal<string | undefined>;
|
|
500
|
+
/** Keyboard-shortcut hint rendered in the kbd slot (decorative). */
|
|
501
|
+
readonly kbd: _angular_core.InputSignal<string | undefined>;
|
|
502
|
+
/**
|
|
503
|
+
* A consumer-projected `[cngxMenuItemIcon]` marker, when present. Gates the
|
|
504
|
+
* string `[icon]` shorthand off so the projected icon is the only one drawn.
|
|
505
|
+
*/
|
|
506
|
+
protected readonly projectedIcon: _angular_core.Signal<CngxMenuItemIcon | undefined>;
|
|
507
|
+
/** @internal Seeds the CSS `content` of the default checked indicator from
|
|
508
|
+
* the shared glyph const (CSS-string quoted for `content:`). */
|
|
509
|
+
protected readonly checkGlyph: string;
|
|
510
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxContextMenuItemCheckbox, never>;
|
|
511
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxContextMenuItemCheckbox, "cngx-context-menu-item-checkbox, button[cngxContextMenuItemCheckbox]", ["cngxContextMenuItemCheckbox"], { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "kbd": { "alias": "kbd"; "required": false; "isSignal": true; }; }, {}, ["projectedIcon"], ["[cngxMenuItemIcon]", "*"], true, [{ directive: typeof i1$1.CngxMenuItemCheckbox; inputs: { "disabled": "disabled"; "value": "value"; "checked": "checked"; "label": "label"; }; outputs: { "checkedChange": "checkedChange"; }; }]>;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* A radio-style context-menu item (`role="menuitemradio"`). Thin shell over
|
|
516
|
+
* `CngxMenuItemRadio`: the brain owns the role, the active-descendant
|
|
517
|
+
* registration and the reactive `aria-checked`. Mutual exclusion is scoped to
|
|
518
|
+
* the enclosing `[cngxMenuGroup]` - the group owns the selected value, the
|
|
519
|
+
* item forwards its `value`.
|
|
520
|
+
*
|
|
521
|
+
* ```html
|
|
522
|
+
* <div cngxMenuGroup label="Density" [(selectedValue)]="density">
|
|
523
|
+
* <cngx-context-menu-item-radio value="cozy">Cozy</cngx-context-menu-item-radio>
|
|
524
|
+
* <cngx-context-menu-item-radio value="compact">Compact</cngx-context-menu-item-radio>
|
|
525
|
+
* </div>
|
|
526
|
+
* ```
|
|
527
|
+
*
|
|
528
|
+
* <example-url>http://localhost:4200/#/ui/context-menu/selection/checkbox-radio-items</example-url>
|
|
529
|
+
* @category ui/context-menu
|
|
530
|
+
* @wcag AA
|
|
531
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/context-menu/context-menu-item-radio.component.ts
|
|
532
|
+
* @since 0.1.0
|
|
533
|
+
* @relatedTo CngxContextMenu, CngxContextMenuItem, CngxContextMenuItemCheckbox, CngxMenuItemRadio, CngxMenuGroup
|
|
534
|
+
*/
|
|
535
|
+
declare class CngxContextMenuItemRadio {
|
|
536
|
+
/**
|
|
537
|
+
* Leading glyph shorthand rendered in the icon slot (decorative,
|
|
538
|
+
* `aria-hidden`). Suppressed when the consumer projects a richer
|
|
539
|
+
* `[cngxMenuItemIcon]` marker. The checked-indicator gutter renders
|
|
540
|
+
* independently of the icon, so a checked item stays visibly checked beside
|
|
541
|
+
* a custom icon.
|
|
542
|
+
*/
|
|
543
|
+
readonly icon: _angular_core.InputSignal<string | undefined>;
|
|
544
|
+
/** Keyboard-shortcut hint rendered in the kbd slot (decorative). */
|
|
545
|
+
readonly kbd: _angular_core.InputSignal<string | undefined>;
|
|
546
|
+
/**
|
|
547
|
+
* A consumer-projected `[cngxMenuItemIcon]` marker, when present. Gates the
|
|
548
|
+
* string `[icon]` shorthand off so the projected icon is the only one drawn.
|
|
549
|
+
*/
|
|
550
|
+
protected readonly projectedIcon: _angular_core.Signal<CngxMenuItemIcon | undefined>;
|
|
551
|
+
/** @internal Seeds the CSS `content` of the default checked indicator from
|
|
552
|
+
* the shared glyph const (CSS-string quoted for `content:`). */
|
|
553
|
+
protected readonly checkGlyph: string;
|
|
554
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxContextMenuItemRadio, never>;
|
|
555
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxContextMenuItemRadio, "cngx-context-menu-item-radio, button[cngxContextMenuItemRadio]", ["cngxContextMenuItemRadio"], { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "kbd": { "alias": "kbd"; "required": false; "isSignal": true; }; }, {}, ["projectedIcon"], ["[cngxMenuItemIcon]", "*"], true, [{ directive: typeof i1$1.CngxMenuItemRadio; inputs: { "disabled": "disabled"; "value": "value"; "label": "label"; }; outputs: {}; }]>;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
export { CNGX_CONTEXT_MENU_PANEL, CngxContextMenu, CngxContextMenuContent, CngxContextMenuDivider, CngxContextMenuFor, CngxContextMenuItem, CngxContextMenuItemCheckbox, CngxContextMenuItemRadio };
|
|
559
|
+
export type { CngxContextMenuContentContext, CngxContextMenuPanel };
|