ng-primitives 0.124.0 → 0.125.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/date-time-date-fns/README.md +3 -0
- package/fesm2022/ng-primitives-avatar.mjs +4 -2
- package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/ng-primitives-checkbox.mjs +4 -2
- package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-date-picker.mjs +42 -44
- package/fesm2022/ng-primitives-date-picker.mjs.map +1 -1
- package/fesm2022/ng-primitives-date-time-date-fns.mjs +95 -0
- package/fesm2022/ng-primitives-date-time-date-fns.mjs.map +1 -0
- package/fesm2022/ng-primitives-date-time-luxon.mjs +21 -3
- package/fesm2022/ng-primitives-date-time-luxon.mjs.map +1 -1
- package/fesm2022/ng-primitives-date-time.mjs +18 -3
- package/fesm2022/ng-primitives-date-time.mjs.map +1 -1
- package/fesm2022/ng-primitives-dialog.mjs +11 -4
- package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/ng-primitives-form-field.mjs +3 -0
- package/fesm2022/ng-primitives-form-field.mjs.map +1 -1
- package/fesm2022/ng-primitives-input-otp.mjs +15 -7
- package/fesm2022/ng-primitives-input-otp.mjs.map +1 -1
- package/fesm2022/ng-primitives-listbox.mjs +5 -4
- package/fesm2022/ng-primitives-listbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-menu.mjs +8 -0
- package/fesm2022/ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-meter.mjs +20 -5
- package/fesm2022/ng-primitives-meter.mjs.map +1 -1
- package/fesm2022/ng-primitives-number-field.mjs +10 -0
- package/fesm2022/ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/ng-primitives-pagination.mjs +16 -6
- package/fesm2022/ng-primitives-pagination.mjs.map +1 -1
- package/fesm2022/ng-primitives-popover.mjs +4 -0
- package/fesm2022/ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/ng-primitives-progress.mjs +36 -11
- package/fesm2022/ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/ng-primitives-roving-focus.mjs +13 -2
- package/fesm2022/ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/ng-primitives-search.mjs +2 -1
- package/fesm2022/ng-primitives-search.mjs.map +1 -1
- package/fesm2022/ng-primitives-slider.mjs +38 -18
- package/fesm2022/ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/ng-primitives-switch.mjs +18 -8
- package/fesm2022/ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/ng-primitives-tabs.mjs +22 -6
- package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/ng-primitives-textarea.mjs +10 -8
- package/fesm2022/ng-primitives-textarea.mjs.map +1 -1
- package/fesm2022/ng-primitives-toast.mjs +3 -0
- package/fesm2022/ng-primitives-toast.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle-group.mjs +31 -8
- package/fesm2022/ng-primitives-toggle-group.mjs.map +1 -1
- package/package.json +8 -1
- package/schematics/ng-generate/templates/checkbox/checkbox.__fileSuffix@dasherize__.ts.template +2 -1
- package/schematics/ng-generate/templates/combobox/combobox.__fileSuffix@dasherize__.ts.template +3 -2
- package/schematics/ng-generate/templates/date-picker/date-picker.__fileSuffix@dasherize__.ts.template +2 -1
- package/schematics/ng-generate/templates/listbox/listbox.__fileSuffix@dasherize__.ts.template +9 -4
- package/schematics/ng-generate/templates/pagination/pagination.__fileSuffix@dasherize__.ts.template +7 -1
- package/schematics/ng-generate/templates/range-slider/range-slider.__fileSuffix@dasherize__.ts.template +4 -3
- package/schematics/ng-generate/templates/slider/slider.__fileSuffix@dasherize__.ts.template +2 -1
- package/schematics/ng-generate/templates/switch/switch.__fileSuffix@dasherize__.ts.template +2 -1
- package/types/ng-primitives-checkbox.d.ts +5 -1
- package/types/ng-primitives-date-picker.d.ts +7 -9
- package/types/ng-primitives-date-time-date-fns.d.ts +30 -0
- package/types/ng-primitives-date-time.d.ts +15 -3
- package/types/ng-primitives-dialog.d.ts +4 -0
- package/types/ng-primitives-input-otp.d.ts +5 -5
- package/types/ng-primitives-meter.d.ts +9 -2
- package/types/ng-primitives-pagination.d.ts +34 -8
- package/types/ng-primitives-progress.d.ts +4 -2
- package/types/ng-primitives-roving-focus.d.ts +7 -0
- package/types/ng-primitives-slider.d.ts +5 -4
- package/types/ng-primitives-switch.d.ts +14 -4
- package/types/ng-primitives-tabs.d.ts +6 -1
- package/types/ng-primitives-toggle-group.d.ts +51 -37
|
@@ -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 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,SA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AC,KAAK,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAElD,OAAO;QACL,EAAE;KACuB;AAC7B,CAAC;;AC3CH;;AAEG;MAOU,UAAU,CAAA;AANvB,IAAA,WAAA,GAAA;AAOE;;AAEG;AACM,QAAA,IAAA,CAAA,EAAE,GAAG,KAAK,CAAC,EAAE,yEAAC;QAEJ,IAAA,CAAA,KAAK,GAAG,UAAU,CAAC;YACpC,EAAE,EAAE,IAAI,CAAC,EAAE;AACZ,SAAA,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;;;;"}
|
|
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 // the popover is a focus-trapped, dialog-like overlay, so advertise the popup type\n attrBinding(elementRef, 'aria-haspopup', 'dialog');\n attrBinding(elementRef, 'aria-describedby', () => overlay()?.ariaDescribedBy());\n // reference the controlled popover by id while it is open (it does not exist when closed)\n attrBinding(elementRef, 'aria-controls', () => (open() ? (overlay()?.id() ?? null) : null));\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;KACF;AACH;AAEA;;;AAGG;SACa,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AA,WAAA,GAAA;AAOE;;AAEG;AACM,QAAA,IAAA,CAAA,EAAE,GAAG,KAAK,CAAC,EAAE,yEAAC;QAEJ,IAAA,CAAA,KAAK,GAAG,UAAU,CAAC;YACpC,EAAE,EAAE,IAAI,CAAC,EAAE;AACZ,SAAA,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;;;;"}
|
|
@@ -4,7 +4,7 @@ import { injectElementRef } from 'ng-primitives/internal';
|
|
|
4
4
|
import { createPrimitive, controlled, attrBinding, dataBinding, deprecatedSetter, styleBinding } from 'ng-primitives/state';
|
|
5
5
|
import { uniqueId } from 'ng-primitives/utils';
|
|
6
6
|
|
|
7
|
-
const [NgpProgressStateToken, ngpProgress, injectProgressState, provideProgressState] = createPrimitive('NgpProgress', ({ valueLabel: _valueLabel = signal((value, max) => `${Math.round((value / max) * 100)}%`), value: _value = signal(null), min: _min = signal(0), max: _max = signal(100), id = signal(uniqueId('ngp-progress')), }) => {
|
|
7
|
+
const [NgpProgressStateToken, ngpProgress, injectProgressState, provideProgressState] = createPrimitive('NgpProgress', ({ valueLabel: _valueLabel = signal((value, max, min) => `${max === min ? 0 : Math.round(((value - min) / (max - min)) * 100)}%`), value: _value = signal(null), min: _min = signal(0), max: _max = signal(100), id = signal(uniqueId('ngp-progress')), }) => {
|
|
8
8
|
const element = injectElementRef();
|
|
9
9
|
// Controlled properties
|
|
10
10
|
const value = controlled(_value);
|
|
@@ -19,20 +19,35 @@ const [NgpProgressStateToken, ngpProgress, injectProgressState, provideProgressS
|
|
|
19
19
|
/**
|
|
20
20
|
* Determine if the progress is in a progressing state.
|
|
21
21
|
*/
|
|
22
|
-
const progressing = computed(() =>
|
|
22
|
+
const progressing = computed(() => !indeterminate() && valueNow() > min() && valueNow() < max(), ...(ngDevMode ? [{ debugName: "progressing" }] : /* istanbul ignore next */ []));
|
|
23
23
|
/**
|
|
24
24
|
* Determine if the progress is complete.
|
|
25
25
|
*/
|
|
26
|
-
const complete = computed(() =>
|
|
26
|
+
const complete = computed(() => !indeterminate() && valueNow() >= max() && max() > min(), ...(ngDevMode ? [{ debugName: "complete" }] : /* istanbul ignore next */ []));
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* The raw value exposed via `aria-valuenow`, clamped to the [min, max] range.
|
|
29
|
+
* Per the ARIA progressbar pattern, `aria-valuenow` is the actual value on the
|
|
30
|
+
* same scale as `aria-valuemin`/`aria-valuemax`, not a 0-100 percentage. It is
|
|
31
|
+
* omitted entirely (null) while the progress is indeterminate.
|
|
29
32
|
*/
|
|
30
|
-
const
|
|
33
|
+
const valueNow = computed(() => {
|
|
31
34
|
const currentValue = value();
|
|
35
|
+
if (currentValue == null) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
return Math.min(Math.max(currentValue, min()), max());
|
|
39
|
+
}, ...(ngDevMode ? [{ debugName: "valueNow" }] : /* istanbul ignore next */ []));
|
|
40
|
+
/**
|
|
41
|
+
* Get the progress value text. Empty while indeterminate; the
|
|
42
|
+
* aria-valuetext binding omits the attribute in that case.
|
|
43
|
+
*/
|
|
44
|
+
const valueText = computed(() => {
|
|
45
|
+
const currentValue = valueNow();
|
|
32
46
|
if (currentValue == null) {
|
|
33
47
|
return '';
|
|
34
48
|
}
|
|
35
|
-
|
|
49
|
+
// use the clamped value so aria-valuetext stays consistent with aria-valuenow
|
|
50
|
+
return valueLabel()(currentValue, max(), min());
|
|
36
51
|
}, ...(ngDevMode ? [{ debugName: "valueText" }] : /* istanbul ignore next */ []));
|
|
37
52
|
const labelId = signal(undefined, ...(ngDevMode ? [{ debugName: "labelId" }] : /* istanbul ignore next */ []));
|
|
38
53
|
function setLabel(id) {
|
|
@@ -42,9 +57,10 @@ const [NgpProgressStateToken, ngpProgress, injectProgressState, provideProgressS
|
|
|
42
57
|
attrBinding(element, 'role', 'progressbar');
|
|
43
58
|
attrBinding(element, 'id', id);
|
|
44
59
|
attrBinding(element, 'aria-valuemax', max);
|
|
45
|
-
attrBinding(element, 'aria-valuemin',
|
|
46
|
-
attrBinding(element, 'aria-valuenow',
|
|
47
|
-
|
|
60
|
+
attrBinding(element, 'aria-valuemin', min);
|
|
61
|
+
attrBinding(element, 'aria-valuenow', valueNow);
|
|
62
|
+
// omit the attribute entirely while indeterminate rather than binding an empty string
|
|
63
|
+
attrBinding(element, 'aria-valuetext', () => (indeterminate() ? null : valueText()));
|
|
48
64
|
attrBinding(element, 'aria-labelledby', () => (labelId() ? labelId() : null));
|
|
49
65
|
dataBinding(element, 'data-progressing', () => progressing());
|
|
50
66
|
dataBinding(element, 'data-indeterminate', () => indeterminate());
|
|
@@ -82,7 +98,15 @@ const [NgpProgressIndicatorStateToken, ngpProgressIndicator] = createPrimitive('
|
|
|
82
98
|
const min = state().min();
|
|
83
99
|
const max = state().max();
|
|
84
100
|
const value = state().value();
|
|
85
|
-
|
|
101
|
+
if (value === null) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
// guard the zero-length range so we never divide by zero (NaN width)
|
|
105
|
+
if (max <= min) {
|
|
106
|
+
return value >= max ? 100 : 0;
|
|
107
|
+
}
|
|
108
|
+
// clamp so an out-of-range value can't push the bar past its track or negative
|
|
109
|
+
return Math.min(100, Math.max(0, ((value - min) / (max - min)) * 100));
|
|
86
110
|
}, ...(ngDevMode ? [{ debugName: "percentage" }] : /* istanbul ignore next */ []));
|
|
87
111
|
styleBinding(element, 'width.%', percentage);
|
|
88
112
|
return {};
|
|
@@ -213,9 +237,10 @@ class NgpProgress {
|
|
|
213
237
|
* Define a function that returns the progress value label.
|
|
214
238
|
* @param value The current value
|
|
215
239
|
* @param max The maximum value
|
|
240
|
+
* @param min The minimum value
|
|
216
241
|
* @returns The value label
|
|
217
242
|
*/
|
|
218
|
-
this.valueLabel = input((value, max) => `${Math.round((value / max) * 100)}%`, { ...(ngDevMode ? { debugName: "valueLabel" } : /* istanbul ignore next */ {}), alias: 'ngpProgressValueLabel' });
|
|
243
|
+
this.valueLabel = input((value, max, min) => `${max === min ? 0 : Math.round(((value - min) / (max - min)) * 100)}%`, { ...(ngDevMode ? { debugName: "valueLabel" } : /* istanbul ignore next */ {}), alias: 'ngpProgressValueLabel' });
|
|
219
244
|
/**
|
|
220
245
|
* The unique identifier for the progress.
|
|
221
246
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-progress.mjs","sources":["../../../../packages/ng-primitives/progress/src/progress/progress-state.ts","../../../../packages/ng-primitives/progress/src/progress-indicator/progress-indicator-state.ts","../../../../packages/ng-primitives/progress/src/progress-indicator/progress-indicator.ts","../../../../packages/ng-primitives/progress/src/progress-label/progress-label-state.ts","../../../../packages/ng-primitives/progress/src/progress-label/progress-label.ts","../../../../packages/ng-primitives/progress/src/progress-track/progress-track-state.ts","../../../../packages/ng-primitives/progress/src/progress-track/progress-track.ts","../../../../packages/ng-primitives/progress/src/progress-value/progress-value-state.ts","../../../../packages/ng-primitives/progress/src/progress-value/progress-value.ts","../../../../packages/ng-primitives/progress/src/progress/progress.ts","../../../../packages/ng-primitives/progress/src/ng-primitives-progress.ts"],"sourcesContent":["import { computed, signal, Signal, WritableSignal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n attrBinding,\n controlled,\n createPrimitive,\n dataBinding,\n deprecatedSetter,\n} from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { NgpProgressValueTextFn } from './progress';\n\nexport interface NgpProgressProps {\n /**\n * The unique identifier for the progress.\n */\n readonly id?: Signal<string>;\n\n /**\n * Define the progress value.\n */\n readonly value?: Signal<number | null>;\n\n /**\n * Define the progress min value.\n * @default '0'\n */\n readonly min?: Signal<number>;\n\n /**\n * Define the progress max value.\n * @default 100\n */\n readonly max?: Signal<number>;\n\n /**\n * Define a function that returns the progress value label.\n * @param value The current value\n * @param max The maximum value\n * @returns The value label\n */\n readonly valueLabel?: Signal<NgpProgressValueTextFn>;\n}\n\nexport interface NgpProgressState {\n /**\n * The unique identifier for the progress.\n */\n readonly id: Signal<string>;\n\n /**\n * Define the progress value.\n */\n readonly value: WritableSignal<number | null>;\n\n /**\n * Define the progress min value.\n * @default '0'\n */\n readonly min: WritableSignal<number>;\n\n /**\n * Define the progress max value.\n * @default 100\n */\n readonly max: WritableSignal<number>;\n\n /**\n * Get the progress value text.\n */\n readonly valueText: Signal<string>;\n\n /**\n * The id of label associated with the progress bar.\n * @internal\n */\n readonly labelId: Signal<string | undefined>;\n\n /**\n * Determine if the progress is indeterminate.\n * @internal\n */\n readonly indeterminate: Signal<boolean>;\n\n /**\n * Determine if the progress is in a progressing state.\n * @internal\n */\n readonly progressing: Signal<boolean>;\n\n /**\n * Determine if the progress is complete.\n * @internal\n */\n readonly complete: Signal<boolean>;\n\n /**\n * Set the label of the progress bar.\n */\n setLabel(id: string): void;\n\n /**\n * Set the value of the progress bar.\n * @param value The progress value\n */\n setValue(value: number | null): void;\n\n /**\n * Set the minimum value of the progress bar.\n * @param min The minimum value\n */\n setMin(min: number): void;\n\n /**\n * Set the maximum value of the progress bar.\n * @param max The maximum value\n */\n setMax(max: number): void;\n}\n\nexport const [NgpProgressStateToken, ngpProgress, injectProgressState, provideProgressState] =\n createPrimitive(\n 'NgpProgress',\n ({\n valueLabel: _valueLabel = signal((value, max) => `${Math.round((value / max) * 100)}%`),\n value: _value = signal(null),\n min: _min = signal(0),\n max: _max = signal(100),\n id = signal(uniqueId('ngp-progress')),\n }: NgpProgressProps) => {\n const element = injectElementRef();\n\n // Controlled properties\n const value = controlled(_value);\n const min = controlled(_min);\n const max = controlled(_max);\n const valueLabel = controlled(_valueLabel);\n\n /**\n * Determine if the progress is indeterminate.\n * @internal\n */\n const indeterminate = computed(() => value() === null);\n\n /**\n * Determine if the progress is in a progressing state.\n */\n const progressing = computed(() => value() != null && value()! > 0 && value()! < max());\n\n /**\n * Determine if the progress is complete.\n */\n const complete = computed(() => !!(value() && max() && value() === max()));\n\n /**\n * Get the progress value text.\n */\n const valueText = computed(() => {\n const currentValue = value();\n\n if (currentValue == null) {\n return '';\n }\n\n return valueLabel()(currentValue, max());\n });\n\n const labelId = signal<string | undefined>(undefined);\n\n function setLabel(id: string) {\n labelId.set(id);\n }\n\n // Attribute bindings\n attrBinding(element, 'role', 'progressbar');\n attrBinding(element, 'id', id);\n attrBinding(element, 'aria-valuemax', max);\n attrBinding(element, 'aria-valuemin', 0);\n attrBinding(element, 'aria-valuenow', value);\n attrBinding(element, 'aria-valuetext', valueText);\n attrBinding(element, 'aria-labelledby', () => (labelId() ? labelId() : null));\n dataBinding(element, 'data-progressing', () => progressing());\n dataBinding(element, 'data-indeterminate', () => indeterminate());\n dataBinding(element, 'data-complete', () => complete());\n\n function setMax(newMax: number): void {\n max.set(newMax);\n }\n\n function setMin(newMin: number): void {\n min.set(newMin);\n }\n\n function setValue(newValue: number | null): void {\n value.set(newValue);\n }\n\n return {\n max: deprecatedSetter(max, 'setMax'),\n min: deprecatedSetter(min, 'setMin'),\n value: deprecatedSetter(value, 'setValue'),\n labelId: deprecatedSetter(labelId, 'setLabel'),\n valueText,\n id,\n indeterminate,\n progressing,\n complete,\n setLabel,\n setValue,\n setMin,\n setMax,\n } satisfies NgpProgressState;\n },\n );\n","import { computed } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { createPrimitive, styleBinding } from 'ng-primitives/state';\nimport { injectProgressState } from '../progress/progress-state';\n\nexport interface NgpProgressIndicatorState {}\n\nexport interface NgpProgressIndicatorProps {}\n\nexport const [NgpProgressIndicatorStateToken, ngpProgressIndicator] = createPrimitive(\n 'NgpProgressIndicator',\n ({}: NgpProgressIndicatorProps) => {\n const element = injectElementRef();\n\n const state = injectProgressState();\n\n const percentage = computed(() => {\n const min = state().min();\n const max = state().max();\n const value = state().value();\n return value === null ? null : ((value - min) / (max - min)) * 100;\n });\n\n styleBinding(element, 'width.%', percentage);\n\n return {} satisfies NgpProgressIndicatorState;\n },\n);\n","import { Directive } from '@angular/core';\nimport { ngpProgressIndicator } from './progress-indicator-state';\n\n/**\n * Apply the `ngpProgressIndicator` directive to an element that represents the current progress.\n * The width of this element can be set to the percentage of the progress value.\n */\n@Directive({\n selector: '[ngpProgressIndicator]',\n})\nexport class NgpProgressIndicator {\n constructor() {\n ngpProgressIndicator({});\n }\n}\n","import { signal, Signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, createPrimitive, dataBinding } from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectProgressState } from '../progress/progress-state';\n\nexport interface NgpProgressLabelState {}\n\nexport interface NgpProgressLabelProps {\n /**\n * The unique identifier for the progress label.\n */\n readonly id?: Signal<string>;\n}\n\nexport const [NgpProgressLabelStateToken, ngpProgressLabel] = createPrimitive(\n 'NgpProgressLabel',\n ({ id = signal(uniqueId('ngp-progress-label')) }: NgpProgressLabelProps) => {\n const element = injectElementRef();\n\n const state = injectProgressState();\n\n attrBinding(element, 'id', id);\n attrBinding(element, 'for', element.nativeElement.tagName === 'LABEL' ? state().id?.() : null);\n dataBinding(element, 'data-progressing', () => state().progressing());\n dataBinding(element, 'data-indeterminate', () => state().indeterminate());\n dataBinding(element, 'data-complete', () => state().complete());\n\n state().labelId.set(id());\n\n return {} satisfies NgpProgressLabelState;\n },\n);\n","import { Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpProgressLabel } from './progress-label-state';\n\n@Directive({\n selector: '[ngpProgressLabel]',\n exportAs: 'ngpProgressLabel',\n})\nexport class NgpProgressLabel {\n /**\n * The unique identifier for the progress label.\n */\n readonly id = input<string>(uniqueId('ngp-progress-label'));\n\n constructor() {\n ngpProgressLabel({ id: this.id });\n }\n}\n","import { injectElementRef } from 'ng-primitives/internal';\nimport { createPrimitive, dataBinding } from 'ng-primitives/state';\nimport { injectProgressState } from '../progress/progress-state';\n\nexport interface NgpProgressTrackState {}\n\nexport interface NgpProgressTrackProps {}\n\nexport const [NgpProgressTrackStateToken, ngpProgressTrack] = createPrimitive(\n 'NgpProgressTrack',\n ({}: NgpProgressTrackProps) => {\n const element = injectElementRef();\n const state = injectProgressState();\n\n dataBinding(element, 'data-progressing', () => state().progressing());\n dataBinding(element, 'data-indeterminate', () => state().indeterminate());\n dataBinding(element, 'data-complete', () => state().complete());\n\n return {} satisfies NgpProgressTrackState;\n },\n);\n","import { Directive } from '@angular/core';\nimport { ngpProgressTrack } from './progress-track-state';\n\n@Directive({\n selector: '[ngpProgressTrack]',\n exportAs: 'ngpProgressTrack',\n})\nexport class NgpProgressTrack {\n constructor() {\n ngpProgressTrack({});\n }\n}\n","import { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, createPrimitive, dataBinding } from 'ng-primitives/state';\nimport { injectProgressState } from '../progress/progress-state';\n\nexport interface NgpProgressValueState {}\n\nexport interface NgpProgressValueProps {}\n\nexport const [NgpProgressValueStateToken, ngpProgressValue] = createPrimitive(\n 'NgpProgressValue',\n ({}: NgpProgressValueProps) => {\n const element = injectElementRef();\n\n const state = injectProgressState();\n // Host bindings using helper functions\n attrBinding(element, 'aria-hidden', 'true');\n dataBinding(element, 'data-progressing', () => state().progressing());\n dataBinding(element, 'data-indeterminate', () => state().indeterminate());\n dataBinding(element, 'data-complete', () => state().complete());\n\n return {} satisfies NgpProgressValueState;\n },\n);\n","import { Directive } from '@angular/core';\nimport { ngpProgressValue } from './progress-value-state';\n\n@Directive({\n selector: '[ngpProgressValue]',\n exportAs: 'ngpProgressValue',\n})\nexport class NgpProgressValue {\n constructor() {\n ngpProgressValue({});\n }\n}\n","import { NumberInput } from '@angular/cdk/coercion';\nimport { Directive, input, numberAttribute } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpProgress, provideProgressState } from './progress-state';\n\n/**\n * Apply the `ngpProgress` directive to an element that represents the progress bar.\n */\n@Directive({\n selector: '[ngpProgress]',\n providers: [provideProgressState()],\n})\nexport class NgpProgress {\n /**\n * Define the progress value.\n */\n readonly value = input<number | null, NumberInput>(0, {\n alias: 'ngpProgressValue',\n transform: v => (v == null ? null : numberAttribute(v)),\n });\n\n /**\n * Define the progress min value.\n * @default '0'\n */\n readonly min = input<number, NumberInput>(0, {\n alias: 'ngpProgressMin',\n transform: numberAttribute,\n });\n\n /**\n * Define the progress max value.\n * @default 100\n */\n readonly max = input<number, NumberInput>(100, {\n alias: 'ngpProgressMax',\n transform: numberAttribute,\n });\n\n /**\n * Define a function that returns the progress value label.\n * @param value The current value\n * @param max The maximum value\n * @returns The value label\n */\n readonly valueLabel = input<NgpProgressValueTextFn>(\n (value, max) => `${Math.round((value / max) * 100)}%`,\n {\n alias: 'ngpProgressValueLabel',\n },\n );\n\n /**\n * The unique identifier for the progress.\n */\n readonly id = input<string>(uniqueId('ngp-progress'));\n\n /**\n * The state of the progress bar.\n * @internal\n */\n private readonly state = ngpProgress({\n value: this.value,\n min: this.min,\n max: this.max,\n valueLabel: this.valueLabel,\n id: this.id,\n });\n\n /**\n * Get the progress value text.\n */\n protected readonly valueText = this.state.valueText;\n}\n\nexport type NgpProgressValueTextFn = (value: number, max: number) => string;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAwHO,MAAM,CAAC,qBAAqB,EAAE,WAAW,EAAE,mBAAmB,EAAE,oBAAoB,CAAC,GAC1F,eAAe,CACb,aAAa,EACb,CAAC,EACC,UAAU,EAAE,WAAW,GAAG,MAAM,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK,CAAA,EAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,EACvF,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,EAC5B,GAAG,EAAE,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,EACrB,GAAG,EAAE,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,EACvB,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,GACpB,KAAI;AACrB,IAAA,MAAM,OAAO,GAAG,gBAAgB,EAAE;;AAGlC,IAAA,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC;AAChC,IAAA,MAAM,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC;AAC5B,IAAA,MAAM,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC;AAC5B,IAAA,MAAM,UAAU,GAAG,UAAU,CAAC,WAAW,CAAC;AAE1C;;;AAGG;AACH,IAAA,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,KAAK,EAAE,KAAK,IAAI,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,eAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAC;AAEtD;;AAEG;IACH,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,KAAK,EAAE,IAAI,IAA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|
|
1
|
+
{"version":3,"file":"ng-primitives-progress.mjs","sources":["../../../../packages/ng-primitives/progress/src/progress/progress-state.ts","../../../../packages/ng-primitives/progress/src/progress-indicator/progress-indicator-state.ts","../../../../packages/ng-primitives/progress/src/progress-indicator/progress-indicator.ts","../../../../packages/ng-primitives/progress/src/progress-label/progress-label-state.ts","../../../../packages/ng-primitives/progress/src/progress-label/progress-label.ts","../../../../packages/ng-primitives/progress/src/progress-track/progress-track-state.ts","../../../../packages/ng-primitives/progress/src/progress-track/progress-track.ts","../../../../packages/ng-primitives/progress/src/progress-value/progress-value-state.ts","../../../../packages/ng-primitives/progress/src/progress-value/progress-value.ts","../../../../packages/ng-primitives/progress/src/progress/progress.ts","../../../../packages/ng-primitives/progress/src/ng-primitives-progress.ts"],"sourcesContent":["import { computed, signal, Signal, WritableSignal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n attrBinding,\n controlled,\n createPrimitive,\n dataBinding,\n deprecatedSetter,\n} from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { NgpProgressValueTextFn } from './progress';\n\nexport interface NgpProgressProps {\n /**\n * The unique identifier for the progress.\n */\n readonly id?: Signal<string>;\n\n /**\n * Define the progress value.\n */\n readonly value?: Signal<number | null>;\n\n /**\n * Define the progress min value.\n * @default '0'\n */\n readonly min?: Signal<number>;\n\n /**\n * Define the progress max value.\n * @default 100\n */\n readonly max?: Signal<number>;\n\n /**\n * Define a function that returns the progress value label.\n * @param value The current value\n * @param max The maximum value\n * @returns The value label\n */\n readonly valueLabel?: Signal<NgpProgressValueTextFn>;\n}\n\nexport interface NgpProgressState {\n /**\n * The unique identifier for the progress.\n */\n readonly id: Signal<string>;\n\n /**\n * Define the progress value.\n */\n readonly value: WritableSignal<number | null>;\n\n /**\n * Define the progress min value.\n * @default '0'\n */\n readonly min: WritableSignal<number>;\n\n /**\n * Define the progress max value.\n * @default 100\n */\n readonly max: WritableSignal<number>;\n\n /**\n * Get the progress value text. An empty string while the progress is\n * indeterminate (the `aria-valuetext` attribute is omitted in that case).\n */\n readonly valueText: Signal<string>;\n\n /**\n * The id of label associated with the progress bar.\n * @internal\n */\n readonly labelId: Signal<string | undefined>;\n\n /**\n * Determine if the progress is indeterminate.\n * @internal\n */\n readonly indeterminate: Signal<boolean>;\n\n /**\n * Determine if the progress is in a progressing state.\n * @internal\n */\n readonly progressing: Signal<boolean>;\n\n /**\n * Determine if the progress is complete.\n * @internal\n */\n readonly complete: Signal<boolean>;\n\n /**\n * Set the label of the progress bar.\n */\n setLabel(id: string): void;\n\n /**\n * Set the value of the progress bar.\n * @param value The progress value\n */\n setValue(value: number | null): void;\n\n /**\n * Set the minimum value of the progress bar.\n * @param min The minimum value\n */\n setMin(min: number): void;\n\n /**\n * Set the maximum value of the progress bar.\n * @param max The maximum value\n */\n setMax(max: number): void;\n}\n\nexport const [NgpProgressStateToken, ngpProgress, injectProgressState, provideProgressState] =\n createPrimitive(\n 'NgpProgress',\n ({\n valueLabel: _valueLabel = signal(\n (value, max, min) =>\n `${max === min ? 0 : Math.round(((value - min) / (max - min)) * 100)}%`,\n ),\n value: _value = signal(null),\n min: _min = signal(0),\n max: _max = signal(100),\n id = signal(uniqueId('ngp-progress')),\n }: NgpProgressProps) => {\n const element = injectElementRef();\n\n // Controlled properties\n const value = controlled(_value);\n const min = controlled(_min);\n const max = controlled(_max);\n const valueLabel = controlled(_valueLabel);\n\n /**\n * Determine if the progress is indeterminate.\n * @internal\n */\n const indeterminate = computed(() => value() === null);\n\n /**\n * Determine if the progress is in a progressing state.\n */\n const progressing = computed(\n () => !indeterminate() && valueNow()! > min() && valueNow()! < max(),\n );\n\n /**\n * Determine if the progress is complete.\n */\n const complete = computed(() => !indeterminate() && valueNow()! >= max() && max() > min());\n\n /**\n * The raw value exposed via `aria-valuenow`, clamped to the [min, max] range.\n * Per the ARIA progressbar pattern, `aria-valuenow` is the actual value on the\n * same scale as `aria-valuemin`/`aria-valuemax`, not a 0-100 percentage. It is\n * omitted entirely (null) while the progress is indeterminate.\n */\n const valueNow = computed(() => {\n const currentValue = value();\n\n if (currentValue == null) {\n return null;\n }\n\n return Math.min(Math.max(currentValue, min()), max());\n });\n\n /**\n * Get the progress value text. Empty while indeterminate; the\n * aria-valuetext binding omits the attribute in that case.\n */\n const valueText = computed(() => {\n const currentValue = valueNow();\n\n if (currentValue == null) {\n return '';\n }\n\n // use the clamped value so aria-valuetext stays consistent with aria-valuenow\n return valueLabel()(currentValue, max(), min());\n });\n\n const labelId = signal<string | undefined>(undefined);\n\n function setLabel(id: string) {\n labelId.set(id);\n }\n\n // Attribute bindings\n attrBinding(element, 'role', 'progressbar');\n attrBinding(element, 'id', id);\n attrBinding(element, 'aria-valuemax', max);\n attrBinding(element, 'aria-valuemin', min);\n attrBinding(element, 'aria-valuenow', valueNow);\n // omit the attribute entirely while indeterminate rather than binding an empty string\n attrBinding(element, 'aria-valuetext', () => (indeterminate() ? null : valueText()));\n attrBinding(element, 'aria-labelledby', () => (labelId() ? labelId() : null));\n dataBinding(element, 'data-progressing', () => progressing());\n dataBinding(element, 'data-indeterminate', () => indeterminate());\n dataBinding(element, 'data-complete', () => complete());\n\n function setMax(newMax: number): void {\n max.set(newMax);\n }\n\n function setMin(newMin: number): void {\n min.set(newMin);\n }\n\n function setValue(newValue: number | null): void {\n value.set(newValue);\n }\n\n return {\n max: deprecatedSetter(max, 'setMax'),\n min: deprecatedSetter(min, 'setMin'),\n value: deprecatedSetter(value, 'setValue'),\n labelId: deprecatedSetter(labelId, 'setLabel'),\n valueText,\n id,\n indeterminate,\n progressing,\n complete,\n setLabel,\n setValue,\n setMin,\n setMax,\n } satisfies NgpProgressState;\n },\n );\n","import { computed } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { createPrimitive, styleBinding } from 'ng-primitives/state';\nimport { injectProgressState } from '../progress/progress-state';\n\nexport interface NgpProgressIndicatorState {}\n\nexport interface NgpProgressIndicatorProps {}\n\nexport const [NgpProgressIndicatorStateToken, ngpProgressIndicator] = createPrimitive(\n 'NgpProgressIndicator',\n ({}: NgpProgressIndicatorProps) => {\n const element = injectElementRef();\n\n const state = injectProgressState();\n\n const percentage = computed(() => {\n const min = state().min();\n const max = state().max();\n const value = state().value();\n if (value === null) {\n return null;\n }\n // guard the zero-length range so we never divide by zero (NaN width)\n if (max <= min) {\n return value >= max ? 100 : 0;\n }\n // clamp so an out-of-range value can't push the bar past its track or negative\n return Math.min(100, Math.max(0, ((value - min) / (max - min)) * 100));\n });\n\n styleBinding(element, 'width.%', percentage);\n\n return {} satisfies NgpProgressIndicatorState;\n },\n);\n","import { Directive } from '@angular/core';\nimport { ngpProgressIndicator } from './progress-indicator-state';\n\n/**\n * Apply the `ngpProgressIndicator` directive to an element that represents the current progress.\n * The width of this element can be set to the percentage of the progress value.\n */\n@Directive({\n selector: '[ngpProgressIndicator]',\n})\nexport class NgpProgressIndicator {\n constructor() {\n ngpProgressIndicator({});\n }\n}\n","import { signal, Signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, createPrimitive, dataBinding } from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectProgressState } from '../progress/progress-state';\n\nexport interface NgpProgressLabelState {}\n\nexport interface NgpProgressLabelProps {\n /**\n * The unique identifier for the progress label.\n */\n readonly id?: Signal<string>;\n}\n\nexport const [NgpProgressLabelStateToken, ngpProgressLabel] = createPrimitive(\n 'NgpProgressLabel',\n ({ id = signal(uniqueId('ngp-progress-label')) }: NgpProgressLabelProps) => {\n const element = injectElementRef();\n\n const state = injectProgressState();\n\n attrBinding(element, 'id', id);\n attrBinding(element, 'for', element.nativeElement.tagName === 'LABEL' ? state().id?.() : null);\n dataBinding(element, 'data-progressing', () => state().progressing());\n dataBinding(element, 'data-indeterminate', () => state().indeterminate());\n dataBinding(element, 'data-complete', () => state().complete());\n\n state().labelId.set(id());\n\n return {} satisfies NgpProgressLabelState;\n },\n);\n","import { Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpProgressLabel } from './progress-label-state';\n\n@Directive({\n selector: '[ngpProgressLabel]',\n exportAs: 'ngpProgressLabel',\n})\nexport class NgpProgressLabel {\n /**\n * The unique identifier for the progress label.\n */\n readonly id = input<string>(uniqueId('ngp-progress-label'));\n\n constructor() {\n ngpProgressLabel({ id: this.id });\n }\n}\n","import { injectElementRef } from 'ng-primitives/internal';\nimport { createPrimitive, dataBinding } from 'ng-primitives/state';\nimport { injectProgressState } from '../progress/progress-state';\n\nexport interface NgpProgressTrackState {}\n\nexport interface NgpProgressTrackProps {}\n\nexport const [NgpProgressTrackStateToken, ngpProgressTrack] = createPrimitive(\n 'NgpProgressTrack',\n ({}: NgpProgressTrackProps) => {\n const element = injectElementRef();\n const state = injectProgressState();\n\n dataBinding(element, 'data-progressing', () => state().progressing());\n dataBinding(element, 'data-indeterminate', () => state().indeterminate());\n dataBinding(element, 'data-complete', () => state().complete());\n\n return {} satisfies NgpProgressTrackState;\n },\n);\n","import { Directive } from '@angular/core';\nimport { ngpProgressTrack } from './progress-track-state';\n\n@Directive({\n selector: '[ngpProgressTrack]',\n exportAs: 'ngpProgressTrack',\n})\nexport class NgpProgressTrack {\n constructor() {\n ngpProgressTrack({});\n }\n}\n","import { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, createPrimitive, dataBinding } from 'ng-primitives/state';\nimport { injectProgressState } from '../progress/progress-state';\n\nexport interface NgpProgressValueState {}\n\nexport interface NgpProgressValueProps {}\n\nexport const [NgpProgressValueStateToken, ngpProgressValue] = createPrimitive(\n 'NgpProgressValue',\n ({}: NgpProgressValueProps) => {\n const element = injectElementRef();\n\n const state = injectProgressState();\n // Host bindings using helper functions\n attrBinding(element, 'aria-hidden', 'true');\n dataBinding(element, 'data-progressing', () => state().progressing());\n dataBinding(element, 'data-indeterminate', () => state().indeterminate());\n dataBinding(element, 'data-complete', () => state().complete());\n\n return {} satisfies NgpProgressValueState;\n },\n);\n","import { Directive } from '@angular/core';\nimport { ngpProgressValue } from './progress-value-state';\n\n@Directive({\n selector: '[ngpProgressValue]',\n exportAs: 'ngpProgressValue',\n})\nexport class NgpProgressValue {\n constructor() {\n ngpProgressValue({});\n }\n}\n","import { NumberInput } from '@angular/cdk/coercion';\nimport { Directive, input, numberAttribute } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpProgress, provideProgressState } from './progress-state';\n\n/**\n * Apply the `ngpProgress` directive to an element that represents the progress bar.\n */\n@Directive({\n selector: '[ngpProgress]',\n providers: [provideProgressState()],\n})\nexport class NgpProgress {\n /**\n * Define the progress value.\n */\n readonly value = input<number | null, NumberInput>(0, {\n alias: 'ngpProgressValue',\n transform: v => (v == null ? null : numberAttribute(v)),\n });\n\n /**\n * Define the progress min value.\n * @default '0'\n */\n readonly min = input<number, NumberInput>(0, {\n alias: 'ngpProgressMin',\n transform: numberAttribute,\n });\n\n /**\n * Define the progress max value.\n * @default 100\n */\n readonly max = input<number, NumberInput>(100, {\n alias: 'ngpProgressMax',\n transform: numberAttribute,\n });\n\n /**\n * Define a function that returns the progress value label.\n * @param value The current value\n * @param max The maximum value\n * @param min The minimum value\n * @returns The value label\n */\n readonly valueLabel = input<NgpProgressValueTextFn>(\n (value, max, min) => `${max === min ? 0 : Math.round(((value - min) / (max - min)) * 100)}%`,\n {\n alias: 'ngpProgressValueLabel',\n },\n );\n\n /**\n * The unique identifier for the progress.\n */\n readonly id = input<string>(uniqueId('ngp-progress'));\n\n /**\n * The state of the progress bar.\n * @internal\n */\n private readonly state = ngpProgress({\n value: this.value,\n min: this.min,\n max: this.max,\n valueLabel: this.valueLabel,\n id: this.id,\n });\n\n /**\n * Get the progress value text.\n */\n protected readonly valueText = this.state.valueText;\n}\n\nexport type NgpProgressValueTextFn = (value: number, max: number, min: number) => string;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAyHa,CAAC,qBAAqB,EAAE,WAA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EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,SAAA,EAFX,CAAC,oBAAoB,EAAE,CAAC,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAExB,WAAW,EAAA,UAAA,EAAA,CAAA;kBAJvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,SAAS,EAAE,CAAC,oBAAoB,EAAE,CAAC;AACpC,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -29,7 +29,9 @@ const [NgpRovingFocusGroupStateToken, ngpRovingFocusGroup, injectRovingFocusGrou
|
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
* Store the active item in the roving focus group.
|
|
32
|
+
* Store the active item in the roving focus group. This is the single source
|
|
33
|
+
* of truth for the tab stop; items push to it via setActiveItem when they
|
|
34
|
+
* become active (e.g. the selected tab), and roving navigation updates it too.
|
|
33
35
|
*/
|
|
34
36
|
const activeItem = signal(null, ...(ngDevMode ? [{ debugName: "activeItem" }] : /* istanbul ignore next */ []));
|
|
35
37
|
/**
|
|
@@ -44,6 +46,10 @@ const [NgpRovingFocusGroupStateToken, ngpRovingFocusGroup, injectRovingFocusGrou
|
|
|
44
46
|
item.focus(origin);
|
|
45
47
|
}
|
|
46
48
|
}
|
|
49
|
+
// set the tab stop without moving focus (see interface docs)
|
|
50
|
+
function setTabStop(id) {
|
|
51
|
+
activeItem.set(id);
|
|
52
|
+
}
|
|
47
53
|
/**
|
|
48
54
|
* Activate the first item in the roving focus group.
|
|
49
55
|
* @param origin The origin of the focus change
|
|
@@ -186,7 +192,11 @@ const [NgpRovingFocusGroupStateToken, ngpRovingFocusGroup, injectRovingFocusGrou
|
|
|
186
192
|
}
|
|
187
193
|
function register(item) {
|
|
188
194
|
items.update(items => [...items, item]);
|
|
189
|
-
//
|
|
195
|
+
// seed the first non-disabled item as the tab stop; an active item (e.g. the
|
|
196
|
+
// selected tab) overrides this by pushing to setActiveItem once it registers.
|
|
197
|
+
if (item.disabled()) {
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
190
200
|
if (!activeItem()) {
|
|
191
201
|
activeItem.set(item.id());
|
|
192
202
|
}
|
|
@@ -218,6 +228,7 @@ const [NgpRovingFocusGroupStateToken, ngpRovingFocusGroup, injectRovingFocusGrou
|
|
|
218
228
|
disabled,
|
|
219
229
|
activeItem,
|
|
220
230
|
setActiveItem,
|
|
231
|
+
setTabStop,
|
|
221
232
|
setOrientation,
|
|
222
233
|
onKeydown,
|
|
223
234
|
register,
|