@radix-ng/primitives 0.51.0 → 1.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/radix-ng-primitives-accordion.mjs +105 -38
- package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs +221 -129
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-arrow.mjs +20 -4
- package/fesm2022/radix-ng-primitives-arrow.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-avatar.mjs +54 -61
- package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-button.mjs +123 -0
- package/fesm2022/radix-ng-primitives-button.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-checkbox.mjs +378 -54
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collapsible.mjs +182 -81
- package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collection.mjs +40 -57
- package/fesm2022/radix-ng-primitives-collection.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-context-menu.mjs +140 -424
- package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-core.mjs +735 -744
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-cropper.mjs +1 -0
- package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-date-field.mjs +51 -45
- package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dialog.mjs +655 -327
- package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +70 -46
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-drawer.mjs +1059 -0
- package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-field.mjs +363 -0
- package/fesm2022/radix-ng-primitives-field.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-fieldset.mjs +79 -0
- package/fesm2022/radix-ng-primitives-fieldset.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-focus-scope.mjs +23 -8
- package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-input.mjs +172 -0
- package/fesm2022/radix-ng-primitives-input.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-label.mjs +6 -6
- package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menu.mjs +1480 -344
- package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menubar.mjs +290 -162
- package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-meter.mjs +271 -0
- package/fesm2022/radix-ng-primitives-meter.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs +1052 -1553
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-number-field.mjs +1102 -367
- package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popover.mjs +978 -989
- package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popper.mjs +91 -41
- package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-portal.mjs +34 -10
- package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-presence.mjs +134 -246
- package/fesm2022/radix-ng-primitives-presence.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-preview-card.mjs +997 -0
- package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-progress.mjs +223 -84
- package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +191 -51
- package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-roving-focus.mjs +96 -50
- package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-select.mjs +791 -509
- package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-separator.mjs +12 -35
- package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-slider.mjs +969 -717
- package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-stepper.mjs +15 -19
- package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +125 -113
- package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tabs.mjs +381 -108
- package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-time-field.mjs +55 -46
- package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +121 -247
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +98 -61
- package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toolbar.mjs +303 -92
- package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tooltip.mjs +690 -1071
- package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs +25 -66
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
- package/meter/README.md +3 -0
- package/navigation-menu/README.md +2 -1
- package/package.json +31 -18
- package/portal/README.md +2 -0
- package/preview-card/README.md +3 -0
- package/schematics/collection.json +1 -0
- package/schematics/ng-add/index.d.ts +3 -2
- package/schematics/ng-add/index.js +62 -31
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/package-config.d.ts +4 -2
- package/schematics/ng-add/package-config.js +10 -2
- package/schematics/ng-add/package-config.js.map +1 -1
- package/schematics/ng-add/schema.d.ts +3 -0
- package/schematics/ng-add/schema.js +3 -0
- package/schematics/ng-add/schema.js.map +1 -0
- package/schematics/ng-add/schema.json +14 -0
- package/select/README.md +2 -0
- package/types/radix-ng-primitives-accordion.d.ts +48 -14
- package/types/radix-ng-primitives-alert-dialog.d.ts +95 -38
- package/types/radix-ng-primitives-arrow.d.ts +1 -1
- package/types/radix-ng-primitives-aspect-ratio.d.ts +1 -1
- package/types/radix-ng-primitives-avatar.d.ts +7 -11
- package/types/radix-ng-primitives-button.d.ts +73 -0
- package/types/radix-ng-primitives-calendar.d.ts +1 -2
- package/types/radix-ng-primitives-checkbox.d.ts +201 -32
- package/types/radix-ng-primitives-collapsible.d.ts +112 -39
- package/types/radix-ng-primitives-collection.d.ts +38 -34
- package/types/radix-ng-primitives-config.d.ts +1 -1
- package/types/radix-ng-primitives-context-menu.d.ts +60 -116
- package/types/radix-ng-primitives-core.d.ts +307 -236
- package/types/radix-ng-primitives-cropper.d.ts +2 -2
- package/types/radix-ng-primitives-date-field.d.ts +38 -23
- package/types/radix-ng-primitives-dialog.d.ts +282 -165
- package/types/radix-ng-primitives-dismissable-layer.d.ts +15 -7
- package/types/radix-ng-primitives-drawer.d.ts +448 -0
- package/types/radix-ng-primitives-editable.d.ts +1 -1
- package/types/radix-ng-primitives-field.d.ts +373 -0
- package/types/radix-ng-primitives-fieldset.d.ts +48 -0
- package/types/radix-ng-primitives-focus-scope.d.ts +13 -5
- package/types/radix-ng-primitives-input.d.ts +87 -0
- package/types/radix-ng-primitives-label.d.ts +0 -1
- package/types/radix-ng-primitives-menu.d.ts +572 -99
- package/types/radix-ng-primitives-menubar.d.ts +60 -50
- package/types/radix-ng-primitives-meter.d.ts +193 -0
- package/types/radix-ng-primitives-navigation-menu.d.ts +422 -340
- package/types/radix-ng-primitives-number-field.d.ts +405 -145
- package/types/radix-ng-primitives-pagination.d.ts +2 -2
- package/types/radix-ng-primitives-popover.d.ts +365 -351
- package/types/radix-ng-primitives-popper.d.ts +49 -9
- package/types/radix-ng-primitives-portal.d.ts +14 -6
- package/types/radix-ng-primitives-presence.d.ts +28 -76
- package/types/radix-ng-primitives-preview-card.d.ts +359 -0
- package/types/radix-ng-primitives-progress.d.ts +174 -48
- package/types/radix-ng-primitives-radio.d.ts +55 -25
- package/types/radix-ng-primitives-roving-focus.d.ts +30 -21
- package/types/radix-ng-primitives-select.d.ts +475 -177
- package/types/radix-ng-primitives-separator.d.ts +7 -32
- package/types/radix-ng-primitives-slider.d.ts +315 -201
- package/types/radix-ng-primitives-stepper.d.ts +5 -7
- package/types/radix-ng-primitives-switch.d.ts +86 -71
- package/types/radix-ng-primitives-tabs.d.ts +213 -79
- package/types/radix-ng-primitives-time-field.d.ts +42 -27
- package/types/radix-ng-primitives-toggle-group.d.ts +85 -164
- package/types/radix-ng-primitives-toggle.d.ts +43 -53
- package/types/radix-ng-primitives-toolbar.d.ts +163 -38
- package/types/radix-ng-primitives-tooltip.d.ts +347 -384
- package/types/radix-ng-primitives-visually-hidden.d.ts +19 -19
- package/dropdown-menu/README.md +0 -1
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +0 -581
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-hover-card.mjs +0 -1238
- package/fesm2022/radix-ng-primitives-hover-card.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-select2.mjs +0 -897
- package/fesm2022/radix-ng-primitives-select2.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-tooltip2.mjs +0 -735
- package/fesm2022/radix-ng-primitives-tooltip2.mjs.map +0 -1
- package/hover-card/README.md +0 -3
- package/select2/README.md +0 -3
- package/tooltip2/README.md +0 -3
- package/types/radix-ng-primitives-dropdown-menu.d.ts +0 -171
- package/types/radix-ng-primitives-hover-card.d.ts +0 -471
- package/types/radix-ng-primitives-select2.d.ts +0 -511
- package/types/radix-ng-primitives-tooltip2.d.ts +0 -325
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radix-ng-primitives-radio.mjs","sources":["../../../packages/primitives/radio/src/radio-tokens.ts","../../../packages/primitives/radio/src/radio-root.directive.ts","../../../packages/primitives/radio/src/radio-item.directive.ts","../../../packages/primitives/radio/src/radio-indicator.directive.ts","../../../packages/primitives/radio/src/radio-item-input.directive.ts","../../../packages/primitives/radio/radix-ng-primitives-radio.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion';\nimport { InjectionToken, InputSignalWithTransform, ModelSignal, Signal } from '@angular/core';\n\nexport interface RadioGroupProps {\n name?: string;\n disabled?: InputSignalWithTransform<boolean, BooleanInput>;\n defaultValue?: string;\n value: ModelSignal<string | null>;\n disableState: Signal<boolean>;\n}\n\nexport interface RadioGroupDirective extends RadioGroupProps {\n select(value: string | null): void;\n\n onTouched(): void;\n}\n\nexport const RDX_RADIO_GROUP = new InjectionToken<RadioGroupDirective>('RdxRadioGroup');\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, input, Input, model, output, signal } from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { provideValueAccessor } from '@radix-ng/primitives/core';\nimport { Orientation, RdxRovingFocusGroupDirective } from '@radix-ng/primitives/roving-focus';\nimport { RadioGroupDirective, RadioGroupProps, RDX_RADIO_GROUP } from './radio-tokens';\n\n@Directive({\n selector: '[rdxRadioRoot]',\n exportAs: 'rdxRadioRoot',\n providers: [\n provideValueAccessor(RdxRadioGroupDirective),\n { provide: RDX_RADIO_GROUP, useExisting: RdxRadioGroupDirective }\n ],\n hostDirectives: [{ directive: RdxRovingFocusGroupDirective, inputs: ['dir', 'orientation', 'loop'] }],\n host: {\n role: 'radiogroup',\n '[attr.aria-orientation]': 'orientation()',\n '[attr.aria-required]': 'required()',\n '[attr.data-disabled]': 'disableState() ? \"\" : null',\n '(keydown)': 'onKeydown()'\n }\n})\nexport class RdxRadioGroupDirective implements RadioGroupProps, RadioGroupDirective, ControlValueAccessor {\n readonly value = model<string | null>(null);\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n @Input() defaultValue?: string;\n\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly orientation = input<Orientation>();\n\n /**\n * Event handler called when the value changes.\n */\n readonly onValueChange = output<string>();\n\n private readonly disable = signal<boolean>(this.disabled());\n readonly disableState = computed(() => this.disable() || this.disabled());\n\n /**\n * The callback function to call when the value of the radio group changes.\n */\n private onChange: (value: string) => void = () => {\n /* Empty */\n };\n\n /**\n * The callback function to call when the radio group is touched.\n * @ignore\n */\n onTouched: () => void = () => {\n /* Empty */\n };\n\n /**\n * Select a radio item.\n * @param value The value of the radio item to select.\n * @ignore\n */\n select(value: string): void {\n this.value.set(value);\n this.onValueChange.emit(value);\n this.onChange?.(value);\n this.onTouched();\n }\n\n /**\n * Update the value of the radio group.\n * @param value The new value of the radio group.\n * @ignore\n */\n writeValue(value: string): void {\n this.value.set(value);\n }\n\n /**\n * Register a callback function to call when the value of the radio group changes.\n * @param fn The callback function to call when the value of the radio group changes.\n * @ignore\n */\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 /**\n * Set the disabled state of the radio group.\n * @param isDisabled Whether the radio group is disabled.\n * @ignore\n */\n setDisabledState(isDisabled: boolean): void {\n this.disable.set(isDisabled);\n }\n\n protected onKeydown(): void {\n if (this.disableState()) return;\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n InjectionToken,\n input,\n OnInit,\n signal\n} from '@angular/core';\nimport { provideToken } from '@radix-ng/primitives/core';\nimport { RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';\nimport { RDX_RADIO_GROUP } from './radio-tokens';\n\nexport const RdxRadioItemToken = new InjectionToken<RdxRadioItemDirective>('RadioItemToken');\n\nexport function injectRadioItem(): RdxRadioItemDirective {\n return inject(RdxRadioItemToken);\n}\n\n@Directive({\n selector: '[rdxRadioItem]',\n exportAs: 'rdxRadioItem',\n providers: [provideToken(RdxRadioItemToken, RdxRadioItemDirective)],\n hostDirectives: [\n { directive: RdxRovingFocusItemDirective, inputs: ['tabStopId: id', 'focusable', 'active', 'allowShiftKey'] }\n ],\n\n host: {\n type: 'button',\n role: 'radio',\n '[attr.aria-checked]': 'checkedState()',\n '[attr.data-disabled]': 'disabledState() ? \"\" : null',\n '[attr.data-state]': 'checkedState() ? \"checked\" : \"unchecked\"',\n '[attr.disabled]': 'disabledState() ? \"\" : undefined',\n '(click)': 'onClick()',\n '(keydown)': 'onKeyDown($event)',\n '(keyup)': 'onKeyUp()',\n '(focus)': 'onFocus()'\n }\n})\nexport class RdxRadioItemDirective implements OnInit {\n private readonly radioGroup = inject(RDX_RADIO_GROUP);\n private readonly elementRef = inject(ElementRef);\n\n readonly value = input.required<string>();\n\n readonly id = input<string>();\n\n readonly required = input<boolean>();\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n protected readonly disabledState = computed(() => this.radioGroup.disableState() || this.disabled());\n\n readonly checkedState = computed(() => this.radioGroup.value() === this.value());\n\n private readonly ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'];\n private readonly isArrowKeyPressedSignal = signal(false);\n\n /** @ignore */\n ngOnInit() {\n if (this.radioGroup.defaultValue === this.value()) {\n this.radioGroup.select(this.value());\n }\n }\n\n /** @ignore */\n onClick() {\n if (!this.disabledState()) {\n this.radioGroup.select(this.value());\n this.isArrowKeyPressedSignal.set(true);\n }\n }\n\n /** @ignore */\n onKeyDown(event: Event): void {\n const keyEvent = event as KeyboardEvent;\n if (this.ARROW_KEYS.includes(keyEvent.key)) {\n this.isArrowKeyPressedSignal.set(true);\n }\n }\n\n /** @ignore */\n onKeyUp() {\n this.isArrowKeyPressedSignal.set(false);\n }\n\n /** @ignore */\n onFocus() {\n this.radioGroup.select(this.value());\n setTimeout(() => {\n /**\n * When navigating with arrow keys, focus triggers on the radio item.\n * To \"check\" the radio, we programmatically trigger a click event.\n */\n if (this.isArrowKeyPressedSignal()) {\n this.elementRef.nativeElement.click();\n }\n }, 0);\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { RdxRadioItemDirective } from './radio-item.directive';\nimport { RDX_RADIO_GROUP, RadioGroupDirective } from './radio-tokens';\n\n@Directive({\n selector: '[rdxRadioIndicator]',\n exportAs: 'rdxRadioIndicator',\n host: {\n '[attr.data-state]': 'radioItem.checkedState() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'radioItem.disabled() ? \"\" : undefined'\n }\n})\nexport class RdxRadioIndicatorDirective {\n protected readonly radioGroup: RadioGroupDirective = inject(RDX_RADIO_GROUP);\n protected readonly radioItem: RdxRadioItemDirective = inject(RdxRadioItemDirective);\n}\n","import { computed, Directive, input } from '@angular/core';\nimport { RdxVisuallyHiddenDirective } from '@radix-ng/primitives/visually-hidden';\nimport { injectRadioItem } from './radio-item.directive';\n\n@Directive({\n selector: '[rdxRadioItemInput]',\n exportAs: 'rdxRadioItemInput',\n hostDirectives: [{ directive: RdxVisuallyHiddenDirective, inputs: ['feature'] }],\n host: {\n type: 'radio',\n '[attr.name]': 'name()',\n '[attr.required]': 'required()',\n '[attr.disabled]': 'disabled() ? disabled() : undefined',\n '[attr.checked]': 'checked()',\n '[attr.value]': 'value()'\n }\n})\nexport class RdxRadioItemInputDirective {\n private readonly radioItem = injectRadioItem();\n\n readonly name = input<string>();\n readonly value = computed(() => this.radioItem.value() || undefined);\n readonly checked = computed(() => this.radioItem.checkedState() || undefined);\n readonly required = input<boolean | undefined>(this.radioItem.required());\n readonly disabled = input<boolean | undefined>(this.radioItem.disabled());\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;AAiBO,MAAM,eAAe,GAAG,IAAI,cAAc,CAAsB,eAAe,CAAC;;MCM1E,sBAAsB,CAAA;AAhBnC,IAAA,WAAA,GAAA;AAiBa,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EAAC;QAElC,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;QAI/E,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;QAE/E,IAAA,CAAA,WAAW,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAe;AAE3C;;AAEG;QACM,IAAA,CAAA,aAAa,GAAG,MAAM,EAAU;QAExB,IAAA,CAAA,OAAO,GAAG,MAAM,CAAU,IAAI,CAAC,QAAQ,EAAE,8EAAC;AAClD,QAAA,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,QAAQ,EAAE,mFAAC;AAEzE;;AAEG;QACK,IAAA,CAAA,QAAQ,GAA4B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,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,OAAA,EAAA,EAAA,UAAA,EAAA,EAAA,WAAA,EAAA,QAAA,EAAA,eAAA,EAAA,YAAA,EAAA,eAAA,EAAA,qCAAA,EAAA,cAAA,EAAA,WAAA,EAAA,YAAA,EAAA,SAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAAA,IAAA,CAAA,0BAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAbtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,0BAA0B,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC;AAChF,oBAAA,IAAI,EAAE;AACF,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,iBAAiB,EAAE,YAAY;AAC/B,wBAAA,iBAAiB,EAAE,qCAAqC;AACxD,wBAAA,gBAAgB,EAAE,WAAW;AAC7B,wBAAA,cAAc,EAAE;AACnB;AACJ,iBAAA;;;AChBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"radix-ng-primitives-radio.mjs","sources":["../../../packages/primitives/radio/src/radio-tokens.ts","../../../packages/primitives/radio/src/radio-root.directive.ts","../../../packages/primitives/radio/src/radio-item.directive.ts","../../../packages/primitives/radio/src/radio-indicator.directive.ts","../../../packages/primitives/radio/src/radio-item-input.directive.ts","../../../packages/primitives/radio/radix-ng-primitives-radio.ts"],"sourcesContent":["import { InjectionToken, InputSignal, InputSignalWithTransform, ModelSignal, Signal } from '@angular/core';\nimport { BooleanInput } from '@radix-ng/primitives/core';\nimport { Orientation } from '@radix-ng/primitives/roving-focus';\n\nexport interface RadioGroupProps {\n value: ModelSignal<string | null>;\n defaultValue: InputSignal<string | undefined>;\n name: InputSignal<string | undefined>;\n form: InputSignal<string | undefined>;\n disabled: InputSignalWithTransform<boolean, BooleanInput>;\n readonly: InputSignalWithTransform<boolean, BooleanInput>;\n required: InputSignalWithTransform<boolean, BooleanInput>;\n orientation: InputSignal<Orientation | undefined>;\n disabledState: Signal<boolean>;\n}\n\nexport interface RadioGroupDirective extends RadioGroupProps {\n select(value: string | null): void;\n\n onTouched(): void;\n\n setArrowNavigation(value: boolean): void;\n\n isArrowNavigation(): boolean;\n}\n\nexport const RDX_RADIO_GROUP = new InjectionToken<RadioGroupDirective>('RdxRadioGroup');\n","import { booleanAttribute, computed, Directive, effect, input, model, output, signal } from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { BooleanInput, provideValueAccessor, RdxFormValueControl } from '@radix-ng/primitives/core';\nimport { Orientation, RdxRovingFocusGroupDirective } from '@radix-ng/primitives/roving-focus';\nimport { RadioGroupDirective, RadioGroupProps, RDX_RADIO_GROUP } from './radio-tokens';\n\n@Directive({\n selector: '[rdxRadioRoot]',\n exportAs: 'rdxRadioRoot',\n providers: [\n provideValueAccessor(RdxRadioGroupDirective),\n { provide: RDX_RADIO_GROUP, useExisting: RdxRadioGroupDirective }\n ],\n hostDirectives: [{ directive: RdxRovingFocusGroupDirective, inputs: ['dir', 'orientation', 'loop'] }],\n host: {\n role: 'radiogroup',\n '[attr.aria-orientation]': 'orientation()',\n '[attr.aria-required]': 'required() ? \"true\" : undefined',\n '[attr.data-disabled]': 'disabledState() ? \"\" : undefined',\n '[attr.data-readonly]': 'readonly() ? \"\" : undefined',\n '[attr.data-required]': 'required() ? \"\" : undefined',\n '(keydown)': 'onKeydown()'\n }\n})\nexport class RdxRadioGroupDirective\n implements RadioGroupProps, RadioGroupDirective, ControlValueAccessor, RdxFormValueControl<string | null>\n{\n readonly value = model<string | null>(null);\n\n readonly defaultValue = input<string>();\n\n readonly name = input<string>();\n\n readonly form = input<string>();\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly readonly = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly orientation = input<Orientation>();\n\n /**\n * Event handler called when the value changes.\n */\n readonly onValueChange = output<string>();\n\n private readonly disable = signal<boolean>(this.disabled());\n readonly disabledState = computed(() => this.disable() || this.disabled());\n private readonly arrowNavigation = signal(false);\n\n /**\n * The callback function to call when the value of the radio group changes.\n */\n private onChange: (value: string | null) => void = () => {\n /* Empty */\n };\n\n /**\n * The callback function to call when the radio group is touched.\n * @ignore\n */\n onTouched: () => void = () => {\n /* Empty */\n };\n\n constructor() {\n effect(() => {\n if (this.value() === null && this.defaultValue() !== undefined) {\n this.value.set(this.defaultValue()!);\n }\n });\n }\n\n /**\n * Select a radio item.\n * @param value The value of the radio item to select.\n * @ignore\n */\n select(value: string | null): void {\n if (this.disabledState() || this.readonly() || this.value() === value) {\n return;\n }\n\n this.value.set(value);\n if (value !== null) {\n this.onValueChange.emit(value);\n }\n this.onChange?.(value);\n this.onTouched();\n }\n\n /**\n * Update the value of the radio group.\n * @param value The new value of the radio group.\n * @ignore\n */\n writeValue(value: string | null): void {\n this.value.set(value);\n }\n\n /**\n * Register a callback function to call when the value of the radio group changes.\n * @param fn The callback function to call when the value of the radio group changes.\n * @ignore\n */\n registerOnChange(fn: (value: string | null) => void): void {\n this.onChange = fn;\n }\n\n /** @ignore */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * Set the disabled state of the radio group.\n * @param isDisabled Whether the radio group is disabled.\n * @ignore\n */\n setDisabledState(isDisabled: boolean): void {\n this.disable.set(isDisabled);\n }\n\n setArrowNavigation(value: boolean): void {\n this.arrowNavigation.set(value);\n }\n\n isArrowNavigation(): boolean {\n return this.arrowNavigation();\n }\n\n protected onKeydown(): void {\n if (this.disabledState()) return;\n }\n}\n","import {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n InjectionToken,\n input,\n Renderer2\n} from '@angular/core';\nimport { BooleanInput, provideToken } from '@radix-ng/primitives/core';\nimport { Orientation, RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';\nimport { RDX_RADIO_GROUP } from './radio-tokens';\n\nexport const RdxRadioItemToken = new InjectionToken<RdxRadioItemDirective>('RadioItemToken');\n\nexport function injectRadioItem(): RdxRadioItemDirective {\n return inject(RdxRadioItemToken);\n}\n\n@Directive({\n selector: '[rdxRadioItem]',\n exportAs: 'rdxRadioItem',\n providers: [provideToken(RdxRadioItemToken, RdxRadioItemDirective)],\n hostDirectives: [\n { directive: RdxRovingFocusItemDirective, inputs: ['tabStopId: id', 'focusable', 'active', 'allowShiftKey'] }\n ],\n\n host: {\n '[attr.type]': 'nativeButtonState() ? \"button\" : undefined',\n role: 'radio',\n '[attr.aria-checked]': 'checkedState()',\n '[attr.aria-readonly]': 'readonlyState() ? \"true\" : undefined',\n '[attr.aria-required]': 'requiredState() ? \"true\" : undefined',\n '[attr.data-checked]': 'checkedState() ? \"\" : undefined',\n '[attr.data-unchecked]': '!checkedState() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabledState() ? \"\" : undefined',\n '[attr.data-readonly]': 'readonlyState() ? \"\" : undefined',\n '[attr.data-required]': 'requiredState() ? \"\" : undefined',\n '[attr.data-state]': 'checkedState() ? \"checked\" : \"unchecked\"',\n '[attr.disabled]': 'nativeButtonState() && disabledState() ? \"\" : undefined',\n '(click)': 'onClick()',\n '(keydown)': 'onKeyDown($event)',\n '(keyup)': 'onKeyUp()',\n '(focus)': 'onFocus()'\n }\n})\nexport class RdxRadioItemDirective {\n private readonly radioGroup = inject(RDX_RADIO_GROUP);\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly renderer = inject(Renderer2);\n private readonly rovingFocusItem = inject(RdxRovingFocusItemDirective);\n private readonly destroyRef = inject(DestroyRef);\n private readonly inputElement = this.renderer.createElement('input') as HTMLInputElement;\n private previousCheckedState: boolean | undefined;\n\n readonly value = input.required<string>();\n\n readonly id = input<string>();\n\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly readonly = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly nativeButton = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly nativeButtonState = computed(\n () => this.nativeButton() || this.elementRef.nativeElement.tagName === 'BUTTON'\n );\n\n readonly disabledState = computed(() => this.radioGroup.disabledState() || this.disabled());\n\n readonly readonlyState = computed(() => this.radioGroup.readonly() || this.readonly());\n\n readonly requiredState = computed(() => this.radioGroup.required() || this.required());\n\n readonly checkedState = computed(() => this.radioGroup.value() === this.value());\n\n private readonly ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'] as const;\n\n constructor() {\n this.createHiddenInput();\n const unlistenInputChange = this.renderer.listen(this.inputElement, 'change', () => {\n if (this.inputElement.checked) {\n this.radioGroup.select(this.value());\n }\n });\n\n this.destroyRef.onDestroy(() => {\n unlistenInputChange();\n const parent = this.inputElement.parentNode;\n\n if (parent) {\n this.renderer.removeChild(parent, this.inputElement);\n }\n });\n\n effect(() => {\n this.rovingFocusItem.setActive(this.checkedState());\n this.rovingFocusItem.setFocusable(!this.disabledState());\n this.syncHiddenInput();\n });\n }\n\n /** @ignore */\n onClick() {\n if (!this.disabledState() && !this.readonlyState()) {\n this.radioGroup.select(this.value());\n }\n }\n\n /** @ignore */\n onKeyDown(event: Event): void {\n const keyEvent = event as KeyboardEvent;\n if (keyEvent.key === ' ' || keyEvent.key === 'Enter') {\n this.onClick();\n return;\n }\n\n if (this.isAllowedArrowKey(keyEvent.key)) {\n this.radioGroup.setArrowNavigation(true);\n }\n }\n\n /** @ignore */\n onKeyUp() {\n this.radioGroup.setArrowNavigation(false);\n }\n\n /** @ignore */\n onFocus() {\n queueMicrotask(() => {\n if (this.radioGroup.isArrowNavigation()) {\n this.radioGroup.select(this.value());\n this.radioGroup.setArrowNavigation(false);\n }\n });\n }\n\n private isAllowedArrowKey(key: string): boolean {\n if (!(this.ARROW_KEYS as readonly string[]).includes(key)) {\n return false;\n }\n\n const orientation = this.radioGroup.orientation() ?? ('horizontal' satisfies Orientation);\n\n if (orientation === 'vertical') {\n return key === 'ArrowUp' || key === 'ArrowDown';\n }\n\n return key === 'ArrowLeft' || key === 'ArrowRight';\n }\n\n private createHiddenInput(): void {\n const host = this.elementRef.nativeElement;\n const parent = host.parentNode;\n\n this.renderer.setAttribute(this.inputElement, 'type', 'radio');\n this.renderer.setAttribute(this.inputElement, 'tabindex', '-1');\n this.renderer.setAttribute(this.inputElement, 'aria-hidden', 'true');\n this.renderer.setStyle(this.inputElement, 'position', 'absolute');\n this.renderer.setStyle(this.inputElement, 'pointer-events', 'none');\n this.renderer.setStyle(this.inputElement, 'opacity', '0');\n this.renderer.setStyle(this.inputElement, 'margin', '0');\n this.renderer.setStyle(this.inputElement, 'inset', '0');\n this.renderer.setStyle(this.inputElement, 'transform', 'translateX(-100%)');\n\n if (parent) {\n this.renderer.insertBefore(parent, this.inputElement, host.nextSibling);\n }\n }\n\n private syncHiddenInput(): void {\n const checked = this.checkedState();\n\n this.inputElement.name = this.radioGroup.name() ?? '';\n this.inputElement.value = this.value();\n this.inputElement.checked = checked;\n this.inputElement.required = this.requiredState();\n this.inputElement.disabled = this.disabledState();\n\n this.setOptionalAttribute('name', this.radioGroup.name());\n this.setOptionalAttribute('form', this.radioGroup.form());\n this.setBooleanAttribute('checked', checked);\n this.setBooleanAttribute('required', this.requiredState());\n this.setBooleanAttribute('disabled', this.disabledState());\n this.renderer.setAttribute(this.inputElement, 'value', this.value());\n\n if (this.previousCheckedState === false && checked) {\n this.inputElement.dispatchEvent(new Event('input', { bubbles: true }));\n this.inputElement.dispatchEvent(new Event('change', { bubbles: true }));\n }\n\n this.previousCheckedState = checked;\n }\n\n private setOptionalAttribute(name: string, value: string | undefined): void {\n if (value) {\n this.renderer.setAttribute(this.inputElement, name, value);\n } else {\n this.renderer.removeAttribute(this.inputElement, name);\n }\n }\n\n private setBooleanAttribute(name: string, value: boolean): void {\n if (value) {\n this.renderer.setAttribute(this.inputElement, name, '');\n } else {\n this.renderer.removeAttribute(this.inputElement, name);\n }\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { RdxRadioItemDirective } from './radio-item.directive';\nimport { RDX_RADIO_GROUP, RadioGroupDirective } from './radio-tokens';\n\n@Directive({\n selector: '[rdxRadioIndicator]',\n exportAs: 'rdxRadioIndicator',\n host: {\n '[attr.data-checked]': 'radioItem.checkedState() ? \"\" : undefined',\n '[attr.data-unchecked]': '!radioItem.checkedState() ? \"\" : undefined',\n '[attr.data-state]': 'radioItem.checkedState() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'radioItem.disabledState() ? \"\" : undefined',\n '[attr.data-readonly]': 'radioItem.readonlyState() ? \"\" : undefined',\n '[attr.data-required]': 'radioItem.requiredState() ? \"\" : undefined',\n '[hidden]': '!radioItem.checkedState()',\n '[style.pointer-events]': '\"none\"'\n }\n})\nexport class RdxRadioIndicatorDirective {\n protected readonly radioGroup: RadioGroupDirective = inject(RDX_RADIO_GROUP);\n protected readonly radioItem: RdxRadioItemDirective = inject(RdxRadioItemDirective);\n}\n","import { computed, Directive, effect, ElementRef, inject } from '@angular/core';\nimport { RdxVisuallyHiddenDirective } from '@radix-ng/primitives/visually-hidden';\nimport { injectRadioItem } from './radio-item.directive';\nimport { RDX_RADIO_GROUP } from './radio-tokens';\n\n@Directive({\n selector: 'input[rdxRadioItemInput]',\n exportAs: 'rdxRadioItemInput',\n hostDirectives: [{ directive: RdxVisuallyHiddenDirective, inputs: ['feature'] }],\n host: {\n type: 'radio',\n tabindex: '-1',\n 'aria-hidden': 'true',\n '[attr.name]': 'name()',\n '[attr.form]': 'form()',\n '[attr.required]': 'required() ? \"\" : undefined',\n '[attr.disabled]': 'disabled() ? \"\" : undefined',\n '[attr.checked]': 'checked() ? \"\" : undefined',\n '[checked]': 'checked()',\n '[attr.value]': 'value()',\n '[style]': `{\n position: 'absolute',\n pointerEvents: 'none',\n opacity: 0,\n margin: 0,\n inset: 0,\n transform: 'translateX(-100%)',\n }`\n }\n})\nexport class RdxRadioItemInputDirective {\n private readonly radioItem = injectRadioItem();\n private readonly radioGroup = inject(RDX_RADIO_GROUP);\n private readonly input = inject<ElementRef<HTMLInputElement>>(ElementRef).nativeElement;\n\n readonly name = computed(() => this.radioGroup.name());\n readonly form = computed(() => this.radioGroup.form());\n readonly value = computed(() => this.radioItem.value() || undefined);\n readonly checked = computed(() => this.radioItem.checkedState());\n readonly required = computed(() => this.radioItem.requiredState());\n readonly disabled = computed(() => this.radioItem.disabledState());\n\n constructor() {\n let isInitial = true;\n\n effect(() => {\n const checked = this.checked();\n\n if (isInitial) {\n isInitial = false;\n return;\n }\n\n if (checked) {\n this.input.dispatchEvent(new Event('input', { bubbles: true }));\n this.input.dispatchEvent(new Event('change', { bubbles: true }));\n }\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;AA0BO,MAAM,eAAe,GAAG,IAAI,cAAc,CAAsB,eAAe,CAAC;;MCF1E,sBAAsB,CAAA;AA2C/B,IAAA,WAAA,GAAA;AAxCS,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EAAC;QAElC,IAAA,CAAA,YAAY,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,cAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;QAE9B,IAAA,CAAA,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GA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MAAA,EAAA,CAAA,SAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAzBtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,0BAA0B;AACpC,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,0BAA0B,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC;AAChF,oBAAA,IAAI,EAAE;AACF,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,QAAQ,EAAE,IAAI;AACd,wBAAA,aAAa,EAAE,MAAM;AACrB,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,iBAAiB,EAAE,6BAA6B;AAChD,wBAAA,iBAAiB,EAAE,6BAA6B;AAChD,wBAAA,gBAAgB,EAAE,4BAA4B;AAC9C,wBAAA,WAAW,EAAE,WAAW;AACxB,wBAAA,cAAc,EAAE,SAAS;AACzB,wBAAA,SAAS,EAAE,CAAA;;;;;;;AAOT,SAAA;AACL;AACJ,iBAAA;;;AC7BD;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isPlatformBrowser } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, PLATFORM_ID, ElementRef, input, booleanAttribute, model, output, linkedSignal, signal, effect, Directive,
|
|
3
|
+
import { inject, PLATFORM_ID, ElementRef, DestroyRef, input, booleanAttribute, model, output, linkedSignal, signal, effect, Directive, computed, untracked } from '@angular/core';
|
|
4
4
|
import { createContext } from '@radix-ng/primitives/core';
|
|
5
5
|
|
|
6
6
|
const ENTRY_FOCUS = 'rovingFocusGroup.onEntryFocus';
|
|
@@ -46,8 +46,15 @@ function focusFirst(candidates, preventScroll = false, rootNode) {
|
|
|
46
46
|
function wrapArray(array, startIndex) {
|
|
47
47
|
return array.map((_, index) => array[(startIndex + index) % array.length]);
|
|
48
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Sorts elements by their position in the document, so the order matches what the user sees.
|
|
51
|
+
*/
|
|
52
|
+
function sortByDocumentPosition(elements) {
|
|
53
|
+
return [...elements].sort((a, b) => (a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1));
|
|
54
|
+
}
|
|
55
|
+
let idCounter = 0;
|
|
49
56
|
function generateId() {
|
|
50
|
-
return `rf-item-${
|
|
57
|
+
return `rf-item-${++idCounter}`;
|
|
51
58
|
}
|
|
52
59
|
|
|
53
60
|
const rootContext = () => {
|
|
@@ -64,20 +71,8 @@ const rootContext = () => {
|
|
|
64
71
|
onItemShiftTab: () => {
|
|
65
72
|
rovingFocusGroup.isTabbingBackOut.set(true);
|
|
66
73
|
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
onFocusableItemRemove: () => {
|
|
71
|
-
rovingFocusGroup.focusableItemsCount.update((count) => Math.max(0, count - 1));
|
|
72
|
-
},
|
|
73
|
-
registerItem: (item) => {
|
|
74
|
-
const currentItems = rovingFocusGroup.focusableItems();
|
|
75
|
-
rovingFocusGroup.focusableItems.set([...currentItems, item]);
|
|
76
|
-
},
|
|
77
|
-
unregisterItem: (item) => {
|
|
78
|
-
const currentItems = rovingFocusGroup.focusableItems();
|
|
79
|
-
rovingFocusGroup.focusableItems.set(currentItems.filter((el) => el !== item));
|
|
80
|
-
}
|
|
74
|
+
registerItem: (item, tabStopId) => rovingFocusGroup.registerItem(item, tabStopId),
|
|
75
|
+
unregisterItem: (item, tabStopId) => rovingFocusGroup.unregisterItem(item, tabStopId)
|
|
81
76
|
};
|
|
82
77
|
};
|
|
83
78
|
const [injectRovingFocusGroupContext, provideRovingFocusGroupContext] = createContext('RovingFocusGroupContext');
|
|
@@ -88,6 +83,7 @@ class RdxRovingFocusGroupDirective {
|
|
|
88
83
|
constructor() {
|
|
89
84
|
this.isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
90
85
|
this.elementRef = inject(ElementRef);
|
|
86
|
+
this.destroyRef = inject(DestroyRef);
|
|
91
87
|
/**
|
|
92
88
|
* The orientation of the group. Mainly so arrow navigation is done accordingly (left & right vs. up & down)
|
|
93
89
|
*/
|
|
@@ -131,7 +127,11 @@ class RdxRovingFocusGroupDirective {
|
|
|
131
127
|
this.focusableItems = signal([], ...(ngDevMode ? [{ debugName: "focusableItems" }] : /* istanbul ignore next */ []));
|
|
132
128
|
this.isClickFocus = signal(false, ...(ngDevMode ? [{ debugName: "isClickFocus" }] : /* istanbul ignore next */ []));
|
|
133
129
|
this.isTabbingBackOut = signal(false, ...(ngDevMode ? [{ debugName: "isTabbingBackOut" }] : /* istanbul ignore next */ []));
|
|
134
|
-
this.
|
|
130
|
+
this.itemIds = new WeakMap();
|
|
131
|
+
this.isDestroyed = false;
|
|
132
|
+
this.destroyRef.onDestroy(() => {
|
|
133
|
+
this.isDestroyed = true;
|
|
134
|
+
});
|
|
135
135
|
effect(() => {
|
|
136
136
|
if (this.currentTabStopId() === undefined) {
|
|
137
137
|
const def = this.defaultCurrentTabStopId();
|
|
@@ -151,6 +151,22 @@ class RdxRovingFocusGroupDirective {
|
|
|
151
151
|
this._loop.set(value);
|
|
152
152
|
}
|
|
153
153
|
/** @ignore */
|
|
154
|
+
registerItem(item, tabStopId) {
|
|
155
|
+
this.itemIds.set(item, tabStopId);
|
|
156
|
+
// Keep the registry in DOM order, so arrow navigation matches the visual order
|
|
157
|
+
// regardless of the order in which items are created/registered.
|
|
158
|
+
this.focusableItems.update((items) => sortByDocumentPosition([...items, item]));
|
|
159
|
+
}
|
|
160
|
+
/** @ignore */
|
|
161
|
+
unregisterItem(item, tabStopId) {
|
|
162
|
+
const remainingItems = this.focusableItems().filter((el) => el !== item);
|
|
163
|
+
this.focusableItems.set(remainingItems);
|
|
164
|
+
this.itemIds.delete(item);
|
|
165
|
+
if (!this.isDestroyed && this.currentTabStopId() === tabStopId) {
|
|
166
|
+
this.currentTabStopId.set(this.itemIds.get(remainingItems[0]));
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/** @ignore */
|
|
154
170
|
handleMouseUp() {
|
|
155
171
|
if (!this.isBrowser)
|
|
156
172
|
return;
|
|
@@ -176,16 +192,18 @@ class RdxRovingFocusGroupDirective {
|
|
|
176
192
|
if (!entryFocusEvent.defaultPrevented) {
|
|
177
193
|
const items = this.focusableItems().filter((item) => item.dataset['disabled'] !== '');
|
|
178
194
|
const activeItem = items.find((item) => item.getAttribute('data-active') === 'true');
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
195
|
+
// The current tab stop is the only item with `tabindex="0"` (driven by
|
|
196
|
+
// `currentTabStopId`). We match on it instead of the DOM `id`, because consumers
|
|
197
|
+
// (tabs, navigation-menu) own the element `id` and it may not equal the internal id.
|
|
198
|
+
const currentItem = items.find((item) => item.getAttribute('tabindex') === '0');
|
|
199
|
+
const candidateItems = [activeItem, currentItem, ...items].filter(Boolean);
|
|
182
200
|
focusFirst(candidateItems, this.preventScrollOnEntryFocus());
|
|
183
201
|
}
|
|
184
202
|
}
|
|
185
203
|
this.isClickFocus.set(false);
|
|
186
204
|
}
|
|
187
205
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRovingFocusGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
188
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxRovingFocusGroupDirective, isStandalone: true, selector: "[rdxRovingFocusGroup]", inputs: { orientationInput: { classPropertyName: "orientationInput", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, dirInput: { classPropertyName: "dirInput", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, loopInput: { classPropertyName: "loopInput", publicName: "loop", isSignal: true, isRequired: false, transformFunction: null }, preventScrollOnEntryFocus: { classPropertyName: "preventScrollOnEntryFocus", publicName: "preventScrollOnEntryFocus", isSignal: true, isRequired: false, transformFunction: null }, defaultCurrentTabStopId: { classPropertyName: "defaultCurrentTabStopId", publicName: "defaultCurrentTabStopId", isSignal: true, isRequired: false, transformFunction: null }, currentTabStopId: { classPropertyName: "currentTabStopId", publicName: "currentTabStopId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { currentTabStopId: "currentTabStopIdChange", entryFocus: "entryFocus" }, host: { listeners: { "focus": "handleFocus($event)", "
|
|
206
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxRovingFocusGroupDirective, isStandalone: true, selector: "[rdxRovingFocusGroup]", inputs: { orientationInput: { classPropertyName: "orientationInput", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, dirInput: { classPropertyName: "dirInput", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, loopInput: { classPropertyName: "loopInput", publicName: "loop", isSignal: true, isRequired: false, transformFunction: null }, preventScrollOnEntryFocus: { classPropertyName: "preventScrollOnEntryFocus", publicName: "preventScrollOnEntryFocus", isSignal: true, isRequired: false, transformFunction: null }, defaultCurrentTabStopId: { classPropertyName: "defaultCurrentTabStopId", publicName: "defaultCurrentTabStopId", isSignal: true, isRequired: false, transformFunction: null }, currentTabStopId: { classPropertyName: "currentTabStopId", publicName: "currentTabStopId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { currentTabStopId: "currentTabStopIdChange", entryFocus: "entryFocus" }, host: { listeners: { "focus": "handleFocus($event)", "focusout": "isTabbingBackOut.set(false)", "mouseup": "handleMouseUp()", "mousedown": "isClickFocus.set(true)" }, properties: { "attr.data-orientation": "orientation()", "attr.tabindex": "isTabbingBackOut() || focusableItems().length === 0 ? -1 : 0", "attr.dir": "dir()" } }, providers: [provideRovingFocusGroupContext(rootContext)], ngImport: i0 }); }
|
|
189
207
|
}
|
|
190
208
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRovingFocusGroupDirective, decorators: [{
|
|
191
209
|
type: Directive,
|
|
@@ -194,13 +212,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
194
212
|
providers: [provideRovingFocusGroupContext(rootContext)],
|
|
195
213
|
host: {
|
|
196
214
|
'[attr.data-orientation]': 'orientation()',
|
|
197
|
-
'[attr.tabindex]': 'isTabbingBackOut() ||
|
|
215
|
+
'[attr.tabindex]': 'isTabbingBackOut() || focusableItems().length === 0 ? -1 : 0',
|
|
198
216
|
'[attr.dir]': 'dir()',
|
|
199
217
|
'(focus)': 'handleFocus($event)',
|
|
200
|
-
'(
|
|
218
|
+
'(focusout)': 'isTabbingBackOut.set(false)',
|
|
201
219
|
'(mouseup)': 'handleMouseUp()',
|
|
202
|
-
'(mousedown)': 'isClickFocus.set(true)'
|
|
203
|
-
style: 'outline: none;'
|
|
220
|
+
'(mousedown)': 'isClickFocus.set(true)'
|
|
204
221
|
}
|
|
205
222
|
}]
|
|
206
223
|
}], ctorParameters: () => [], propDecorators: { orientationInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], dirInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }], loopInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "loop", required: false }] }], preventScrollOnEntryFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "preventScrollOnEntryFocus", required: false }] }], defaultCurrentTabStopId: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultCurrentTabStopId", required: false }] }], currentTabStopId: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentTabStopId", required: false }] }, { type: i0.Output, args: ["currentTabStopIdChange"] }], entryFocus: [{ type: i0.Output, args: ["entryFocus"] }] } });
|
|
@@ -211,19 +228,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
211
228
|
class RdxRovingFocusItemDirective {
|
|
212
229
|
constructor() {
|
|
213
230
|
this.isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
214
|
-
this.destroyRef = inject(DestroyRef);
|
|
215
231
|
this.elementRef = inject(ElementRef);
|
|
216
|
-
|
|
232
|
+
/**
|
|
233
|
+
* The enclosing roving-focus group. Optional: when the item is used outside a group
|
|
234
|
+
* (e.g. a standalone Toggle), it degrades to a plain element and does not manage focus.
|
|
235
|
+
*/
|
|
236
|
+
this.rootContext = injectRovingFocusGroupContext(true);
|
|
217
237
|
/**
|
|
218
238
|
* When false, item will not be focusable.
|
|
219
239
|
* @group Props
|
|
220
240
|
*/
|
|
221
241
|
this.focusableInput = input(true, { ...(ngDevMode ? { debugName: "focusableInput" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'focusable' });
|
|
222
242
|
/**
|
|
223
|
-
* When `true`, item
|
|
243
|
+
* When `true`, marks the item as the active one, so it is preferred when focus enters the group.
|
|
224
244
|
* @group Props
|
|
225
245
|
*/
|
|
226
|
-
this.activeInput = input(
|
|
246
|
+
this.activeInput = input(false, { ...(ngDevMode ? { debugName: "activeInput" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'active' });
|
|
227
247
|
/**
|
|
228
248
|
* @group Props
|
|
229
249
|
*/
|
|
@@ -233,19 +253,37 @@ class RdxRovingFocusItemDirective {
|
|
|
233
253
|
* @group Props
|
|
234
254
|
*/
|
|
235
255
|
this.allowShiftKey = input(false, { ...(ngDevMode ? { debugName: "allowShiftKey" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
236
|
-
|
|
237
|
-
this.
|
|
256
|
+
// Stable fallback id, generated once so it never changes across recomputations of `id`.
|
|
257
|
+
this.generatedId = generateId();
|
|
258
|
+
this.id = computed(() => this.tabStopId() || this.generatedId, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
259
|
+
this.isCurrentTabStop = computed(() => this.rootContext?.currentTabStopId() === this.id(), ...(ngDevMode ? [{ debugName: "isCurrentTabStop" }] : /* istanbul ignore next */ []));
|
|
238
260
|
this.focusable = linkedSignal(() => this.focusableInput(), ...(ngDevMode ? [{ debugName: "focusable" }] : /* istanbul ignore next */ []));
|
|
239
261
|
this.active = linkedSignal(() => this.activeInput(), ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
240
262
|
this.tabStopId = linkedSignal(() => this.tabStopIdInput(), ...(ngDevMode ? [{ debugName: "tabStopId" }] : /* istanbul ignore next */ []));
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
263
|
+
/**
|
|
264
|
+
* The roving tabindex. Without a group the item keeps its natural tab order (`null`); inside a
|
|
265
|
+
* group exactly one focusable item is a tab stop (`0`), the rest are reachable only via arrows (`-1`).
|
|
266
|
+
*/
|
|
267
|
+
this.tabindex = computed(() => {
|
|
268
|
+
if (!this.rootContext) {
|
|
269
|
+
return null;
|
|
270
|
+
}
|
|
271
|
+
return this.focusable() && this.isCurrentTabStop() ? 0 : -1;
|
|
272
|
+
}, ...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
|
|
273
|
+
// Keep the group's registry in sync with `focusable`, which can change after creation
|
|
274
|
+
// (e.g. toolbar/navigation-menu toggle it via `setFocusable`). The cleanup also runs on
|
|
275
|
+
// destroy, so a single effect covers register/unregister for the whole lifecycle.
|
|
276
|
+
effect((onCleanup) => {
|
|
277
|
+
const rootContext = this.rootContext;
|
|
278
|
+
if (!rootContext || !this.focusable())
|
|
279
|
+
return;
|
|
280
|
+
const element = this.elementRef.nativeElement;
|
|
281
|
+
// `registerItem` reads and writes the group's `focusableItems` signal; calling it
|
|
282
|
+
// untracked prevents the effect from depending on its own write and looping.
|
|
283
|
+
const tabStopId = this.id();
|
|
284
|
+
untracked(() => rootContext.registerItem(element, tabStopId));
|
|
285
|
+
onCleanup(() => rootContext.unregisterItem(element, tabStopId));
|
|
286
|
+
});
|
|
249
287
|
}
|
|
250
288
|
setFocusable(value) {
|
|
251
289
|
this.focusable.set(value);
|
|
@@ -257,6 +295,10 @@ class RdxRovingFocusItemDirective {
|
|
|
257
295
|
this.tabStopId.set(value);
|
|
258
296
|
}
|
|
259
297
|
/** @ignore */
|
|
298
|
+
onFocus() {
|
|
299
|
+
this.rootContext?.onItemFocus(this.id());
|
|
300
|
+
}
|
|
301
|
+
/** @ignore */
|
|
260
302
|
handleMouseDown(event) {
|
|
261
303
|
if (!this.focusable()) {
|
|
262
304
|
// We prevent focusing non-focusable items on `mousedown`.
|
|
@@ -265,7 +307,7 @@ class RdxRovingFocusItemDirective {
|
|
|
265
307
|
}
|
|
266
308
|
else {
|
|
267
309
|
// Safari doesn't focus a button when clicked so we run our logic on mousedown also
|
|
268
|
-
this.rootContext
|
|
310
|
+
this.rootContext?.onItemFocus(this.id());
|
|
269
311
|
}
|
|
270
312
|
}
|
|
271
313
|
/**
|
|
@@ -276,14 +318,17 @@ class RdxRovingFocusItemDirective {
|
|
|
276
318
|
* @ignore
|
|
277
319
|
*/
|
|
278
320
|
handleKeydown(event) {
|
|
321
|
+
const rootContext = this.rootContext;
|
|
322
|
+
if (!rootContext)
|
|
323
|
+
return;
|
|
279
324
|
const keyEvent = event;
|
|
280
325
|
if (keyEvent.key === 'Tab' && keyEvent.shiftKey) {
|
|
281
|
-
|
|
326
|
+
rootContext.onItemShiftTab();
|
|
282
327
|
return;
|
|
283
328
|
}
|
|
284
329
|
if (event.target !== this.elementRef.nativeElement)
|
|
285
330
|
return;
|
|
286
|
-
const focusIntent = getFocusIntent(keyEvent,
|
|
331
|
+
const focusIntent = getFocusIntent(keyEvent, rootContext.orientation(), rootContext.dir());
|
|
287
332
|
if (focusIntent !== undefined) {
|
|
288
333
|
if (keyEvent.metaKey ||
|
|
289
334
|
keyEvent.ctrlKey ||
|
|
@@ -292,7 +337,7 @@ class RdxRovingFocusItemDirective {
|
|
|
292
337
|
return;
|
|
293
338
|
}
|
|
294
339
|
event.preventDefault();
|
|
295
|
-
let candidateNodes =
|
|
340
|
+
let candidateNodes = rootContext.focusableItems().filter((item) => item.dataset['disabled'] !== '');
|
|
296
341
|
if (focusIntent === 'last') {
|
|
297
342
|
candidateNodes.reverse();
|
|
298
343
|
}
|
|
@@ -300,32 +345,33 @@ class RdxRovingFocusItemDirective {
|
|
|
300
345
|
if (focusIntent === 'prev')
|
|
301
346
|
candidateNodes.reverse();
|
|
302
347
|
const currentIndex = candidateNodes.indexOf(this.elementRef.nativeElement);
|
|
303
|
-
candidateNodes =
|
|
348
|
+
candidateNodes = rootContext.loop()
|
|
304
349
|
? wrapArray(candidateNodes, currentIndex + 1)
|
|
305
350
|
: candidateNodes.slice(currentIndex + 1);
|
|
306
351
|
}
|
|
307
352
|
queueMicrotask(() => {
|
|
308
353
|
if (this.isBrowser) {
|
|
309
|
-
|
|
354
|
+
const rootNode = this.elementRef.nativeElement.getRootNode();
|
|
355
|
+
focusFirst(candidateNodes, false, rootNode);
|
|
310
356
|
}
|
|
311
357
|
});
|
|
312
358
|
}
|
|
313
359
|
}
|
|
314
360
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRovingFocusItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
315
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxRovingFocusItemDirective, isStandalone: true, selector: "[rdxRovingFocusItem]", inputs: { focusableInput: { classPropertyName: "focusableInput", publicName: "focusable", isSignal: true, isRequired: false, transformFunction: null }, activeInput: { classPropertyName: "activeInput", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, tabStopIdInput: { classPropertyName: "tabStopIdInput", publicName: "tabStopId", isSignal: true, isRequired: false, transformFunction: null }, allowShiftKey: { classPropertyName: "allowShiftKey", publicName: "allowShiftKey", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mousedown": "handleMouseDown($event)", "keydown": "handleKeydown($event)", "focus": "
|
|
361
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxRovingFocusItemDirective, isStandalone: true, selector: "[rdxRovingFocusItem]", inputs: { focusableInput: { classPropertyName: "focusableInput", publicName: "focusable", isSignal: true, isRequired: false, transformFunction: null }, activeInput: { classPropertyName: "activeInput", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, tabStopIdInput: { classPropertyName: "tabStopIdInput", publicName: "tabStopId", isSignal: true, isRequired: false, transformFunction: null }, allowShiftKey: { classPropertyName: "allowShiftKey", publicName: "allowShiftKey", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mousedown": "handleMouseDown($event)", "keydown": "handleKeydown($event)", "focus": "onFocus()" }, properties: { "attr.tabindex": "tabindex()", "attr.data-orientation": "rootContext?.orientation()", "attr.data-active": "active() ? \"true\" : undefined", "attr.data-disabled": "!focusable() ? \"\" : undefined" } }, ngImport: i0 }); }
|
|
316
362
|
}
|
|
317
363
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRovingFocusItemDirective, decorators: [{
|
|
318
364
|
type: Directive,
|
|
319
365
|
args: [{
|
|
320
366
|
selector: '[rdxRovingFocusItem]',
|
|
321
367
|
host: {
|
|
322
|
-
'[attr.tabindex]': '
|
|
323
|
-
'[attr.data-orientation]': 'rootContext
|
|
324
|
-
'[attr.data-active]': 'active()',
|
|
368
|
+
'[attr.tabindex]': 'tabindex()',
|
|
369
|
+
'[attr.data-orientation]': 'rootContext?.orientation()',
|
|
370
|
+
'[attr.data-active]': 'active() ? "true" : undefined',
|
|
325
371
|
'[attr.data-disabled]': '!focusable() ? "" : undefined',
|
|
326
372
|
'(mousedown)': 'handleMouseDown($event)',
|
|
327
373
|
'(keydown)': 'handleKeydown($event)',
|
|
328
|
-
'(focus)': '
|
|
374
|
+
'(focus)': 'onFocus()'
|
|
329
375
|
}
|
|
330
376
|
}]
|
|
331
377
|
}], ctorParameters: () => [], propDecorators: { focusableInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusable", required: false }] }], activeInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], tabStopIdInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabStopId", required: false }] }], allowShiftKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowShiftKey", required: false }] }] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radix-ng-primitives-roving-focus.mjs","sources":["../../../packages/primitives/roving-focus/src/utils.ts","../../../packages/primitives/roving-focus/src/roving-focus-group.directive.ts","../../../packages/primitives/roving-focus/src/roving-focus-item.directive.ts","../../../packages/primitives/roving-focus/index.ts","../../../packages/primitives/roving-focus/radix-ng-primitives-roving-focus.ts"],"sourcesContent":["export type Orientation = 'horizontal' | 'vertical';\nexport type Direction = 'ltr' | 'rtl';\n\nexport const ENTRY_FOCUS = 'rovingFocusGroup.onEntryFocus';\nexport const EVENT_OPTIONS = { bubbles: false, cancelable: true };\n\ntype FocusIntent = 'first' | 'last' | 'prev' | 'next';\n\nexport const MAP_KEY_TO_FOCUS_INTENT: Record<string, FocusIntent> = {\n ArrowLeft: 'prev',\n ArrowUp: 'prev',\n ArrowRight: 'next',\n ArrowDown: 'next',\n PageUp: 'first',\n Home: 'first',\n PageDown: 'last',\n End: 'last'\n};\n\nexport function getDirectionAwareKey(key: string, dir?: Direction) {\n if (dir !== 'rtl') return key;\n return key === 'ArrowLeft' ? 'ArrowRight' : key === 'ArrowRight' ? 'ArrowLeft' : key;\n}\n\nexport function getFocusIntent(event: KeyboardEvent, orientation?: Orientation, dir?: Direction) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === 'vertical' && ['ArrowLeft', 'ArrowRight'].includes(key)) return undefined;\n if (orientation === 'horizontal' && ['ArrowUp', 'ArrowDown'].includes(key)) return undefined;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\n\nexport function focusFirst(candidates: HTMLElement[], preventScroll = false, rootNode?: Document | ShadowRoot) {\n const PREVIOUSLY_FOCUSED_ELEMENT = rootNode?.activeElement ?? document.activeElement;\n for (const candidate of candidates) {\n // if focus is already where we want to go, we don't want to keep going through the candidates\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\n\n/**\n * Wraps an array around itself at a given start index\n * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`\n */\nexport function wrapArray<T>(array: T[], startIndex: number) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\n\nexport function generateId(): string {\n return `rf-item-${Math.random().toString(36).slice(2, 11)}`;\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n booleanAttribute,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n linkedSignal,\n model,\n output,\n PLATFORM_ID,\n signal\n} from '@angular/core';\nimport { createContext } from '@radix-ng/primitives/core';\nimport { Direction, ENTRY_FOCUS, EVENT_OPTIONS, focusFirst, Orientation } from './utils';\n\nconst rootContext = () => {\n const rovingFocusGroup = inject(RdxRovingFocusGroupDirective);\n return {\n loop: rovingFocusGroup.loop,\n dir: rovingFocusGroup.dir,\n orientation: rovingFocusGroup.orientation,\n currentTabStopId: rovingFocusGroup.currentTabStopId,\n focusableItems: rovingFocusGroup.focusableItems,\n onItemFocus: (tabStopId: string) => {\n rovingFocusGroup.currentTabStopId.set(tabStopId);\n },\n onItemShiftTab: () => {\n rovingFocusGroup.isTabbingBackOut.set(true);\n },\n onFocusableItemAdd: () => {\n rovingFocusGroup.focusableItemsCount.update((count) => count + 1);\n },\n onFocusableItemRemove: () => {\n rovingFocusGroup.focusableItemsCount.update((count) => Math.max(0, count - 1));\n },\n registerItem: (item: HTMLElement) => {\n const currentItems = rovingFocusGroup.focusableItems();\n rovingFocusGroup.focusableItems.set([...currentItems, item]);\n },\n unregisterItem: (item: HTMLElement) => {\n const currentItems = rovingFocusGroup.focusableItems();\n rovingFocusGroup.focusableItems.set(currentItems.filter((el) => el !== item));\n }\n };\n};\n\nexport type RovingFocusGroupContext = ReturnType<typeof rootContext>;\n\nexport const [injectRovingFocusGroupContext, provideRovingFocusGroupContext] =\n createContext<RovingFocusGroupContext>('RovingFocusGroupContext');\n\n/**\n * @group Components\n */\n@Directive({\n selector: '[rdxRovingFocusGroup]',\n providers: [provideRovingFocusGroupContext(rootContext)],\n host: {\n '[attr.data-orientation]': 'orientation()',\n '[attr.tabindex]': 'isTabbingBackOut() || focusableItemsCount() === 0 ? -1 : 0',\n '[attr.dir]': 'dir()',\n '(focus)': 'handleFocus($event)',\n '(blur)': 'isTabbingBackOut.set(false)',\n '(mouseup)': 'handleMouseUp()',\n '(mousedown)': 'isClickFocus.set(true)',\n style: 'outline: none;'\n }\n})\nexport class RdxRovingFocusGroupDirective {\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly elementRef = inject(ElementRef);\n\n /**\n * The orientation of the group. Mainly so arrow navigation is done accordingly (left & right vs. up & down)\n */\n readonly orientationInput = input<Orientation>('horizontal', { alias: 'orientation' });\n\n /**\n * The direction of navigation between items.\n */\n readonly dirInput = input<Direction>('ltr', { alias: 'dir' });\n\n /**\n * Whether keyboard navigation should loop around\n */\n readonly loopInput = input<boolean, BooleanInput>(true, { transform: booleanAttribute, alias: 'loop' });\n\n /**\n * When `true`, will prevent scrolling to the focus item when focused.\n * @group Props\n */\n readonly preventScrollOnEntryFocus = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * The value of the current stop item.\n *\n * Use when you do not need to control the state of the stop item.\n * @group Props\n */\n readonly defaultCurrentTabStopId = input<string | undefined>(undefined);\n\n /**\n * The controlled value of the current stop item. Can be binded as `model`.\n * @group Props\n */\n readonly currentTabStopId = model<string | undefined>(undefined);\n\n /**\n * Event handler called when container is being focused. Can be prevented.\n * @group Emits\n */\n readonly entryFocus = output<Event>();\n\n private readonly _orientation = linkedSignal(() => this.orientationInput());\n readonly orientation = this._orientation.asReadonly();\n\n private readonly _dir = linkedSignal(() => this.dirInput());\n readonly dir = this._dir.asReadonly();\n\n private readonly _loop = linkedSignal(() => this.loopInput());\n readonly loop = this._loop.asReadonly();\n\n readonly focusableItems = signal<HTMLElement[]>([]);\n protected readonly isClickFocus = signal(false);\n readonly isTabbingBackOut = signal(false);\n readonly focusableItemsCount = signal(0);\n\n constructor() {\n effect(() => {\n if (this.currentTabStopId() === undefined) {\n const def = this.defaultCurrentTabStopId();\n if (def !== undefined) {\n this.currentTabStopId.set(def);\n }\n }\n });\n }\n\n setOrientation(value: Orientation) {\n this._orientation.set(value);\n }\n\n setDir(value: Direction) {\n this._dir.set(value);\n }\n\n setLoop(value: boolean) {\n this._loop.set(value);\n }\n\n /** @ignore */\n handleMouseUp() {\n if (!this.isBrowser) return;\n\n // reset `isClickFocus` after 1 tick because handleFocus might not triggered due to focused element\n requestAnimationFrame(() => {\n this.isClickFocus.set(false);\n });\n }\n\n /** @ignore */\n handleFocus(event: Event) {\n // We normally wouldn't need this check, because we already check\n // that the focus is on the current target and not bubbling to it.\n // We do this because Safari doesn't focus buttons when clicked, and\n // instead, the wrapper will get focused and not through a bubbling event.\n const isKeyboardFocus = !this.isClickFocus();\n\n if (\n event.currentTarget === this.elementRef.nativeElement &&\n event.target === event.currentTarget &&\n isKeyboardFocus &&\n !this.isTabbingBackOut()\n ) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n this.elementRef.nativeElement.dispatchEvent(entryFocusEvent);\n this.entryFocus.emit(entryFocusEvent);\n\n if (!entryFocusEvent.defaultPrevented) {\n const items = this.focusableItems().filter((item) => item.dataset['disabled'] !== '');\n const activeItem = items.find((item) => item.getAttribute('data-active') === 'true');\n const highlightedItem = items.find((item) => item.getAttribute('data-highlighted') === '');\n const currentItem = items.find((item) => item.id === this.currentTabStopId());\n\n const candidateItems = [activeItem, highlightedItem, currentItem, ...items].filter(\n Boolean\n ) as typeof items;\n\n focusFirst(candidateItems, this.preventScrollOnEntryFocus());\n }\n }\n\n this.isClickFocus.set(false);\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n input,\n linkedSignal,\n PLATFORM_ID\n} from '@angular/core';\nimport { injectRovingFocusGroupContext } from './roving-focus-group.directive';\nimport { focusFirst, generateId, getFocusIntent, wrapArray } from './utils';\n\n/**\n * @group Components\n */\n@Directive({\n selector: '[rdxRovingFocusItem]',\n host: {\n '[attr.tabindex]': 'isCurrentTabStop() ? 0 : -1',\n '[attr.data-orientation]': 'rootContext.orientation',\n '[attr.data-active]': 'active()',\n '[attr.data-disabled]': '!focusable() ? \"\" : undefined',\n '(mousedown)': 'handleMouseDown($event)',\n '(keydown)': 'handleKeydown($event)',\n '(focus)': 'rootContext.onItemFocus(id())'\n }\n})\nexport class RdxRovingFocusItemDirective {\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly destroyRef = inject(DestroyRef);\n private readonly elementRef = inject(ElementRef);\n\n protected readonly rootContext = injectRovingFocusGroupContext()!;\n\n /**\n * When false, item will not be focusable.\n * @group Props\n */\n readonly focusableInput = input<boolean, BooleanInput>(true, { transform: booleanAttribute, alias: 'focusable' });\n\n /**\n * When `true`, item will be initially focused.\n * @group Props\n */\n readonly activeInput = input<boolean, BooleanInput>(true, { transform: booleanAttribute, alias: 'active' });\n\n /**\n * @group Props\n */\n readonly tabStopIdInput = input<string>(undefined, { alias: 'tabStopId' });\n\n /**\n * When true, shift + arrow key will allow focusing on next/previous item.\n * @group Props\n */\n readonly allowShiftKey = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n protected readonly id = computed(() => this.tabStopId() || generateId());\n protected readonly isCurrentTabStop = computed(() => this.rootContext.currentTabStopId() === this.id());\n\n protected readonly focusable = linkedSignal(() => this.focusableInput());\n protected readonly active = linkedSignal(() => this.activeInput());\n private readonly tabStopId = linkedSignal(() => this.tabStopIdInput());\n\n constructor() {\n if (this.focusable()) {\n this.rootContext.registerItem(this.elementRef.nativeElement);\n this.rootContext.onFocusableItemAdd();\n\n this.destroyRef.onDestroy(() => {\n this.rootContext.unregisterItem(this.elementRef.nativeElement);\n this.rootContext.onFocusableItemRemove();\n });\n }\n }\n\n setFocusable(value: boolean) {\n this.focusable.set(value);\n }\n\n setActive(value: boolean) {\n this.active.set(value);\n }\n\n setTabStopId(value: string) {\n this.tabStopId.set(value);\n }\n\n /** @ignore */\n handleMouseDown(event: Event) {\n if (!this.focusable()) {\n // We prevent focusing non-focusable items on `mousedown`.\n // Even though the item has tabIndex={-1}, that only means take it out of the tab order.\n event.preventDefault();\n } else {\n // Safari doesn't focus a button when clicked so we run our logic on mousedown also\n this.rootContext.onItemFocus(this.id());\n }\n }\n\n /**\n * Handles the `keydown` event for keyboard navigation within the roving focus group.\n * Supports navigation based on orientation and direction, and focuses appropriate elements.\n *\n * @param event The `KeyboardEvent` object.\n * @ignore\n */\n handleKeydown(event: Event) {\n const keyEvent = event as KeyboardEvent;\n if (keyEvent.key === 'Tab' && keyEvent.shiftKey) {\n this.rootContext.onItemShiftTab();\n return;\n }\n\n if (event.target !== this.elementRef.nativeElement) return;\n\n const focusIntent = getFocusIntent(keyEvent, this.rootContext.orientation(), this.rootContext.dir());\n\n if (focusIntent !== undefined) {\n if (\n keyEvent.metaKey ||\n keyEvent.ctrlKey ||\n keyEvent.altKey ||\n (this.allowShiftKey() ? false : keyEvent.shiftKey)\n ) {\n return;\n }\n\n event.preventDefault();\n\n let candidateNodes = this.rootContext.focusableItems().filter((item) => item.dataset['disabled'] !== '');\n\n if (focusIntent === 'last') {\n candidateNodes.reverse();\n } else if (focusIntent === 'prev' || focusIntent === 'next') {\n if (focusIntent === 'prev') candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(this.elementRef.nativeElement);\n\n candidateNodes = this.rootContext.loop()\n ? wrapArray(candidateNodes, currentIndex + 1)\n : candidateNodes.slice(currentIndex + 1);\n }\n\n queueMicrotask(() => {\n if (this.isBrowser) {\n focusFirst(candidateNodes, false, this.elementRef.nativeElement);\n }\n });\n }\n }\n}\n","import { RdxRovingFocusGroupDirective } from './src/roving-focus-group.directive';\nimport { RdxRovingFocusItemDirective } from './src/roving-focus-item.directive';\n\nexport * from './src/roving-focus-group.directive';\nexport * from './src/roving-focus-item.directive';\n\nexport { focusFirst } from './src/utils';\nexport type { Direction, Orientation } from './src/utils';\n\nexport const rovingFocusImports = [RdxRovingFocusGroupDirective, RdxRovingFocusItemDirective];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGO,MAAM,WAAW,GAAG,+BAA+B;AACnD,MAAM,aAAa,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;AAI1D,MAAM,uBAAuB,GAAgC;AAChE,IAAA,SAAS,EAAE,MAAM;AACjB,IAAA,OAAO,EAAE,MAAM;AACf,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,SAAS,EAAE,MAAM;AACjB,IAAA,MAAM,EAAE,OAAO;AACf,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,QAAQ,EAAE,MAAM;AAChB,IAAA,GAAG,EAAE;CACR;AAEK,SAAU,oBAAoB,CAAC,GAAW,EAAE,GAAe,EAAA;IAC7D,IAAI,GAAG,KAAK,KAAK;AAAE,QAAA,OAAO,GAAG;IAC7B,OAAO,GAAG,KAAK,WAAW,GAAG,YAAY,GAAG,GAAG,KAAK,YAAY,GAAG,WAAW,GAAG,GAAG;AACxF;SAEgB,cAAc,CA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EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,6BAAA,EAAA,uBAAA,EAAA,yBAAA,EAAA,kBAAA,EAAA,UAAA,EAAA,oBAAA,EAAA,iCAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA3B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAZvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,IAAI,EAAE;AACF,wBAAA,iBAAiB,EAAE,6BAA6B;AAChD,wBAAA,yBAAyB,EAAE,yBAAyB;AACpD,wBAAA,oBAAoB,EAAE,UAAU;AAChC,wBAAA,sBAAsB,EAAE,+BAA+B;AACvD,wBAAA,aAAa,EAAE,yBAAyB;AACxC,wBAAA,WAAW,EAAE,uBAAuB;AACpC,wBAAA,SAAS,EAAE;AACd;AACJ,iBAAA;;;MCrBY,kBAAkB,GAAG,CAAC,4BAA4B,EAAE,2BAA2B;;ACT5F;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"radix-ng-primitives-roving-focus.mjs","sources":["../../../packages/primitives/roving-focus/src/utils.ts","../../../packages/primitives/roving-focus/src/roving-focus-group.directive.ts","../../../packages/primitives/roving-focus/src/roving-focus-item.directive.ts","../../../packages/primitives/roving-focus/index.ts","../../../packages/primitives/roving-focus/radix-ng-primitives-roving-focus.ts"],"sourcesContent":["export type Orientation = 'horizontal' | 'vertical';\nexport type Direction = 'ltr' | 'rtl';\n\nexport const ENTRY_FOCUS = 'rovingFocusGroup.onEntryFocus';\nexport const EVENT_OPTIONS = { bubbles: false, cancelable: true };\n\ntype FocusIntent = 'first' | 'last' | 'prev' | 'next';\n\nexport const MAP_KEY_TO_FOCUS_INTENT: Record<string, FocusIntent> = {\n ArrowLeft: 'prev',\n ArrowUp: 'prev',\n ArrowRight: 'next',\n ArrowDown: 'next',\n PageUp: 'first',\n Home: 'first',\n PageDown: 'last',\n End: 'last'\n};\n\nexport function getDirectionAwareKey(key: string, dir?: Direction) {\n if (dir !== 'rtl') return key;\n return key === 'ArrowLeft' ? 'ArrowRight' : key === 'ArrowRight' ? 'ArrowLeft' : key;\n}\n\nexport function getFocusIntent(event: KeyboardEvent, orientation?: Orientation, dir?: Direction) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === 'vertical' && ['ArrowLeft', 'ArrowRight'].includes(key)) return undefined;\n if (orientation === 'horizontal' && ['ArrowUp', 'ArrowDown'].includes(key)) return undefined;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\n\nexport function focusFirst(candidates: HTMLElement[], preventScroll = false, rootNode?: Document | ShadowRoot) {\n const PREVIOUSLY_FOCUSED_ELEMENT = rootNode?.activeElement ?? document.activeElement;\n for (const candidate of candidates) {\n // if focus is already where we want to go, we don't want to keep going through the candidates\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\n\n/**\n * Wraps an array around itself at a given start index\n * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`\n */\nexport function wrapArray<T>(array: T[], startIndex: number) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\n\n/**\n * Sorts elements by their position in the document, so the order matches what the user sees.\n */\nexport function sortByDocumentPosition(elements: HTMLElement[]): HTMLElement[] {\n return [...elements].sort((a, b) => (a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1));\n}\n\nlet idCounter = 0;\n\nexport function generateId(): string {\n return `rf-item-${++idCounter}`;\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n booleanAttribute,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n linkedSignal,\n model,\n output,\n PLATFORM_ID,\n signal\n} from '@angular/core';\nimport { BooleanInput, createContext } from '@radix-ng/primitives/core';\nimport { Direction, ENTRY_FOCUS, EVENT_OPTIONS, focusFirst, Orientation, sortByDocumentPosition } from './utils';\n\nconst rootContext = () => {\n const rovingFocusGroup = inject(RdxRovingFocusGroupDirective);\n return {\n loop: rovingFocusGroup.loop,\n dir: rovingFocusGroup.dir,\n orientation: rovingFocusGroup.orientation,\n currentTabStopId: rovingFocusGroup.currentTabStopId,\n focusableItems: rovingFocusGroup.focusableItems,\n onItemFocus: (tabStopId: string) => {\n rovingFocusGroup.currentTabStopId.set(tabStopId);\n },\n onItemShiftTab: () => {\n rovingFocusGroup.isTabbingBackOut.set(true);\n },\n registerItem: (item: HTMLElement, tabStopId: string) => rovingFocusGroup.registerItem(item, tabStopId),\n unregisterItem: (item: HTMLElement, tabStopId: string) => rovingFocusGroup.unregisterItem(item, tabStopId)\n };\n};\n\nexport type RovingFocusGroupContext = ReturnType<typeof rootContext>;\n\nexport const [injectRovingFocusGroupContext, provideRovingFocusGroupContext] =\n createContext<RovingFocusGroupContext>('RovingFocusGroupContext');\n\n/**\n * @group Components\n */\n@Directive({\n selector: '[rdxRovingFocusGroup]',\n providers: [provideRovingFocusGroupContext(rootContext)],\n host: {\n '[attr.data-orientation]': 'orientation()',\n '[attr.tabindex]': 'isTabbingBackOut() || focusableItems().length === 0 ? -1 : 0',\n '[attr.dir]': 'dir()',\n '(focus)': 'handleFocus($event)',\n '(focusout)': 'isTabbingBackOut.set(false)',\n '(mouseup)': 'handleMouseUp()',\n '(mousedown)': 'isClickFocus.set(true)'\n }\n})\nexport class RdxRovingFocusGroupDirective {\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly elementRef = inject(ElementRef);\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * The orientation of the group. Mainly so arrow navigation is done accordingly (left & right vs. up & down)\n */\n readonly orientationInput = input<Orientation>('horizontal', { alias: 'orientation' });\n\n /**\n * The direction of navigation between items.\n */\n readonly dirInput = input<Direction>('ltr', { alias: 'dir' });\n\n /**\n * Whether keyboard navigation should loop around\n */\n readonly loopInput = input<boolean, BooleanInput>(true, { transform: booleanAttribute, alias: 'loop' });\n\n /**\n * When `true`, will prevent scrolling to the focus item when focused.\n * @group Props\n */\n readonly preventScrollOnEntryFocus = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * The value of the current stop item.\n *\n * Use when you do not need to control the state of the stop item.\n * @group Props\n */\n readonly defaultCurrentTabStopId = input<string | undefined>(undefined);\n\n /**\n * The controlled value of the current stop item. Can be binded as `model`.\n * @group Props\n */\n readonly currentTabStopId = model<string | undefined>(undefined);\n\n /**\n * Event handler called when container is being focused. Can be prevented.\n * @group Emits\n */\n readonly entryFocus = output<Event>();\n\n private readonly _orientation = linkedSignal(() => this.orientationInput());\n readonly orientation = this._orientation.asReadonly();\n\n private readonly _dir = linkedSignal(() => this.dirInput());\n readonly dir = this._dir.asReadonly();\n\n private readonly _loop = linkedSignal(() => this.loopInput());\n readonly loop = this._loop.asReadonly();\n\n readonly focusableItems = signal<HTMLElement[]>([]);\n protected readonly isClickFocus = signal(false);\n readonly isTabbingBackOut = signal(false);\n private readonly itemIds = new WeakMap<HTMLElement, string>();\n private isDestroyed = false;\n\n constructor() {\n this.destroyRef.onDestroy(() => {\n this.isDestroyed = true;\n });\n\n effect(() => {\n if (this.currentTabStopId() === undefined) {\n const def = this.defaultCurrentTabStopId();\n if (def !== undefined) {\n this.currentTabStopId.set(def);\n }\n }\n });\n }\n\n setOrientation(value: Orientation) {\n this._orientation.set(value);\n }\n\n setDir(value: Direction) {\n this._dir.set(value);\n }\n\n setLoop(value: boolean) {\n this._loop.set(value);\n }\n\n /** @ignore */\n registerItem(item: HTMLElement, tabStopId: string) {\n this.itemIds.set(item, tabStopId);\n // Keep the registry in DOM order, so arrow navigation matches the visual order\n // regardless of the order in which items are created/registered.\n this.focusableItems.update((items) => sortByDocumentPosition([...items, item]));\n }\n\n /** @ignore */\n unregisterItem(item: HTMLElement, tabStopId: string) {\n const remainingItems = this.focusableItems().filter((el) => el !== item);\n\n this.focusableItems.set(remainingItems);\n this.itemIds.delete(item);\n\n if (!this.isDestroyed && this.currentTabStopId() === tabStopId) {\n this.currentTabStopId.set(this.itemIds.get(remainingItems[0]));\n }\n }\n\n /** @ignore */\n handleMouseUp() {\n if (!this.isBrowser) return;\n\n // reset `isClickFocus` after 1 tick because handleFocus might not triggered due to focused element\n requestAnimationFrame(() => {\n this.isClickFocus.set(false);\n });\n }\n\n /** @ignore */\n handleFocus(event: Event) {\n // We normally wouldn't need this check, because we already check\n // that the focus is on the current target and not bubbling to it.\n // We do this because Safari doesn't focus buttons when clicked, and\n // instead, the wrapper will get focused and not through a bubbling event.\n const isKeyboardFocus = !this.isClickFocus();\n\n if (\n event.currentTarget === this.elementRef.nativeElement &&\n event.target === event.currentTarget &&\n isKeyboardFocus &&\n !this.isTabbingBackOut()\n ) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n this.elementRef.nativeElement.dispatchEvent(entryFocusEvent);\n this.entryFocus.emit(entryFocusEvent);\n\n if (!entryFocusEvent.defaultPrevented) {\n const items = this.focusableItems().filter((item) => item.dataset['disabled'] !== '');\n const activeItem = items.find((item) => item.getAttribute('data-active') === 'true');\n // The current tab stop is the only item with `tabindex=\"0\"` (driven by\n // `currentTabStopId`). We match on it instead of the DOM `id`, because consumers\n // (tabs, navigation-menu) own the element `id` and it may not equal the internal id.\n const currentItem = items.find((item) => item.getAttribute('tabindex') === '0');\n\n const candidateItems = [activeItem, currentItem, ...items].filter(Boolean) as typeof items;\n\n focusFirst(candidateItems, this.preventScrollOnEntryFocus());\n }\n }\n\n this.isClickFocus.set(false);\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n booleanAttribute,\n computed,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n linkedSignal,\n PLATFORM_ID,\n untracked\n} from '@angular/core';\nimport { BooleanInput } from '@radix-ng/primitives/core';\nimport { injectRovingFocusGroupContext } from './roving-focus-group.directive';\nimport { focusFirst, generateId, getFocusIntent, wrapArray } from './utils';\n\n/**\n * @group Components\n */\n@Directive({\n selector: '[rdxRovingFocusItem]',\n host: {\n '[attr.tabindex]': 'tabindex()',\n '[attr.data-orientation]': 'rootContext?.orientation()',\n '[attr.data-active]': 'active() ? \"true\" : undefined',\n '[attr.data-disabled]': '!focusable() ? \"\" : undefined',\n '(mousedown)': 'handleMouseDown($event)',\n '(keydown)': 'handleKeydown($event)',\n '(focus)': 'onFocus()'\n }\n})\nexport class RdxRovingFocusItemDirective {\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly elementRef = inject(ElementRef);\n\n /**\n * The enclosing roving-focus group. Optional: when the item is used outside a group\n * (e.g. a standalone Toggle), it degrades to a plain element and does not manage focus.\n */\n protected readonly rootContext = injectRovingFocusGroupContext(true);\n\n /**\n * When false, item will not be focusable.\n * @group Props\n */\n readonly focusableInput = input<boolean, BooleanInput>(true, { transform: booleanAttribute, alias: 'focusable' });\n\n /**\n * When `true`, marks the item as the active one, so it is preferred when focus enters the group.\n * @group Props\n */\n readonly activeInput = input<boolean, BooleanInput>(false, { transform: booleanAttribute, alias: 'active' });\n\n /**\n * @group Props\n */\n readonly tabStopIdInput = input<string>(undefined, { alias: 'tabStopId' });\n\n /**\n * When true, shift + arrow key will allow focusing on next/previous item.\n * @group Props\n */\n readonly allowShiftKey = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n // Stable fallback id, generated once so it never changes across recomputations of `id`.\n private readonly generatedId = generateId();\n protected readonly id = computed(() => this.tabStopId() || this.generatedId);\n protected readonly isCurrentTabStop = computed(() => this.rootContext?.currentTabStopId() === this.id());\n\n protected readonly focusable = linkedSignal(() => this.focusableInput());\n protected readonly active = linkedSignal(() => this.activeInput());\n private readonly tabStopId = linkedSignal(() => this.tabStopIdInput());\n\n /**\n * The roving tabindex. Without a group the item keeps its natural tab order (`null`); inside a\n * group exactly one focusable item is a tab stop (`0`), the rest are reachable only via arrows (`-1`).\n */\n protected readonly tabindex = computed(() => {\n if (!this.rootContext) {\n return null;\n }\n return this.focusable() && this.isCurrentTabStop() ? 0 : -1;\n });\n\n constructor() {\n // Keep the group's registry in sync with `focusable`, which can change after creation\n // (e.g. toolbar/navigation-menu toggle it via `setFocusable`). The cleanup also runs on\n // destroy, so a single effect covers register/unregister for the whole lifecycle.\n effect((onCleanup) => {\n const rootContext = this.rootContext;\n if (!rootContext || !this.focusable()) return;\n\n const element = this.elementRef.nativeElement;\n // `registerItem` reads and writes the group's `focusableItems` signal; calling it\n // untracked prevents the effect from depending on its own write and looping.\n const tabStopId = this.id();\n untracked(() => rootContext.registerItem(element, tabStopId));\n\n onCleanup(() => rootContext.unregisterItem(element, tabStopId));\n });\n }\n\n setFocusable(value: boolean) {\n this.focusable.set(value);\n }\n\n setActive(value: boolean) {\n this.active.set(value);\n }\n\n setTabStopId(value: string) {\n this.tabStopId.set(value);\n }\n\n /** @ignore */\n onFocus() {\n this.rootContext?.onItemFocus(this.id());\n }\n\n /** @ignore */\n handleMouseDown(event: Event) {\n if (!this.focusable()) {\n // We prevent focusing non-focusable items on `mousedown`.\n // Even though the item has tabIndex={-1}, that only means take it out of the tab order.\n event.preventDefault();\n } else {\n // Safari doesn't focus a button when clicked so we run our logic on mousedown also\n this.rootContext?.onItemFocus(this.id());\n }\n }\n\n /**\n * Handles the `keydown` event for keyboard navigation within the roving focus group.\n * Supports navigation based on orientation and direction, and focuses appropriate elements.\n *\n * @param event The `KeyboardEvent` object.\n * @ignore\n */\n handleKeydown(event: Event) {\n const rootContext = this.rootContext;\n if (!rootContext) return;\n\n const keyEvent = event as KeyboardEvent;\n if (keyEvent.key === 'Tab' && keyEvent.shiftKey) {\n rootContext.onItemShiftTab();\n return;\n }\n\n if (event.target !== this.elementRef.nativeElement) return;\n\n const focusIntent = getFocusIntent(keyEvent, rootContext.orientation(), rootContext.dir());\n\n if (focusIntent !== undefined) {\n if (\n keyEvent.metaKey ||\n keyEvent.ctrlKey ||\n keyEvent.altKey ||\n (this.allowShiftKey() ? false : keyEvent.shiftKey)\n ) {\n return;\n }\n\n event.preventDefault();\n\n let candidateNodes = rootContext.focusableItems().filter((item) => item.dataset['disabled'] !== '');\n\n if (focusIntent === 'last') {\n candidateNodes.reverse();\n } else if (focusIntent === 'prev' || focusIntent === 'next') {\n if (focusIntent === 'prev') candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(this.elementRef.nativeElement);\n\n candidateNodes = rootContext.loop()\n ? wrapArray(candidateNodes, currentIndex + 1)\n : candidateNodes.slice(currentIndex + 1);\n }\n\n queueMicrotask(() => {\n if (this.isBrowser) {\n const rootNode = this.elementRef.nativeElement.getRootNode() as Document | ShadowRoot;\n focusFirst(candidateNodes, false, rootNode);\n }\n });\n }\n }\n}\n","import { RdxRovingFocusGroupDirective } from './src/roving-focus-group.directive';\nimport { RdxRovingFocusItemDirective } from './src/roving-focus-item.directive';\n\nexport * from './src/roving-focus-group.directive';\nexport * from './src/roving-focus-item.directive';\n\nexport { focusFirst } from './src/utils';\nexport type { Direction, Orientation } from './src/utils';\n\nexport const rovingFocusImports = [RdxRovingFocusGroupDirective, RdxRovingFocusItemDirective];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGO,MAAM,WAAW,GAAG,+BAA+B;AACnD,MAAM,aAAa,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;AAI1D,MAAM,uBAAuB,GAAgC;AAChE,IAAA,SAAS,EAAE,MAAM;AACjB,IAAA,OAAO,EAAE,MAAM;AACf,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,SAAS,EAAE,MAAM;AACjB,IAAA,MAAM,EAAE,OAAO;AACf,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,QAAQ,EAAE,MAAM;AAChB,IAAA,GAAG,EAAE;CACR;AAEK,SAAU,oBAAoB,CAAC,GAAW,EAAE,GAAe,EAAA;IAC7D,IAAI,GAAG,KAAK,KAAK;AAAE,QAAA,OA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