@radix-ng/primitives 1.0.9 → 1.0.10
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-autocomplete.mjs +11 -3
- package/fesm2022/radix-ng-primitives-autocomplete.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-combobox.mjs +11 -3
- package/fesm2022/radix-ng-primitives-combobox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-core.mjs +9 -6
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-date-field.mjs +18 -8
- package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs +9 -0
- package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-focus-scope.mjs +241 -95
- package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menu.mjs +97 -9
- package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs +17 -3
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popper.mjs +148 -23
- package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-portal.mjs +16 -5
- package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-select.mjs +14 -6
- package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-time-field.mjs +12 -4
- package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
- package/package.json +1 -5
- package/types/radix-ng-primitives-core.d.ts +15 -12
- package/types/radix-ng-primitives-date-field.d.ts +14 -4
- package/types/radix-ng-primitives-floating-focus-manager.d.ts +7 -0
- package/types/radix-ng-primitives-focus-scope.d.ts +61 -44
- package/types/radix-ng-primitives-menu.d.ts +14 -3
- package/types/radix-ng-primitives-popper.d.ts +136 -43
- package/types/radix-ng-primitives-portal.d.ts +18 -8
- package/types/radix-ng-primitives-time-field.d.ts +12 -4
- package/fesm2022/radix-ng-primitives-focus-guards.mjs +0 -53
- package/fesm2022/radix-ng-primitives-focus-guards.mjs.map +0 -1
- package/focus-guards/README.md +0 -1
- package/types/radix-ng-primitives-focus-guards.d.ts +0 -15
|
@@ -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, RdxFormUiControlBase, normalizeDateStep, createFormatter, normalizeHourCycle, getDefaultTime, syncSegmentValues, initializeSegmentValues, isBefore, resolveDisplayValid, createContent, watch, isSegmentNavigationKey, ARROW_LEFT, ARROW_RIGHT,
|
|
3
|
+
import { useDateField, isNullish, RdxFormUiControlBase, normalizeDateStep, createFormatter, normalizeHourCycle, getDefaultTime, syncSegmentValues, initializeSegmentValues, isBefore, resolveDisplayValid, createContent, watch, isSegmentNavigationKey, ARROW_LEFT, ARROW_RIGHT, provideExistingToken } 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
|
|
|
@@ -218,6 +218,14 @@ class RdxTimeFieldRootDirective extends RdxFormUiControlBase {
|
|
|
218
218
|
*/
|
|
219
219
|
this.placeholder = model(this.defaultDate().copy(), /* @ts-ignore */
|
|
220
220
|
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
221
|
+
/**
|
|
222
|
+
* Always-defined placeholder used for segment math. A controlled `[placeholder]` can be reset to
|
|
223
|
+
* `undefined`; fall back to the default time so the converted placeholder is never built from
|
|
224
|
+
* `undefined`.
|
|
225
|
+
* @ignore
|
|
226
|
+
*/
|
|
227
|
+
this.effectivePlaceholder = computed(() => this.placeholder() ?? this.defaultDate().copy(), /* @ts-ignore */
|
|
228
|
+
...(ngDevMode ? [{ debugName: "effectivePlaceholder" }] : /* istanbul ignore next */ []));
|
|
221
229
|
// Internal state
|
|
222
230
|
/**
|
|
223
231
|
* Segment input parts, collected from the projected content in DOM order. This
|
|
@@ -258,7 +266,7 @@ class RdxTimeFieldRootDirective extends RdxFormUiControlBase {
|
|
|
258
266
|
return value;
|
|
259
267
|
} });
|
|
260
268
|
this.convertedPlaceholder = linkedSignal({ ...(ngDevMode ? { debugName: "convertedPlaceholder" } : /* istanbul ignore next */ {}), source: () => {
|
|
261
|
-
return convertValue(this.
|
|
269
|
+
return convertValue(this.effectivePlaceholder());
|
|
262
270
|
},
|
|
263
271
|
computation: (value) => {
|
|
264
272
|
return value;
|
|
@@ -415,14 +423,14 @@ class RdxTimeFieldRootDirective extends RdxFormUiControlBase {
|
|
|
415
423
|
this.userInteracted.set(true);
|
|
416
424
|
}
|
|
417
425
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxTimeFieldRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
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: [
|
|
426
|
+
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: [provideExistingToken(TIME_FIELDS_ROOT_CONTEXT, RdxTimeFieldRootDirective)], queries: [{ propertyName: "segmentInputs", predicate: RdxTimeFieldInputDirective, isSignal: true }], exportAs: ["rdxTimeFieldRoot"], usesInheritance: true, ngImport: i0 }); }
|
|
419
427
|
}
|
|
420
428
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxTimeFieldRootDirective, decorators: [{
|
|
421
429
|
type: Directive,
|
|
422
430
|
args: [{
|
|
423
431
|
selector: '[rdxTimeFieldRoot]',
|
|
424
432
|
exportAs: 'rdxTimeFieldRoot',
|
|
425
|
-
providers: [
|
|
433
|
+
providers: [provideExistingToken(TIME_FIELDS_ROOT_CONTEXT, RdxTimeFieldRootDirective)],
|
|
426
434
|
host: {
|
|
427
435
|
role: 'group',
|
|
428
436
|
'[attr.aria-disabled]': 'disabled() ? "" : undefined',
|
|
@@ -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 /** 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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wBAAA,WAAW,EAAE,mBAAmB;AAChC,wBAAA,YAAY,EAAE;AACjB;AACJ,iBAAA;41CA4FoD,0BAA0B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC5K/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 /** The controlled placeholder; may be `undefined`. Use `convertedPlaceholder` for segment math. */\n placeholder: Signal<TimeValue | undefined>;\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 // Read-only views: consumers only read these. Typed as `Signal<…>` supertypes so the concrete\n // signal kind (transformed input, model, computed) is an implementation detail and mocks stay simple.\n disabled: Signal<boolean>;\n readonly: Signal<boolean>;\n formatter: Signal<Formatter>;\n hourCycle: Signal<HourCycle | undefined>;\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 provideExistingToken,\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: [provideExistingToken(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 /**\n * Always-defined placeholder used for segment math. A controlled `[placeholder]` can be reset to\n * `undefined`; fall back to the default time so the converted placeholder is never built from\n * `undefined`.\n * @ignore\n */\n readonly effectivePlaceholder = computed(() => this.placeholder() ?? 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(this.effectivePlaceholder());\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":";;;;;;MA2Ba,wBAAwB,GAAG,IAAI,cAAc,CAAwB,0BAA0B;SAE5F,2BAA2B,GAAA;AACvC,IAAA,OAAO,MAAM,CAAC,wBAAwB,CAAC;AAC3C;;MCVa,0BAA0B,CAAA;AA2EnC,IAAA,WAAA,GAAA;AA1EiB,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM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oD,0BAA0B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACpL/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;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@radix-ng/primitives",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "Headless, signals-first UI primitives for Angular.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -145,10 +145,6 @@
|
|
|
145
145
|
"types": "./types/radix-ng-primitives-floating-focus-manager.d.ts",
|
|
146
146
|
"default": "./fesm2022/radix-ng-primitives-floating-focus-manager.mjs"
|
|
147
147
|
},
|
|
148
|
-
"./focus-guards": {
|
|
149
|
-
"types": "./types/radix-ng-primitives-focus-guards.d.ts",
|
|
150
|
-
"default": "./fesm2022/radix-ng-primitives-focus-guards.mjs"
|
|
151
|
-
},
|
|
152
148
|
"./focus-scope": {
|
|
153
149
|
"types": "./types/radix-ng-primitives-focus-scope.d.ts",
|
|
154
150
|
"default": "./fesm2022/radix-ng-primitives-focus-scope.mjs"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Type, Provider, InputSignal, WritableSignal,
|
|
2
|
+
import { Type, Provider, InputSignal, WritableSignal, Signal, ModelSignal, ProviderToken, InputSignalWithTransform, OutputRef, InjectionToken, OutputEmitterRef, Injector, ElementRef, EffectRef, EffectCleanupRegisterFn, CreateEffectOptions } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor } from '@angular/forms';
|
|
4
4
|
import { DateValue, Time, CalendarDateTime, ZonedDateTime } from '@internationalized/date';
|
|
5
5
|
import * as _radix_ng_primitives_core from '@radix-ng/primitives/core';
|
|
@@ -453,13 +453,13 @@ declare function getSegmentElements(parentElement: HTMLElement): Element[];
|
|
|
453
453
|
type UseDateFieldProps = {
|
|
454
454
|
hasLeftFocus: WritableSignal<boolean>;
|
|
455
455
|
lastKeyZero: WritableSignal<boolean>;
|
|
456
|
-
placeholder:
|
|
457
|
-
hourCycle: HourCycle;
|
|
456
|
+
placeholder: Signal<DateValue>;
|
|
457
|
+
hourCycle: HourCycle | undefined;
|
|
458
458
|
formatter: Formatter;
|
|
459
459
|
segmentValues: WritableSignal<SegmentValueObj>;
|
|
460
460
|
step: Signal<DateStep>;
|
|
461
|
-
disabled:
|
|
462
|
-
readonly:
|
|
461
|
+
disabled: Signal<boolean>;
|
|
462
|
+
readonly: Signal<boolean>;
|
|
463
463
|
part: SegmentPart;
|
|
464
464
|
modelValue: ModelSignal<DateValue | undefined> | WritableSignal<DateValue | undefined>;
|
|
465
465
|
focusNext: () => void;
|
|
@@ -467,7 +467,7 @@ type UseDateFieldProps = {
|
|
|
467
467
|
type SegmentAttrProps = {
|
|
468
468
|
disabled: boolean;
|
|
469
469
|
segmentValues: SegmentValueObj;
|
|
470
|
-
hourCycle: HourCycle;
|
|
470
|
+
hourCycle: HourCycle | undefined;
|
|
471
471
|
placeholder: DateValue;
|
|
472
472
|
formatter: Formatter;
|
|
473
473
|
};
|
|
@@ -763,22 +763,25 @@ declare function isEqual(a: any, b: any): boolean;
|
|
|
763
763
|
* of the specified class. This is especially useful when you want multiple
|
|
764
764
|
* tokens (or interfaces) to resolve to the same directive/component instance.
|
|
765
765
|
*
|
|
766
|
-
*
|
|
767
|
-
*
|
|
768
|
-
*
|
|
766
|
+
* `Type<T>` ties the class to the token's contract, so a class that does not
|
|
767
|
+
* satisfy `T` is rejected at compile time instead of failing at runtime.
|
|
768
|
+
*
|
|
769
|
+
* @template T - The type associated with the provider token.
|
|
770
|
+
* @param token - The token (InjectionToken, class, or abstract class) to provide.
|
|
771
|
+
* @param type - The class whose existing instance resolves this token; must satisfy `T`.
|
|
769
772
|
* @returns A Provider configuration object for Angular's DI system.
|
|
770
773
|
*
|
|
771
774
|
* @example
|
|
772
775
|
*
|
|
773
776
|
* @Directive({
|
|
774
777
|
* providers: [
|
|
775
|
-
*
|
|
778
|
+
* provideExistingToken(RdxFooToken, RdxFooDirective),
|
|
776
779
|
* provideValueAccessor(RdxFooDirective)
|
|
777
780
|
* ]
|
|
778
781
|
* })
|
|
779
782
|
* export class RdxFooDirective {}
|
|
780
783
|
*/
|
|
781
|
-
declare function
|
|
784
|
+
declare function provideExistingToken<T>(token: ProviderToken<T>, type: Type<T>): Provider;
|
|
782
785
|
|
|
783
786
|
/**
|
|
784
787
|
* Local mirror of Angular Signal Forms' control contracts
|
|
@@ -2053,5 +2056,5 @@ declare enum RdxPositionAlign {
|
|
|
2053
2056
|
End = "end"
|
|
2054
2057
|
}
|
|
2055
2058
|
|
|
2056
|
-
export { A, ALT, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP, ASTERISK, BACKSPACE, CAPS_LOCK, CONTROL, CTRL, DELETE, DOCS_BASE_URL, END, ENTER, ESCAPE, F1, F10, F11, F12, F2, F3, F4, F5, F6, F7, F8, F9, HOME, META, P, PAGE_DOWN, PAGE_UP, RDX_DEFAULT_VALIDATION_MODE, RDX_FIELD_VALIDITY, RDX_FLOATING_REGISTRATION, RDX_FLOATING_ROOT_CONTEXT, RDX_FLOATING_TREE, RDX_FORM_UI_STATE, RDX_INTERNAL_BACKDROP_ATTR, RDX_SCROLL_LOCKED_ATTR, RdxControlValueAccessor, RdxFloatingNode, RdxFloatingNodeRegistration, RdxFloatingRegistrationContext, RdxFloatingRootContext, RdxFloatingTree, RdxFormUiControlBase, RdxFormUiStateHost, RdxIdGenerator, RdxLiveAnnouncer, RdxPositionAlign, RdxPositionSide, RdxTriggerRegistry, SHIFT, SPACE, SPACE_CODE, TAB, TIME_GRANULARITIES, a, areAllDaysBetweenValid, clamp, createCancelableChangeEventDetails, createContent, createContext, createFloatingEvents, createFloatingRootContext, createFormUiState, createFormatter, createMonth, createMonths, docsUrl, elementSize, formUiStateContext, getActiveElement, getDaysBetween, getDaysInMonth, getDefaultDate, getDefaultTime, getLastFirstDayOfWeek, getMaxTransitionDuration, getNextLastDayOfWeek, getOptsByGranularity, getPlaceholder, getSegmentElements, getWeekNumber, handleAndDispatchCustomEvent, handleCalendarInitialFocus, hasTime, initializeSegmentValues, injectControlValueAccessor, injectDocument, injectFloatingRootContext, injectId, isAcceptableSegmentKey, isAfter, isAfterOrSame, isBefore, isBeforeOrSame, isBetween, isBetweenInclusive, isCalendarDateTime, isEqual, isItemEqualToValue, isNullish, isNumberString, isSegmentNavigationKey, isValidationRevealed, isZonedDateTime, itemToStringLabel, itemToStringValue, j, k, n, normalizeDateStep, normalizeHour12, normalizeHourCycle, p, provideFloatingRegistration, provideFloatingRootContext, provideFloatingTree, provideFormUiState,
|
|
2059
|
+
export { A, ALT, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP, ASTERISK, BACKSPACE, CAPS_LOCK, CONTROL, CTRL, DELETE, DOCS_BASE_URL, END, ENTER, ESCAPE, F1, F10, F11, F12, F2, F3, F4, F5, F6, F7, F8, F9, HOME, META, P, PAGE_DOWN, PAGE_UP, RDX_DEFAULT_VALIDATION_MODE, RDX_FIELD_VALIDITY, RDX_FLOATING_REGISTRATION, RDX_FLOATING_ROOT_CONTEXT, RDX_FLOATING_TREE, RDX_FORM_UI_STATE, RDX_INTERNAL_BACKDROP_ATTR, RDX_SCROLL_LOCKED_ATTR, RdxControlValueAccessor, RdxFloatingNode, RdxFloatingNodeRegistration, RdxFloatingRegistrationContext, RdxFloatingRootContext, RdxFloatingTree, RdxFormUiControlBase, RdxFormUiStateHost, RdxIdGenerator, RdxLiveAnnouncer, RdxPositionAlign, RdxPositionSide, RdxTriggerRegistry, SHIFT, SPACE, SPACE_CODE, TAB, TIME_GRANULARITIES, a, areAllDaysBetweenValid, clamp, createCancelableChangeEventDetails, createContent, createContext, createFloatingEvents, createFloatingRootContext, createFormUiState, createFormatter, createMonth, createMonths, docsUrl, elementSize, formUiStateContext, getActiveElement, getDaysBetween, getDaysInMonth, getDefaultDate, getDefaultTime, getLastFirstDayOfWeek, getMaxTransitionDuration, getNextLastDayOfWeek, getOptsByGranularity, getPlaceholder, getSegmentElements, getWeekNumber, handleAndDispatchCustomEvent, handleCalendarInitialFocus, hasTime, initializeSegmentValues, injectControlValueAccessor, injectDocument, injectFloatingRootContext, injectId, isAcceptableSegmentKey, isAfter, isAfterOrSame, isBefore, isBeforeOrSame, isBetween, isBetweenInclusive, isCalendarDateTime, isEqual, isItemEqualToValue, isNullish, isNumberString, isSegmentNavigationKey, isValidationRevealed, isZonedDateTime, itemToStringLabel, itemToStringValue, j, k, n, normalizeDateStep, normalizeHour12, normalizeHourCycle, p, provideExistingToken, provideFloatingRegistration, provideFloatingRootContext, provideFloatingTree, provideFormUiState, provideValueAccessor, rdxCheckLabelElement, rdxCheckTriggerElement, rdxDevError, rdxDevWarning, resetRdxDevWarnings, resizeEffect, resolveDisplayValid, resolveFloatingTree, roundToStepPrecision, segmentBuilders, setupInternalBackdrop, snapValueToStep, syncSegmentValues, syncTimeSegmentValues, toDate, useAnchoredScrollLock, useArrowNavigation, useDateField, useFilter, useGraceArea, useListHighlight, usePointerDrag, useScrollLock, useTransitionStatus, watch };
|
|
2057
2060
|
export type { AcceptableValue, AnyExceptLiteral, AriaLivePoliteness, BooleanInput, CreateMonthProps, DataOrientation, DateAndTimeSegmentObj, DateFormatterOptions, DateMatcher, DateRange, DateSegmentObj, DateSegmentPart, DateStep, DayPeriod, Direction, EditableSegmentPart, FilterPredicates, Formatter, Granularity, HourCycle, InjectContext, ItemValueComparator, ListHighlight, Month, NonEditableSegmentPart, Nullable, NumberInput, PlaceholderMap, RdxAnchoredScrollLockOptions, RdxCancelableChangeEventDetails, RdxCancelableChangeEventTransaction, RdxFloatingEventMap, RdxFloatingEvents, RdxFloatingLifecycle, RdxFloatingNodeInit, RdxFloatingParentOverride, RdxFloatingRegistrationReader, RdxFloatingRegistrationStatus, RdxFloatingRootContextEventMap, RdxFloatingRootContextInit, RdxFormCheckboxControl, RdxFormStateInput, RdxFormUiControl, RdxFormUiState, RdxFormUiStateContext, RdxFormUiStateOptions, RdxFormUiTouchTarget, RdxFormValueControl, RdxInternalBackdropOptions, RdxPointerDragHandlers, RdxScrollLockOptions, RdxTransitionStatus, RdxTransitionStatusRef, RdxValidationError, RdxValidationInteraction, RdxValidationMode, SafeFunction, SegmentContentObj, SegmentPart, SegmentValueObj, TimeGranularity, TimeSegmentObj, TimeSegmentPart, TimeValue, UseDateFieldProps, UseFilterOptions, UseListHighlightOptions };
|
|
@@ -64,6 +64,13 @@ declare class RdxDateFieldRootDirective extends RdxFormUiControlBase implements
|
|
|
64
64
|
* 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
|
|
65
65
|
*/
|
|
66
66
|
readonly placeholder: _angular_core.ModelSignal<DateValue | undefined>;
|
|
67
|
+
/**
|
|
68
|
+
* Always-defined placeholder used for segment math. A controlled `[placeholder]` can be reset to
|
|
69
|
+
* `undefined`; fall back to the default date so segment attributes and key handlers never
|
|
70
|
+
* dereference `undefined`.
|
|
71
|
+
* @ignore
|
|
72
|
+
*/
|
|
73
|
+
readonly effectivePlaceholder: Signal<DateValue>;
|
|
67
74
|
/**
|
|
68
75
|
* Segment input parts, collected from the projected content in DOM order. This
|
|
69
76
|
* stays in sync with `segmentContents()` (granularity / locale / value changes
|
|
@@ -229,15 +236,18 @@ declare class RdxDateFieldInputDirective {
|
|
|
229
236
|
interface DateFieldContextToken {
|
|
230
237
|
locale: InputSignal<string>;
|
|
231
238
|
value: ModelSignal<DateValue | undefined>;
|
|
232
|
-
disabled:
|
|
233
|
-
readonly:
|
|
239
|
+
disabled: Signal<boolean>;
|
|
240
|
+
readonly: Signal<boolean>;
|
|
234
241
|
isInvalid: Signal<boolean>;
|
|
235
242
|
/** Effective invalid: the built-in range/availability check OR the form-driven invalid state. */
|
|
236
243
|
invalidState: Signal<boolean>;
|
|
237
244
|
/** Tri-state displayed validity (`true`/`false`/`null`): the field's gated state inside a Field, else own. */
|
|
238
245
|
displayValid: Signal<boolean | null>;
|
|
239
|
-
placeholder
|
|
240
|
-
|
|
246
|
+
/** The controlled placeholder; may be `undefined`. Use `effectivePlaceholder` for segment math. */
|
|
247
|
+
placeholder: Signal<DateValue | undefined>;
|
|
248
|
+
/** Always-defined placeholder (falls back to the default date) for segment attributes/key handlers. */
|
|
249
|
+
effectivePlaceholder: Signal<DateValue>;
|
|
250
|
+
hourCycle: Signal<HourCycle | undefined>;
|
|
241
251
|
step$: Signal<DateStep>;
|
|
242
252
|
formatter: Signal<Formatter>;
|
|
243
253
|
segmentValues: WritableSignal<SegmentValueObj>;
|
|
@@ -162,6 +162,13 @@ declare class RdxFloatingFocusManager {
|
|
|
162
162
|
* - an element (direct or from a callback) → that element (returned **explicitly**, bypassing the
|
|
163
163
|
* "focus moved elsewhere" guard).
|
|
164
164
|
*/
|
|
165
|
+
/**
|
|
166
|
+
* Public view of {@link resolveReturnFocusTarget} for a **keep-mounted** primitive to apply
|
|
167
|
+
* return-focus on *close* — the composed scope's unmount-driven return never runs while the popup
|
|
168
|
+
* stays in the DOM. Returns an explicit element, `false` (suppress), or `undefined` (default →
|
|
169
|
+
* caller restores the previously-focused element, e.g. the trigger).
|
|
170
|
+
*/
|
|
171
|
+
resolveReturnTarget(): HTMLElement | false | undefined;
|
|
165
172
|
private resolveReturnFocusTarget;
|
|
166
173
|
/**
|
|
167
174
|
* Base UI's `defaultInitialFocus`: on a **touch** open, focus the popup itself instead of its first
|
|
@@ -25,7 +25,10 @@ declare function createAriaOwnsAnchor(ownerDocument: Document, portalId: string)
|
|
|
25
25
|
* trigger steps onto the guard instead of jumping into the content.
|
|
26
26
|
*/
|
|
27
27
|
declare function disableFocusInside(container: HTMLElement): void;
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Restores the tabbability that {@link disableFocusInside} suspended. Base UI `enableFocusInside`.
|
|
30
|
+
* Collects markers across the composed tree so guards inside shadow roots / slots are restored too.
|
|
31
|
+
*/
|
|
29
32
|
declare function enableFocusInside(container: HTMLElement): void;
|
|
30
33
|
/**
|
|
31
34
|
* Whether a focus event crossed the `container` boundary — its `relatedTarget` (the other side of the
|
|
@@ -134,6 +137,54 @@ type RdxFocusScopeConfig = {
|
|
|
134
137
|
declare const RdxFocusScopeConfigToken: InjectionToken<RdxFocusScopeConfig>;
|
|
135
138
|
declare function provideRdxFocusScopeConfig(factory: () => RdxFocusScopeConfig): Provider;
|
|
136
139
|
|
|
140
|
+
/**
|
|
141
|
+
* Tabbable / focusable detection ported from Base UI (`floating-ui-react/utils/tabbable.ts`). Unlike the
|
|
142
|
+
* old `TreeWalker` approximation this:
|
|
143
|
+
* - **pierces shadow DOM and `<slot>`** via composed traversal (`getComposedChildren`), so guards / portal
|
|
144
|
+
* tab-order see candidates inside web components and projected content;
|
|
145
|
+
* - honours **`inert`** ancestors, **`hidden`**, and computed-style visibility (`display`/`visibility`/
|
|
146
|
+
* `checkVisibility()` content-visibility);
|
|
147
|
+
* - treats **`<details>`/`<summary>`**, **`contenteditable`**, and **`audio`/`video[controls]`** as
|
|
148
|
+
* focusable with the right implicit tab index;
|
|
149
|
+
* - applies **radio-group** semantics (only the checked radio of a named group — or the first when none is
|
|
150
|
+
* checked — is tabbable).
|
|
151
|
+
*
|
|
152
|
+
* `composedContains` is the shadow-aware `Node.contains`, kept here as the low-level primitive so this
|
|
153
|
+
* module stays a leaf (only `@radix-ng/primitives/core`); `utils.ts` re-exports it for back-compat.
|
|
154
|
+
*/
|
|
155
|
+
type FocusableElement = HTMLElement | SVGElement;
|
|
156
|
+
/**
|
|
157
|
+
* Shadow-DOM-aware containment: whether `node` is `container` or lives inside it, crossing shadow roots
|
|
158
|
+
* via their `host` (unlike `Node.contains`, which stops at a shadow boundary). Base UI `contains`.
|
|
159
|
+
*/
|
|
160
|
+
declare function composedContains(container: Node, node: Node | null): boolean;
|
|
161
|
+
/** Collects elements matching `selector` across the composed tree (shadow / slot aware). */
|
|
162
|
+
declare function queryComposedAll(container: ParentNode, selector: string): HTMLElement[];
|
|
163
|
+
/** Whether `element` is reachable by Tab right now (Base UI `isTabbable`). */
|
|
164
|
+
declare function isTabbable(element: Element | null): boolean;
|
|
165
|
+
/** All programmatically focusable elements inside `container`, in composed document order. */
|
|
166
|
+
declare function focusable(container: Element): FocusableElement[];
|
|
167
|
+
/** All keyboard-tabbable elements inside `container`, in composed document order (Base UI `tabbable`). */
|
|
168
|
+
declare function tabbable(container: Element): FocusableElement[];
|
|
169
|
+
/**
|
|
170
|
+
* Back-compat alias for {@link tabbable} — historically returned a looser `TreeWalker` approximation;
|
|
171
|
+
* now the full Base UI tabbable set. Kept so existing imports (`getTabbableCandidates`) keep working.
|
|
172
|
+
*/
|
|
173
|
+
declare function getTabbableCandidates(container: Element): FocusableElement[];
|
|
174
|
+
/** The first and last tabbable elements inside `container`. */
|
|
175
|
+
declare function getTabbableEdges(container: Element): readonly [FocusableElement | undefined, FocusableElement | undefined];
|
|
176
|
+
/**
|
|
177
|
+
* The next tabbable in the document after the current focus (Base UI `getNextTabbable`) — used by the
|
|
178
|
+
* portal-focus bridge's trailing guard to step focus past the popup. Falls back to `reference`.
|
|
179
|
+
*/
|
|
180
|
+
declare function getNextTabbable(reference: Element | null): FocusableElement | null;
|
|
181
|
+
/** The previous tabbable in the document before the current focus (Base UI `getPreviousTabbable`). */
|
|
182
|
+
declare function getPreviousTabbable(reference: Element | null): FocusableElement | null;
|
|
183
|
+
/** The tabbable immediately after `reference` in the document, wrapping (Base UI `getTabbableAfterElement`). */
|
|
184
|
+
declare function getTabbableAfterElement(reference: Element | null): FocusableElement | null;
|
|
185
|
+
/** The tabbable immediately before `reference` in the document, wrapping (Base UI `getTabbableBeforeElement`). */
|
|
186
|
+
declare function getTabbableBeforeElement(reference: Element | null): FocusableElement | null;
|
|
187
|
+
|
|
137
188
|
declare const AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
138
189
|
declare const AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
139
190
|
declare const EVENT_OPTIONS: {
|
|
@@ -148,52 +199,18 @@ type FocusableTarget = HTMLElement | {
|
|
|
148
199
|
* Falls back to `event.target` when `composedPath` is unavailable.
|
|
149
200
|
*/
|
|
150
201
|
declare function getEventTarget(event: Event): EventTarget | null;
|
|
151
|
-
/**
|
|
152
|
-
* Shadow-DOM-aware containment: whether `node` is `container` or lives inside it, crossing shadow roots
|
|
153
|
-
* via their `host` (unlike `Node.contains`, which stops at a shadow boundary).
|
|
154
|
-
*/
|
|
155
|
-
declare function composedContains(container: Node, node: Node | null): boolean;
|
|
156
202
|
/**
|
|
157
203
|
* Attempts focusing the first element in a list of candidates.
|
|
158
204
|
* Stops when focus has actually moved.
|
|
159
|
-
*/
|
|
160
|
-
declare function focusFirst(candidates: HTMLElement[], { select }?: {
|
|
161
|
-
select?: boolean | undefined;
|
|
162
|
-
}): true | undefined;
|
|
163
|
-
/**
|
|
164
|
-
* Returns a list of potential tabbable candidates.
|
|
165
|
-
*
|
|
166
|
-
* NOTE: This is only a close approximation. For example it doesn't take into account cases like when
|
|
167
|
-
* elements are not visible. This cannot be worked out easily by just reading a property, but rather
|
|
168
|
-
* necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.
|
|
169
205
|
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
|
|
173
|
-
declare function getTabbableCandidates(container: HTMLElement): HTMLElement[];
|
|
174
|
-
declare function isHidden(node: HTMLElement, { upTo }: {
|
|
175
|
-
upTo?: HTMLElement;
|
|
176
|
-
}): boolean;
|
|
177
|
-
/**
|
|
178
|
-
* Returns the first visible element in a list.
|
|
179
|
-
* NOTE: Only checks visibility up to the `container`.
|
|
206
|
+
* Reads the active element from `root` (a focus scope passes its host's `ownerDocument`); falling back to
|
|
207
|
+
* the global `document` would, in an iframe / multi-document scope, never detect that focus moved inside
|
|
208
|
+
* the inner document and so walk past every candidate, leaving focus on the last one instead of the first.
|
|
180
209
|
*/
|
|
181
|
-
declare function
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
declare function getTabbableEdges(container: HTMLElement): readonly [HTMLElement | undefined, HTMLElement | undefined];
|
|
186
|
-
/**
|
|
187
|
-
* The next tabbable in the document after the current focus (Base UI `getNextTabbable`) — used by the
|
|
188
|
-
* portal-focus bridge's trailing guard to step focus past the popup. Falls back to `reference`.
|
|
189
|
-
*/
|
|
190
|
-
declare function getNextTabbable(reference: Element | null): HTMLElement | null;
|
|
191
|
-
/** The previous tabbable in the document before the current focus (Base UI `getPreviousTabbable`). */
|
|
192
|
-
declare function getPreviousTabbable(reference: Element | null): HTMLElement | null;
|
|
193
|
-
/** The tabbable immediately after `reference` in the document, wrapping (Base UI `getTabbableAfterElement`). */
|
|
194
|
-
declare function getTabbableAfterElement(reference: Element | null): HTMLElement | null;
|
|
195
|
-
/** The tabbable immediately before `reference` in the document, wrapping (Base UI `getTabbableBeforeElement`). */
|
|
196
|
-
declare function getTabbableBeforeElement(reference: Element | null): HTMLElement | null;
|
|
210
|
+
declare function focusFirst(candidates: FocusableElement[], { select, root }?: {
|
|
211
|
+
select?: boolean;
|
|
212
|
+
root?: DocumentOrShadowRoot;
|
|
213
|
+
}): true | undefined;
|
|
197
214
|
declare function isSelectableInput(element: any): element is FocusableTarget & {
|
|
198
215
|
select: () => void;
|
|
199
216
|
};
|
|
@@ -201,5 +218,5 @@ declare function focus(element?: FocusableTarget | null, { select }?: {
|
|
|
201
218
|
select?: boolean | undefined;
|
|
202
219
|
}): void;
|
|
203
220
|
|
|
204
|
-
export { AUTOFOCUS_ON_MOUNT, AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS, FOCUS_GUARD_ATTR, FOCUS_GUARD_STYLE, RdxFocusScope, RdxFocusScopeConfigToken, composedContains, createAriaOwnsAnchor, createFocusGuard, disableFocusInside, enableFocusInside,
|
|
205
|
-
export type { FocusScopeContext, RdxFocusScopeConfig };
|
|
221
|
+
export { AUTOFOCUS_ON_MOUNT, AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS, FOCUS_GUARD_ATTR, FOCUS_GUARD_STYLE, RdxFocusScope, RdxFocusScopeConfigToken, composedContains, createAriaOwnsAnchor, createFocusGuard, disableFocusInside, enableFocusInside, focus, focusFirst, focusable, getEventTarget, getNextTabbable, getPreviousTabbable, getTabbableAfterElement, getTabbableBeforeElement, getTabbableCandidates, getTabbableEdges, injectFocusScopeContext, isOutsideEvent, isSelectableInput, isTabbable, provideFocusScopeContext, provideRdxFocusScopeConfig, queryComposedAll, tabbable, useFocusGuardsTabbability };
|
|
222
|
+
export type { FocusScopeContext, FocusableElement, RdxFocusScopeConfig };
|
|
@@ -376,11 +376,15 @@ declare class RdxMenuSubTrigger {
|
|
|
376
376
|
* This replaces the consumer-owned `@if (root.open())` mount: it adds both teleporting *and*
|
|
377
377
|
* exit-animation support. Apply it with the `*` microsyntax on the positioner —
|
|
378
378
|
* `<div *rdxMenuPortal rdxMenuPositioner>` — or as an explicit `<ng-template rdxMenuPortal>`. For a
|
|
379
|
-
* custom container,
|
|
379
|
+
* custom container, a backdrop alongside the positioner (multi-root), or `[keepMounted]`, use the
|
|
380
|
+
* explicit form.
|
|
381
|
+
*
|
|
382
|
+
* Set `[keepMounted]="true"` to keep the popup mounted while the menu is closed (the positioner's
|
|
383
|
+
* `data-closed` state hides it) — inherited from {@link RdxPortalPresence}.
|
|
380
384
|
*/
|
|
381
385
|
declare class RdxMenuPortal {
|
|
382
386
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuPortal, never>;
|
|
383
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuPortal, "ng-template[rdxMenuPortal]", ["rdxMenuPortal"], {}, {}, never, never, true, [{ directive: typeof i1$2.RdxPortalPresence; inputs: { "container": "container"; }; outputs: {}; }]>;
|
|
387
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuPortal, "ng-template[rdxMenuPortal]", ["rdxMenuPortal"], {}, {}, never, never, true, [{ directive: typeof i1$2.RdxPortalPresence; inputs: { "container": "container"; "keepMounted": "keepMounted"; }; outputs: {}; }]>;
|
|
384
388
|
}
|
|
385
389
|
/**
|
|
386
390
|
* Dev-mode guard: `rdxMenuPortal` is a structural directive. The old `<div rdxMenuPortal>` markup
|
|
@@ -402,6 +406,13 @@ declare class RdxMenuPortalMisuseGuard {
|
|
|
402
406
|
declare class RdxMenuPositioner extends RdxPopperContentWrapper {
|
|
403
407
|
protected readonly rootContext: _radix_ng_primitives_menu.RdxMenuRootContext;
|
|
404
408
|
protected readonly legacyVars: Record<string, string>;
|
|
409
|
+
/**
|
|
410
|
+
* Whether the popup is shown: open, or still running its closing transition. Drives both the native
|
|
411
|
+
* `hidden` (finding: a closed keep-mounted popup must hide itself) and — via `positioningActive` —
|
|
412
|
+
* whether the inherited wrapper keeps tracking the anchor, so a closed keep-mounted positioner stops
|
|
413
|
+
* its `autoUpdate` `requestAnimationFrame` loop (finding: endless rAF while closed).
|
|
414
|
+
*/
|
|
415
|
+
protected readonly visible: _angular_core.Signal<boolean>;
|
|
405
416
|
constructor();
|
|
406
417
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuPositioner, never>;
|
|
407
418
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuPositioner, "[rdxMenuPositioner]", ["rdxMenuPositioner"], {}, {}, never, never, true, never>;
|
|
@@ -456,7 +467,7 @@ declare class RdxMenuPopup {
|
|
|
456
467
|
private currentItemIndex;
|
|
457
468
|
private focusMenuItem;
|
|
458
469
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxMenuPopup, never>;
|
|
459
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuPopup, "[rdxMenuPopup]", ["rdxMenuPopup"], {}, { "escapeKeyDown": "escapeKeyDown"; "pointerDownOutside": "pointerDownOutside"; "focusOutside": "focusOutside"; "interactOutside": "interactOutside"; "openAutoFocus": "openAutoFocus"; "closeAutoFocus": "closeAutoFocus"; }, never, never, true, [{ directive: typeof i1.RdxPopperContent; inputs: {}; outputs: {}; }, { directive: typeof _radix_ng_primitives_core.RdxFloatingNodeRegistration; inputs: {}; outputs: {}; }, { directive: typeof _radix_ng_primitives_floating_focus_manager.RdxFloatingFocusManager; inputs: {}; outputs: {}; }, { directive: typeof i1$1.RdxCompositeList; inputs: {}; outputs: {}; }]>;
|
|
470
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxMenuPopup, "[rdxMenuPopup]", ["rdxMenuPopup"], {}, { "escapeKeyDown": "escapeKeyDown"; "pointerDownOutside": "pointerDownOutside"; "focusOutside": "focusOutside"; "interactOutside": "interactOutside"; "openAutoFocus": "openAutoFocus"; "closeAutoFocus": "closeAutoFocus"; }, never, never, true, [{ directive: typeof i1.RdxPopperContent; inputs: {}; outputs: {}; }, { directive: typeof _radix_ng_primitives_core.RdxFloatingNodeRegistration; inputs: {}; outputs: {}; }, { directive: typeof _radix_ng_primitives_floating_focus_manager.RdxFloatingFocusManager; inputs: { "returnFocus": "finalFocus"; }; outputs: {}; }, { directive: typeof i1$1.RdxCompositeList; inputs: {}; outputs: {}; }]>;
|
|
460
471
|
}
|
|
461
472
|
|
|
462
473
|
/**
|