ng-primitives 0.82.0 → 0.83.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.
Files changed (43) hide show
  1. package/avatar/avatar/avatar.d.ts +1 -2
  2. package/fesm2022/ng-primitives-avatar.mjs +3 -6
  3. package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
  4. package/fesm2022/ng-primitives-button.mjs +2 -2
  5. package/fesm2022/ng-primitives-button.mjs.map +1 -1
  6. package/fesm2022/ng-primitives-checkbox.mjs +2 -2
  7. package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
  8. package/fesm2022/ng-primitives-combobox.mjs +5 -5
  9. package/fesm2022/ng-primitives-combobox.mjs.map +1 -1
  10. package/fesm2022/ng-primitives-file-upload.mjs +3 -4
  11. package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
  12. package/fesm2022/ng-primitives-input.mjs +2 -2
  13. package/fesm2022/ng-primitives-input.mjs.map +1 -1
  14. package/fesm2022/ng-primitives-interactions.mjs +458 -44
  15. package/fesm2022/ng-primitives-interactions.mjs.map +1 -1
  16. package/fesm2022/ng-primitives-internal.mjs +87 -427
  17. package/fesm2022/ng-primitives-internal.mjs.map +1 -1
  18. package/fesm2022/ng-primitives-listbox.mjs +4 -4
  19. package/fesm2022/ng-primitives-listbox.mjs.map +1 -1
  20. package/fesm2022/ng-primitives-select.mjs +4 -4
  21. package/fesm2022/ng-primitives-select.mjs.map +1 -1
  22. package/fesm2022/ng-primitives-slider.mjs +3 -3
  23. package/fesm2022/ng-primitives-slider.mjs.map +1 -1
  24. package/fesm2022/ng-primitives-switch.mjs +3 -3
  25. package/fesm2022/ng-primitives-switch.mjs.map +1 -1
  26. package/fesm2022/ng-primitives-tabs.mjs +2 -2
  27. package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
  28. package/fesm2022/ng-primitives-textarea.mjs +2 -2
  29. package/fesm2022/ng-primitives-textarea.mjs.map +1 -1
  30. package/fesm2022/ng-primitives-tooltip.mjs +3 -2
  31. package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
  32. package/interactions/config/interactions-config.d.ts +30 -0
  33. package/{internal/interactions/focus.d.ts → interactions/focus/focus-interaction.d.ts} +4 -1
  34. package/{internal/interactions/focus-visible.d.ts → interactions/focus-visible/focus-visible-interaction.d.ts} +4 -1
  35. package/{internal/interactions/hover.d.ts → interactions/hover/hover-interaction.d.ts} +2 -1
  36. package/interactions/index.d.ts +11 -1
  37. package/interactions/interactions/interactions.d.ts +20 -0
  38. package/{internal/interactions/press.d.ts → interactions/press/press-interaction.d.ts} +4 -1
  39. package/internal/index.d.ts +0 -1
  40. package/package.json +48 -48
  41. package/interactions/setup-interactions/interaction.d.ts +0 -6
  42. package/interactions/setup-interactions/setup-interactions.d.ts +0 -13
  43. package/internal/interactions/index.d.ts +0 -4
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-select.mjs","sources":["../../../../packages/ng-primitives/select/src/native-select/native-select-state.ts","../../../../packages/ng-primitives/select/src/native-select/native-select.ts","../../../../packages/ng-primitives/select/src/select/select-state.ts","../../../../packages/ng-primitives/select/src/select-dropdown/select-dropdown.ts","../../../../packages/ng-primitives/select/src/select-option/select-option.ts","../../../../packages/ng-primitives/select/src/select-portal/select-portal.ts","../../../../packages/ng-primitives/select/src/config/select-config.ts","../../../../packages/ng-primitives/select/src/select/select.ts","../../../../packages/ng-primitives/select/src/ng-primitives-select.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpNativeSelect } from './native-select';\n\n/**\n * The state token for the Select primitive.\n */\nexport const NgpNativeSelectStateToken = createStateToken<NgpNativeSelect>('Select');\n\n/**\n * Provides the Select state.\n */\nexport const provideNativeSelectState = createStateProvider(NgpNativeSelectStateToken);\n\n/**\n * Injects the Select state.\n */\nexport const injectNativeSelectState =\n createStateInjector<NgpNativeSelect>(NgpNativeSelectStateToken);\n\n/**\n * The Select state registration function.\n */\nexport const selectNativeSelectState = createState(NgpNativeSelectStateToken);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input } from '@angular/core';\nimport { setupFormControl } from 'ng-primitives/form-field';\nimport { setupInteractions } from 'ng-primitives/interactions';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { provideNativeSelectState, selectNativeSelectState } from './native-select-state';\n\n/**\n * Apply the `ngpNativeSelect` directive to a select element that you want to enhance.\n */\n@Directive({\n selector: 'select[ngpNativeSelect]',\n exportAs: 'ngpNativeSelect',\n providers: [provideNativeSelectState()],\n host: {\n '[attr.disabled]': 'state.disabled() || null',\n },\n})\nexport class NgpNativeSelect {\n /**\n * The id of the select. If not provided, a unique id will be generated.\n */\n readonly id = input<string>(uniqueId('ngp-native-select'));\n\n /**\n * Whether the select is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpNativeSelectDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * The select state.\n */\n private readonly state = selectNativeSelectState<NgpNativeSelect>(this);\n\n constructor() {\n setupInteractions({\n hover: true,\n press: true,\n focus: true,\n focusVisible: true,\n disabled: this.state.disabled,\n });\n setupFormControl({ id: this.state.id, disabled: this.state.disabled });\n }\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpSelect } from './select';\n\n/**\n * The state token for the Select primitive.\n */\nexport const NgpSelectStateToken = createStateToken<NgpSelect>('Select');\n\n/**\n * Provides the Select state.\n */\nexport const provideSelectState = createStateProvider(NgpSelectStateToken);\n\n/**\n * Injects the Select state.\n */\nexport const injectSelectState = createStateInjector<NgpSelect>(NgpSelectStateToken);\n\n/**\n * The Select state registration function.\n */\nexport const selectState = createState(NgpSelectStateToken);\n","import { Directive, input } from '@angular/core';\nimport { injectElementRef, observeResize } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectSelectState } from '../select/select-state';\n\n@Directive({\n selector: '[ngpSelectDropdown]',\n exportAs: 'ngpSelectDropdown',\n host: {\n role: 'listbox',\n '[id]': 'id()',\n '[style.left.px]': 'state().overlay()?.position()?.x',\n '[style.top.px]': 'state().overlay()?.position()?.y',\n '[style.--ngp-select-transform-origin]': 'state().overlay()?.transformOrigin()',\n '[style.--ngp-select-width.px]': 'selectDimensions().width',\n },\n})\nexport class NgpSelectDropdown {\n /** Access the select state. */\n protected readonly state = injectSelectState();\n\n /** The dimensions of the select. */\n protected readonly selectDimensions = observeResize(() => this.state().elementRef.nativeElement);\n\n /**\n * Access the element reference.\n * @internal\n */\n readonly elementRef = injectElementRef();\n\n /** The id of the dropdown. */\n readonly id = input<string>(uniqueId('ngp-select-dropdown'));\n\n constructor() {\n this.state().registerDropdown(this);\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n HostListener,\n input,\n OnDestroy,\n OnInit,\n} from '@angular/core';\nimport { NgpActivatable } from 'ng-primitives/a11y';\nimport { setupInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectSelectState } from '../select/select-state';\n\n@Directive({\n selector: '[ngpSelectOption]',\n exportAs: 'ngpSelectOption',\n host: {\n role: 'option',\n '[id]': 'id()',\n '[attr.tabindex]': '-1',\n '[attr.aria-selected]': 'selected() ? \"true\" : undefined',\n '[attr.data-selected]': 'selected() ? \"\" : undefined',\n '[attr.data-active]': 'active() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined',\n '(click)': 'select()',\n },\n})\nexport class NgpSelectOption implements OnInit, OnDestroy, NgpActivatable {\n /** Access the select state. */\n protected readonly state = injectSelectState();\n\n /**\n * The element reference of the option.\n * @internal\n */\n readonly elementRef = injectElementRef();\n\n /** The id of the option. */\n readonly id = input<string>(uniqueId('ngp-select-option'));\n\n /** @required The value of the option. */\n readonly value = input<any>(undefined, {\n alias: 'ngpSelectOptionValue',\n });\n\n /** The disabled state of the option. */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpSelectOptionDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Whether this option is the active descendant.\n * @internal\n */\n protected readonly active = computed(\n () => this.state().activeDescendantManager.activeDescendant() === this.id(),\n );\n\n /** Whether this option is selected. */\n protected readonly selected = computed(() => {\n const value = this.value();\n\n if (!value) {\n return false;\n }\n\n if (this.state().multiple()) {\n return (\n Array.isArray(value) && value.some(v => this.state().compareWith()(v, this.state().value()))\n );\n }\n\n return this.state().compareWith()(value, this.state().value());\n });\n\n constructor() {\n this.state().registerOption(this);\n\n setupInteractions({\n hover: true,\n press: true,\n disabled: this.disabled,\n });\n }\n\n ngOnInit(): void {\n if (this.value() === undefined) {\n throw new Error(\n 'ngpSelectOption: The value input is required. Please provide a value for the option.',\n );\n }\n }\n\n ngOnDestroy(): void {\n this.state().unregisterOption(this);\n }\n\n /**\n * Select the option.\n * @internal\n */\n select(): void {\n if (this.disabled()) {\n return;\n }\n\n this.state().toggleOption(this);\n }\n\n /**\n * Scroll the option into view.\n * @internal\n */\n scrollIntoView(): void {\n this.elementRef.nativeElement.scrollIntoView({ block: 'nearest' });\n }\n\n /**\n * Whenever the pointer enters the option, activate it.\n * @internal\n */\n @HostListener('pointerenter')\n protected onPointerEnter(): void {\n this.state().activeDescendantManager.activate(this);\n }\n\n /**\n * Whenever the pointer leaves the option, deactivate it.\n * @internal\n */\n @HostListener('pointerleave')\n protected onPointerLeave(): void {\n this.state().activeDescendantManager.activate(undefined);\n }\n}\n","import {\n Directive,\n inject,\n Injector,\n OnDestroy,\n signal,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport { createOverlay, NgpOverlay, NgpOverlayConfig } from 'ng-primitives/portal';\nimport { injectSelectState } from '../select/select-state';\n\n@Directive({\n selector: '[ngpSelectPortal]',\n exportAs: 'ngpSelectPortal',\n})\nexport class NgpSelectPortal implements OnDestroy {\n /** Access the select state. */\n private readonly state = injectSelectState();\n /** Access the view container reference. */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /** Access the template reference. */\n private readonly templateRef = inject(TemplateRef);\n\n /** Access the injector. */\n private readonly injector = inject(Injector);\n\n /**\n * The overlay that manages the popover\n * @internal\n */\n readonly overlay = signal<NgpOverlay<void> | null>(null);\n\n constructor() {\n this.state().registerPortal(this);\n }\n\n /** Cleanup the portal. */\n ngOnDestroy(): void {\n this.overlay()?.destroy();\n }\n\n /**\n * Attach the portal.\n * @internal\n */\n show(): Promise<void> {\n // Create the overlay if it doesn't exist yet\n if (!this.overlay()) {\n this.createOverlay();\n }\n\n // Show the overlay\n return this.overlay()!.show();\n }\n\n /**\n * Detach the portal.\n * @internal\n */\n async detach(): Promise<void> {\n this.overlay()?.hide();\n }\n\n /**\n * Create the overlay that will contain the dropdown\n */\n private createOverlay(): void {\n // Create config for the overlay\n const config: NgpOverlayConfig<void> = {\n content: this.templateRef,\n viewContainerRef: this.viewContainerRef,\n triggerElement: this.state().elementRef.nativeElement,\n injector: this.injector,\n placement: this.state().placement,\n closeOnOutsideClick: true,\n closeOnEscape: true,\n restoreFocus: false,\n scrollBehaviour: 'reposition',\n container: this.state().container(),\n };\n\n this.overlay.set(createOverlay(config));\n }\n}\n","import { InjectionToken, Provider, inject } from '@angular/core';\nimport type { Placement } from '@floating-ui/dom';\n\nexport interface NgpSelectConfig {\n /**\n * The default placement for the select dropdown.\n * @default 'bottom'\n */\n placement: Placement;\n\n /**\n * The container element or selector for the select dropdown.\n * This can be used to control where the dropdown is rendered in the DOM.\n * @default 'body'\n */\n container: HTMLElement | string | null;\n}\n\nexport const defaultSelectConfig: NgpSelectConfig = {\n placement: 'bottom',\n container: 'body',\n};\n\nexport const NgpSelectConfigToken = new InjectionToken<NgpSelectConfig>('NgpSelectConfigToken');\n\n/**\n * Provide the default Select configuration\n * @param config The Select configuration\n * @returns The provider\n */\nexport function provideSelectConfig(config: Partial<NgpSelectConfig>): Provider[] {\n return [\n {\n provide: NgpSelectConfigToken,\n useValue: { ...defaultSelectConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Select configuration\n * @returns The global Select configuration\n */\nexport function injectSelectConfig(): NgpSelectConfig {\n return inject(NgpSelectConfigToken, { optional: true }) ?? defaultSelectConfig;\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n Directive,\n HostListener,\n inject,\n Injector,\n input,\n output,\n signal,\n} from '@angular/core';\nimport type { Placement } from '@floating-ui/dom';\nimport { activeDescendantManager } from 'ng-primitives/a11y';\nimport { setupFormControl } from 'ng-primitives/form-field';\nimport { setupInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectSelectConfig } from '../config/select-config';\nimport type { NgpSelectDropdown } from '../select-dropdown/select-dropdown';\nimport { NgpSelectOption } from '../select-option/select-option';\nimport type { NgpSelectPortal } from '../select-portal/select-portal';\nimport { provideSelectState, selectState } from './select-state';\n\n/**\n * Ideally we would use a generic type here, unfortunately, unlike in React,\n * we cannot infer the type based on another input. For example, if multiple\n * is true, we cannot infer that the value is an array of T. Using a union\n * type is not ideal either because it requires the user to handle multiple cases.\n * Using a generic also isn't ideal because we need to use T as both an array and\n * a single value.\n *\n * Any seems to be used by Angular Material, ng-select, and other libraries\n * so we will use it here as well.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype T = any;\n\n@Directive({\n selector: '[ngpSelect]',\n exportAs: 'ngpSelect',\n providers: [provideSelectState()],\n host: {\n role: 'combobox',\n '[id]': 'state.id()',\n '[attr.aria-expanded]': 'state.open()',\n '[attr.aria-controls]': 'state.open() ? state.dropdown()?.id() : undefined',\n '[attr.aria-activedescendant]':\n 'state.open() ? activeDescendantManager.activeDescendant() : undefined',\n '[attr.tabindex]': 'state.disabled() ? -1 : 0',\n '[attr.data-open]': 'state.open() ? \"\" : undefined',\n '[attr.data-disabled]': 'state.disabled() ? \"\" : undefined',\n '[attr.data-multiple]': 'state.multiple() ? \"\" : undefined',\n },\n})\nexport class NgpSelect {\n /** Access the select configuration. */\n protected readonly config = injectSelectConfig();\n\n /** @internal Access the select element. */\n readonly elementRef = injectElementRef();\n\n /** Access the injector. */\n protected readonly injector = inject(Injector);\n\n /** The unique id of the select. */\n readonly id = input(uniqueId('ngp-select'));\n\n /** The value of the select. */\n readonly value = input<T>(undefined, {\n alias: 'ngpSelectValue',\n });\n\n /** Event emitted when the value changes. */\n readonly valueChange = output<T>({\n alias: 'ngpSelectValueChange',\n });\n\n /** Whether the select is multiple selection. */\n readonly multiple = input<boolean, BooleanInput>(false, {\n alias: 'ngpSelectMultiple',\n transform: booleanAttribute,\n });\n\n /** Whether the select is disabled. */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpSelectDisabled',\n transform: booleanAttribute,\n });\n\n /** Emit when the dropdown open state changes. */\n readonly openChange = output<boolean>({\n alias: 'ngpSelectOpenChange',\n });\n\n /** The comparator function used to compare options. */\n readonly compareWith = input<(a: T | undefined, b: T | undefined) => boolean>(Object.is, {\n alias: 'ngpSelectCompareWith',\n });\n\n /** The position of the dropdown. */\n readonly placement = input<Placement>(this.config.placement, {\n alias: 'ngpSelectDropdownPlacement',\n });\n\n /** The container for the dropdown. */\n readonly container = input<HTMLElement | string | null>(this.config.container, {\n alias: 'ngpSelectDropdownContainer',\n });\n\n /**\n * Store the select portal.\n * @internal\n */\n readonly portal = signal<NgpSelectPortal | undefined>(undefined);\n\n /**\n * Store the select dropdown.\n * @internal\n */\n readonly dropdown = signal<NgpSelectDropdown | undefined>(undefined);\n\n /**\n * Store the select options.\n * @internal\n */\n readonly options = signal<NgpSelectOption[]>([]);\n\n /**\n * Access the overlay\n * @internal\n */\n readonly overlay = computed(() => this.portal()?.overlay());\n\n /**\n * The open state of the select.\n * @internal\n */\n readonly open = computed(() => this.overlay()?.isOpen() ?? false);\n\n /**\n * The active key descendant manager.\n * @internal\n */\n readonly activeDescendantManager = activeDescendantManager({\n // we must wrap the signal in a computed to ensure it is not used before it is defined\n disabled: computed(() => this.state.disabled()),\n items: this.options,\n });\n\n /** The state of the select. */\n protected readonly state = selectState<NgpSelect>(this);\n\n constructor() {\n setupInteractions({\n focus: true,\n focusWithin: true,\n hover: true,\n press: true,\n disabled: this.state.disabled,\n });\n\n setupFormControl({ id: this.state.id, disabled: this.state.disabled });\n\n // any time the active descendant changes, ensure we scroll it into view\n // perform after next render to ensure the DOM is updated\n // e.g. the dropdown is open before the option is scrolled into view\n afterRenderEffect({\n write: () => {\n const isPositioned = this.portal()?.overlay()?.isPositioned() ?? false;\n const activeItem = this.activeDescendantManager.activeItem();\n\n if (!isPositioned || !activeItem) {\n return;\n }\n\n this.activeDescendantManager.activeItem()?.scrollIntoView?.();\n },\n });\n }\n\n /**\n * Open the dropdown.\n * @internal\n */\n async openDropdown(): Promise<void> {\n if (this.state.disabled() || this.open()) {\n return;\n }\n\n this.openChange.emit(true);\n await this.portal()?.show();\n\n // if there is a selected option(s), set the active descendant to the first selected option\n const selectedOption = this.options().find(option => this.isOptionSelected(option));\n\n // if there is no selected option, set the active descendant to the first option\n const targetOption = selectedOption ?? this.options()[0];\n\n // if there is no target option, do nothing\n if (!targetOption) {\n return;\n }\n\n // activate the selected option or the first option\n this.activeDescendantManager.activate(targetOption);\n }\n\n /**\n * Close the dropdown.\n * @internal\n */\n closeDropdown(): void {\n if (!this.open()) {\n return;\n }\n\n this.openChange.emit(false);\n this.portal()?.detach();\n\n // clear the active descendant\n this.activeDescendantManager.reset();\n }\n\n /**\n * Toggle the dropdown.\n * @internal\n */\n @HostListener('click')\n async toggleDropdown(): Promise<void> {\n if (this.open()) {\n this.closeDropdown();\n } else {\n await this.openDropdown();\n }\n }\n\n /**\n * Select an option.\n * @param option The option to select.\n * @internal\n */\n selectOption(option: NgpSelectOption | undefined): void {\n if (this.state.disabled()) {\n return;\n }\n\n if (!option) {\n this.state.value.set(undefined);\n this.closeDropdown();\n return;\n }\n\n if (this.state.multiple()) {\n // if the option is already selected, do nothing\n if (this.isOptionSelected(option)) {\n return;\n }\n\n const value = [...((this.state.value() ?? []) as T[]), option.value() as T];\n\n // add the option to the value\n this.state.value.set(value as T);\n this.valueChange.emit(value as T);\n } else {\n this.state.value.set(option.value() as T);\n this.valueChange.emit(option.value() as T);\n\n // close the dropdown on single selection\n this.closeDropdown();\n }\n }\n\n /**\n * Deselect an option.\n * @param option The option to deselect.\n * @internal\n */\n deselectOption(option: NgpSelectOption): void {\n // if the select is disabled or the option is not selected, do nothing\n // if the select is single selection, we don't allow deselecting\n if (this.state.disabled() || !this.isOptionSelected(option) || !this.state.multiple()) {\n return;\n }\n\n const values = (this.state.value() as T[]) ?? [];\n\n const newValue = values.filter(v => !this.state.compareWith()(v, option.value() as T));\n\n // remove the option from the value\n this.state.value.set(newValue as T);\n this.valueChange.emit(newValue as T);\n }\n\n /**\n * Toggle the selection of an option.\n * @param option The option to toggle.\n * @internal\n */\n toggleOption(option: NgpSelectOption): void {\n if (this.state.disabled()) {\n return;\n }\n\n // if the state is single selection, we don't allow toggling\n if (!this.state.multiple()) {\n // always select the option in single selection mode even if it is already selected so that we update the input\n this.selectOption(option);\n return;\n }\n\n // otherwise toggle the option\n if (this.isOptionSelected(option)) {\n this.deselectOption(option);\n } else {\n this.selectOption(option);\n }\n }\n\n /**\n * Determine if an option is selected.\n * @param option The option to check.\n * @internal\n */\n isOptionSelected(option: NgpSelectOption): boolean {\n if (this.state.disabled()) {\n return false;\n }\n\n const value = this.state.value();\n\n if (!value) {\n return false;\n }\n\n if (this.state.multiple()) {\n return value && (value as T[]).some(v => this.state.compareWith()(option.value(), v));\n }\n\n return this.state.compareWith()(option.value(), value);\n }\n\n /**\n * Activate the next option in the list if there is one.\n * If there is no option currently active, activate the selected option or the first option.\n * @internal\n */\n activateNextOption(): void {\n if (this.state.disabled()) {\n return;\n }\n\n const options = this.options();\n\n // if there are no options, do nothing\n if (options.length === 0) {\n return;\n }\n\n // if there is no active option, activate the first option\n if (!this.activeDescendantManager.activeItem()) {\n const selectedOption = options.find(option => this.isOptionSelected(option));\n\n // if there is a selected option(s), set the active descendant to the first selected option\n const targetOption = selectedOption ?? options[0];\n\n this.activeDescendantManager.activate(targetOption);\n return;\n }\n\n // otherwise activate the next option\n this.activeDescendantManager.next();\n }\n\n /**\n * Activate the previous option in the list if there is one.\n * @internal\n */\n activatePreviousOption(): void {\n if (this.state.disabled()) {\n return;\n }\n const options = this.options();\n // if there are no options, do nothing\n if (options.length === 0) {\n return;\n }\n // if there is no active option, activate the last option\n if (!this.activeDescendantManager.activeItem()) {\n const selectedOption = options.find(option => this.isOptionSelected(option));\n // if there is a selected option(s), set the active descendant to the first selected option\n const targetOption = selectedOption ?? options[options.length - 1];\n this.activeDescendantManager.activate(targetOption);\n return;\n }\n // otherwise activate the previous option\n this.activeDescendantManager.previous();\n }\n\n /**\n * Register the dropdown portal with the select.\n * @param portal The dropdown portal.\n * @internal\n */\n registerPortal(portal: NgpSelectPortal): void {\n this.portal.set(portal);\n }\n\n /**\n * Register the dropdown with the select.\n * @param dropdown The dropdown to register.\n * @internal\n */\n registerDropdown(dropdown: NgpSelectDropdown): void {\n this.dropdown.set(dropdown);\n }\n\n /**\n * Register an option with the select.\n * @param option The option to register.\n * @internal\n */\n registerOption(option: NgpSelectOption): void {\n this.options.update(options => [...options, option]);\n }\n\n /**\n * Unregister an option from the select.\n * @param option The option to unregister.\n * @internal\n */\n unregisterOption(option: NgpSelectOption): void {\n this.options.update(options => options.filter(o => o !== option));\n }\n\n /**\n * Focus the select.\n * @internal\n */\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n /** Handle keydown events for accessibility. */\n @HostListener('keydown', ['$event'])\n protected handleKeydown(event: KeyboardEvent): void {\n switch (event.key) {\n case 'ArrowDown':\n if (this.open()) {\n this.activateNextOption();\n } else {\n this.openDropdown();\n }\n event.preventDefault();\n break;\n case 'ArrowUp':\n if (this.open()) {\n this.activatePreviousOption();\n } else {\n this.openDropdown();\n this.activeDescendantManager.last();\n }\n event.preventDefault();\n break;\n case 'Home':\n if (this.open()) {\n this.activeDescendantManager.first();\n }\n event.preventDefault();\n break;\n case 'End':\n if (this.open()) {\n this.activeDescendantManager.last();\n }\n event.preventDefault();\n break;\n case 'Enter':\n if (this.open()) {\n this.selectOption(this.activeDescendantManager.activeItem());\n } else {\n this.openDropdown();\n }\n event.preventDefault();\n break;\n case ' ':\n this.toggleDropdown();\n event.preventDefault();\n break;\n }\n }\n\n @HostListener('blur', ['$event'])\n protected onBlur(event: FocusEvent): void {\n const relatedTarget = event.relatedTarget as HTMLElement;\n\n // if the blur was caused by focus moving to the dropdown, don't close\n if (relatedTarget && this.dropdown()?.elementRef.nativeElement.contains(relatedTarget)) {\n return;\n }\n\n this.closeDropdown();\n event.preventDefault();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAQA;;AAEG;AACI,MAAM,yBAAyB,GAAG,gBAAgB,CAAkB,QAAQ,CAAC;AAEpF;;AAEG;MACU,wBAAwB,GAAG,mBAAmB,CAAC,yBAAyB;AAErF;;AAEG;MACU,uBAAuB,GAClC,mBAAmB,CAAkB,yBAAyB;AAEhE;;AAEG;AACI,MAAM,uBAAuB,GAAG,WAAW,CAAC,yBAAyB,CAAC;;ACpB7E;;AAEG;MASU,eAAe,CAAA;AAmB1B,IAAA,WAAA,GAAA;AAlBA;;AAEG;QACM,IAAA,CAAA,EAAE,GAAG,KAAK,CAAS,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AAE1D;;AAEG;AACM,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,EAAE;AACtD,YAAA,KAAK,EAAE,yBAAyB;AAChC,YAAA,SAAS,EAAE,gBAAgB;AAC5B,SAAA,CAAC;AAEF;;AAEG;AACc,QAAA,IAAA,CAAA,KAAK,GAAG,uBAAuB,CAAkB,IAAI,C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,EAAA,CAAA,CAAA;;4FActB,SAAS,EAAA,UAAA,EAAA,CAAA;kBAjBrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,SAAS,EAAE,CAAC,kBAAkB,EAAE,CAAC;AACjC,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,UAAU;AAChB,wBAAA,MAAM,EAAE,YAAY;AACpB,wBAAA,sBAAsB,EAAE,cAAc;AACtC,wBAAA,sBAAsB,EAAE,mDAAmD;AAC3E,wBAAA,8BAA8B,EAC5B,uEAAuE;AACzE,wBAAA,iBAAiB,EAAE,2BAA2B;AAC9C,wBAAA,kBAAkB,EAAE,+BAA+B;AACnD,wBAAA,sBAAsB,EAAE,mCAAmC;AAC3D,wBAAA,sBAAsB,EAAE,mCAAmC;AAC5D,qBAAA;AACF,iBAAA;wDA+KO,cAAc,EAAA,CAAA;sBADnB,YAAY;uBAAC,OAAO;gBAyNX,aAAa,EAAA,CAAA;sBADtB,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;gBAgDzB,MAAM,EAAA,CAAA;sBADf,YAAY;uBAAC,MAAM,EAAE,CAAC,QAAQ,CAAC;;;AC5elC;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-select.mjs","sources":["../../../../packages/ng-primitives/select/src/native-select/native-select-state.ts","../../../../packages/ng-primitives/select/src/native-select/native-select.ts","../../../../packages/ng-primitives/select/src/select/select-state.ts","../../../../packages/ng-primitives/select/src/select-dropdown/select-dropdown.ts","../../../../packages/ng-primitives/select/src/select-option/select-option.ts","../../../../packages/ng-primitives/select/src/select-portal/select-portal.ts","../../../../packages/ng-primitives/select/src/config/select-config.ts","../../../../packages/ng-primitives/select/src/select/select.ts","../../../../packages/ng-primitives/select/src/ng-primitives-select.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpNativeSelect } from './native-select';\n\n/**\n * The state token for the Select primitive.\n */\nexport const NgpNativeSelectStateToken = createStateToken<NgpNativeSelect>('Select');\n\n/**\n * Provides the Select state.\n */\nexport const provideNativeSelectState = createStateProvider(NgpNativeSelectStateToken);\n\n/**\n * Injects the Select state.\n */\nexport const injectNativeSelectState =\n createStateInjector<NgpNativeSelect>(NgpNativeSelectStateToken);\n\n/**\n * The Select state registration function.\n */\nexport const selectNativeSelectState = createState(NgpNativeSelectStateToken);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input } from '@angular/core';\nimport { setupFormControl } from 'ng-primitives/form-field';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { provideNativeSelectState, selectNativeSelectState } from './native-select-state';\n\n/**\n * Apply the `ngpNativeSelect` directive to a select element that you want to enhance.\n */\n@Directive({\n selector: 'select[ngpNativeSelect]',\n exportAs: 'ngpNativeSelect',\n providers: [provideNativeSelectState()],\n host: {\n '[attr.disabled]': 'state.disabled() || null',\n },\n})\nexport class NgpNativeSelect {\n /**\n * The id of the select. If not provided, a unique id will be generated.\n */\n readonly id = input<string>(uniqueId('ngp-native-select'));\n\n /**\n * Whether the select is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpNativeSelectDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * The select state.\n */\n private readonly state = selectNativeSelectState<NgpNativeSelect>(this);\n\n constructor() {\n ngpInteractions({\n hover: true,\n press: true,\n focus: true,\n focusVisible: true,\n disabled: this.state.disabled,\n });\n setupFormControl({ id: this.state.id, disabled: this.state.disabled });\n }\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpSelect } from './select';\n\n/**\n * The state token for the Select primitive.\n */\nexport const NgpSelectStateToken = createStateToken<NgpSelect>('Select');\n\n/**\n * Provides the Select state.\n */\nexport const provideSelectState = createStateProvider(NgpSelectStateToken);\n\n/**\n * Injects the Select state.\n */\nexport const injectSelectState = createStateInjector<NgpSelect>(NgpSelectStateToken);\n\n/**\n * The Select state registration function.\n */\nexport const selectState = createState(NgpSelectStateToken);\n","import { Directive, input } from '@angular/core';\nimport { injectElementRef, observeResize } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectSelectState } from '../select/select-state';\n\n@Directive({\n selector: '[ngpSelectDropdown]',\n exportAs: 'ngpSelectDropdown',\n host: {\n role: 'listbox',\n '[id]': 'id()',\n '[style.left.px]': 'state().overlay()?.position()?.x',\n '[style.top.px]': 'state().overlay()?.position()?.y',\n '[style.--ngp-select-transform-origin]': 'state().overlay()?.transformOrigin()',\n '[style.--ngp-select-width.px]': 'selectDimensions().width',\n },\n})\nexport class NgpSelectDropdown {\n /** Access the select state. */\n protected readonly state = injectSelectState();\n\n /** The dimensions of the select. */\n protected readonly selectDimensions = observeResize(() => this.state().elementRef.nativeElement);\n\n /**\n * Access the element reference.\n * @internal\n */\n readonly elementRef = injectElementRef();\n\n /** The id of the dropdown. */\n readonly id = input<string>(uniqueId('ngp-select-dropdown'));\n\n constructor() {\n this.state().registerDropdown(this);\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n HostListener,\n input,\n OnDestroy,\n OnInit,\n} from '@angular/core';\nimport { NgpActivatable } from 'ng-primitives/a11y';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectSelectState } from '../select/select-state';\n\n@Directive({\n selector: '[ngpSelectOption]',\n exportAs: 'ngpSelectOption',\n host: {\n role: 'option',\n '[id]': 'id()',\n '[attr.tabindex]': '-1',\n '[attr.aria-selected]': 'selected() ? \"true\" : undefined',\n '[attr.data-selected]': 'selected() ? \"\" : undefined',\n '[attr.data-active]': 'active() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined',\n '(click)': 'select()',\n },\n})\nexport class NgpSelectOption implements OnInit, OnDestroy, NgpActivatable {\n /** Access the select state. */\n protected readonly state = injectSelectState();\n\n /**\n * The element reference of the option.\n * @internal\n */\n readonly elementRef = injectElementRef();\n\n /** The id of the option. */\n readonly id = input<string>(uniqueId('ngp-select-option'));\n\n /** @required The value of the option. */\n readonly value = input<any>(undefined, {\n alias: 'ngpSelectOptionValue',\n });\n\n /** The disabled state of the option. */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpSelectOptionDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Whether this option is the active descendant.\n * @internal\n */\n protected readonly active = computed(\n () => this.state().activeDescendantManager.activeDescendant() === this.id(),\n );\n\n /** Whether this option is selected. */\n protected readonly selected = computed(() => {\n const value = this.value();\n\n if (!value) {\n return false;\n }\n\n if (this.state().multiple()) {\n return (\n Array.isArray(value) && value.some(v => this.state().compareWith()(v, this.state().value()))\n );\n }\n\n return this.state().compareWith()(value, this.state().value());\n });\n\n constructor() {\n this.state().registerOption(this);\n\n ngpInteractions({\n hover: true,\n press: true,\n disabled: this.disabled,\n });\n }\n\n ngOnInit(): void {\n if (this.value() === undefined) {\n throw new Error(\n 'ngpSelectOption: The value input is required. Please provide a value for the option.',\n );\n }\n }\n\n ngOnDestroy(): void {\n this.state().unregisterOption(this);\n }\n\n /**\n * Select the option.\n * @internal\n */\n select(): void {\n if (this.disabled()) {\n return;\n }\n\n this.state().toggleOption(this);\n }\n\n /**\n * Scroll the option into view.\n * @internal\n */\n scrollIntoView(): void {\n this.elementRef.nativeElement.scrollIntoView({ block: 'nearest' });\n }\n\n /**\n * Whenever the pointer enters the option, activate it.\n * @internal\n */\n @HostListener('pointerenter')\n protected onPointerEnter(): void {\n this.state().activeDescendantManager.activate(this);\n }\n\n /**\n * Whenever the pointer leaves the option, deactivate it.\n * @internal\n */\n @HostListener('pointerleave')\n protected onPointerLeave(): void {\n this.state().activeDescendantManager.activate(undefined);\n }\n}\n","import {\n Directive,\n inject,\n Injector,\n OnDestroy,\n signal,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport { createOverlay, NgpOverlay, NgpOverlayConfig } from 'ng-primitives/portal';\nimport { injectSelectState } from '../select/select-state';\n\n@Directive({\n selector: '[ngpSelectPortal]',\n exportAs: 'ngpSelectPortal',\n})\nexport class NgpSelectPortal implements OnDestroy {\n /** Access the select state. */\n private readonly state = injectSelectState();\n /** Access the view container reference. */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /** Access the template reference. */\n private readonly templateRef = inject(TemplateRef);\n\n /** Access the injector. */\n private readonly injector = inject(Injector);\n\n /**\n * The overlay that manages the popover\n * @internal\n */\n readonly overlay = signal<NgpOverlay<void> | null>(null);\n\n constructor() {\n this.state().registerPortal(this);\n }\n\n /** Cleanup the portal. */\n ngOnDestroy(): void {\n this.overlay()?.destroy();\n }\n\n /**\n * Attach the portal.\n * @internal\n */\n show(): Promise<void> {\n // Create the overlay if it doesn't exist yet\n if (!this.overlay()) {\n this.createOverlay();\n }\n\n // Show the overlay\n return this.overlay()!.show();\n }\n\n /**\n * Detach the portal.\n * @internal\n */\n async detach(): Promise<void> {\n this.overlay()?.hide();\n }\n\n /**\n * Create the overlay that will contain the dropdown\n */\n private createOverlay(): void {\n // Create config for the overlay\n const config: NgpOverlayConfig<void> = {\n content: this.templateRef,\n viewContainerRef: this.viewContainerRef,\n triggerElement: this.state().elementRef.nativeElement,\n injector: this.injector,\n placement: this.state().placement,\n closeOnOutsideClick: true,\n closeOnEscape: true,\n restoreFocus: false,\n scrollBehaviour: 'reposition',\n container: this.state().container(),\n };\n\n this.overlay.set(createOverlay(config));\n }\n}\n","import { InjectionToken, Provider, inject } from '@angular/core';\nimport type { Placement } from '@floating-ui/dom';\n\nexport interface NgpSelectConfig {\n /**\n * The default placement for the select dropdown.\n * @default 'bottom'\n */\n placement: Placement;\n\n /**\n * The container element or selector for the select dropdown.\n * This can be used to control where the dropdown is rendered in the DOM.\n * @default 'body'\n */\n container: HTMLElement | string | null;\n}\n\nexport const defaultSelectConfig: NgpSelectConfig = {\n placement: 'bottom',\n container: 'body',\n};\n\nexport const NgpSelectConfigToken = new InjectionToken<NgpSelectConfig>('NgpSelectConfigToken');\n\n/**\n * Provide the default Select configuration\n * @param config The Select configuration\n * @returns The provider\n */\nexport function provideSelectConfig(config: Partial<NgpSelectConfig>): Provider[] {\n return [\n {\n provide: NgpSelectConfigToken,\n useValue: { ...defaultSelectConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Select configuration\n * @returns The global Select configuration\n */\nexport function injectSelectConfig(): NgpSelectConfig {\n return inject(NgpSelectConfigToken, { optional: true }) ?? defaultSelectConfig;\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n Directive,\n HostListener,\n inject,\n Injector,\n input,\n output,\n signal,\n} from '@angular/core';\nimport type { Placement } from '@floating-ui/dom';\nimport { activeDescendantManager } from 'ng-primitives/a11y';\nimport { setupFormControl } from 'ng-primitives/form-field';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectSelectConfig } from '../config/select-config';\nimport type { NgpSelectDropdown } from '../select-dropdown/select-dropdown';\nimport { NgpSelectOption } from '../select-option/select-option';\nimport type { NgpSelectPortal } from '../select-portal/select-portal';\nimport { provideSelectState, selectState } from './select-state';\n\n/**\n * Ideally we would use a generic type here, unfortunately, unlike in React,\n * we cannot infer the type based on another input. For example, if multiple\n * is true, we cannot infer that the value is an array of T. Using a union\n * type is not ideal either because it requires the user to handle multiple cases.\n * Using a generic also isn't ideal because we need to use T as both an array and\n * a single value.\n *\n * Any seems to be used by Angular Material, ng-select, and other libraries\n * so we will use it here as well.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype T = any;\n\n@Directive({\n selector: '[ngpSelect]',\n exportAs: 'ngpSelect',\n providers: [provideSelectState()],\n host: {\n role: 'combobox',\n '[id]': 'state.id()',\n '[attr.aria-expanded]': 'state.open()',\n '[attr.aria-controls]': 'state.open() ? state.dropdown()?.id() : undefined',\n '[attr.aria-activedescendant]':\n 'state.open() ? activeDescendantManager.activeDescendant() : undefined',\n '[attr.tabindex]': 'state.disabled() ? -1 : 0',\n '[attr.data-open]': 'state.open() ? \"\" : undefined',\n '[attr.data-disabled]': 'state.disabled() ? \"\" : undefined',\n '[attr.data-multiple]': 'state.multiple() ? \"\" : undefined',\n },\n})\nexport class NgpSelect {\n /** Access the select configuration. */\n protected readonly config = injectSelectConfig();\n\n /** @internal Access the select element. */\n readonly elementRef = injectElementRef();\n\n /** Access the injector. */\n protected readonly injector = inject(Injector);\n\n /** The unique id of the select. */\n readonly id = input(uniqueId('ngp-select'));\n\n /** The value of the select. */\n readonly value = input<T>(undefined, {\n alias: 'ngpSelectValue',\n });\n\n /** Event emitted when the value changes. */\n readonly valueChange = output<T>({\n alias: 'ngpSelectValueChange',\n });\n\n /** Whether the select is multiple selection. */\n readonly multiple = input<boolean, BooleanInput>(false, {\n alias: 'ngpSelectMultiple',\n transform: booleanAttribute,\n });\n\n /** Whether the select is disabled. */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpSelectDisabled',\n transform: booleanAttribute,\n });\n\n /** Emit when the dropdown open state changes. */\n readonly openChange = output<boolean>({\n alias: 'ngpSelectOpenChange',\n });\n\n /** The comparator function used to compare options. */\n readonly compareWith = input<(a: T | undefined, b: T | undefined) => boolean>(Object.is, {\n alias: 'ngpSelectCompareWith',\n });\n\n /** The position of the dropdown. */\n readonly placement = input<Placement>(this.config.placement, {\n alias: 'ngpSelectDropdownPlacement',\n });\n\n /** The container for the dropdown. */\n readonly container = input<HTMLElement | string | null>(this.config.container, {\n alias: 'ngpSelectDropdownContainer',\n });\n\n /**\n * Store the select portal.\n * @internal\n */\n readonly portal = signal<NgpSelectPortal | undefined>(undefined);\n\n /**\n * Store the select dropdown.\n * @internal\n */\n readonly dropdown = signal<NgpSelectDropdown | undefined>(undefined);\n\n /**\n * Store the select options.\n * @internal\n */\n readonly options = signal<NgpSelectOption[]>([]);\n\n /**\n * Access the overlay\n * @internal\n */\n readonly overlay = computed(() => this.portal()?.overlay());\n\n /**\n * The open state of the select.\n * @internal\n */\n readonly open = computed(() => this.overlay()?.isOpen() ?? false);\n\n /**\n * The active key descendant manager.\n * @internal\n */\n readonly activeDescendantManager = activeDescendantManager({\n // we must wrap the signal in a computed to ensure it is not used before it is defined\n disabled: computed(() => this.state.disabled()),\n items: this.options,\n });\n\n /** The state of the select. */\n protected readonly state = selectState<NgpSelect>(this);\n\n constructor() {\n ngpInteractions({\n focus: true,\n focusWithin: true,\n hover: true,\n press: true,\n disabled: this.state.disabled,\n });\n\n setupFormControl({ id: this.state.id, disabled: this.state.disabled });\n\n // any time the active descendant changes, ensure we scroll it into view\n // perform after next render to ensure the DOM is updated\n // e.g. the dropdown is open before the option is scrolled into view\n afterRenderEffect({\n write: () => {\n const isPositioned = this.portal()?.overlay()?.isPositioned() ?? false;\n const activeItem = this.activeDescendantManager.activeItem();\n\n if (!isPositioned || !activeItem) {\n return;\n }\n\n this.activeDescendantManager.activeItem()?.scrollIntoView?.();\n },\n });\n }\n\n /**\n * Open the dropdown.\n * @internal\n */\n async openDropdown(): Promise<void> {\n if (this.state.disabled() || this.open()) {\n return;\n }\n\n this.openChange.emit(true);\n await this.portal()?.show();\n\n // if there is a selected option(s), set the active descendant to the first selected option\n const selectedOption = this.options().find(option => this.isOptionSelected(option));\n\n // if there is no selected option, set the active descendant to the first option\n const targetOption = selectedOption ?? this.options()[0];\n\n // if there is no target option, do nothing\n if (!targetOption) {\n return;\n }\n\n // activate the selected option or the first option\n this.activeDescendantManager.activate(targetOption);\n }\n\n /**\n * Close the dropdown.\n * @internal\n */\n closeDropdown(): void {\n if (!this.open()) {\n return;\n }\n\n this.openChange.emit(false);\n this.portal()?.detach();\n\n // clear the active descendant\n this.activeDescendantManager.reset();\n }\n\n /**\n * Toggle the dropdown.\n * @internal\n */\n @HostListener('click')\n async toggleDropdown(): Promise<void> {\n if (this.open()) {\n this.closeDropdown();\n } else {\n await this.openDropdown();\n }\n }\n\n /**\n * Select an option.\n * @param option The option to select.\n * @internal\n */\n selectOption(option: NgpSelectOption | undefined): void {\n if (this.state.disabled()) {\n return;\n }\n\n if (!option) {\n this.state.value.set(undefined);\n this.closeDropdown();\n return;\n }\n\n if (this.state.multiple()) {\n // if the option is already selected, do nothing\n if (this.isOptionSelected(option)) {\n return;\n }\n\n const value = [...((this.state.value() ?? []) as T[]), option.value() as T];\n\n // add the option to the value\n this.state.value.set(value as T);\n this.valueChange.emit(value as T);\n } else {\n this.state.value.set(option.value() as T);\n this.valueChange.emit(option.value() as T);\n\n // close the dropdown on single selection\n this.closeDropdown();\n }\n }\n\n /**\n * Deselect an option.\n * @param option The option to deselect.\n * @internal\n */\n deselectOption(option: NgpSelectOption): void {\n // if the select is disabled or the option is not selected, do nothing\n // if the select is single selection, we don't allow deselecting\n if (this.state.disabled() || !this.isOptionSelected(option) || !this.state.multiple()) {\n return;\n }\n\n const values = (this.state.value() as T[]) ?? [];\n\n const newValue = values.filter(v => !this.state.compareWith()(v, option.value() as T));\n\n // remove the option from the value\n this.state.value.set(newValue as T);\n this.valueChange.emit(newValue as T);\n }\n\n /**\n * Toggle the selection of an option.\n * @param option The option to toggle.\n * @internal\n */\n toggleOption(option: NgpSelectOption): void {\n if (this.state.disabled()) {\n return;\n }\n\n // if the state is single selection, we don't allow toggling\n if (!this.state.multiple()) {\n // always select the option in single selection mode even if it is already selected so that we update the input\n this.selectOption(option);\n return;\n }\n\n // otherwise toggle the option\n if (this.isOptionSelected(option)) {\n this.deselectOption(option);\n } else {\n this.selectOption(option);\n }\n }\n\n /**\n * Determine if an option is selected.\n * @param option The option to check.\n * @internal\n */\n isOptionSelected(option: NgpSelectOption): boolean {\n if (this.state.disabled()) {\n return false;\n }\n\n const value = this.state.value();\n\n if (!value) {\n return false;\n }\n\n if (this.state.multiple()) {\n return value && (value as T[]).some(v => this.state.compareWith()(option.value(), v));\n }\n\n return this.state.compareWith()(option.value(), value);\n }\n\n /**\n * Activate the next option in the list if there is one.\n * If there is no option currently active, activate the selected option or the first option.\n * @internal\n */\n activateNextOption(): void {\n if (this.state.disabled()) {\n return;\n }\n\n const options = this.options();\n\n // if there are no options, do nothing\n if (options.length === 0) {\n return;\n }\n\n // if there is no active option, activate the first option\n if (!this.activeDescendantManager.activeItem()) {\n const selectedOption = options.find(option => this.isOptionSelected(option));\n\n // if there is a selected option(s), set the active descendant to the first selected option\n const targetOption = selectedOption ?? options[0];\n\n this.activeDescendantManager.activate(targetOption);\n return;\n }\n\n // otherwise activate the next option\n this.activeDescendantManager.next();\n }\n\n /**\n * Activate the previous option in the list if there is one.\n * @internal\n */\n activatePreviousOption(): void {\n if (this.state.disabled()) {\n return;\n }\n const options = this.options();\n // if there are no options, do nothing\n if (options.length === 0) {\n return;\n }\n // if there is no active option, activate the last option\n if (!this.activeDescendantManager.activeItem()) {\n const selectedOption = options.find(option => this.isOptionSelected(option));\n // if there is a selected option(s), set the active descendant to the first selected option\n const targetOption = selectedOption ?? options[options.length - 1];\n this.activeDescendantManager.activate(targetOption);\n return;\n }\n // otherwise activate the previous option\n this.activeDescendantManager.previous();\n }\n\n /**\n * Register the dropdown portal with the select.\n * @param portal The dropdown portal.\n * @internal\n */\n registerPortal(portal: NgpSelectPortal): void {\n this.portal.set(portal);\n }\n\n /**\n * Register the dropdown with the select.\n * @param dropdown The dropdown to register.\n * @internal\n */\n registerDropdown(dropdown: NgpSelectDropdown): void {\n this.dropdown.set(dropdown);\n }\n\n /**\n * Register an option with the select.\n * @param option The option to register.\n * @internal\n */\n registerOption(option: NgpSelectOption): void {\n this.options.update(options => [...options, option]);\n }\n\n /**\n * Unregister an option from the select.\n * @param option The option to unregister.\n * @internal\n */\n unregisterOption(option: NgpSelectOption): void {\n this.options.update(options => options.filter(o => o !== option));\n }\n\n /**\n * Focus the select.\n * @internal\n */\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n /** Handle keydown events for accessibility. */\n @HostListener('keydown', ['$event'])\n protected handleKeydown(event: KeyboardEvent): void {\n switch (event.key) {\n case 'ArrowDown':\n if (this.open()) {\n this.activateNextOption();\n } else {\n this.openDropdown();\n }\n event.preventDefault();\n break;\n case 'ArrowUp':\n if (this.open()) {\n this.activatePreviousOption();\n } else {\n this.openDropdown();\n this.activeDescendantManager.last();\n }\n event.preventDefault();\n break;\n case 'Home':\n if (this.open()) {\n this.activeDescendantManager.first();\n }\n event.preventDefault();\n break;\n case 'End':\n if (this.open()) {\n this.activeDescendantManager.last();\n }\n event.preventDefault();\n break;\n case 'Enter':\n if (this.open()) {\n this.selectOption(this.activeDescendantManager.activeItem());\n } else {\n this.openDropdown();\n }\n event.preventDefault();\n break;\n case ' ':\n this.toggleDropdown();\n event.preventDefault();\n break;\n }\n }\n\n @HostListener('blur', ['$event'])\n protected onBlur(event: FocusEvent): void {\n const relatedTarget = event.relatedTarget as HTMLElement;\n\n // if the blur was caused by focus moving to the dropdown, don't close\n if (relatedTarget && this.dropdown()?.elementRef.nativeElement.contains(relatedTarget)) {\n return;\n }\n\n this.closeDropdown();\n event.preventDefault();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAQA;;AAEG;AACI,MAAM,yBAAyB,GAAG,gBAAgB,CAAkB,QAAQ,CAAC;AAEpF;;AAEG;MACU,wBAAwB,GAAG,mBAAmB,CAAC,yBAAyB;AAErF;;AAEG;MACU,uBAAuB,GAClC,mBAAmB,CAAkB,yBAAyB;AAEhE;;AAEG;AACI,MAAM,uBAAuB,GAAG,WAAW,CAAC,yBAAyB,CAAC;;ACpB7E;;AAEG;MASU,eAAe,CAAA;AAmB1B,IAAA,WAAA,GAAA;AAlBA;;AAEG;QACM,IAAA,CAAA,E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AA,EAAA,oBAAA,EAAA,mDAAA,EAAA,4BAAA,EAAA,uEAAA,EAAA,eAAA,EAAA,2BAAA,EAAA,gBAAA,EAAA,iCAAA,EAAA,oBAAA,EAAA,qCAAA,EAAA,oBAAA,EAAA,qCAAA,EAAA,EAAA,EAAA,SAAA,EAdT,CAAC,kBAAkB,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FActB,SAAS,EAAA,UAAA,EAAA,CAAA;kBAjBrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,SAAS,EAAE,CAAC,kBAAkB,EAAE,CAAC;AACjC,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,UAAU;AAChB,wBAAA,MAAM,EAAE,YAAY;AACpB,wBAAA,sBAAsB,EAAE,cAAc;AACtC,wBAAA,sBAAsB,EAAE,mDAAmD;AAC3E,wBAAA,8BAA8B,EAC5B,uEAAuE;AACzE,wBAAA,iBAAiB,EAAE,2BAA2B;AAC9C,wBAAA,kBAAkB,EAAE,+BAA+B;AACnD,wBAAA,sBAAsB,EAAE,mCAAmC;AAC3D,wBAAA,sBAAsB,EAAE,mCAAmC;AAC5D,qBAAA;AACF,iBAAA;wDA+KO,cAAc,EAAA,CAAA;sBADnB,YAAY;uBAAC,OAAO;gBAyNX,aAAa,EAAA,CAAA;sBADtB,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;gBAgDzB,MAAM,EAAA,CAAA;sBADf,YAAY;uBAAC,MAAM,EAAE,CAAC,QAAQ,CAAC;;;AC5elC;;AAEG;;;;"}
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Directive, HostListener, input, numberAttribute, output, booleanAttribute, signal, computed } from '@angular/core';
3
3
  import { createStateToken, createStateProvider, createStateInjector, createState } from 'ng-primitives/state';
4
- import { setupInteractions } from 'ng-primitives/interactions';
4
+ import { ngpInteractions } from 'ng-primitives/interactions';
5
5
  import { injectElementRef } from 'ng-primitives/internal';
6
6
  import { setupFormControl } from 'ng-primitives/form-field';
7
7
  import { uniqueId } from 'ng-primitives/utils';
@@ -63,7 +63,7 @@ class NgpSliderThumb {
63
63
  * Store the dragging state.
64
64
  */
65
65
  this.dragging = false;
66
- setupInteractions({
66
+ ngpInteractions({
67
67
  hover: true,
68
68
  focusVisible: true,
69
69
  press: true,
@@ -380,7 +380,7 @@ class NgpRangeSliderThumb {
380
380
  * Get the current percentage for this thumb.
381
381
  */
382
382
  this.percentage = computed(() => this.thumb() === 'low' ? this.state().lowPercentage() : this.state().highPercentage());
383
- setupInteractions({
383
+ ngpInteractions({
384
384
  hover: true,
385
385
  focusVisible: true,
386
386
  press: true,
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-slider.mjs","sources":["../../../../packages/ng-primitives/slider/src/slider/slider-state.ts","../../../../packages/ng-primitives/slider/src/slider-range/slider-range.ts","../../../../packages/ng-primitives/slider/src/slider-thumb/slider-thumb.ts","../../../../packages/ng-primitives/slider/src/slider-track/slider-track.ts","../../../../packages/ng-primitives/slider/src/slider/slider.ts","../../../../packages/ng-primitives/slider/src/range-slider/range-slider/range-slider-state.ts","../../../../packages/ng-primitives/slider/src/range-slider/range-slider-range/range-slider-range.ts","../../../../packages/ng-primitives/slider/src/range-slider/range-slider-thumb/range-slider-thumb.ts","../../../../packages/ng-primitives/slider/src/range-slider/range-slider-track/range-slider-track.ts","../../../../packages/ng-primitives/slider/src/range-slider/range-slider/range-slider.ts","../../../../packages/ng-primitives/slider/src/ng-primitives-slider.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpSlider } from './slider';\n\n/**\n * The state token for the Slider primitive.\n */\nexport const NgpSliderStateToken = createStateToken<NgpSlider>('Slider');\n\n/**\n * Provides the Slider state.\n */\nexport const provideSliderState = createStateProvider(NgpSliderStateToken);\n\n/**\n * Injects the Slider state.\n */\nexport const injectSliderState = createStateInjector<NgpSlider>(NgpSliderStateToken);\n\n/**\n * The Slider state registration function.\n */\nexport const sliderState = createState(NgpSliderStateToken);\n","import { Directive } from '@angular/core';\nimport { injectSliderState } from '../slider/slider-state';\n\n/**\n * Apply the `ngpSliderRange` directive to an element that represents the range of the slider.\n */\n@Directive({\n selector: '[ngpSliderRange]',\n exportAs: 'ngpSliderRange',\n host: {\n '[attr.data-orientation]': 'sliderState().orientation()',\n '[attr.data-disabled]': 'sliderState().disabled() ? \"\" : null',\n '[style.width.%]':\n 'sliderState().orientation() === \"horizontal\" ? sliderState().percentage() : undefined',\n '[style.height.%]':\n 'sliderState().orientation() === \"vertical\" ? sliderState().percentage() : undefined',\n },\n})\nexport class NgpSliderRange {\n /**\n * Access the slider state.\n */\n protected readonly sliderState = injectSliderState();\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { setupInteractions } from 'ng-primitives/interactions';\nimport { injectSliderState } from '../slider/slider-state';\n\n/**\n * Apply the `ngpSliderThumb` directive to an element that represents the thumb of the slider.\n */\n@Directive({\n selector: '[ngpSliderThumb]',\n exportAs: 'ngpSliderThumb',\n host: {\n role: 'slider',\n '[attr.aria-valuemin]': 'state().min()',\n '[attr.aria-valuemax]': 'state().max()',\n '[attr.aria-valuenow]': 'state().value()',\n '[attr.aria-orientation]': 'state().orientation()',\n '[tabindex]': 'state().disabled() ? -1 : 0',\n '[attr.data-orientation]': 'state().orientation()',\n '[attr.data-disabled]': 'state().disabled() ? \"\" : null',\n '[style.inset-inline-start.%]':\n 'state().orientation() === \"horizontal\" ? state().percentage() : undefined',\n '[style.inset-block-start.%]':\n 'state().orientation() === \"vertical\" ? state().percentage() : undefined',\n },\n})\nexport class NgpSliderThumb {\n /**\n * Access the slider state.\n */\n protected readonly state = injectSliderState();\n\n /**\n * Store the dragging state.\n */\n protected dragging = false;\n\n constructor() {\n setupInteractions({\n hover: true,\n focusVisible: true,\n press: true,\n disabled: this.state().disabled,\n });\n }\n\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(event: PointerEvent): void {\n event.preventDefault();\n\n if (this.state().disabled()) {\n return;\n }\n\n this.dragging = true;\n }\n\n @HostListener('document:pointerup')\n protected handlePointerUp(): void {\n if (this.state().disabled()) {\n return;\n }\n\n this.dragging = false;\n }\n\n @HostListener('document:pointermove', ['$event'])\n protected handlePointerMove(event: PointerEvent): void {\n if (this.state().disabled() || !this.dragging) {\n return;\n }\n\n const rect = this.state().track()?.element.nativeElement.getBoundingClientRect();\n\n if (!rect) {\n return;\n }\n\n const percentage =\n this.state().orientation() === 'horizontal'\n ? (event.clientX - rect.left) / rect.width\n : 1 - (event.clientY - rect.top) / rect.height;\n\n const value =\n this.state().min() +\n (this.state().max() - this.state().min()) * Math.max(0, Math.min(1, percentage));\n\n this.state().value.set(value);\n this.state().valueChange.emit(value);\n }\n\n /**\n * Handle keyboard events.\n * @param event\n */\n @HostListener('keydown', ['$event'])\n protected handleKeydown(event: KeyboardEvent): void {\n const multiplier = event.shiftKey ? 10 : 1;\n const value = this.state().value();\n\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowDown':\n this.state().value.set(\n Math.max(value - this.state().step() * multiplier, this.state().min()),\n );\n this.state().valueChange.emit(this.state().value());\n event.preventDefault();\n break;\n case 'ArrowRight':\n case 'ArrowUp':\n this.state().value.set(\n Math.min(value + this.state().step() * multiplier, this.state().max()),\n );\n this.state().valueChange.emit(this.state().value());\n event.preventDefault();\n break;\n case 'Home':\n this.state().value.set(this.state().min());\n this.state().valueChange.emit(this.state().value());\n event.preventDefault();\n break;\n case 'End':\n this.state().value.set(this.state().max());\n this.state().valueChange.emit(this.state().value());\n event.preventDefault();\n break;\n }\n }\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { injectSliderState } from '../slider/slider-state';\n\n/**\n * Apply the `ngpSliderTrack` directive to an element that represents the track of the slider.\n */\n@Directive({\n selector: '[ngpSliderTrack]',\n exportAs: 'ngpSliderTrack',\n host: {\n '[attr.data-orientation]': 'sliderState().orientation()',\n '[attr.data-disabled]': 'sliderState().disabled() ? \"\" : null',\n },\n})\nexport class NgpSliderTrack {\n /**\n * Access the slider state.\n */\n protected readonly sliderState = injectSliderState();\n\n /**\n * The element that represents the slider track.\n */\n readonly element = injectElementRef<HTMLElement>();\n\n constructor() {\n this.sliderState().track.set(this);\n }\n\n /**\n * When the slider track is clicked, update the value.\n * @param event The click event.\n */\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(event: PointerEvent): void {\n if (this.sliderState().disabled()) {\n return;\n }\n\n // get the position the click occurred within the slider track\n const position =\n this.sliderState().orientation() === 'horizontal' ? event.clientX : event.clientY;\n const rect = this.element.nativeElement.getBoundingClientRect();\n const percentage =\n (position - (this.sliderState().orientation() === 'horizontal' ? rect.left : rect.top)) /\n (this.sliderState().orientation() === 'horizontal' ? rect.width : rect.height);\n\n // update the value based on the position\n this.sliderState().value.set(\n this.sliderState().min() + (this.sliderState().max() - this.sliderState().min()) * percentage,\n );\n this.sliderState().valueChange.emit(this.sliderState().value());\n }\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n Directive,\n booleanAttribute,\n computed,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { setupFormControl } from 'ng-primitives/form-field';\nimport { uniqueId } from 'ng-primitives/utils';\nimport type { NgpSliderTrack } from '../slider-track/slider-track';\nimport { provideSliderState, sliderState } from './slider-state';\n\n/**\n * Apply the `ngpSlider` directive to an element that represents the slider and contains the track, range, and thumb.\n */\n@Directive({\n selector: '[ngpSlider]',\n exportAs: 'ngpSlider',\n providers: [provideSliderState()],\n host: {\n '[id]': 'id()',\n '[attr.data-orientation]': 'state.orientation()',\n },\n})\nexport class NgpSlider {\n /**\n * The id of the slider. If not provided, a unique id will be generated.\n */\n readonly id = input<string>(uniqueId('ngp-slider'));\n\n /**\n * The value of the slider.\n */\n readonly value = input<number, NumberInput>(0, {\n alias: 'ngpSliderValue',\n transform: numberAttribute,\n });\n\n /**\n * Emits when the value changes.\n */\n readonly valueChange = output<number>({\n alias: 'ngpSliderValueChange',\n });\n\n /**\n * The minimum value of the slider.\n */\n readonly min = input<number, NumberInput>(0, {\n alias: 'ngpSliderMin',\n transform: numberAttribute,\n });\n\n /**\n * The maximum value of the slider.\n */\n readonly max = input<number, NumberInput>(100, {\n alias: 'ngpSliderMax',\n transform: numberAttribute,\n });\n\n /**\n * The step value of the slider.\n */\n readonly step = input<number, NumberInput>(1, {\n alias: 'ngpSliderStep',\n transform: numberAttribute,\n });\n\n /**\n * The orientation of the slider.\n */\n readonly orientation = input<NgpOrientation>('horizontal', {\n alias: 'ngpSliderOrientation',\n });\n\n /**\n * The disabled state of the slider.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpSliderDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the slider track.\n * @internal\n */\n readonly track = signal<NgpSliderTrack | undefined>(undefined);\n\n /**\n * The value as a percentage based on the min and max values.\n */\n protected readonly percentage = computed(\n () => ((this.state.value() - this.state.min()) / (this.state.max() - this.state.min())) * 100,\n );\n\n /**\n * The state of the slider. We use this for the slider state rather than relying on the inputs.\n * @internal\n */\n protected readonly state = sliderState<NgpSlider>(this);\n\n constructor() {\n setupFormControl({ id: this.state.id, disabled: this.state.disabled });\n }\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpRangeSlider } from './range-slider';\n\n/**\n * The state token for the Range Slider primitive.\n */\nexport const NgpRangeSliderStateToken = createStateToken<NgpRangeSlider>('RangeSlider');\n\n/**\n * Provides the Range Slider state.\n */\nexport const provideRangeSliderState = createStateProvider(NgpRangeSliderStateToken);\n\n/**\n * Injects the Range Slider state.\n */\nexport const injectRangeSliderState = createStateInjector<NgpRangeSlider>(NgpRangeSliderStateToken);\n\n/**\n * The Range Slider state registration function.\n */\nexport const rangeSliderState = createState(NgpRangeSliderStateToken);\n","import { Directive } from '@angular/core';\nimport { injectRangeSliderState } from '../range-slider/range-slider-state';\n\n/**\n * Apply the `ngpRangeSliderRange` directive to an element that represents the range between the low and high values.\n */\n@Directive({\n selector: '[ngpRangeSliderRange]',\n exportAs: 'ngpRangeSliderRange',\n host: {\n '[attr.data-orientation]': 'rangeSliderState().orientation()',\n '[attr.data-disabled]': 'rangeSliderState().disabled() ? \"\" : null',\n '[style.width.%]':\n 'rangeSliderState().orientation() === \"horizontal\" ? rangeSliderState().rangePercentage() : undefined',\n '[style.height.%]':\n 'rangeSliderState().orientation() === \"vertical\" ? rangeSliderState().rangePercentage() : undefined',\n '[style.inset-inline-start.%]':\n 'rangeSliderState().orientation() === \"horizontal\" ? rangeSliderState().lowPercentage() : undefined',\n '[style.inset-block-start.%]':\n 'rangeSliderState().orientation() === \"vertical\" ? rangeSliderState().lowPercentage() : undefined',\n },\n})\nexport class NgpRangeSliderRange {\n /**\n * Access the range slider state.\n */\n protected readonly rangeSliderState = injectRangeSliderState();\n}\n","import { computed, Directive, HostListener, OnDestroy } from '@angular/core';\nimport { setupInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { injectRangeSliderState } from '../range-slider/range-slider-state';\n\n/**\n * Apply the `ngpRangeSliderThumb` directive to an element that represents a thumb of the range slider.\n * Each thumb can be configured to control either the 'low' or 'high' value.\n */\n@Directive({\n selector: '[ngpRangeSliderThumb]',\n exportAs: 'ngpRangeSliderThumb',\n host: {\n role: 'slider',\n '[attr.aria-valuemin]': 'state().min()',\n '[attr.aria-valuemax]': 'state().max()',\n '[attr.aria-valuenow]': 'value()',\n '[attr.aria-orientation]': 'state().orientation()',\n '[tabindex]': 'state().disabled() ? -1 : 0',\n '[attr.data-orientation]': 'state().orientation()',\n '[attr.data-disabled]': 'state().disabled() ? \"\" : null',\n '[attr.data-thumb]': 'thumb()',\n '[style.inset-inline-start.%]':\n 'state().orientation() === \"horizontal\" ? percentage() : undefined',\n '[style.inset-block-start.%]':\n 'state().orientation() === \"vertical\" ? percentage() : undefined',\n },\n})\nexport class NgpRangeSliderThumb implements OnDestroy {\n /**\n * Access the range slider state.\n */\n protected readonly state = injectRangeSliderState();\n\n /**\n * Access the thumb element.\n */\n private readonly elementRef = injectElementRef();\n\n /**\n * Determines which value this thumb controls ('low' or 'high').\n */\n protected readonly thumb = computed(() =>\n this.state().thumbs().indexOf(this) === 0 ? 'low' : 'high',\n );\n\n /**\n * Store the dragging state.\n */\n protected dragging = false;\n\n /**\n * Get the current value for this thumb.\n */\n protected readonly value = computed(() =>\n this.thumb() === 'low' ? this.state().low() : this.state().high(),\n );\n\n /**\n * Get the current percentage for this thumb.\n */\n protected readonly percentage = computed(() =>\n this.thumb() === 'low' ? this.state().lowPercentage() : this.state().highPercentage(),\n );\n\n constructor() {\n setupInteractions({\n hover: true,\n focusVisible: true,\n press: true,\n disabled: this.state().disabled,\n });\n\n this.state().addThumb(this);\n }\n\n ngOnDestroy(): void {\n this.state().removeThumb(this);\n }\n\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(event: PointerEvent): void {\n event.preventDefault();\n\n if (this.state().disabled()) {\n return;\n }\n\n this.dragging = true;\n }\n\n @HostListener('document:pointerup')\n protected handlePointerUp(): void {\n if (this.state().disabled()) {\n return;\n }\n\n this.dragging = false;\n }\n\n @HostListener('document:pointermove', ['$event'])\n protected handlePointerMove(event: PointerEvent): void {\n if (this.state().disabled() || !this.dragging) {\n return;\n }\n\n const rect = this.state().track()?.element.nativeElement.getBoundingClientRect();\n\n if (!rect) {\n return;\n }\n\n const percentage =\n this.state().orientation() === 'horizontal'\n ? (event.clientX - rect.left) / rect.width\n : (event.clientY - rect.top) / rect.height;\n\n const value =\n this.state().min() +\n (this.state().max() - this.state().min()) * Math.max(0, Math.min(1, percentage));\n\n // Update the appropriate value based on thumb type\n if (this.thumb() === 'low') {\n this.state().setLowValue(value);\n } else {\n this.state().setHighValue(value);\n }\n }\n\n /**\n * Handle keyboard events.\n * @param event\n */\n @HostListener('keydown', ['$event'])\n protected handleKeydown(event: KeyboardEvent): void {\n const multiplier = event.shiftKey ? 10 : 1;\n const currentValue = this.value();\n const step = this.state().step() * multiplier;\n\n // determine the document direction\n const isRTL = getComputedStyle(this.elementRef.nativeElement).direction === 'rtl';\n\n let newValue: number;\n\n switch (event.key) {\n case 'ArrowLeft':\n newValue = isRTL\n ? Math.min(currentValue - step, this.state().max())\n : Math.max(currentValue - step, this.state().min());\n break;\n case 'ArrowDown':\n newValue = Math.max(currentValue - step, this.state().min());\n break;\n case 'ArrowRight':\n newValue = isRTL\n ? Math.max(currentValue + step, this.state().min())\n : Math.min(currentValue + step, this.state().max());\n break;\n case 'ArrowUp':\n newValue = Math.min(currentValue + step, this.state().max());\n break;\n case 'Home':\n newValue = isRTL ? this.state().max() : this.state().min();\n break;\n case 'End':\n newValue = isRTL ? this.state().min() : this.state().max();\n break;\n default:\n return;\n }\n\n // Update the appropriate value based on thumb type\n if (this.thumb() === 'low') {\n this.state().setLowValue(newValue);\n } else {\n this.state().setHighValue(newValue);\n }\n\n event.preventDefault();\n }\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { injectRangeSliderState } from '../range-slider/range-slider-state';\n\n/**\n * Apply the `ngpRangeSliderTrack` directive to an element that represents the track of the range slider.\n */\n@Directive({\n selector: '[ngpRangeSliderTrack]',\n exportAs: 'ngpRangeSliderTrack',\n host: {\n '[attr.data-orientation]': 'rangeSliderState().orientation()',\n '[attr.data-disabled]': 'rangeSliderState().disabled() ? \"\" : null',\n },\n})\nexport class NgpRangeSliderTrack {\n /**\n * Access the range slider state.\n */\n protected readonly rangeSliderState = injectRangeSliderState();\n\n /**\n * The element that represents the slider track.\n */\n readonly element = injectElementRef<HTMLElement>();\n\n constructor() {\n this.rangeSliderState().track.set(this);\n }\n\n /**\n * When the slider track is clicked, update the closest thumb value.\n * @param event The click event.\n */\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(event: PointerEvent): void {\n if (this.rangeSliderState().disabled()) {\n return;\n }\n\n // get the position the click occurred within the slider track\n const position =\n this.rangeSliderState().orientation() === 'horizontal' ? event.clientX : event.clientY;\n const rect = this.element.nativeElement.getBoundingClientRect();\n const percentage =\n (position - (this.rangeSliderState().orientation() === 'horizontal' ? rect.left : rect.top)) /\n (this.rangeSliderState().orientation() === 'horizontal' ? rect.width : rect.height);\n\n // calculate the value based on the position\n const value =\n this.rangeSliderState().min() +\n (this.rangeSliderState().max() - this.rangeSliderState().min()) * percentage;\n\n // determine which thumb to move based on proximity\n const closestThumb = this.rangeSliderState().getClosestThumb(percentage * 100);\n\n if (closestThumb === 'low') {\n this.rangeSliderState().setLowValue(value);\n } else {\n this.rangeSliderState().setHighValue(value);\n }\n }\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n Directive,\n booleanAttribute,\n computed,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { setupFormControl } from 'ng-primitives/form-field';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { NgpRangeSliderThumb } from '../range-slider-thumb/range-slider-thumb';\nimport type { NgpRangeSliderTrack } from '../range-slider-track/range-slider-track';\nimport { provideRangeSliderState, rangeSliderState } from './range-slider-state';\n\n/**\n * Apply the `ngpRangeSlider` directive to an element that represents the range slider and contains the track, range, and thumbs.\n */\n@Directive({\n selector: '[ngpRangeSlider]',\n exportAs: 'ngpRangeSlider',\n providers: [provideRangeSliderState()],\n host: {\n '[id]': 'id()',\n '[attr.data-orientation]': 'state.orientation()',\n },\n})\nexport class NgpRangeSlider {\n /**\n * The id of the range slider. If not provided, a unique id will be generated.\n */\n readonly id = input<string>(uniqueId('ngp-range-slider'));\n\n /**\n * The low value of the range slider.\n */\n readonly low = input<number, NumberInput>(0, {\n alias: 'ngpRangeSliderLow',\n transform: numberAttribute,\n });\n\n /**\n * Emits when the low value changes.\n */\n readonly lowChange = output<number>({\n alias: 'ngpRangeSliderLowChange',\n });\n\n /**\n * The high value of the range slider.\n */\n readonly high = input<number, NumberInput>(100, {\n alias: 'ngpRangeSliderHigh',\n transform: numberAttribute,\n });\n\n /**\n * Emits when the high value changes.\n */\n readonly highChange = output<number>({\n alias: 'ngpRangeSliderHighChange',\n });\n\n /**\n * The minimum value of the range slider.\n */\n readonly min = input<number, NumberInput>(0, {\n alias: 'ngpRangeSliderMin',\n transform: numberAttribute,\n });\n\n /**\n * The maximum value of the range slider.\n */\n readonly max = input<number, NumberInput>(100, {\n alias: 'ngpRangeSliderMax',\n transform: numberAttribute,\n });\n\n /**\n * The step value of the range slider.\n */\n readonly step = input<number, NumberInput>(1, {\n alias: 'ngpRangeSliderStep',\n transform: numberAttribute,\n });\n\n /**\n * The orientation of the range slider.\n */\n readonly orientation = input<NgpOrientation>('horizontal', {\n alias: 'ngpRangeSliderOrientation',\n });\n\n /**\n * The disabled state of the range slider.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpRangeSliderDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the slider track.\n * @internal\n */\n readonly track = signal<NgpRangeSliderTrack | undefined>(undefined);\n\n /**\n * The thumbs of the range slider.\n * @internal\n */\n readonly thumbs = signal<NgpRangeSliderThumb[]>([]);\n\n /**\n * The low value as a percentage based on the min and max values.\n * @internal\n */\n readonly lowPercentage = computed(\n () => ((this.state.low() - this.state.min()) / (this.state.max() - this.state.min())) * 100,\n );\n\n /**\n * The high value as a percentage based on the min and max values.\n * @internal\n */\n readonly highPercentage = computed(\n () => ((this.state.high() - this.state.min()) / (this.state.max() - this.state.min())) * 100,\n );\n\n /**\n * The range between low and high values as a percentage.\n * @internal\n */\n readonly rangePercentage = computed(() => this.highPercentage() - this.lowPercentage());\n\n /**\n * The state of the range slider. We use this for the range slider state rather than relying on the inputs.\n * @internal\n */\n protected readonly state = rangeSliderState<NgpRangeSlider>(this);\n\n constructor() {\n setupFormControl({ id: this.state.id, disabled: this.state.disabled });\n }\n\n /**\n * Updates the low value, ensuring it doesn't exceed the high value.\n * @param value The new low value\n * @internal\n */\n setLowValue(value: number): void {\n const clampedValue = Math.max(this.state.min(), Math.min(value, this.state.high()));\n this.state.low.set(clampedValue);\n this.lowChange.emit(clampedValue);\n }\n\n /**\n * Updates the high value, ensuring it doesn't go below the low value.\n * @param value The new high value\n * @internal\n */\n setHighValue(value: number): void {\n const clampedValue = Math.min(this.state.max(), Math.max(value, this.state.low()));\n this.state.high.set(clampedValue);\n this.highChange.emit(clampedValue);\n }\n\n /**\n * Determines which thumb should be moved based on the position clicked.\n * @param percentage The percentage position of the click\n * @returns 'low' or 'high' indicating which thumb should move\n *\n * @internal\n */\n getClosestThumb(percentage: number): 'low' | 'high' {\n const value = this.state.min() + (this.state.max() - this.state.min()) * (percentage / 100);\n const distanceToLow = Math.abs(value - this.state.low());\n const distanceToHigh = Math.abs(value - this.state.high());\n\n return distanceToLow <= distanceToHigh ? 'low' : 'high';\n }\n\n /**\n * Updates the thumbs array when a new thumb is added.\n * @param thumb The new thumb to add\n * @internal\n */\n addThumb(thumb: NgpRangeSliderThumb): void {\n this.thumbs.update(thumbs => [...thumbs, thumb]);\n }\n\n /**\n * Removes a thumb from the thumbs array.\n * @param thumb The thumb to remove\n * @internal\n */\n removeThumb(thumb: NgpRangeSliderThumb): void {\n this.thumbs.update(thumbs => thumbs.filter(t => t !== thumb));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAQA;;AAEG;AACI,MAAM,mBAAmB,GAAG,gBAAgB,CAAY,QAAQ,CAAC;AAExE;;AAEG;MACU,kBAAkB,GAAG,mBAAmB,CAAC,mBAAmB;AAEzE;;AAEG;MACU,iBAAiB,GAAG,mBAAmB,CAAY,mBA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../../../packages/ng-primitives/slider/src/slider/slider-state.ts","../../../../packages/ng-primitives/slider/src/slider-range/slider-range.ts","../../../../packages/ng-primitives/slider/src/slider-thumb/slider-thumb.ts","../../../../packages/ng-primitives/slider/src/slider-track/slider-track.ts","../../../../packages/ng-primitives/slider/src/slider/slider.ts","../../../../packages/ng-primitives/slider/src/range-slider/range-slider/range-slider-state.ts","../../../../packages/ng-primitives/slider/src/range-slider/range-slider-range/range-slider-range.ts","../../../../packages/ng-primitives/slider/src/range-slider/range-slider-thumb/range-slider-thumb.ts","../../../../packages/ng-primitives/slider/src/range-slider/range-slider-track/range-slider-track.ts","../../../../packages/ng-primitives/slider/src/range-slider/range-slider/range-slider.ts","../../../../packages/ng-primitives/slider/src/ng-primitives-slider.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpSlider } from './slider';\n\n/**\n * The state token for the Slider primitive.\n */\nexport const NgpSliderStateToken = createStateToken<NgpSlider>('Slider');\n\n/**\n * Provides the Slider state.\n */\nexport const provideSliderState = createStateProvider(NgpSliderStateToken);\n\n/**\n * Injects the Slider state.\n */\nexport const injectSliderState = createStateInjector<NgpSlider>(NgpSliderStateToken);\n\n/**\n * The Slider state registration function.\n */\nexport const sliderState = createState(NgpSliderStateToken);\n","import { Directive } from '@angular/core';\nimport { injectSliderState } from '../slider/slider-state';\n\n/**\n * Apply the `ngpSliderRange` directive to an element that represents the range of the slider.\n */\n@Directive({\n selector: '[ngpSliderRange]',\n exportAs: 'ngpSliderRange',\n host: {\n '[attr.data-orientation]': 'sliderState().orientation()',\n '[attr.data-disabled]': 'sliderState().disabled() ? \"\" : null',\n '[style.width.%]':\n 'sliderState().orientation() === \"horizontal\" ? sliderState().percentage() : undefined',\n '[style.height.%]':\n 'sliderState().orientation() === \"vertical\" ? sliderState().percentage() : undefined',\n },\n})\nexport class NgpSliderRange {\n /**\n * Access the slider state.\n */\n protected readonly sliderState = injectSliderState();\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectSliderState } from '../slider/slider-state';\n\n/**\n * Apply the `ngpSliderThumb` directive to an element that represents the thumb of the slider.\n */\n@Directive({\n selector: '[ngpSliderThumb]',\n exportAs: 'ngpSliderThumb',\n host: {\n role: 'slider',\n '[attr.aria-valuemin]': 'state().min()',\n '[attr.aria-valuemax]': 'state().max()',\n '[attr.aria-valuenow]': 'state().value()',\n '[attr.aria-orientation]': 'state().orientation()',\n '[tabindex]': 'state().disabled() ? -1 : 0',\n '[attr.data-orientation]': 'state().orientation()',\n '[attr.data-disabled]': 'state().disabled() ? \"\" : null',\n '[style.inset-inline-start.%]':\n 'state().orientation() === \"horizontal\" ? state().percentage() : undefined',\n '[style.inset-block-start.%]':\n 'state().orientation() === \"vertical\" ? state().percentage() : undefined',\n },\n})\nexport class NgpSliderThumb {\n /**\n * Access the slider state.\n */\n protected readonly state = injectSliderState();\n\n /**\n * Store the dragging state.\n */\n protected dragging = false;\n\n constructor() {\n ngpInteractions({\n hover: true,\n focusVisible: true,\n press: true,\n disabled: this.state().disabled,\n });\n }\n\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(event: PointerEvent): void {\n event.preventDefault();\n\n if (this.state().disabled()) {\n return;\n }\n\n this.dragging = true;\n }\n\n @HostListener('document:pointerup')\n protected handlePointerUp(): void {\n if (this.state().disabled()) {\n return;\n }\n\n this.dragging = false;\n }\n\n @HostListener('document:pointermove', ['$event'])\n protected handlePointerMove(event: PointerEvent): void {\n if (this.state().disabled() || !this.dragging) {\n return;\n }\n\n const rect = this.state().track()?.element.nativeElement.getBoundingClientRect();\n\n if (!rect) {\n return;\n }\n\n const percentage =\n this.state().orientation() === 'horizontal'\n ? (event.clientX - rect.left) / rect.width\n : 1 - (event.clientY - rect.top) / rect.height;\n\n const value =\n this.state().min() +\n (this.state().max() - this.state().min()) * Math.max(0, Math.min(1, percentage));\n\n this.state().value.set(value);\n this.state().valueChange.emit(value);\n }\n\n /**\n * Handle keyboard events.\n * @param event\n */\n @HostListener('keydown', ['$event'])\n protected handleKeydown(event: KeyboardEvent): void {\n const multiplier = event.shiftKey ? 10 : 1;\n const value = this.state().value();\n\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowDown':\n this.state().value.set(\n Math.max(value - this.state().step() * multiplier, this.state().min()),\n );\n this.state().valueChange.emit(this.state().value());\n event.preventDefault();\n break;\n case 'ArrowRight':\n case 'ArrowUp':\n this.state().value.set(\n Math.min(value + this.state().step() * multiplier, this.state().max()),\n );\n this.state().valueChange.emit(this.state().value());\n event.preventDefault();\n break;\n case 'Home':\n this.state().value.set(this.state().min());\n this.state().valueChange.emit(this.state().value());\n event.preventDefault();\n break;\n case 'End':\n this.state().value.set(this.state().max());\n this.state().valueChange.emit(this.state().value());\n event.preventDefault();\n break;\n }\n }\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { injectSliderState } from '../slider/slider-state';\n\n/**\n * Apply the `ngpSliderTrack` directive to an element that represents the track of the slider.\n */\n@Directive({\n selector: '[ngpSliderTrack]',\n exportAs: 'ngpSliderTrack',\n host: {\n '[attr.data-orientation]': 'sliderState().orientation()',\n '[attr.data-disabled]': 'sliderState().disabled() ? \"\" : null',\n },\n})\nexport class NgpSliderTrack {\n /**\n * Access the slider state.\n */\n protected readonly sliderState = injectSliderState();\n\n /**\n * The element that represents the slider track.\n */\n readonly element = injectElementRef<HTMLElement>();\n\n constructor() {\n this.sliderState().track.set(this);\n }\n\n /**\n * When the slider track is clicked, update the value.\n * @param event The click event.\n */\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(event: PointerEvent): void {\n if (this.sliderState().disabled()) {\n return;\n }\n\n // get the position the click occurred within the slider track\n const position =\n this.sliderState().orientation() === 'horizontal' ? event.clientX : event.clientY;\n const rect = this.element.nativeElement.getBoundingClientRect();\n const percentage =\n (position - (this.sliderState().orientation() === 'horizontal' ? rect.left : rect.top)) /\n (this.sliderState().orientation() === 'horizontal' ? rect.width : rect.height);\n\n // update the value based on the position\n this.sliderState().value.set(\n this.sliderState().min() + (this.sliderState().max() - this.sliderState().min()) * percentage,\n );\n this.sliderState().valueChange.emit(this.sliderState().value());\n }\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n Directive,\n booleanAttribute,\n computed,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { setupFormControl } from 'ng-primitives/form-field';\nimport { uniqueId } from 'ng-primitives/utils';\nimport type { NgpSliderTrack } from '../slider-track/slider-track';\nimport { provideSliderState, sliderState } from './slider-state';\n\n/**\n * Apply the `ngpSlider` directive to an element that represents the slider and contains the track, range, and thumb.\n */\n@Directive({\n selector: '[ngpSlider]',\n exportAs: 'ngpSlider',\n providers: [provideSliderState()],\n host: {\n '[id]': 'id()',\n '[attr.data-orientation]': 'state.orientation()',\n },\n})\nexport class NgpSlider {\n /**\n * The id of the slider. If not provided, a unique id will be generated.\n */\n readonly id = input<string>(uniqueId('ngp-slider'));\n\n /**\n * The value of the slider.\n */\n readonly value = input<number, NumberInput>(0, {\n alias: 'ngpSliderValue',\n transform: numberAttribute,\n });\n\n /**\n * Emits when the value changes.\n */\n readonly valueChange = output<number>({\n alias: 'ngpSliderValueChange',\n });\n\n /**\n * The minimum value of the slider.\n */\n readonly min = input<number, NumberInput>(0, {\n alias: 'ngpSliderMin',\n transform: numberAttribute,\n });\n\n /**\n * The maximum value of the slider.\n */\n readonly max = input<number, NumberInput>(100, {\n alias: 'ngpSliderMax',\n transform: numberAttribute,\n });\n\n /**\n * The step value of the slider.\n */\n readonly step = input<number, NumberInput>(1, {\n alias: 'ngpSliderStep',\n transform: numberAttribute,\n });\n\n /**\n * The orientation of the slider.\n */\n readonly orientation = input<NgpOrientation>('horizontal', {\n alias: 'ngpSliderOrientation',\n });\n\n /**\n * The disabled state of the slider.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpSliderDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the slider track.\n * @internal\n */\n readonly track = signal<NgpSliderTrack | undefined>(undefined);\n\n /**\n * The value as a percentage based on the min and max values.\n */\n protected readonly percentage = computed(\n () => ((this.state.value() - this.state.min()) / (this.state.max() - this.state.min())) * 100,\n );\n\n /**\n * The state of the slider. We use this for the slider state rather than relying on the inputs.\n * @internal\n */\n protected readonly state = sliderState<NgpSlider>(this);\n\n constructor() {\n setupFormControl({ id: this.state.id, disabled: this.state.disabled });\n }\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpRangeSlider } from './range-slider';\n\n/**\n * The state token for the Range Slider primitive.\n */\nexport const NgpRangeSliderStateToken = createStateToken<NgpRangeSlider>('RangeSlider');\n\n/**\n * Provides the Range Slider state.\n */\nexport const provideRangeSliderState = createStateProvider(NgpRangeSliderStateToken);\n\n/**\n * Injects the Range Slider state.\n */\nexport const injectRangeSliderState = createStateInjector<NgpRangeSlider>(NgpRangeSliderStateToken);\n\n/**\n * The Range Slider state registration function.\n */\nexport const rangeSliderState = createState(NgpRangeSliderStateToken);\n","import { Directive } from '@angular/core';\nimport { injectRangeSliderState } from '../range-slider/range-slider-state';\n\n/**\n * Apply the `ngpRangeSliderRange` directive to an element that represents the range between the low and high values.\n */\n@Directive({\n selector: '[ngpRangeSliderRange]',\n exportAs: 'ngpRangeSliderRange',\n host: {\n '[attr.data-orientation]': 'rangeSliderState().orientation()',\n '[attr.data-disabled]': 'rangeSliderState().disabled() ? \"\" : null',\n '[style.width.%]':\n 'rangeSliderState().orientation() === \"horizontal\" ? rangeSliderState().rangePercentage() : undefined',\n '[style.height.%]':\n 'rangeSliderState().orientation() === \"vertical\" ? rangeSliderState().rangePercentage() : undefined',\n '[style.inset-inline-start.%]':\n 'rangeSliderState().orientation() === \"horizontal\" ? rangeSliderState().lowPercentage() : undefined',\n '[style.inset-block-start.%]':\n 'rangeSliderState().orientation() === \"vertical\" ? rangeSliderState().lowPercentage() : undefined',\n },\n})\nexport class NgpRangeSliderRange {\n /**\n * Access the range slider state.\n */\n protected readonly rangeSliderState = injectRangeSliderState();\n}\n","import { computed, Directive, HostListener, OnDestroy } from '@angular/core';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { injectRangeSliderState } from '../range-slider/range-slider-state';\n\n/**\n * Apply the `ngpRangeSliderThumb` directive to an element that represents a thumb of the range slider.\n * Each thumb can be configured to control either the 'low' or 'high' value.\n */\n@Directive({\n selector: '[ngpRangeSliderThumb]',\n exportAs: 'ngpRangeSliderThumb',\n host: {\n role: 'slider',\n '[attr.aria-valuemin]': 'state().min()',\n '[attr.aria-valuemax]': 'state().max()',\n '[attr.aria-valuenow]': 'value()',\n '[attr.aria-orientation]': 'state().orientation()',\n '[tabindex]': 'state().disabled() ? -1 : 0',\n '[attr.data-orientation]': 'state().orientation()',\n '[attr.data-disabled]': 'state().disabled() ? \"\" : null',\n '[attr.data-thumb]': 'thumb()',\n '[style.inset-inline-start.%]':\n 'state().orientation() === \"horizontal\" ? percentage() : undefined',\n '[style.inset-block-start.%]':\n 'state().orientation() === \"vertical\" ? percentage() : undefined',\n },\n})\nexport class NgpRangeSliderThumb implements OnDestroy {\n /**\n * Access the range slider state.\n */\n protected readonly state = injectRangeSliderState();\n\n /**\n * Access the thumb element.\n */\n private readonly elementRef = injectElementRef();\n\n /**\n * Determines which value this thumb controls ('low' or 'high').\n */\n protected readonly thumb = computed(() =>\n this.state().thumbs().indexOf(this) === 0 ? 'low' : 'high',\n );\n\n /**\n * Store the dragging state.\n */\n protected dragging = false;\n\n /**\n * Get the current value for this thumb.\n */\n protected readonly value = computed(() =>\n this.thumb() === 'low' ? this.state().low() : this.state().high(),\n );\n\n /**\n * Get the current percentage for this thumb.\n */\n protected readonly percentage = computed(() =>\n this.thumb() === 'low' ? this.state().lowPercentage() : this.state().highPercentage(),\n );\n\n constructor() {\n ngpInteractions({\n hover: true,\n focusVisible: true,\n press: true,\n disabled: this.state().disabled,\n });\n\n this.state().addThumb(this);\n }\n\n ngOnDestroy(): void {\n this.state().removeThumb(this);\n }\n\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(event: PointerEvent): void {\n event.preventDefault();\n\n if (this.state().disabled()) {\n return;\n }\n\n this.dragging = true;\n }\n\n @HostListener('document:pointerup')\n protected handlePointerUp(): void {\n if (this.state().disabled()) {\n return;\n }\n\n this.dragging = false;\n }\n\n @HostListener('document:pointermove', ['$event'])\n protected handlePointerMove(event: PointerEvent): void {\n if (this.state().disabled() || !this.dragging) {\n return;\n }\n\n const rect = this.state().track()?.element.nativeElement.getBoundingClientRect();\n\n if (!rect) {\n return;\n }\n\n const percentage =\n this.state().orientation() === 'horizontal'\n ? (event.clientX - rect.left) / rect.width\n : (event.clientY - rect.top) / rect.height;\n\n const value =\n this.state().min() +\n (this.state().max() - this.state().min()) * Math.max(0, Math.min(1, percentage));\n\n // Update the appropriate value based on thumb type\n if (this.thumb() === 'low') {\n this.state().setLowValue(value);\n } else {\n this.state().setHighValue(value);\n }\n }\n\n /**\n * Handle keyboard events.\n * @param event\n */\n @HostListener('keydown', ['$event'])\n protected handleKeydown(event: KeyboardEvent): void {\n const multiplier = event.shiftKey ? 10 : 1;\n const currentValue = this.value();\n const step = this.state().step() * multiplier;\n\n // determine the document direction\n const isRTL = getComputedStyle(this.elementRef.nativeElement).direction === 'rtl';\n\n let newValue: number;\n\n switch (event.key) {\n case 'ArrowLeft':\n newValue = isRTL\n ? Math.min(currentValue - step, this.state().max())\n : Math.max(currentValue - step, this.state().min());\n break;\n case 'ArrowDown':\n newValue = Math.max(currentValue - step, this.state().min());\n break;\n case 'ArrowRight':\n newValue = isRTL\n ? Math.max(currentValue + step, this.state().min())\n : Math.min(currentValue + step, this.state().max());\n break;\n case 'ArrowUp':\n newValue = Math.min(currentValue + step, this.state().max());\n break;\n case 'Home':\n newValue = isRTL ? this.state().max() : this.state().min();\n break;\n case 'End':\n newValue = isRTL ? this.state().min() : this.state().max();\n break;\n default:\n return;\n }\n\n // Update the appropriate value based on thumb type\n if (this.thumb() === 'low') {\n this.state().setLowValue(newValue);\n } else {\n this.state().setHighValue(newValue);\n }\n\n event.preventDefault();\n }\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { injectRangeSliderState } from '../range-slider/range-slider-state';\n\n/**\n * Apply the `ngpRangeSliderTrack` directive to an element that represents the track of the range slider.\n */\n@Directive({\n selector: '[ngpRangeSliderTrack]',\n exportAs: 'ngpRangeSliderTrack',\n host: {\n '[attr.data-orientation]': 'rangeSliderState().orientation()',\n '[attr.data-disabled]': 'rangeSliderState().disabled() ? \"\" : null',\n },\n})\nexport class NgpRangeSliderTrack {\n /**\n * Access the range slider state.\n */\n protected readonly rangeSliderState = injectRangeSliderState();\n\n /**\n * The element that represents the slider track.\n */\n readonly element = injectElementRef<HTMLElement>();\n\n constructor() {\n this.rangeSliderState().track.set(this);\n }\n\n /**\n * When the slider track is clicked, update the closest thumb value.\n * @param event The click event.\n */\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(event: PointerEvent): void {\n if (this.rangeSliderState().disabled()) {\n return;\n }\n\n // get the position the click occurred within the slider track\n const position =\n this.rangeSliderState().orientation() === 'horizontal' ? event.clientX : event.clientY;\n const rect = this.element.nativeElement.getBoundingClientRect();\n const percentage =\n (position - (this.rangeSliderState().orientation() === 'horizontal' ? rect.left : rect.top)) /\n (this.rangeSliderState().orientation() === 'horizontal' ? rect.width : rect.height);\n\n // calculate the value based on the position\n const value =\n this.rangeSliderState().min() +\n (this.rangeSliderState().max() - this.rangeSliderState().min()) * percentage;\n\n // determine which thumb to move based on proximity\n const closestThumb = this.rangeSliderState().getClosestThumb(percentage * 100);\n\n if (closestThumb === 'low') {\n this.rangeSliderState().setLowValue(value);\n } else {\n this.rangeSliderState().setHighValue(value);\n }\n }\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n Directive,\n booleanAttribute,\n computed,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { setupFormControl } from 'ng-primitives/form-field';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { NgpRangeSliderThumb } from '../range-slider-thumb/range-slider-thumb';\nimport type { NgpRangeSliderTrack } from '../range-slider-track/range-slider-track';\nimport { provideRangeSliderState, rangeSliderState } from './range-slider-state';\n\n/**\n * Apply the `ngpRangeSlider` directive to an element that represents the range slider and contains the track, range, and thumbs.\n */\n@Directive({\n selector: '[ngpRangeSlider]',\n exportAs: 'ngpRangeSlider',\n providers: [provideRangeSliderState()],\n host: {\n '[id]': 'id()',\n '[attr.data-orientation]': 'state.orientation()',\n },\n})\nexport class NgpRangeSlider {\n /**\n * The id of the range slider. If not provided, a unique id will be generated.\n */\n readonly id = input<string>(uniqueId('ngp-range-slider'));\n\n /**\n * The low value of the range slider.\n */\n readonly low = input<number, NumberInput>(0, {\n alias: 'ngpRangeSliderLow',\n transform: numberAttribute,\n });\n\n /**\n * Emits when the low value changes.\n */\n readonly lowChange = output<number>({\n alias: 'ngpRangeSliderLowChange',\n });\n\n /**\n * The high value of the range slider.\n */\n readonly high = input<number, NumberInput>(100, {\n alias: 'ngpRangeSliderHigh',\n transform: numberAttribute,\n });\n\n /**\n * Emits when the high value changes.\n */\n readonly highChange = output<number>({\n alias: 'ngpRangeSliderHighChange',\n });\n\n /**\n * The minimum value of the range slider.\n */\n readonly min = input<number, NumberInput>(0, {\n alias: 'ngpRangeSliderMin',\n transform: numberAttribute,\n });\n\n /**\n * The maximum value of the range slider.\n */\n readonly max = input<number, NumberInput>(100, {\n alias: 'ngpRangeSliderMax',\n transform: numberAttribute,\n });\n\n /**\n * The step value of the range slider.\n */\n readonly step = input<number, NumberInput>(1, {\n alias: 'ngpRangeSliderStep',\n transform: numberAttribute,\n });\n\n /**\n * The orientation of the range slider.\n */\n readonly orientation = input<NgpOrientation>('horizontal', {\n alias: 'ngpRangeSliderOrientation',\n });\n\n /**\n * The disabled state of the range slider.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpRangeSliderDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the slider track.\n * @internal\n */\n readonly track = signal<NgpRangeSliderTrack | undefined>(undefined);\n\n /**\n * The thumbs of the range slider.\n * @internal\n */\n readonly thumbs = signal<NgpRangeSliderThumb[]>([]);\n\n /**\n * The low value as a percentage based on the min and max values.\n * @internal\n */\n readonly lowPercentage = computed(\n () => ((this.state.low() - this.state.min()) / (this.state.max() - this.state.min())) * 100,\n );\n\n /**\n * The high value as a percentage based on the min and max values.\n * @internal\n */\n readonly highPercentage = computed(\n () => ((this.state.high() - this.state.min()) / (this.state.max() - this.state.min())) * 100,\n );\n\n /**\n * The range between low and high values as a percentage.\n * @internal\n */\n readonly rangePercentage = computed(() => this.highPercentage() - this.lowPercentage());\n\n /**\n * The state of the range slider. We use this for the range slider state rather than relying on the inputs.\n * @internal\n */\n protected readonly state = rangeSliderState<NgpRangeSlider>(this);\n\n constructor() {\n setupFormControl({ id: this.state.id, disabled: this.state.disabled });\n }\n\n /**\n * Updates the low value, ensuring it doesn't exceed the high value.\n * @param value The new low value\n * @internal\n */\n setLowValue(value: number): void {\n const clampedValue = Math.max(this.state.min(), Math.min(value, this.state.high()));\n this.state.low.set(clampedValue);\n this.lowChange.emit(clampedValue);\n }\n\n /**\n * Updates the high value, ensuring it doesn't go below the low value.\n * @param value The new high value\n * @internal\n */\n setHighValue(value: number): void {\n const clampedValue = Math.min(this.state.max(), Math.max(value, this.state.low()));\n this.state.high.set(clampedValue);\n this.highChange.emit(clampedValue);\n }\n\n /**\n * Determines which thumb should be moved based on the position clicked.\n * @param percentage The percentage position of the click\n * @returns 'low' or 'high' indicating which thumb should move\n *\n * @internal\n */\n getClosestThumb(percentage: number): 'low' | 'high' {\n const value = this.state.min() + (this.state.max() - this.state.min()) * (percentage / 100);\n const distanceToLow = Math.abs(value - this.state.low());\n const distanceToHigh = Math.abs(value - this.state.high());\n\n return distanceToLow <= distanceToHigh ? 'low' : 'high';\n }\n\n /**\n * Updates the thumbs array when a new thumb is added.\n * @param thumb The new thumb to add\n * @internal\n */\n addThumb(thumb: NgpRangeSliderThumb): void {\n this.thumbs.update(thumbs => [...thumbs, thumb]);\n }\n\n /**\n * Removes a thumb from the thumbs array.\n * @param thumb The thumb to remove\n * @internal\n */\n removeThumb(thumb: NgpRangeSliderThumb): void {\n this.thumbs.update(thumbs => thumbs.filter(t => t !== thumb));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAQA;;AAEG;AACI,MAAM,mBAAmB,GAAG,gBAAgB,CAAY,QAAQ,CAAC;AAExE;;AAEG;MACU,kBAAkB,GAAG,mBAAmB,CAAC,mBAAmB;AAEzE;;AAEG;MACU,iBAAiB,GAAG,mBAAmB,CAAY,mBAAmB;AAEnF;;AAEG;AACI,MAAM,WAAW,GAAG,WAAW,CAAC,mBAAmB,CAAC;;ACvB3D;;AAEG;MAaU,cAAc,CAAA;AAZ3B,IAAA,WAAA,GAAA;AAaE;;AAEG;QACgB,IAAA,CAAA,WAAW,GAAG,iBAAiB,EAAE;AACrD,IAAA;+GALY,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,uBAAA,EAAA,6BAAA,EAAA,oBAAA,EAAA,wCAAA,EAAA,eAAA,EAAA,yFAAA,EAAA,gBAAA,EAAA,uFAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAA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A,UAAA,EAAA,0BAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,uBAAA,EAAA,qBAAA,EAAA,EAAA,EAAA,SAAA,EANd,CAAC,uBAAuB,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAM3B,cAAc,EAAA,UAAA,EAAA,CAAA;kBAT1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,SAAS,EAAE,CAAC,uBAAuB,EAAE,CAAC;AACtC,oBAAA,IAAI,EAAE;AACJ,wBAAA,MAAM,EAAE,MAAM;AACd,wBAAA,yBAAyB,EAAE,qBAAqB;AACjD,qBAAA;AACF,iBAAA;;;AC5BD;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Directive, input, booleanAttribute, output, HostListener } from '@angular/core';
3
- import { setupInteractions } from 'ng-primitives/interactions';
3
+ import { ngpInteractions } from 'ng-primitives/interactions';
4
4
  import { createStateToken, createStateProvider, createStateInjector, createState } from 'ng-primitives/state';
5
5
  import { setupFormControl } from 'ng-primitives/form-field';
6
6
  import { injectElementRef } from 'ng-primitives/internal';
@@ -32,7 +32,7 @@ class NgpSwitchThumb {
32
32
  * Access the switch state.
33
33
  */
34
34
  this.state = injectSwitchState();
35
- setupInteractions({
35
+ ngpInteractions({
36
36
  hover: true,
37
37
  focusVisible: true,
38
38
  press: true,
@@ -97,7 +97,7 @@ class NgpSwitch {
97
97
  * @internal
98
98
  */
99
99
  this.state = switchState(this);
100
- setupInteractions({
100
+ ngpInteractions({
101
101
  hover: true,
102
102
  press: true,
103
103
  focusVisible: true,
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-switch.mjs","sources":["../../../../packages/ng-primitives/switch/src/switch/switch-state.ts","../../../../packages/ng-primitives/switch/src/switch-thumb/switch-thumb.ts","../../../../packages/ng-primitives/switch/src/switch/switch.ts","../../../../packages/ng-primitives/switch/src/ng-primitives-switch.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpSwitch } from './switch';\n\n/**\n * The state token for the Switch primitive.\n */\nexport const NgpSwitchStateToken = createStateToken<NgpSwitch>('Switch');\n\n/**\n * Provides the Switch state.\n */\nexport const provideSwitchState = createStateProvider(NgpSwitchStateToken);\n\n/**\n * Injects the Switch state.\n */\nexport const injectSwitchState = createStateInjector<NgpSwitch>(NgpSwitchStateToken);\n\n/**\n * The Switch state registration function.\n */\nexport const switchState = createState(NgpSwitchStateToken);\n","import { Directive } from '@angular/core';\nimport { setupInteractions } from 'ng-primitives/interactions';\nimport { injectSwitchState } from '../switch/switch-state';\n\n/**\n * Apply the `ngpSwitchThumb` directive to an element within a switch to represent the thumb.\n */\n@Directive({\n selector: '[ngpSwitchThumb]',\n host: {\n '[attr.data-checked]': 'state().checked() ? \"\" : null',\n '[attr.data-disabled]': 'state().disabled() ? \"\" : null',\n },\n})\nexport class NgpSwitchThumb {\n /**\n * Access the switch state.\n */\n protected readonly state = injectSwitchState();\n\n constructor() {\n setupInteractions({\n hover: true,\n focusVisible: true,\n press: true,\n disabled: this.state().disabled,\n });\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, HostListener, input, output } from '@angular/core';\nimport { setupFormControl } from 'ng-primitives/form-field';\nimport { setupInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { provideSwitchState, switchState } from './switch-state';\n\n/**\n * Apply the `ngpSwitch` directive to an element to manage the checked state.\n */\n@Directive({\n selector: '[ngpSwitch]',\n exportAs: 'ngpSwitch',\n providers: [provideSwitchState()],\n host: {\n role: 'switch',\n '[id]': 'id()',\n '[attr.type]': 'isButton ? \"button\" : null',\n '[attr.aria-checked]': 'state.checked()',\n '[attr.data-checked]': 'state.checked() ? \"\" : null',\n '[attr.disabled]': 'isButton && state.disabled() ? \"\" : null',\n '[attr.data-disabled]': 'state.disabled() ? \"\" : null',\n '[attr.aria-disabled]': 'state.disabled()',\n '[attr.tabindex]': 'state.disabled() ? -1 : 0',\n },\n})\nexport class NgpSwitch {\n /**\n * Access the element ref.\n */\n private readonly elementRef = injectElementRef();\n\n /**\n * Determine if the switch is a button\n */\n protected isButton = this.elementRef.nativeElement.tagName === 'BUTTON';\n\n /**\n * The id of the switch. If not provided, a unique id will be generated.\n */\n readonly id = input<string>(uniqueId('ngp-switch'));\n\n /**\n * Determine if the switch is checked.\n * @default false\n */\n readonly checked = input<boolean, BooleanInput>(false, {\n alias: 'ngpSwitchChecked',\n transform: booleanAttribute,\n });\n\n /**\n * Emits when the checked state changes.\n */\n readonly checkedChange = output<boolean>({\n alias: 'ngpSwitchCheckedChange',\n });\n\n /**\n * Determine if the switch is disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpSwitchDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * The switch state.\n * @internal\n */\n readonly state = switchState<NgpSwitch>(this);\n\n constructor() {\n setupInteractions({\n hover: true,\n press: true,\n focusVisible: true,\n disabled: this.state.disabled,\n });\n setupFormControl({ id: this.state.id, disabled: this.state.disabled });\n }\n\n /**\n * Toggle the checked state.\n */\n @HostListener('click')\n toggle(): void {\n if (this.state.disabled()) {\n return;\n }\n\n const checked = !this.state.checked();\n this.state.checked.set(checked);\n this.checkedChange.emit(checked);\n }\n\n /**\n * Handle the keydown event.\n */\n @HostListener('keydown.space', ['$event'])\n protected onKeyDown(event: KeyboardEvent): void {\n // Prevent the default action of the space key, which is to scroll the page.\n event.preventDefault();\n\n // If the switch is not a button then the space key will not toggle the checked state automatically,\n // so we need to do it manually.\n if (!this.isButton) {\n this.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/switch/src/switch-thumb/switch-thumb.ts","../../../../packages/ng-primitives/switch/src/switch/switch.ts","../../../../packages/ng-primitives/switch/src/ng-primitives-switch.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpSwitch } from './switch';\n\n/**\n * The state token for the Switch primitive.\n */\nexport const NgpSwitchStateToken = createStateToken<NgpSwitch>('Switch');\n\n/**\n * Provides the Switch state.\n */\nexport const provideSwitchState = createStateProvider(NgpSwitchStateToken);\n\n/**\n * Injects the Switch state.\n */\nexport const injectSwitchState = createStateInjector<NgpSwitch>(NgpSwitchStateToken);\n\n/**\n * The Switch state registration function.\n */\nexport const switchState = createState(NgpSwitchStateToken);\n","import { Directive } from '@angular/core';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectSwitchState } from '../switch/switch-state';\n\n/**\n * Apply the `ngpSwitchThumb` directive to an element within a switch to represent the thumb.\n */\n@Directive({\n selector: '[ngpSwitchThumb]',\n host: {\n '[attr.data-checked]': 'state().checked() ? \"\" : null',\n '[attr.data-disabled]': 'state().disabled() ? \"\" : null',\n },\n})\nexport class NgpSwitchThumb {\n /**\n * Access the switch state.\n */\n protected readonly state = injectSwitchState();\n\n constructor() {\n ngpInteractions({\n hover: true,\n focusVisible: true,\n press: true,\n disabled: this.state().disabled,\n });\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, HostListener, input, output } from '@angular/core';\nimport { setupFormControl } from 'ng-primitives/form-field';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { provideSwitchState, switchState } from './switch-state';\n\n/**\n * Apply the `ngpSwitch` directive to an element to manage the checked state.\n */\n@Directive({\n selector: '[ngpSwitch]',\n exportAs: 'ngpSwitch',\n providers: [provideSwitchState()],\n host: {\n role: 'switch',\n '[id]': 'id()',\n '[attr.type]': 'isButton ? \"button\" : null',\n '[attr.aria-checked]': 'state.checked()',\n '[attr.data-checked]': 'state.checked() ? \"\" : null',\n '[attr.disabled]': 'isButton && state.disabled() ? \"\" : null',\n '[attr.data-disabled]': 'state.disabled() ? \"\" : null',\n '[attr.aria-disabled]': 'state.disabled()',\n '[attr.tabindex]': 'state.disabled() ? -1 : 0',\n },\n})\nexport class NgpSwitch {\n /**\n * Access the element ref.\n */\n private readonly elementRef = injectElementRef();\n\n /**\n * Determine if the switch is a button\n */\n protected isButton = this.elementRef.nativeElement.tagName === 'BUTTON';\n\n /**\n * The id of the switch. If not provided, a unique id will be generated.\n */\n readonly id = input<string>(uniqueId('ngp-switch'));\n\n /**\n * Determine if the switch is checked.\n * @default false\n */\n readonly checked = input<boolean, BooleanInput>(false, {\n alias: 'ngpSwitchChecked',\n transform: booleanAttribute,\n });\n\n /**\n * Emits when the checked state changes.\n */\n readonly checkedChange = output<boolean>({\n alias: 'ngpSwitchCheckedChange',\n });\n\n /**\n * Determine if the switch is disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpSwitchDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * The switch state.\n * @internal\n */\n readonly state = switchState<NgpSwitch>(this);\n\n constructor() {\n ngpInteractions({\n hover: true,\n press: true,\n focusVisible: true,\n disabled: this.state.disabled,\n });\n setupFormControl({ id: this.state.id, disabled: this.state.disabled });\n }\n\n /**\n * Toggle the checked state.\n */\n @HostListener('click')\n toggle(): void {\n if (this.state.disabled()) {\n return;\n }\n\n const checked = !this.state.checked();\n this.state.checked.set(checked);\n this.checkedChange.emit(checked);\n }\n\n /**\n * Handle the keydown event.\n */\n @HostListener('keydown.space', ['$event'])\n protected onKeyDown(event: KeyboardEvent): void {\n // Prevent the default action of the space key, which is to scroll the page.\n event.preventDefault();\n\n // If the switch is not a button then the space key will not toggle the checked state automatically,\n // so we need to do it manually.\n if (!this.isButton) {\n this.toggle();\n }\n }\n}\n","/**\n * Generated bundle index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A,EAAA,mBAAA,EAAA,EAAA,UAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,WAAA,EAAA,8BAAA,EAAA,mBAAA,EAAA,iBAAA,EAAA,mBAAA,EAAA,+BAAA,EAAA,eAAA,EAAA,4CAAA,EAAA,oBAAA,EAAA,gCAAA,EAAA,oBAAA,EAAA,kBAAA,EAAA,eAAA,EAAA,2BAAA,EAAA,EAAA,EAAA,SAAA,EAbT,CAAC,kBAAkB,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAatB,SAAS,EAAA,UAAA,EAAA,CAAA;kBAhBrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,SAAS,EAAE,CAAC,kBAAkB,EAAE,CAAC;AACjC,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,MAAM,EAAE,MAAM;AACd,wBAAA,aAAa,EAAE,4BAA4B;AAC3C,wBAAA,qBAAqB,EAAE,iBAAiB;AACxC,wBAAA,qBAAqB,EAAE,6BAA6B;AACpD,wBAAA,iBAAiB,EAAE,0CAA0C;AAC7D,wBAAA,sBAAsB,EAAE,8BAA8B;AACtD,wBAAA,sBAAsB,EAAE,kBAAkB;AAC1C,wBAAA,iBAAiB,EAAE,2BAA2B;AAC/C,qBAAA;AACF,iBAAA;wDA8DC,MAAM,EAAA,CAAA;sBADL,YAAY;uBAAC,OAAO;gBAeX,SAAS,EAAA,CAAA;sBADlB,YAAY;uBAAC,eAAe,EAAE,CAAC,QAAQ,CAAC;;;ACrG3C;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { InjectionToken, inject, HOST_TAG_NAME, input, booleanAttribute, computed, HostListener, Directive, output, signal } from '@angular/core';
3
- import { setupInteractions } from 'ng-primitives/interactions';
3
+ import { ngpInteractions } from 'ng-primitives/interactions';
4
4
  import * as i1 from 'ng-primitives/roving-focus';
5
5
  import { NgpRovingFocusItem, injectRovingFocusGroupState, NgpRovingFocusGroup } from 'ng-primitives/roving-focus';
6
6
  import { createStateToken, createStateProvider, createStateInjector, createState } from 'ng-primitives/state';
@@ -97,7 +97,7 @@ class NgpTabButton {
97
97
  */
98
98
  this.active = computed(() => this.state().selectedTab() === this.value());
99
99
  this.state().registerTab(this);
100
- setupInteractions({
100
+ ngpInteractions({
101
101
  hover: true,
102
102
  press: true,
103
103
  focusVisible: true,