@radix-ng/primitives 1.0.10 → 1.1.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/README.md +26 -5
- package/fesm2022/radix-ng-primitives-autocomplete.mjs +88 -21
- package/fesm2022/radix-ng-primitives-autocomplete.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-checkbox.mjs +199 -129
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-combobox.mjs +203 -52
- package/fesm2022/radix-ng-primitives-combobox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-composite.mjs +221 -36
- package/fesm2022/radix-ng-primitives-composite.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-core.mjs +352 -24
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-date-field.mjs +11 -5
- package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-field.mjs +127 -23
- package/fesm2022/radix-ng-primitives-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-form.mjs +35 -4
- package/fesm2022/radix-ng-primitives-form.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-input.mjs +87 -15
- package/fesm2022/radix-ng-primitives-input.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menu.mjs +34 -7
- package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-number-field.mjs +38 -7
- package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popper.mjs +80 -11
- package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +49 -2
- package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-scroll-area.mjs +6 -3
- package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-select.mjs +70 -14
- package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-signal-forms.mjs +27 -11
- package/fesm2022/radix-ng-primitives-signal-forms.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-slider.mjs +17 -2
- package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +60 -7
- package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-time-field.mjs +12 -6
- package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +25 -3
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/package.json +8 -3
- package/types/radix-ng-primitives-autocomplete.d.ts +16 -2
- package/types/radix-ng-primitives-checkbox.d.ts +66 -44
- package/types/radix-ng-primitives-combobox.d.ts +74 -3
- package/types/radix-ng-primitives-composite.d.ts +48 -2
- package/types/radix-ng-primitives-core.d.ts +212 -96
- package/types/radix-ng-primitives-date-field.d.ts +7 -4
- package/types/radix-ng-primitives-field.d.ts +55 -8
- package/types/radix-ng-primitives-form.d.ts +9 -0
- package/types/radix-ng-primitives-input.d.ts +10 -2
- package/types/radix-ng-primitives-menu.d.ts +45 -4
- package/types/radix-ng-primitives-navigation-menu.d.ts +2 -2
- package/types/radix-ng-primitives-number-field.d.ts +12 -5
- package/types/radix-ng-primitives-popover.d.ts +2 -2
- package/types/radix-ng-primitives-popper.d.ts +60 -15
- package/types/radix-ng-primitives-preview-card.d.ts +2 -2
- package/types/radix-ng-primitives-radio.d.ts +6 -1
- package/types/radix-ng-primitives-select.d.ts +25 -4
- package/types/radix-ng-primitives-signal-forms.d.ts +22 -8
- package/types/radix-ng-primitives-slider.d.ts +2 -1
- package/types/radix-ng-primitives-switch.d.ts +19 -3
- package/types/radix-ng-primitives-time-field.d.ts +9 -6
- package/types/radix-ng-primitives-toggle-group.d.ts +5 -1
- package/types/radix-ng-primitives-tooltip.d.ts +2 -2
|
@@ -24,6 +24,7 @@ interface RdxInputValueChangeEvent {
|
|
|
24
24
|
declare class RdxInputDirective implements RdxFormValueControl<RdxInputValue | undefined> {
|
|
25
25
|
private readonly element;
|
|
26
26
|
private readonly fieldRootContext;
|
|
27
|
+
private readonly ngControlState;
|
|
27
28
|
private initialValue;
|
|
28
29
|
private defaultValueApplied;
|
|
29
30
|
private readonly filledValue;
|
|
@@ -78,6 +79,8 @@ declare class RdxInputDirective implements RdxFormValueControl<RdxInputValue | u
|
|
|
78
79
|
* @group Props
|
|
79
80
|
*/
|
|
80
81
|
readonly invalid: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
82
|
+
/** Whether async validation is pending. Pending inputs publish neither valid nor invalid state. */
|
|
83
|
+
readonly pending: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
81
84
|
/**
|
|
82
85
|
* Whether the input has been touched. A two-way model: the input sets it on
|
|
83
86
|
* blur (emitting `touchedChange`, which Signal Forms' `[formField]` listens
|
|
@@ -133,8 +136,11 @@ declare class RdxInputDirective implements RdxFormValueControl<RdxInputValue | u
|
|
|
133
136
|
* @group Emits
|
|
134
137
|
*/
|
|
135
138
|
readonly touch: _angular_core.OutputEmitterRef<void>;
|
|
136
|
-
/**
|
|
139
|
+
/** Validation errors from the input and a same-host Reactive/template-driven form control. */
|
|
140
|
+
readonly validationErrors: _angular_core.Signal<readonly RdxValidationError[]>;
|
|
141
|
+
/** The input's binary invalidity, including a same-host Reactive/template-driven form control. */
|
|
137
142
|
private readonly ownInvalid;
|
|
143
|
+
private readonly pendingState;
|
|
138
144
|
/**
|
|
139
145
|
* Tri-state *displayed* validity: inside a `rdxFieldRoot` the field's gated `validState` is the single
|
|
140
146
|
* source (so a field whose `validationMode` defers display (e.g. `onBlur`) keeps the input neutral until revealed), otherwise
|
|
@@ -153,11 +159,13 @@ declare class RdxInputDirective implements RdxFormValueControl<RdxInputValue | u
|
|
|
153
159
|
onFocus(): void;
|
|
154
160
|
onBlur(): void;
|
|
155
161
|
onInput(event: Event): void;
|
|
162
|
+
/** Reset the interaction baseline; Angular Signal Forms calls this from `FieldState.reset()`. */
|
|
163
|
+
reset(): void;
|
|
156
164
|
syncFieldState(): void;
|
|
157
165
|
private writeValue;
|
|
158
166
|
protected readonly dataAttr: (value: boolean) => "" | undefined;
|
|
159
167
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxInputDirective, never>;
|
|
160
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxInputDirective, "input[rdxInput]", ["rdxInput"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "dirty": { "alias": "dirty"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "minLength": { "alias": "minLength"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "pattern": { "alias": "pattern"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touched": "touchedChange"; "onValueChange": "onValueChange"; "touch": "touch"; }, never, never, true, never>;
|
|
168
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxInputDirective, "input[rdxInput]", ["rdxInput"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "pending": { "alias": "pending"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "dirty": { "alias": "dirty"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "minLength": { "alias": "minLength"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "pattern": { "alias": "pattern"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touched": "touchedChange"; "onValueChange": "onValueChange"; "touch": "touch"; }, never, never, true, never>;
|
|
161
169
|
}
|
|
162
170
|
|
|
163
171
|
export { RdxInputDirective };
|
|
@@ -11,6 +11,29 @@ import * as i1$1 from '@radix-ng/primitives/composite';
|
|
|
11
11
|
import * as i1$2 from '@radix-ng/primitives/portal';
|
|
12
12
|
import { RdxOutsidePressDomEvent } from '@radix-ng/primitives/dismissable-layer';
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Submenu "safe polygon" — a faithful port of Floating UI's `safePolygon` algorithm
|
|
16
|
+
* (https://floating-ui.com/docs/useHover#safepolygon), adapted to this library.
|
|
17
|
+
*
|
|
18
|
+
* While a submenu is open by hover, the parent submenu owns the decision to close itself: a
|
|
19
|
+
* document-level `mousemove` handler keeps it open as long as the cursor is heading toward the
|
|
20
|
+
* popup inside a safe quadrilateral (built from the cursor's exit point and the popup rect), and
|
|
21
|
+
* closes it once the cursor leaves that area. Combined with the pointer-events "tunnel" below
|
|
22
|
+
* (`applyPointerTunnel`), siblings cannot steal the open submenu during a diagonal traversal.
|
|
23
|
+
*
|
|
24
|
+
* Differences from the upstream implementation:
|
|
25
|
+
* - `elements.domReference` / `elements.floating` → `reference` / `floating` (plain elements).
|
|
26
|
+
* - `placement.split('-')[0]` → the `side` option (read live from the popup's `data-side`).
|
|
27
|
+
* - the Floating UI tree (`tree` / `nodeId`) → the `hasOpenChild` callback, backed by the
|
|
28
|
+
* module-level open-submenu registry.
|
|
29
|
+
*
|
|
30
|
+
* This deliberately does NOT reuse the core `useGraceArea` composable (tooltip / navigation-menu /
|
|
31
|
+
* popover): that one is a simpler convex-hull grace area with no velocity gating, trough handling, or
|
|
32
|
+
* pointer-events tunnel — none of which it needs, but all of which the submenu does to match Base UI
|
|
33
|
+
* and to stop sibling triggers from stealing the open submenu mid-traversal.
|
|
34
|
+
*/
|
|
35
|
+
type MenuSide = 'top' | 'bottom' | 'left' | 'right';
|
|
36
|
+
|
|
14
37
|
type RdxMenuTransitionStatus = 'starting' | 'ending' | undefined;
|
|
15
38
|
/**
|
|
16
39
|
* Why an open/close happened instantly (no transition). Mirrors Base UI's menu `data-instant`:
|
|
@@ -81,6 +104,12 @@ interface RdxMenuRootContext {
|
|
|
81
104
|
trigger: Signal<HTMLElement | undefined>;
|
|
82
105
|
/** The popup element, once mounted. Used by submenu safe-polygon geometry. */
|
|
83
106
|
popupElement: Signal<HTMLElement | undefined>;
|
|
107
|
+
/**
|
|
108
|
+
* The popup's **physical** placed side (`top`/`bottom`/`left`/`right`) for safe-polygon geometry —
|
|
109
|
+
* never the popup's `data-side`, which is the logical `inline-start`/`inline-end` echo when a logical
|
|
110
|
+
* side was requested and which the geometry cannot interpret.
|
|
111
|
+
*/
|
|
112
|
+
popupPhysicalSide: Signal<MenuSide | undefined>;
|
|
84
113
|
beforeContentFocusGuard: Signal<HTMLElement | null>;
|
|
85
114
|
transitionStatus: Signal<RdxMenuTransitionStatus>;
|
|
86
115
|
close: (reason?: RdxMenuOpenChangeReason, event?: Event) => void;
|
|
@@ -92,7 +121,7 @@ interface RdxMenuRootContext {
|
|
|
92
121
|
/** Open the menu without moving focus into the popup (used for menubar hover-switching). */
|
|
93
122
|
showWithoutAutoFocus: (reason?: RdxMenuOpenChangeReason, event?: Event) => void;
|
|
94
123
|
registerTrigger: (el: HTMLElement) => () => void;
|
|
95
|
-
registerPopup: (el: HTMLElement) => () => void;
|
|
124
|
+
registerPopup: (el: HTMLElement, physicalSide?: Signal<MenuSide | undefined>) => () => void;
|
|
96
125
|
setBeforeContentFocusGuard: (element: HTMLElement | null) => void;
|
|
97
126
|
registerTransitionElement: (element: HTMLElement) => () => void;
|
|
98
127
|
registerPopupArrowNavigationHandler: (handler: (offset: 1 | -1) => boolean) => () => void;
|
|
@@ -195,6 +224,9 @@ declare class RdxMenuRoot {
|
|
|
195
224
|
readonly onOpenChangeComplete: _angular_core.OutputEmitterRef<boolean>;
|
|
196
225
|
readonly trigger: _angular_core.WritableSignal<HTMLElement | undefined>;
|
|
197
226
|
readonly popupElement: _angular_core.WritableSignal<HTMLElement | undefined>;
|
|
227
|
+
private readonly popupPhysicalSideSource;
|
|
228
|
+
/** Physical placed side read through the popup's own signal (undefined until the popup is placed). */
|
|
229
|
+
readonly popupPhysicalSide: Signal<MenuSide | undefined>;
|
|
198
230
|
readonly beforeContentFocusGuard: _angular_core.WritableSignal<HTMLElement | null>;
|
|
199
231
|
readonly transitionStatus: Signal<_radix_ng_primitives_core.RdxTransitionStatus>;
|
|
200
232
|
readonly activeIndex: _angular_core.WritableSignal<number | null>;
|
|
@@ -239,7 +271,7 @@ declare class RdxMenuRoot {
|
|
|
239
271
|
*/
|
|
240
272
|
closeEntireMenu(reason?: RdxMenuOpenChangeReason, event?: Event): void;
|
|
241
273
|
registerTrigger(el: HTMLElement): () => void;
|
|
242
|
-
registerPopup(el: HTMLElement): () => void;
|
|
274
|
+
registerPopup(el: HTMLElement, physicalSide?: Signal<MenuSide | undefined>): () => void;
|
|
243
275
|
setBeforeContentFocusGuard(element: HTMLElement | null): void;
|
|
244
276
|
registerTransitionElement(element: HTMLElement): () => void;
|
|
245
277
|
registerPopupArrowNavigationHandler(handler: (offset: 1 | -1) => boolean): () => void;
|
|
@@ -359,6 +391,15 @@ declare class RdxMenuSubTrigger {
|
|
|
359
391
|
protected onArrowLeft(event: Event): void;
|
|
360
392
|
protected onPointerMove(event: PointerEvent): void;
|
|
361
393
|
protected onPointerLeave(): void;
|
|
394
|
+
/**
|
|
395
|
+
* Backup cancellation for a `pointerleave` that Chrome can drop during a fast pointer sweep across
|
|
396
|
+
* adjacent triggers, which would otherwise leave the delayed hover-open armed and open a stale
|
|
397
|
+
* submenu for a trigger the pointer has already left (stranding the parent at `pointer-events: none`).
|
|
398
|
+
* `pointerout` bubbles, so it also fires while crossing between the trigger's own descendants — those
|
|
399
|
+
* (where `relatedTarget` is still inside the trigger) must not cancel the pending open. Base UI parity
|
|
400
|
+
* (`guardStaleOpen`); safe on this single, hover-driven trigger.
|
|
401
|
+
*/
|
|
402
|
+
protected onPointerOut(event: PointerEvent): void;
|
|
362
403
|
protected clearHighlight(): void;
|
|
363
404
|
private closeSiblingSubmenus;
|
|
364
405
|
private clearSiblingHighlights;
|
|
@@ -433,7 +474,7 @@ declare class RdxMenuPopup {
|
|
|
433
474
|
private search;
|
|
434
475
|
private searchTimer;
|
|
435
476
|
protected readonly align: _angular_core.Signal<"center" | "end" | "start" | undefined>;
|
|
436
|
-
protected readonly side: _angular_core.Signal<
|
|
477
|
+
protected readonly side: _angular_core.Signal<i1.SideOrLogical | undefined>;
|
|
437
478
|
/**
|
|
438
479
|
* Event handler called when the escape key is pressed. Can be prevented.
|
|
439
480
|
*/
|
|
@@ -520,7 +561,7 @@ declare class RdxMenuBackdrop {
|
|
|
520
561
|
declare class RdxMenuArrow {
|
|
521
562
|
protected readonly rootContext: _radix_ng_primitives_menu.RdxMenuRootContext;
|
|
522
563
|
private readonly wrapper;
|
|
523
|
-
protected readonly side: _angular_core.Signal<
|
|
564
|
+
protected readonly side: _angular_core.Signal<i1.SideOrLogical | undefined>;
|
|
524
565
|
protected readonly align: _angular_core.Signal<"center" | "end" | "start" | undefined>;
|
|
525
566
|
protected readonly uncentered: _angular_core.Signal<boolean>;
|
|
526
567
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuArrow, never>;
|
|
@@ -383,7 +383,7 @@ declare class RdxNavigationMenuPopup {
|
|
|
383
383
|
private readonly registration;
|
|
384
384
|
private readonly wrapper;
|
|
385
385
|
private readonly elementRef;
|
|
386
|
-
protected readonly side: _angular_core.Signal<
|
|
386
|
+
protected readonly side: _angular_core.Signal<i1$1.SideOrLogical | undefined>;
|
|
387
387
|
protected readonly align: _angular_core.Signal<"start" | "center" | "end" | undefined>;
|
|
388
388
|
protected readonly id: _angular_core.Signal<string>;
|
|
389
389
|
/**
|
|
@@ -420,7 +420,7 @@ declare class RdxNavigationMenuPopup {
|
|
|
420
420
|
declare class RdxNavigationMenuArrow {
|
|
421
421
|
protected readonly rootContext: _radix_ng_primitives_navigation_menu.RdxNavigationMenuRootContext;
|
|
422
422
|
private readonly wrapper;
|
|
423
|
-
protected readonly side: _angular_core.Signal<
|
|
423
|
+
protected readonly side: _angular_core.Signal<i1$1.SideOrLogical | undefined>;
|
|
424
424
|
protected readonly align: _angular_core.Signal<"start" | "center" | "end" | undefined>;
|
|
425
425
|
protected readonly uncentered: _angular_core.Signal<boolean>;
|
|
426
426
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxNavigationMenuArrow, never>;
|
|
@@ -106,9 +106,9 @@ declare class RdxNumberFieldRoot extends RdxFormUiControlBase implements RdxForm
|
|
|
106
106
|
* @default false
|
|
107
107
|
*/
|
|
108
108
|
readonly required: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
109
|
-
/** Name
|
|
109
|
+
/** Name used when serializing this field into native `FormData`. */
|
|
110
110
|
readonly name: _angular_core.InputSignal<string | undefined>;
|
|
111
|
-
/** Id of
|
|
111
|
+
/** Id of an external form that owns this field. */
|
|
112
112
|
readonly form: _angular_core.InputSignal<string | undefined>;
|
|
113
113
|
/** The uncontrolled value of the field when it is initially rendered. */
|
|
114
114
|
readonly defaultValue: _angular_core.InputSignal<number | undefined>;
|
|
@@ -127,6 +127,8 @@ declare class RdxNumberFieldRoot extends RdxFormUiControlBase implements RdxForm
|
|
|
127
127
|
readonly isScrubbing: _angular_core.WritableSignal<boolean>;
|
|
128
128
|
/** @ignore The native input element, registered by `[rdxNumberFieldInput]`. */
|
|
129
129
|
readonly inputEl: _angular_core.WritableSignal<HTMLInputElement | undefined>;
|
|
130
|
+
/** @ignore Optional native number input that owns constraints/autofill and form serialization. */
|
|
131
|
+
readonly nativeInputEl: _angular_core.WritableSignal<HTMLInputElement | null>;
|
|
130
132
|
/**
|
|
131
133
|
* @ignore Gate that prevents the formatted value from overwriting in-progress typing.
|
|
132
134
|
* Plain field (not a signal): it is toggled imperatively inside event handlers.
|
|
@@ -148,6 +150,7 @@ declare class RdxNumberFieldRoot extends RdxFormUiControlBase implements RdxForm
|
|
|
148
150
|
private readonly parser;
|
|
149
151
|
/** @ignore The current numeric value (`null` when empty). */
|
|
150
152
|
readonly currentValue: _angular_core.Signal<number | null>;
|
|
153
|
+
private readonly nativeFormControl;
|
|
151
154
|
/** @ignore */
|
|
152
155
|
readonly minWithDefault: _angular_core.Signal<number>;
|
|
153
156
|
/** @ignore */
|
|
@@ -174,6 +177,8 @@ declare class RdxNumberFieldRoot extends RdxFormUiControlBase implements RdxForm
|
|
|
174
177
|
}): number;
|
|
175
178
|
/** @ignore Registers the native input element. */
|
|
176
179
|
registerInput(el: HTMLInputElement): void;
|
|
180
|
+
/** @ignore Registers the optional native constraint/autofill input. */
|
|
181
|
+
registerNativeInput(el: HTMLInputElement | null): void;
|
|
177
182
|
/** @ignore Sets the displayed text without changing the numeric value. */
|
|
178
183
|
setInputValue(text: string): void;
|
|
179
184
|
/**
|
|
@@ -241,14 +246,16 @@ declare class RdxNumberFieldInput {
|
|
|
241
246
|
}
|
|
242
247
|
|
|
243
248
|
/**
|
|
244
|
-
* The hidden native `input[type=number]` that mirrors the field value for
|
|
245
|
-
*
|
|
246
|
-
* the visible
|
|
249
|
+
* The optional hidden native `input[type=number]` that mirrors the field value for browser constraint
|
|
250
|
+
* validation (min/max/step/required) and autofill. When present it also owns native form serialization;
|
|
251
|
+
* without it the root generates a plain hidden entry. Place it inside the root, alongside the visible
|
|
252
|
+
* `[rdxNumberFieldInput]`.
|
|
247
253
|
*
|
|
248
254
|
* @see https://base-ui.com/react/components/number-field
|
|
249
255
|
*/
|
|
250
256
|
declare class RdxNumberFieldHiddenInput {
|
|
251
257
|
protected readonly rootContext: _radix_ng_primitives_number_field.RdxNumberFieldRoot;
|
|
258
|
+
constructor();
|
|
252
259
|
/** Move focus to the visible input when the hidden one is focused (e.g. via form validation). */
|
|
253
260
|
onFocus(): void;
|
|
254
261
|
/** Handle browser autofill, which writes directly to the hidden numeric input. */
|
|
@@ -304,7 +304,7 @@ declare class RdxPopoverPopup {
|
|
|
304
304
|
private readonly focusScope;
|
|
305
305
|
private readonly wrapper;
|
|
306
306
|
protected readonly align: _angular_core.Signal<"start" | "center" | "end" | undefined>;
|
|
307
|
-
protected readonly side: _angular_core.Signal<
|
|
307
|
+
protected readonly side: _angular_core.Signal<i1$1.SideOrLogical | undefined>;
|
|
308
308
|
/** Event handler called when the escape key is down. Can be prevented. */
|
|
309
309
|
readonly escapeKeyDown: _angular_core.OutputEmitterRef<KeyboardEvent>;
|
|
310
310
|
/** Event handler called when a pointerdown event happens outside of the popup. Can be prevented. */
|
|
@@ -328,7 +328,7 @@ declare class RdxPopoverPopup {
|
|
|
328
328
|
declare class RdxPopoverArrow {
|
|
329
329
|
protected readonly rootContext: _radix_ng_primitives_popover.RdxPopoverRootContext;
|
|
330
330
|
private readonly wrapper;
|
|
331
|
-
protected readonly side: _angular_core.Signal<
|
|
331
|
+
protected readonly side: _angular_core.Signal<i1$1.SideOrLogical | undefined>;
|
|
332
332
|
protected readonly align: _angular_core.Signal<"start" | "center" | "end" | undefined>;
|
|
333
333
|
protected readonly uncentered: _angular_core.Signal<boolean>;
|
|
334
334
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxPopoverArrow, never>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { ElementRef, Signal, Provider, Type, InjectionToken } from '@angular/core';
|
|
3
3
|
import { ReferenceElement, Placement, Middleware, VirtualElement } from '@floating-ui/dom';
|
|
4
|
+
import * as _radix_ng_primitives_popper from '@radix-ng/primitives/popper';
|
|
4
5
|
import * as _radix_ng_primitives_core from '@radix-ng/primitives/core';
|
|
5
|
-
import { NumberInput, BooleanInput } from '@radix-ng/primitives/core';
|
|
6
|
+
import { Direction, NumberInput, BooleanInput } from '@radix-ng/primitives/core';
|
|
6
7
|
|
|
7
8
|
declare class RdxPopperAnchor {
|
|
8
9
|
readonly elementRef: ElementRef<HTMLElement>;
|
|
@@ -25,7 +26,8 @@ declare class RdxPopperContent {
|
|
|
25
26
|
* simply no-op.
|
|
26
27
|
*/
|
|
27
28
|
protected readonly popperContentWrapper: {
|
|
28
|
-
placedSide: _angular_core.Signal<
|
|
29
|
+
placedSide: _angular_core.Signal<_radix_ng_primitives_popper.SideOrLogical | undefined>;
|
|
30
|
+
physicalPlacedSide: _angular_core.Signal<"top" | "right" | "bottom" | "left" | undefined>;
|
|
29
31
|
placedAlign: _angular_core.Signal<"start" | "center" | "end" | undefined>;
|
|
30
32
|
arrowX: _angular_core.Signal<number | undefined>;
|
|
31
33
|
arrowY: _angular_core.Signal<number | undefined>;
|
|
@@ -48,6 +50,23 @@ declare const SIDE_OPTIONS: readonly ["top", "right", "bottom", "left"];
|
|
|
48
50
|
declare const ALIGN_OPTIONS: readonly ["start", "center", "end"];
|
|
49
51
|
type Side = (typeof SIDE_OPTIONS)[number];
|
|
50
52
|
type Align = (typeof ALIGN_OPTIONS)[number];
|
|
53
|
+
/** Logical (writing-direction-relative) inline sides, resolved to a physical {@link Side} by text direction. */
|
|
54
|
+
type LogicalSide = 'inline-start' | 'inline-end';
|
|
55
|
+
/** A physical {@link Side} or a {@link LogicalSide} — accepted by the positioner's `side` input. */
|
|
56
|
+
type SideOrLogical = Side | LogicalSide;
|
|
57
|
+
/**
|
|
58
|
+
* Resolve a logical inline side to a physical one for the current text direction; physical sides pass
|
|
59
|
+
* through unchanged (Base UI `useAnchorPositioning`). `inline-start` is the reading-start edge
|
|
60
|
+
* (`left` in LTR, `right` in RTL); `inline-end` is the reading-end edge.
|
|
61
|
+
*/
|
|
62
|
+
declare function resolvePhysicalSide(side: SideOrLogical, isRtl: boolean): Side;
|
|
63
|
+
/**
|
|
64
|
+
* Report a rendered physical side back in the same "kind" the consumer requested (Base UI
|
|
65
|
+
* `getLogicalSide`): when a logical side was requested, a `left`/`right` rendered side is mapped back
|
|
66
|
+
* to `inline-start`/`inline-end` for the direction (so a post-collision flip surfaces logically); a
|
|
67
|
+
* physical request, or a `top`/`bottom` rendered side, passes through unchanged.
|
|
68
|
+
*/
|
|
69
|
+
declare function toLogicalSide(requestedSide: SideOrLogical, renderedSide: Side, isRtl: boolean): SideOrLogical;
|
|
51
70
|
/**
|
|
52
71
|
* How the popper avoids collisions with the boundary edges (Base UI `collisionAvoidance`).
|
|
53
72
|
*
|
|
@@ -72,11 +91,12 @@ type ResolvedCollisionAvoidance = Required<RdxCollisionAvoidance>;
|
|
|
72
91
|
/**
|
|
73
92
|
* Function form of `sideOffset` / `alignOffset` (Base UI `OffsetFunction`). Receives the resolved
|
|
74
93
|
* placement and the measured anchor / positioner dimensions, and returns the offset in pixels — e.g.
|
|
75
|
-
* `({ anchor }) => anchor.width` to offset by the trigger's own width. `side` is the
|
|
76
|
-
*
|
|
94
|
+
* `({ anchor }) => anchor.width` to offset by the trigger's own width. `side` is the side the popup is
|
|
95
|
+
* placed against — reported logically (`inline-start` / `inline-end`) when a logical side was
|
|
96
|
+
* requested, otherwise physical (Base UI parity).
|
|
77
97
|
*/
|
|
78
98
|
type OffsetFunction = (data: {
|
|
79
|
-
side:
|
|
99
|
+
side: SideOrLogical;
|
|
80
100
|
align: Align;
|
|
81
101
|
anchor: {
|
|
82
102
|
width: number;
|
|
@@ -96,7 +116,8 @@ declare function getSideAndAlignFromPlacement(placement: Placement): readonly ["
|
|
|
96
116
|
|
|
97
117
|
type RdxPopperAnchorElement = Element | ElementRef<Element> | VirtualElement | (() => Element | VirtualElement | null) | null | undefined;
|
|
98
118
|
declare const context: () => {
|
|
99
|
-
placedSide: Signal<
|
|
119
|
+
placedSide: Signal<SideOrLogical | undefined>;
|
|
120
|
+
physicalPlacedSide: Signal<"top" | "right" | "bottom" | "left" | undefined>;
|
|
100
121
|
placedAlign: Signal<"start" | "center" | "end" | undefined>;
|
|
101
122
|
arrowX: Signal<number | undefined>;
|
|
102
123
|
arrowY: Signal<number | undefined>;
|
|
@@ -106,7 +127,8 @@ declare const context: () => {
|
|
|
106
127
|
};
|
|
107
128
|
type PopperContentWrapperContext = ReturnType<typeof context>;
|
|
108
129
|
declare const injectPopperContentWrapperContext: _radix_ng_primitives_core.InjectContext<{
|
|
109
|
-
placedSide: Signal<
|
|
130
|
+
placedSide: Signal<SideOrLogical | undefined>;
|
|
131
|
+
physicalPlacedSide: Signal<"top" | "right" | "bottom" | "left" | undefined>;
|
|
110
132
|
placedAlign: Signal<"start" | "center" | "end" | undefined>;
|
|
111
133
|
arrowX: Signal<number | undefined>;
|
|
112
134
|
arrowY: Signal<number | undefined>;
|
|
@@ -115,7 +137,8 @@ declare const injectPopperContentWrapperContext: _radix_ng_primitives_core.Injec
|
|
|
115
137
|
anchorHidden: Signal<boolean>;
|
|
116
138
|
}>;
|
|
117
139
|
declare const providePopperContentWrapperContext: (useFactory: () => {
|
|
118
|
-
placedSide: Signal<
|
|
140
|
+
placedSide: Signal<SideOrLogical | undefined>;
|
|
141
|
+
physicalPlacedSide: Signal<"top" | "right" | "bottom" | "left" | undefined>;
|
|
119
142
|
placedAlign: Signal<"start" | "center" | "end" | undefined>;
|
|
120
143
|
arrowX: Signal<number | undefined>;
|
|
121
144
|
arrowY: Signal<number | undefined>;
|
|
@@ -136,8 +159,21 @@ declare class RdxPopperContentWrapper {
|
|
|
136
159
|
/**
|
|
137
160
|
* The preferred side of the anchor to render against when open.
|
|
138
161
|
* Will be reversed when collisions occur and avoidCollisions is enabled.
|
|
162
|
+
*
|
|
163
|
+
* Accepts the logical `'inline-start'` / `'inline-end'` in addition to the physical sides; those
|
|
164
|
+
* resolve to `left` / `right` for the text direction (Base UI parity). The placed side reported via
|
|
165
|
+
* `data-side` / `placedSide()` echoes the requested kind: logical in → logical out (even after a
|
|
166
|
+
* collision flip), physical in → physical out.
|
|
139
167
|
*/
|
|
140
|
-
readonly side: _angular_core.InputSignal<
|
|
168
|
+
readonly side: _angular_core.InputSignal<SideOrLogical>;
|
|
169
|
+
/**
|
|
170
|
+
* Text direction, used only to resolve a logical `side` (`inline-start` / `inline-end`) to a
|
|
171
|
+
* physical one. Falls back to an enclosing direction provider, then `ltr`.
|
|
172
|
+
*/
|
|
173
|
+
readonly dir: _angular_core.InputSignal<Direction | undefined>;
|
|
174
|
+
private readonly direction;
|
|
175
|
+
/** The `side` input with any logical inline value resolved to a physical side for the direction. */
|
|
176
|
+
private readonly resolvedSide;
|
|
141
177
|
/**
|
|
142
178
|
* Distance between the anchor and the popup in pixels. Also accepts an {@link OffsetFunction} that
|
|
143
179
|
* reads the anchor / positioner dimensions and the resolved side / align.
|
|
@@ -253,9 +289,18 @@ declare class RdxPopperContentWrapper {
|
|
|
253
289
|
align: Align;
|
|
254
290
|
} | undefined>;
|
|
255
291
|
/**
|
|
256
|
-
* The side the panel is currently placed against.
|
|
292
|
+
* The physical side the panel is currently placed against. Internal geometry (arrow position,
|
|
293
|
+
* transform origins) must use this — never {@link placedSide}, which can be logical.
|
|
294
|
+
*/
|
|
295
|
+
readonly physicalPlacedSide: Signal<"top" | "right" | "bottom" | "left" | undefined>;
|
|
296
|
+
/**
|
|
297
|
+
* The side the panel is currently placed against, reported in the kind the consumer requested
|
|
298
|
+
* (Base UI positioner `side`): when a logical `side` was passed, a placed `left`/`right` maps back
|
|
299
|
+
* to `inline-start`/`inline-end` for the direction — so a post-collision flip stays logical and
|
|
300
|
+
* `[data-side="inline-start"]` CSS is direction-agnostic. A physical request is always reported
|
|
301
|
+
* physically.
|
|
257
302
|
*/
|
|
258
|
-
readonly placedSide: Signal<
|
|
303
|
+
readonly placedSide: Signal<SideOrLogical | undefined>;
|
|
259
304
|
/**
|
|
260
305
|
* The current alignment of the panel.
|
|
261
306
|
*/
|
|
@@ -292,7 +337,7 @@ declare class RdxPopperContentWrapper {
|
|
|
292
337
|
private readonly afterRenderEffect;
|
|
293
338
|
constructor();
|
|
294
339
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxPopperContentWrapper, never>;
|
|
295
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxPopperContentWrapper, "[rdxPopperContentWrapper]", never, { "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; }; "collisionAvoidance": { "alias": "collisionAvoidance"; "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"; }, ["arrow"], never, true, never>;
|
|
340
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxPopperContentWrapper, "[rdxPopperContentWrapper]", never, { "anchor": { "alias": "anchor"; "required": false; "isSignal": true; }; "side": { "alias": "side"; "required": false; "isSignal": true; }; "dir": { "alias": "dir"; "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; }; "collisionAvoidance": { "alias": "collisionAvoidance"; "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"; }, ["arrow"], never, true, never>;
|
|
296
341
|
}
|
|
297
342
|
/**
|
|
298
343
|
* Providers a "thin" positioner that `extends RdxPopperContentWrapper` must include. Angular
|
|
@@ -351,7 +396,7 @@ declare class RdxPopperArrow {
|
|
|
351
396
|
* `undefined` falls back to the wrapper's built-in default. Consumer template bindings always win.
|
|
352
397
|
*/
|
|
353
398
|
interface RdxPopperContentConfig {
|
|
354
|
-
side?:
|
|
399
|
+
side?: SideOrLogical;
|
|
355
400
|
align?: Align;
|
|
356
401
|
sideOffset?: number | OffsetFunction;
|
|
357
402
|
alignOffset?: number | OffsetFunction;
|
|
@@ -390,5 +435,5 @@ declare function provideRdxPopperContentConfig(config: RdxPopperContentConfig):
|
|
|
390
435
|
|
|
391
436
|
declare const popperImports: (typeof RdxPopperAnchor | typeof RdxPopper | typeof RdxPopperContentWrapper | typeof RdxPopperContent)[];
|
|
392
437
|
|
|
393
|
-
export { DROPDOWN_COLLISION_AVOIDANCE, POPUP_COLLISION_AVOIDANCE, RdxPopper, RdxPopperAnchor, RdxPopperArrow, RdxPopperContent, RdxPopperContentConfigToken, RdxPopperContentWrapper, getSideAndAlignFromPlacement, injectPopperContentWrapperContext, isNotNull, legacyPopperVars, popperImports, providePopperContentWrapperContext, provideRdxPopperContentConfig, provideRdxPopperContentWrapper, transformOrigin };
|
|
394
|
-
export type { Align, OffsetFunction, PopperContentWrapperContext, RdxCollisionAvoidance, RdxPopperAnchorElement, RdxPopperContentConfig, ResolvedCollisionAvoidance, Side };
|
|
438
|
+
export { DROPDOWN_COLLISION_AVOIDANCE, POPUP_COLLISION_AVOIDANCE, RdxPopper, RdxPopperAnchor, RdxPopperArrow, RdxPopperContent, RdxPopperContentConfigToken, RdxPopperContentWrapper, getSideAndAlignFromPlacement, injectPopperContentWrapperContext, isNotNull, legacyPopperVars, popperImports, providePopperContentWrapperContext, provideRdxPopperContentConfig, provideRdxPopperContentWrapper, resolvePhysicalSide, toLogicalSide, transformOrigin };
|
|
439
|
+
export type { Align, LogicalSide, OffsetFunction, PopperContentWrapperContext, RdxCollisionAvoidance, RdxPopperAnchorElement, RdxPopperContentConfig, ResolvedCollisionAvoidance, Side, SideOrLogical };
|
|
@@ -268,7 +268,7 @@ declare class RdxPreviewCardPopup {
|
|
|
268
268
|
private readonly registration;
|
|
269
269
|
private readonly wrapper;
|
|
270
270
|
protected readonly align: _angular_core.Signal<"start" | "center" | "end" | undefined>;
|
|
271
|
-
protected readonly side: _angular_core.Signal<
|
|
271
|
+
protected readonly side: _angular_core.Signal<i1$1.SideOrLogical | undefined>;
|
|
272
272
|
/**
|
|
273
273
|
* Event handler called when the escape key is down. Can be prevented.
|
|
274
274
|
*/
|
|
@@ -296,7 +296,7 @@ declare class RdxPreviewCardPopup {
|
|
|
296
296
|
declare class RdxPreviewCardArrow {
|
|
297
297
|
protected readonly rootContext: _radix_ng_primitives_preview_card.RdxPreviewCardRootContext;
|
|
298
298
|
private readonly wrapper;
|
|
299
|
-
protected readonly side: _angular_core.Signal<
|
|
299
|
+
protected readonly side: _angular_core.Signal<i1$1.SideOrLogical | undefined>;
|
|
300
300
|
protected readonly align: _angular_core.Signal<"start" | "center" | "end" | undefined>;
|
|
301
301
|
protected readonly uncentered: _angular_core.Signal<boolean>;
|
|
302
302
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxPreviewCardArrow, never>;
|
|
@@ -20,6 +20,7 @@ interface RadioRootContext {
|
|
|
20
20
|
required: Signal<boolean>;
|
|
21
21
|
name: Signal<string | undefined>;
|
|
22
22
|
form: Signal<string | undefined>;
|
|
23
|
+
registerNativeInput(value: string, input: HTMLInputElement): () => void;
|
|
23
24
|
select(value: string | null, event?: Event, reason?: RdxRadioValueChangeReason): void;
|
|
24
25
|
setArrowNavigation(value: boolean): void;
|
|
25
26
|
isArrowNavigation(): boolean;
|
|
@@ -55,6 +56,8 @@ declare class RdxRadioGroupDirective extends RdxFormUiControlBase implements Con
|
|
|
55
56
|
readonly touchedState: Signal<boolean>;
|
|
56
57
|
readonly dirtyState: Signal<boolean>;
|
|
57
58
|
private readonly arrowNavigation;
|
|
59
|
+
private readonly nativeInputs;
|
|
60
|
+
private readonly selectedItemHasNativeInput;
|
|
58
61
|
private readonly itemMetadata;
|
|
59
62
|
private readonly disabledIndices;
|
|
60
63
|
private readonly activeIndex;
|
|
@@ -98,6 +101,8 @@ declare class RdxRadioGroupDirective extends RdxFormUiControlBase implements Con
|
|
|
98
101
|
setDisabledState(isDisabled: boolean): void;
|
|
99
102
|
setArrowNavigation(value: boolean): void;
|
|
100
103
|
isArrowNavigation(): boolean;
|
|
104
|
+
/** @ignore Register an optional native radio input by its item value. */
|
|
105
|
+
registerNativeInput(value: string, input: HTMLInputElement): () => void;
|
|
101
106
|
/**
|
|
102
107
|
* Marks the control touched when focus leaves the whole group (Base UI `RadioGroup` parity and the
|
|
103
108
|
* ADR 0004 CVA strategy) — moving focus between items stays inside, so `relatedTarget` is checked.
|
|
@@ -128,7 +133,7 @@ declare class RdxRadioItemInputDirective {
|
|
|
128
133
|
private readonly input;
|
|
129
134
|
readonly name: _angular_core.Signal<string | undefined>;
|
|
130
135
|
readonly form: _angular_core.Signal<string | undefined>;
|
|
131
|
-
readonly value: _angular_core.Signal<string
|
|
136
|
+
readonly value: _angular_core.Signal<string>;
|
|
132
137
|
readonly checked: _angular_core.Signal<boolean>;
|
|
133
138
|
readonly required: _angular_core.Signal<boolean>;
|
|
134
139
|
readonly disabled: _angular_core.Signal<boolean>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { Signal, ElementRef, InjectionToken, OutputRef, WritableSignal } from '@angular/core';
|
|
3
3
|
import * as _radix_ng_primitives_core from '@radix-ng/primitives/core';
|
|
4
|
-
import { AcceptableValue, RdxCancelableChangeEventDetails, RdxFormUiControlBase, RdxFormValueControl, RdxFloatingRootContext, Direction, ItemValueComparator, RdxTransitionStatus, RdxFormUiStateContext } from '@radix-ng/primitives/core';
|
|
4
|
+
import { AcceptableValue, RdxCancelableChangeEventDetails, RdxFormUiControlBase, RdxFormValueControl, RdxFloatingRootContext, Direction, ItemValueComparator, RdxTransitionStatus, RdxFormUiTouchTarget, RdxFormUiStateContext } from '@radix-ng/primitives/core';
|
|
5
5
|
import * as _radix_ng_primitives_select from '@radix-ng/primitives/select';
|
|
6
6
|
import * as i1 from '@radix-ng/primitives/composite';
|
|
7
7
|
import { RdxCompositeItemRegistration } from '@radix-ng/primitives/composite';
|
|
@@ -11,6 +11,7 @@ import { RdxPopperContentWrapper } from '@radix-ng/primitives/popper';
|
|
|
11
11
|
import * as i2 from '@radix-ng/primitives/floating-focus-manager';
|
|
12
12
|
import { RdxInteractionType } from '@radix-ng/primitives/floating-focus-manager';
|
|
13
13
|
import * as _radix_ng_primitives_types_radix_ng_primitives_core from '@radix-ng/primitives/types/radix-ng-primitives-core';
|
|
14
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
14
15
|
import * as i1$2 from '@radix-ng/primitives/portal';
|
|
15
16
|
|
|
16
17
|
declare class RdxSelectGroupLabel {
|
|
@@ -365,7 +366,7 @@ interface RdxSelectRootContext extends RdxFormUiStateContext {
|
|
|
365
366
|
}
|
|
366
367
|
declare const injectSelectRootContext: _radix_ng_primitives_core.InjectContext<RdxSelectRootContext>;
|
|
367
368
|
declare const provideSelectRootContext: (useFactory: () => RdxSelectRootContext) => _angular_core.Provider;
|
|
368
|
-
declare class RdxSelectRoot extends RdxFormUiControlBase implements RdxFormValueControl<AcceptableValue | AcceptableValue[] | undefined> {
|
|
369
|
+
declare class RdxSelectRoot extends RdxFormUiControlBase implements ControlValueAccessor, RdxFormValueControl<AcceptableValue | AcceptableValue[] | undefined> {
|
|
369
370
|
readonly contentId: string;
|
|
370
371
|
readonly open: _angular_core.ModelSignal<boolean>;
|
|
371
372
|
/** Whether the current open was initiated by **touch** (ADR 0016 §3 — gates the anchored scroll lock). */
|
|
@@ -385,10 +386,16 @@ declare class RdxSelectRoot extends RdxFormUiControlBase implements RdxFormValue
|
|
|
385
386
|
readonly defaultOpen: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
386
387
|
readonly multiple: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
387
388
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
389
|
+
private readonly cvaDisabled;
|
|
390
|
+
readonly disabledState: Signal<boolean>;
|
|
388
391
|
/** When `true`, the value cannot be changed by the user (the popup can still be opened to view it). */
|
|
389
392
|
readonly readOnly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
390
393
|
/** Marks the control as required — reflected on the trigger as `aria-required` / `data-required`. */
|
|
391
394
|
readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
395
|
+
/** Name used when serializing this composite control into native `FormData`. */
|
|
396
|
+
readonly name: _angular_core.InputSignal<string | undefined>;
|
|
397
|
+
/** Id of an external form that owns this control. */
|
|
398
|
+
readonly form: _angular_core.InputSignal<string | undefined>;
|
|
392
399
|
/** Whether the popup is modal: locks page scroll and makes outside content inert while open. */
|
|
393
400
|
readonly modal: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
394
401
|
readonly dirInput: _angular_core.InputSignal<Direction | undefined>;
|
|
@@ -397,6 +404,8 @@ declare class RdxSelectRoot extends RdxFormUiControlBase implements RdxFormValue
|
|
|
397
404
|
readonly isItemEqualToValue: _angular_core.InputSignal<ItemValueComparator<AcceptableValue> | undefined>;
|
|
398
405
|
/** Converts a value to its display label (used by `RdxSelectValue`). */
|
|
399
406
|
readonly itemToStringLabel: _angular_core.InputSignal<((value: AcceptableValue) => string) | undefined>;
|
|
407
|
+
/** Converts an item value to the string submitted by a native form. */
|
|
408
|
+
readonly itemToStringValue: _angular_core.InputSignal<((value: AcceptableValue) => string) | undefined>;
|
|
400
409
|
/** Emits before an open-state change is committed; call `eventDetails.cancel()` to veto it. */
|
|
401
410
|
readonly onOpenChange: _angular_core.OutputEmitterRef<RdxSelectOpenChangeEvent>;
|
|
402
411
|
/** Emits before a value change is committed; call `eventDetails.cancel()` to veto it. */
|
|
@@ -411,6 +420,7 @@ declare class RdxSelectRoot extends RdxFormUiControlBase implements RdxFormValue
|
|
|
411
420
|
readonly isEmptyModelValue: Signal<boolean>;
|
|
412
421
|
private hasAppliedDefaultValue;
|
|
413
422
|
private hasAppliedDefaultOpen;
|
|
423
|
+
private readonly nativeFormControl;
|
|
414
424
|
constructor();
|
|
415
425
|
readonly optionsSet: WritableSignal<Set<SelectOption>>;
|
|
416
426
|
readonly nativeSelectKey: Signal<string>;
|
|
@@ -423,8 +433,20 @@ declare class RdxSelectRoot extends RdxFormUiControlBase implements RdxFormValue
|
|
|
423
433
|
getOption(value: SelectOption['value']): SelectOption | undefined;
|
|
424
434
|
setValue(value: AcceptableValue | undefined, reason?: RdxSelectValueChangeReason, event?: Event): boolean;
|
|
425
435
|
setOpen(open: boolean, reason?: RdxSelectOpenChangeReason, event?: Event): boolean;
|
|
436
|
+
/** @ignore Bridge the CVA touched callback into the shared Signal Forms UI-state path. */
|
|
437
|
+
protected formUiTouchTarget(): RdxFormUiTouchTarget;
|
|
438
|
+
/** @ignore Write a form-owned value without emitting a user change. */
|
|
439
|
+
writeValue(value: AcceptableValue | AcceptableValue[] | undefined): void;
|
|
440
|
+
/** @ignore Register the Reactive Forms / ngModel value callback. */
|
|
441
|
+
registerOnChange(fn: (value: AcceptableValue | AcceptableValue[] | undefined) => void): void;
|
|
442
|
+
/** @ignore Register the Reactive Forms / ngModel touched callback. */
|
|
443
|
+
registerOnTouched(fn: () => void): void;
|
|
444
|
+
/** @ignore Merge form-owned disabled state with the public disabled input. */
|
|
445
|
+
setDisabledState(isDisabled: boolean): void;
|
|
446
|
+
private onChange?;
|
|
447
|
+
private onTouched?;
|
|
426
448
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxSelectRoot, never>;
|
|
427
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxSelectRoot, "[rdxSelectRoot]", ["rdxSelectRoot"], { "open": { "alias": "open"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "defaultOpen": { "alias": "defaultOpen"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "modal": { "alias": "modal"; "required": false; "isSignal": true; }; "dirInput": { "alias": "dir"; "required": false; "isSignal": true; }; "isItemEqualToValue": { "alias": "isItemEqualToValue"; "required": false; "isSignal": true; }; "itemToStringLabel": { "alias": "itemToStringLabel"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "value": "valueChange"; "onOpenChange": "onOpenChange"; "onValueChange": "onValueChange"; "onOpenChangeComplete": "onOpenChangeComplete"; }, never, never, true, [{ directive: typeof i1$1.RdxPopper; inputs: {}; outputs: {}; }]>;
|
|
449
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxSelectRoot, "[rdxSelectRoot]", ["rdxSelectRoot"], { "open": { "alias": "open"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "defaultOpen": { "alias": "defaultOpen"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "modal": { "alias": "modal"; "required": false; "isSignal": true; }; "dirInput": { "alias": "dir"; "required": false; "isSignal": true; }; "isItemEqualToValue": { "alias": "isItemEqualToValue"; "required": false; "isSignal": true; }; "itemToStringLabel": { "alias": "itemToStringLabel"; "required": false; "isSignal": true; }; "itemToStringValue": { "alias": "itemToStringValue"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "value": "valueChange"; "onOpenChange": "onOpenChange"; "onValueChange": "onValueChange"; "onOpenChangeComplete": "onOpenChangeComplete"; }, never, never, true, [{ directive: typeof i1$1.RdxPopper; inputs: {}; outputs: {}; }]>;
|
|
428
450
|
}
|
|
429
451
|
|
|
430
452
|
declare class RdxSelectScrollButtonBase {
|
|
@@ -474,7 +496,6 @@ declare class RdxSelectTrigger {
|
|
|
474
496
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
475
497
|
readonly isDisabled: _angular_core.Signal<boolean>;
|
|
476
498
|
protected readonly triggerInteraction: i2.RdxTriggerInteraction;
|
|
477
|
-
protected readonly invalidState: _angular_core.Signal<boolean>;
|
|
478
499
|
/**
|
|
479
500
|
* Tri-state *displayed* validity: when inside a `rdxFieldRoot` the field's gated `validState` is the
|
|
480
501
|
* single source (so the field's `validationMode` keeps the trigger neutral until revealed), otherwise
|