@radix-ng/primitives 0.50.0 → 1.0.0-beta.0
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/collection/README.md +1 -0
- package/fesm2022/radix-ng-primitives-accordion.mjs +134 -66
- package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs +224 -132
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-arrow.mjs +26 -10
- package/fesm2022/radix-ng-primitives-arrow.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +6 -6
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-avatar.mjs +68 -75
- package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-button.mjs +123 -0
- package/fesm2022/radix-ng-primitives-button.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-calendar.mjs +104 -103
- package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-checkbox.mjs +414 -80
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collapsible.mjs +193 -92
- package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collection.mjs +72 -0
- package/fesm2022/radix-ng-primitives-collection.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-config.mjs +5 -5
- package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-context-menu.mjs +143 -427
- package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-core.mjs +757 -757
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-cropper.mjs +55 -53
- package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-date-field.mjs +93 -86
- package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dialog.mjs +658 -330
- package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +98 -76
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-drawer.mjs +1059 -0
- package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-editable.mjs +20 -20
- package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-field.mjs +363 -0
- package/fesm2022/radix-ng-primitives-field.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-fieldset.mjs +79 -0
- package/fesm2022/radix-ng-primitives-fieldset.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-focus-guards.mjs +3 -3
- package/fesm2022/radix-ng-primitives-focus-guards.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-focus-scope.mjs +29 -14
- package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-input.mjs +172 -0
- package/fesm2022/radix-ng-primitives-input.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-label.mjs +11 -11
- package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menu.mjs +1484 -353
- package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menubar.mjs +290 -162
- package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-meter.mjs +271 -0
- package/fesm2022/radix-ng-primitives-meter.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs +1060 -1553
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-number-field.mjs +1102 -366
- package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-pagination.mjs +51 -51
- package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popover.mjs +980 -995
- package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popper.mjs +137 -82
- package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-portal.mjs +40 -16
- package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-presence.mjs +134 -246
- package/fesm2022/radix-ng-primitives-presence.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-preview-card.mjs +997 -0
- package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-progress.mjs +231 -92
- package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +211 -70
- package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-roving-focus.mjs +127 -77
- package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-select.mjs +791 -511
- package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-separator.mjs +16 -45
- package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-slider.mjs +976 -720
- package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-stepper.mjs +69 -71
- package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +128 -124
- package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tabs.mjs +388 -115
- package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-time-field.mjs +111 -117
- package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +122 -248
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +99 -62
- package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toolbar.mjs +307 -94
- package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tooltip.mjs +690 -1079
- package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs +46 -87
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives.mjs.map +1 -1
- package/meter/README.md +3 -0
- package/navigation-menu/README.md +2 -1
- package/package.json +85 -63
- package/portal/README.md +2 -0
- package/preview-card/README.md +3 -0
- package/schematics/collection.json +1 -0
- package/schematics/ng-add/index.d.ts +3 -2
- package/schematics/ng-add/index.js +62 -31
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/package-config.d.ts +4 -2
- package/schematics/ng-add/package-config.js +10 -2
- package/schematics/ng-add/package-config.js.map +1 -1
- package/schematics/ng-add/schema.d.ts +3 -0
- package/schematics/ng-add/schema.js +3 -0
- package/schematics/ng-add/schema.js.map +1 -0
- package/schematics/ng-add/schema.json +14 -0
- package/select/README.md +2 -0
- package/{accordion/index.d.ts → types/radix-ng-primitives-accordion.d.ts} +102 -67
- package/types/radix-ng-primitives-alert-dialog.d.ts +114 -0
- package/{arrow/index.d.ts → types/radix-ng-primitives-arrow.d.ts} +1 -1
- package/{aspect-ratio/index.d.ts → types/radix-ng-primitives-aspect-ratio.d.ts} +1 -1
- package/{avatar/index.d.ts → types/radix-ng-primitives-avatar.d.ts} +7 -11
- package/types/radix-ng-primitives-button.d.ts +73 -0
- package/{calendar/index.d.ts → types/radix-ng-primitives-calendar.d.ts} +2 -3
- package/types/radix-ng-primitives-checkbox.d.ts +337 -0
- package/types/radix-ng-primitives-collapsible.d.ts +159 -0
- package/types/radix-ng-primitives-collection.d.ts +44 -0
- package/{config/index.d.ts → types/radix-ng-primitives-config.d.ts} +1 -1
- package/types/radix-ng-primitives-context-menu.d.ts +73 -0
- package/{core/index.d.ts → types/radix-ng-primitives-core.d.ts} +311 -236
- package/{cropper/index.d.ts → types/radix-ng-primitives-cropper.d.ts} +6 -5
- package/{date-field/index.d.ts → types/radix-ng-primitives-date-field.d.ts} +42 -27
- package/types/radix-ng-primitives-dialog.d.ts +323 -0
- package/{dismissable-layer/index.d.ts → types/radix-ng-primitives-dismissable-layer.d.ts} +15 -7
- package/types/radix-ng-primitives-drawer.d.ts +448 -0
- package/{editable/index.d.ts → types/radix-ng-primitives-editable.d.ts} +1 -1
- package/types/radix-ng-primitives-field.d.ts +373 -0
- package/types/radix-ng-primitives-fieldset.d.ts +48 -0
- package/{focus-scope/index.d.ts → types/radix-ng-primitives-focus-scope.d.ts} +13 -5
- package/types/radix-ng-primitives-input.d.ts +87 -0
- package/{label/index.d.ts → types/radix-ng-primitives-label.d.ts} +0 -1
- package/types/radix-ng-primitives-menu.d.ts +612 -0
- package/types/radix-ng-primitives-menubar.d.ts +66 -0
- package/types/radix-ng-primitives-meter.d.ts +193 -0
- package/types/radix-ng-primitives-navigation-menu.d.ts +488 -0
- package/types/radix-ng-primitives-number-field.d.ts +464 -0
- package/{pagination/index.d.ts → types/radix-ng-primitives-pagination.d.ts} +2 -2
- package/types/radix-ng-primitives-popover.d.ts +416 -0
- package/{popper/index.d.ts → types/radix-ng-primitives-popper.d.ts} +50 -9
- package/types/radix-ng-primitives-portal.d.ts +30 -0
- package/types/radix-ng-primitives-presence.d.ts +55 -0
- package/types/radix-ng-primitives-preview-card.d.ts +359 -0
- package/types/radix-ng-primitives-progress.d.ts +206 -0
- package/{radio/index.d.ts → types/radix-ng-primitives-radio.d.ts} +56 -26
- package/{roving-focus/index.d.ts → types/radix-ng-primitives-roving-focus.d.ts} +38 -27
- package/types/radix-ng-primitives-select.d.ts +512 -0
- package/types/radix-ng-primitives-separator.d.ts +38 -0
- package/types/radix-ng-primitives-slider.d.ts +377 -0
- package/{stepper/index.d.ts → types/radix-ng-primitives-stepper.d.ts} +21 -22
- package/types/radix-ng-primitives-switch.d.ts +121 -0
- package/types/radix-ng-primitives-tabs.d.ts +247 -0
- package/{time-field/index.d.ts → types/radix-ng-primitives-time-field.d.ts} +46 -31
- package/types/radix-ng-primitives-toggle-group.d.ts +116 -0
- package/types/radix-ng-primitives-toggle.d.ts +65 -0
- package/types/radix-ng-primitives-toolbar.d.ts +180 -0
- package/types/radix-ng-primitives-tooltip.d.ts +395 -0
- package/{visually-hidden/index.d.ts → types/radix-ng-primitives-visually-hidden.d.ts} +19 -19
- package/alert-dialog/index.d.ts +0 -57
- package/checkbox/index.d.ts +0 -164
- package/collapsible/index.d.ts +0 -85
- package/context-menu/index.d.ts +0 -129
- package/dialog/index.d.ts +0 -205
- package/dropdown-menu/README.md +0 -1
- package/dropdown-menu/index.d.ts +0 -171
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +0 -583
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-hover-card.mjs +0 -1246
- package/fesm2022/radix-ng-primitives-hover-card.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-tooltip2.mjs +0 -740
- package/fesm2022/radix-ng-primitives-tooltip2.mjs.map +0 -1
- package/hover-card/README.md +0 -3
- package/hover-card/index.d.ts +0 -472
- package/menu/index.d.ts +0 -139
- package/menubar/index.d.ts +0 -56
- package/navigation-menu/index.d.ts +0 -405
- package/number-field/index.d.ts +0 -203
- package/popover/index.d.ts +0 -403
- package/portal/index.d.ts +0 -22
- package/presence/index.d.ts +0 -103
- package/progress/index.d.ts +0 -79
- package/select/index.d.ts +0 -214
- package/separator/index.d.ts +0 -63
- package/slider/index.d.ts +0 -263
- package/switch/index.d.ts +0 -105
- package/tabs/index.d.ts +0 -112
- package/toggle/index.d.ts +0 -75
- package/toggle-group/index.d.ts +0 -194
- package/toolbar/index.d.ts +0 -55
- package/tooltip/index.d.ts +0 -433
- package/tooltip2/README.md +0 -3
- package/tooltip2/index.d.ts +0 -325
- /package/{focus-guards/index.d.ts → types/radix-ng-primitives-focus-guards.d.ts} +0 -0
- /package/{index.d.ts → types/radix-ng-primitives.d.ts} +0 -0
|
@@ -1,10 +1,39 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Type, Provider,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { Type, Provider, InputSignal, WritableSignal, ModelSignal, Signal, InjectionToken, InputSignalWithTransform, OutputRef, ElementRef, Injector, EffectRef, EffectCleanupRegisterFn, CreateEffectOptions } from '@angular/core';
|
|
3
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
4
|
+
import { DateValue, Time, CalendarDateTime, ZonedDateTime } from '@internationalized/date';
|
|
5
|
+
|
|
6
|
+
type DataOrientation = 'vertical' | 'horizontal';
|
|
7
|
+
/** Layout direction for bidirectional text. */
|
|
8
|
+
type Direction = 'ltr' | 'rtl';
|
|
9
|
+
/**
|
|
10
|
+
* Nullable from `Type` adds `null` and `undefined`
|
|
11
|
+
*
|
|
12
|
+
* @example ```ts
|
|
13
|
+
* // Expect: string | number | undefined | null
|
|
14
|
+
* type Value = Nulling<string | number>;
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
type Nullable<Type> = null | Type | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* SafeFunction is a type for functions that accept any number of arguments of unknown types
|
|
20
|
+
* and return a value of an unknown type. This is useful when you want to define a function
|
|
21
|
+
* without being strict about the input or output types, maintaining flexibility.
|
|
22
|
+
*
|
|
23
|
+
* @example ```ts
|
|
24
|
+
* const safeFn: SafeFunction = (...args) => {
|
|
25
|
+
* return args.length > 0 ? args[0] : null;
|
|
26
|
+
* };
|
|
27
|
+
*
|
|
28
|
+
* const result = safeFn(1, 'hello'); // result: 1
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
type SafeFunction = (...args: unknown[]) => unknown;
|
|
32
|
+
type AcceptableValue = string | number | bigint | Record<string, any> | null;
|
|
33
|
+
/** Type describing the allowed values for a boolean `input()` using `booleanAttribute` coercion. */
|
|
34
|
+
type BooleanInput = string | boolean | null | undefined;
|
|
35
|
+
/** Type describing the allowed values for a number `input()` using `numberAttribute` coercion. */
|
|
36
|
+
type NumberInput = string | number | null | undefined;
|
|
8
37
|
|
|
9
38
|
/**
|
|
10
39
|
* A reusable ControlValueAccessor implementation for form controls
|
|
@@ -83,20 +112,6 @@ declare function injectControlValueAccessor<T>(): RdxControlValueAccessor<T>;
|
|
|
83
112
|
*/
|
|
84
113
|
declare function provideValueAccessor<T>(type: Type<T>): Provider;
|
|
85
114
|
|
|
86
|
-
declare class RdxAutoFocusDirective {
|
|
87
|
-
#private;
|
|
88
|
-
private _autoSelect;
|
|
89
|
-
/**
|
|
90
|
-
* @default false
|
|
91
|
-
*/
|
|
92
|
-
set autoFocus(value: boolean);
|
|
93
|
-
set autoSelect(value: boolean);
|
|
94
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RdxAutoFocusDirective, never>;
|
|
95
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxAutoFocusDirective, "[rdxAutoFocus]", never, { "autoFocus": { "alias": "rdxAutoFocus"; "required": false; }; "autoSelect": { "alias": "autoSelect"; "required": false; }; }, {}, never, never, true, never>;
|
|
96
|
-
static ngAcceptInputType_autoFocus: unknown;
|
|
97
|
-
static ngAcceptInputType_autoSelect: unknown;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
115
|
/**
|
|
101
116
|
* The `clamp` function restricts a number within a specified range by returning the value itself if it
|
|
102
117
|
* falls within the range, or the closest boundary value if it exceeds the range.
|
|
@@ -136,141 +151,6 @@ declare function roundToStepPrecision(value: number, step: number): number;
|
|
|
136
151
|
*/
|
|
137
152
|
declare function snapValueToStep(value: number, min: number | undefined, max: number | undefined, step: number): number;
|
|
138
153
|
|
|
139
|
-
declare function injectDocument(): Document;
|
|
140
|
-
|
|
141
|
-
declare function elementSize({ elementRef, injector }: {
|
|
142
|
-
elementRef: ElementRef<HTMLElement>;
|
|
143
|
-
injector: Injector;
|
|
144
|
-
}): i0.Signal<{
|
|
145
|
-
width: number;
|
|
146
|
-
height: number;
|
|
147
|
-
}>;
|
|
148
|
-
|
|
149
|
-
declare class RdxFocusInitialDirective {
|
|
150
|
-
/** @ignore */
|
|
151
|
-
private readonly nativeElement;
|
|
152
|
-
/** @ignore */
|
|
153
|
-
focus(): void;
|
|
154
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RdxFocusInitialDirective, never>;
|
|
155
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxFocusInitialDirective, "[rdxFocusInitial]", never, {}, {}, never, never, true, never>;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
declare function getActiveElement(): Element | null;
|
|
159
|
-
|
|
160
|
-
/** Service that generates unique IDs for DOM nodes. */
|
|
161
|
-
declare class _IdGenerator {
|
|
162
|
-
private readonly _appId;
|
|
163
|
-
/**
|
|
164
|
-
* Generates a unique ID with a specific prefix.
|
|
165
|
-
* @param prefix Prefix to add to the ID.
|
|
166
|
-
*/
|
|
167
|
-
getId(prefix: string): string;
|
|
168
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<_IdGenerator, never>;
|
|
169
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<_IdGenerator>;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
declare function injectNgControl(params: {
|
|
173
|
-
optional: true;
|
|
174
|
-
}): FormControlDirective | FormControlName | NgModel | undefined;
|
|
175
|
-
declare function injectNgControl(params: {
|
|
176
|
-
optional: false;
|
|
177
|
-
}): FormControlDirective | FormControlName | NgModel;
|
|
178
|
-
declare function injectNgControl(): FormControlDirective | FormControlName | NgModel;
|
|
179
|
-
|
|
180
|
-
declare function injectIsClient(): boolean;
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Compare two objects using reference equality and stable deep hashing.
|
|
184
|
-
* @param {any} object1 First object
|
|
185
|
-
* @param {any} object2 Second object
|
|
186
|
-
* @return {boolean} true if equal and false if not
|
|
187
|
-
*/
|
|
188
|
-
declare function isEqual(object1: any, object2: any): boolean;
|
|
189
|
-
|
|
190
|
-
declare function isInsideForm(el: ElementRef<HTMLElement> | null): boolean;
|
|
191
|
-
|
|
192
|
-
declare function isNullish(value: any): value is null | undefined;
|
|
193
|
-
|
|
194
|
-
declare const isNumber: (v: any) => v is number;
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* The function `isValueEqualOrExist` checks if a value is equal to or exists in another value or
|
|
198
|
-
* array.
|
|
199
|
-
* @param {T | T[] | undefined} base - It represents the base value that you want to compare with the `current` value.
|
|
200
|
-
* @param {T | T[] | undefined} current - The `current` parameter represents the current value that you want to compare with the `base` value or values.
|
|
201
|
-
* @returns The `isValueEqualOrExist` function returns a boolean value. It checks if the `base` value
|
|
202
|
-
* is equal to the `current` value or if the `current` value exists within the `base` value. The
|
|
203
|
-
* function handles cases where `base` can be a single value, an array of values, or undefined.
|
|
204
|
-
*/
|
|
205
|
-
declare function isValueEqualOrExist<T>(base: T | T[] | undefined, current: T | T[] | undefined): boolean;
|
|
206
|
-
|
|
207
|
-
declare const ALT = "Alt";
|
|
208
|
-
declare const ARROW_DOWN = "ArrowDown";
|
|
209
|
-
declare const ARROW_LEFT = "ArrowLeft";
|
|
210
|
-
declare const ARROW_RIGHT = "ArrowRight";
|
|
211
|
-
declare const ARROW_UP = "ArrowUp";
|
|
212
|
-
declare const BACKSPACE = "Backspace";
|
|
213
|
-
declare const CAPS_LOCK = "CapsLock";
|
|
214
|
-
declare const CONTROL = "Control";
|
|
215
|
-
declare const DELETE = "Delete";
|
|
216
|
-
declare const END = "End";
|
|
217
|
-
declare const ENTER = "Enter";
|
|
218
|
-
declare const ESCAPE = "Escape";
|
|
219
|
-
declare const F1 = "F1";
|
|
220
|
-
declare const F10 = "F10";
|
|
221
|
-
declare const F11 = "F11";
|
|
222
|
-
declare const F12 = "F12";
|
|
223
|
-
declare const F2 = "F2";
|
|
224
|
-
declare const F3 = "F3";
|
|
225
|
-
declare const F4 = "F4";
|
|
226
|
-
declare const F5 = "F5";
|
|
227
|
-
declare const F6 = "F6";
|
|
228
|
-
declare const F7 = "F7";
|
|
229
|
-
declare const F8 = "F8";
|
|
230
|
-
declare const F9 = "F9";
|
|
231
|
-
declare const HOME = "Home";
|
|
232
|
-
declare const META = "Meta";
|
|
233
|
-
declare const PAGE_DOWN = "PageDown";
|
|
234
|
-
declare const PAGE_UP = "PageUp";
|
|
235
|
-
declare const SHIFT = "Shift";
|
|
236
|
-
declare const SPACE = " ";
|
|
237
|
-
declare const TAB = "Tab";
|
|
238
|
-
declare const CTRL = "Control";
|
|
239
|
-
declare const ASTERISK = "*";
|
|
240
|
-
declare const a = "a";
|
|
241
|
-
declare const P = "P";
|
|
242
|
-
declare const A = "A";
|
|
243
|
-
declare const p = "p";
|
|
244
|
-
declare const n = "n";
|
|
245
|
-
declare const j = "j";
|
|
246
|
-
declare const k = "k";
|
|
247
|
-
declare const SPACE_CODE = "Space";
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* Creates an Angular provider that binds the given token to the existing instance
|
|
251
|
-
* of the specified class. This is especially useful when you want multiple
|
|
252
|
-
* tokens (or interfaces) to resolve to the same directive/component instance.
|
|
253
|
-
*
|
|
254
|
-
* @template T - The type associated with the injection token.
|
|
255
|
-
* @param token - The InjectionToken or abstract type you want to provide.
|
|
256
|
-
* @param type - The class type whose existing instance will be used for this token.
|
|
257
|
-
* @returns A Provider configuration object for Angular's DI system.
|
|
258
|
-
*
|
|
259
|
-
* @example
|
|
260
|
-
*
|
|
261
|
-
* @Directive({
|
|
262
|
-
* providers: [
|
|
263
|
-
* provideToken(RdxToggleGroupToken, RdxToggleGroupDirective),
|
|
264
|
-
* provideValueAccessor(RdxToggleGroupDirective)
|
|
265
|
-
* ]
|
|
266
|
-
* })
|
|
267
|
-
* export class RdxToggleGroupDirective {}
|
|
268
|
-
*/
|
|
269
|
-
declare function provideToken<T>(token: InjectionToken<T>, type: Type<unknown>): Provider;
|
|
270
|
-
|
|
271
|
-
declare const WINDOW: InjectionToken<Window & typeof globalThis>;
|
|
272
|
-
declare function injectWindow(): Window & typeof globalThis;
|
|
273
|
-
|
|
274
154
|
/**
|
|
275
155
|
* Creates a context with injector and provider functions for a given type
|
|
276
156
|
* @template T The type of the context value
|
|
@@ -343,6 +223,7 @@ type DateAndTimeSegmentObj = DateSegmentObj & TimeSegmentObj;
|
|
|
343
223
|
type SegmentValueObj = DateSegmentObj | DateAndTimeSegmentObj;
|
|
344
224
|
type SegmentContentObj = Record<EditableSegmentPart, string>;
|
|
345
225
|
|
|
226
|
+
type DayOfWeek = 'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat';
|
|
346
227
|
type CreateMonthProps = {
|
|
347
228
|
/**
|
|
348
229
|
* The date object representing the month's date (usually the first day of the month).
|
|
@@ -693,87 +574,241 @@ declare function handleCalendarInitialFocus(calendar: HTMLElement): void;
|
|
|
693
574
|
declare function normalizeHourCycle(hourCycle: HourCycle): "h11" | "h23" | undefined;
|
|
694
575
|
declare function normalizeHour12(hourCycle: HourCycle): boolean | undefined;
|
|
695
576
|
|
|
696
|
-
declare
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
577
|
+
declare function handleAndDispatchCustomEvent<E extends CustomEvent, OriginalEvent extends Event>(name: string, handler: ((event: E) => void) | undefined, detail: {
|
|
578
|
+
originalEvent: OriginalEvent;
|
|
579
|
+
} & (E extends CustomEvent<infer D> ? D : never)): void;
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* Generates unique, SSR-stable IDs for DOM nodes.
|
|
583
|
+
*
|
|
584
|
+
* IDs are deterministic per prefix (a monotonic counter) so the server and the client produce the
|
|
585
|
+
* same sequence and hydration does not mismatch. The application's `APP_ID` is folded into the
|
|
586
|
+
* prefix so multiple Angular apps on one page don't collide; the default `ng` app id is omitted to
|
|
587
|
+
* keep IDs short for the common single-app case.
|
|
588
|
+
*
|
|
589
|
+
* Prefer the {@link injectId} hook at call sites; inject this service directly only when you need to
|
|
590
|
+
* generate IDs lazily outside an injection context.
|
|
591
|
+
*/
|
|
592
|
+
declare class RdxIdGenerator {
|
|
593
|
+
private readonly appId;
|
|
594
|
+
/** Generates a unique ID with the given prefix. */
|
|
595
|
+
getId(prefix: string): string;
|
|
596
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxIdGenerator, never>;
|
|
597
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RdxIdGenerator>;
|
|
701
598
|
}
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
599
|
+
/**
|
|
600
|
+
* Returns a unique, SSR-stable ID for the given prefix — the Angular counterpart of React's
|
|
601
|
+
* `useId`. Must be called in an injection context (e.g. a field initializer or constructor).
|
|
602
|
+
*
|
|
603
|
+
* @example
|
|
604
|
+
* readonly contentId = injectId('rdx-dialog-content-');
|
|
605
|
+
*/
|
|
606
|
+
declare function injectId(prefix: string): string;
|
|
607
|
+
|
|
608
|
+
declare const ALT = "Alt";
|
|
609
|
+
declare const ARROW_DOWN = "ArrowDown";
|
|
610
|
+
declare const ARROW_LEFT = "ArrowLeft";
|
|
611
|
+
declare const ARROW_RIGHT = "ArrowRight";
|
|
612
|
+
declare const ARROW_UP = "ArrowUp";
|
|
613
|
+
declare const BACKSPACE = "Backspace";
|
|
614
|
+
declare const CAPS_LOCK = "CapsLock";
|
|
615
|
+
declare const CONTROL = "Control";
|
|
616
|
+
declare const DELETE = "Delete";
|
|
617
|
+
declare const END = "End";
|
|
618
|
+
declare const ENTER = "Enter";
|
|
619
|
+
declare const ESCAPE = "Escape";
|
|
620
|
+
declare const F1 = "F1";
|
|
621
|
+
declare const F10 = "F10";
|
|
622
|
+
declare const F11 = "F11";
|
|
623
|
+
declare const F12 = "F12";
|
|
624
|
+
declare const F2 = "F2";
|
|
625
|
+
declare const F3 = "F3";
|
|
626
|
+
declare const F4 = "F4";
|
|
627
|
+
declare const F5 = "F5";
|
|
628
|
+
declare const F6 = "F6";
|
|
629
|
+
declare const F7 = "F7";
|
|
630
|
+
declare const F8 = "F8";
|
|
631
|
+
declare const F9 = "F9";
|
|
632
|
+
declare const HOME = "Home";
|
|
633
|
+
declare const META = "Meta";
|
|
634
|
+
declare const PAGE_DOWN = "PageDown";
|
|
635
|
+
declare const PAGE_UP = "PageUp";
|
|
636
|
+
declare const SHIFT = "Shift";
|
|
637
|
+
declare const SPACE = " ";
|
|
638
|
+
declare const TAB = "Tab";
|
|
639
|
+
declare const CTRL = "Control";
|
|
640
|
+
declare const ASTERISK = "*";
|
|
641
|
+
declare const a = "a";
|
|
642
|
+
declare const P = "P";
|
|
643
|
+
declare const A = "A";
|
|
644
|
+
declare const p = "p";
|
|
645
|
+
declare const n = "n";
|
|
646
|
+
declare const j = "j";
|
|
647
|
+
declare const k = "k";
|
|
648
|
+
declare const SPACE_CODE = "Space";
|
|
649
|
+
|
|
650
|
+
type AriaLivePoliteness = 'off' | 'polite' | 'assertive';
|
|
651
|
+
/**
|
|
652
|
+
* Announces messages to screen readers through an `aria-live` region, without moving focus.
|
|
653
|
+
*
|
|
654
|
+
* Own replacement for CDK's `LiveAnnouncer` — lazily appends a visually hidden live region to
|
|
655
|
+
* the document body and writes messages into it. No-op on the server.
|
|
656
|
+
*/
|
|
657
|
+
declare class RdxLiveAnnouncer {
|
|
658
|
+
private readonly document;
|
|
659
|
+
private readonly isBrowser;
|
|
660
|
+
private liveElement;
|
|
661
|
+
private previousTimeout;
|
|
662
|
+
constructor();
|
|
663
|
+
/**
|
|
664
|
+
* Announces a message to screen readers.
|
|
665
|
+
*
|
|
666
|
+
* @param message The message to announce.
|
|
667
|
+
* @param politeness The politeness of the announcer element (defaults to `'polite'`).
|
|
668
|
+
* @param duration If provided, the message is cleared after this many milliseconds.
|
|
669
|
+
*/
|
|
670
|
+
announce(message: string, politeness?: AriaLivePoliteness, duration?: number): void;
|
|
671
|
+
/** Clears the current announcement. */
|
|
672
|
+
clear(): void;
|
|
673
|
+
private getLiveElement;
|
|
674
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxLiveAnnouncer, never>;
|
|
675
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RdxLiveAnnouncer>;
|
|
706
676
|
}
|
|
707
|
-
type RdxPositionSideAndAlign = {
|
|
708
|
-
side: RdxPositionSide;
|
|
709
|
-
align: RdxPositionAlign;
|
|
710
|
-
};
|
|
711
|
-
type RdxPositionSideAndAlignOffsets = {
|
|
712
|
-
sideOffset: number;
|
|
713
|
-
alignOffset: number;
|
|
714
|
-
};
|
|
715
|
-
type RdxPositions = Readonly<{
|
|
716
|
-
[key in RdxPositionSide]: Readonly<{
|
|
717
|
-
[key in RdxPositionAlign]: Readonly<ConnectionPositionPair>;
|
|
718
|
-
}>;
|
|
719
|
-
}>;
|
|
720
|
-
type RdxPositioningDefaults = Readonly<{
|
|
721
|
-
offsets: Readonly<{
|
|
722
|
-
side: number;
|
|
723
|
-
align: number;
|
|
724
|
-
}>;
|
|
725
|
-
arrow: Readonly<{
|
|
726
|
-
width: number;
|
|
727
|
-
height: number;
|
|
728
|
-
}>;
|
|
729
|
-
}>;
|
|
730
|
-
type RdxAllPossibleConnectedPositions = ReadonlyMap<`${RdxPositionSide}|${RdxPositionAlign}`, ConnectionPositionPair>;
|
|
731
|
-
type RdxArrowPositionParams = {
|
|
732
|
-
top: string;
|
|
733
|
-
left: string;
|
|
734
|
-
transform: string;
|
|
735
|
-
transformOrigin: string;
|
|
736
|
-
};
|
|
737
677
|
|
|
738
|
-
|
|
739
|
-
declare
|
|
678
|
+
/** Narrows to `null | undefined`. */
|
|
679
|
+
declare function isNullish(value: any): value is null | undefined;
|
|
680
|
+
/**
|
|
681
|
+
* Structural equality for the value shapes a primitive can hold: primitives (incl. `NaN`), arrays,
|
|
682
|
+
* plain objects, and the common built-ins `Date`, `RegExp`, `Map`, and `Set`. Reference cycles are
|
|
683
|
+
* handled. Other opaque objects (e.g. class instances with no own enumerable properties) fall back
|
|
684
|
+
* to per-key comparison and so only match when they expose equal enumerable state.
|
|
685
|
+
*/
|
|
686
|
+
declare function isEqual(a: any, b: any): boolean;
|
|
740
687
|
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
688
|
+
/**
|
|
689
|
+
* Creates an Angular provider that binds the given token to the existing instance
|
|
690
|
+
* of the specified class. This is especially useful when you want multiple
|
|
691
|
+
* tokens (or interfaces) to resolve to the same directive/component instance.
|
|
692
|
+
*
|
|
693
|
+
* @template T - The type associated with the injection token.
|
|
694
|
+
* @param token - The InjectionToken or abstract type you want to provide.
|
|
695
|
+
* @param type - The class type whose existing instance will be used for this token.
|
|
696
|
+
* @returns A Provider configuration object for Angular's DI system.
|
|
697
|
+
*
|
|
698
|
+
* @example
|
|
699
|
+
*
|
|
700
|
+
* @Directive({
|
|
701
|
+
* providers: [
|
|
702
|
+
* provideToken(RdxFooToken, RdxFooDirective),
|
|
703
|
+
* provideValueAccessor(RdxFooDirective)
|
|
704
|
+
* ]
|
|
705
|
+
* })
|
|
706
|
+
* export class RdxFooDirective {}
|
|
707
|
+
*/
|
|
708
|
+
declare function provideToken<T>(token: InjectionToken<T>, type: Type<unknown>): Provider;
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* Local mirror of Angular Signal Forms' control contracts
|
|
712
|
+
* (`@angular/forms/signals`, stable in Angular 22).
|
|
713
|
+
*
|
|
714
|
+
* These interfaces intentionally do **not** import from `@angular/forms/signals`
|
|
715
|
+
* so primitives can declare `implements RdxFormValueControl<T>` /
|
|
716
|
+
* `implements RdxFormCheckboxControl` while the library baseline is still on
|
|
717
|
+
* Angular 21, where the real API is experimental. They mirror Angular's contract
|
|
718
|
+
* closely enough to lock the public surface (the required `value` / `checked`
|
|
719
|
+
* signal) and catch naming regressions on CI — e.g. a rewrite renaming
|
|
720
|
+
* `value` → `modelValue` (as the slider once had) would no longer type-check.
|
|
721
|
+
*
|
|
722
|
+
* Optional state types are widened only where Radix NG controls legitimately
|
|
723
|
+
* differ from Angular's exact types (e.g. `input<string>()` produces
|
|
724
|
+
* `string | undefined`, and boolean inputs carry a coercion transform).
|
|
725
|
+
*
|
|
726
|
+
* Replace with the real imports once the baseline moves to Angular 22.
|
|
727
|
+
* See `.claude/skills/project-knowledge/references/signal-forms-readiness.md`.
|
|
728
|
+
*/
|
|
729
|
+
/** An optional control-state member exposed as an Angular input signal (with or without a coercion transform). */
|
|
730
|
+
type RdxFormStateInput<T> = InputSignal<T> | InputSignalWithTransform<T, any>;
|
|
731
|
+
/**
|
|
732
|
+
* Minimal stand-in for Angular's `ValidationError`. The real type is a tagged
|
|
733
|
+
* union (`RequiredValidationError`, `PatternValidationError`, …); this keeps a
|
|
734
|
+
* shared shape until the v22 type is available.
|
|
735
|
+
*/
|
|
736
|
+
interface RdxValidationError {
|
|
737
|
+
readonly kind: string;
|
|
738
|
+
readonly message?: string;
|
|
739
|
+
}
|
|
740
|
+
/** Optional state shared by value and checkbox controls (mirror of Angular's `FormUiControl`). */
|
|
741
|
+
interface RdxFormUiControl {
|
|
742
|
+
readonly disabled?: RdxFormStateInput<boolean>;
|
|
743
|
+
readonly readonly?: RdxFormStateInput<boolean>;
|
|
744
|
+
readonly required?: RdxFormStateInput<boolean>;
|
|
745
|
+
readonly invalid?: RdxFormStateInput<boolean>;
|
|
746
|
+
readonly hidden?: RdxFormStateInput<boolean>;
|
|
747
|
+
readonly pending?: RdxFormStateInput<boolean>;
|
|
748
|
+
readonly touched?: RdxFormStateInput<boolean>;
|
|
749
|
+
readonly dirty?: RdxFormStateInput<boolean>;
|
|
750
|
+
readonly name?: RdxFormStateInput<string | undefined>;
|
|
751
|
+
readonly errors?: RdxFormStateInput<readonly RdxValidationError[]>;
|
|
752
|
+
readonly minLength?: RdxFormStateInput<number | undefined>;
|
|
753
|
+
readonly maxLength?: RdxFormStateInput<number | undefined>;
|
|
754
|
+
readonly pattern?: RdxFormStateInput<readonly RegExp[]>;
|
|
755
|
+
/** Notifies the form that the control was touched (mirror of Angular's `touch` output). */
|
|
756
|
+
readonly touch?: OutputRef<void>;
|
|
757
|
+
}
|
|
758
|
+
/**
|
|
759
|
+
* Mirror of `FormValueControl<TValue>` — a control that edits a single value via
|
|
760
|
+
* `value = model<TValue>()`. It must **not** expose `checked`.
|
|
761
|
+
*/
|
|
762
|
+
interface RdxFormValueControl<TValue> extends RdxFormUiControl {
|
|
763
|
+
readonly value: ModelSignal<TValue>;
|
|
764
|
+
readonly checked?: undefined;
|
|
765
|
+
readonly min?: RdxFormStateInput<NonNullable<TValue> | undefined>;
|
|
766
|
+
readonly max?: RdxFormStateInput<NonNullable<TValue> | undefined>;
|
|
767
|
+
}
|
|
768
|
+
/**
|
|
769
|
+
* Mirror of `FormCheckboxControl` — a control that toggles via
|
|
770
|
+
* `checked = model<boolean>()`. It must **not** expose `value`.
|
|
771
|
+
*/
|
|
772
|
+
interface RdxFormCheckboxControl extends RdxFormUiControl {
|
|
773
|
+
readonly checked: ModelSignal<boolean>;
|
|
774
|
+
readonly value?: undefined;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
declare function injectDocument(): Document;
|
|
778
|
+
|
|
779
|
+
declare function elementSize({ elementRef, injector }: {
|
|
780
|
+
elementRef: ElementRef<HTMLElement>;
|
|
781
|
+
injector: Injector;
|
|
782
|
+
}): i0.Signal<{
|
|
748
783
|
width: number;
|
|
749
784
|
height: number;
|
|
750
|
-
}
|
|
785
|
+
}>;
|
|
786
|
+
|
|
787
|
+
declare function getActiveElement(): Element | null;
|
|
751
788
|
|
|
752
|
-
type DataOrientation = 'vertical' | 'horizontal';
|
|
753
789
|
/**
|
|
754
|
-
*
|
|
790
|
+
* Creates a resize observer effect for element
|
|
755
791
|
*
|
|
756
|
-
* @
|
|
757
|
-
*
|
|
758
|
-
*
|
|
759
|
-
*
|
|
792
|
+
* @param options Configuration options
|
|
793
|
+
* @param options.injector Angular injector
|
|
794
|
+
* @param options.element Signal returning the element to observe
|
|
795
|
+
* @param options.onResize Callback when element is resized
|
|
796
|
+
* @returns EffectRef that can be destroyed when needed
|
|
760
797
|
*/
|
|
761
|
-
|
|
798
|
+
declare function resizeEffect(options: {
|
|
799
|
+
injector: Injector;
|
|
800
|
+
element: Signal<ElementRef | HTMLElement | null | undefined>;
|
|
801
|
+
onResize: ResizeObserverCallback;
|
|
802
|
+
}): EffectRef;
|
|
803
|
+
|
|
762
804
|
/**
|
|
763
|
-
*
|
|
764
|
-
*
|
|
765
|
-
* without being strict about the input or output types, maintaining flexibility.
|
|
805
|
+
* Locks `document.body` scrolling while `active()` is `true`, and restores the original overflow
|
|
806
|
+
* when it becomes `false` or the calling context is destroyed.
|
|
766
807
|
*
|
|
767
|
-
*
|
|
768
|
-
*
|
|
769
|
-
* return args.length > 0 ? args[0] : null;
|
|
770
|
-
* };
|
|
771
|
-
*
|
|
772
|
-
* const result = safeFn(1, 'hello'); // result: 1
|
|
773
|
-
* ```
|
|
808
|
+
* Lock ownership is shared across all callers via a single module-level counter, so nested or
|
|
809
|
+
* concurrent overlays compose correctly. Must be called in an injection context.
|
|
774
810
|
*/
|
|
775
|
-
|
|
776
|
-
type AcceptableValue = string | number | Record<string, any> | null;
|
|
811
|
+
declare function useScrollLock(active: Signal<boolean>): void;
|
|
777
812
|
|
|
778
813
|
type ArrowKeyOptions = 'horizontal' | 'vertical' | 'both';
|
|
779
814
|
interface ArrowNavigationOptions {
|
|
@@ -840,19 +875,47 @@ interface ArrowNavigationOptions {
|
|
|
840
875
|
declare function useArrowNavigation(e: KeyboardEvent, currentElement: HTMLElement, parentElement: HTMLElement | undefined, options?: ArrowNavigationOptions): HTMLElement | null;
|
|
841
876
|
|
|
842
877
|
/**
|
|
843
|
-
*
|
|
878
|
+
* Keeps hover content open while the pointer crosses the gap between a trigger and a popup.
|
|
879
|
+
*/
|
|
880
|
+
declare function useGraceArea(triggerEl: Signal<HTMLElement | null | undefined>, containerEl: Signal<HTMLElement | null | undefined>, resetMs?: number): {
|
|
881
|
+
isPointerInTransit: Signal<boolean>;
|
|
882
|
+
onPointerExit: (callback: (value: void) => void) => () => void;
|
|
883
|
+
};
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* Lifecycle phase of an open/close transition.
|
|
844
887
|
*
|
|
845
|
-
*
|
|
846
|
-
*
|
|
847
|
-
*
|
|
848
|
-
* @param options.onResize Callback when element is resized
|
|
849
|
-
* @returns EffectRef that can be destroyed when needed
|
|
888
|
+
* - `'starting'` — the part has just mounted/opened; the enter animation is about to run.
|
|
889
|
+
* - `'ending'` — the part is closing; the exit animation is running.
|
|
890
|
+
* - `undefined` — settled (no transition in progress).
|
|
850
891
|
*/
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
892
|
+
type RdxTransitionStatus = 'starting' | 'ending' | undefined;
|
|
893
|
+
interface RdxTransitionStatusRef {
|
|
894
|
+
/** Reactive transition phase, intended for `data-starting-style` / `data-ending-style` bindings. */
|
|
895
|
+
readonly status: Signal<RdxTransitionStatus>;
|
|
896
|
+
/**
|
|
897
|
+
* Registers the element whose CSS transition/animation duration determines when the close
|
|
898
|
+
* transition is considered complete. Returns a cleanup that unregisters it.
|
|
899
|
+
*/
|
|
900
|
+
registerElement: (element: HTMLElement) => () => void;
|
|
901
|
+
/** Drives a new transition for the given open state. Cancels any in-flight transition. */
|
|
902
|
+
start: (open: boolean) => void;
|
|
903
|
+
}
|
|
904
|
+
/**
|
|
905
|
+
* Shared open/close transition state machine used by overlay primitives (dialog, popover, …).
|
|
906
|
+
*
|
|
907
|
+
* On `start(open)` it flips `status` to `'starting'`/`'ending'`, then — after the next render and
|
|
908
|
+
* (for opening) one animation frame — clears it and waits for the registered element's running CSS
|
|
909
|
+
* animations/transitions to finish (via the Web Animations API) before invoking `onComplete(open)`.
|
|
910
|
+
* Completing on the real `animationend` rather than a duration timer keeps it from firing a frame
|
|
911
|
+
* late. A duration-based timer remains as a safety net, and if no element is registered or it has no
|
|
912
|
+
* animation (also SSR / jsdom, where computed durations are `0`) completion is synchronous.
|
|
913
|
+
*
|
|
914
|
+
* Must be called in an injection context (uses {@link Injector} and {@link DestroyRef}).
|
|
915
|
+
*/
|
|
916
|
+
declare function useTransitionStatus(onComplete: (open: boolean) => void): RdxTransitionStatusRef;
|
|
917
|
+
/** Longest of an element's CSS transition / animation durations (including delays), in milliseconds. */
|
|
918
|
+
declare function getMaxTransitionDuration(element: HTMLElement): number;
|
|
856
919
|
|
|
857
920
|
/**
|
|
858
921
|
* We want to have the Tuple in order to use the types in the function signature
|
|
@@ -894,5 +957,17 @@ declare interface CreateExplicitEffectOptions extends CreateEffectOptions {
|
|
|
894
957
|
*/
|
|
895
958
|
declare function watch<Input extends readonly unknown[], Params = Input>(deps: readonly [...ExplicitEffectValues<Input>], fn: (deps: Params, onCleanup: EffectCleanupRegisterFn) => void, options?: CreateExplicitEffectOptions | undefined): EffectRef;
|
|
896
959
|
|
|
897
|
-
|
|
898
|
-
|
|
960
|
+
declare enum RdxPositionSide {
|
|
961
|
+
Top = "top",
|
|
962
|
+
Right = "right",
|
|
963
|
+
Bottom = "bottom",
|
|
964
|
+
Left = "left"
|
|
965
|
+
}
|
|
966
|
+
declare enum RdxPositionAlign {
|
|
967
|
+
Start = "start",
|
|
968
|
+
Center = "center",
|
|
969
|
+
End = "end"
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
export { A, ALT, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP, ASTERISK, BACKSPACE, CAPS_LOCK, CONTROL, CTRL, DELETE, END, ENTER, ESCAPE, F1, F10, F11, F12, F2, F3, F4, F5, F6, F7, F8, F9, HOME, META, P, PAGE_DOWN, PAGE_UP, RdxControlValueAccessor, RdxIdGenerator, RdxLiveAnnouncer, RdxPositionAlign, RdxPositionSide, SHIFT, SPACE, SPACE_CODE, TAB, a, areAllDaysBetweenValid, clamp, createContent, createContext, createFormatter, createMonth, createMonths, elementSize, getActiveElement, getDaysBetween, getDaysInMonth, getDefaultDate, getDefaultTime, getLastFirstDayOfWeek, getMaxTransitionDuration, getNextLastDayOfWeek, getOptsByGranularity, getPlaceholder, getSegmentElements, getWeekNumber, handleAndDispatchCustomEvent, handleCalendarInitialFocus, hasTime, initializeSegmentValues, injectControlValueAccessor, injectDocument, injectId, isAcceptableSegmentKey, isAfter, isAfterOrSame, isBefore, isBeforeOrSame, isBetween, isBetweenInclusive, isCalendarDateTime, isEqual, isNullish, isNumberString, isSegmentNavigationKey, isZonedDateTime, j, k, n, normalizeDateStep, normalizeHour12, normalizeHourCycle, p, provideToken, provideValueAccessor, resizeEffect, roundToStepPrecision, segmentBuilders, snapValueToStep, syncSegmentValues, syncTimeSegmentValues, toDate, useArrowNavigation, useDateField, useGraceArea, useScrollLock, useTransitionStatus, watch };
|
|
973
|
+
export type { AcceptableValue, AnyExceptLiteral, AriaLivePoliteness, BooleanInput, CreateMonthProps, DataOrientation, DateAndTimeSegmentObj, DateFormatterOptions, DateMatcher, DateRange, DateSegmentObj, DateSegmentPart, DateStep, DayPeriod, Direction, EditableSegmentPart, Formatter, Granularity, HourCycle, Month, NonEditableSegmentPart, Nullable, NumberInput, PlaceholderMap, RdxFormCheckboxControl, RdxFormStateInput, RdxFormUiControl, RdxFormValueControl, RdxTransitionStatus, RdxTransitionStatusRef, RdxValidationError, SafeFunction, SegmentContentObj, SegmentPart, SegmentValueObj, TimeGranularity, TimeSegmentObj, TimeSegmentPart, TimeValue, UseDateFieldProps };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { InputSignal, WritableSignal
|
|
3
|
-
import { NumberInput } from '@
|
|
2
|
+
import { InjectionToken, InputSignal, WritableSignal } from '@angular/core';
|
|
3
|
+
import { NumberInput } from '@radix-ng/primitives/core';
|
|
4
|
+
import * as _radix_ng_primitives_cropper from '@radix-ng/primitives/cropper';
|
|
4
5
|
|
|
5
6
|
interface CropperContextToken {
|
|
6
7
|
image: InputSignal<string>;
|
|
@@ -104,7 +105,7 @@ declare class RdxCropperRootDirective implements CropperContextToken {
|
|
|
104
105
|
}
|
|
105
106
|
|
|
106
107
|
declare class RdxCropperImageComponent {
|
|
107
|
-
protected readonly rootContext: CropperContextToken;
|
|
108
|
+
protected readonly rootContext: _radix_ng_primitives_cropper.CropperContextToken;
|
|
108
109
|
readonly imgClass: _angular_core.InputSignal<string | undefined>;
|
|
109
110
|
readonly imgStyles: _angular_core.InputSignal<string | undefined>;
|
|
110
111
|
protected readonly imgClasses: _angular_core.Signal<string | undefined>;
|
|
@@ -114,13 +115,13 @@ declare class RdxCropperImageComponent {
|
|
|
114
115
|
}
|
|
115
116
|
|
|
116
117
|
declare class RdxCropperCropAreaDirective {
|
|
117
|
-
readonly rootContext: CropperContextToken;
|
|
118
|
+
readonly rootContext: _radix_ng_primitives_cropper.CropperContextToken;
|
|
118
119
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCropperCropAreaDirective, never>;
|
|
119
120
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCropperCropAreaDirective, "[rdxCropperCropArea]", never, {}, {}, never, never, true, never>;
|
|
120
121
|
}
|
|
121
122
|
|
|
122
123
|
declare class RdxCropperDescriptionDirective {
|
|
123
|
-
readonly rootContext: CropperContextToken;
|
|
124
|
+
readonly rootContext: _radix_ng_primitives_cropper.CropperContextToken;
|
|
124
125
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCropperDescriptionDirective, never>;
|
|
125
126
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCropperDescriptionDirective, "[rdxCropperDescription]", never, {}, {}, never, never, true, never>;
|
|
126
127
|
}
|