ng-primitives 0.121.0 → 0.122.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ng-primitives-combobox.mjs +13 -3
- package/fesm2022/ng-primitives-combobox.mjs.map +1 -1
- package/fesm2022/ng-primitives-context-menu.mjs +9 -3
- package/fesm2022/ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-menu.mjs +8 -2
- package/fesm2022/ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-navigation-menu.mjs +6 -2
- package/fesm2022/ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-popover.mjs +8 -3
- package/fesm2022/ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/ng-primitives-select.mjs +7 -2
- package/fesm2022/ng-primitives-select.mjs.map +1 -1
- package/fesm2022/ng-primitives-toast.mjs +15 -12
- package/fesm2022/ng-primitives-toast.mjs.map +1 -1
- package/fesm2022/ng-primitives-tooltip.mjs +9 -5
- package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ng-primitives-combobox.d.ts +11 -1
- package/types/ng-primitives-context-menu.d.ts +16 -3
- package/types/ng-primitives-menu.d.ts +16 -1
- package/types/ng-primitives-navigation-menu.d.ts +22 -9
- package/types/ng-primitives-popover.d.ts +9 -2
- package/types/ng-primitives-select.d.ts +9 -2
- package/types/ng-primitives-toast.d.ts +4 -3
- package/types/ng-primitives-tooltip.d.ts +18 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-popover.mjs","sources":["../../../../packages/ng-primitives/popover/src/config/popover-config.ts","../../../../packages/ng-primitives/popover/src/popover-arrow/popover-arrow-state.ts","../../../../packages/ng-primitives/popover/src/popover-arrow/popover-arrow.ts","../../../../packages/ng-primitives/popover/src/popover-trigger/popover-trigger-state.ts","../../../../packages/ng-primitives/popover/src/popover-trigger/popover-trigger.ts","../../../../packages/ng-primitives/popover/src/popover/popover-state.ts","../../../../packages/ng-primitives/popover/src/popover/popover.ts","../../../../packages/ng-primitives/popover/src/ng-primitives-popover.ts"],"sourcesContent":["import { InjectionToken, Provider, inject } from '@angular/core';\nimport { type Placement } from '@floating-ui/dom';\nimport { NgpDismissGuard, NgpFlip, NgpOffset, NgpShift } from 'ng-primitives/portal';\n\nexport interface NgpPopoverConfig {\n /**\n * Define the offset of the popover relative to the trigger.\n * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n * @default 4\n */\n offset: NgpOffset;\n\n /**\n * Define the placement of the popover relative to the trigger.\n * @default 'bottom'\n */\n placement: Placement;\n\n /**\n * Define the delay before the popover is shown.\n * @default 0\n */\n showDelay: number;\n\n /**\n * Define the delay before the popover is hidden.\n * @default 0\n */\n hideDelay: number;\n\n /**\n * Define whether the popover should flip when there is not enough space for the popover.\n * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n * @default true\n */\n flip: NgpFlip;\n\n /**\n * Define the container element or selector in to which the popover should be attached.\n * @default 'body'\n */\n container: HTMLElement | string | null;\n\n /**\n * Define whether the popover should close when clicking outside of it, or a guard function.\n * @default true\n */\n closeOnOutsideClick: NgpDismissGuard<Element>;\n\n /**\n * Define whether the popover should close when the escape key is pressed, or a guard function.\n * @default true\n */\n closeOnEscape: NgpDismissGuard<KeyboardEvent>;\n\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default scroll\n */\n scrollBehavior: 'reposition' | 'block' | 'close';\n\n /**\n * Configure shift behavior to keep the popover in view.\n * Can be a boolean to enable/disable, or an object with padding and limiter options.\n * @default undefined (enabled by default in overlay)\n */\n shift: NgpShift;\n\n /**\n * Whether to track the trigger element position on every animation frame.\n * Useful for moving elements like slider thumbs.\n * @default false\n */\n trackPosition: boolean;\n\n /**\n * Cooldown duration in milliseconds.\n * When moving from one popover to another within this duration,\n * the showDelay is skipped for the new popover.\n * @default 0\n */\n cooldown: number;\n}\n\nexport const defaultPopoverConfig: NgpPopoverConfig = {\n offset: 4,\n placement: 'bottom',\n showDelay: 0,\n hideDelay: 0,\n flip: true,\n container: 'body',\n closeOnOutsideClick: true,\n closeOnEscape: true,\n scrollBehavior: 'reposition',\n shift: undefined,\n trackPosition: false,\n cooldown: 0,\n};\n\nexport const NgpPopoverConfigToken = new InjectionToken<NgpPopoverConfig>('NgpPopoverConfigToken');\n\n/**\n * Provide the default Popover configuration\n * @param config The Popover configuration\n * @returns The provider\n */\nexport function providePopoverConfig(config: Partial<NgpPopoverConfig>): Provider[] {\n return [\n {\n provide: NgpPopoverConfigToken,\n useValue: { ...defaultPopoverConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Popover configuration\n * @returns The global Popover configuration\n */\nexport function injectPopoverConfig(): NgpPopoverConfig {\n return inject(NgpPopoverConfigToken, { optional: true }) ?? defaultPopoverConfig;\n}\n","import { NgpOverlayArrowProps, NgpOverlayArrowState, ngpOverlayArrow } from 'ng-primitives/portal';\nimport { createPrimitive } from 'ng-primitives/state';\n\n// Re-export types with popover-specific aliases\nexport { NgpOverlayArrowProps as NgpPopoverArrowProps };\nexport { NgpOverlayArrowState as NgpPopoverArrowState };\n\nexport const [\n NgpPopoverArrowStateToken,\n ngpPopoverArrow,\n injectPopoverArrowState,\n providePopoverArrowState,\n] = createPrimitive(\n 'NgpPopoverArrow',\n ({ padding }: NgpOverlayArrowProps): NgpOverlayArrowState => {\n return ngpOverlayArrow({ padding });\n },\n);\n","import { NumberInput } from '@angular/cdk/coercion';\nimport { Directive, input, numberAttribute } from '@angular/core';\nimport { ngpPopoverArrow, providePopoverArrowState } from './popover-arrow-state';\n\n@Directive({\n selector: '[ngpPopoverArrow]',\n exportAs: 'ngpPopoverArrow',\n providers: [providePopoverArrowState()],\n})\nexport class NgpPopoverArrow {\n /**\n * Padding between the arrow and the edges of the popover.\n * This prevents the arrow from overflowing the rounded corners.\n */\n readonly padding = input<number | undefined, NumberInput>(undefined, {\n alias: 'ngpPopoverArrowPadding',\n transform: numberAttribute,\n });\n\n private readonly state = ngpPopoverArrow({ padding: this.padding });\n\n /**\n * Set the padding between the arrow and the edges of the popover.\n * @param value The padding value in pixels\n */\n setPadding(value: number | undefined): void {\n this.state.setPadding(value);\n }\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport {\n computed,\n ElementRef,\n inject,\n Injector,\n signal,\n Signal,\n ViewContainerRef,\n WritableSignal,\n} from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n createOverlay,\n NgpDismissGuard,\n NgpFlip,\n NgpOffset,\n NgpOverlay,\n NgpOverlayConfig,\n NgpOverlayContent,\n NgpShift,\n} from 'ng-primitives/portal';\nimport {\n attrBinding,\n controlled,\n createPrimitive,\n dataBinding,\n listener,\n StateInjectionOptions,\n} from 'ng-primitives/state';\n\nexport interface NgpPopoverTriggerState<T> {\n /** Access the trigger element. */\n readonly elementRef: ElementRef;\n /** Access the popover template ref. */\n readonly popover: WritableSignal<NgpOverlayContent<T> | undefined>;\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled: Signal<boolean>;\n /**\n * Define the placement of the popover relative to the trigger.\n * @default 'top'\n */\n readonly placement: Signal<NgpPopoverPlacement>;\n /**\n * Define the offset of the popover relative to the trigger.\n * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n * @default 0\n */\n readonly offset: Signal<NgpOffset>;\n /**\n * Define the delay before the popover is displayed.\n * @default 0\n */\n readonly showDelay: Signal<number>;\n /**\n * Define the delay before the popover is hidden.\n * @default 0\n */\n readonly hideDelay: Signal<number>;\n /**\n * Define whether the popover should flip when there is not enough space for the popover.\n * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n * @default true\n */\n readonly flip: Signal<NgpFlip>;\n /**\n * Configure shift behavior to keep the popover in view.\n * Can be a boolean to enable/disable, or an object with padding and limiter options.\n * @default undefined (enabled by default in overlay)\n */\n readonly shift: Signal<NgpShift>;\n /**\n * Define the container in which the popover should be attached.\n * @default document.body\n */\n readonly container: Signal<HTMLElement | string | null>;\n /**\n * Define whether the popover should close when clicking outside of it, or a guard function.\n * @default true\n */\n readonly closeOnOutsideClick: Signal<NgpDismissGuard<Element>>;\n /**\n * Define whether the popover should close when the escape key is pressed, or a guard function.\n * @default true\n */\n readonly closeOnEscape: Signal<NgpDismissGuard<KeyboardEvent>>;\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default 'reposition'\n */\n readonly scrollBehavior: Signal<'reposition' | 'block' | 'close'>;\n /**\n * Provide context to the popover. This can be used to pass data to the popover content.\n */\n readonly context: Signal<T | undefined>;\n /**\n * Define an anchor element for positioning the popover.\n * If provided, the popover will be positioned relative to this element instead of the trigger.\n */\n readonly anchor: Signal<HTMLElement | null>;\n /**\n * Define whether to track the trigger element position on every animation frame.\n * Useful for moving elements like slider thumbs.\n * @default false\n */\n readonly trackPosition: Signal<boolean>;\n /**\n * Define the cooldown duration in milliseconds.\n * When moving from one popover to another within this duration,\n * the showDelay is skipped for the new popover.\n * @default 0\n */\n readonly cooldown: Signal<number>;\n /**\n * The overlay that manages the popover\n * @internal\n */\n readonly overlay: Signal<NgpOverlay<T> | null>;\n /**\n * The open state of the popover.\n * @internal\n */\n readonly open: Signal<boolean>;\n /** @internal onDestroy callback */\n destroy: () => void;\n /**\n * Show the popover.\n * @returns A promise that resolves when the popover has been shown\n */\n show: () => Promise<void>;\n /**\n * @internal\n * Hide the popover.\n * @returns A promise that resolves when the popover has been hidden\n */\n hide: (origin: FocusOrigin) => Promise<void>;\n}\n\nexport interface NgpPopoverTriggerProps<T> {\n /** Access the popover template ref. */\n readonly popover?: Signal<NgpOverlayContent<T> | undefined>;\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled?: Signal<boolean>;\n /**\n * Define the placement of the popover relative to the trigger.\n * @default 'top'\n */\n readonly placement?: Signal<NgpPopoverPlacement>;\n /**\n * Define the offset of the popover relative to the trigger.\n * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n * @default 0\n */\n readonly offset?: Signal<NgpOffset>;\n /**\n * Define the delay before the popover is displayed.\n * @default 0\n */\n readonly showDelay?: Signal<number>;\n /**\n * Define the delay before the popover is hidden.\n * @default 0\n */\n readonly hideDelay?: Signal<number>;\n /**\n * Define whether the popover should flip when there is not enough space for the popover.\n * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n * @default true\n */\n readonly flip?: Signal<NgpFlip>;\n /**\n * Configure shift behavior to keep the popover in view.\n * Can be a boolean to enable/disable, or an object with padding and limiter options.\n * @default undefined (enabled by default in overlay)\n */\n readonly shift?: Signal<NgpShift>;\n /**\n * Define the container in which the popover should be attached.\n * @default document.body\n */\n readonly container?: Signal<HTMLElement | string | null>;\n /**\n * Define whether the popover should close when clicking outside of it, or a guard function.\n * @default true\n */\n readonly closeOnOutsideClick?: Signal<NgpDismissGuard<Element>>;\n /**\n * Define whether the popover should close when the escape key is pressed, or a guard function.\n * @default true\n */\n readonly closeOnEscape?: Signal<NgpDismissGuard<KeyboardEvent>>;\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default 'reposition'\n */\n readonly scrollBehavior?: Signal<'reposition' | 'block' | 'close'>;\n /**\n * Provide context to the popover. This can be used to pass data to the popover content.\n */\n readonly context?: Signal<T | undefined>;\n /**\n * Define an anchor element for positioning the popover.\n * If provided, the popover will be positioned relative to this element instead of the trigger.\n */\n readonly anchor?: Signal<HTMLElement | null>;\n /**\n * Define whether to track the trigger element position on every animation frame.\n * Useful for moving elements like slider thumbs.\n * @default false\n */\n readonly trackPosition?: Signal<boolean>;\n /**\n * Define the cooldown duration in milliseconds.\n * When moving from one popover to another within this duration,\n * the showDelay is skipped for the new popover.\n * @default 0\n */\n readonly cooldown?: Signal<number>;\n /** Callback fired when the open state changes. */\n readonly onOpenChange?: (value: boolean) => void;\n}\n\nexport const [\n NgpPopoverTriggerStateToken,\n ngpPopoverTrigger,\n _injectPopoverTriggerState,\n providePopoverTriggerState,\n] = createPrimitive(\n 'NgpPopoverTrigger',\n <T>({\n popover: _popover = signal<NgpOverlayContent<T> | undefined>(undefined),\n disabled = signal<boolean>(false),\n placement = signal<NgpPopoverPlacement>('bottom'),\n offset = signal<NgpOffset>(4),\n showDelay = signal<number>(0),\n hideDelay = signal<number>(0),\n flip = signal<NgpFlip>(true),\n shift = signal<NgpShift>(undefined),\n container = signal<HTMLElement | string | null>('body'),\n closeOnOutsideClick = signal<NgpDismissGuard<Element>>(true),\n closeOnEscape = signal<NgpDismissGuard<KeyboardEvent>>(true),\n scrollBehavior = signal<'reposition' | 'block' | 'close'>('reposition'),\n context = signal<T | undefined>(undefined),\n anchor = signal<HTMLElement | null>(null),\n trackPosition = signal<boolean>(false),\n cooldown = signal<number>(0),\n onOpenChange,\n }: NgpPopoverTriggerProps<T>): NgpPopoverTriggerState<T> => {\n const elementRef = injectElementRef<HTMLElement>();\n const viewContainerRef = inject(ViewContainerRef);\n const injector = inject(Injector);\n\n const popover = controlled(_popover);\n\n const overlay = signal<NgpOverlay<T> | null>(null);\n const open = computed(() => overlay()?.isOpen() ?? false);\n\n // Host binding\n attrBinding(elementRef, 'aria-expanded', () => (open() ? 'true' : 'false'));\n attrBinding(elementRef, 'aria-describedby', () => overlay()?.ariaDescribedBy());\n dataBinding(elementRef, 'data-open', open);\n dataBinding(elementRef, 'data-placement', placement);\n dataBinding(elementRef, 'data-disabled', disabled);\n\n // Event listener\n listener(elementRef, 'click', toggle);\n\n function destroy(): void {\n overlay()?.destroy();\n }\n\n function createOverlayInstance(): void {\n const popoverInstance = popover();\n\n if (!popoverInstance) {\n throw new Error('Popover must be either a TemplateRef or a ComponentType');\n }\n\n // Create config for the overlay\n const config: NgpOverlayConfig<T> = {\n content: popoverInstance,\n triggerElement: elementRef.nativeElement,\n anchorElement: anchor(),\n injector: injector,\n context: context,\n container: container(),\n placement: placement,\n offset: offset(),\n flip: flip(),\n shift: shift(),\n showDelay: showDelay(),\n hideDelay: hideDelay(),\n closeOnOutsideClick: closeOnOutsideClick(),\n closeOnEscape: closeOnEscape(),\n restoreFocus: true,\n scrollBehaviour: scrollBehavior(),\n viewContainerRef: viewContainerRef,\n trackPosition: trackPosition(),\n overlayType: 'popover',\n cooldown: cooldown(),\n onClose: () => onOpenChange?.(false),\n };\n\n overlay.set(createOverlay(config));\n }\n\n function toggle(event: MouseEvent): void {\n // if the trigger is disabled then do not toggle the popover\n if (disabled()) {\n return;\n }\n\n // determine the origin of the event, 0 is keyboard, 1 is mouse\n const origin: FocusOrigin = event.detail === 0 ? 'keyboard' : 'mouse';\n\n // if the popover is open then hide it\n if (open()) {\n hide(origin);\n } else {\n show();\n }\n }\n\n async function show(): Promise<void> {\n // If the trigger is disabled, don't show the popover\n if (disabled()) {\n return;\n }\n\n // Create the overlay if it doesn't exist yet\n if (!overlay()) {\n createOverlayInstance();\n }\n\n // Show the overlay\n await overlay()?.show();\n\n if (open()) {\n onOpenChange?.(true);\n }\n }\n\n async function hide(origin: FocusOrigin): Promise<void> {\n // If the trigger is disabled or the popover is not open, do nothing\n if (disabled() || !open()) {\n return;\n }\n\n // Hide the overlay\n await overlay()?.hide({ origin });\n }\n\n return {\n elementRef,\n popover,\n disabled,\n placement,\n offset,\n showDelay,\n hideDelay,\n flip,\n shift,\n container,\n closeOnOutsideClick,\n closeOnEscape,\n scrollBehavior,\n context,\n anchor,\n trackPosition,\n cooldown,\n overlay,\n open,\n destroy,\n show,\n hide,\n } satisfies NgpPopoverTriggerState<T>;\n },\n);\n\nexport function injectPopoverTriggerState<T>(\n options?: StateInjectionOptions,\n): Signal<NgpPopoverTriggerState<T>> {\n return _injectPopoverTriggerState(options) as Signal<NgpPopoverTriggerState<T>>;\n}\n\nexport type NgpPopoverPlacement =\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'top-start'\n | 'top-end'\n | 'right-start'\n | 'right-end'\n | 'bottom-start'\n | 'bottom-end'\n | 'left-start'\n | 'left-end';\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n Directive,\n input,\n numberAttribute,\n OnDestroy,\n output,\n} from '@angular/core';\nimport {\n coerceFlip,\n dismissGuardAttribute,\n NgpDismissGuard,\n NgpDismissGuardInput,\n NgpFlip,\n NgpFlipInput,\n NgpOverlayContent,\n coerceOffset,\n NgpOffset,\n NgpOffsetInput,\n coerceShift,\n NgpShift,\n NgpShiftInput,\n} from 'ng-primitives/portal';\nimport { injectPopoverConfig } from '../config/popover-config';\nimport {\n NgpPopoverPlacement,\n ngpPopoverTrigger,\n providePopoverTriggerState,\n} from './popover-trigger-state';\n\n/**\n * Apply the `ngpPopoverTrigger` directive to an element that triggers the popover to show.\n */\n@Directive({\n selector: '[ngpPopoverTrigger]',\n exportAs: 'ngpPopoverTrigger',\n providers: [providePopoverTriggerState({ inherit: false })],\n})\nexport class NgpPopoverTrigger<T = null> implements OnDestroy {\n /**\n * Access the global popover configuration.\n */\n private readonly config = injectPopoverConfig();\n\n /**\n * Access the popover template ref.\n */\n readonly popover = input<NgpOverlayContent<T>>(undefined, {\n alias: 'ngpPopoverTrigger',\n });\n\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpPopoverTriggerDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Define the placement of the popover relative to the trigger.\n * @default 'top'\n */\n readonly placement = input<NgpPopoverPlacement>(this.config.placement, {\n alias: 'ngpPopoverTriggerPlacement',\n });\n\n /**\n * Define the offset of the popover relative to the trigger.\n * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n * @default 0\n */\n readonly offset = input<NgpOffset, NgpOffsetInput>(this.config.offset, {\n alias: 'ngpPopoverTriggerOffset',\n transform: coerceOffset,\n });\n\n /**\n * Define the delay before the popover is displayed.\n * @default 0\n */\n readonly showDelay = input<number, NumberInput>(this.config.showDelay, {\n alias: 'ngpPopoverTriggerShowDelay',\n transform: numberAttribute,\n });\n\n /**\n * Define the delay before the popover is hidden.\n * @default 0\n */\n readonly hideDelay = input<number, NumberInput>(this.config.hideDelay, {\n alias: 'ngpPopoverTriggerHideDelay',\n transform: numberAttribute,\n });\n\n /**\n * Define whether the popover should flip when there is not enough space for the popover.\n * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n * @default true\n */\n readonly flip = input<NgpFlip, NgpFlipInput>(this.config.flip, {\n alias: 'ngpPopoverTriggerFlip',\n transform: coerceFlip,\n });\n\n /**\n * Configure shift behavior to keep the popover in view.\n * Can be a boolean to enable/disable, or an object with padding and limiter options.\n * @default undefined (enabled by default in overlay)\n */\n readonly shift = input<NgpShift, NgpShiftInput>(this.config.shift, {\n alias: 'ngpPopoverTriggerShift',\n transform: coerceShift,\n });\n\n /**\n * Define the container in which the popover should be attached.\n * @default document.body\n */\n readonly container = input<HTMLElement | string | null>(this.config.container, {\n alias: 'ngpPopoverTriggerContainer',\n });\n\n /**\n * Define whether the popover should close when clicking outside of it, or a guard function.\n * @default true\n */\n readonly closeOnOutsideClick = input<NgpDismissGuard<Element>, NgpDismissGuardInput<Element>>(\n this.config.closeOnOutsideClick,\n {\n alias: 'ngpPopoverTriggerCloseOnOutsideClick',\n transform: dismissGuardAttribute,\n },\n );\n\n /**\n * Define whether the popover should close when the escape key is pressed, or a guard function.\n * @default true\n */\n readonly closeOnEscape = input<\n NgpDismissGuard<KeyboardEvent>,\n NgpDismissGuardInput<KeyboardEvent>\n >(this.config.closeOnEscape, {\n alias: 'ngpPopoverTriggerCloseOnEscape',\n transform: dismissGuardAttribute,\n });\n\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default 'reposition'\n */\n readonly scrollBehavior = input<'reposition' | 'block' | 'close'>(this.config.scrollBehavior, {\n alias: 'ngpPopoverTriggerScrollBehavior',\n });\n\n /**\n * Provide context to the popover. This can be used to pass data to the popover content.\n */\n readonly context = input<T>(undefined, {\n alias: 'ngpPopoverTriggerContext',\n });\n\n /**\n * Define an anchor element for positioning the popover.\n * If provided, the popover will be positioned relative to this element instead of the trigger.\n */\n readonly anchor = input<HTMLElement | null>(null, {\n alias: 'ngpPopoverTriggerAnchor',\n });\n\n /**\n * Define whether to track the trigger element position on every animation frame.\n * Useful for moving elements like slider thumbs.\n * @default false\n */\n readonly trackPosition = input<boolean, BooleanInput>(this.config.trackPosition, {\n alias: 'ngpPopoverTriggerTrackPosition',\n transform: booleanAttribute,\n });\n\n /**\n * Define the cooldown duration in milliseconds.\n * When moving from one popover to another within this duration,\n * the showDelay is skipped for the new popover.\n * @default 0\n */\n readonly cooldown = input<number, NumberInput>(this.config.cooldown, {\n alias: 'ngpPopoverTriggerCooldown',\n transform: numberAttribute,\n });\n\n /**\n * Event emitted when the popover open state changes.\n */\n readonly openChange = output<boolean>({\n alias: 'ngpPopoverTriggerOpenChange',\n });\n\n /**\n * The popover trigger state.\n */\n protected readonly state = ngpPopoverTrigger({\n popover: this.popover,\n disabled: this.disabled,\n placement: this.placement,\n offset: this.offset,\n showDelay: this.showDelay,\n hideDelay: this.hideDelay,\n flip: this.flip,\n shift: this.shift,\n container: this.container,\n closeOnOutsideClick: this.closeOnOutsideClick,\n closeOnEscape: this.closeOnEscape,\n scrollBehavior: this.scrollBehavior,\n context: this.context,\n anchor: this.anchor,\n trackPosition: this.trackPosition,\n cooldown: this.cooldown,\n onOpenChange: (value: boolean) => this.openChange.emit(value),\n });\n\n ngOnDestroy(): void {\n this.state.destroy();\n }\n\n /**\n * Show the popover.\n * @returns A promise that resolves when the popover has been shown\n */\n show(): Promise<void> {\n return this.state.show();\n }\n\n /**\n * @internal\n * Hide the popover.\n * @returns A promise that resolves when the popover has been hidden\n */\n hide(origin: FocusOrigin = 'program'): Promise<void> {\n return this.state.hide(origin);\n }\n}\n","import { signal, Signal } from '@angular/core';\nimport { explicitEffect, injectElementRef } from 'ng-primitives/internal';\nimport { injectOverlay } from 'ng-primitives/portal';\nimport {\n attrBinding,\n controlled,\n createPrimitive,\n dataBinding,\n styleBinding,\n} from 'ng-primitives/state';\n\nexport interface NgpPopoverState {\n /** The unique id of the tooltip. */\n readonly id: Signal<string>;\n}\n\nexport interface NgpPopoverProps {\n /** The unique id of the tooltip. */\n readonly id?: Signal<string>;\n}\n\nexport const [NgpPopoverStateToken, ngpPopover, injectPopoverState, providePopoverState] =\n createPrimitive('NgpPopover', ({ id: _id = signal<string>('') }: NgpPopoverProps) => {\n const elementRef = injectElementRef<HTMLElement>();\n\n const overlay = injectOverlay();\n const id = controlled(_id);\n\n id.set(overlay.id());\n\n // Host binding\n attrBinding(elementRef, 'role', 'dialog');\n attrBinding(elementRef, 'id', id);\n styleBinding(elementRef, 'left.px', () => overlay.position().x ?? null);\n styleBinding(elementRef, 'top.px', () => overlay.position().y ?? null);\n styleBinding(elementRef, '--ngp-popover-trigger-width.px', () => overlay.triggerWidth());\n styleBinding(elementRef, '--ngp-popover-transform-origin', () => overlay.transformOrigin());\n styleBinding(elementRef, '--ngp-popover-available-width.px', () => overlay.availableWidth());\n styleBinding(elementRef, '--ngp-popover-available-height.px', () => overlay.availableHeight());\n dataBinding(elementRef, 'data-placement', () => overlay.finalPlacement() ?? null);\n dataBinding(elementRef, 'data-overlay', '');\n\n // Effect handle\n explicitEffect([id], ([id]) => overlay.id.set(id));\n\n return {\n id,\n } satisfies NgpPopoverState;\n });\n","import { Directive, input } from '@angular/core';\nimport { NgpFocusTrap } from 'ng-primitives/focus-trap';\nimport { provideControlContainerIsolation } from 'ng-primitives/portal';\nimport { ngpPopover, providePopoverState } from './popover-state';\n\n/**\n * Apply the `ngpPopover` directive to an element that represents the popover. This typically would be a `div` inside an `ng-template`.\n */\n@Directive({\n selector: '[ngpPopover]',\n exportAs: 'ngpPopover',\n hostDirectives: [NgpFocusTrap],\n providers: [providePopoverState(), provideControlContainerIsolation()],\n})\nexport class NgpPopover {\n /**\n * The unique id of the tooltip.\n */\n readonly id = input('');\n\n protected readonly state = ngpPopover({\n id: this.id,\n });\n}\n","/**\n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AC;AACvE,iBAAA;;;ACbD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-primitives-popover.mjs","sources":["../../../../packages/ng-primitives/popover/src/config/popover-config.ts","../../../../packages/ng-primitives/popover/src/popover-arrow/popover-arrow-state.ts","../../../../packages/ng-primitives/popover/src/popover-arrow/popover-arrow.ts","../../../../packages/ng-primitives/popover/src/popover-trigger/popover-trigger-state.ts","../../../../packages/ng-primitives/popover/src/popover-trigger/popover-trigger.ts","../../../../packages/ng-primitives/popover/src/popover/popover-state.ts","../../../../packages/ng-primitives/popover/src/popover/popover.ts","../../../../packages/ng-primitives/popover/src/ng-primitives-popover.ts"],"sourcesContent":["import { InjectionToken, Provider, inject } from '@angular/core';\nimport { type Placement } from '@floating-ui/dom';\nimport { NgpDismissGuard, NgpFlip, NgpOffset, NgpShift } from 'ng-primitives/portal';\n\nexport interface NgpPopoverConfig {\n /**\n * Define the offset of the popover relative to the trigger.\n * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n * @default 4\n */\n offset: NgpOffset;\n\n /**\n * Define the placement of the popover relative to the trigger.\n * @default 'bottom'\n */\n placement: Placement;\n\n /**\n * Define the delay before the popover is shown.\n * @default 0\n */\n showDelay: number;\n\n /**\n * Define the delay before the popover is hidden.\n * @default 0\n */\n hideDelay: number;\n\n /**\n * Define whether the popover should flip when there is not enough space for the popover.\n * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n * @default true\n */\n flip: NgpFlip;\n\n /**\n * Define the container element or selector in to which the popover should be attached.\n * @default 'body'\n */\n container: HTMLElement | string | null;\n\n /**\n * Define whether the popover should close when clicking outside of it, or a guard function.\n * @default true\n */\n closeOnOutsideClick: NgpDismissGuard<Element>;\n\n /**\n * Define whether the popover should close when the escape key is pressed, or a guard function.\n * @default true\n */\n closeOnEscape: NgpDismissGuard<KeyboardEvent>;\n\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default scroll\n */\n scrollBehavior: 'reposition' | 'block' | 'close';\n\n /**\n * Configure shift behavior to keep the popover in view.\n * Can be a boolean to enable/disable, or an object with padding and limiter options.\n * @default undefined (enabled by default in overlay)\n */\n shift: NgpShift;\n\n /**\n * Whether to track the trigger element position on every animation frame.\n * Useful for moving elements like slider thumbs.\n * @default false\n */\n trackPosition: boolean;\n\n /**\n * Cooldown duration in milliseconds.\n * When moving from one popover to another within this duration,\n * the showDelay is skipped for the new popover.\n * @default 0\n */\n cooldown: number;\n}\n\nexport const defaultPopoverConfig: NgpPopoverConfig = {\n offset: 4,\n placement: 'bottom',\n showDelay: 0,\n hideDelay: 0,\n flip: true,\n container: 'body',\n closeOnOutsideClick: true,\n closeOnEscape: true,\n scrollBehavior: 'reposition',\n shift: undefined,\n trackPosition: false,\n cooldown: 0,\n};\n\nexport const NgpPopoverConfigToken = new InjectionToken<NgpPopoverConfig>('NgpPopoverConfigToken');\n\n/**\n * Provide the default Popover configuration\n * @param config The Popover configuration\n * @returns The provider\n */\nexport function providePopoverConfig(config: Partial<NgpPopoverConfig>): Provider[] {\n return [\n {\n provide: NgpPopoverConfigToken,\n useValue: { ...defaultPopoverConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Popover configuration\n * @returns The global Popover configuration\n */\nexport function injectPopoverConfig(): NgpPopoverConfig {\n return inject(NgpPopoverConfigToken, { optional: true }) ?? defaultPopoverConfig;\n}\n","import { NgpOverlayArrowProps, NgpOverlayArrowState, ngpOverlayArrow } from 'ng-primitives/portal';\nimport { createPrimitive } from 'ng-primitives/state';\n\n// Re-export types with popover-specific aliases\nexport { NgpOverlayArrowProps as NgpPopoverArrowProps };\nexport { NgpOverlayArrowState as NgpPopoverArrowState };\n\nexport const [\n NgpPopoverArrowStateToken,\n ngpPopoverArrow,\n injectPopoverArrowState,\n providePopoverArrowState,\n] = createPrimitive(\n 'NgpPopoverArrow',\n ({ padding }: NgpOverlayArrowProps): NgpOverlayArrowState => {\n return ngpOverlayArrow({ padding });\n },\n);\n","import { NumberInput } from '@angular/cdk/coercion';\nimport { Directive, input, numberAttribute } from '@angular/core';\nimport { ngpPopoverArrow, providePopoverArrowState } from './popover-arrow-state';\n\n@Directive({\n selector: '[ngpPopoverArrow]',\n exportAs: 'ngpPopoverArrow',\n providers: [providePopoverArrowState()],\n})\nexport class NgpPopoverArrow {\n /**\n * Padding between the arrow and the edges of the popover.\n * This prevents the arrow from overflowing the rounded corners.\n */\n readonly padding = input<number | undefined, NumberInput>(undefined, {\n alias: 'ngpPopoverArrowPadding',\n transform: numberAttribute,\n });\n\n private readonly state = ngpPopoverArrow({ padding: this.padding });\n\n /**\n * Set the padding between the arrow and the edges of the popover.\n * @param value The padding value in pixels\n */\n setPadding(value: number | undefined): void {\n this.state.setPadding(value);\n }\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport {\n computed,\n ElementRef,\n inject,\n Injector,\n signal,\n Signal,\n ViewContainerRef,\n WritableSignal,\n} from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n createOverlay,\n NgpDismissGuard,\n NgpFlip,\n NgpOffset,\n NgpOverlay,\n NgpOverlayConfig,\n NgpOverlayContent,\n NgpShift,\n} from 'ng-primitives/portal';\nimport {\n attrBinding,\n controlled,\n createPrimitive,\n dataBinding,\n deprecatedSetter,\n listener,\n StateInjectionOptions,\n} from 'ng-primitives/state';\n\nexport interface NgpPopoverTriggerState<T> {\n /** Access the trigger element. */\n readonly elementRef: ElementRef;\n /** Access the popover template ref. */\n readonly popover: WritableSignal<NgpOverlayContent<T> | undefined>;\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled: Signal<boolean>;\n /**\n * Define the placement of the popover relative to the trigger.\n * @default 'top'\n */\n readonly placement: Signal<NgpPopoverPlacement>;\n /**\n * Define the offset of the popover relative to the trigger.\n * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n * @default 0\n */\n readonly offset: Signal<NgpOffset>;\n /**\n * Define the delay before the popover is displayed.\n * @default 0\n */\n readonly showDelay: Signal<number>;\n /**\n * Define the delay before the popover is hidden.\n * @default 0\n */\n readonly hideDelay: Signal<number>;\n /**\n * Define whether the popover should flip when there is not enough space for the popover.\n * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n * @default true\n */\n readonly flip: Signal<NgpFlip>;\n /**\n * Configure shift behavior to keep the popover in view.\n * Can be a boolean to enable/disable, or an object with padding and limiter options.\n * @default undefined (enabled by default in overlay)\n */\n readonly shift: Signal<NgpShift>;\n /**\n * Define the container in which the popover should be attached.\n * @default document.body\n */\n readonly container: WritableSignal<HTMLElement | string | null>;\n /**\n * Define whether the popover should close when clicking outside of it, or a guard function.\n * @default true\n */\n readonly closeOnOutsideClick: Signal<NgpDismissGuard<Element>>;\n /**\n * Define whether the popover should close when the escape key is pressed, or a guard function.\n * @default true\n */\n readonly closeOnEscape: Signal<NgpDismissGuard<KeyboardEvent>>;\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default 'reposition'\n */\n readonly scrollBehavior: Signal<'reposition' | 'block' | 'close'>;\n /**\n * Provide context to the popover. This can be used to pass data to the popover content.\n */\n readonly context: Signal<T | undefined>;\n /**\n * Define an anchor element for positioning the popover.\n * If provided, the popover will be positioned relative to this element instead of the trigger.\n */\n readonly anchor: Signal<HTMLElement | null>;\n /**\n * Define whether to track the trigger element position on every animation frame.\n * Useful for moving elements like slider thumbs.\n * @default false\n */\n readonly trackPosition: Signal<boolean>;\n /**\n * Define the cooldown duration in milliseconds.\n * When moving from one popover to another within this duration,\n * the showDelay is skipped for the new popover.\n * @default 0\n */\n readonly cooldown: Signal<number>;\n /**\n * The overlay that manages the popover\n * @internal\n */\n readonly overlay: Signal<NgpOverlay<T> | null>;\n /**\n * The open state of the popover.\n * @internal\n */\n readonly open: Signal<boolean>;\n /** @internal onDestroy callback */\n destroy: () => void;\n /**\n * Set the container in which the popover should be attached. Takes effect the\n * next time the popover is opened; it does not move a popover that is already\n * open.\n * @param container - The new container\n */\n setContainer: (container: HTMLElement | string | null) => void;\n /**\n * Show the popover.\n * @returns A promise that resolves when the popover has been shown\n */\n show: () => Promise<void>;\n /**\n * @internal\n * Hide the popover.\n * @returns A promise that resolves when the popover has been hidden\n */\n hide: (origin: FocusOrigin) => Promise<void>;\n}\n\nexport interface NgpPopoverTriggerProps<T> {\n /** Access the popover template ref. */\n readonly popover?: Signal<NgpOverlayContent<T> | undefined>;\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled?: Signal<boolean>;\n /**\n * Define the placement of the popover relative to the trigger.\n * @default 'top'\n */\n readonly placement?: Signal<NgpPopoverPlacement>;\n /**\n * Define the offset of the popover relative to the trigger.\n * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n * @default 0\n */\n readonly offset?: Signal<NgpOffset>;\n /**\n * Define the delay before the popover is displayed.\n * @default 0\n */\n readonly showDelay?: Signal<number>;\n /**\n * Define the delay before the popover is hidden.\n * @default 0\n */\n readonly hideDelay?: Signal<number>;\n /**\n * Define whether the popover should flip when there is not enough space for the popover.\n * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n * @default true\n */\n readonly flip?: Signal<NgpFlip>;\n /**\n * Configure shift behavior to keep the popover in view.\n * Can be a boolean to enable/disable, or an object with padding and limiter options.\n * @default undefined (enabled by default in overlay)\n */\n readonly shift?: Signal<NgpShift>;\n /**\n * Define the container in which the popover should be attached.\n * @default document.body\n */\n readonly container?: Signal<HTMLElement | string | null>;\n /**\n * Define whether the popover should close when clicking outside of it, or a guard function.\n * @default true\n */\n readonly closeOnOutsideClick?: Signal<NgpDismissGuard<Element>>;\n /**\n * Define whether the popover should close when the escape key is pressed, or a guard function.\n * @default true\n */\n readonly closeOnEscape?: Signal<NgpDismissGuard<KeyboardEvent>>;\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default 'reposition'\n */\n readonly scrollBehavior?: Signal<'reposition' | 'block' | 'close'>;\n /**\n * Provide context to the popover. This can be used to pass data to the popover content.\n */\n readonly context?: Signal<T | undefined>;\n /**\n * Define an anchor element for positioning the popover.\n * If provided, the popover will be positioned relative to this element instead of the trigger.\n */\n readonly anchor?: Signal<HTMLElement | null>;\n /**\n * Define whether to track the trigger element position on every animation frame.\n * Useful for moving elements like slider thumbs.\n * @default false\n */\n readonly trackPosition?: Signal<boolean>;\n /**\n * Define the cooldown duration in milliseconds.\n * When moving from one popover to another within this duration,\n * the showDelay is skipped for the new popover.\n * @default 0\n */\n readonly cooldown?: Signal<number>;\n /** Callback fired when the open state changes. */\n readonly onOpenChange?: (value: boolean) => void;\n}\n\nexport const [\n NgpPopoverTriggerStateToken,\n ngpPopoverTrigger,\n _injectPopoverTriggerState,\n providePopoverTriggerState,\n] = createPrimitive(\n 'NgpPopoverTrigger',\n <T>({\n popover: _popover = signal<NgpOverlayContent<T> | undefined>(undefined),\n disabled = signal<boolean>(false),\n placement = signal<NgpPopoverPlacement>('bottom'),\n offset = signal<NgpOffset>(4),\n showDelay = signal<number>(0),\n hideDelay = signal<number>(0),\n flip = signal<NgpFlip>(true),\n shift = signal<NgpShift>(undefined),\n container: _container,\n closeOnOutsideClick = signal<NgpDismissGuard<Element>>(true),\n closeOnEscape = signal<NgpDismissGuard<KeyboardEvent>>(true),\n scrollBehavior = signal<'reposition' | 'block' | 'close'>('reposition'),\n context = signal<T | undefined>(undefined),\n anchor = signal<HTMLElement | null>(null),\n trackPosition = signal<boolean>(false),\n cooldown = signal<number>(0),\n onOpenChange,\n }: NgpPopoverTriggerProps<T>): NgpPopoverTriggerState<T> => {\n const elementRef = injectElementRef<HTMLElement>();\n const viewContainerRef = inject(ViewContainerRef);\n const injector = inject(Injector);\n\n const popover = controlled(_popover);\n const container = controlled(_container, 'body');\n\n const overlay = signal<NgpOverlay<T> | null>(null);\n const open = computed(() => overlay()?.isOpen() ?? false);\n\n // Host binding\n attrBinding(elementRef, 'aria-expanded', () => (open() ? 'true' : 'false'));\n attrBinding(elementRef, 'aria-describedby', () => overlay()?.ariaDescribedBy());\n dataBinding(elementRef, 'data-open', open);\n dataBinding(elementRef, 'data-placement', placement);\n dataBinding(elementRef, 'data-disabled', disabled);\n\n // Event listener\n listener(elementRef, 'click', toggle);\n\n function destroy(): void {\n overlay()?.destroy();\n }\n\n function createOverlayInstance(): void {\n const popoverInstance = popover();\n\n if (!popoverInstance) {\n throw new Error('Popover must be either a TemplateRef or a ComponentType');\n }\n\n // Create config for the overlay\n const config: NgpOverlayConfig<T> = {\n content: popoverInstance,\n triggerElement: elementRef.nativeElement,\n anchorElement: anchor(),\n injector: injector,\n context: context,\n container: container(),\n placement: placement,\n offset: offset(),\n flip: flip(),\n shift: shift(),\n showDelay: showDelay(),\n hideDelay: hideDelay(),\n closeOnOutsideClick: closeOnOutsideClick(),\n closeOnEscape: closeOnEscape(),\n restoreFocus: true,\n scrollBehaviour: scrollBehavior(),\n viewContainerRef: viewContainerRef,\n trackPosition: trackPosition(),\n overlayType: 'popover',\n cooldown: cooldown(),\n onClose: () => onOpenChange?.(false),\n };\n\n overlay.set(createOverlay(config));\n }\n\n function toggle(event: MouseEvent): void {\n // if the trigger is disabled then do not toggle the popover\n if (disabled()) {\n return;\n }\n\n // determine the origin of the event, 0 is keyboard, 1 is mouse\n const origin: FocusOrigin = event.detail === 0 ? 'keyboard' : 'mouse';\n\n // if the popover is open then hide it\n if (open()) {\n hide(origin);\n } else {\n show();\n }\n }\n\n async function show(): Promise<void> {\n // If the trigger is disabled, don't show the popover\n if (disabled()) {\n return;\n }\n\n // Create the overlay if it doesn't exist yet\n if (!overlay()) {\n createOverlayInstance();\n }\n\n // Show the overlay\n await overlay()?.show();\n\n if (open()) {\n onOpenChange?.(true);\n }\n }\n\n async function hide(origin: FocusOrigin): Promise<void> {\n // If the trigger is disabled or the popover is not open, do nothing\n if (disabled() || !open()) {\n return;\n }\n\n // Hide the overlay\n await overlay()?.hide({ origin });\n }\n\n function setContainer(newContainer: HTMLElement | string | null): void {\n container.set(newContainer);\n }\n\n return {\n elementRef,\n popover,\n disabled,\n placement,\n offset,\n showDelay,\n hideDelay,\n flip,\n shift,\n container: deprecatedSetter(container, 'setContainer', setContainer),\n closeOnOutsideClick,\n closeOnEscape,\n scrollBehavior,\n context,\n anchor,\n trackPosition,\n cooldown,\n overlay,\n open,\n destroy,\n setContainer,\n show,\n hide,\n } satisfies NgpPopoverTriggerState<T>;\n },\n);\n\nexport function injectPopoverTriggerState<T>(\n options?: StateInjectionOptions,\n): Signal<NgpPopoverTriggerState<T>> {\n return _injectPopoverTriggerState(options) as Signal<NgpPopoverTriggerState<T>>;\n}\n\nexport type NgpPopoverPlacement =\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'top-start'\n | 'top-end'\n | 'right-start'\n | 'right-end'\n | 'bottom-start'\n | 'bottom-end'\n | 'left-start'\n | 'left-end';\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n Directive,\n input,\n numberAttribute,\n OnDestroy,\n output,\n} from '@angular/core';\nimport {\n coerceFlip,\n dismissGuardAttribute,\n NgpDismissGuard,\n NgpDismissGuardInput,\n NgpFlip,\n NgpFlipInput,\n NgpOverlayContent,\n coerceOffset,\n NgpOffset,\n NgpOffsetInput,\n coerceShift,\n NgpShift,\n NgpShiftInput,\n} from 'ng-primitives/portal';\nimport { injectPopoverConfig } from '../config/popover-config';\nimport {\n NgpPopoverPlacement,\n ngpPopoverTrigger,\n providePopoverTriggerState,\n} from './popover-trigger-state';\n\n/**\n * Apply the `ngpPopoverTrigger` directive to an element that triggers the popover to show.\n */\n@Directive({\n selector: '[ngpPopoverTrigger]',\n exportAs: 'ngpPopoverTrigger',\n providers: [providePopoverTriggerState({ inherit: false })],\n})\nexport class NgpPopoverTrigger<T = null> implements OnDestroy {\n /**\n * Access the global popover configuration.\n */\n private readonly config = injectPopoverConfig();\n\n /**\n * Access the popover template ref.\n */\n readonly popover = input<NgpOverlayContent<T>>(undefined, {\n alias: 'ngpPopoverTrigger',\n });\n\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpPopoverTriggerDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Define the placement of the popover relative to the trigger.\n * @default 'top'\n */\n readonly placement = input<NgpPopoverPlacement>(this.config.placement, {\n alias: 'ngpPopoverTriggerPlacement',\n });\n\n /**\n * Define the offset of the popover relative to the trigger.\n * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n * @default 0\n */\n readonly offset = input<NgpOffset, NgpOffsetInput>(this.config.offset, {\n alias: 'ngpPopoverTriggerOffset',\n transform: coerceOffset,\n });\n\n /**\n * Define the delay before the popover is displayed.\n * @default 0\n */\n readonly showDelay = input<number, NumberInput>(this.config.showDelay, {\n alias: 'ngpPopoverTriggerShowDelay',\n transform: numberAttribute,\n });\n\n /**\n * Define the delay before the popover is hidden.\n * @default 0\n */\n readonly hideDelay = input<number, NumberInput>(this.config.hideDelay, {\n alias: 'ngpPopoverTriggerHideDelay',\n transform: numberAttribute,\n });\n\n /**\n * Define whether the popover should flip when there is not enough space for the popover.\n * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n * @default true\n */\n readonly flip = input<NgpFlip, NgpFlipInput>(this.config.flip, {\n alias: 'ngpPopoverTriggerFlip',\n transform: coerceFlip,\n });\n\n /**\n * Configure shift behavior to keep the popover in view.\n * Can be a boolean to enable/disable, or an object with padding and limiter options.\n * @default undefined (enabled by default in overlay)\n */\n readonly shift = input<NgpShift, NgpShiftInput>(this.config.shift, {\n alias: 'ngpPopoverTriggerShift',\n transform: coerceShift,\n });\n\n /**\n * Define the container in which the popover should be attached.\n * @default document.body\n */\n readonly container = input<HTMLElement | string | null>(this.config.container, {\n alias: 'ngpPopoverTriggerContainer',\n });\n\n /**\n * Define whether the popover should close when clicking outside of it, or a guard function.\n * @default true\n */\n readonly closeOnOutsideClick = input<NgpDismissGuard<Element>, NgpDismissGuardInput<Element>>(\n this.config.closeOnOutsideClick,\n {\n alias: 'ngpPopoverTriggerCloseOnOutsideClick',\n transform: dismissGuardAttribute,\n },\n );\n\n /**\n * Define whether the popover should close when the escape key is pressed, or a guard function.\n * @default true\n */\n readonly closeOnEscape = input<\n NgpDismissGuard<KeyboardEvent>,\n NgpDismissGuardInput<KeyboardEvent>\n >(this.config.closeOnEscape, {\n alias: 'ngpPopoverTriggerCloseOnEscape',\n transform: dismissGuardAttribute,\n });\n\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default 'reposition'\n */\n readonly scrollBehavior = input<'reposition' | 'block' | 'close'>(this.config.scrollBehavior, {\n alias: 'ngpPopoverTriggerScrollBehavior',\n });\n\n /**\n * Provide context to the popover. This can be used to pass data to the popover content.\n */\n readonly context = input<T>(undefined, {\n alias: 'ngpPopoverTriggerContext',\n });\n\n /**\n * Define an anchor element for positioning the popover.\n * If provided, the popover will be positioned relative to this element instead of the trigger.\n */\n readonly anchor = input<HTMLElement | null>(null, {\n alias: 'ngpPopoverTriggerAnchor',\n });\n\n /**\n * Define whether to track the trigger element position on every animation frame.\n * Useful for moving elements like slider thumbs.\n * @default false\n */\n readonly trackPosition = input<boolean, BooleanInput>(this.config.trackPosition, {\n alias: 'ngpPopoverTriggerTrackPosition',\n transform: booleanAttribute,\n });\n\n /**\n * Define the cooldown duration in milliseconds.\n * When moving from one popover to another within this duration,\n * the showDelay is skipped for the new popover.\n * @default 0\n */\n readonly cooldown = input<number, NumberInput>(this.config.cooldown, {\n alias: 'ngpPopoverTriggerCooldown',\n transform: numberAttribute,\n });\n\n /**\n * Event emitted when the popover open state changes.\n */\n readonly openChange = output<boolean>({\n alias: 'ngpPopoverTriggerOpenChange',\n });\n\n /**\n * The popover trigger state.\n */\n protected readonly state = ngpPopoverTrigger({\n popover: this.popover,\n disabled: this.disabled,\n placement: this.placement,\n offset: this.offset,\n showDelay: this.showDelay,\n hideDelay: this.hideDelay,\n flip: this.flip,\n shift: this.shift,\n container: this.container,\n closeOnOutsideClick: this.closeOnOutsideClick,\n closeOnEscape: this.closeOnEscape,\n scrollBehavior: this.scrollBehavior,\n context: this.context,\n anchor: this.anchor,\n trackPosition: this.trackPosition,\n cooldown: this.cooldown,\n onOpenChange: (value: boolean) => this.openChange.emit(value),\n });\n\n ngOnDestroy(): void {\n this.state.destroy();\n }\n\n /**\n * Show the popover.\n * @returns A promise that resolves when the popover has been shown\n */\n show(): Promise<void> {\n return this.state.show();\n }\n\n /**\n * @internal\n * Hide the popover.\n * @returns A promise that resolves when the popover has been hidden\n */\n hide(origin: FocusOrigin = 'program'): Promise<void> {\n return this.state.hide(origin);\n }\n}\n","import { signal, Signal } from '@angular/core';\nimport { explicitEffect, injectElementRef } from 'ng-primitives/internal';\nimport { injectOverlay } from 'ng-primitives/portal';\nimport {\n attrBinding,\n controlled,\n createPrimitive,\n dataBinding,\n styleBinding,\n} from 'ng-primitives/state';\n\nexport interface NgpPopoverState {\n /** The unique id of the tooltip. */\n readonly id: Signal<string>;\n}\n\nexport interface NgpPopoverProps {\n /** The unique id of the tooltip. */\n readonly id?: Signal<string>;\n}\n\nexport const [NgpPopoverStateToken, ngpPopover, injectPopoverState, providePopoverState] =\n createPrimitive('NgpPopover', ({ id: _id = signal<string>('') }: NgpPopoverProps) => {\n const elementRef = injectElementRef<HTMLElement>();\n\n const overlay = injectOverlay();\n const id = controlled(_id);\n\n id.set(overlay.id());\n\n // Host binding\n attrBinding(elementRef, 'role', 'dialog');\n attrBinding(elementRef, 'id', id);\n styleBinding(elementRef, 'left.px', () => overlay.position().x ?? null);\n styleBinding(elementRef, 'top.px', () => overlay.position().y ?? null);\n styleBinding(elementRef, '--ngp-popover-trigger-width.px', () => overlay.triggerWidth());\n styleBinding(elementRef, '--ngp-popover-transform-origin', () => overlay.transformOrigin());\n styleBinding(elementRef, '--ngp-popover-available-width.px', () => overlay.availableWidth());\n styleBinding(elementRef, '--ngp-popover-available-height.px', () => overlay.availableHeight());\n dataBinding(elementRef, 'data-placement', () => overlay.finalPlacement() ?? null);\n dataBinding(elementRef, 'data-overlay', '');\n\n // Effect handle\n explicitEffect([id], ([id]) => overlay.id.set(id));\n\n return {\n id,\n } satisfies NgpPopoverState;\n });\n","import { Directive, input } from '@angular/core';\nimport { NgpFocusTrap } from 'ng-primitives/focus-trap';\nimport { provideControlContainerIsolation } from 'ng-primitives/portal';\nimport { ngpPopover, providePopoverState } from './popover-state';\n\n/**\n * Apply the `ngpPopover` directive to an element that represents the popover. This typically would be a `div` inside an `ng-template`.\n */\n@Directive({\n selector: '[ngpPopover]',\n exportAs: 'ngpPopover',\n hostDirectives: [NgpFocusTrap],\n providers: [providePopoverState(), provideControlContainerIsolation()],\n})\nexport class NgpPopover {\n /**\n * The unique id of the tooltip.\n */\n readonly id = input('');\n\n protected readonly state = ngpPopover({\n id: this.id,\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAoFO,MAAM,oBAAoB,GAAqB;AACpD,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,SAAS,EAAE,QAAQ;AACnB,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,SAAS,EAAE,MAAM;AACjB,IAAA,mBAAmB,EAAE,IAAI;AACzB,IAAA,aAAa,EAAE,IAAI;AACnB,IAAA,cAAc,EAAE,YAAY;AAC5B,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,aAAa,EAAE,KAAK;AACpB,IAAA,QAAQ,EAAE,CAAC;CACZ;AAEM,MAAM,qBAAqB,GAAG,IAAI,cAAc,CAAmB,uBAAuB,CAAC;AAElG;;;;AAIG;AACG,SAAU,oBAAoB,CAAC,MAAiC,EAAA;IACpE,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,qBAAqB;AAC9B,YAAA,QAAQ,EAAE,EAAE,GAAG,oBAAoB,EAAE,GAAG,MAAM,EAAE;AACjD,SAAA;KAC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AA,CAAC;AACH,IAAA;+GATY,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAV,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,UAAU,sLAFV,CAAC,mBAAmB,EAAE,EAAE,gCAAgC,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAE3D,UAAU,EAAA,UAAA,EAAA,CAAA;kBANtB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,QAAQ,EAAE,YAAY;oBACtB,cAAc,EAAE,CAAC,YAAY,CAAC;AAC9B,oBAAA,SAAS,EAAE,CAAC,mBAAmB,EAAE,EAAE,gCAAgC,EAAE,CAAC;AACvE,iBAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -61,10 +61,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
61
61
|
}]
|
|
62
62
|
}], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpNativeSelectDisabled", required: false }] }] } });
|
|
63
63
|
|
|
64
|
-
const [NgpSelectStateToken, ngpSelect, _injectSelectState, provideSelectState] = createPrimitive('NgpSelect', ({ id = signal(uniqueId('ngp-select')), value: _value = signal(undefined), multiple = signal(false), disabled: _disabled = signal(false), compareWith = signal(Object.is), placement = signal('bottom'), container
|
|
64
|
+
const [NgpSelectStateToken, ngpSelect, _injectSelectState, provideSelectState] = createPrimitive('NgpSelect', ({ id = signal(uniqueId('ngp-select')), value: _value = signal(undefined), multiple = signal(false), disabled: _disabled = signal(false), compareWith = signal(Object.is), placement = signal('bottom'), container: _container, flip = signal(true), offset = signal(0), scrollToOption = signal(undefined), allOptions = signal(undefined), onValueChange, onOpenChange, }) => {
|
|
65
65
|
const elementRef = injectElementRef();
|
|
66
66
|
const value = controlled(_value);
|
|
67
67
|
const disabled = controlled(_disabled, false);
|
|
68
|
+
const container = controlled(_container, 'body');
|
|
68
69
|
const valueChangeEmitter = emitter();
|
|
69
70
|
function setValue(newValue, options) {
|
|
70
71
|
value.set(newValue);
|
|
@@ -76,6 +77,9 @@ const [NgpSelectStateToken, ngpSelect, _injectSelectState, provideSelectState] =
|
|
|
76
77
|
function setDisabled(isDisabled) {
|
|
77
78
|
disabled.set(isDisabled);
|
|
78
79
|
}
|
|
80
|
+
function setContainer(newContainer) {
|
|
81
|
+
container.set(newContainer);
|
|
82
|
+
}
|
|
79
83
|
ngpInteractions({
|
|
80
84
|
focus: true,
|
|
81
85
|
focusWithin: true,
|
|
@@ -467,7 +471,7 @@ const [NgpSelectStateToken, ngpSelect, _injectSelectState, provideSelectState] =
|
|
|
467
471
|
disabled: deprecatedSetter(disabled, 'setDisabled', setDisabled),
|
|
468
472
|
compareWith,
|
|
469
473
|
placement,
|
|
470
|
-
container,
|
|
474
|
+
container: deprecatedSetter(container, 'setContainer', setContainer),
|
|
471
475
|
flip,
|
|
472
476
|
offset,
|
|
473
477
|
scrollToOption,
|
|
@@ -491,6 +495,7 @@ const [NgpSelectStateToken, ngpSelect, _injectSelectState, provideSelectState] =
|
|
|
491
495
|
activatePreviousOption,
|
|
492
496
|
setValue,
|
|
493
497
|
setDisabled,
|
|
498
|
+
setContainer,
|
|
494
499
|
valueChange: valueChangeEmitter.asObservable(),
|
|
495
500
|
registerPortal,
|
|
496
501
|
registerDropdown,
|