@radix-ng/primitives 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/aspect-ratio/README.md +1 -1
- package/fesm2022/radix-ng-primitives-accordion.mjs +6 -1
- package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +9 -34
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-autocomplete.mjs +43 -9
- package/fesm2022/radix-ng-primitives-autocomplete.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-avatar.mjs +69 -18
- package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-checkbox.mjs +93 -16
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collapsible.mjs +4 -3
- package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-combobox.mjs +43 -9
- package/fesm2022/radix-ng-primitives-combobox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-core.mjs +208 -2
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-date-field.mjs +50 -9
- package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-editable.mjs +31 -5
- package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-field.mjs +276 -58
- package/fesm2022/radix-ng-primitives-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-form.mjs +111 -27
- package/fesm2022/radix-ng-primitives-form.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-input.mjs +16 -6
- package/fesm2022/radix-ng-primitives-input.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-label.mjs +5 -4
- package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-number-field.mjs +39 -10
- package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-progress.mjs +37 -22
- package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +18 -9
- package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-scroll-area.mjs +4 -4
- package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-select.mjs +26 -8
- package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-separator.mjs +7 -13
- package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-signal-forms.mjs +184 -0
- package/fesm2022/radix-ng-primitives-signal-forms.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-slider.mjs +25 -10
- package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +32 -8
- package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tabs.mjs +4 -4
- package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-time-field.mjs +49 -9
- package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +33 -16
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +24 -29
- package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toolbar.mjs +15 -2
- package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
- package/package.json +11 -1
- package/types/radix-ng-primitives-accordion.d.ts +1 -0
- package/types/radix-ng-primitives-aspect-ratio.d.ts +10 -23
- package/types/radix-ng-primitives-autocomplete.d.ts +21 -2
- package/types/radix-ng-primitives-avatar.d.ts +51 -25
- package/types/radix-ng-primitives-checkbox.d.ts +78 -101
- package/types/radix-ng-primitives-combobox.d.ts +51 -2
- package/types/radix-ng-primitives-core.d.ts +206 -3
- package/types/radix-ng-primitives-date-field.d.ts +27 -2
- package/types/radix-ng-primitives-editable.d.ts +15 -2
- package/types/radix-ng-primitives-field.d.ts +165 -236
- package/types/radix-ng-primitives-form.d.ts +122 -37
- package/types/radix-ng-primitives-input.d.ts +8 -1
- package/types/radix-ng-primitives-label.d.ts +3 -2
- package/types/radix-ng-primitives-number-field.d.ts +15 -4
- package/types/radix-ng-primitives-progress.d.ts +59 -121
- package/types/radix-ng-primitives-radio.d.ts +7 -3
- package/types/radix-ng-primitives-select.d.ts +11 -3
- package/types/radix-ng-primitives-separator.d.ts +0 -7
- package/types/radix-ng-primitives-signal-forms.d.ts +97 -0
- package/types/radix-ng-primitives-slider.d.ts +9 -7
- package/types/radix-ng-primitives-switch.d.ts +15 -2
- package/types/radix-ng-primitives-time-field.d.ts +26 -2
- package/types/radix-ng-primitives-toggle-group.d.ts +13 -7
- package/types/radix-ng-primitives-toggle.d.ts +8 -8
- package/types/radix-ng-primitives-toolbar.d.ts +2 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, inject, ElementRef, input, computed, signal, effect, Directive, model, booleanAttribute, contentChildren, linkedSignal, NgModule } from '@angular/core';
|
|
3
|
-
import { useDateField, isNullish, normalizeDateStep, createFormatter, normalizeHourCycle, getDefaultTime, syncSegmentValues, initializeSegmentValues, isBefore, createContent, watch, isSegmentNavigationKey, ARROW_LEFT, ARROW_RIGHT, provideToken } from '@radix-ng/primitives/core';
|
|
3
|
+
import { useDateField, isNullish, RdxFormUiControlBase, normalizeDateStep, createFormatter, normalizeHourCycle, getDefaultTime, syncSegmentValues, initializeSegmentValues, isBefore, resolveDisplayValid, createContent, watch, isSegmentNavigationKey, ARROW_LEFT, ARROW_RIGHT, provideToken } from '@radix-ng/primitives/core';
|
|
4
4
|
import { toCalendarDateTime, today, getLocalTimeZone, Time, isEqualDay } from '@internationalized/date';
|
|
5
5
|
import { injectDirection } from '@radix-ng/primitives/direction-provider';
|
|
6
6
|
|
|
@@ -38,8 +38,11 @@ class RdxTimeFieldInputDirective {
|
|
|
38
38
|
/**
|
|
39
39
|
* @ignore
|
|
40
40
|
*/
|
|
41
|
-
this.isInvalid = computed(() => this.rootContext.
|
|
41
|
+
this.isInvalid = computed(() => this.rootContext.invalidState(), /* @ts-ignore */
|
|
42
42
|
...(ngDevMode ? [{ debugName: "isInvalid" }] : /* istanbul ignore next */ []));
|
|
43
|
+
/** @ignore Tri-state display validity from the root (gated by an enclosing Field). */
|
|
44
|
+
this.displayValid = computed(() => this.rootContext.displayValid(), /* @ts-ignore */
|
|
45
|
+
...(ngDevMode ? [{ debugName: "displayValid" }] : /* istanbul ignore next */ []));
|
|
43
46
|
/**
|
|
44
47
|
* @ignore
|
|
45
48
|
*/
|
|
@@ -94,7 +97,7 @@ class RdxTimeFieldInputDirective {
|
|
|
94
97
|
this.hasLeftFocus.set(true);
|
|
95
98
|
}
|
|
96
99
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxTimeFieldInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
97
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxTimeFieldInputDirective, isStandalone: true, selector: "[rdxTimeFieldInput]", inputs: { part: { classPropertyName: "part", publicName: "part", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mousedown": "part() !== \"literal\" && handleSegmentClick($event)", "keydown": "part() !== \"literal\" && handleSegmentKeydown($event)", "focus": "part() !== \"literal\" && onFocus($event)", "focusout": "part() !== \"literal\" && onFocusOut()" }, properties: { "attr.contenteditable": "disabled() || readonly() ? false : part() !== \"literal\"", "attr.data-rdx-date-field-segment": "part()", "attr.aria-disabled": "disabled() ? \"\" : undefined", "attr.data-disabled": "disabled() ? \"\" : undefined", "attr.data-invalid": "
|
|
100
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxTimeFieldInputDirective, isStandalone: true, selector: "[rdxTimeFieldInput]", inputs: { part: { classPropertyName: "part", publicName: "part", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mousedown": "part() !== \"literal\" && handleSegmentClick($event)", "keydown": "part() !== \"literal\" && handleSegmentKeydown($event)", "focus": "part() !== \"literal\" && onFocus($event)", "focusout": "part() !== \"literal\" && onFocusOut()" }, properties: { "attr.contenteditable": "disabled() || readonly() ? false : part() !== \"literal\"", "attr.data-rdx-date-field-segment": "part()", "attr.aria-disabled": "disabled() ? \"\" : undefined", "attr.data-disabled": "disabled() ? \"\" : undefined", "attr.data-invalid": "displayValid() === false ? \"\" : undefined", "attr.aria-invalid": "displayValid() === false ? true : undefined" } }, ngImport: i0 }); }
|
|
98
101
|
}
|
|
99
102
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxTimeFieldInputDirective, decorators: [{
|
|
100
103
|
type: Directive,
|
|
@@ -105,8 +108,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
105
108
|
'[attr.data-rdx-date-field-segment]': 'part()',
|
|
106
109
|
'[attr.aria-disabled]': 'disabled() ? "" : undefined',
|
|
107
110
|
'[attr.data-disabled]': 'disabled() ? "" : undefined',
|
|
108
|
-
'[attr.data-invalid]': '
|
|
109
|
-
'[attr.aria-invalid]': '
|
|
111
|
+
'[attr.data-invalid]': 'displayValid() === false ? "" : undefined',
|
|
112
|
+
'[attr.aria-invalid]': 'displayValid() === false ? true : undefined',
|
|
110
113
|
'(mousedown)': 'part() !== "literal" && handleSegmentClick($event)',
|
|
111
114
|
'(keydown)': 'part() !== "literal" && handleSegmentKeydown($event)',
|
|
112
115
|
'(focus)': 'part() !== "literal" && onFocus($event)',
|
|
@@ -137,8 +140,13 @@ function isSameTimeValue(a, b) {
|
|
|
137
140
|
return a === b;
|
|
138
141
|
return a.compare(b) === 0;
|
|
139
142
|
}
|
|
140
|
-
class RdxTimeFieldRootDirective {
|
|
143
|
+
class RdxTimeFieldRootDirective extends RdxFormUiControlBase {
|
|
144
|
+
/** @ignore Mark the field touched (model + `touch` output) for Signal Forms. Called on segment blur. */
|
|
145
|
+
markAsTouched() {
|
|
146
|
+
this.formUi.markAsTouched();
|
|
147
|
+
}
|
|
141
148
|
constructor() {
|
|
149
|
+
super();
|
|
142
150
|
/**
|
|
143
151
|
* The controlled checked state of the calendar.
|
|
144
152
|
*/
|
|
@@ -285,6 +293,25 @@ class RdxTimeFieldRootDirective {
|
|
|
285
293
|
return false;
|
|
286
294
|
}, /* @ts-ignore */
|
|
287
295
|
...(ngDevMode ? [{ debugName: "isInvalid" }] : /* istanbul ignore next */ []));
|
|
296
|
+
/**
|
|
297
|
+
* @ignore Effective invalid: the built-in range check OR the form-driven `invalid` / `errors`
|
|
298
|
+
* (Signal Forms). Reflected on the root and segments.
|
|
299
|
+
*/
|
|
300
|
+
this.invalidState = computed(() => this.isInvalid() || this.formUi.invalidState(), /* @ts-ignore */
|
|
301
|
+
...(ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []));
|
|
302
|
+
/**
|
|
303
|
+
* @ignore Tri-state display validity: the enclosing Field's gated state when inside a `rdxFieldRoot`,
|
|
304
|
+
* else the time-field's own (parse + form) invalidity. Overrides the base default (`formUi` only).
|
|
305
|
+
*/
|
|
306
|
+
this.displayValid = computed(() => resolveDisplayValid(this.fieldValidity, this.invalidState), /* @ts-ignore */
|
|
307
|
+
...(ngDevMode ? [{ debugName: "displayValid" }] : /* istanbul ignore next */ []));
|
|
308
|
+
/** @ignore */
|
|
309
|
+
this.touchedState = this.formUi.touchedState;
|
|
310
|
+
/** @ignore */
|
|
311
|
+
this.dirtyState = this.formUi.dirtyState;
|
|
312
|
+
/** @ignore Whether the user has focused a segment — gates dirty tracking so a form/initial seed of `value` doesn't mark dirty. */
|
|
313
|
+
this.userInteracted = signal(false, /* @ts-ignore */
|
|
314
|
+
...(ngDevMode ? [{ debugName: "userInteracted" }] : /* istanbul ignore next */ []));
|
|
288
315
|
/**
|
|
289
316
|
* @ignore
|
|
290
317
|
*/
|
|
@@ -341,6 +368,13 @@ class RdxTimeFieldRootDirective {
|
|
|
341
368
|
this.focusNext = () => {
|
|
342
369
|
this.nextFocusableSegment()?.focus();
|
|
343
370
|
};
|
|
371
|
+
// Mark dirty when the value changes after the user has interacted (a form/initial seed of
|
|
372
|
+
// `value` lands before any segment focus, so it is excluded).
|
|
373
|
+
watch([this.value], () => {
|
|
374
|
+
if (this.userInteracted()) {
|
|
375
|
+
this.formUi.markDirty();
|
|
376
|
+
}
|
|
377
|
+
});
|
|
344
378
|
watch([this.convertedModelValue], ([value]) => {
|
|
345
379
|
if (!isNullish(value) &&
|
|
346
380
|
(!isEqualDay(this.convertedPlaceholder(), value) ||
|
|
@@ -378,9 +412,10 @@ class RdxTimeFieldRootDirective {
|
|
|
378
412
|
*/
|
|
379
413
|
setFocusedElement(el) {
|
|
380
414
|
this.currentFocusedElement.set(el);
|
|
415
|
+
this.userInteracted.set(true);
|
|
381
416
|
}
|
|
382
417
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxTimeFieldRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
383
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.0.2", type: RdxTimeFieldRootDirective, isStandalone: true, selector: "[rdxTimeFieldRoot]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, hourCycle: { classPropertyName: "hourCycle", publicName: "hourCycle", isSignal: true, isRequired: false, transformFunction: null }, granularity: { classPropertyName: "granularity", publicName: "granularity", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, dirInput: { classPropertyName: "dirInput", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, minValue: { classPropertyName: "minValue", publicName: "minValue", isSignal: true, isRequired: false, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: true, isRequired: false, transformFunction: null }, hideTimeZone: { classPropertyName: "hideTimeZone", publicName: "hideTimeZone", 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 }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", placeholder: "placeholderChange" }, host: { attributes: { "role": "group" }, listeners: { "keydown": "onKeydown($event)" }, properties: { "attr.aria-disabled": "disabled() ? \"\" : undefined", "attr.data-disabled": "disabled() ? \"\" : undefined", "attr.data-readonly": "readonly() ? \"\" : undefined", "attr.data-invalid": "
|
|
418
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.0.2", type: RdxTimeFieldRootDirective, isStandalone: true, selector: "[rdxTimeFieldRoot]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, hourCycle: { classPropertyName: "hourCycle", publicName: "hourCycle", isSignal: true, isRequired: false, transformFunction: null }, granularity: { classPropertyName: "granularity", publicName: "granularity", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, dirInput: { classPropertyName: "dirInput", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, minValue: { classPropertyName: "minValue", publicName: "minValue", isSignal: true, isRequired: false, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: true, isRequired: false, transformFunction: null }, hideTimeZone: { classPropertyName: "hideTimeZone", publicName: "hideTimeZone", 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 }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", placeholder: "placeholderChange" }, host: { attributes: { "role": "group" }, listeners: { "keydown": "onKeydown($event)", "focusout": "markAsTouched()" }, properties: { "attr.aria-disabled": "disabled() ? \"\" : undefined", "attr.data-disabled": "disabled() ? \"\" : undefined", "attr.data-readonly": "readonly() ? \"\" : undefined", "attr.aria-invalid": "displayValid() === false ? \"true\" : undefined", "attr.data-invalid": "displayValid() === false ? \"\" : undefined", "attr.data-valid": "displayValid() === true ? \"\" : undefined", "attr.data-touched": "touchedState() ? \"\" : undefined", "attr.data-dirty": "dirtyState() ? \"\" : undefined", "attr.dir": "dir()" } }, providers: [provideToken(TIME_FIELDS_ROOT_CONTEXT, RdxTimeFieldRootDirective)], queries: [{ propertyName: "segmentInputs", predicate: RdxTimeFieldInputDirective, isSignal: true }], exportAs: ["rdxTimeFieldRoot"], usesInheritance: true, ngImport: i0 }); }
|
|
384
419
|
}
|
|
385
420
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxTimeFieldRootDirective, decorators: [{
|
|
386
421
|
type: Directive,
|
|
@@ -393,9 +428,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
393
428
|
'[attr.aria-disabled]': 'disabled() ? "" : undefined',
|
|
394
429
|
'[attr.data-disabled]': 'disabled() ? "" : undefined',
|
|
395
430
|
'[attr.data-readonly]': 'readonly() ? "" : undefined',
|
|
396
|
-
'[attr.
|
|
431
|
+
'[attr.aria-invalid]': 'displayValid() === false ? "true" : undefined',
|
|
432
|
+
'[attr.data-invalid]': 'displayValid() === false ? "" : undefined',
|
|
433
|
+
'[attr.data-valid]': 'displayValid() === true ? "" : undefined',
|
|
434
|
+
'[attr.data-touched]': 'touchedState() ? "" : undefined',
|
|
435
|
+
'[attr.data-dirty]': 'dirtyState() ? "" : undefined',
|
|
397
436
|
'[attr.dir]': 'dir()',
|
|
398
|
-
'(keydown)': 'onKeydown($event)'
|
|
437
|
+
'(keydown)': 'onKeydown($event)',
|
|
438
|
+
'(focusout)': 'markAsTouched()'
|
|
399
439
|
}
|
|
400
440
|
}]
|
|
401
441
|
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], hourCycle: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourCycle", required: false }] }], granularity: [{ type: i0.Input, args: [{ isSignal: true, alias: "granularity", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], dirInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }], minValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "minValue", required: false }] }], maxValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxValue", required: false }] }], hideTimeZone: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideTimeZone", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }, { type: i0.Output, args: ["placeholderChange"] }], segmentInputs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => RdxTimeFieldInputDirective), { isSignal: true }] }] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radix-ng-primitives-time-field.mjs","sources":["../../../packages/primitives/time-field/src/time-field-context.token.ts","../../../packages/primitives/time-field/src/time-field-input.directive.ts","../../../packages/primitives/time-field/src/time-field-root.directive.ts","../../../packages/primitives/time-field/index.ts","../../../packages/primitives/time-field/radix-ng-primitives-time-field.ts"],"sourcesContent":["import { inject, InjectionToken, InputSignal, ModelSignal, Signal, WritableSignal } from '@angular/core';\nimport { DateStep, Formatter, HourCycle, SegmentValueObj, TimeValue } from '@radix-ng/primitives/core';\n\nexport interface TimeFieldContextToken {\n locale: InputSignal<string>;\n value: ModelSignal<TimeValue | undefined>;\n placeholder: ModelSignal<TimeValue>;\n isInvalid: Signal<boolean>;\n disabled: InputSignal<boolean>;\n readonly: InputSignal<boolean>;\n formatter: Signal<Formatter>;\n hourCycle: InputSignal<HourCycle>;\n segmentValues: WritableSignal<SegmentValueObj>;\n focusNext: () => void;\n setFocusedElement: (el: HTMLElement) => void;\n convertedModelValue: WritableSignal<TimeValue | undefined>;\n convertedPlaceholder: WritableSignal<TimeValue>;\n step$: Signal<DateStep>;\n}\n\nexport const TIME_FIELDS_ROOT_CONTEXT = new InjectionToken<TimeFieldContextToken>('TIME_FIELDS_ROOT_CONTEXT');\n\nexport function injectTimeFieldsRootContext(): TimeFieldContextToken {\n return inject(TIME_FIELDS_ROOT_CONTEXT);\n}\n","import { computed, Directive, effect, ElementRef, inject, input, signal, WritableSignal } from '@angular/core';\nimport { DateValue } from '@internationalized/date';\nimport { SegmentPart, useDateField } from '@radix-ng/primitives/core';\nimport { injectTimeFieldsRootContext } from './time-field-context.token';\n\n@Directive({\n selector: '[rdxTimeFieldInput]',\n host: {\n '[attr.contenteditable]': 'disabled() || readonly() ? false : part() !== \"literal\"',\n '[attr.data-rdx-date-field-segment]': 'part()',\n '[attr.aria-disabled]': 'disabled() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined',\n '[attr.data-invalid]': 'isInvalid() ? \"\" : undefined',\n '[attr.aria-invalid]': 'isInvalid() ? true : undefined',\n\n '(mousedown)': 'part() !== \"literal\" && handleSegmentClick($event)',\n '(keydown)': 'part() !== \"literal\" && handleSegmentKeydown($event)',\n '(focus)': 'part() !== \"literal\" && onFocus($event)',\n '(focusout)': 'part() !== \"literal\" && onFocusOut()'\n }\n})\nexport class RdxTimeFieldInputDirective {\n private readonly el = inject(ElementRef);\n\n /**\n * The host element of this segment. Consumed by the root to collect focusable\n * segments in DOM order.\n * @ignore\n */\n readonly element: HTMLElement = this.el.nativeElement;\n\n private readonly rootContext = injectTimeFieldsRootContext();\n\n /**\n * The part of the date to render\n * `'hour' | 'minute' | 'second' | 'dayPeriod' | 'literal' | 'timeZoneName'`\n */\n readonly part = input<SegmentPart>();\n\n /**\n * @ignore\n */\n readonly disabled = computed(() => this.rootContext.disabled());\n\n /**\n * @ignore\n */\n readonly readonly = computed(() => this.rootContext.readonly());\n\n /**\n * @ignore\n */\n readonly isInvalid = computed(() => this.rootContext.isInvalid());\n\n /**\n * @ignore\n */\n readonly hasLeftFocus = signal<boolean>(true);\n\n /**\n * @ignore\n */\n readonly lastKeyZero = signal<boolean>(false);\n\n private readonly fieldData = computed(() => {\n return useDateField({\n hasLeftFocus: this.hasLeftFocus,\n lastKeyZero: this.lastKeyZero,\n placeholder: this.rootContext.convertedPlaceholder as unknown as WritableSignal<DateValue>,\n hourCycle: this.rootContext.hourCycle(),\n segmentValues: this.rootContext.segmentValues,\n formatter: this.rootContext.formatter(),\n part: <SegmentPart>this.part(),\n disabled: this.rootContext.disabled,\n readonly: this.rootContext.readonly,\n modelValue: this.rootContext.convertedModelValue as unknown as WritableSignal<DateValue>,\n focusNext: this.rootContext.focusNext,\n step: this.rootContext.step$\n });\n });\n\n private readonly attributes = computed(() => this.fieldData().attributes());\n\n /**\n * @ignore\n */\n handleSegmentClick: (e: Event) => void;\n\n /**\n * @ignore\n */\n handleSegmentKeydown: (e: Event) => void;\n\n constructor() {\n effect(() => {\n const { handleSegmentClick, handleSegmentKeydown } = this.fieldData();\n this.handleSegmentKeydown = handleSegmentKeydown as (e: Event) => void;\n this.handleSegmentClick = handleSegmentClick as (e: Event) => void;\n });\n\n effect(() => {\n const attrs = this.attributes();\n Object.entries(attrs).forEach(([attr, value]) => {\n this.el.nativeElement.setAttribute(attr, String(value));\n });\n });\n }\n\n /**\n * @ignore\n */\n onFocus(e: Event) {\n this.rootContext.setFocusedElement(e.target as HTMLElement);\n }\n\n /**\n * @ignore\n */\n onFocusOut() {\n this.hasLeftFocus.set(true);\n }\n}\n","import {\n booleanAttribute,\n computed,\n contentChildren,\n Directive,\n input,\n linkedSignal,\n model,\n Signal,\n signal\n} from '@angular/core';\nimport { DateValue, getLocalTimeZone, isEqualDay, Time, toCalendarDateTime, today } from '@internationalized/date';\nimport {\n ARROW_LEFT,\n ARROW_RIGHT,\n BooleanInput,\n createContent,\n createFormatter,\n DateStep,\n Direction,\n Formatter,\n getDefaultTime,\n Granularity,\n HourCycle,\n initializeSegmentValues,\n isBefore,\n isNullish,\n isSegmentNavigationKey,\n normalizeDateStep,\n normalizeHourCycle,\n provideToken,\n SegmentValueObj,\n syncSegmentValues,\n TimeValue,\n watch\n} from '@radix-ng/primitives/core';\nimport { injectDirection } from '@radix-ng/primitives/direction-provider';\nimport { TIME_FIELDS_ROOT_CONTEXT } from './time-field-context.token';\nimport { RdxTimeFieldInputDirective } from './time-field-input.directive';\n\nfunction convertValue(value: TimeValue, date: DateValue = today(getLocalTimeZone())) {\n if (value && 'day' in value) {\n return value;\n }\n\n return toCalendarDateTime(date, value);\n}\n\n/**\n * Map the internal edit buffer (`convertedModelValue`, always a date-bearing value\n * so the segment editor has a date context) back onto the public `value` model.\n * A date-bearing model keeps its shape; a time-only model is exposed as a plain `Time`.\n */\nfunction toModelValue(value: TimeValue, current: TimeValue | undefined): TimeValue {\n if (current && 'day' in current) {\n return value;\n }\n\n return new Time(value.hour, value.minute, value.second, value.millisecond);\n}\n\nfunction isSameTimeValue(a: TimeValue | undefined, b: TimeValue | undefined): boolean {\n if (isNullish(a) || isNullish(b)) return a === b;\n return (a as { compare(other: TimeValue): number }).compare(b) === 0;\n}\n\n@Directive({\n selector: '[rdxTimeFieldRoot]',\n exportAs: 'rdxTimeFieldRoot',\n providers: [provideToken(TIME_FIELDS_ROOT_CONTEXT, RdxTimeFieldRootDirective)],\n host: {\n role: 'group',\n '[attr.aria-disabled]': 'disabled() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined',\n '[attr.data-readonly]': 'readonly() ? \"\" : undefined',\n '[attr.data-invalid]': 'isInvalid() ? \"\" : undefined',\n '[attr.dir]': 'dir()',\n\n '(keydown)': 'onKeydown($event)'\n }\n})\nexport class RdxTimeFieldRootDirective {\n /**\n * The controlled checked state of the calendar.\n */\n readonly value = model<TimeValue | undefined>();\n\n /**\n * The hour cycle to use for formatting times. Defaults to the locale preference\n */\n readonly hourCycle = input<HourCycle>();\n\n /**\n * The granularity to use for formatting the field. Defaults to 'day' if a CalendarDate is provided, otherwise defaults to 'minute'.\n * The field will render segments for each part of the date up to and including the specified granularity.\n */\n readonly granularity = input<Granularity>();\n\n /**\n * The locale to use for formatting dates.\n */\n readonly locale = input<string>('en');\n\n readonly dirInput = input<Direction | undefined>(undefined, { alias: 'dir' });\n readonly dir = injectDirection(this.dirInput);\n\n /**\n * The minimum valid date that can be entered.\n */\n readonly minValue = input<TimeValue>();\n\n /**\n * The maximum valid date that can be entered.\n */\n readonly maxValue = input<TimeValue>();\n\n /**\n * Whether or not to hide the time zone segment of the field.\n */\n readonly hideTimeZone = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether or not the field is readonly.\n */\n readonly readonly = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * The stepping interval for the time fields. Defaults to 1\n */\n readonly step = input<DateStep>();\n\n readonly step$ = computed(() => normalizeDateStep(this.step()));\n\n /**\n * Locale- and hour-cycle-aware formatter. Recomputed whenever `locale` or\n * `hourCycle` change so segments always render with the current settings.\n * @ignore\n */\n readonly formatter: Signal<Formatter> = computed(() =>\n createFormatter(this.locale(), {\n hourCycle: normalizeHourCycle(this.hourCycle())\n })\n );\n\n /**\n * @ignore\n */\n readonly defaultDate = computed(() =>\n getDefaultTime({\n defaultPlaceholder: undefined,\n defaultValue: this.value()\n })\n );\n\n /**\n * The placeholder date, which is used to determine what month to display when no date is selected. This updates as the user navigates the calendar and can be used to programmatically control the calendar view\n */\n readonly placeholder = model<TimeValue | undefined>(this.defaultDate().copy());\n\n // Internal state\n\n /**\n * Segment input parts, collected from the projected content in DOM order. This\n * stays in sync with `segmentContents()` (granularity / locale / value changes\n * add or remove segments) instead of being captured once after view init.\n * @ignore\n */\n private readonly segmentInputs = contentChildren(RdxTimeFieldInputDirective);\n\n /**\n * The focusable (non-literal) segment elements, in DOM order.\n * @ignore\n */\n readonly segmentElements = computed(() =>\n this.segmentInputs()\n .filter((seg) => seg.part() !== 'literal')\n .map((seg) => seg.element)\n );\n\n /**\n * @ignore\n */\n readonly currentFocusedElement = signal<HTMLElement | null>(null);\n\n /**\n * @ignore\n */\n readonly inferredGranularity = computed(() => this.granularity() ?? 'minute');\n\n readonly convertedMinValue = computed(() => (this.minValue() ? convertValue(this.minValue()!) : undefined));\n readonly convertedMaxValue = computed(() => (this.maxValue() ? convertValue(this.maxValue()!) : undefined));\n\n readonly convertedModelValue = linkedSignal({\n source: () => {\n if (isNullish(this.value())) return this.value();\n\n return convertValue(this.value()!);\n },\n computation: (value: TimeValue | undefined) => {\n return value;\n }\n });\n\n readonly convertedPlaceholder = linkedSignal({\n source: () => {\n return convertValue(<TimeValue>this.placeholder());\n },\n computation: (value: TimeValue) => {\n return value;\n }\n });\n\n /**\n * The per-segment values. Writable so segment editing (via `useDateField`) can\n * update individual parts, but re-synced from the model whenever the value,\n * granularity or formatter change — so a controlled `value` set after init is\n * reflected, and an empty field re-initializes when granularity changes.\n * @ignore\n */\n readonly segmentValues = linkedSignal<\n { value: TimeValue | undefined; granularity: Granularity; formatter: Formatter },\n SegmentValueObj\n >({\n source: () => ({\n value: this.convertedModelValue(),\n granularity: this.inferredGranularity(),\n formatter: this.formatter()\n }),\n computation: ({ value, granularity, formatter }) =>\n value\n ? { ...syncSegmentValues({ value: <DateValue>value, formatter }) }\n : { ...initializeSegmentValues(granularity, true) }\n });\n\n /**\n * @ignore\n */\n readonly isInvalid = computed(() => {\n if (!this.value()) return false;\n\n if (\n this.convertedMinValue() &&\n isBefore(<DateValue>this.convertedModelValue(), <DateValue>this.convertedMinValue())\n )\n return true;\n\n if (\n this.convertedMaxValue() &&\n isBefore(<DateValue>this.convertedMaxValue(), <DateValue>this.convertedModelValue())\n )\n return true;\n\n return false;\n });\n\n /**\n * @ignore\n */\n readonly allSegmentContent = computed(() =>\n createContent({\n granularity: this.inferredGranularity(),\n dateRef: <DateValue>this.convertedPlaceholder(),\n formatter: this.formatter(),\n hideTimeZone: this.hideTimeZone(),\n hourCycle: this.hourCycle(),\n segmentValues: this.segmentValues(),\n locale: this.locale,\n isTimeValue: true\n })\n );\n\n /**\n * An array of segments that should be readonly, which prevent user input on them.\n */\n readonly segmentContents = computed(() => this.allSegmentContent().arr);\n\n /**\n * @ignore\n */\n readonly currentSegmentIndex = computed(() =>\n this.segmentElements().findIndex((el) => el === this.currentFocusedElement())\n );\n\n /**\n * @ignore\n */\n readonly prevFocusableSegment = computed(() => {\n const sign = this.dir() === 'rtl' ? -1 : 1;\n const elements = this.segmentElements();\n const index = this.currentSegmentIndex();\n const prevCondition = sign > 0 ? index < 0 : index > elements.length - 1;\n if (prevCondition) return null;\n\n return elements[index - sign];\n });\n\n /**\n * @ignore\n */\n readonly nextFocusableSegment = computed(() => {\n const sign = this.dir() === 'rtl' ? -1 : 1;\n const elements = this.segmentElements();\n const index = this.currentSegmentIndex();\n const nextCondition = sign < 0 ? index < 0 : index > elements.length - 1;\n if (nextCondition) return null;\n\n return elements[index + sign];\n });\n\n /**\n * @ignore\n */\n readonly focusNext = () => {\n this.nextFocusableSegment()?.focus();\n };\n\n constructor() {\n watch([this.convertedModelValue], ([value]) => {\n if (\n !isNullish(value) &&\n (!isEqualDay(<DateValue>this.convertedPlaceholder(), <DateValue>value) ||\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n this.convertedPlaceholder().compare(value) !== 0)\n )\n this.placeholder.set(value.copy());\n\n // Segment editing (via `useDateField`) writes the internal `convertedModelValue`\n // buffer; mirror it back onto the public `value` model so two-way binding and\n // `valueChange` fire. The guard keeps this idempotent and breaks the feedback loop\n // (`value` → `convertedModelValue` source → here) once the values agree.\n const next = isNullish(value) ? undefined : toModelValue(value, this.value());\n if (!isSameTimeValue(this.value(), next)) {\n this.value.set(next);\n }\n });\n }\n\n /**\n * @ignore\n */\n onKeydown(event: Event) {\n const keyEvent = event as KeyboardEvent;\n if (!isSegmentNavigationKey(keyEvent.key)) return;\n const code = keyEvent.code;\n\n if (code === ARROW_LEFT) {\n this.prevFocusableSegment()?.focus();\n }\n\n if (code === ARROW_RIGHT) {\n this.nextFocusableSegment()?.focus();\n }\n }\n\n /**\n * @ignore\n */\n setFocusedElement(el: HTMLElement) {\n this.currentFocusedElement.set(el);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RdxTimeFieldInputDirective } from './src/time-field-input.directive';\nimport { RdxTimeFieldRootDirective } from './src/time-field-root.directive';\n\nexport * from './src/time-field-context.token';\nexport * from './src/time-field-input.directive';\nexport * from './src/time-field-root.directive';\n\nconst _imports = [RdxTimeFieldRootDirective, RdxTimeFieldInputDirective];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxTimeFieldModule {}\n","/**\n * Generated bundle index. Do not edit.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O;AAErB,wBAAA,WAAW,EAAE;AAChB;AACJ,iBAAA;41CAyFoD,0BAA0B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACjK/E,MAAM,QAAQ,GAAG,CAAC,yBAAyB,EAAE,0BAA0B,CAAC;MAM3D,kBAAkB,CAAA;8GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YANb,yBAAyB,EAAE,0BAA0B,CAAA,EAAA,OAAA,EAAA,CAArD,yBAAyB,EAAE,0BAA0B,CAAA,EAAA,CAAA,CAAA;+GAM1D,kBAAkB,EAAA,CAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC;AACtB,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ;AACxB,iBAAA;;;ACbD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"radix-ng-primitives-time-field.mjs","sources":["../../../packages/primitives/time-field/src/time-field-context.token.ts","../../../packages/primitives/time-field/src/time-field-input.directive.ts","../../../packages/primitives/time-field/src/time-field-root.directive.ts","../../../packages/primitives/time-field/index.ts","../../../packages/primitives/time-field/radix-ng-primitives-time-field.ts"],"sourcesContent":["import { inject, InjectionToken, InputSignal, ModelSignal, Signal, WritableSignal } from '@angular/core';\nimport { DateStep, Formatter, HourCycle, SegmentValueObj, TimeValue } from '@radix-ng/primitives/core';\n\nexport interface TimeFieldContextToken {\n locale: InputSignal<string>;\n value: ModelSignal<TimeValue | undefined>;\n placeholder: ModelSignal<TimeValue>;\n isInvalid: Signal<boolean>;\n /** Effective invalid: the built-in range check OR the form-driven invalid state. */\n invalidState: Signal<boolean>;\n /** Tri-state displayed validity (`true`/`false`/`null`): the field's gated state inside a Field, else own. */\n displayValid: Signal<boolean | null>;\n disabled: InputSignal<boolean>;\n readonly: InputSignal<boolean>;\n formatter: Signal<Formatter>;\n hourCycle: InputSignal<HourCycle>;\n segmentValues: WritableSignal<SegmentValueObj>;\n focusNext: () => void;\n setFocusedElement: (el: HTMLElement) => void;\n convertedModelValue: WritableSignal<TimeValue | undefined>;\n convertedPlaceholder: WritableSignal<TimeValue>;\n step$: Signal<DateStep>;\n}\n\nexport const TIME_FIELDS_ROOT_CONTEXT = new InjectionToken<TimeFieldContextToken>('TIME_FIELDS_ROOT_CONTEXT');\n\nexport function injectTimeFieldsRootContext(): TimeFieldContextToken {\n return inject(TIME_FIELDS_ROOT_CONTEXT);\n}\n","import { computed, Directive, effect, ElementRef, inject, input, signal, WritableSignal } from '@angular/core';\nimport { DateValue } from '@internationalized/date';\nimport { SegmentPart, useDateField } from '@radix-ng/primitives/core';\nimport { injectTimeFieldsRootContext } from './time-field-context.token';\n\n@Directive({\n selector: '[rdxTimeFieldInput]',\n host: {\n '[attr.contenteditable]': 'disabled() || readonly() ? false : part() !== \"literal\"',\n '[attr.data-rdx-date-field-segment]': 'part()',\n '[attr.aria-disabled]': 'disabled() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined',\n '[attr.data-invalid]': 'displayValid() === false ? \"\" : undefined',\n '[attr.aria-invalid]': 'displayValid() === false ? true : undefined',\n\n '(mousedown)': 'part() !== \"literal\" && handleSegmentClick($event)',\n '(keydown)': 'part() !== \"literal\" && handleSegmentKeydown($event)',\n '(focus)': 'part() !== \"literal\" && onFocus($event)',\n '(focusout)': 'part() !== \"literal\" && onFocusOut()'\n }\n})\nexport class RdxTimeFieldInputDirective {\n private readonly el = inject(ElementRef);\n\n /**\n * The host element of this segment. Consumed by the root to collect focusable\n * segments in DOM order.\n * @ignore\n */\n readonly element: HTMLElement = this.el.nativeElement;\n\n private readonly rootContext = injectTimeFieldsRootContext();\n\n /**\n * The part of the date to render\n * `'hour' | 'minute' | 'second' | 'dayPeriod' | 'literal' | 'timeZoneName'`\n */\n readonly part = input<SegmentPart>();\n\n /**\n * @ignore\n */\n readonly disabled = computed(() => this.rootContext.disabled());\n\n /**\n * @ignore\n */\n readonly readonly = computed(() => this.rootContext.readonly());\n\n /**\n * @ignore\n */\n readonly isInvalid = computed(() => this.rootContext.invalidState());\n\n /** @ignore Tri-state display validity from the root (gated by an enclosing Field). */\n readonly displayValid = computed(() => this.rootContext.displayValid());\n\n /**\n * @ignore\n */\n readonly hasLeftFocus = signal<boolean>(true);\n\n /**\n * @ignore\n */\n readonly lastKeyZero = signal<boolean>(false);\n\n private readonly fieldData = computed(() => {\n return useDateField({\n hasLeftFocus: this.hasLeftFocus,\n lastKeyZero: this.lastKeyZero,\n placeholder: this.rootContext.convertedPlaceholder as unknown as WritableSignal<DateValue>,\n hourCycle: this.rootContext.hourCycle(),\n segmentValues: this.rootContext.segmentValues,\n formatter: this.rootContext.formatter(),\n part: <SegmentPart>this.part(),\n disabled: this.rootContext.disabled,\n readonly: this.rootContext.readonly,\n modelValue: this.rootContext.convertedModelValue as unknown as WritableSignal<DateValue>,\n focusNext: this.rootContext.focusNext,\n step: this.rootContext.step$\n });\n });\n\n private readonly attributes = computed(() => this.fieldData().attributes());\n\n /**\n * @ignore\n */\n handleSegmentClick: (e: Event) => void;\n\n /**\n * @ignore\n */\n handleSegmentKeydown: (e: Event) => void;\n\n constructor() {\n effect(() => {\n const { handleSegmentClick, handleSegmentKeydown } = this.fieldData();\n this.handleSegmentKeydown = handleSegmentKeydown as (e: Event) => void;\n this.handleSegmentClick = handleSegmentClick as (e: Event) => void;\n });\n\n effect(() => {\n const attrs = this.attributes();\n Object.entries(attrs).forEach(([attr, value]) => {\n this.el.nativeElement.setAttribute(attr, String(value));\n });\n });\n }\n\n /**\n * @ignore\n */\n onFocus(e: Event) {\n this.rootContext.setFocusedElement(e.target as HTMLElement);\n }\n\n /**\n * @ignore\n */\n onFocusOut() {\n this.hasLeftFocus.set(true);\n }\n}\n","import {\n booleanAttribute,\n computed,\n contentChildren,\n Directive,\n input,\n linkedSignal,\n model,\n Signal,\n signal\n} from '@angular/core';\nimport { DateValue, getLocalTimeZone, isEqualDay, Time, toCalendarDateTime, today } from '@internationalized/date';\nimport {\n ARROW_LEFT,\n ARROW_RIGHT,\n BooleanInput,\n createContent,\n createFormatter,\n DateStep,\n Direction,\n Formatter,\n getDefaultTime,\n Granularity,\n HourCycle,\n initializeSegmentValues,\n isBefore,\n isNullish,\n isSegmentNavigationKey,\n normalizeDateStep,\n normalizeHourCycle,\n provideToken,\n RdxFormUiControlBase,\n RdxFormValueControl,\n resolveDisplayValid,\n SegmentValueObj,\n syncSegmentValues,\n TimeValue,\n watch\n} from '@radix-ng/primitives/core';\nimport { injectDirection } from '@radix-ng/primitives/direction-provider';\nimport { TIME_FIELDS_ROOT_CONTEXT } from './time-field-context.token';\nimport { RdxTimeFieldInputDirective } from './time-field-input.directive';\n\nfunction convertValue(value: TimeValue, date: DateValue = today(getLocalTimeZone())) {\n if (value && 'day' in value) {\n return value;\n }\n\n return toCalendarDateTime(date, value);\n}\n\n/**\n * Map the internal edit buffer (`convertedModelValue`, always a date-bearing value\n * so the segment editor has a date context) back onto the public `value` model.\n * A date-bearing model keeps its shape; a time-only model is exposed as a plain `Time`.\n */\nfunction toModelValue(value: TimeValue, current: TimeValue | undefined): TimeValue {\n if (current && 'day' in current) {\n return value;\n }\n\n return new Time(value.hour, value.minute, value.second, value.millisecond);\n}\n\nfunction isSameTimeValue(a: TimeValue | undefined, b: TimeValue | undefined): boolean {\n if (isNullish(a) || isNullish(b)) return a === b;\n return (a as { compare(other: TimeValue): number }).compare(b) === 0;\n}\n\n@Directive({\n selector: '[rdxTimeFieldRoot]',\n exportAs: 'rdxTimeFieldRoot',\n providers: [provideToken(TIME_FIELDS_ROOT_CONTEXT, RdxTimeFieldRootDirective)],\n host: {\n role: 'group',\n '[attr.aria-disabled]': 'disabled() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined',\n '[attr.data-readonly]': 'readonly() ? \"\" : undefined',\n '[attr.aria-invalid]': 'displayValid() === false ? \"true\" : undefined',\n '[attr.data-invalid]': 'displayValid() === false ? \"\" : undefined',\n '[attr.data-valid]': 'displayValid() === true ? \"\" : undefined',\n '[attr.data-touched]': 'touchedState() ? \"\" : undefined',\n '[attr.data-dirty]': 'dirtyState() ? \"\" : undefined',\n '[attr.dir]': 'dir()',\n\n '(keydown)': 'onKeydown($event)',\n '(focusout)': 'markAsTouched()'\n }\n})\nexport class RdxTimeFieldRootDirective\n extends RdxFormUiControlBase\n implements RdxFormValueControl<TimeValue | undefined>\n{\n /**\n * The controlled checked state of the calendar.\n */\n readonly value = model<TimeValue | undefined>();\n\n /**\n * The hour cycle to use for formatting times. Defaults to the locale preference\n */\n readonly hourCycle = input<HourCycle>();\n\n /**\n * The granularity to use for formatting the field. Defaults to 'day' if a CalendarDate is provided, otherwise defaults to 'minute'.\n * The field will render segments for each part of the date up to and including the specified granularity.\n */\n readonly granularity = input<Granularity>();\n\n /**\n * The locale to use for formatting dates.\n */\n readonly locale = input<string>('en');\n\n readonly dirInput = input<Direction | undefined>(undefined, { alias: 'dir' });\n readonly dir = injectDirection(this.dirInput);\n\n /**\n * The minimum valid date that can be entered.\n */\n readonly minValue = input<TimeValue>();\n\n /**\n * The maximum valid date that can be entered.\n */\n readonly maxValue = input<TimeValue>();\n\n /**\n * Whether or not to hide the time zone segment of the field.\n */\n readonly hideTimeZone = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether or not the field is readonly.\n */\n readonly readonly = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * The stepping interval for the time fields. Defaults to 1\n */\n readonly step = input<DateStep>();\n\n readonly step$ = computed(() => normalizeDateStep(this.step()));\n\n /**\n * Locale- and hour-cycle-aware formatter. Recomputed whenever `locale` or\n * `hourCycle` change so segments always render with the current settings.\n * @ignore\n */\n readonly formatter: Signal<Formatter> = computed(() =>\n createFormatter(this.locale(), {\n hourCycle: normalizeHourCycle(this.hourCycle())\n })\n );\n\n /**\n * @ignore\n */\n readonly defaultDate = computed(() =>\n getDefaultTime({\n defaultPlaceholder: undefined,\n defaultValue: this.value()\n })\n );\n\n /**\n * The placeholder date, which is used to determine what month to display when no date is selected. This updates as the user navigates the calendar and can be used to programmatically control the calendar view\n */\n readonly placeholder = model<TimeValue | undefined>(this.defaultDate().copy());\n\n // Internal state\n\n /**\n * Segment input parts, collected from the projected content in DOM order. This\n * stays in sync with `segmentContents()` (granularity / locale / value changes\n * add or remove segments) instead of being captured once after view init.\n * @ignore\n */\n private readonly segmentInputs = contentChildren(RdxTimeFieldInputDirective);\n\n /**\n * The focusable (non-literal) segment elements, in DOM order.\n * @ignore\n */\n readonly segmentElements = computed(() =>\n this.segmentInputs()\n .filter((seg) => seg.part() !== 'literal')\n .map((seg) => seg.element)\n );\n\n /**\n * @ignore\n */\n readonly currentFocusedElement = signal<HTMLElement | null>(null);\n\n /**\n * @ignore\n */\n readonly inferredGranularity = computed(() => this.granularity() ?? 'minute');\n\n readonly convertedMinValue = computed(() => (this.minValue() ? convertValue(this.minValue()!) : undefined));\n readonly convertedMaxValue = computed(() => (this.maxValue() ? convertValue(this.maxValue()!) : undefined));\n\n readonly convertedModelValue = linkedSignal({\n source: () => {\n if (isNullish(this.value())) return this.value();\n\n return convertValue(this.value()!);\n },\n computation: (value: TimeValue | undefined) => {\n return value;\n }\n });\n\n readonly convertedPlaceholder = linkedSignal({\n source: () => {\n return convertValue(<TimeValue>this.placeholder());\n },\n computation: (value: TimeValue) => {\n return value;\n }\n });\n\n /**\n * The per-segment values. Writable so segment editing (via `useDateField`) can\n * update individual parts, but re-synced from the model whenever the value,\n * granularity or formatter change — so a controlled `value` set after init is\n * reflected, and an empty field re-initializes when granularity changes.\n * @ignore\n */\n readonly segmentValues = linkedSignal<\n { value: TimeValue | undefined; granularity: Granularity; formatter: Formatter },\n SegmentValueObj\n >({\n source: () => ({\n value: this.convertedModelValue(),\n granularity: this.inferredGranularity(),\n formatter: this.formatter()\n }),\n computation: ({ value, granularity, formatter }) =>\n value\n ? { ...syncSegmentValues({ value: <DateValue>value, formatter }) }\n : { ...initializeSegmentValues(granularity, true) }\n });\n\n /**\n * @ignore\n */\n readonly isInvalid = computed(() => {\n if (!this.value()) return false;\n\n if (\n this.convertedMinValue() &&\n isBefore(<DateValue>this.convertedModelValue(), <DateValue>this.convertedMinValue())\n )\n return true;\n\n if (\n this.convertedMaxValue() &&\n isBefore(<DateValue>this.convertedMaxValue(), <DateValue>this.convertedModelValue())\n )\n return true;\n\n return false;\n });\n\n /**\n * @ignore Effective invalid: the built-in range check OR the form-driven `invalid` / `errors`\n * (Signal Forms). Reflected on the root and segments.\n */\n readonly invalidState = computed(() => this.isInvalid() || this.formUi.invalidState());\n /**\n * @ignore Tri-state display validity: the enclosing Field's gated state when inside a `rdxFieldRoot`,\n * else the time-field's own (parse + form) invalidity. Overrides the base default (`formUi` only).\n */\n override readonly displayValid = computed(() => resolveDisplayValid(this.fieldValidity, this.invalidState));\n /** @ignore */\n readonly touchedState = this.formUi.touchedState;\n /** @ignore */\n readonly dirtyState = this.formUi.dirtyState;\n\n /** @ignore Whether the user has focused a segment — gates dirty tracking so a form/initial seed of `value` doesn't mark dirty. */\n private readonly userInteracted = signal(false);\n\n /** @ignore Mark the field touched (model + `touch` output) for Signal Forms. Called on segment blur. */\n markAsTouched(): void {\n this.formUi.markAsTouched();\n }\n\n /**\n * @ignore\n */\n readonly allSegmentContent = computed(() =>\n createContent({\n granularity: this.inferredGranularity(),\n dateRef: <DateValue>this.convertedPlaceholder(),\n formatter: this.formatter(),\n hideTimeZone: this.hideTimeZone(),\n hourCycle: this.hourCycle(),\n segmentValues: this.segmentValues(),\n locale: this.locale,\n isTimeValue: true\n })\n );\n\n /**\n * An array of segments that should be readonly, which prevent user input on them.\n */\n readonly segmentContents = computed(() => this.allSegmentContent().arr);\n\n /**\n * @ignore\n */\n readonly currentSegmentIndex = computed(() =>\n this.segmentElements().findIndex((el) => el === this.currentFocusedElement())\n );\n\n /**\n * @ignore\n */\n readonly prevFocusableSegment = computed(() => {\n const sign = this.dir() === 'rtl' ? -1 : 1;\n const elements = this.segmentElements();\n const index = this.currentSegmentIndex();\n const prevCondition = sign > 0 ? index < 0 : index > elements.length - 1;\n if (prevCondition) return null;\n\n return elements[index - sign];\n });\n\n /**\n * @ignore\n */\n readonly nextFocusableSegment = computed(() => {\n const sign = this.dir() === 'rtl' ? -1 : 1;\n const elements = this.segmentElements();\n const index = this.currentSegmentIndex();\n const nextCondition = sign < 0 ? index < 0 : index > elements.length - 1;\n if (nextCondition) return null;\n\n return elements[index + sign];\n });\n\n /**\n * @ignore\n */\n readonly focusNext = () => {\n this.nextFocusableSegment()?.focus();\n };\n\n constructor() {\n super();\n\n // Mark dirty when the value changes after the user has interacted (a form/initial seed of\n // `value` lands before any segment focus, so it is excluded).\n watch([this.value], () => {\n if (this.userInteracted()) {\n this.formUi.markDirty();\n }\n });\n\n watch([this.convertedModelValue], ([value]) => {\n if (\n !isNullish(value) &&\n (!isEqualDay(<DateValue>this.convertedPlaceholder(), <DateValue>value) ||\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n this.convertedPlaceholder().compare(value) !== 0)\n )\n this.placeholder.set(value.copy());\n\n // Segment editing (via `useDateField`) writes the internal `convertedModelValue`\n // buffer; mirror it back onto the public `value` model so two-way binding and\n // `valueChange` fire. The guard keeps this idempotent and breaks the feedback loop\n // (`value` → `convertedModelValue` source → here) once the values agree.\n const next = isNullish(value) ? undefined : toModelValue(value, this.value());\n if (!isSameTimeValue(this.value(), next)) {\n this.value.set(next);\n }\n });\n }\n\n /**\n * @ignore\n */\n onKeydown(event: Event) {\n const keyEvent = event as KeyboardEvent;\n if (!isSegmentNavigationKey(keyEvent.key)) return;\n const code = keyEvent.code;\n\n if (code === ARROW_LEFT) {\n this.prevFocusableSegment()?.focus();\n }\n\n if (code === ARROW_RIGHT) {\n this.nextFocusableSegment()?.focus();\n }\n }\n\n /**\n * @ignore\n */\n setFocusedElement(el: HTMLElement) {\n this.currentFocusedElement.set(el);\n this.userInteracted.set(true);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RdxTimeFieldInputDirective } from './src/time-field-input.directive';\nimport { RdxTimeFieldRootDirective } from './src/time-field-root.directive';\n\nexport * from './src/time-field-context.token';\nexport * from './src/time-field-input.directive';\nexport * from './src/time-field-root.directive';\n\nconst _imports = [RdxTimeFieldRootDirective, RdxTimeFieldInputDirective];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxTimeFieldModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAwBa,wBAAwB,GAAG,IAAI,cAAc,CAAwB,0BAA0B;SAE5F,2BAA2B,GAAA;AACvC,IAAA,OAAO,MAAM,CAAC,wBAAwB,CAAC;AAC3C;;MCPa,0BAA0B,CAAA;AA2EnC,IAAA,WAAA,GAAA;AA1EiB,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC;AAExC;;;;AAIG;AACM,QAAA,IAAA,CAAA,OAAO,GAAgB,IAAI,CAAC,EAAE,CAAC,aAAa;QAEpC,IAAA,CAAA,WAAW,GAAG,2BAA2B,EAAE;AAE5D;;;AAGG;AACM,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK;4FAAe;AAEpC;;AAEG;QACM,IAAA,CAAA,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE;qFAAC;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AA,EAAA,OAAA,EAAA,CAArD,yBAAyB,EAAE,0BAA0B,CAAA,EAAA,CAAA,CAAA;+GAM1D,kBAAkB,EAAA,CAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC;AACtB,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ;AACxB,iBAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -2,7 +2,8 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { model, input, booleanAttribute, output, computed, signal, effect, untracked, Directive, inject, ElementRef } from '@angular/core';
|
|
3
3
|
import * as i1 from '@radix-ng/primitives/composite';
|
|
4
4
|
import { RdxCompositeRoot } from '@radix-ng/primitives/composite';
|
|
5
|
-
import
|
|
5
|
+
import * as i2 from '@radix-ng/primitives/core';
|
|
6
|
+
import { RdxFormUiControlBase, createCancelableChangeEventDetails, createContext, provideValueAccessor, provideFormUiState, RdxFormUiStateHost } from '@radix-ng/primitives/core';
|
|
6
7
|
import { injectDirection } from '@radix-ng/primitives/direction-provider';
|
|
7
8
|
import { injectToolbarRootContext, injectToolbarGroupContext } from '@radix-ng/primitives/toolbar';
|
|
8
9
|
|
|
@@ -13,7 +14,7 @@ function toggleGroupContext(instance) {
|
|
|
13
14
|
disabled: instance.isDisabled,
|
|
14
15
|
orientation: instance.orientation,
|
|
15
16
|
isValueInitialized: instance.isValueInitialized,
|
|
16
|
-
toggle: (value, event, eventDetails) => instance.toggle(value, event, eventDetails)
|
|
17
|
+
toggle: (value, nextPressed, event, eventDetails) => instance.toggle(value, nextPressed, event, eventDetails)
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
20
|
/**
|
|
@@ -21,8 +22,9 @@ function toggleGroupContext(instance) {
|
|
|
21
22
|
* ({@link RdxToggleGroup}) or omit it when an ancestor already owns focus, e.g. a toolbar
|
|
22
23
|
* ({@link RdxToggleGroupWithoutFocus}).
|
|
23
24
|
*/
|
|
24
|
-
class RdxToggleGroupBase {
|
|
25
|
+
class RdxToggleGroupBase extends RdxFormUiControlBase {
|
|
25
26
|
constructor() {
|
|
27
|
+
super();
|
|
26
28
|
/**
|
|
27
29
|
* The pressed values. Always an array — a single value is `[value]`. Use with `(onValueChange)`
|
|
28
30
|
* for controlled state.
|
|
@@ -71,22 +73,32 @@ class RdxToggleGroupBase {
|
|
|
71
73
|
}
|
|
72
74
|
});
|
|
73
75
|
}
|
|
76
|
+
/** @ignore Bridge the CVA `onTouched` so `markAsTouched()` also notifies Reactive/template forms. */
|
|
77
|
+
formUiTouchTarget() {
|
|
78
|
+
return { markAsTouched: () => this.onTouched?.() };
|
|
79
|
+
}
|
|
74
80
|
/** @ignore Extra disabled state inherited from composite parents such as Toolbar. */
|
|
75
81
|
isExternallyDisabled() {
|
|
76
82
|
return false;
|
|
77
83
|
}
|
|
78
84
|
/** @ignore */
|
|
79
|
-
toggle(value, event, eventDetails) {
|
|
85
|
+
toggle(value, nextPressed, event, eventDetails) {
|
|
80
86
|
if (this.isDisabled()) {
|
|
81
87
|
return;
|
|
82
88
|
}
|
|
83
89
|
const current = this.pressedValues();
|
|
84
90
|
let next;
|
|
91
|
+
// The item supplies the next pressed boolean (source of truth); the group only maps it onto its
|
|
92
|
+
// value set — add `value` when pressed, remove it when not.
|
|
85
93
|
if (this.multiple()) {
|
|
86
|
-
next =
|
|
94
|
+
next = nextPressed
|
|
95
|
+
? current.includes(value)
|
|
96
|
+
? current
|
|
97
|
+
: [...current, value]
|
|
98
|
+
: current.filter((item) => item !== value);
|
|
87
99
|
}
|
|
88
100
|
else {
|
|
89
|
-
next =
|
|
101
|
+
next = nextPressed ? [value] : [];
|
|
90
102
|
}
|
|
91
103
|
const resolvedEventDetails = eventDetails ??
|
|
92
104
|
createCancelableChangeEventDetails('none', event ?? new Event('toggle-group.value-change'), event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined).eventDetails;
|
|
@@ -95,6 +107,7 @@ class RdxToggleGroupBase {
|
|
|
95
107
|
return;
|
|
96
108
|
}
|
|
97
109
|
this.value.set(next);
|
|
110
|
+
this.formUi.markDirty();
|
|
98
111
|
this.onChange?.(next);
|
|
99
112
|
}
|
|
100
113
|
/** @ignore */
|
|
@@ -114,7 +127,7 @@ class RdxToggleGroupBase {
|
|
|
114
127
|
this.accessorDisabled.set(isDisabled);
|
|
115
128
|
}
|
|
116
129
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxToggleGroupBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
117
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxToggleGroupBase, isStandalone: true, inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", onValueChange: "onValueChange" }, host: { attributes: { "role": "group" },
|
|
130
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxToggleGroupBase, isStandalone: true, inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", onValueChange: "onValueChange" }, host: { attributes: { "role": "group" }, properties: { "attr.data-orientation": "orientation()", "attr.data-disabled": "isDisabled() ? \"\" : undefined", "attr.data-multiple": "multiple() ? \"\" : undefined" } }, usesInheritance: true, ngImport: i0 }); }
|
|
118
131
|
}
|
|
119
132
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxToggleGroupBase, decorators: [{
|
|
120
133
|
type: Directive,
|
|
@@ -123,8 +136,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
123
136
|
role: 'group',
|
|
124
137
|
'[attr.data-orientation]': 'orientation()',
|
|
125
138
|
'[attr.data-disabled]': 'isDisabled() ? "" : undefined',
|
|
126
|
-
'[attr.data-multiple]': 'multiple() ? "" : undefined'
|
|
127
|
-
'(focusout)': 'onTouched?.()'
|
|
139
|
+
'[attr.data-multiple]': 'multiple() ? "" : undefined'
|
|
128
140
|
}
|
|
129
141
|
}]
|
|
130
142
|
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], onValueChange: [{ type: i0.Output, args: ["onValueChange"] }] } });
|
|
@@ -189,18 +201,20 @@ class RdxToggleGroup extends RdxToggleGroupBase {
|
|
|
189
201
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxToggleGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
190
202
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxToggleGroup, isStandalone: true, selector: "[rdxToggleGroup]", inputs: { dirInput: { classPropertyName: "dirInput", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, loopFocus: { classPropertyName: "loopFocus", publicName: "loopFocus", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
191
203
|
provideToggleGroupContext(() => toggleGroupContext(inject(RdxToggleGroup))),
|
|
192
|
-
provideValueAccessor(RdxToggleGroup)
|
|
193
|
-
|
|
204
|
+
provideValueAccessor(RdxToggleGroup),
|
|
205
|
+
provideFormUiState(() => inject(RdxToggleGroup).formUi)
|
|
206
|
+
], exportAs: ["rdxToggleGroup"], usesInheritance: true, hostDirectives: [{ directive: i1.RdxCompositeRoot }, { directive: i2.RdxFormUiStateHost }], ngImport: i0 }); }
|
|
194
207
|
}
|
|
195
208
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxToggleGroup, decorators: [{
|
|
196
209
|
type: Directive,
|
|
197
210
|
args: [{
|
|
198
211
|
selector: '[rdxToggleGroup]',
|
|
199
212
|
exportAs: 'rdxToggleGroup',
|
|
200
|
-
hostDirectives: [RdxCompositeRoot],
|
|
213
|
+
hostDirectives: [RdxCompositeRoot, RdxFormUiStateHost],
|
|
201
214
|
providers: [
|
|
202
215
|
provideToggleGroupContext(() => toggleGroupContext(inject(RdxToggleGroup))),
|
|
203
|
-
provideValueAccessor(RdxToggleGroup)
|
|
216
|
+
provideValueAccessor(RdxToggleGroup),
|
|
217
|
+
provideFormUiState(() => inject(RdxToggleGroup).formUi)
|
|
204
218
|
]
|
|
205
219
|
}]
|
|
206
220
|
}], ctorParameters: () => [], propDecorators: { dirInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }], loopFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "loopFocus", required: false }] }] } });
|
|
@@ -226,17 +240,20 @@ class RdxToggleGroupWithoutFocus extends RdxToggleGroupBase {
|
|
|
226
240
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxToggleGroupWithoutFocus, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
227
241
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxToggleGroupWithoutFocus, isStandalone: true, selector: "[rdxToggleGroupWithoutFocus]", providers: [
|
|
228
242
|
provideToggleGroupContext(() => toggleGroupContext(inject(RdxToggleGroupWithoutFocus))),
|
|
229
|
-
provideValueAccessor(RdxToggleGroupWithoutFocus)
|
|
230
|
-
|
|
243
|
+
provideValueAccessor(RdxToggleGroupWithoutFocus),
|
|
244
|
+
provideFormUiState(() => inject(RdxToggleGroupWithoutFocus).formUi)
|
|
245
|
+
], exportAs: ["rdxToggleGroupWithoutFocus"], usesInheritance: true, hostDirectives: [{ directive: i2.RdxFormUiStateHost }], ngImport: i0 }); }
|
|
231
246
|
}
|
|
232
247
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxToggleGroupWithoutFocus, decorators: [{
|
|
233
248
|
type: Directive,
|
|
234
249
|
args: [{
|
|
235
250
|
selector: '[rdxToggleGroupWithoutFocus]',
|
|
236
251
|
exportAs: 'rdxToggleGroupWithoutFocus',
|
|
252
|
+
hostDirectives: [RdxFormUiStateHost],
|
|
237
253
|
providers: [
|
|
238
254
|
provideToggleGroupContext(() => toggleGroupContext(inject(RdxToggleGroupWithoutFocus))),
|
|
239
|
-
provideValueAccessor(RdxToggleGroupWithoutFocus)
|
|
255
|
+
provideValueAccessor(RdxToggleGroupWithoutFocus),
|
|
256
|
+
provideFormUiState(() => inject(RdxToggleGroupWithoutFocus).formUi)
|
|
240
257
|
]
|
|
241
258
|
}]
|
|
242
259
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radix-ng-primitives-toggle-group.mjs","sources":["../../../packages/primitives/toggle-group/src/toggle-group-base.ts","../../../packages/primitives/toggle-group/src/toggle-group-context.ts","../../../packages/primitives/toggle-group/src/toggle-group.ts","../../../packages/primitives/toggle-group/src/toggle-group-without-focus.ts","../../../packages/primitives/toggle-group/radix-ng-primitives-toggle-group.ts"],"sourcesContent":["import { booleanAttribute, computed, Directive, effect, input, model, output, signal, untracked } from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport {\n BooleanInput,\n createCancelableChangeEventDetails,\n DataOrientation,\n RdxCancelableChangeEventDetails\n} from '@radix-ng/primitives/core';\nimport { RdxToggleGroupContext } from './toggle-group-context';\n\nexport type RdxToggleGroupValueChangeReason = 'none';\nexport type RdxToggleGroupValueChangeEventDetails = RdxCancelableChangeEventDetails<RdxToggleGroupValueChangeReason>;\n\nexport interface RdxToggleGroupValueChangeEvent {\n value: string[];\n eventDetails: RdxToggleGroupValueChangeEventDetails;\n}\n\n/** Builds the shared context a {@link RdxToggle} reads when it belongs to this group. */\nexport function toggleGroupContext(instance: RdxToggleGroupBase): RdxToggleGroupContext {\n return {\n value: instance.pressedValues,\n disabled: instance.isDisabled,\n orientation: instance.orientation,\n isValueInitialized: instance.isValueInitialized,\n toggle: (value, event, eventDetails) => instance.toggle(value, event, eventDetails)\n };\n}\n\n/**\n * Shared state and behavior for the toggle group. Concrete directives add the composite root\n * ({@link RdxToggleGroup}) or omit it when an ancestor already owns focus, e.g. a toolbar\n * ({@link RdxToggleGroupWithoutFocus}).\n */\n@Directive({\n host: {\n role: 'group',\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-disabled]': 'isDisabled() ? \"\" : undefined',\n '[attr.data-multiple]': 'multiple() ? \"\" : undefined',\n '(focusout)': 'onTouched?.()'\n }\n})\nexport abstract class RdxToggleGroupBase implements ControlValueAccessor {\n /**\n * The pressed values. Always an array — a single value is `[value]`. Use with `(onValueChange)`\n * for controlled state.\n */\n readonly value = model<string[]>();\n\n /** The values pressed when the group is initially rendered (uncontrolled). */\n readonly defaultValue = input<string[]>();\n\n /**\n * Whether multiple items can be pressed at the same time.\n *\n * @default false\n */\n readonly multiple = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the whole group is disabled.\n *\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * The orientation of the group, controlling arrow-key navigation.\n *\n * @default 'horizontal'\n */\n readonly orientation = input<DataOrientation>('horizontal');\n\n /** Event emitted when the pressed values change. */\n readonly onValueChange = output<RdxToggleGroupValueChangeEvent>();\n\n /** @ignore */\n readonly pressedValues = computed(() => this.value() ?? []);\n /** @ignore */\n readonly isValueInitialized = computed(() => this.value() !== undefined || this.defaultValue() !== undefined);\n\n protected readonly accessorDisabled = signal(false);\n /** @ignore */\n readonly isDisabled = computed(() => this.disabled() || this.accessorDisabled() || this.isExternallyDisabled());\n\n private onChange?: (value: string[]) => void;\n protected onTouched?: () => void;\n\n constructor() {\n effect(() => {\n const initial = this.defaultValue();\n if (initial !== undefined && untracked(this.value) === undefined) {\n this.value.set(initial);\n }\n });\n }\n\n /** @ignore Extra disabled state inherited from composite parents such as Toolbar. */\n protected isExternallyDisabled(): boolean {\n return false;\n }\n\n /** @ignore */\n toggle(value: string, event?: Event, eventDetails?: RdxToggleGroupValueChangeEventDetails): void {\n if (this.isDisabled()) {\n return;\n }\n\n const current = this.pressedValues();\n let next: string[];\n\n if (this.multiple()) {\n next = current.includes(value) ? current.filter((item) => item !== value) : [...current, value];\n } else {\n next = current.includes(value) ? [] : [value];\n }\n\n const resolvedEventDetails =\n eventDetails ??\n createCancelableChangeEventDetails(\n 'none',\n event ?? new Event('toggle-group.value-change'),\n event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined\n ).eventDetails;\n\n this.onValueChange.emit({ value: next, eventDetails: resolvedEventDetails });\n if (resolvedEventDetails.isCanceled()) {\n return;\n }\n\n this.value.set(next);\n this.onChange?.(next);\n }\n\n /** @ignore */\n writeValue(value: string[] | string | null): void {\n this.value.set(value == null ? [] : Array.isArray(value) ? value : [value]);\n }\n\n /** @ignore */\n registerOnChange(fn: (value: string[]) => void): void {\n this.onChange = fn;\n }\n\n /** @ignore */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /** @ignore */\n setDisabledState(isDisabled: boolean): void {\n this.accessorDisabled.set(isDisabled);\n }\n}\n","import { Signal } from '@angular/core';\nimport { createContext, DataOrientation, RdxCancelableChangeEventDetails } from '@radix-ng/primitives/core';\n\ntype RdxToggleGroupContextChangeReason = 'none';\n\n/**\n * Shared state a {@link RdxToggle} reads when it participates in a toggle group.\n */\nexport interface RdxToggleGroupContext {\n /** The currently pressed values. */\n readonly value: Signal<string[]>;\n\n /** Whether the whole group is disabled. */\n readonly disabled: Signal<boolean>;\n\n /** The orientation of the group. */\n readonly orientation: Signal<DataOrientation>;\n\n /** Whether the group value was initialized by `value` or `defaultValue`. */\n readonly isValueInitialized: Signal<boolean>;\n\n /** Toggle the pressed state of `value` within the group. */\n toggle(\n value: string,\n event?: Event,\n eventDetails?: RdxCancelableChangeEventDetails<RdxToggleGroupContextChangeReason>\n ): void;\n}\n\nexport const [injectToggleGroupContext, provideToggleGroupContext] = createContext<RdxToggleGroupContext>(\n 'RdxToggleGroupContext',\n 'components/toggle-group'\n);\n","import { booleanAttribute, computed, Directive, effect, ElementRef, inject, input } from '@angular/core';\nimport { RdxCompositeMetadata, RdxCompositeRoot } from '@radix-ng/primitives/composite';\nimport { BooleanInput, Direction, provideValueAccessor } from '@radix-ng/primitives/core';\nimport { injectDirection } from '@radix-ng/primitives/direction-provider';\nimport { RdxToggleGroupBase, toggleGroupContext } from './toggle-group-base';\nimport { provideToggleGroupContext } from './toggle-group-context';\n\n/**\n * A set of two-state buttons that can be toggled on or off. Owns composite keyboard focus over its\n * `[rdxToggle]` children.\n *\n * @see https://base-ui.com/react/components/toggle-group\n */\n@Directive({\n selector: '[rdxToggleGroup]',\n exportAs: 'rdxToggleGroup',\n hostDirectives: [RdxCompositeRoot],\n providers: [\n provideToggleGroupContext(() => toggleGroupContext(inject(RdxToggleGroup))),\n provideValueAccessor(RdxToggleGroup)\n ]\n})\nexport class RdxToggleGroup extends RdxToggleGroupBase {\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** Text direction for arrow-key navigation. */\n readonly dirInput = input<Direction | undefined>(undefined, { alias: 'dir' });\n readonly dir = injectDirection(this.dirInput);\n\n /**\n * Whether keyboard navigation should loop from the last item back to the first.\n *\n * @default true\n */\n readonly loopFocus = input<boolean, BooleanInput>(true, { transform: booleanAttribute });\n\n private readonly compositeRoot = inject(RdxCompositeRoot, { self: true });\n private readonly itemMetadata = computed(() =>\n Array.from(this.compositeRoot.itemMap().values()).filter(isToggleItemMetadata)\n );\n private readonly disabledIndices = computed(() =>\n this.itemMetadata()\n .filter((metadata) => metadata.disabled)\n .map((metadata) => metadata.index)\n );\n private readonly activeIndex = computed(() => {\n const pressedValues = this.pressedValues();\n if (pressedValues.length === 0) {\n return -1;\n }\n\n return this.itemMetadata().find((metadata) => pressedValues.includes(metadata.value))?.index ?? -1;\n });\n\n constructor() {\n super();\n\n effect(() => {\n this.compositeRoot.setOrientation(this.orientation());\n this.compositeRoot.setDir(this.dir());\n this.compositeRoot.setLoopFocus(this.loopFocus());\n this.compositeRoot.setEnableHomeAndEndKeys(true);\n });\n\n effect(() => {\n this.compositeRoot.setDisabledIndices(this.disabledIndices());\n });\n\n effect(() => {\n const activeIndex = this.activeIndex();\n\n if (activeIndex === -1 || this.disabledIndices().includes(activeIndex)) {\n return;\n }\n\n const activeElement = this.elementRef.nativeElement.ownerDocument.activeElement;\n if (activeElement && this.elementRef.nativeElement.contains(activeElement)) {\n return;\n }\n\n this.compositeRoot.setHighlightedIndex(activeIndex);\n });\n }\n}\n\ninterface RdxToggleItemMetadata {\n [key: string]: unknown;\n disabled: boolean;\n value: string;\n}\n\nfunction isToggleItemMetadata(metadata: RdxCompositeMetadata): metadata is RdxCompositeMetadata<RdxToggleItemMetadata> {\n return typeof metadata['disabled'] === 'boolean' && typeof metadata['value'] === 'string';\n}\n","import { Directive, inject } from '@angular/core';\nimport { provideValueAccessor } from '@radix-ng/primitives/core';\nimport { injectToolbarGroupContext, injectToolbarRootContext } from '@radix-ng/primitives/toolbar';\nimport { RdxToggleGroupBase, toggleGroupContext } from './toggle-group-base';\nimport { provideToggleGroupContext } from './toggle-group-context';\n\n/**\n * A toggle group that does NOT create its own composite root, for use inside a container that\n * already owns keyboard focus (e.g. a toolbar). The `[rdxToggle]` children register with the nearest\n * ancestor composite root instead. Mirrors Base UI's behavior of skipping its composite root\n * when nested in a toolbar.\n */\n@Directive({\n selector: '[rdxToggleGroupWithoutFocus]',\n exportAs: 'rdxToggleGroupWithoutFocus',\n providers: [\n provideToggleGroupContext(() => toggleGroupContext(inject(RdxToggleGroupWithoutFocus))),\n provideValueAccessor(RdxToggleGroupWithoutFocus)\n ]\n})\nexport class RdxToggleGroupWithoutFocus extends RdxToggleGroupBase {\n private readonly toolbarRootContext = injectToolbarRootContext(true);\n private readonly toolbarGroupContext = injectToolbarGroupContext(true);\n\n protected override isExternallyDisabled(): boolean {\n return (this.toolbarRootContext?.disabled() ?? false) || (this.toolbarGroupContext?.disabled() ?? false);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAkBA;AACM,SAAU,kBAAkB,CAAC,QAA4B,EAAA;IAC3D,OAAO;QACH,KAAK,EAAE,QAAQ,CAAC,aAAa;QAC7B,QAAQ,EAAE,QAAQ,CAAC,UAAU;QAC7B,WAAW,EAAE,QAAQ,CAAC,WAAW;QACjC,kBAAkB,EAAE,QAAQ,CAAC,kBAAkB;AAC/C,QAAA,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,YAAY,KAAK,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,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,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,8BAAA,EAAA,SAAA,EALxB;YACP,yBAAyB,CAAC,MAAM,kBAAkB,CAAC,MAAM,CAAC,0BAA0B,CAAC,CAAC,CAAC;YACvF,oBAAoB,CAAC,0BAA0B;AAClD,SAAA,EAAA,QAAA,EAAA,CAAA,4BAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAEQ,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBARtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,8BAA8B;AACxC,oBAAA,QAAQ,EAAE,4BAA4B;AACtC,oBAAA,SAAS,EAAE;wBACP,yBAAyB,CAAC,MAAM,kBAAkB,CAAC,MAAM,CAAA,0BAAA,CAA4B,CAAC,CAAC;AACvF,wBAAA,oBAAoB,CAAA,0BAAA;AACvB;AACJ,iBAAA;;;ACnBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"radix-ng-primitives-toggle-group.mjs","sources":["../../../packages/primitives/toggle-group/src/toggle-group-base.ts","../../../packages/primitives/toggle-group/src/toggle-group-context.ts","../../../packages/primitives/toggle-group/src/toggle-group.ts","../../../packages/primitives/toggle-group/src/toggle-group-without-focus.ts","../../../packages/primitives/toggle-group/radix-ng-primitives-toggle-group.ts"],"sourcesContent":["import { booleanAttribute, computed, Directive, effect, input, model, output, signal, untracked } from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport {\n BooleanInput,\n createCancelableChangeEventDetails,\n DataOrientation,\n RdxCancelableChangeEventDetails,\n RdxFormUiControlBase,\n RdxFormUiTouchTarget,\n RdxFormValueControl\n} from '@radix-ng/primitives/core';\nimport { RdxToggleGroupContext } from './toggle-group-context';\n\nexport type RdxToggleGroupValueChangeReason = 'none';\nexport type RdxToggleGroupValueChangeEventDetails = RdxCancelableChangeEventDetails<RdxToggleGroupValueChangeReason>;\n\nexport interface RdxToggleGroupValueChangeEvent {\n value: string[];\n eventDetails: RdxToggleGroupValueChangeEventDetails;\n}\n\n/** Builds the shared context a {@link RdxToggle} reads when it belongs to this group. */\nexport function toggleGroupContext(instance: RdxToggleGroupBase): RdxToggleGroupContext {\n return {\n value: instance.pressedValues,\n disabled: instance.isDisabled,\n orientation: instance.orientation,\n isValueInitialized: instance.isValueInitialized,\n toggle: (value, nextPressed, event, eventDetails) => instance.toggle(value, nextPressed, event, eventDetails)\n };\n}\n\n/**\n * Shared state and behavior for the toggle group. Concrete directives add the composite root\n * ({@link RdxToggleGroup}) or omit it when an ancestor already owns focus, e.g. a toolbar\n * ({@link RdxToggleGroupWithoutFocus}).\n */\n@Directive({\n host: {\n role: 'group',\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-disabled]': 'isDisabled() ? \"\" : undefined',\n '[attr.data-multiple]': 'multiple() ? \"\" : undefined'\n }\n})\nexport abstract class RdxToggleGroupBase\n extends RdxFormUiControlBase\n implements ControlValueAccessor, RdxFormValueControl<string[] | undefined>\n{\n /**\n * The pressed values. Always an array — a single value is `[value]`. Use with `(onValueChange)`\n * for controlled state.\n */\n readonly value = model<string[]>();\n\n /** The values pressed when the group is initially rendered (uncontrolled). */\n readonly defaultValue = input<string[]>();\n\n /**\n * Whether multiple items can be pressed at the same time.\n *\n * @default false\n */\n readonly multiple = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the whole group is disabled.\n *\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * The orientation of the group, controlling arrow-key navigation.\n *\n * @default 'horizontal'\n */\n readonly orientation = input<DataOrientation>('horizontal');\n\n /** Event emitted when the pressed values change. */\n readonly onValueChange = output<RdxToggleGroupValueChangeEvent>();\n\n /** @ignore */\n readonly pressedValues = computed(() => this.value() ?? []);\n /** @ignore */\n readonly isValueInitialized = computed(() => this.value() !== undefined || this.defaultValue() !== undefined);\n\n protected readonly accessorDisabled = signal(false);\n /** @ignore */\n readonly isDisabled = computed(() => this.disabled() || this.accessorDisabled() || this.isExternallyDisabled());\n\n private onChange?: (value: string[]) => void;\n protected onTouched?: () => void;\n\n constructor() {\n super();\n\n effect(() => {\n const initial = this.defaultValue();\n if (initial !== undefined && untracked(this.value) === undefined) {\n this.value.set(initial);\n }\n });\n }\n\n /** @ignore Bridge the CVA `onTouched` so `markAsTouched()` also notifies Reactive/template forms. */\n protected override formUiTouchTarget(): RdxFormUiTouchTarget {\n return { markAsTouched: () => this.onTouched?.() };\n }\n\n /** @ignore Extra disabled state inherited from composite parents such as Toolbar. */\n protected isExternallyDisabled(): boolean {\n return false;\n }\n\n /** @ignore */\n toggle(\n value: string,\n nextPressed: boolean,\n event?: Event,\n eventDetails?: RdxToggleGroupValueChangeEventDetails\n ): void {\n if (this.isDisabled()) {\n return;\n }\n\n const current = this.pressedValues();\n let next: string[];\n\n // The item supplies the next pressed boolean (source of truth); the group only maps it onto its\n // value set — add `value` when pressed, remove it when not.\n if (this.multiple()) {\n next = nextPressed\n ? current.includes(value)\n ? current\n : [...current, value]\n : current.filter((item) => item !== value);\n } else {\n next = nextPressed ? [value] : [];\n }\n\n const resolvedEventDetails =\n eventDetails ??\n createCancelableChangeEventDetails(\n 'none',\n event ?? new Event('toggle-group.value-change'),\n event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined\n ).eventDetails;\n\n this.onValueChange.emit({ value: next, eventDetails: resolvedEventDetails });\n if (resolvedEventDetails.isCanceled()) {\n return;\n }\n\n this.value.set(next);\n this.formUi.markDirty();\n this.onChange?.(next);\n }\n\n /** @ignore */\n writeValue(value: string[] | string | null): void {\n this.value.set(value == null ? [] : Array.isArray(value) ? value : [value]);\n }\n\n /** @ignore */\n registerOnChange(fn: (value: string[]) => void): void {\n this.onChange = fn;\n }\n\n /** @ignore */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /** @ignore */\n setDisabledState(isDisabled: boolean): void {\n this.accessorDisabled.set(isDisabled);\n }\n}\n","import { Signal } from '@angular/core';\nimport { createContext, DataOrientation, RdxCancelableChangeEventDetails } from '@radix-ng/primitives/core';\n\ntype RdxToggleGroupContextChangeReason = 'none';\n\n/**\n * Shared state a {@link RdxToggle} reads when it participates in a toggle group.\n */\nexport interface RdxToggleGroupContext {\n /** The currently pressed values. */\n readonly value: Signal<string[]>;\n\n /** Whether the whole group is disabled. */\n readonly disabled: Signal<boolean>;\n\n /** The orientation of the group. */\n readonly orientation: Signal<DataOrientation>;\n\n /** Whether the group value was initialized by `value` or `defaultValue`. */\n readonly isValueInitialized: Signal<boolean>;\n\n /**\n * Set the pressed state of `value` within the group. The item computes the next pressed boolean\n * (Base UI parity — the item is the source of truth), so the group applies it rather than\n * re-deriving the toggle from its current value set.\n */\n toggle(\n value: string,\n nextPressed: boolean,\n event?: Event,\n eventDetails?: RdxCancelableChangeEventDetails<RdxToggleGroupContextChangeReason>\n ): void;\n}\n\nexport const [injectToggleGroupContext, provideToggleGroupContext] = createContext<RdxToggleGroupContext>(\n 'RdxToggleGroupContext',\n 'components/toggle-group'\n);\n","import { booleanAttribute, computed, Directive, effect, ElementRef, inject, input } from '@angular/core';\nimport { RdxCompositeMetadata, RdxCompositeRoot } from '@radix-ng/primitives/composite';\nimport {\n BooleanInput,\n Direction,\n provideFormUiState,\n provideValueAccessor,\n RdxFormUiStateHost\n} from '@radix-ng/primitives/core';\nimport { injectDirection } from '@radix-ng/primitives/direction-provider';\nimport { RdxToggleGroupBase, toggleGroupContext } from './toggle-group-base';\nimport { provideToggleGroupContext } from './toggle-group-context';\n\n/**\n * A set of two-state buttons that can be toggled on or off. Owns composite keyboard focus over its\n * `[rdxToggle]` children.\n *\n * @see https://base-ui.com/react/components/toggle-group\n */\n@Directive({\n selector: '[rdxToggleGroup]',\n exportAs: 'rdxToggleGroup',\n hostDirectives: [RdxCompositeRoot, RdxFormUiStateHost],\n providers: [\n provideToggleGroupContext(() => toggleGroupContext(inject(RdxToggleGroup))),\n provideValueAccessor(RdxToggleGroup),\n provideFormUiState(() => inject(RdxToggleGroup).formUi)\n ]\n})\nexport class RdxToggleGroup extends RdxToggleGroupBase {\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** Text direction for arrow-key navigation. */\n readonly dirInput = input<Direction | undefined>(undefined, { alias: 'dir' });\n readonly dir = injectDirection(this.dirInput);\n\n /**\n * Whether keyboard navigation should loop from the last item back to the first.\n *\n * @default true\n */\n readonly loopFocus = input<boolean, BooleanInput>(true, { transform: booleanAttribute });\n\n private readonly compositeRoot = inject(RdxCompositeRoot, { self: true });\n private readonly itemMetadata = computed(() =>\n Array.from(this.compositeRoot.itemMap().values()).filter(isToggleItemMetadata)\n );\n private readonly disabledIndices = computed(() =>\n this.itemMetadata()\n .filter((metadata) => metadata.disabled)\n .map((metadata) => metadata.index)\n );\n private readonly activeIndex = computed(() => {\n const pressedValues = this.pressedValues();\n if (pressedValues.length === 0) {\n return -1;\n }\n\n return this.itemMetadata().find((metadata) => pressedValues.includes(metadata.value))?.index ?? -1;\n });\n\n constructor() {\n super();\n\n effect(() => {\n this.compositeRoot.setOrientation(this.orientation());\n this.compositeRoot.setDir(this.dir());\n this.compositeRoot.setLoopFocus(this.loopFocus());\n this.compositeRoot.setEnableHomeAndEndKeys(true);\n });\n\n effect(() => {\n this.compositeRoot.setDisabledIndices(this.disabledIndices());\n });\n\n effect(() => {\n const activeIndex = this.activeIndex();\n\n if (activeIndex === -1 || this.disabledIndices().includes(activeIndex)) {\n return;\n }\n\n const activeElement = this.elementRef.nativeElement.ownerDocument.activeElement;\n if (activeElement && this.elementRef.nativeElement.contains(activeElement)) {\n return;\n }\n\n this.compositeRoot.setHighlightedIndex(activeIndex);\n });\n }\n}\n\ninterface RdxToggleItemMetadata {\n [key: string]: unknown;\n disabled: boolean;\n value: string;\n}\n\nfunction isToggleItemMetadata(metadata: RdxCompositeMetadata): metadata is RdxCompositeMetadata<RdxToggleItemMetadata> {\n return typeof metadata['disabled'] === 'boolean' && typeof metadata['value'] === 'string';\n}\n","import { Directive, inject } from '@angular/core';\nimport { provideFormUiState, provideValueAccessor, RdxFormUiStateHost } from '@radix-ng/primitives/core';\nimport { injectToolbarGroupContext, injectToolbarRootContext } from '@radix-ng/primitives/toolbar';\nimport { RdxToggleGroupBase, toggleGroupContext } from './toggle-group-base';\nimport { provideToggleGroupContext } from './toggle-group-context';\n\n/**\n * A toggle group that does NOT create its own composite root, for use inside a container that\n * already owns keyboard focus (e.g. a toolbar). The `[rdxToggle]` children register with the nearest\n * ancestor composite root instead. Mirrors Base UI's behavior of skipping its composite root\n * when nested in a toolbar.\n */\n@Directive({\n selector: '[rdxToggleGroupWithoutFocus]',\n exportAs: 'rdxToggleGroupWithoutFocus',\n hostDirectives: [RdxFormUiStateHost],\n providers: [\n provideToggleGroupContext(() => toggleGroupContext(inject(RdxToggleGroupWithoutFocus))),\n provideValueAccessor(RdxToggleGroupWithoutFocus),\n provideFormUiState(() => inject(RdxToggleGroupWithoutFocus).formUi)\n ]\n})\nexport class RdxToggleGroupWithoutFocus extends RdxToggleGroupBase {\n private readonly toolbarRootContext = injectToolbarRootContext(true);\n private readonly toolbarGroupContext = injectToolbarGroupContext(true);\n\n protected override isExternallyDisabled(): boolean {\n return (this.toolbarRootContext?.disabled() ?? false) || (this.toolbarGroupContext?.disabled() ?? false);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;AAqBA;AACM,SAAU,kBAAkB,CAAC,QAA4B,EAAA;IAC3D,OAAO;QACH,KAAK,EAAE,QAAQ,CAAC,aAAa;QAC7B,QAAQ,EAAE,QAAQ,CAAC,UAAU;QAC7B,WAAW,EAAE,QAAQ,CAAC,WAAW;QACjC,kBAAkB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