@radix-ng/primitives 1.0.5 → 1.0.6
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 +35 -27
- package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs +34 -34
- package/fesm2022/radix-ng-primitives-arrow.mjs +3 -3
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +5 -4
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-autocomplete.mjs +175 -125
- package/fesm2022/radix-ng-primitives-autocomplete.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-avatar.mjs +25 -19
- package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-button.mjs +11 -7
- package/fesm2022/radix-ng-primitives-button.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-calendar.mjs +140 -90
- package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-checkbox.mjs +61 -40
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collapsible.mjs +35 -24
- package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-combobox.mjs +278 -177
- package/fesm2022/radix-ng-primitives-combobox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-composite.mjs +50 -33
- package/fesm2022/radix-ng-primitives-composite.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-config.mjs +7 -5
- package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-context-menu.mjs +48 -22
- package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-core.mjs +44 -28
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-cropper.mjs +73 -45
- package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-date-field.mjs +70 -40
- package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dialog.mjs +93 -67
- package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-direction-provider.mjs +5 -4
- package/fesm2022/radix-ng-primitives-direction-provider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +20 -16
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-drawer.mjs +107 -81
- package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-editable.mjs +53 -39
- package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-field.mjs +69 -42
- package/fesm2022/radix-ng-primitives-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-fieldset.mjs +8 -7
- package/fesm2022/radix-ng-primitives-fieldset.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs +77 -40
- package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-focus-guards.mjs +3 -3
- package/fesm2022/radix-ng-primitives-focus-scope.mjs +7 -5
- package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-form.mjs +25 -16
- package/fesm2022/radix-ng-primitives-form.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-input.mjs +41 -22
- package/fesm2022/radix-ng-primitives-input.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-label.mjs +7 -5
- package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menu.mjs +274 -154
- package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menubar.mjs +35 -17
- package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-meter.mjs +41 -30
- package/fesm2022/radix-ng-primitives-meter.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs +220 -183
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-number-field.mjs +87 -59
- package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-pagination.mjs +48 -38
- package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popover.mjs +150 -107
- package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popper.mjs +79 -47
- package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-portal.mjs +20 -13
- package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-presence.mjs +3 -3
- package/fesm2022/radix-ng-primitives-preview-card.mjs +119 -74
- package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-progress.mjs +43 -31
- package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +58 -35
- package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-scroll-area.mjs +54 -38
- package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-select.mjs +595 -102
- package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-separator.mjs +7 -5
- package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-slider.mjs +101 -63
- package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-stepper.mjs +53 -39
- package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +23 -18
- package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tabs.mjs +72 -47
- package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-time-field.mjs +72 -41
- package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toast.mjs +75 -56
- package/fesm2022/radix-ng-primitives-toast.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +29 -19
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +16 -11
- package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toolbar.mjs +38 -30
- package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tooltip.mjs +118 -63
- package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs +31 -20
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
- package/package.json +2 -2
- package/types/radix-ng-primitives-autocomplete.d.ts +3 -1
- package/types/radix-ng-primitives-combobox.d.ts +28 -9
- package/types/radix-ng-primitives-context-menu.d.ts +2 -0
- package/types/radix-ng-primitives-dialog.d.ts +6 -3
- package/types/radix-ng-primitives-floating-focus-manager.d.ts +11 -0
- package/types/radix-ng-primitives-menu.d.ts +47 -15
- package/types/radix-ng-primitives-menubar.d.ts +6 -1
- package/types/radix-ng-primitives-navigation-menu.d.ts +8 -6
- package/types/radix-ng-primitives-popover.d.ts +12 -4
- package/types/radix-ng-primitives-preview-card.d.ts +18 -5
- package/types/radix-ng-primitives-select.d.ts +186 -391
- package/types/radix-ng-primitives-tooltip.d.ts +17 -3
|
@@ -122,7 +122,8 @@ function toValidatedNumber(value, options) {
|
|
|
122
122
|
*/
|
|
123
123
|
function createPressAndHold(options) {
|
|
124
124
|
const destroyRef = inject(DestroyRef);
|
|
125
|
-
const isPressing = signal(false,
|
|
125
|
+
const isPressing = signal(false, /* @ts-ignore */
|
|
126
|
+
...(ngDevMode ? [{ debugName: "isPressing" }] : /* istanbul ignore next */ []));
|
|
126
127
|
let startEvent = null;
|
|
127
128
|
let startX = 0;
|
|
128
129
|
let startY = 0;
|
|
@@ -221,9 +222,11 @@ class RdxNumberFieldButton {
|
|
|
221
222
|
/** @ignore Disabled for display/focus purposes (own state, root disabled, or bound reached). */
|
|
222
223
|
this.buttonDisabled = computed(() => this.disabled() ||
|
|
223
224
|
this.rootContext.isDisabled() ||
|
|
224
|
-
(this.isIncrement ? this.rootContext.isIncrementDisabled() : this.rootContext.isDecrementDisabled()),
|
|
225
|
+
(this.isIncrement ? this.rootContext.isIncrementDisabled() : this.rootContext.isDecrementDisabled()), /* @ts-ignore */
|
|
226
|
+
...(ngDevMode ? [{ debugName: "buttonDisabled" }] : /* istanbul ignore next */ []));
|
|
225
227
|
/** @ignore Disabled for interaction purposes (also blocked while read-only). */
|
|
226
|
-
this.interactionDisabled = computed(() => this.buttonDisabled() || this.rootContext.readonly(),
|
|
228
|
+
this.interactionDisabled = computed(() => this.buttonDisabled() || this.rootContext.readonly(), /* @ts-ignore */
|
|
229
|
+
...(ngDevMode ? [{ debugName: "interactionDisabled" }] : /* istanbul ignore next */ []));
|
|
227
230
|
const root = this.rootContext;
|
|
228
231
|
this.press = createPressAndHold({
|
|
229
232
|
disabled: () => this.interactionDisabled(),
|
|
@@ -280,10 +283,10 @@ class RdxNumberFieldButton {
|
|
|
280
283
|
root.setValue(parsed, this.pressReason, event, this.direction);
|
|
281
284
|
}
|
|
282
285
|
}
|
|
283
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
284
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
286
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldButton, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
287
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxNumberFieldButton, isStandalone: true, inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button", "tabindex": "-1" }, listeners: { "click": "onClick($event)", "pointerdown": "onPointerDown($event)", "contextmenu": "$event.preventDefault()" }, properties: { "attr.aria-controls": "rootContext.id()", "attr.aria-readonly": "rootContext.readonly() ? \"true\" : undefined", "attr.disabled": "buttonDisabled() ? \"\" : undefined", "attr.data-disabled": "buttonDisabled() ? \"\" : undefined", "attr.data-pressed": "press.isPressing() ? \"\" : undefined", "style.user-select": "\"none\"", "style.-webkit-user-select": "\"none\"" } }, ngImport: i0 }); }
|
|
285
288
|
}
|
|
286
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
289
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldButton, decorators: [{
|
|
287
290
|
type: Directive,
|
|
288
291
|
args: [{
|
|
289
292
|
host: {
|
|
@@ -313,10 +316,10 @@ class RdxNumberFieldDecrement extends RdxNumberFieldButton {
|
|
|
313
316
|
super(...arguments);
|
|
314
317
|
this.isIncrement = false;
|
|
315
318
|
}
|
|
316
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
317
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
319
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldDecrement, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
320
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxNumberFieldDecrement, isStandalone: true, selector: "button[rdxNumberFieldDecrement]", host: { attributes: { "aria-label": "Decrease" } }, exportAs: ["rdxNumberFieldDecrement"], usesInheritance: true, ngImport: i0 }); }
|
|
318
321
|
}
|
|
319
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
322
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldDecrement, decorators: [{
|
|
320
323
|
type: Directive,
|
|
321
324
|
args: [{
|
|
322
325
|
selector: 'button[rdxNumberFieldDecrement]',
|
|
@@ -336,10 +339,10 @@ class RdxNumberFieldGroup {
|
|
|
336
339
|
constructor() {
|
|
337
340
|
this.rootContext = injectNumberFieldRootContext();
|
|
338
341
|
}
|
|
339
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
340
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
342
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
343
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxNumberFieldGroup, isStandalone: true, selector: "div[rdxNumberFieldGroup]", host: { attributes: { "role": "group" }, properties: { "attr.data-disabled": "rootContext.isDisabled() ? \"\" : undefined", "attr.data-readonly": "rootContext.readonly() ? \"\" : undefined", "attr.data-required": "rootContext.required() ? \"\" : undefined", "attr.data-scrubbing": "rootContext.isScrubbing() ? \"\" : undefined" } }, exportAs: ["rdxNumberFieldGroup"], ngImport: i0 }); }
|
|
341
344
|
}
|
|
342
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
345
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldGroup, decorators: [{
|
|
343
346
|
type: Directive,
|
|
344
347
|
args: [{
|
|
345
348
|
selector: 'div[rdxNumberFieldGroup]',
|
|
@@ -381,10 +384,10 @@ class RdxNumberFieldHiddenInput {
|
|
|
381
384
|
root.setValue(parsedValue, 'none', event);
|
|
382
385
|
root.commitValue(root.lastChangedValue ?? root.currentValue());
|
|
383
386
|
}
|
|
384
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
385
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
387
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldHiddenInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
388
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxNumberFieldHiddenInput, isStandalone: true, selector: "input[rdxNumberFieldHiddenInput]", host: { attributes: { "type": "number", "tabindex": "-1", "aria-hidden": "true" }, listeners: { "focus": "onFocus()", "change": "onChange($event)" }, properties: { "attr.name": "rootContext.name()", "attr.form": "rootContext.form()", "value": "rootContext.currentValue() ?? \"\"", "attr.min": "rootContext.min()", "attr.max": "rootContext.max()", "attr.step": "rootContext.step()", "disabled": "rootContext.isDisabled()", "attr.required": "rootContext.required() ? \"\" : undefined" }, styleAttribute: "transform: translateX(-100%); position: absolute; overflow: hidden; pointer-events: none; opacity: 0; margin: 0;" }, exportAs: ["rdxNumberFieldHiddenInput"], ngImport: i0 }); }
|
|
386
389
|
}
|
|
387
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldHiddenInput, decorators: [{
|
|
388
391
|
type: Directive,
|
|
389
392
|
args: [{
|
|
390
393
|
selector: 'input[rdxNumberFieldHiddenInput]',
|
|
@@ -418,10 +421,10 @@ class RdxNumberFieldIncrement extends RdxNumberFieldButton {
|
|
|
418
421
|
super(...arguments);
|
|
419
422
|
this.isIncrement = true;
|
|
420
423
|
}
|
|
421
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
422
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
424
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldIncrement, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
425
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxNumberFieldIncrement, isStandalone: true, selector: "button[rdxNumberFieldIncrement]", host: { attributes: { "aria-label": "Increase" } }, exportAs: ["rdxNumberFieldIncrement"], usesInheritance: true, ngImport: i0 }); }
|
|
423
426
|
}
|
|
424
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
427
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldIncrement, decorators: [{
|
|
425
428
|
type: Directive,
|
|
426
429
|
args: [{
|
|
427
430
|
selector: 'button[rdxNumberFieldIncrement]',
|
|
@@ -581,10 +584,10 @@ class RdxNumberFieldInput {
|
|
|
581
584
|
reason: 'wheel'
|
|
582
585
|
});
|
|
583
586
|
}
|
|
584
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
585
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
587
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
588
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxNumberFieldInput, isStandalone: true, selector: "input[rdxNumberFieldInput]", host: { attributes: { "type": "text", "autocomplete": "off", "autocorrect": "off", "spellcheck": "false", "aria-roledescription": "Number field" }, listeners: { "focus": "onFocus($event)", "blur": "onBlur($event)", "input": "onInput($event)", "beforeinput": "onBeforeInput($event)", "keydown": "onKeydown($event)", "paste": "onPaste($event)", "wheel": "onWheel($event)" }, properties: { "id": "rootContext.id()", "value": "rootContext.inputValue()", "attr.inputmode": "rootContext.inputMode()", "attr.aria-invalid": "rootContext.required() && rootContext.currentValue() === null ? \"true\" : undefined", "disabled": "rootContext.isDisabled()", "attr.readonly": "rootContext.readonly() ? \"\" : undefined", "required": "rootContext.required()", "attr.data-disabled": "rootContext.isDisabled() ? \"\" : undefined", "attr.data-readonly": "rootContext.readonly() ? \"\" : undefined", "attr.data-required": "rootContext.required() ? \"\" : undefined" } }, exportAs: ["rdxNumberFieldInput"], ngImport: i0 }); }
|
|
586
589
|
}
|
|
587
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
590
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldInput, decorators: [{
|
|
588
591
|
type: Directive,
|
|
589
592
|
args: [{
|
|
590
593
|
selector: 'input[rdxNumberFieldInput]',
|
|
@@ -648,7 +651,8 @@ class RdxNumberFieldRoot {
|
|
|
648
651
|
/** @ignore */
|
|
649
652
|
this.cva = injectControlValueAccessor();
|
|
650
653
|
/** The id of the input element. */
|
|
651
|
-
this.id = input(injectId('rdx-number-field-'),
|
|
654
|
+
this.id = input(injectId('rdx-number-field-'), /* @ts-ignore */
|
|
655
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
652
656
|
/** The minimum value of the field. */
|
|
653
657
|
this.min = input(undefined, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: numberOrUndefined });
|
|
654
658
|
/** The maximum value of the field. */
|
|
@@ -685,9 +689,11 @@ class RdxNumberFieldRoot {
|
|
|
685
689
|
*/
|
|
686
690
|
this.allowWheelScrub = input(false, { ...(ngDevMode ? { debugName: "allowWheelScrub" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
687
691
|
/** Options used to format the input value (forwarded to `Intl.NumberFormat`). */
|
|
688
|
-
this.format = input(
|
|
692
|
+
this.format = input(/* @ts-ignore */
|
|
693
|
+
...(ngDevMode ? [undefined, { debugName: "format" }] : /* istanbul ignore next */ []));
|
|
689
694
|
/** The locale used to parse and format the value. */
|
|
690
|
-
this.locale = input('en',
|
|
695
|
+
this.locale = input('en', /* @ts-ignore */
|
|
696
|
+
...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
|
|
691
697
|
/**
|
|
692
698
|
* When `true`, the user cannot interact with the field.
|
|
693
699
|
* @default false
|
|
@@ -704,13 +710,17 @@ class RdxNumberFieldRoot {
|
|
|
704
710
|
*/
|
|
705
711
|
this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
706
712
|
/** Name of the hidden input rendered by `[rdxNumberFieldHiddenInput]`, for form submission. */
|
|
707
|
-
this.name = input(
|
|
713
|
+
this.name = input(/* @ts-ignore */
|
|
714
|
+
...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
|
|
708
715
|
/** Id of the form the hidden input belongs to. Useful when it is rendered outside the form. */
|
|
709
|
-
this.form = input(
|
|
716
|
+
this.form = input(/* @ts-ignore */
|
|
717
|
+
...(ngDevMode ? [undefined, { debugName: "form" }] : /* istanbul ignore next */ []));
|
|
710
718
|
/** The uncontrolled value of the field when it is initially rendered. */
|
|
711
|
-
this.defaultValue = input(
|
|
719
|
+
this.defaultValue = input(/* @ts-ignore */
|
|
720
|
+
...(ngDevMode ? [undefined, { debugName: "defaultValue" }] : /* istanbul ignore next */ []));
|
|
712
721
|
/** The controlled value of the field. Use with `(onValueChange)` or two-way `[(value)]`. */
|
|
713
|
-
this.value = model(null,
|
|
722
|
+
this.value = model(null, /* @ts-ignore */
|
|
723
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
714
724
|
/** Emitted when the value changes (during interaction or programmatically). */
|
|
715
725
|
this.onValueChange = output();
|
|
716
726
|
/**
|
|
@@ -719,11 +729,14 @@ class RdxNumberFieldRoot {
|
|
|
719
729
|
*/
|
|
720
730
|
this.onValueCommitted = output();
|
|
721
731
|
/** @ignore The formatted text shown in the input element. */
|
|
722
|
-
this.inputValue = signal('',
|
|
732
|
+
this.inputValue = signal('', /* @ts-ignore */
|
|
733
|
+
...(ngDevMode ? [{ debugName: "inputValue" }] : /* istanbul ignore next */ []));
|
|
723
734
|
/** @ignore Whether a scrub gesture is in progress. */
|
|
724
|
-
this.isScrubbing = signal(false,
|
|
735
|
+
this.isScrubbing = signal(false, /* @ts-ignore */
|
|
736
|
+
...(ngDevMode ? [{ debugName: "isScrubbing" }] : /* istanbul ignore next */ []));
|
|
725
737
|
/** @ignore The native input element, registered by `[rdxNumberFieldInput]`. */
|
|
726
|
-
this.inputEl = signal(undefined,
|
|
738
|
+
this.inputEl = signal(undefined, /* @ts-ignore */
|
|
739
|
+
...(ngDevMode ? [{ debugName: "inputEl" }] : /* istanbul ignore next */ []));
|
|
727
740
|
/**
|
|
728
741
|
* @ignore Gate that prevents the formatted value from overwriting in-progress typing.
|
|
729
742
|
* Plain field (not a signal): it is toggled imperatively inside event handlers.
|
|
@@ -734,32 +747,40 @@ class RdxNumberFieldRoot {
|
|
|
734
747
|
/** @ignore Whether a programmatic change is awaiting a commit. */
|
|
735
748
|
this.hasPendingCommit = false;
|
|
736
749
|
/** @ignore */
|
|
737
|
-
this.isDisabled = computed(() => !!this.cva.disabled(),
|
|
750
|
+
this.isDisabled = computed(() => !!this.cva.disabled(), /* @ts-ignore */
|
|
751
|
+
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
738
752
|
this.formatter = useNumberFormatter(this.locale, this.format);
|
|
739
753
|
this.parser = useNumberParser(this.locale, this.format);
|
|
740
754
|
/** @ignore The current numeric value (`null` when empty). */
|
|
741
|
-
this.currentValue = computed(() => this.cva.value() ?? null,
|
|
755
|
+
this.currentValue = computed(() => this.cva.value() ?? null, /* @ts-ignore */
|
|
756
|
+
...(ngDevMode ? [{ debugName: "currentValue" }] : /* istanbul ignore next */ []));
|
|
742
757
|
/** @ignore */
|
|
743
|
-
this.minWithDefault = computed(() => this.min() ?? Number.MIN_SAFE_INTEGER,
|
|
758
|
+
this.minWithDefault = computed(() => this.min() ?? Number.MIN_SAFE_INTEGER, /* @ts-ignore */
|
|
759
|
+
...(ngDevMode ? [{ debugName: "minWithDefault" }] : /* istanbul ignore next */ []));
|
|
744
760
|
/** @ignore */
|
|
745
|
-
this.maxWithDefault = computed(() => this.max() ?? Number.MAX_SAFE_INTEGER,
|
|
761
|
+
this.maxWithDefault = computed(() => this.max() ?? Number.MAX_SAFE_INTEGER, /* @ts-ignore */
|
|
762
|
+
...(ngDevMode ? [{ debugName: "maxWithDefault" }] : /* istanbul ignore next */ []));
|
|
746
763
|
/** @ignore */
|
|
747
|
-
this.minWithZeroDefault = computed(() => this.min() ?? 0,
|
|
764
|
+
this.minWithZeroDefault = computed(() => this.min() ?? 0, /* @ts-ignore */
|
|
765
|
+
...(ngDevMode ? [{ debugName: "minWithZeroDefault" }] : /* istanbul ignore next */ []));
|
|
748
766
|
/** @ignore Whether incrementing further is a no-op (value already at max). */
|
|
749
767
|
this.isIncrementDisabled = computed(() => {
|
|
750
768
|
const value = this.currentValue();
|
|
751
769
|
return value != null && value >= this.maxWithDefault();
|
|
752
|
-
},
|
|
770
|
+
}, /* @ts-ignore */
|
|
771
|
+
...(ngDevMode ? [{ debugName: "isIncrementDisabled" }] : /* istanbul ignore next */ []));
|
|
753
772
|
/** @ignore Whether decrementing further is a no-op (value already at min). */
|
|
754
773
|
this.isDecrementDisabled = computed(() => {
|
|
755
774
|
const value = this.currentValue();
|
|
756
775
|
return value != null && value <= this.minWithDefault();
|
|
757
|
-
},
|
|
776
|
+
}, /* @ts-ignore */
|
|
777
|
+
...(ngDevMode ? [{ debugName: "isDecrementDisabled" }] : /* istanbul ignore next */ []));
|
|
758
778
|
/** @ignore Software-keyboard hint based on whether the format allows fractional digits. */
|
|
759
779
|
this.inputMode = computed(() => {
|
|
760
780
|
const hasDecimals = (this.formatter().resolvedOptions().maximumFractionDigits ?? 0) > 0;
|
|
761
781
|
return hasDecimals ? 'decimal' : 'numeric';
|
|
762
|
-
},
|
|
782
|
+
}, /* @ts-ignore */
|
|
783
|
+
...(ngDevMode ? [{ debugName: "inputMode" }] : /* istanbul ignore next */ []));
|
|
763
784
|
// Apply the uncontrolled initial value once it is provided.
|
|
764
785
|
effect(() => {
|
|
765
786
|
const dv = this.defaultValue();
|
|
@@ -878,10 +899,10 @@ class RdxNumberFieldRoot {
|
|
|
878
899
|
this.value.set(value);
|
|
879
900
|
this.cva.setValue(value);
|
|
880
901
|
}
|
|
881
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
882
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
902
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
903
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxNumberFieldRoot, isStandalone: true, selector: "div[rdxNumberFieldRoot]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, smallStep: { classPropertyName: "smallStep", publicName: "smallStep", isSignal: true, isRequired: false, transformFunction: null }, largeStep: { classPropertyName: "largeStep", publicName: "largeStep", isSignal: true, isRequired: false, transformFunction: null }, snapOnStep: { classPropertyName: "snapOnStep", publicName: "snapOnStep", isSignal: true, isRequired: false, transformFunction: null }, allowOutOfRange: { classPropertyName: "allowOutOfRange", publicName: "allowOutOfRange", isSignal: true, isRequired: false, transformFunction: null }, allowWheelScrub: { classPropertyName: "allowWheelScrub", publicName: "allowWheelScrub", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", onValueChange: "onValueChange", onValueCommitted: "onValueCommitted" }, host: { attributes: { "role": "group" }, properties: { "attr.data-disabled": "isDisabled() ? \"\" : undefined", "attr.data-readonly": "readonly() ? \"\" : undefined", "attr.data-required": "required() ? \"\" : undefined", "attr.data-scrubbing": "isScrubbing() ? \"\" : undefined" } }, providers: [provideNumberFieldRootContext(() => inject(RdxNumberFieldRoot))], exportAs: ["rdxNumberFieldRoot"], hostDirectives: [{ directive: i1.RdxControlValueAccessor, inputs: ["value", "value", "disabled", "disabled"] }], ngImport: i0 }); }
|
|
883
904
|
}
|
|
884
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
905
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldRoot, decorators: [{
|
|
885
906
|
type: Directive,
|
|
886
907
|
args: [{
|
|
887
908
|
selector: 'div[rdxNumberFieldRoot]',
|
|
@@ -954,7 +975,8 @@ class RdxNumberFieldScrubArea {
|
|
|
954
975
|
* The direction the cursor must move to change the value.
|
|
955
976
|
* @default 'horizontal'
|
|
956
977
|
*/
|
|
957
|
-
this.direction = input('horizontal',
|
|
978
|
+
this.direction = input('horizontal', /* @ts-ignore */
|
|
979
|
+
...(ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []));
|
|
958
980
|
/**
|
|
959
981
|
* How many pixels the cursor must move before the value changes. Higher is less sensitive.
|
|
960
982
|
* @default 2
|
|
@@ -964,10 +986,14 @@ class RdxNumberFieldScrubArea {
|
|
|
964
986
|
* If set, the distance the cursor may move from the scrub area center before it loops back.
|
|
965
987
|
*/
|
|
966
988
|
this.teleportDistance = input(undefined, { ...(ngDevMode ? { debugName: "teleportDistance" } : /* istanbul ignore next */ {}), transform: numberOrUndefined });
|
|
967
|
-
this.isScrubbing = signal(false,
|
|
968
|
-
|
|
969
|
-
this.
|
|
970
|
-
|
|
989
|
+
this.isScrubbing = signal(false, /* @ts-ignore */
|
|
990
|
+
...(ngDevMode ? [{ debugName: "isScrubbing" }] : /* istanbul ignore next */ []));
|
|
991
|
+
this.isTouchInput = signal(false, /* @ts-ignore */
|
|
992
|
+
...(ngDevMode ? [{ debugName: "isTouchInput" }] : /* istanbul ignore next */ []));
|
|
993
|
+
this.isPointerLockDenied = signal(false, /* @ts-ignore */
|
|
994
|
+
...(ngDevMode ? [{ debugName: "isPointerLockDenied" }] : /* istanbul ignore next */ []));
|
|
995
|
+
this.cursorEl = signal(null, /* @ts-ignore */
|
|
996
|
+
...(ngDevMode ? [{ debugName: "cursorEl" }] : /* istanbul ignore next */ []));
|
|
971
997
|
this.scrubAreaEl = inject(ElementRef).nativeElement;
|
|
972
998
|
this.isScrubbingRef = false;
|
|
973
999
|
this.didMove = false;
|
|
@@ -981,7 +1007,8 @@ class RdxNumberFieldScrubArea {
|
|
|
981
1007
|
isPointerLockDenied: this.isPointerLockDenied.asReadonly(),
|
|
982
1008
|
registerCursor: (el) => this.cursorEl.set(el)
|
|
983
1009
|
};
|
|
984
|
-
this.canScrub = computed(() => !this.rootContext.isDisabled() && !this.rootContext.readonly(),
|
|
1010
|
+
this.canScrub = computed(() => !this.rootContext.isDisabled() && !this.rootContext.readonly(), /* @ts-ignore */
|
|
1011
|
+
...(ngDevMode ? [{ debugName: "canScrub" }] : /* istanbul ignore next */ []));
|
|
985
1012
|
const root = this.rootContext;
|
|
986
1013
|
// Register global listeners only while actively scrubbing.
|
|
987
1014
|
effect((onCleanup) => {
|
|
@@ -1145,10 +1172,10 @@ class RdxNumberFieldScrubArea {
|
|
|
1145
1172
|
cursor.style.transform = `translate3d(${x}px,${y}px,0) scale(${1 / this.visualScale})`;
|
|
1146
1173
|
}
|
|
1147
1174
|
}
|
|
1148
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1149
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1175
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldScrubArea, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1176
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxNumberFieldScrubArea, isStandalone: true, selector: "[rdxNumberFieldScrubArea]", inputs: { direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, pixelSensitivity: { classPropertyName: "pixelSensitivity", publicName: "pixelSensitivity", isSignal: true, isRequired: false, transformFunction: null }, teleportDistance: { classPropertyName: "teleportDistance", publicName: "teleportDistance", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "presentation" }, listeners: { "pointerdown": "onPointerDown($event)", "touchstart": "onTouchStart($event)" }, properties: { "style.touch-action": "\"none\"", "style.user-select": "\"none\"", "style.-webkit-user-select": "\"none\"", "attr.data-disabled": "rootContext.isDisabled() ? \"\" : undefined", "attr.data-readonly": "rootContext.readonly() ? \"\" : undefined", "attr.data-scrubbing": "isScrubbing() ? \"\" : undefined" } }, providers: [provideNumberFieldScrubAreaContext(() => inject(RdxNumberFieldScrubArea).context)], exportAs: ["rdxNumberFieldScrubArea"], ngImport: i0 }); }
|
|
1150
1177
|
}
|
|
1151
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1178
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldScrubArea, decorators: [{
|
|
1152
1179
|
type: Directive,
|
|
1153
1180
|
args: [{
|
|
1154
1181
|
selector: '[rdxNumberFieldScrubArea]',
|
|
@@ -1187,14 +1214,15 @@ class RdxNumberFieldScrubAreaCursor {
|
|
|
1187
1214
|
this.shouldRender = computed(() => this.scrubContext.isScrubbing() &&
|
|
1188
1215
|
!isWebKitBrowser() &&
|
|
1189
1216
|
!this.scrubContext.isTouchInput() &&
|
|
1190
|
-
!this.scrubContext.isPointerLockDenied(),
|
|
1217
|
+
!this.scrubContext.isPointerLockDenied(), /* @ts-ignore */
|
|
1218
|
+
...(ngDevMode ? [{ debugName: "shouldRender" }] : /* istanbul ignore next */ []));
|
|
1191
1219
|
this.scrubContext.registerCursor(this.elementRef.nativeElement);
|
|
1192
1220
|
inject(DestroyRef).onDestroy(() => this.scrubContext.registerCursor(null));
|
|
1193
1221
|
}
|
|
1194
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1195
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1222
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldScrubAreaCursor, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1223
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxNumberFieldScrubAreaCursor, isStandalone: true, selector: "[rdxNumberFieldScrubAreaCursor]", host: { attributes: { "role": "presentation" }, properties: { "style.position": "\"fixed\"", "style.top.px": "0", "style.left.px": "0", "style.pointer-events": "\"none\"", "style.opacity": "shouldRender() ? \"1\" : \"0\"" } }, exportAs: ["rdxNumberFieldScrubAreaCursor"], hostDirectives: [{ directive: i1$1.RdxPortal }], ngImport: i0 }); }
|
|
1196
1224
|
}
|
|
1197
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldScrubAreaCursor, decorators: [{
|
|
1198
1226
|
type: Directive,
|
|
1199
1227
|
args: [{
|
|
1200
1228
|
selector: '[rdxNumberFieldScrubAreaCursor]',
|
|
@@ -1222,8 +1250,8 @@ const _imports = [
|
|
|
1222
1250
|
RdxNumberFieldScrubAreaCursor
|
|
1223
1251
|
];
|
|
1224
1252
|
class RdxNumberFieldModule {
|
|
1225
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1226
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1253
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1254
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldModule, imports: [RdxNumberFieldRoot,
|
|
1227
1255
|
RdxNumberFieldGroup,
|
|
1228
1256
|
RdxNumberFieldInput,
|
|
1229
1257
|
RdxNumberFieldHiddenInput,
|
|
@@ -1238,9 +1266,9 @@ class RdxNumberFieldModule {
|
|
|
1238
1266
|
RdxNumberFieldDecrement,
|
|
1239
1267
|
RdxNumberFieldScrubArea,
|
|
1240
1268
|
RdxNumberFieldScrubAreaCursor] }); }
|
|
1241
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1269
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldModule }); }
|
|
1242
1270
|
}
|
|
1243
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNumberFieldModule, decorators: [{
|
|
1244
1272
|
type: NgModule,
|
|
1245
1273
|
args: [{
|
|
1246
1274
|
imports: [..._imports],
|