@radix-ng/primitives 1.0.0-beta.4 → 1.0.1
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/composite/README.md +3 -0
- package/fesm2022/radix-ng-primitives-accordion.mjs +12 -36
- package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-checkbox.mjs +33 -18
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-composite.mjs +515 -0
- package/fesm2022/radix-ng-primitives-composite.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-core.mjs +7 -0
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dialog.mjs +54 -12
- package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-drawer.mjs +442 -2
- package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-editable.mjs +12 -7
- package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs +294 -8
- package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-focus-scope.mjs +9 -0
- package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menu.mjs +71 -20
- package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menubar.mjs +68 -36
- package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs +281 -88
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-number-field.mjs +7 -2
- package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popover.mjs +117 -35
- package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popper.mjs +73 -65
- package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +77 -36
- package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-roving-focus.mjs +40 -8
- package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-scroll-area.mjs +56 -25
- package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-select.mjs +62 -37
- package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-slider.mjs +259 -28
- package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-stepper.mjs +11 -7
- package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +10 -5
- package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tabs.mjs +64 -30
- package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +69 -19
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +37 -13
- package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toolbar.mjs +50 -24
- package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tooltip.mjs +180 -35
- package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
- package/navigation-menu/README.md +5 -2
- package/package.json +5 -1
- package/types/radix-ng-primitives-accordion.d.ts +9 -13
- package/types/radix-ng-primitives-checkbox.d.ts +27 -15
- package/types/radix-ng-primitives-composite.d.ts +152 -0
- package/types/radix-ng-primitives-core.d.ts +2 -0
- package/types/radix-ng-primitives-dialog.d.ts +13 -2
- package/types/radix-ng-primitives-drawer.d.ts +40 -2
- package/types/radix-ng-primitives-editable.d.ts +11 -5
- package/types/radix-ng-primitives-floating-focus-manager.d.ts +113 -16
- package/types/radix-ng-primitives-menu.d.ts +13 -5
- package/types/radix-ng-primitives-menubar.d.ts +10 -5
- package/types/radix-ng-primitives-navigation-menu.d.ts +65 -33
- package/types/radix-ng-primitives-number-field.d.ts +8 -3
- package/types/radix-ng-primitives-popover.d.ts +26 -10
- package/types/radix-ng-primitives-popper.d.ts +1 -0
- package/types/radix-ng-primitives-radio.d.ts +22 -13
- package/types/radix-ng-primitives-roving-focus.d.ts +15 -1
- package/types/radix-ng-primitives-scroll-area.d.ts +4 -1
- package/types/radix-ng-primitives-select.d.ts +16 -20
- package/types/radix-ng-primitives-slider.d.ts +60 -9
- package/types/radix-ng-primitives-stepper.d.ts +11 -4
- package/types/radix-ng-primitives-switch.d.ts +10 -4
- package/types/radix-ng-primitives-tabs.d.ts +20 -11
- package/types/radix-ng-primitives-toggle-group.d.ts +34 -17
- package/types/radix-ng-primitives-toggle.d.ts +14 -7
- package/types/radix-ng-primitives-toolbar.d.ts +22 -14
- package/types/radix-ng-primitives-tooltip.d.ts +38 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radix-ng-primitives-stepper.mjs","sources":["../../../packages/primitives/stepper/src/stepper-item-context.token.ts","../../../packages/primitives/stepper/src/stepper-description.directive.ts","../../../packages/primitives/stepper/src/stepper-indicator.directive.ts","../../../packages/primitives/stepper/src/stepper-root-context.token.ts","../../../packages/primitives/stepper/src/stepper-item.directive.ts","../../../packages/primitives/stepper/src/stepper-root.directive.ts","../../../packages/primitives/stepper/src/stepper-separator.directive.ts","../../../packages/primitives/stepper/src/stepper-title.directive.ts","../../../packages/primitives/stepper/src/stepper-trigger.directive.ts","../../../packages/primitives/stepper/index.ts","../../../packages/primitives/stepper/radix-ng-primitives-stepper.ts"],"sourcesContent":["import { inject, InjectionToken, InputSignalWithTransform, Signal } from '@angular/core';\nimport { BooleanInput, NumberInput } from '@radix-ng/primitives/core';\nimport { StepperState } from './types';\n\nexport interface StepperItemContext {\n titleId: string;\n descriptionId: string;\n step: InputSignalWithTransform<number, NumberInput>;\n disabled: InputSignalWithTransform<boolean, BooleanInput>;\n isFocusable: Signal<boolean>;\n itemState: Signal<StepperState>;\n}\n\nexport const STEPPER_ITEM_CONTEXT = new InjectionToken<StepperItemContext>('StepperItemContext');\n\nexport function injectStepperItemContext(): StepperItemContext {\n return inject(STEPPER_ITEM_CONTEXT);\n}\n","import { Directive } from '@angular/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\n\n@Directive({\n selector: '[rdxStepperDescription]',\n host: {\n '[attr.id]': 'itemContext.descriptionId'\n }\n})\nexport class RdxStepperDescriptionDirective {\n readonly itemContext = injectStepperItemContext();\n}\n","import { Directive } from '@angular/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\n\n@Directive({\n selector: '[rdxStepperIndicator]',\n exportAs: 'rdxStepperIndicator'\n})\nexport class RdxStepperIndicatorDirective {\n readonly itemContext = injectStepperItemContext();\n}\n","import {\n inject,\n InjectionToken,\n InputSignal,\n InputSignalWithTransform,\n ModelSignal,\n Signal,\n WritableSignal\n} from '@angular/core';\nimport { BooleanInput, Direction } from '@radix-ng/primitives/core';\n\nexport interface StepperRootContext {\n value: ModelSignal<number | undefined>;\n orientation: InputSignal<'vertical' | 'horizontal'>;\n dir: Signal<Direction>;\n linear: InputSignalWithTransform<boolean, BooleanInput>;\n totalStepperItems: WritableSignal<HTMLElement[]>;\n}\n\nexport const STEPPER_ROOT_CONTEXT = new InjectionToken<StepperRootContext>('StepperRootContext');\n\nexport function injectStepperRootContext(): StepperRootContext {\n return inject(STEPPER_ROOT_CONTEXT);\n}\n","import { booleanAttribute, computed, Directive, forwardRef, input, numberAttribute } from '@angular/core';\nimport { BooleanInput, injectId, NumberInput } from '@radix-ng/primitives/core';\nimport { STEPPER_ITEM_CONTEXT, StepperItemContext } from './stepper-item-context.token';\nimport { injectStepperRootContext } from './stepper-root-context.token';\nimport { StepperState } from './types';\n\n@Directive({\n selector: '[rdxStepperItem]',\n providers: [\n {\n provide: STEPPER_ITEM_CONTEXT,\n useExisting: forwardRef(() => RdxStepperItemDirective)\n }\n ],\n host: {\n '[attr.aria-current]': 'itemState() === \"active\" ? true : undefined',\n\n '[attr.data-state]': 'itemState()',\n '[attr.disabled]': 'disabled() || !isFocusable() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabled() || !isFocusable() ? \"\" : undefined',\n '[attr.data-orientation]': 'rootContext.orientation()'\n }\n})\nexport class RdxStepperItemDirective implements StepperItemContext {\n protected readonly rootContext = injectStepperRootContext();\n\n /** @ignore */\n readonly titleId = injectId('rdx-stepper-item-title');\n\n /** @ignore */\n readonly descriptionId = injectId('rdx-stepper-item-description');\n\n readonly step = input<number, NumberInput>(NaN, { transform: numberAttribute });\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** @ignore */\n readonly completed = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** @ignore */\n readonly itemState = computed<StepperState>(() => {\n if (this.completed()) return 'completed';\n if (this.rootContext.value() === this.step()) return 'active';\n\n const step = this.step() ?? 1;\n if (this.rootContext.value()! > step) {\n return 'completed';\n }\n\n return 'inactive';\n });\n\n /** @ignore */\n readonly isFocusable = computed(() => {\n if (this.disabled()) return false;\n\n const step = this.step() ?? 1;\n if (this.rootContext.linear()) {\n return step <= this.rootContext.value()! || step === this.rootContext.value()! + 1;\n }\n\n return true;\n });\n}\n","import {\n booleanAttribute,\n computed,\n Directive,\n effect,\n forwardRef,\n inject,\n input,\n model,\n numberAttribute,\n output,\n signal\n} from '@angular/core';\nimport { BooleanInput, Direction, NumberInput, RdxLiveAnnouncer } from '@radix-ng/primitives/core';\nimport { injectDirection } from '@radix-ng/primitives/direction-provider';\nimport { STEPPER_ROOT_CONTEXT, StepperRootContext } from './stepper-root-context.token';\n\n@Directive({\n selector: '[rdxStepperRoot]',\n exportAs: 'rdxStepperRoot',\n providers: [\n {\n provide: STEPPER_ROOT_CONTEXT,\n useExisting: forwardRef(() => RdxStepperRootDirective)\n }\n ],\n host: {\n role: 'group',\n '[attr.aria-label]': '\"progress\"',\n '[attr.data-linear]': 'linear() ? \"\" : undefined',\n '[attr.data-orientation]': 'orientation()'\n }\n})\nexport class RdxStepperRootDirective implements StepperRootContext {\n private readonly liveAnnouncer = inject(RdxLiveAnnouncer);\n\n readonly defaultValue = input<number, NumberInput>(undefined, { transform: numberAttribute });\n\n readonly value = model<number | undefined>(this.defaultValue());\n\n readonly linear = input<boolean, BooleanInput>(true, { transform: booleanAttribute });\n\n readonly dirInput = input<Direction | undefined>(undefined, { alias: 'dir' });\n readonly dir = injectDirection(this.dirInput);\n\n readonly orientation = input<'vertical' | 'horizontal'>('horizontal');\n\n /** @ignore */\n readonly totalStepperItemsArray = computed(() => Array.from(this.totalStepperItems()));\n\n readonly onValueChange = output<number>();\n\n /** @ignore */\n readonly isFirstStep = computed(() => this.value() === 1);\n\n /** @ignore */\n readonly isLastStep = computed(() => this.value() === this.totalStepperItemsArray().length);\n\n /** @ignore */\n readonly totalSteps = computed(() => this.totalStepperItems().length);\n\n /** @ignore */\n readonly isNextDisabled = computed<boolean>(() => {\n const item = this.nextStepperItem();\n return item ? item.hasAttribute('disabled') : true;\n });\n\n /** @ignore */\n readonly isPrevDisabled = computed<boolean>(() => {\n const item = this.prevStepperItem();\n return item ? item.hasAttribute('disabled') : true;\n });\n\n /** @ignore */\n readonly totalStepperItems = signal<HTMLElement[]>([]);\n\n private readonly nextStepperItem = signal<HTMLElement | null>(null);\n private readonly prevStepperItem = signal<HTMLElement | null>(null);\n\n constructor() {\n effect(() => {\n const items = this.totalStepperItemsArray();\n const currentValue = this.value();\n\n if (currentValue) {\n if (items.length && currentValue < items.length) {\n this.nextStepperItem.set(items[currentValue]);\n } else {\n this.nextStepperItem.set(null);\n }\n\n if (items.length && currentValue > 1) {\n this.prevStepperItem.set(items[currentValue - 2]);\n } else {\n this.prevStepperItem.set(null);\n }\n\n this.onValueChange.emit(currentValue);\n this.liveAnnouncer.announce(`Step ${currentValue} of ${items.length}`);\n }\n });\n }\n\n goToStep(step: number) {\n if (step > this.totalSteps()) {\n return;\n }\n\n if (step < 1) {\n return;\n }\n\n if (\n this.totalStepperItems().length &&\n !!this.totalStepperItemsArray()[step] &&\n this.totalStepperItemsArray()[step].hasAttribute('disabled')\n ) {\n return;\n }\n\n if (this.linear()) {\n const currentValue = this.value() ?? 1;\n if (step > currentValue + 1) {\n return;\n }\n }\n this.value.set(step);\n this.onValueChange.emit(step);\n }\n}\n","import { Directive, effect, inject } from '@angular/core';\nimport { RdxSeparatorRootDirective } from '@radix-ng/primitives/separator';\nimport { injectStepperItemContext } from './stepper-item-context.token';\nimport { injectStepperRootContext } from './stepper-root-context.token';\n\n@Directive({\n selector: '[rdxStepperSeparator]',\n hostDirectives: [{ directive: RdxSeparatorRootDirective, inputs: ['orientation'] }],\n host: {\n '[attr.data-state]': 'itemContext.itemState()'\n }\n})\nexport class RdxStepperSeparatorDirective {\n protected readonly rootContext = injectStepperRootContext();\n protected readonly itemContext = injectStepperItemContext();\n\n private readonly rdxSeparator = inject(RdxSeparatorRootDirective, { host: true });\n\n constructor() {\n effect(() => {\n this.rdxSeparator.updateOrientation(this.rootContext.orientation());\n });\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\n\n@Directive({\n selector: '[rdxStepperTitle]',\n host: {\n '[attr.id]': 'itemContext.titleId'\n }\n})\nexport class RdxStepperTitleDirective {\n readonly itemContext = injectStepperItemContext();\n}\n","import { computed, DestroyRef, Directive, ElementRef, inject } from '@angular/core';\nimport * as kbd from '@radix-ng/primitives/core';\nimport { getActiveElement, useArrowNavigation } from '@radix-ng/primitives/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\nimport { injectStepperRootContext } from './stepper-root-context.token';\n\n// as button\n@Directive({\n selector: 'button[rdxStepperTrigger]',\n host: {\n '[attr.tabindex]': 'itemContext.isFocusable() ? 0 : -1',\n '[attr.aria-describedby]': 'itemContext.descriptionId',\n '[attr.aria-labelledby]': 'itemContext.titleId',\n\n '[attr.data-state]': 'itemContext.itemState()',\n '[attr.data-orientation]': 'rootContext.orientation()',\n '[attr.disabled]': 'itemContext.disabled() || !itemContext.isFocusable() ? \"\" : undefined',\n '[attr.data-disabled]': 'itemContext.disabled() || !itemContext.isFocusable() ? \"\" : undefined',\n\n '(mousedown)': 'handleMouseDown($event)',\n\n '(keydown.Enter)': 'handleKeyDown($event)',\n '(keydown.Space)': 'handleKeyDown($event)',\n '(keydown.ArrowLeft)': 'handleKeyDown($event)',\n '(keydown.ArrowRight)': 'handleKeyDown($event)',\n '(keydown.ArrowUp)': 'handleKeyDown($event)',\n '(keydown.ArrowDown)': 'handleKeyDown($event)'\n }\n})\nexport class RdxStepperTriggerDirective {\n protected readonly rootContext = injectStepperRootContext();\n protected readonly itemContext = injectStepperItemContext();\n\n private readonly elementRef = inject(ElementRef);\n\n readonly stepperItems = computed(() => Array.from(this.rootContext.totalStepperItems()));\n\n constructor() {\n // Register/deregister this trigger's host element with the root, in DOM order.\n const element = this.elementRef.nativeElement;\n this.rootContext.totalStepperItems.set([...this.rootContext.totalStepperItems(), element]);\n\n inject(DestroyRef).onDestroy(() => {\n const updated = this.rootContext.totalStepperItems().filter((el: HTMLElement) => el !== element);\n\n this.rootContext.totalStepperItems.set(updated);\n });\n }\n\n handleMouseDown(event: Event) {\n const mouseEvent = event as MouseEvent;\n if (this.itemContext.disabled()) {\n return;\n }\n\n // handler only left mouse click\n if (mouseEvent.button !== 0) {\n return;\n }\n\n if (this.rootContext.linear()) {\n if (\n this.itemContext.step() <= this.rootContext.value()! ||\n this.itemContext.step() === this.rootContext.value()! + 1\n ) {\n if (!mouseEvent.ctrlKey) {\n this.rootContext.value.set(this.itemContext.step());\n return;\n }\n }\n } else {\n if (!mouseEvent.ctrlKey) {\n this.rootContext.value.set(this.itemContext.step());\n return;\n }\n }\n\n // prevent focus to avoid accidental activation\n event.preventDefault();\n }\n\n handleKeyDown(event: Event) {\n const keyEvent = event as KeyboardEvent;\n event.preventDefault();\n\n if (this.itemContext.disabled()) {\n return;\n }\n\n if ((keyEvent.key === kbd.ENTER || keyEvent.key === kbd.SPACE) && !keyEvent.ctrlKey && !keyEvent.shiftKey)\n this.rootContext.value.set(this.itemContext.step());\n\n if ([kbd.ARROW_LEFT, kbd.ARROW_RIGHT, kbd.ARROW_UP, kbd.ARROW_DOWN].includes(keyEvent.key)) {\n useArrowNavigation(keyEvent, getActiveElement() as HTMLElement, undefined, {\n itemsArray: this.stepperItems(),\n focus: true,\n loop: false,\n arrowKeyOptions: this.rootContext.orientation(),\n dir: this.rootContext.dir()\n });\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RdxStepperDescriptionDirective } from './src/stepper-description.directive';\nimport { RdxStepperIndicatorDirective } from './src/stepper-indicator.directive';\nimport { RdxStepperItemDirective } from './src/stepper-item.directive';\nimport { RdxStepperRootDirective } from './src/stepper-root.directive';\nimport { RdxStepperSeparatorDirective } from './src/stepper-separator.directive';\nimport { RdxStepperTitleDirective } from './src/stepper-title.directive';\nimport { RdxStepperTriggerDirective } from './src/stepper-trigger.directive';\n\nexport * from './src/stepper-description.directive';\nexport * from './src/stepper-indicator.directive';\nexport * from './src/stepper-item.directive';\nexport * from './src/stepper-root-context.token';\nexport * from './src/stepper-root.directive';\nexport * from './src/stepper-separator.directive';\nexport * from './src/stepper-title.directive';\nexport * from './src/stepper-trigger.directive';\nexport * from './src/types';\n\nconst _imports = [\n RdxStepperDescriptionDirective,\n RdxStepperTitleDirective,\n RdxStepperSeparatorDirective,\n RdxStepperItemDirective,\n RdxStepperIndicatorDirective,\n RdxStepperRootDirective,\n RdxStepperTriggerDirective\n];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class Rdx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A;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC;AACtB,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ;AACxB,iBAAA;;;AChCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"radix-ng-primitives-stepper.mjs","sources":["../../../packages/primitives/stepper/src/stepper-item-context.token.ts","../../../packages/primitives/stepper/src/stepper-description.directive.ts","../../../packages/primitives/stepper/src/stepper-indicator.directive.ts","../../../packages/primitives/stepper/src/stepper-root-context.token.ts","../../../packages/primitives/stepper/src/stepper-item.directive.ts","../../../packages/primitives/stepper/src/stepper-root.directive.ts","../../../packages/primitives/stepper/src/stepper-separator.directive.ts","../../../packages/primitives/stepper/src/stepper-title.directive.ts","../../../packages/primitives/stepper/src/stepper-trigger.directive.ts","../../../packages/primitives/stepper/index.ts","../../../packages/primitives/stepper/radix-ng-primitives-stepper.ts"],"sourcesContent":["import { inject, InjectionToken, InputSignalWithTransform, Signal } from '@angular/core';\nimport { BooleanInput, NumberInput } from '@radix-ng/primitives/core';\nimport { StepperState } from './types';\n\nexport interface StepperItemContext {\n titleId: string;\n descriptionId: string;\n step: InputSignalWithTransform<number, NumberInput>;\n disabled: InputSignalWithTransform<boolean, BooleanInput>;\n isFocusable: Signal<boolean>;\n itemState: Signal<StepperState>;\n}\n\nexport const STEPPER_ITEM_CONTEXT = new InjectionToken<StepperItemContext>('StepperItemContext');\n\nexport function injectStepperItemContext(): StepperItemContext {\n return inject(STEPPER_ITEM_CONTEXT);\n}\n","import { Directive } from '@angular/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\n\n@Directive({\n selector: '[rdxStepperDescription]',\n host: {\n '[attr.id]': 'itemContext.descriptionId'\n }\n})\nexport class RdxStepperDescriptionDirective {\n readonly itemContext = injectStepperItemContext();\n}\n","import { Directive } from '@angular/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\n\n@Directive({\n selector: '[rdxStepperIndicator]',\n exportAs: 'rdxStepperIndicator'\n})\nexport class RdxStepperIndicatorDirective {\n readonly itemContext = injectStepperItemContext();\n}\n","import {\n inject,\n InjectionToken,\n InputSignal,\n InputSignalWithTransform,\n ModelSignal,\n Signal,\n WritableSignal\n} from '@angular/core';\nimport { BooleanInput, Direction } from '@radix-ng/primitives/core';\n\nexport interface StepperRootContext {\n value: ModelSignal<number | undefined>;\n orientation: InputSignal<'vertical' | 'horizontal'>;\n dir: Signal<Direction>;\n linear: InputSignalWithTransform<boolean, BooleanInput>;\n totalStepperItems: WritableSignal<HTMLElement[]>;\n goToStep(step: number, event?: Event, reason?: string): void;\n}\n\nexport const STEPPER_ROOT_CONTEXT = new InjectionToken<StepperRootContext>('StepperRootContext');\n\nexport function injectStepperRootContext(): StepperRootContext {\n return inject(STEPPER_ROOT_CONTEXT);\n}\n","import { booleanAttribute, computed, Directive, forwardRef, input, numberAttribute } from '@angular/core';\nimport { BooleanInput, injectId, NumberInput } from '@radix-ng/primitives/core';\nimport { STEPPER_ITEM_CONTEXT, StepperItemContext } from './stepper-item-context.token';\nimport { injectStepperRootContext } from './stepper-root-context.token';\nimport { StepperState } from './types';\n\n@Directive({\n selector: '[rdxStepperItem]',\n providers: [\n {\n provide: STEPPER_ITEM_CONTEXT,\n useExisting: forwardRef(() => RdxStepperItemDirective)\n }\n ],\n host: {\n '[attr.aria-current]': 'itemState() === \"active\" ? true : undefined',\n\n '[attr.data-state]': 'itemState()',\n '[attr.disabled]': 'disabled() || !isFocusable() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabled() || !isFocusable() ? \"\" : undefined',\n '[attr.data-orientation]': 'rootContext.orientation()'\n }\n})\nexport class RdxStepperItemDirective implements StepperItemContext {\n protected readonly rootContext = injectStepperRootContext();\n\n /** @ignore */\n readonly titleId = injectId('rdx-stepper-item-title');\n\n /** @ignore */\n readonly descriptionId = injectId('rdx-stepper-item-description');\n\n readonly step = input<number, NumberInput>(NaN, { transform: numberAttribute });\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** @ignore */\n readonly completed = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** @ignore */\n readonly itemState = computed<StepperState>(() => {\n if (this.completed()) return 'completed';\n if (this.rootContext.value() === this.step()) return 'active';\n\n const step = this.step() ?? 1;\n if (this.rootContext.value()! > step) {\n return 'completed';\n }\n\n return 'inactive';\n });\n\n /** @ignore */\n readonly isFocusable = computed(() => {\n if (this.disabled()) return false;\n\n const step = this.step() ?? 1;\n if (this.rootContext.linear()) {\n return step <= this.rootContext.value()! || step === this.rootContext.value()! + 1;\n }\n\n return true;\n });\n}\n","import {\n booleanAttribute,\n computed,\n Directive,\n effect,\n forwardRef,\n inject,\n input,\n model,\n numberAttribute,\n output,\n signal\n} from '@angular/core';\nimport {\n BooleanInput,\n createCancelableChangeEventDetails,\n Direction,\n NumberInput,\n RdxCancelableChangeEventDetails,\n RdxLiveAnnouncer\n} from '@radix-ng/primitives/core';\nimport { injectDirection } from '@radix-ng/primitives/direction-provider';\nimport { STEPPER_ROOT_CONTEXT, StepperRootContext } from './stepper-root-context.token';\n\nexport type RdxStepperValueChangeReason = 'trigger-press' | 'keyboard' | 'none';\nexport type RdxStepperValueChangeEventDetails = RdxCancelableChangeEventDetails<RdxStepperValueChangeReason>;\n\nexport interface RdxStepperValueChangeEvent {\n value: number;\n eventDetails: RdxStepperValueChangeEventDetails;\n}\n\n@Directive({\n selector: '[rdxStepperRoot]',\n exportAs: 'rdxStepperRoot',\n providers: [\n {\n provide: STEPPER_ROOT_CONTEXT,\n useExisting: forwardRef(() => RdxStepperRootDirective)\n }\n ],\n host: {\n role: 'group',\n '[attr.aria-label]': '\"progress\"',\n '[attr.data-linear]': 'linear() ? \"\" : undefined',\n '[attr.data-orientation]': 'orientation()'\n }\n})\nexport class RdxStepperRootDirective implements StepperRootContext {\n private readonly liveAnnouncer = inject(RdxLiveAnnouncer);\n\n readonly defaultValue = input<number, NumberInput>(undefined, { transform: numberAttribute });\n\n readonly value = model<number | undefined>(this.defaultValue());\n\n readonly linear = input<boolean, BooleanInput>(true, { transform: booleanAttribute });\n\n readonly dirInput = input<Direction | undefined>(undefined, { alias: 'dir' });\n readonly dir = injectDirection(this.dirInput);\n\n readonly orientation = input<'vertical' | 'horizontal'>('horizontal');\n\n /** @ignore */\n readonly totalStepperItemsArray = computed(() => Array.from(this.totalStepperItems()));\n\n readonly onValueChange = output<RdxStepperValueChangeEvent>();\n\n /** @ignore */\n readonly isFirstStep = computed(() => this.value() === 1);\n\n /** @ignore */\n readonly isLastStep = computed(() => this.value() === this.totalStepperItemsArray().length);\n\n /** @ignore */\n readonly totalSteps = computed(() => this.totalStepperItems().length);\n\n /** @ignore */\n readonly isNextDisabled = computed<boolean>(() => {\n const item = this.nextStepperItem();\n return item ? item.hasAttribute('disabled') : true;\n });\n\n /** @ignore */\n readonly isPrevDisabled = computed<boolean>(() => {\n const item = this.prevStepperItem();\n return item ? item.hasAttribute('disabled') : true;\n });\n\n /** @ignore */\n readonly totalStepperItems = signal<HTMLElement[]>([]);\n\n private readonly nextStepperItem = signal<HTMLElement | null>(null);\n private readonly prevStepperItem = signal<HTMLElement | null>(null);\n\n constructor() {\n effect(() => {\n const items = this.totalStepperItemsArray();\n const currentValue = this.value();\n\n if (currentValue) {\n if (items.length && currentValue < items.length) {\n this.nextStepperItem.set(items[currentValue]);\n } else {\n this.nextStepperItem.set(null);\n }\n\n if (items.length && currentValue > 1) {\n this.prevStepperItem.set(items[currentValue - 2]);\n } else {\n this.prevStepperItem.set(null);\n }\n\n this.liveAnnouncer.announce(`Step ${currentValue} of ${items.length}`);\n }\n });\n }\n\n goToStep(step: number, event?: Event, reason: RdxStepperValueChangeReason = event ? 'trigger-press' : 'none') {\n if (step > this.totalSteps()) {\n return;\n }\n\n if (step < 1) {\n return;\n }\n\n if (\n this.totalStepperItems().length &&\n !!this.totalStepperItemsArray()[step] &&\n this.totalStepperItemsArray()[step].hasAttribute('disabled')\n ) {\n return;\n }\n\n if (this.linear()) {\n const currentValue = this.value() ?? 1;\n if (step > currentValue + 1) {\n return;\n }\n }\n\n const trigger = event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined;\n const { eventDetails } = createCancelableChangeEventDetails(\n reason,\n event ?? new Event('stepper.value-change'),\n trigger\n );\n this.onValueChange.emit({ value: step, eventDetails });\n if (eventDetails.isCanceled()) {\n return;\n }\n\n this.value.set(step);\n }\n}\n","import { Directive, effect, inject } from '@angular/core';\nimport { RdxSeparatorRootDirective } from '@radix-ng/primitives/separator';\nimport { injectStepperItemContext } from './stepper-item-context.token';\nimport { injectStepperRootContext } from './stepper-root-context.token';\n\n@Directive({\n selector: '[rdxStepperSeparator]',\n hostDirectives: [{ directive: RdxSeparatorRootDirective, inputs: ['orientation'] }],\n host: {\n '[attr.data-state]': 'itemContext.itemState()'\n }\n})\nexport class RdxStepperSeparatorDirective {\n protected readonly rootContext = injectStepperRootContext();\n protected readonly itemContext = injectStepperItemContext();\n\n private readonly rdxSeparator = inject(RdxSeparatorRootDirective, { host: true });\n\n constructor() {\n effect(() => {\n this.rdxSeparator.updateOrientation(this.rootContext.orientation());\n });\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\n\n@Directive({\n selector: '[rdxStepperTitle]',\n host: {\n '[attr.id]': 'itemContext.titleId'\n }\n})\nexport class RdxStepperTitleDirective {\n readonly itemContext = injectStepperItemContext();\n}\n","import { computed, DestroyRef, Directive, ElementRef, inject } from '@angular/core';\nimport * as kbd from '@radix-ng/primitives/core';\nimport { getActiveElement, useArrowNavigation } from '@radix-ng/primitives/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\nimport { injectStepperRootContext } from './stepper-root-context.token';\n\n// as button\n@Directive({\n selector: 'button[rdxStepperTrigger]',\n host: {\n '[attr.tabindex]': 'itemContext.isFocusable() ? 0 : -1',\n '[attr.aria-describedby]': 'itemContext.descriptionId',\n '[attr.aria-labelledby]': 'itemContext.titleId',\n\n '[attr.data-state]': 'itemContext.itemState()',\n '[attr.data-orientation]': 'rootContext.orientation()',\n '[attr.disabled]': 'itemContext.disabled() || !itemContext.isFocusable() ? \"\" : undefined',\n '[attr.data-disabled]': 'itemContext.disabled() || !itemContext.isFocusable() ? \"\" : undefined',\n\n '(mousedown)': 'handleMouseDown($event)',\n\n '(keydown.Enter)': 'handleKeyDown($event)',\n '(keydown.Space)': 'handleKeyDown($event)',\n '(keydown.ArrowLeft)': 'handleKeyDown($event)',\n '(keydown.ArrowRight)': 'handleKeyDown($event)',\n '(keydown.ArrowUp)': 'handleKeyDown($event)',\n '(keydown.ArrowDown)': 'handleKeyDown($event)'\n }\n})\nexport class RdxStepperTriggerDirective {\n protected readonly rootContext = injectStepperRootContext();\n protected readonly itemContext = injectStepperItemContext();\n\n private readonly elementRef = inject(ElementRef);\n\n readonly stepperItems = computed(() => Array.from(this.rootContext.totalStepperItems()));\n\n constructor() {\n // Register/deregister this trigger's host element with the root, in DOM order.\n const element = this.elementRef.nativeElement;\n this.rootContext.totalStepperItems.set([...this.rootContext.totalStepperItems(), element]);\n\n inject(DestroyRef).onDestroy(() => {\n const updated = this.rootContext.totalStepperItems().filter((el: HTMLElement) => el !== element);\n\n this.rootContext.totalStepperItems.set(updated);\n });\n }\n\n handleMouseDown(event: Event) {\n const mouseEvent = event as MouseEvent;\n if (this.itemContext.disabled()) {\n return;\n }\n\n // handler only left mouse click\n if (mouseEvent.button !== 0) {\n return;\n }\n\n if (this.rootContext.linear()) {\n if (\n this.itemContext.step() <= this.rootContext.value()! ||\n this.itemContext.step() === this.rootContext.value()! + 1\n ) {\n if (!mouseEvent.ctrlKey) {\n this.rootContext.goToStep(this.itemContext.step(), event, 'trigger-press');\n return;\n }\n }\n } else {\n if (!mouseEvent.ctrlKey) {\n this.rootContext.goToStep(this.itemContext.step(), event, 'trigger-press');\n return;\n }\n }\n\n // prevent focus to avoid accidental activation\n event.preventDefault();\n }\n\n handleKeyDown(event: Event) {\n const keyEvent = event as KeyboardEvent;\n event.preventDefault();\n\n if (this.itemContext.disabled()) {\n return;\n }\n\n if ((keyEvent.key === kbd.ENTER || keyEvent.key === kbd.SPACE) && !keyEvent.ctrlKey && !keyEvent.shiftKey)\n this.rootContext.goToStep(this.itemContext.step(), event, 'keyboard');\n\n if ([kbd.ARROW_LEFT, kbd.ARROW_RIGHT, kbd.ARROW_UP, kbd.ARROW_DOWN].includes(keyEvent.key)) {\n useArrowNavigation(keyEvent, getActiveElement() as HTMLElement, undefined, {\n itemsArray: this.stepperItems(),\n focus: true,\n loop: false,\n arrowKeyOptions: this.rootContext.orientation(),\n dir: this.rootContext.dir()\n });\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RdxStepperDescriptionDirective } from './src/stepper-description.directive';\nimport { RdxStepperIndicatorDirective } from './src/stepper-indicator.directive';\nimport { RdxStepperItemDirective } from './src/stepper-item.directive';\nimport { RdxStepperRootDirective } from './src/stepper-root.directive';\nimport { RdxStepperSeparatorDirective } from './src/stepper-separator.directive';\nimport { RdxStepperTitleDirective } from './src/stepper-title.directive';\nimport { RdxStepperTriggerDirective } from './src/stepper-trigger.directive';\n\nexport * from './src/stepper-description.directive';\nexport * from './src/stepper-indicator.directive';\nexport * from './src/stepper-item.directive';\nexport * from './src/stepper-root-context.token';\nexport * from './src/stepper-root.directive';\nexport * from './src/stepper-separator.directive';\nexport * from './src/stepper-title.directive';\nexport * from './src/stepper-trigger.directive';\nexport * from './src/types';\n\nconst _imports = [\n RdxStepperDescriptionDirective,\n RdxStepperTitleDirective,\n RdxStepperSeparatorDirective,\n RdxStepperItemDirective,\n RdxStepperIndicatorDirective,\n RdxStepperRootDirective,\n RdxStepperTriggerDirective\n];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxStepperModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAaO,MAAM,oBAAoB,GAAG,IAAI,cAA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YACvB,4BAA4B;YAC5B,uBAAuB;AACvB,YAAA,0BAA0B,aAN1B,8BAA8B;YAC9B,wBAAwB;YACxB,4BAA4B;YAC5B,uBAAuB;YACvB,4BAA4B;YAC5B,uBAAuB;YACvB,0BAA0B,CAAA,EAAA,CAAA,CAAA;+GAOjB,gBAAgB,EAAA,CAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC;AACtB,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ;AACxB,iBAAA;;;AChCD;;AAEG;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Directive, inject, computed, input, booleanAttribute, model, output, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@radix-ng/primitives/core';
|
|
4
|
-
import { createContext, injectControlValueAccessor, injectId, RdxControlValueAccessor } from '@radix-ng/primitives/core';
|
|
4
|
+
import { createContext, injectControlValueAccessor, injectId, createCancelableChangeEventDetails, RdxControlValueAccessor } from '@radix-ng/primitives/core';
|
|
5
5
|
|
|
6
6
|
const [injectSwitchContext, provideSwitchContext] = createContext('RdxSwitchContext', 'components/switch');
|
|
7
7
|
|
|
@@ -117,17 +117,22 @@ class RdxSwitchRoot {
|
|
|
117
117
|
this.isDisabled = computed(() => !!this.cva.disabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
118
118
|
}
|
|
119
119
|
/** @ignore Toggles the checked state unless disabled or read-only. */
|
|
120
|
-
toggle() {
|
|
120
|
+
toggle(event) {
|
|
121
121
|
if (this.isDisabled() || this.readonly()) {
|
|
122
122
|
return;
|
|
123
123
|
}
|
|
124
124
|
const next = !this.cva.value();
|
|
125
|
+
const trigger = event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined;
|
|
126
|
+
const { eventDetails } = createCancelableChangeEventDetails(event ? 'trigger-press' : 'none', event ?? new Event('switch.checked-change'), trigger);
|
|
127
|
+
this.onCheckedChange.emit({ checked: next, eventDetails });
|
|
128
|
+
if (eventDetails.isCanceled()) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
125
131
|
this.checked.set(next);
|
|
126
132
|
this.cva.setValue(next);
|
|
127
|
-
this.onCheckedChange.emit(next);
|
|
128
133
|
}
|
|
129
134
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
130
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxSwitchRoot, isStandalone: true, selector: "button[rdxSwitchRoot]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, defaultChecked: { classPropertyName: "defaultChecked", publicName: "defaultChecked", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, submitValue: { classPropertyName: "submitValue", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", onCheckedChange: "onCheckedChange" }, host: { attributes: { "role": "switch", "type": "button" }, listeners: { "click": "toggle()", "blur": "cva.markAsTouched()", "keydown.enter": "$event.preventDefault()" }, properties: { "id": "id()", "attr.aria-checked": "checkedState()", "attr.aria-required": "required() ? \"true\" : undefined", "attr.aria-readonly": "readonly() ? \"true\" : undefined", "attr.data-checked": "checkedState() ? \"\" : undefined", "attr.data-unchecked": "checkedState() ? undefined : \"\"", "attr.data-disabled": "isDisabled() ? \"\" : undefined", "attr.data-readonly": "readonly() ? \"\" : undefined", "attr.data-required": "required() ? \"\" : undefined", "attr.disabled": "isDisabled() ? \"\" : undefined" } }, providers: [provideSwitchContext(context)], exportAs: ["rdxSwitchRoot"], hostDirectives: [{ directive: i1.RdxControlValueAccessor, inputs: ["value", "checked", "disabled", "disabled"] }], ngImport: i0 }); }
|
|
135
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxSwitchRoot, isStandalone: true, selector: "button[rdxSwitchRoot]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, defaultChecked: { classPropertyName: "defaultChecked", publicName: "defaultChecked", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, submitValue: { classPropertyName: "submitValue", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", onCheckedChange: "onCheckedChange" }, host: { attributes: { "role": "switch", "type": "button" }, listeners: { "click": "toggle($event)", "blur": "cva.markAsTouched()", "keydown.enter": "$event.preventDefault()" }, properties: { "id": "id()", "attr.aria-checked": "checkedState()", "attr.aria-required": "required() ? \"true\" : undefined", "attr.aria-readonly": "readonly() ? \"true\" : undefined", "attr.data-checked": "checkedState() ? \"\" : undefined", "attr.data-unchecked": "checkedState() ? undefined : \"\"", "attr.data-disabled": "isDisabled() ? \"\" : undefined", "attr.data-readonly": "readonly() ? \"\" : undefined", "attr.data-required": "required() ? \"\" : undefined", "attr.disabled": "isDisabled() ? \"\" : undefined" } }, providers: [provideSwitchContext(context)], exportAs: ["rdxSwitchRoot"], hostDirectives: [{ directive: i1.RdxControlValueAccessor, inputs: ["value", "checked", "disabled", "disabled"] }], ngImport: i0 }); }
|
|
131
136
|
}
|
|
132
137
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchRoot, decorators: [{
|
|
133
138
|
type: Directive,
|
|
@@ -154,7 +159,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
154
159
|
'[attr.data-readonly]': 'readonly() ? "" : undefined',
|
|
155
160
|
'[attr.data-required]': 'required() ? "" : undefined',
|
|
156
161
|
'[attr.disabled]': 'isDisabled() ? "" : undefined',
|
|
157
|
-
'(click)': 'toggle()',
|
|
162
|
+
'(click)': 'toggle($event)',
|
|
158
163
|
'(blur)': 'cva.markAsTouched()',
|
|
159
164
|
'(keydown.enter)': '$event.preventDefault()'
|
|
160
165
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radix-ng-primitives-switch.mjs","sources":["../../../packages/primitives/switch/src/switch-context.ts","../../../packages/primitives/switch/src/switch-input.ts","../../../packages/primitives/switch/src/switch-root.ts","../../../packages/primitives/switch/src/switch-thumb.ts","../../../packages/primitives/switch/index.ts","../../../packages/primitives/switch/radix-ng-primitives-switch.ts"],"sourcesContent":["import { Signal } from '@angular/core';\nimport { createContext } from '@radix-ng/primitives/core';\n\nexport interface RdxSwitchContext {\n /** Whether the switch is on. */\n readonly checked: Signal<boolean>;\n\n /** Whether the switch is disabled. */\n readonly disabled: Signal<boolean>;\n\n /** Whether the switch is read-only (focusable, but cannot be toggled). */\n readonly readonly: Signal<boolean>;\n\n /** Whether the switch must be on to submit the owning form. */\n readonly required: Signal<boolean>;\n\n /** Name of the hidden form input. */\n readonly name: Signal<string | undefined>;\n\n /** Value submitted with the form when the switch is on. */\n readonly value: Signal<string>;\n\n readonly ariaLabel: Signal<string | undefined>;\n readonly ariaLabelledBy: Signal<string | undefined>;\n\n markAsTouched(): void;\n}\n\nexport const [injectSwitchContext, provideSwitchContext] = createContext<RdxSwitchContext>(\n 'RdxSwitchContext',\n 'components/switch'\n);\n","import { Directive } from '@angular/core';\nimport { injectSwitchContext } from './switch-context';\n\n/**\n * The hidden native checkbox that mirrors the switch state for form submission and screen readers.\n *\n * @see https://base-ui.com/react/components/switch\n */\n@Directive({\n selector: 'input[rdxSwitchInput]',\n exportAs: 'rdxSwitchInput',\n host: {\n type: 'checkbox',\n tabindex: '-1',\n 'aria-hidden': 'true',\n '[attr.name]': 'rootContext.name()',\n '[attr.value]': 'rootContext.value()',\n '[checked]': 'rootContext.checked()',\n '[disabled]': 'rootContext.disabled()',\n '[attr.required]': 'rootContext.required() ? \"\" : undefined',\n '[attr.aria-label]': 'rootContext.ariaLabel()',\n '[attr.aria-labelledby]': 'rootContext.ariaLabelledBy()',\n '[attr.data-checked]': 'rootContext.checked() ? \"\" : undefined',\n '[attr.data-unchecked]': 'rootContext.checked() ? undefined : \"\"',\n style: 'transform: translateX(-100%); position: absolute; overflow: hidden; pointer-events: none; opacity: 0; margin: 0;',\n '(blur)': 'rootContext.markAsTouched()'\n }\n})\nexport class RdxSwitchInput {\n protected readonly rootContext = injectSwitchContext();\n}\n","import { booleanAttribute, computed, Directive, inject, input, model, output } from '@angular/core';\nimport {\n BooleanInput,\n injectControlValueAccessor,\n injectId,\n RdxControlValueAccessor,\n RdxFormCheckboxControl\n} from '@radix-ng/primitives/core';\nimport { provideSwitchContext, RdxSwitchContext } from './switch-context';\n\nconst context = (): RdxSwitchContext => {\n const root = inject(RdxSwitchRoot);\n const cva = injectControlValueAccessor<boolean | undefined>();\n\n return {\n checked: root.checkedState,\n disabled: computed(() => !!cva.disabled()),\n readonly: root.readonly,\n required: root.required,\n name: root.name,\n value: root.submitValue,\n ariaLabel: root.ariaLabel,\n ariaLabelledBy: root.ariaLabelledBy,\n markAsTouched: () => cva.markAsTouched()\n };\n};\n\n/**\n * A control that toggles between on and off.\n *\n * @see https://base-ui.com/react/components/switch\n */\n@Directive({\n selector: 'button[rdxSwitchRoot]',\n exportAs: 'rdxSwitchRoot',\n providers: [provideSwitchContext(context)],\n hostDirectives: [\n {\n directive: RdxControlValueAccessor,\n inputs: ['value: checked', 'disabled']\n }\n ],\n host: {\n role: 'switch',\n type: 'button',\n '[id]': 'id()',\n '[attr.aria-checked]': 'checkedState()',\n '[attr.aria-required]': 'required() ? \"true\" : undefined',\n '[attr.aria-readonly]': 'readonly() ? \"true\" : undefined',\n '[attr.data-checked]': 'checkedState() ? \"\" : undefined',\n '[attr.data-unchecked]': 'checkedState() ? undefined : \"\"',\n '[attr.data-disabled]': 'isDisabled() ? \"\" : undefined',\n '[attr.data-readonly]': 'readonly() ? \"\" : undefined',\n '[attr.data-required]': 'required() ? \"\" : undefined',\n '[attr.disabled]': 'isDisabled() ? \"\" : undefined',\n '(click)': 'toggle()',\n '(blur)': 'cva.markAsTouched()',\n '(keydown.enter)': '$event.preventDefault()'\n }\n})\nexport class RdxSwitchRoot implements RdxFormCheckboxControl {\n /** @ignore */\n protected readonly cva = injectControlValueAccessor<boolean | undefined>();\n\n readonly id = input<string>(injectId('rdx-switch-'));\n\n /**\n * The state of the switch when it is initially rendered. Use when you do not need to control its state.\n *\n * @default false\n */\n readonly defaultChecked = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * The controlled checked state. Use with `(onCheckedChange)` or two-way `[(checked)]`.\n */\n readonly checked = model<boolean>(this.defaultChecked());\n\n /**\n * When `true`, prevents the user from interacting with the switch.\n *\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * When `true`, the switch is focusable but cannot be toggled.\n *\n * @default false\n */\n readonly readonly = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * When `true`, the switch must be on before the owning form can be submitted.\n *\n * @default false\n */\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** Name of the hidden form input rendered by `[rdxSwitchInput]`. */\n readonly name = input<string>();\n\n /**\n * Value submitted with the form when the switch is on.\n *\n * Bound publicly as `[value]`; the TS member is named `submitValue` so the\n * directive can satisfy `RdxFormCheckboxControl`, whose contract reserves a\n * `value` member for `RdxFormValueControl` and forbids it on checkbox-style\n * controls.\n *\n * @default 'on'\n */\n readonly submitValue = input<string>('on', { alias: 'value' });\n\n readonly ariaLabelledBy = input<string | undefined>(undefined, { alias: 'aria-labelledby' });\n readonly ariaLabel = input<string | undefined>(undefined, { alias: 'aria-label' });\n\n /** Event handler called when the checked state of the switch changes. */\n readonly onCheckedChange = output<boolean>();\n\n /** @ignore */\n readonly checkedState = computed(() => !!this.cva.value());\n /** @ignore */\n protected readonly isDisabled = computed(() => !!this.cva.disabled());\n\n /** @ignore Toggles the checked state unless disabled or read-only. */\n toggle(): void {\n if (this.isDisabled() || this.readonly()) {\n return;\n }\n\n const next = !this.cva.value();\n this.checked.set(next);\n this.cva.setValue(next);\n this.onCheckedChange.emit(next);\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectSwitchContext } from './switch-context';\n\n/**\n * The moving part of the switch that indicates whether it is on or off.\n *\n * @see https://base-ui.com/react/components/switch\n */\n@Directive({\n selector: 'span[rdxSwitchThumb]',\n exportAs: 'rdxSwitchThumb',\n host: {\n '[attr.data-checked]': 'rootContext.checked() ? \"\" : undefined',\n '[attr.data-unchecked]': 'rootContext.checked() ? undefined : \"\"',\n '[attr.data-disabled]': 'rootContext.disabled() ? \"\" : undefined',\n '[attr.data-readonly]': 'rootContext.readonly() ? \"\" : undefined'\n }\n})\nexport class RdxSwitchThumb {\n protected readonly rootContext = injectSwitchContext();\n}\n","import { NgModule } from '@angular/core';\nimport { RdxSwitchInput } from './src/switch-input';\nimport { RdxSwitchRoot } from './src/switch-root';\nimport { RdxSwitchThumb } from './src/switch-thumb';\n\nexport * from './src/switch-context';\nexport * from './src/switch-input';\nexport * from './src/switch-root';\nexport * from './src/switch-thumb';\n\nexport const switchImports = [RdxSwitchRoot, RdxSwitchInput, RdxSwitchThumb];\n\n@NgModule({\n imports: [...switchImports],\n exports: [...switchImports]\n})\nexport class RdxSwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AA4BO,MAAM,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,GAAG,aAAa,CACpE,kBAAkB,EAClB,mBAAmB;;AC3BvB;;;;AAIG;MAqBU,cAAc,CAAA;AApB3B,IAAA,WAAA,GAAA;QAqBuB,IAAA,CAAA,WAAW,GAAG,mBAAmB,EAAE;AACzD,IAAA;8GAFY,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,UAAA,EAAA,UAAA,EAAA,IAAA,EAAA,aAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,MAAA,EAAA,6BAAA,EAAA,EAAA,UAAA,EAAA,EAAA,WAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,qBAAA,EAAA,SAAA,EAAA,uBAAA,EAAA,UAAA,EAAA,wBAAA,EAAA,eAAA,EAAA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ts","../../../packages/primitives/switch/src/switch-input.ts","../../../packages/primitives/switch/src/switch-root.ts","../../../packages/primitives/switch/src/switch-thumb.ts","../../../packages/primitives/switch/index.ts","../../../packages/primitives/switch/radix-ng-primitives-switch.ts"],"sourcesContent":["import { Signal } from '@angular/core';\nimport { createContext } from '@radix-ng/primitives/core';\n\nexport interface RdxSwitchContext {\n /** Whether the switch is on. */\n readonly checked: Signal<boolean>;\n\n /** Whether the switch is disabled. */\n readonly disabled: Signal<boolean>;\n\n /** Whether the switch is read-only (focusable, but cannot be toggled). */\n readonly readonly: Signal<boolean>;\n\n /** Whether the switch must be on to submit the owning form. */\n readonly required: Signal<boolean>;\n\n /** Name of the hidden form input. */\n readonly name: Signal<string | undefined>;\n\n /** Value submitted with the form when the switch is on. */\n readonly value: Signal<string>;\n\n readonly ariaLabel: Signal<string | undefined>;\n readonly ariaLabelledBy: Signal<string | undefined>;\n\n markAsTouched(): void;\n}\n\nexport const [injectSwitchContext, provideSwitchContext] = createContext<RdxSwitchContext>(\n 'RdxSwitchContext',\n 'components/switch'\n);\n","import { Directive } from '@angular/core';\nimport { injectSwitchContext } from './switch-context';\n\n/**\n * The hidden native checkbox that mirrors the switch state for form submission and screen readers.\n *\n * @see https://base-ui.com/react/components/switch\n */\n@Directive({\n selector: 'input[rdxSwitchInput]',\n exportAs: 'rdxSwitchInput',\n host: {\n type: 'checkbox',\n tabindex: '-1',\n 'aria-hidden': 'true',\n '[attr.name]': 'rootContext.name()',\n '[attr.value]': 'rootContext.value()',\n '[checked]': 'rootContext.checked()',\n '[disabled]': 'rootContext.disabled()',\n '[attr.required]': 'rootContext.required() ? \"\" : undefined',\n '[attr.aria-label]': 'rootContext.ariaLabel()',\n '[attr.aria-labelledby]': 'rootContext.ariaLabelledBy()',\n '[attr.data-checked]': 'rootContext.checked() ? \"\" : undefined',\n '[attr.data-unchecked]': 'rootContext.checked() ? undefined : \"\"',\n style: 'transform: translateX(-100%); position: absolute; overflow: hidden; pointer-events: none; opacity: 0; margin: 0;',\n '(blur)': 'rootContext.markAsTouched()'\n }\n})\nexport class RdxSwitchInput {\n protected readonly rootContext = injectSwitchContext();\n}\n","import { booleanAttribute, computed, Directive, inject, input, model, output } from '@angular/core';\nimport {\n BooleanInput,\n createCancelableChangeEventDetails,\n injectControlValueAccessor,\n injectId,\n RdxCancelableChangeEventDetails,\n RdxControlValueAccessor,\n RdxFormCheckboxControl\n} from '@radix-ng/primitives/core';\nimport { provideSwitchContext, RdxSwitchContext } from './switch-context';\n\nexport type RdxSwitchCheckedChangeReason = 'trigger-press' | 'none';\nexport type RdxSwitchCheckedChangeEventDetails = RdxCancelableChangeEventDetails<RdxSwitchCheckedChangeReason>;\n\nexport interface RdxSwitchCheckedChangeEvent {\n checked: boolean;\n eventDetails: RdxSwitchCheckedChangeEventDetails;\n}\n\nconst context = (): RdxSwitchContext => {\n const root = inject(RdxSwitchRoot);\n const cva = injectControlValueAccessor<boolean | undefined>();\n\n return {\n checked: root.checkedState,\n disabled: computed(() => !!cva.disabled()),\n readonly: root.readonly,\n required: root.required,\n name: root.name,\n value: root.submitValue,\n ariaLabel: root.ariaLabel,\n ariaLabelledBy: root.ariaLabelledBy,\n markAsTouched: () => cva.markAsTouched()\n };\n};\n\n/**\n * A control that toggles between on and off.\n *\n * @see https://base-ui.com/react/components/switch\n */\n@Directive({\n selector: 'button[rdxSwitchRoot]',\n exportAs: 'rdxSwitchRoot',\n providers: [provideSwitchContext(context)],\n hostDirectives: [\n {\n directive: RdxControlValueAccessor,\n inputs: ['value: checked', 'disabled']\n }\n ],\n host: {\n role: 'switch',\n type: 'button',\n '[id]': 'id()',\n '[attr.aria-checked]': 'checkedState()',\n '[attr.aria-required]': 'required() ? \"true\" : undefined',\n '[attr.aria-readonly]': 'readonly() ? \"true\" : undefined',\n '[attr.data-checked]': 'checkedState() ? \"\" : undefined',\n '[attr.data-unchecked]': 'checkedState() ? undefined : \"\"',\n '[attr.data-disabled]': 'isDisabled() ? \"\" : undefined',\n '[attr.data-readonly]': 'readonly() ? \"\" : undefined',\n '[attr.data-required]': 'required() ? \"\" : undefined',\n '[attr.disabled]': 'isDisabled() ? \"\" : undefined',\n '(click)': 'toggle($event)',\n '(blur)': 'cva.markAsTouched()',\n '(keydown.enter)': '$event.preventDefault()'\n }\n})\nexport class RdxSwitchRoot implements RdxFormCheckboxControl {\n /** @ignore */\n protected readonly cva = injectControlValueAccessor<boolean | undefined>();\n\n readonly id = input<string>(injectId('rdx-switch-'));\n\n /**\n * The state of the switch when it is initially rendered. Use when you do not need to control its state.\n *\n * @default false\n */\n readonly defaultChecked = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * The controlled checked state. Use with `(onCheckedChange)` or two-way `[(checked)]`.\n */\n readonly checked = model<boolean>(this.defaultChecked());\n\n /**\n * When `true`, prevents the user from interacting with the switch.\n *\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * When `true`, the switch is focusable but cannot be toggled.\n *\n * @default false\n */\n readonly readonly = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * When `true`, the switch must be on before the owning form can be submitted.\n *\n * @default false\n */\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** Name of the hidden form input rendered by `[rdxSwitchInput]`. */\n readonly name = input<string>();\n\n /**\n * Value submitted with the form when the switch is on.\n *\n * Bound publicly as `[value]`; the TS member is named `submitValue` so the\n * directive can satisfy `RdxFormCheckboxControl`, whose contract reserves a\n * `value` member for `RdxFormValueControl` and forbids it on checkbox-style\n * controls.\n *\n * @default 'on'\n */\n readonly submitValue = input<string>('on', { alias: 'value' });\n\n readonly ariaLabelledBy = input<string | undefined>(undefined, { alias: 'aria-labelledby' });\n readonly ariaLabel = input<string | undefined>(undefined, { alias: 'aria-label' });\n\n /** Event handler called when the checked state of the switch changes. */\n readonly onCheckedChange = output<RdxSwitchCheckedChangeEvent>();\n\n /** @ignore */\n readonly checkedState = computed(() => !!this.cva.value());\n /** @ignore */\n protected readonly isDisabled = computed(() => !!this.cva.disabled());\n\n /** @ignore Toggles the checked state unless disabled or read-only. */\n toggle(event?: Event): void {\n if (this.isDisabled() || this.readonly()) {\n return;\n }\n\n const next = !this.cva.value();\n const trigger = event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined;\n const { eventDetails } = createCancelableChangeEventDetails(\n event ? 'trigger-press' : 'none',\n event ?? new Event('switch.checked-change'),\n trigger\n );\n this.onCheckedChange.emit({ checked: next, eventDetails });\n if (eventDetails.isCanceled()) {\n return;\n }\n\n this.checked.set(next);\n this.cva.setValue(next);\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectSwitchContext } from './switch-context';\n\n/**\n * The moving part of the switch that indicates whether it is on or off.\n *\n * @see https://base-ui.com/react/components/switch\n */\n@Directive({\n selector: 'span[rdxSwitchThumb]',\n exportAs: 'rdxSwitchThumb',\n host: {\n '[attr.data-checked]': 'rootContext.checked() ? \"\" : undefined',\n '[attr.data-unchecked]': 'rootContext.checked() ? undefined : \"\"',\n '[attr.data-disabled]': 'rootContext.disabled() ? \"\" : undefined',\n '[attr.data-readonly]': 'rootContext.readonly() ? \"\" : undefined'\n }\n})\nexport class RdxSwitchThumb {\n protected readonly rootContext = injectSwitchContext();\n}\n","import { NgModule } from '@angular/core';\nimport { RdxSwitchInput } from './src/switch-input';\nimport { RdxSwitchRoot } from './src/switch-root';\nimport { RdxSwitchThumb } from './src/switch-thumb';\n\nexport * from './src/switch-context';\nexport * from './src/switch-input';\nexport * from './src/switch-root';\nexport * from './src/switch-thumb';\n\nexport const switchImports = [RdxSwitchRoot, RdxSwitchInput, RdxSwitchThumb];\n\n@NgModule({\n imports: [...switchImports],\n exports: [...switchImports]\n})\nexport class RdxSwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AA4BO,MAAM,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,GAAG,aAAa,CACpE,kBAAkB,EACl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AA,CAAA;kBAV1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,IAAI,EAAE;AACF,wBAAA,qBAAqB,EAAE,wCAAwC;AAC/D,wBAAA,uBAAuB,EAAE,wCAAwC;AACjE,wBAAA,sBAAsB,EAAE,yCAAyC;AACjE,wBAAA,sBAAsB,EAAE;AAC3B;AACJ,iBAAA;;;ACPM,MAAM,aAAa,GAAG,CAAC,aAAa,EAAE,cAAc,EAAE,cAAc;MAM9D,eAAe,CAAA;8GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAf,eAAe,EAAA,OAAA,EAAA,CANE,aAAa,EAAE,cAAc,EAAE,cAAc,CAAA,EAAA,OAAA,EAAA,CAA7C,aAAa,EAAE,cAAc,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;+GAM9D,eAAe,EAAA,CAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,aAAa,CAAC;AAC3B,oBAAA,OAAO,EAAE,CAAC,GAAG,aAAa;AAC7B,iBAAA;;;ACfD;;AAEG;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, DestroyRef, signal, effect, afterNextRender, untracked, Directive, ElementRef, input, booleanAttribute, computed, model, output, NgModule } from '@angular/core';
|
|
3
|
-
import { createContext, useTransitionStatus, injectId } from '@radix-ng/primitives/core';
|
|
4
|
-
import * as i1 from '@radix-ng/primitives/
|
|
5
|
-
import {
|
|
3
|
+
import { createContext, useTransitionStatus, injectId, createCancelableChangeEventDetails } from '@radix-ng/primitives/core';
|
|
4
|
+
import * as i1 from '@radix-ng/primitives/composite';
|
|
5
|
+
import { RdxCompositeRoot, RdxCompositeItem } from '@radix-ng/primitives/composite';
|
|
6
6
|
import * as i1$1 from '@radix-ng/primitives/presence';
|
|
7
7
|
import { provideRdxPresenceContext, RdxPresenceDirective } from '@radix-ng/primitives/presence';
|
|
8
8
|
|
|
@@ -116,7 +116,7 @@ class RdxTabsList {
|
|
|
116
116
|
constructor() {
|
|
117
117
|
this.rootContext = injectTabsRootContext();
|
|
118
118
|
this.elementRef = inject(ElementRef);
|
|
119
|
-
this.
|
|
119
|
+
this.compositeRoot = inject(RdxCompositeRoot, { self: true });
|
|
120
120
|
/**
|
|
121
121
|
* Whether a tab is activated when it receives focus (automatic activation).
|
|
122
122
|
* When `false`, tabs are only activated on click or Enter/Space.
|
|
@@ -130,22 +130,47 @@ class RdxTabsList {
|
|
|
130
130
|
* @default true
|
|
131
131
|
*/
|
|
132
132
|
this.loopFocus = input(true, { ...(ngDevMode ? { debugName: "loopFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
133
|
+
this.tabMetadata = computed(() => Array.from(this.compositeRoot.itemMap().values()).filter(isTabsTabMetadata), ...(ngDevMode ? [{ debugName: "tabMetadata" }] : /* istanbul ignore next */ []));
|
|
134
|
+
this.disabledIndices = computed(() => this.tabMetadata()
|
|
135
|
+
.filter((metadata) => metadata.disabled)
|
|
136
|
+
.map((metadata) => metadata.index), ...(ngDevMode ? [{ debugName: "disabledIndices" }] : /* istanbul ignore next */ []));
|
|
137
|
+
this.activeIndex = computed(() => {
|
|
138
|
+
const value = this.rootContext.value();
|
|
139
|
+
const metadata = this.tabMetadata().find((tab) => tab.value === value);
|
|
140
|
+
return metadata?.index ?? -1;
|
|
141
|
+
}, ...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
133
142
|
this.rootContext.setTabListElement(this.elementRef.nativeElement);
|
|
134
143
|
effect(() => {
|
|
135
|
-
this.
|
|
136
|
-
this.
|
|
144
|
+
this.compositeRoot.setOrientation(this.rootContext.orientation());
|
|
145
|
+
this.compositeRoot.setLoopFocus(this.loopFocus());
|
|
146
|
+
this.compositeRoot.setEnableHomeAndEndKeys(true);
|
|
147
|
+
});
|
|
148
|
+
effect(() => {
|
|
149
|
+
this.compositeRoot.setDisabledIndices(this.disabledIndices());
|
|
150
|
+
});
|
|
151
|
+
effect(() => {
|
|
152
|
+
const activeIndex = this.activeIndex();
|
|
153
|
+
if (activeIndex === -1 || this.disabledIndices().includes(activeIndex)) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
const list = this.elementRef.nativeElement;
|
|
157
|
+
const activeElement = list.ownerDocument.activeElement;
|
|
158
|
+
if (activeElement && list.contains(activeElement)) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
this.compositeRoot.setHighlightedIndex(activeIndex);
|
|
137
162
|
});
|
|
138
163
|
effect(() => this.rootContext.setActivateOnFocus(this.activateOnFocus()));
|
|
139
164
|
}
|
|
140
165
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTabsList, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
141
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxTabsList, isStandalone: true, selector: "[rdxTabsList]", inputs: { activateOnFocus: { classPropertyName: "activateOnFocus", publicName: "activateOnFocus", isSignal: true, isRequired: false, transformFunction: null }, loopFocus: { classPropertyName: "loopFocus", publicName: "loopFocus", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "tablist" }, properties: { "attr.aria-orientation": "rootContext.orientation()", "attr.data-orientation": "rootContext.orientation()", "attr.data-activation-direction": "rootContext.activationDirection()" } }, exportAs: ["rdxTabsList"], hostDirectives: [{ directive: i1.
|
|
166
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxTabsList, isStandalone: true, selector: "[rdxTabsList]", inputs: { activateOnFocus: { classPropertyName: "activateOnFocus", publicName: "activateOnFocus", isSignal: true, isRequired: false, transformFunction: null }, loopFocus: { classPropertyName: "loopFocus", publicName: "loopFocus", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "tablist" }, properties: { "attr.aria-orientation": "rootContext.orientation()", "attr.data-orientation": "rootContext.orientation()", "attr.data-activation-direction": "rootContext.activationDirection()" } }, exportAs: ["rdxTabsList"], hostDirectives: [{ directive: i1.RdxCompositeRoot }], ngImport: i0 }); }
|
|
142
167
|
}
|
|
143
168
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTabsList, decorators: [{
|
|
144
169
|
type: Directive,
|
|
145
170
|
args: [{
|
|
146
171
|
selector: '[rdxTabsList]',
|
|
147
172
|
exportAs: 'rdxTabsList',
|
|
148
|
-
hostDirectives: [
|
|
173
|
+
hostDirectives: [RdxCompositeRoot],
|
|
149
174
|
host: {
|
|
150
175
|
role: 'tablist',
|
|
151
176
|
'[attr.aria-orientation]': 'rootContext.orientation()',
|
|
@@ -154,6 +179,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
154
179
|
}
|
|
155
180
|
}]
|
|
156
181
|
}], ctorParameters: () => [], propDecorators: { activateOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "activateOnFocus", required: false }] }], loopFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "loopFocus", required: false }] }] } });
|
|
182
|
+
function isTabsTabMetadata(metadata) {
|
|
183
|
+
return (typeof metadata['disabled'] === 'boolean' &&
|
|
184
|
+
typeof metadata['id'] === 'string' &&
|
|
185
|
+
Object.prototype.hasOwnProperty.call(metadata, 'value'));
|
|
186
|
+
}
|
|
157
187
|
|
|
158
188
|
const panelPresenceContext = () => ({ present: inject(RdxTabsPanel).present });
|
|
159
189
|
/**
|
|
@@ -236,7 +266,7 @@ class RdxTabsPanel {
|
|
|
236
266
|
this.hasPresence.set(true);
|
|
237
267
|
}
|
|
238
268
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTabsPanel, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
239
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxTabsPanel, isStandalone: true, selector: "[rdxTabsPanel]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, keepMounted: { classPropertyName: "keepMounted", publicName: "keepMounted", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "tabpanel" }, properties: { "id": "panelId()", "attr.tabindex": "active() ? 0 : undefined", "attr.aria-labelledby": "tabId()", "attr.data-orientation": "rootContext.orientation()", "attr.data-activation-direction": "rootContext.activationDirection()", "attr.data-index": "index()", "attr.data-hidden": "active() ? undefined : \"\"", "attr.data-starting-style": "transitionStatus() === \"starting\" ? \"\" : undefined", "attr.data-ending-style": "transitionStatus() === \"ending\" ? \"\" : undefined", "hidden": "hidden()" } }, providers: [provideRdxPresenceContext(panelPresenceContext)], exportAs: ["rdxTabsPanel"], ngImport: i0 }); }
|
|
269
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxTabsPanel, isStandalone: true, selector: "[rdxTabsPanel]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, keepMounted: { classPropertyName: "keepMounted", publicName: "keepMounted", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "tabpanel" }, properties: { "attr.id": "panelId()", "attr.tabindex": "active() ? 0 : undefined", "attr.aria-labelledby": "tabId()", "attr.data-orientation": "rootContext.orientation()", "attr.data-activation-direction": "rootContext.activationDirection()", "attr.data-index": "index()", "attr.data-hidden": "active() ? undefined : \"\"", "attr.data-starting-style": "transitionStatus() === \"starting\" ? \"\" : undefined", "attr.data-ending-style": "transitionStatus() === \"ending\" ? \"\" : undefined", "hidden": "hidden()" } }, providers: [provideRdxPresenceContext(panelPresenceContext)], exportAs: ["rdxTabsPanel"], ngImport: i0 }); }
|
|
240
270
|
}
|
|
241
271
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTabsPanel, decorators: [{
|
|
242
272
|
type: Directive,
|
|
@@ -246,7 +276,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
246
276
|
providers: [provideRdxPresenceContext(panelPresenceContext)],
|
|
247
277
|
host: {
|
|
248
278
|
role: 'tabpanel',
|
|
249
|
-
'[id]': 'panelId()',
|
|
279
|
+
'[attr.id]': 'panelId()',
|
|
250
280
|
'[attr.tabindex]': 'active() ? 0 : undefined',
|
|
251
281
|
'[attr.aria-labelledby]': 'tabId()',
|
|
252
282
|
'[attr.data-orientation]': 'rootContext.orientation()',
|
|
@@ -292,7 +322,7 @@ const rootContext = () => {
|
|
|
292
322
|
activationDirection: root.activationDirection.asReadonly(),
|
|
293
323
|
activateOnFocus: root.activateOnFocus.asReadonly(),
|
|
294
324
|
tabListElement: root.tabListElement.asReadonly(),
|
|
295
|
-
setValue: (value) => root.setValue(value),
|
|
325
|
+
setValue: (value, event, reason) => root.setValue(value, event, reason),
|
|
296
326
|
setActivateOnFocus: (value) => root.activateOnFocus.set(value),
|
|
297
327
|
setTabListElement: (element) => root.tabListElement.set(element)
|
|
298
328
|
};
|
|
@@ -339,14 +369,19 @@ class RdxTabsRoot {
|
|
|
339
369
|
});
|
|
340
370
|
}
|
|
341
371
|
/** @ignore */
|
|
342
|
-
setValue(value) {
|
|
372
|
+
setValue(value, event, reason = event ? 'trigger-press' : 'none') {
|
|
343
373
|
const previous = this.value();
|
|
344
374
|
if (previous === value) {
|
|
345
375
|
return;
|
|
346
376
|
}
|
|
377
|
+
const trigger = event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined;
|
|
378
|
+
const { eventDetails } = createCancelableChangeEventDetails(reason, event ?? new Event('tabs.value-change'), trigger);
|
|
379
|
+
this.onValueChange.emit({ value, eventDetails });
|
|
380
|
+
if (eventDetails.isCanceled()) {
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
347
383
|
this.activationDirection.set(this.computeDirection(previous, value));
|
|
348
384
|
this.value.set(value);
|
|
349
|
-
this.onValueChange.emit(value);
|
|
350
385
|
}
|
|
351
386
|
computeDirection(previous, next) {
|
|
352
387
|
const list = this.tabListElement();
|
|
@@ -389,7 +424,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
389
424
|
class RdxTabsTab {
|
|
390
425
|
constructor() {
|
|
391
426
|
this.rootContext = injectTabsRootContext();
|
|
392
|
-
this.
|
|
427
|
+
this.compositeItem = inject(RdxCompositeItem, { self: true });
|
|
393
428
|
/**
|
|
394
429
|
* A unique value that associates the tab with a panel.
|
|
395
430
|
*/
|
|
@@ -405,15 +440,18 @@ class RdxTabsTab {
|
|
|
405
440
|
/** @ignore */
|
|
406
441
|
this.active = computed(() => this.rootContext.value() === this.value(), ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
407
442
|
effect(() => {
|
|
408
|
-
this.
|
|
409
|
-
|
|
443
|
+
this.compositeItem.setMetadata({
|
|
444
|
+
disabled: this.disabled(),
|
|
445
|
+
id: this.tabId(),
|
|
446
|
+
value: this.value()
|
|
447
|
+
});
|
|
410
448
|
});
|
|
411
449
|
}
|
|
412
450
|
/** @ignore */
|
|
413
451
|
onMouseDown(event) {
|
|
414
452
|
// Only the primary button selects; ignore Ctrl-click (macOS right-click emulation).
|
|
415
453
|
if (!this.disabled() && event.button === 0 && !event.ctrlKey) {
|
|
416
|
-
this.rootContext.setValue(this.value());
|
|
454
|
+
this.rootContext.setValue(this.value(), event, 'trigger-press');
|
|
417
455
|
}
|
|
418
456
|
else {
|
|
419
457
|
// Prevent focus to avoid accidental activation.
|
|
@@ -423,43 +461,39 @@ class RdxTabsTab {
|
|
|
423
461
|
/** @ignore */
|
|
424
462
|
onKeyDown(event) {
|
|
425
463
|
if (!this.disabled() && (event.key === ' ' || event.key === 'Enter')) {
|
|
426
|
-
this.rootContext.setValue(this.value());
|
|
464
|
+
this.rootContext.setValue(this.value(), event, 'keyboard');
|
|
427
465
|
}
|
|
428
466
|
}
|
|
429
467
|
/** @ignore */
|
|
430
|
-
onFocus() {
|
|
468
|
+
onFocus(event) {
|
|
431
469
|
if (!this.active() && !this.disabled() && this.rootContext.activateOnFocus()) {
|
|
432
|
-
this.rootContext.setValue(this.value());
|
|
470
|
+
this.rootContext.setValue(this.value(), event, 'focus');
|
|
433
471
|
}
|
|
434
472
|
}
|
|
435
473
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTabsTab, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
436
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxTabsTab, isStandalone: true, selector: "[rdxTabsTab]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button", "role": "tab" }, listeners: { "mousedown": "onMouseDown($event)", "keydown": "onKeyDown($event)", "focus": "onFocus()" }, properties: { "id": "tabId()", "attr.aria-selected": "active()", "attr.aria-controls": "panelId()", "attr.
|
|
474
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxTabsTab, isStandalone: true, selector: "[rdxTabsTab]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button", "role": "tab" }, listeners: { "mousedown": "onMouseDown($event)", "keydown": "onKeyDown($event)", "focus": "onFocus($event)" }, properties: { "attr.id": "tabId()", "attr.aria-selected": "active()", "attr.aria-controls": "panelId()", "attr.aria-disabled": "disabled() ? \"true\" : undefined", "attr.data-composite-item-active": "active() ? \"\" : undefined", "attr.data-orientation": "rootContext.orientation()", "attr.data-activation-direction": "rootContext.activationDirection()", "attr.data-active": "active() ? \"\" : undefined", "attr.data-disabled": "disabled() ? \"\" : undefined" } }, exportAs: ["rdxTabsTab"], hostDirectives: [{ directive: i1.RdxCompositeItem }], ngImport: i0 }); }
|
|
437
475
|
}
|
|
438
476
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTabsTab, decorators: [{
|
|
439
477
|
type: Directive,
|
|
440
478
|
args: [{
|
|
441
479
|
selector: '[rdxTabsTab]',
|
|
442
480
|
exportAs: 'rdxTabsTab',
|
|
443
|
-
hostDirectives: [
|
|
444
|
-
{
|
|
445
|
-
directive: RdxRovingFocusItemDirective,
|
|
446
|
-
inputs: ['allowShiftKey']
|
|
447
|
-
}
|
|
448
|
-
],
|
|
481
|
+
hostDirectives: [RdxCompositeItem],
|
|
449
482
|
host: {
|
|
450
483
|
type: 'button',
|
|
451
484
|
role: 'tab',
|
|
452
|
-
'[id]': 'tabId()',
|
|
485
|
+
'[attr.id]': 'tabId()',
|
|
453
486
|
'[attr.aria-selected]': 'active()',
|
|
454
487
|
'[attr.aria-controls]': 'panelId()',
|
|
488
|
+
'[attr.aria-disabled]': 'disabled() ? "true" : undefined',
|
|
489
|
+
'[attr.data-composite-item-active]': 'active() ? "" : undefined',
|
|
455
490
|
'[attr.data-orientation]': 'rootContext.orientation()',
|
|
456
491
|
'[attr.data-activation-direction]': 'rootContext.activationDirection()',
|
|
457
492
|
'[attr.data-active]': 'active() ? "" : undefined',
|
|
458
493
|
'[attr.data-disabled]': 'disabled() ? "" : undefined',
|
|
459
|
-
'[attr.disabled]': 'disabled() ? "" : undefined',
|
|
460
494
|
'(mousedown)': 'onMouseDown($event)',
|
|
461
495
|
'(keydown)': 'onKeyDown($event)',
|
|
462
|
-
'(focus)': 'onFocus()'
|
|
496
|
+
'(focus)': 'onFocus($event)'
|
|
463
497
|
}
|
|
464
498
|
}]
|
|
465
499
|
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|