@radix-ng/primitives 0.51.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/fesm2022/radix-ng-primitives-accordion.mjs +105 -38
- package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs +221 -129
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-arrow.mjs +20 -4
- package/fesm2022/radix-ng-primitives-arrow.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-avatar.mjs +54 -61
- package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-button.mjs +123 -0
- package/fesm2022/radix-ng-primitives-button.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-checkbox.mjs +378 -54
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collapsible.mjs +182 -81
- package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collection.mjs +40 -57
- package/fesm2022/radix-ng-primitives-collection.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-context-menu.mjs +140 -424
- package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-core.mjs +735 -744
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-cropper.mjs +1 -0
- package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-date-field.mjs +51 -45
- package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dialog.mjs +655 -327
- package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +70 -46
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-drawer.mjs +1059 -0
- package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-field.mjs +363 -0
- package/fesm2022/radix-ng-primitives-field.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-fieldset.mjs +79 -0
- package/fesm2022/radix-ng-primitives-fieldset.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-focus-scope.mjs +23 -8
- package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-input.mjs +172 -0
- package/fesm2022/radix-ng-primitives-input.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-label.mjs +6 -6
- package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menu.mjs +1480 -344
- package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menubar.mjs +290 -162
- package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-meter.mjs +271 -0
- package/fesm2022/radix-ng-primitives-meter.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs +1052 -1553
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-number-field.mjs +1102 -367
- package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popover.mjs +978 -989
- package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popper.mjs +91 -41
- package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-portal.mjs +34 -10
- package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-presence.mjs +134 -246
- package/fesm2022/radix-ng-primitives-presence.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-preview-card.mjs +997 -0
- package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-progress.mjs +223 -84
- package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +191 -51
- package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-roving-focus.mjs +96 -50
- package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-select.mjs +791 -509
- package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-separator.mjs +12 -35
- package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-slider.mjs +969 -717
- package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-stepper.mjs +15 -19
- package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +125 -113
- package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tabs.mjs +381 -108
- package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-time-field.mjs +55 -46
- package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +121 -247
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +98 -61
- package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toolbar.mjs +303 -92
- package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tooltip.mjs +690 -1071
- package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs +25 -66
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
- package/meter/README.md +3 -0
- package/navigation-menu/README.md +2 -1
- package/package.json +31 -18
- package/portal/README.md +2 -0
- package/preview-card/README.md +3 -0
- package/schematics/collection.json +1 -0
- package/schematics/ng-add/index.d.ts +3 -2
- package/schematics/ng-add/index.js +62 -31
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/package-config.d.ts +4 -2
- package/schematics/ng-add/package-config.js +10 -2
- package/schematics/ng-add/package-config.js.map +1 -1
- package/schematics/ng-add/schema.d.ts +3 -0
- package/schematics/ng-add/schema.js +3 -0
- package/schematics/ng-add/schema.js.map +1 -0
- package/schematics/ng-add/schema.json +14 -0
- package/select/README.md +2 -0
- package/types/radix-ng-primitives-accordion.d.ts +48 -14
- package/types/radix-ng-primitives-alert-dialog.d.ts +95 -38
- package/types/radix-ng-primitives-arrow.d.ts +1 -1
- package/types/radix-ng-primitives-aspect-ratio.d.ts +1 -1
- package/types/radix-ng-primitives-avatar.d.ts +7 -11
- package/types/radix-ng-primitives-button.d.ts +73 -0
- package/types/radix-ng-primitives-calendar.d.ts +1 -2
- package/types/radix-ng-primitives-checkbox.d.ts +201 -32
- package/types/radix-ng-primitives-collapsible.d.ts +112 -39
- package/types/radix-ng-primitives-collection.d.ts +38 -34
- package/types/radix-ng-primitives-config.d.ts +1 -1
- package/types/radix-ng-primitives-context-menu.d.ts +60 -116
- package/types/radix-ng-primitives-core.d.ts +307 -236
- package/types/radix-ng-primitives-cropper.d.ts +2 -2
- package/types/radix-ng-primitives-date-field.d.ts +38 -23
- package/types/radix-ng-primitives-dialog.d.ts +282 -165
- package/types/radix-ng-primitives-dismissable-layer.d.ts +15 -7
- package/types/radix-ng-primitives-drawer.d.ts +448 -0
- package/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/types/radix-ng-primitives-focus-scope.d.ts +13 -5
- package/types/radix-ng-primitives-input.d.ts +87 -0
- package/types/radix-ng-primitives-label.d.ts +0 -1
- package/types/radix-ng-primitives-menu.d.ts +572 -99
- package/types/radix-ng-primitives-menubar.d.ts +60 -50
- package/types/radix-ng-primitives-meter.d.ts +193 -0
- package/types/radix-ng-primitives-navigation-menu.d.ts +422 -340
- package/types/radix-ng-primitives-number-field.d.ts +405 -145
- package/types/radix-ng-primitives-pagination.d.ts +2 -2
- package/types/radix-ng-primitives-popover.d.ts +365 -351
- package/types/radix-ng-primitives-popper.d.ts +49 -9
- package/types/radix-ng-primitives-portal.d.ts +14 -6
- package/types/radix-ng-primitives-presence.d.ts +28 -76
- package/types/radix-ng-primitives-preview-card.d.ts +359 -0
- package/types/radix-ng-primitives-progress.d.ts +174 -48
- package/types/radix-ng-primitives-radio.d.ts +55 -25
- package/types/radix-ng-primitives-roving-focus.d.ts +30 -21
- package/types/radix-ng-primitives-select.d.ts +475 -177
- package/types/radix-ng-primitives-separator.d.ts +7 -32
- package/types/radix-ng-primitives-slider.d.ts +315 -201
- package/types/radix-ng-primitives-stepper.d.ts +5 -7
- package/types/radix-ng-primitives-switch.d.ts +86 -71
- package/types/radix-ng-primitives-tabs.d.ts +213 -79
- package/types/radix-ng-primitives-time-field.d.ts +42 -27
- package/types/radix-ng-primitives-toggle-group.d.ts +85 -164
- package/types/radix-ng-primitives-toggle.d.ts +43 -53
- package/types/radix-ng-primitives-toolbar.d.ts +163 -38
- package/types/radix-ng-primitives-tooltip.d.ts +347 -384
- package/types/radix-ng-primitives-visually-hidden.d.ts +19 -19
- package/dropdown-menu/README.md +0 -1
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +0 -581
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-hover-card.mjs +0 -1238
- package/fesm2022/radix-ng-primitives-hover-card.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-select2.mjs +0 -897
- package/fesm2022/radix-ng-primitives-select2.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-tooltip2.mjs +0 -735
- package/fesm2022/radix-ng-primitives-tooltip2.mjs.map +0 -1
- package/hover-card/README.md +0 -3
- package/select2/README.md +0 -3
- package/tooltip2/README.md +0 -3
- package/types/radix-ng-primitives-dropdown-menu.d.ts +0 -171
- package/types/radix-ng-primitives-hover-card.d.ts +0 -471
- package/types/radix-ng-primitives-select2.d.ts +0 -511
- package/types/radix-ng-primitives-tooltip2.d.ts +0 -325
|
@@ -1,204 +1,464 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { Signal } from '@angular/core';
|
|
3
|
+
import * as i1 from '@radix-ng/primitives/core';
|
|
4
|
+
import { RdxFormValueControl, RdxControlValueAccessor, NumberInput, BooleanInput } from '@radix-ng/primitives/core';
|
|
4
5
|
import * as _radix_ng_primitives_number_field from '@radix-ng/primitives/number-field';
|
|
5
6
|
import { NumberFormatter, NumberParser } from '@internationalized/number';
|
|
7
|
+
import * as i1$1 from '@radix-ng/primitives/portal';
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
/**
|
|
10
|
+
* The software keyboard hint shown on touch devices, mapped to the input's `inputmode` attribute.
|
|
11
|
+
*/
|
|
12
|
+
type InputMode = 'numeric' | 'decimal' | 'text';
|
|
13
|
+
/**
|
|
14
|
+
* Direction of a step-based value change (`1` to increase, `-1` to decrease).
|
|
15
|
+
*/
|
|
16
|
+
type Direction = 1 | -1;
|
|
17
|
+
/**
|
|
18
|
+
* Why a value change happened. Mirrors Base UI's change reasons and is used
|
|
19
|
+
* internally to decide whether a change should be clamped (step interactions
|
|
20
|
+
* always clamp; direct text entry may go out of range when `allowOutOfRange`).
|
|
21
|
+
*
|
|
22
|
+
* @see https://base-ui.com/react/components/number-field
|
|
23
|
+
*/
|
|
24
|
+
type NumberFieldChangeReason = 'input-change' | 'input-clear' | 'input-blur' | 'input-paste' | 'keyboard' | 'increment-press' | 'decrement-press' | 'wheel' | 'scrub' | 'none';
|
|
25
|
+
declare const REASONS: {
|
|
26
|
+
readonly inputChange: "input-change";
|
|
27
|
+
readonly inputClear: "input-clear";
|
|
28
|
+
readonly inputBlur: "input-blur";
|
|
29
|
+
readonly inputPaste: "input-paste";
|
|
30
|
+
readonly keyboard: "keyboard";
|
|
31
|
+
readonly incrementPress: "increment-press";
|
|
32
|
+
readonly decrementPress: "decrement-press";
|
|
33
|
+
readonly wheel: "wheel";
|
|
34
|
+
readonly scrub: "scrub";
|
|
35
|
+
readonly none: "none";
|
|
36
|
+
};
|
|
8
37
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
applyInputValue: (val: string) => void;
|
|
23
|
-
validate: (val: string) => boolean;
|
|
24
|
-
setInputValue: (val: string) => void;
|
|
25
|
-
isIncreaseDisabled: Signal<boolean>;
|
|
26
|
-
isDecreaseDisabled: Signal<boolean>;
|
|
27
|
-
handleMinMaxValue: (type: 'min' | 'max') => void;
|
|
28
|
-
}
|
|
29
|
-
declare const NUMBER_FIELD_ROOT_CONTEXT: InjectionToken<NumberFieldContextToken>;
|
|
30
|
-
declare function injectNumberFieldRootContext(): NumberFieldContextToken;
|
|
31
|
-
|
|
32
|
-
declare class RdxNumberFieldRootDirective implements OnInit, NumberFieldContextToken {
|
|
33
|
-
readonly value: _angular_core.ModelSignal<number | undefined>;
|
|
38
|
+
/**
|
|
39
|
+
* Groups all parts of the number field and manages its state, parsing/formatting
|
|
40
|
+
* and value-change logic. A single directive drives the whole family — parts read
|
|
41
|
+
* signals and call methods off it through the root context.
|
|
42
|
+
*
|
|
43
|
+
* @see https://base-ui.com/react/components/number-field
|
|
44
|
+
*/
|
|
45
|
+
declare class RdxNumberFieldRoot implements RdxFormValueControl<number | null> {
|
|
46
|
+
/** @ignore */
|
|
47
|
+
protected readonly cva: RdxControlValueAccessor<number | null>;
|
|
48
|
+
/** The id of the input element. */
|
|
49
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
50
|
+
/** The minimum value of the field. */
|
|
34
51
|
readonly min: _angular_core.InputSignalWithTransform<number | undefined, NumberInput>;
|
|
52
|
+
/** The maximum value of the field. */
|
|
35
53
|
readonly max: _angular_core.InputSignalWithTransform<number | undefined, NumberInput>;
|
|
36
|
-
readonly step: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
37
|
-
readonly stepSnapping: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
38
|
-
readonly disableWheelChange: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
39
|
-
readonly locale: _angular_core.InputSignal<string>;
|
|
40
|
-
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
41
|
-
readonly formatOptions: _angular_core.InputSignal<Intl.NumberFormatOptions | undefined>;
|
|
42
54
|
/**
|
|
43
|
-
*
|
|
44
|
-
|
|
45
|
-
readonly readonly: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
46
|
-
/**
|
|
47
|
-
* @ignore
|
|
48
|
-
*/
|
|
49
|
-
readonly inputEl: _angular_core.WritableSignal<HTMLInputElement | undefined>;
|
|
50
|
-
/**
|
|
51
|
-
* @ignore
|
|
52
|
-
*/
|
|
53
|
-
readonly isDecreaseDisabled: _angular_core.Signal<boolean>;
|
|
54
|
-
/**
|
|
55
|
-
* @ignore
|
|
56
|
-
*/
|
|
57
|
-
readonly isIncreaseDisabled: _angular_core.Signal<boolean>;
|
|
58
|
-
/**
|
|
59
|
-
* @ignore
|
|
55
|
+
* Amount to increment and decrement with the buttons, arrow keys and scrub area.
|
|
56
|
+
* @default 1
|
|
60
57
|
*/
|
|
61
|
-
readonly
|
|
58
|
+
readonly step: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
62
59
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* @ignore
|
|
60
|
+
* The step used when incrementing while the Alt key is held. Snaps to multiples of this value.
|
|
61
|
+
* @default 0.1
|
|
66
62
|
*/
|
|
67
|
-
readonly
|
|
63
|
+
readonly smallStep: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
68
64
|
/**
|
|
69
|
-
*
|
|
65
|
+
* The step used when incrementing while the Shift key is held. Snaps to multiples of this value.
|
|
66
|
+
* @default 10
|
|
70
67
|
*/
|
|
71
|
-
readonly
|
|
68
|
+
readonly largeStep: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
72
69
|
/**
|
|
73
|
-
*
|
|
70
|
+
* Whether the value should snap to the nearest step when incrementing or decrementing.
|
|
71
|
+
* @default false
|
|
74
72
|
*/
|
|
75
|
-
|
|
73
|
+
readonly snapOnStep: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
76
74
|
/**
|
|
77
|
-
*
|
|
75
|
+
* When `true`, direct text entry may go outside the `min`/`max` range without clamping.
|
|
76
|
+
* Step interactions (arrow keys, buttons, wheel, scrub) still clamp.
|
|
77
|
+
* @default false
|
|
78
78
|
*/
|
|
79
|
-
|
|
79
|
+
readonly allowOutOfRange: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
81
|
+
* Whether the value can be changed with the mouse wheel while the input is focused.
|
|
82
|
+
* @default false
|
|
82
83
|
*/
|
|
83
|
-
|
|
84
|
+
readonly allowWheelScrub: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
85
|
+
/** Options used to format the input value (forwarded to `Intl.NumberFormat`). */
|
|
86
|
+
readonly format: _angular_core.InputSignal<Intl.NumberFormatOptions | undefined>;
|
|
87
|
+
/** The locale used to parse and format the value. */
|
|
88
|
+
readonly locale: _angular_core.InputSignal<string>;
|
|
84
89
|
/**
|
|
85
|
-
*
|
|
90
|
+
* When `true`, the user cannot interact with the field.
|
|
91
|
+
* @default false
|
|
86
92
|
*/
|
|
87
|
-
|
|
88
|
-
ngOnInit(): void;
|
|
93
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
89
94
|
/**
|
|
90
|
-
*
|
|
95
|
+
* When `true`, the field is focusable but its value cannot be changed.
|
|
96
|
+
* @default false
|
|
91
97
|
*/
|
|
92
|
-
|
|
98
|
+
readonly readonly: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
93
99
|
/**
|
|
94
|
-
*
|
|
100
|
+
* When `true`, the user must enter a value before the owning form can be submitted.
|
|
101
|
+
* @default false
|
|
95
102
|
*/
|
|
96
|
-
|
|
103
|
+
readonly required: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
104
|
+
/** Name of the hidden input rendered by `[rdxNumberFieldHiddenInput]`, for form submission. */
|
|
105
|
+
readonly name: _angular_core.InputSignal<string | undefined>;
|
|
106
|
+
/** Id of the form the hidden input belongs to. Useful when it is rendered outside the form. */
|
|
107
|
+
readonly form: _angular_core.InputSignal<string | undefined>;
|
|
108
|
+
/** The uncontrolled value of the field when it is initially rendered. */
|
|
109
|
+
readonly defaultValue: _angular_core.InputSignal<number | undefined>;
|
|
110
|
+
/** The controlled value of the field. Use with `(onValueChange)` or two-way `[(value)]`. */
|
|
111
|
+
readonly value: _angular_core.ModelSignal<number | null>;
|
|
112
|
+
/** Emitted when the value changes (during interaction or programmatically). */
|
|
113
|
+
readonly onValueChange: _angular_core.OutputEmitterRef<number | null>;
|
|
97
114
|
/**
|
|
98
|
-
*
|
|
115
|
+
* Emitted when the value is committed: on blur after typing, or when a pointer is released
|
|
116
|
+
* after scrubbing or pressing a button. Fires together with `onValueChange` for keyboard input.
|
|
99
117
|
*/
|
|
100
|
-
|
|
118
|
+
readonly onValueCommitted: _angular_core.OutputEmitterRef<number | null>;
|
|
119
|
+
/** @ignore The formatted text shown in the input element. */
|
|
120
|
+
readonly inputValue: _angular_core.WritableSignal<string>;
|
|
121
|
+
/** @ignore Whether a scrub gesture is in progress. */
|
|
122
|
+
readonly isScrubbing: _angular_core.WritableSignal<boolean>;
|
|
123
|
+
/** @ignore The native input element, registered by `[rdxNumberFieldInput]`. */
|
|
124
|
+
readonly inputEl: _angular_core.WritableSignal<HTMLInputElement | undefined>;
|
|
101
125
|
/**
|
|
102
|
-
* @ignore
|
|
126
|
+
* @ignore Gate that prevents the formatted value from overwriting in-progress typing.
|
|
127
|
+
* Plain field (not a signal): it is toggled imperatively inside event handlers.
|
|
103
128
|
*/
|
|
104
|
-
|
|
129
|
+
allowInputSync: boolean;
|
|
130
|
+
/** @ignore Last value produced by `setValue`, used to report the committed value. */
|
|
131
|
+
lastChangedValue: number | null;
|
|
132
|
+
/** @ignore Whether a programmatic change is awaiting a commit. */
|
|
133
|
+
hasPendingCommit: boolean;
|
|
134
|
+
/** @ignore */
|
|
135
|
+
readonly isDisabled: _angular_core.Signal<boolean>;
|
|
136
|
+
private readonly formatter;
|
|
137
|
+
private readonly parser;
|
|
138
|
+
/** @ignore The current numeric value (`null` when empty). */
|
|
139
|
+
readonly currentValue: _angular_core.Signal<number | null>;
|
|
140
|
+
/** @ignore */
|
|
141
|
+
readonly minWithDefault: _angular_core.Signal<number>;
|
|
142
|
+
/** @ignore */
|
|
143
|
+
readonly maxWithDefault: _angular_core.Signal<number>;
|
|
144
|
+
/** @ignore */
|
|
145
|
+
readonly minWithZeroDefault: _angular_core.Signal<number>;
|
|
146
|
+
/** @ignore Whether incrementing further is a no-op (value already at max). */
|
|
147
|
+
readonly isIncrementDisabled: _angular_core.Signal<boolean>;
|
|
148
|
+
/** @ignore Whether decrementing further is a no-op (value already at min). */
|
|
149
|
+
readonly isDecrementDisabled: _angular_core.Signal<boolean>;
|
|
150
|
+
/** @ignore Software-keyboard hint based on whether the format allows fractional digits. */
|
|
151
|
+
readonly inputMode: _angular_core.Signal<InputMode>;
|
|
152
|
+
constructor();
|
|
153
|
+
/** @ignore Formats a numeric value to its display string (empty for `null`/`NaN`). */
|
|
154
|
+
formatNumber(value: number | null): string;
|
|
155
|
+
/** @ignore Parses a display string to a number, returning `null` when not parseable. */
|
|
156
|
+
parseNumber(text: string): number | null;
|
|
157
|
+
/** @ignore Whether `text` is a valid partial number for the current locale and bounds. */
|
|
158
|
+
isValidPartial(text: string): boolean;
|
|
159
|
+
/** @ignore The step magnitude for an interaction, honouring Alt (small) and Shift (large). */
|
|
160
|
+
getStepAmount(event?: {
|
|
161
|
+
altKey?: boolean;
|
|
162
|
+
shiftKey?: boolean;
|
|
163
|
+
}): number;
|
|
164
|
+
/** @ignore Registers the native input element. */
|
|
165
|
+
registerInput(el: HTMLInputElement): void;
|
|
166
|
+
/** @ignore Sets the displayed text without changing the numeric value. */
|
|
167
|
+
setInputValue(text: string): void;
|
|
168
|
+
/** @ignore */
|
|
169
|
+
markAsTouched(): void;
|
|
105
170
|
/**
|
|
106
171
|
* @ignore
|
|
172
|
+
* Validates and applies a candidate value, emitting `onValueChange` when it changes.
|
|
173
|
+
* Returns whether a change was fired.
|
|
107
174
|
*/
|
|
108
|
-
|
|
175
|
+
setValue(unvalidatedValue: number | null, reason: NumberFieldChangeReason, event?: Event, direction?: Direction): boolean;
|
|
109
176
|
/**
|
|
110
177
|
* @ignore
|
|
178
|
+
* Increments (or decrements) the value by `amount * direction`, starting from `currentValue`
|
|
179
|
+
* when supplied (the live, possibly-dirty input value) or the committed value otherwise.
|
|
111
180
|
*/
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
181
|
+
incrementValue(amount: number, params: {
|
|
182
|
+
direction: Direction;
|
|
183
|
+
currentValue?: number | null;
|
|
184
|
+
event?: Event;
|
|
185
|
+
reason: NumberFieldChangeReason;
|
|
186
|
+
}): boolean;
|
|
187
|
+
/** @ignore Emits the committed value at the end of an interaction. */
|
|
188
|
+
commitValue(value: number | null): void;
|
|
189
|
+
private applyValue;
|
|
190
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxNumberFieldRoot, never>;
|
|
191
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxNumberFieldRoot, "div[rdxNumberFieldRoot]", ["rdxNumberFieldRoot"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "smallStep": { "alias": "smallStep"; "required": false; "isSignal": true; }; "largeStep": { "alias": "largeStep"; "required": false; "isSignal": true; }; "snapOnStep": { "alias": "snapOnStep"; "required": false; "isSignal": true; }; "allowOutOfRange": { "alias": "allowOutOfRange"; "required": false; "isSignal": true; }; "allowWheelScrub": { "alias": "allowWheelScrub"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "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; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "onValueChange": "onValueChange"; "onValueCommitted": "onValueCommitted"; }, never, never, true, [{ directive: typeof i1.RdxControlValueAccessor; inputs: { "value": "value"; "disabled": "disabled"; }; outputs: {}; }]>;
|
|
116
192
|
}
|
|
117
193
|
|
|
118
|
-
|
|
194
|
+
/**
|
|
195
|
+
* Groups the input with the increment and decrement buttons.
|
|
196
|
+
*
|
|
197
|
+
* @see https://base-ui.com/react/components/number-field
|
|
198
|
+
*/
|
|
199
|
+
declare class RdxNumberFieldGroup {
|
|
200
|
+
protected readonly rootContext: _radix_ng_primitives_number_field.RdxNumberFieldRoot;
|
|
201
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxNumberFieldGroup, never>;
|
|
202
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxNumberFieldGroup, "div[rdxNumberFieldGroup]", ["rdxNumberFieldGroup"], {}, {}, never, never, true, never>;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* The native text input that displays the formatted value and accepts typed input.
|
|
207
|
+
*
|
|
208
|
+
* @see https://base-ui.com/react/components/number-field
|
|
209
|
+
*/
|
|
210
|
+
declare class RdxNumberFieldInput {
|
|
119
211
|
private readonly elementRef;
|
|
120
|
-
protected readonly rootContext: _radix_ng_primitives_number_field.
|
|
121
|
-
|
|
212
|
+
protected readonly rootContext: _radix_ng_primitives_number_field.RdxNumberFieldRoot;
|
|
213
|
+
/** Browsers place the caret at the start; we move it to the end on the first focus. */
|
|
214
|
+
private hasTouchedInput;
|
|
122
215
|
constructor();
|
|
123
|
-
|
|
124
|
-
onBeforeInput(event:
|
|
125
|
-
onWheelEvent(event: WheelEvent): void;
|
|
126
|
-
onKeydownPageUp(event: Event): void;
|
|
127
|
-
onKeydownPageDown(event: Event): void;
|
|
128
|
-
onKeydownHome(event: Event): void;
|
|
129
|
-
onKeydownEnd(event: Event): void;
|
|
216
|
+
onFocus(event: FocusEvent): void;
|
|
217
|
+
onBeforeInput(event: InputEvent): void;
|
|
130
218
|
onInput(event: Event): void;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
136
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<
|
|
219
|
+
onKeydown(event: KeyboardEvent): void;
|
|
220
|
+
onPaste(event: ClipboardEvent): void;
|
|
221
|
+
onBlur(event: FocusEvent): void;
|
|
222
|
+
onWheel(event: WheelEvent): void;
|
|
223
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxNumberFieldInput, never>;
|
|
224
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxNumberFieldInput, "input[rdxNumberFieldInput]", ["rdxNumberFieldInput"], {}, {}, never, never, true, never>;
|
|
137
225
|
}
|
|
138
226
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
readonly
|
|
227
|
+
/**
|
|
228
|
+
* The hidden native `input[type=number]` that mirrors the field value for native form submission
|
|
229
|
+
* and browser constraint validation (min/max/step/required). Place it inside the root, alongside
|
|
230
|
+
* the visible `[rdxNumberFieldInput]`.
|
|
231
|
+
*
|
|
232
|
+
* @see https://base-ui.com/react/components/number-field
|
|
233
|
+
*/
|
|
234
|
+
declare class RdxNumberFieldHiddenInput {
|
|
235
|
+
protected readonly rootContext: _radix_ng_primitives_number_field.RdxNumberFieldRoot;
|
|
236
|
+
/** Move focus to the visible input when the hidden one is focused (e.g. via form validation). */
|
|
237
|
+
onFocus(): void;
|
|
238
|
+
/** Handle browser autofill, which writes directly to the hidden numeric input. */
|
|
239
|
+
onChange(event: Event): void;
|
|
240
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxNumberFieldHiddenInput, never>;
|
|
241
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxNumberFieldHiddenInput, "input[rdxNumberFieldHiddenInput]", ["rdxNumberFieldHiddenInput"], {}, {}, never, never, true, never>;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Coerces an optional numeric input, returning `undefined` for nullish/empty/non-numeric values.
|
|
246
|
+
* Unlike `numberAttribute`, `numberOrUndefined(undefined)` is `undefined` (not `NaN`), so an unset
|
|
247
|
+
* `[min]`/`[max]` does not poison clamping.
|
|
248
|
+
*/
|
|
249
|
+
declare function numberOrUndefined(value: NumberInput): number | undefined;
|
|
250
|
+
/** Default step used when no `step` is provided. */
|
|
251
|
+
declare const DEFAULT_STEP = 1;
|
|
252
|
+
/** Delay between auto-repeat ticks while holding an increment/decrement button. */
|
|
253
|
+
declare const CHANGE_VALUE_TICK_DELAY = 60;
|
|
254
|
+
/** Delay before auto-repeat starts while holding an increment/decrement button. */
|
|
255
|
+
declare const START_AUTO_CHANGE_DELAY = 400;
|
|
256
|
+
/** Pointer travel (px) that cancels a hold, treating the gesture as a scroll. */
|
|
257
|
+
declare const SCROLLING_POINTER_MOVE_DISTANCE = 8;
|
|
258
|
+
/** Reactive `Intl`-backed formatter built from the current locale and format options. */
|
|
259
|
+
declare function useNumberFormatter(locale: Signal<string>, options?: Signal<Intl.NumberFormatOptions | undefined>): Signal<NumberFormatter>;
|
|
260
|
+
/** Reactive `Intl`-backed parser built from the current locale and format options. */
|
|
261
|
+
declare function useNumberParser(locale: Signal<string>, options?: Signal<Intl.NumberFormatOptions | undefined>): Signal<NumberParser>;
|
|
262
|
+
/** Whether the format options would cause `Intl.NumberFormat` to round the value. */
|
|
263
|
+
declare function hasNumberFormatRoundingOptions(format?: Intl.NumberFormatOptions): boolean;
|
|
264
|
+
/**
|
|
265
|
+
* Strips floating-point representation errors (e.g. `0.1 + 0.2`) using the format's
|
|
266
|
+
* rounding options when present, otherwise rounding to {@link DEFAULT_DIGITS} digits.
|
|
267
|
+
*/
|
|
268
|
+
declare function removeFloatingPointErrors(value: number, locale: string, format?: Intl.NumberFormatOptions): number;
|
|
269
|
+
interface ValidateOptions {
|
|
270
|
+
step: number | undefined;
|
|
271
|
+
minWithDefault: number;
|
|
272
|
+
maxWithDefault: number;
|
|
273
|
+
minWithZeroDefault: number;
|
|
274
|
+
format: Intl.NumberFormatOptions | undefined;
|
|
275
|
+
locale: string;
|
|
276
|
+
snapOnStep: boolean;
|
|
277
|
+
small: boolean;
|
|
278
|
+
clamp: boolean;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Snaps (optionally), clamps (optionally) and rounds an unvalidated value, mirroring
|
|
282
|
+
* Base UI's `toValidatedNumber`. Snapping happens before clamping so non-step-aligned
|
|
283
|
+
* boundaries stay reachable.
|
|
284
|
+
*/
|
|
285
|
+
declare function toValidatedNumber(value: number | null, options: ValidateOptions): number | null;
|
|
286
|
+
interface PressAndHoldOptions {
|
|
287
|
+
/** Whether interaction is currently blocked (disabled or read-only). */
|
|
288
|
+
disabled: () => boolean;
|
|
289
|
+
/** Delay before the first auto-repeat tick. */
|
|
290
|
+
startDelay: number;
|
|
291
|
+
/** Delay between subsequent auto-repeat ticks. */
|
|
292
|
+
tickDelay: number;
|
|
293
|
+
/** Pointer travel (px) that cancels the hold as a scroll. */
|
|
294
|
+
scrollDistance: number;
|
|
295
|
+
/** Runs on each tick; return `false` to stop auto-repeating (e.g. a bound was hit). */
|
|
296
|
+
tick: (event: PointerEvent) => boolean | void;
|
|
297
|
+
/** Runs once when the press ends (pointerup / cancel / scroll). */
|
|
298
|
+
onStop?: (event: PointerEvent) => void;
|
|
299
|
+
}
|
|
300
|
+
interface PressAndHold {
|
|
301
|
+
readonly isPressing: Signal<boolean>;
|
|
302
|
+
onPointerDown(event: PointerEvent): void;
|
|
303
|
+
/** Whether the following synthetic `click` should be ignored (a hold already ticked). */
|
|
304
|
+
shouldSkipClick(): boolean;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Pointer press-and-hold with auto-repeat, modelled on Base UI's `usePressAndHold`.
|
|
308
|
+
* Must be called in an injection context — it registers cleanup via `DestroyRef`.
|
|
309
|
+
*/
|
|
310
|
+
declare function createPressAndHold(options: PressAndHoldOptions): PressAndHold;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Shared behaviour for the increment and decrement stepper buttons: single-press,
|
|
314
|
+
* press-and-hold auto-repeat, and committing a dirty (typed-but-not-blurred) input
|
|
315
|
+
* value before stepping.
|
|
316
|
+
*
|
|
317
|
+
* @see https://base-ui.com/react/components/number-field
|
|
318
|
+
*/
|
|
319
|
+
declare abstract class RdxNumberFieldButton {
|
|
320
|
+
protected readonly rootContext: _radix_ng_primitives_number_field.RdxNumberFieldRoot;
|
|
321
|
+
/** Whether this is the increment (`+1`) button; `false` for decrement (`-1`). */
|
|
322
|
+
protected abstract readonly isIncrement: boolean;
|
|
148
323
|
/**
|
|
149
|
-
*
|
|
324
|
+
* When `true`, the button is disabled in addition to inheriting the root's disabled state.
|
|
325
|
+
* @default false
|
|
150
326
|
*/
|
|
151
|
-
readonly
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
327
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
328
|
+
/** @ignore Disabled for display/focus purposes (own state, root disabled, or bound reached). */
|
|
329
|
+
readonly buttonDisabled: _angular_core.Signal<boolean>;
|
|
330
|
+
/** @ignore Disabled for interaction purposes (also blocked while read-only). */
|
|
331
|
+
private readonly interactionDisabled;
|
|
332
|
+
private get direction();
|
|
333
|
+
private get pressReason();
|
|
334
|
+
/** @ignore */
|
|
335
|
+
readonly press: PressAndHold;
|
|
336
|
+
constructor();
|
|
337
|
+
onClick(event: MouseEvent): void;
|
|
338
|
+
onPointerDown(event: PointerEvent): void;
|
|
339
|
+
/** Commits a typed-but-not-yet-blurred input value so stepping starts from it. */
|
|
340
|
+
private commitDirtyValue;
|
|
341
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxNumberFieldButton, never>;
|
|
342
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxNumberFieldButton, never, never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
158
343
|
}
|
|
159
344
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
345
|
+
/**
|
|
346
|
+
* A stepper button that increases the field value when clicked or held.
|
|
347
|
+
*
|
|
348
|
+
* @see https://base-ui.com/react/components/number-field
|
|
349
|
+
*/
|
|
350
|
+
declare class RdxNumberFieldIncrement extends RdxNumberFieldButton {
|
|
351
|
+
protected readonly isIncrement = true;
|
|
352
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxNumberFieldIncrement, never>;
|
|
353
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxNumberFieldIncrement, "button[rdxNumberFieldIncrement]", ["rdxNumberFieldIncrement"], {}, {}, never, never, true, never>;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* A stepper button that decreases the field value when clicked or held.
|
|
358
|
+
*
|
|
359
|
+
* @see https://base-ui.com/react/components/number-field
|
|
360
|
+
*/
|
|
361
|
+
declare class RdxNumberFieldDecrement extends RdxNumberFieldButton {
|
|
362
|
+
protected readonly isIncrement = false;
|
|
363
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxNumberFieldDecrement, never>;
|
|
364
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxNumberFieldDecrement, "button[rdxNumberFieldDecrement]", ["rdxNumberFieldDecrement"], {}, {}, never, never, true, never>;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
interface RdxNumberFieldScrubAreaContext {
|
|
368
|
+
/** Whether a scrub gesture is currently in progress. */
|
|
369
|
+
readonly isScrubbing: Signal<boolean>;
|
|
370
|
+
/** Whether the active scrub was started with touch input. */
|
|
371
|
+
readonly isTouchInput: Signal<boolean>;
|
|
372
|
+
/** Whether the browser denied the Pointer Lock request. */
|
|
373
|
+
readonly isPointerLockDenied: Signal<boolean>;
|
|
374
|
+
/** Registers (or clears) the virtual cursor element so the scrub area can move it. */
|
|
375
|
+
registerCursor(element: HTMLElement | null): void;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Context shared from the scrub area to its virtual cursor child.
|
|
379
|
+
*
|
|
380
|
+
* @see https://base-ui.com/react/components/number-field
|
|
381
|
+
*/
|
|
382
|
+
declare const injectNumberFieldScrubAreaContext: (optional?: boolean) => RdxNumberFieldScrubAreaContext | null;
|
|
383
|
+
declare const provideNumberFieldScrubAreaContext: (useFactory: () => RdxNumberFieldScrubAreaContext) => _angular_core.Provider;
|
|
384
|
+
|
|
385
|
+
type ScrubDirection = 'horizontal' | 'vertical';
|
|
386
|
+
/**
|
|
387
|
+
* An interactive area where the user can click and drag to change the field value.
|
|
388
|
+
* Uses the Pointer Lock API for continuous dragging (disabled in Safari to avoid layout shift).
|
|
389
|
+
*
|
|
390
|
+
* @see https://base-ui.com/react/components/number-field
|
|
391
|
+
*/
|
|
392
|
+
declare class RdxNumberFieldScrubArea {
|
|
393
|
+
protected readonly rootContext: _radix_ng_primitives_number_field.RdxNumberFieldRoot;
|
|
165
394
|
/**
|
|
166
|
-
*
|
|
395
|
+
* The direction the cursor must move to change the value.
|
|
396
|
+
* @default 'horizontal'
|
|
167
397
|
*/
|
|
168
|
-
readonly
|
|
398
|
+
readonly direction: _angular_core.InputSignal<ScrubDirection>;
|
|
169
399
|
/**
|
|
170
|
-
*
|
|
400
|
+
* How many pixels the cursor must move before the value changes. Higher is less sensitive.
|
|
401
|
+
* @default 2
|
|
402
|
+
*/
|
|
403
|
+
readonly pixelSensitivity: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
404
|
+
/**
|
|
405
|
+
* If set, the distance the cursor may move from the scrub area center before it loops back.
|
|
171
406
|
*/
|
|
172
|
-
readonly
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
407
|
+
readonly teleportDistance: _angular_core.InputSignalWithTransform<number | undefined, NumberInput>;
|
|
408
|
+
protected readonly isScrubbing: _angular_core.WritableSignal<boolean>;
|
|
409
|
+
private readonly isTouchInput;
|
|
410
|
+
private readonly isPointerLockDenied;
|
|
411
|
+
private readonly cursorEl;
|
|
412
|
+
private readonly scrubAreaEl;
|
|
413
|
+
private isScrubbingRef;
|
|
414
|
+
private didMove;
|
|
415
|
+
private pointerDownTarget;
|
|
416
|
+
private virtualCursorCoords;
|
|
417
|
+
private visualScale;
|
|
418
|
+
/** @ignore Exposed to the scrub-area context provider. */
|
|
419
|
+
readonly context: RdxNumberFieldScrubAreaContext;
|
|
420
|
+
private readonly canScrub;
|
|
421
|
+
constructor();
|
|
422
|
+
onPointerDown(event: PointerEvent): Promise<void>;
|
|
423
|
+
onTouchStart(event: TouchEvent): void;
|
|
424
|
+
private onScrub;
|
|
425
|
+
private onScrubbingChange;
|
|
426
|
+
private updateCursorTransform;
|
|
427
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxNumberFieldScrubArea, never>;
|
|
428
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxNumberFieldScrubArea, "[rdxNumberFieldScrubArea]", ["rdxNumberFieldScrubArea"], { "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "pixelSensitivity": { "alias": "pixelSensitivity"; "required": false; "isSignal": true; }; "teleportDistance": { "alias": "teleportDistance"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
179
429
|
}
|
|
180
430
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
431
|
+
/**
|
|
432
|
+
* A custom element shown instead of the native cursor while scrubbing. It is portaled to the
|
|
433
|
+
* document body and positioned with the Pointer Lock API. Hidden in Safari (which would shift
|
|
434
|
+
* layout with the native pointer-lock notification) and for touch input.
|
|
435
|
+
*
|
|
436
|
+
* @see https://base-ui.com/react/components/number-field
|
|
437
|
+
*/
|
|
438
|
+
declare class RdxNumberFieldScrubAreaCursor {
|
|
439
|
+
private readonly elementRef;
|
|
440
|
+
private readonly scrubContext;
|
|
441
|
+
protected readonly shouldRender: _angular_core.Signal<boolean>;
|
|
442
|
+
constructor();
|
|
443
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxNumberFieldScrubAreaCursor, never>;
|
|
444
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxNumberFieldScrubAreaCursor, "[rdxNumberFieldScrubAreaCursor]", ["rdxNumberFieldScrubAreaCursor"], {}, {}, never, never, true, [{ directive: typeof i1$1.RdxPortal; inputs: {}; outputs: {}; }]>;
|
|
192
445
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* The Number Field context exposes the root directive instance to every child part.
|
|
449
|
+
* The root owns all state, parsing/formatting and value-change logic; parts read
|
|
450
|
+
* signals and call methods off it.
|
|
451
|
+
*
|
|
452
|
+
* @see https://base-ui.com/react/components/number-field
|
|
453
|
+
*/
|
|
454
|
+
declare const injectNumberFieldRootContext: (optional?: boolean) => RdxNumberFieldRoot | null;
|
|
455
|
+
declare const provideNumberFieldRootContext: (useFactory: () => RdxNumberFieldRoot) => _angular_core.Provider;
|
|
196
456
|
|
|
197
457
|
declare class RdxNumberFieldModule {
|
|
198
458
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxNumberFieldModule, never>;
|
|
199
|
-
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<RdxNumberFieldModule, never, [typeof
|
|
459
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<RdxNumberFieldModule, never, [typeof RdxNumberFieldRoot, typeof RdxNumberFieldGroup, typeof RdxNumberFieldInput, typeof RdxNumberFieldHiddenInput, typeof RdxNumberFieldIncrement, typeof RdxNumberFieldDecrement, typeof RdxNumberFieldScrubArea, typeof RdxNumberFieldScrubAreaCursor], [typeof RdxNumberFieldRoot, typeof RdxNumberFieldGroup, typeof RdxNumberFieldInput, typeof RdxNumberFieldHiddenInput, typeof RdxNumberFieldIncrement, typeof RdxNumberFieldDecrement, typeof RdxNumberFieldScrubArea, typeof RdxNumberFieldScrubAreaCursor]>;
|
|
200
460
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<RdxNumberFieldModule>;
|
|
201
461
|
}
|
|
202
462
|
|
|
203
|
-
export {
|
|
204
|
-
export type { InputMode,
|
|
463
|
+
export { CHANGE_VALUE_TICK_DELAY, DEFAULT_STEP, REASONS, RdxNumberFieldButton, RdxNumberFieldDecrement, RdxNumberFieldGroup, RdxNumberFieldHiddenInput, RdxNumberFieldIncrement, RdxNumberFieldInput, RdxNumberFieldModule, RdxNumberFieldRoot, RdxNumberFieldScrubArea, RdxNumberFieldScrubAreaCursor, SCROLLING_POINTER_MOVE_DISTANCE, START_AUTO_CHANGE_DELAY, createPressAndHold, hasNumberFormatRoundingOptions, injectNumberFieldRootContext, injectNumberFieldScrubAreaContext, numberOrUndefined, provideNumberFieldRootContext, provideNumberFieldScrubAreaContext, removeFloatingPointErrors, toValidatedNumber, useNumberFormatter, useNumberParser };
|
|
464
|
+
export type { Direction, InputMode, NumberFieldChangeReason, PressAndHold, PressAndHoldOptions, RdxNumberFieldScrubAreaContext, ValidateOptions };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { model, computed
|
|
3
|
-
import { NumberInput, BooleanInput } from '@
|
|
2
|
+
import { InjectionToken, model, computed } from '@angular/core';
|
|
3
|
+
import { NumberInput, BooleanInput } from '@radix-ng/primitives/core';
|
|
4
4
|
|
|
5
5
|
declare class RdxPaginationRootDirective {
|
|
6
6
|
readonly defaultPage: i0.InputSignalWithTransform<number, NumberInput>;
|