ng-primitives 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/a11y/index.d.ts +1 -1
- package/a11y/visually-hidden/visually-hidden.token.d.ts +1 -1
- package/accordion/accordion/accordion.directive.d.ts +2 -2
- package/accordion/accordion/accordion.token.d.ts +1 -1
- package/accordion/accordion-content/accordion-content.token.d.ts +1 -1
- package/accordion/accordion-item/accordion-item.directive.d.ts +1 -1
- package/accordion/accordion-item/accordion-item.token.d.ts +1 -1
- package/accordion/accordion-trigger/accordion-trigger.token.d.ts +1 -1
- package/accordion/config/accordion.config.d.ts +1 -1
- package/accordion/index.d.ts +1 -1
- package/autofill/autofill/autofill.token.d.ts +1 -1
- package/autofill/index.d.ts +1 -1
- package/avatar/avatar/avatar.token.d.ts +1 -1
- package/avatar/avatar-fallback/avatar-fallback.directive.d.ts +1 -1
- package/avatar/avatar-image/avatar-image.directive.d.ts +1 -1
- package/avatar/config/avatar.config.d.ts +1 -1
- package/avatar/index.d.ts +1 -1
- package/button/button/button.directive.d.ts +1 -1
- package/button/button/button.token.d.ts +1 -1
- package/button/index.d.ts +1 -1
- package/checkbox/checkbox/checkbox.directive.d.ts +1 -1
- package/checkbox/checkbox/checkbox.token.d.ts +1 -1
- package/checkbox/index.d.ts +1 -1
- package/esm2022/a11y/index.mjs +2 -2
- package/esm2022/a11y/visually-hidden/visually-hidden.directive.mjs +2 -2
- package/esm2022/a11y/visually-hidden/visually-hidden.token.mjs +2 -2
- package/esm2022/accordion/accordion/accordion.directive.mjs +1 -1
- package/esm2022/accordion/accordion/accordion.token.mjs +2 -2
- package/esm2022/accordion/accordion-content/accordion-content.directive.mjs +2 -2
- package/esm2022/accordion/accordion-content/accordion-content.token.mjs +2 -2
- package/esm2022/accordion/accordion-item/accordion-item.directive.mjs +1 -1
- package/esm2022/accordion/accordion-item/accordion-item.token.mjs +2 -2
- package/esm2022/accordion/accordion-trigger/accordion-trigger.directive.mjs +2 -2
- package/esm2022/accordion/accordion-trigger/accordion-trigger.token.mjs +2 -2
- package/esm2022/accordion/config/accordion.config.mjs +2 -2
- package/esm2022/accordion/index.mjs +2 -2
- package/esm2022/autofill/autofill/autofill.directive.mjs +2 -2
- package/esm2022/autofill/autofill/autofill.token.mjs +2 -2
- package/esm2022/autofill/index.mjs +2 -2
- package/esm2022/avatar/avatar/avatar.directive.mjs +2 -2
- package/esm2022/avatar/avatar/avatar.token.mjs +2 -2
- package/esm2022/avatar/avatar-fallback/avatar-fallback.directive.mjs +1 -1
- package/esm2022/avatar/avatar-image/avatar-image.directive.mjs +2 -2
- package/esm2022/avatar/config/avatar.config.mjs +2 -2
- package/esm2022/avatar/index.mjs +2 -2
- package/esm2022/button/button/button.directive.mjs +1 -1
- package/esm2022/button/button/button.token.mjs +2 -2
- package/esm2022/button/index.mjs +2 -2
- package/esm2022/checkbox/checkbox/checkbox.directive.mjs +1 -1
- package/esm2022/checkbox/checkbox/checkbox.token.mjs +2 -2
- package/esm2022/checkbox/index.mjs +2 -2
- package/esm2022/file-upload/file-upload/file-upload.directive.mjs +2 -2
- package/esm2022/file-upload/file-upload/file-upload.token.mjs +2 -2
- package/esm2022/file-upload/index.mjs +2 -2
- package/esm2022/focus-trap/focus-trap/focus-trap.directive.mjs +2 -2
- package/esm2022/focus-trap/focus-trap/focus-trap.token.mjs +2 -2
- package/esm2022/focus-trap/index.mjs +2 -2
- package/esm2022/form-field/description/description.directive.mjs +2 -2
- package/esm2022/form-field/description/description.token.mjs +2 -2
- package/esm2022/form-field/error/error.directive.mjs +2 -2
- package/esm2022/form-field/error/error.token.mjs +2 -2
- package/esm2022/form-field/form-control/form-control.directive.mjs +2 -2
- package/esm2022/form-field/form-control/form-control.token.mjs +2 -2
- package/esm2022/form-field/form-field/form-field.directive.mjs +2 -2
- package/esm2022/form-field/form-field/form-field.token.mjs +2 -2
- package/esm2022/form-field/index.mjs +2 -2
- package/esm2022/form-field/label/label.directive.mjs +2 -2
- package/esm2022/form-field/label/label.token.mjs +2 -2
- package/esm2022/index.mjs +2 -2
- package/esm2022/input/index.mjs +2 -2
- package/esm2022/input/input/input.directive.mjs +1 -1
- package/esm2022/input/input/input.token.mjs +2 -2
- package/esm2022/interactions/focus/focus.directive.mjs +1 -1
- package/esm2022/interactions/focus/focus.token.mjs +2 -2
- package/esm2022/interactions/focus-visible/focus-visible.directive.mjs +2 -2
- package/esm2022/interactions/focus-visible/focus-visible.token.mjs +2 -2
- package/esm2022/interactions/hover/hover.directive.mjs +1 -1
- package/esm2022/interactions/hover/hover.token.mjs +2 -2
- package/esm2022/interactions/index.mjs +2 -2
- package/esm2022/interactions/move/move.directive.mjs +1 -1
- package/esm2022/interactions/move/move.token.mjs +2 -2
- package/esm2022/interactions/press/press.directive.mjs +1 -1
- package/esm2022/interactions/press/press.token.mjs +2 -2
- package/esm2022/internal/disabled/disabled.mjs +2 -2
- package/esm2022/internal/index.mjs +2 -2
- package/esm2022/internal/orientation/orientation.mjs +2 -2
- package/esm2022/internal/style-injector/style-injector.mjs +2 -2
- package/esm2022/progress/index.mjs +2 -2
- package/esm2022/progress/progress/progress.directive.mjs +1 -1
- package/esm2022/progress/progress/progress.token.mjs +2 -2
- package/esm2022/progress/progress-indicator/progress-indicator.directive.mjs +2 -2
- package/esm2022/radio/index.mjs +2 -2
- package/esm2022/radio/radio-group/radio-group.directive.mjs +1 -1
- package/esm2022/radio/radio-group/radio-group.token.mjs +2 -2
- package/esm2022/radio/radio-indicator/radio-indicator.directive.mjs +2 -2
- package/esm2022/radio/radio-item/radio-item.directive.mjs +1 -1
- package/esm2022/radio/radio-item/radio-item.token.mjs +2 -2
- package/esm2022/resize/index.mjs +2 -2
- package/esm2022/resize/resize/resize.directive.mjs +2 -2
- package/esm2022/resize/utils/resize.mjs +2 -2
- package/esm2022/roving-focus/index.mjs +2 -2
- package/esm2022/roving-focus/roving-focus-group/roving-focus-group.directive.mjs +1 -1
- package/esm2022/roving-focus/roving-focus-group/roving-focus-group.token.mjs +2 -2
- package/esm2022/roving-focus/roving-focus-item/roving-focus-item.directive.mjs +2 -2
- package/esm2022/roving-focus/roving-focus-item/roving-focus-item.token.mjs +2 -2
- package/esm2022/search/index.mjs +2 -2
- package/esm2022/search/search-field/search-field.directive.mjs +2 -2
- package/esm2022/search/search-field/search-field.token.mjs +2 -2
- package/esm2022/select/index.mjs +2 -2
- package/esm2022/select/select/select.directive.mjs +1 -1
- package/esm2022/select/select/select.token.mjs +2 -2
- package/esm2022/slider/index.mjs +2 -2
- package/esm2022/slider/slider/slider.directive.mjs +1 -1
- package/esm2022/slider/slider/slider.token.mjs +2 -2
- package/esm2022/slider/slider-range/slider-range.directive.mjs +2 -2
- package/esm2022/slider/slider-range/slider-range.token.mjs +2 -2
- package/esm2022/slider/slider-thumb/slider-thumb.directive.mjs +2 -2
- package/esm2022/slider/slider-thumb/slider-thumb.token.mjs +2 -2
- package/esm2022/slider/slider-track/slider-track.directive.mjs +2 -2
- package/esm2022/slider/slider-track/slider-track.token.mjs +2 -2
- package/esm2022/switch/index.mjs +2 -2
- package/esm2022/switch/switch/switch.directive.mjs +1 -1
- package/esm2022/switch/switch/switch.token.mjs +2 -2
- package/esm2022/switch/switch-thumb/switch-thumb.directive.mjs +2 -2
- package/esm2022/tabs/config/tabs.config.mjs +2 -2
- package/esm2022/tabs/index.mjs +2 -2
- package/esm2022/tabs/tab-button/tab-button.directive.mjs +1 -1
- package/esm2022/tabs/tab-list/tab-list.directive.mjs +2 -2
- package/esm2022/tabs/tab-panel/tab-panel.directive.mjs +2 -2
- package/esm2022/tabs/tab-panel/tab-panel.token.mjs +2 -2
- package/esm2022/tabs/tabset/tabset.directive.mjs +1 -1
- package/esm2022/tabs/tabset/tabset.token.mjs +2 -2
- package/esm2022/textarea/index.mjs +2 -2
- package/esm2022/textarea/textarea/textarea.directive.mjs +1 -1
- package/esm2022/textarea/textarea/textarea.token.mjs +2 -2
- package/esm2022/toggle/index.mjs +2 -2
- package/esm2022/toggle/toggle/toggle.directive.mjs +1 -1
- package/esm2022/tooltip/config/tooltip.config.mjs +2 -2
- package/esm2022/tooltip/index.mjs +2 -2
- package/esm2022/tooltip/tooltip/tooltip.directive.mjs +2 -2
- package/esm2022/tooltip/tooltip/tooltip.token.mjs +2 -2
- package/esm2022/tooltip/tooltip-trigger/tooltip-trigger.directive.mjs +1 -1
- package/esm2022/tooltip/tooltip-trigger/tooltip-trigger.token.mjs +2 -2
- package/esm2022/utils/helpers/disposables.mjs +2 -2
- package/esm2022/utils/helpers/focus-manager.mjs +1 -1
- package/esm2022/utils/helpers/unique-id.mjs +2 -2
- package/esm2022/utils/index.mjs +2 -2
- package/esm2022/utils/signals/async.mjs +2 -2
- package/esm2022/utils/ui/dimensions.mjs +2 -2
- package/fesm2022/ng-primitives-a11y.mjs +3 -3
- package/fesm2022/ng-primitives-a11y.mjs.map +1 -1
- package/fesm2022/ng-primitives-accordion.mjs +8 -8
- package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/ng-primitives-autofill.mjs +3 -3
- package/fesm2022/ng-primitives-autofill.mjs.map +1 -1
- package/fesm2022/ng-primitives-avatar.mjs +5 -5
- package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/ng-primitives-button.mjs +2 -2
- package/fesm2022/ng-primitives-button.mjs.map +1 -1
- package/fesm2022/ng-primitives-checkbox.mjs +2 -2
- package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-file-upload.mjs +3 -3
- package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
- package/fesm2022/ng-primitives-focus-trap.mjs +3 -3
- package/fesm2022/ng-primitives-focus-trap.mjs.map +1 -1
- package/fesm2022/ng-primitives-form-field.mjs +11 -11
- package/fesm2022/ng-primitives-form-field.mjs.map +1 -1
- package/fesm2022/ng-primitives-input.mjs +2 -2
- package/fesm2022/ng-primitives-input.mjs.map +1 -1
- package/fesm2022/ng-primitives-interactions.mjs +7 -7
- package/fesm2022/ng-primitives-interactions.mjs.map +1 -1
- package/fesm2022/ng-primitives-internal.mjs +4 -4
- package/fesm2022/ng-primitives-internal.mjs.map +1 -1
- package/fesm2022/ng-primitives-progress.mjs +3 -3
- package/fesm2022/ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/ng-primitives-radio.mjs +4 -4
- package/fesm2022/ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/ng-primitives-resize.mjs +3 -3
- package/fesm2022/ng-primitives-resize.mjs.map +1 -1
- package/fesm2022/ng-primitives-roving-focus.mjs +4 -4
- package/fesm2022/ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/ng-primitives-search.mjs +3 -3
- package/fesm2022/ng-primitives-search.mjs.map +1 -1
- package/fesm2022/ng-primitives-select.mjs +2 -2
- package/fesm2022/ng-primitives-select.mjs.map +1 -1
- package/fesm2022/ng-primitives-slider.mjs +8 -8
- package/fesm2022/ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/ng-primitives-switch.mjs +3 -3
- package/fesm2022/ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/ng-primitives-tabs.mjs +6 -6
- package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/ng-primitives-textarea.mjs +2 -2
- package/fesm2022/ng-primitives-textarea.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle.mjs +1 -1
- package/fesm2022/ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/ng-primitives-tooltip.mjs +5 -5
- package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/ng-primitives-utils.mjs +5 -5
- package/fesm2022/ng-primitives-utils.mjs.map +1 -1
- package/fesm2022/ng-primitives.mjs +1 -1
- package/fesm2022/ng-primitives.mjs.map +1 -1
- package/file-upload/file-upload/file-upload.directive.d.ts +1 -1
- package/file-upload/file-upload/file-upload.token.d.ts +1 -1
- package/file-upload/index.d.ts +1 -1
- package/focus-trap/focus-trap/focus-trap.token.d.ts +1 -1
- package/focus-trap/index.d.ts +1 -1
- package/form-field/description/description.token.d.ts +1 -1
- package/form-field/error/error.directive.d.ts +1 -1
- package/form-field/error/error.token.d.ts +1 -1
- package/form-field/form-control/form-control.token.d.ts +1 -1
- package/form-field/form-field/form-field.directive.d.ts +1 -1
- package/form-field/form-field/form-field.token.d.ts +1 -1
- package/form-field/index.d.ts +1 -1
- package/form-field/label/label.token.d.ts +1 -1
- package/index.d.ts +1 -1
- package/input/index.d.ts +1 -1
- package/input/input/input.directive.d.ts +1 -1
- package/input/input/input.token.d.ts +1 -1
- package/interactions/focus/focus.directive.d.ts +1 -1
- package/interactions/focus/focus.token.d.ts +1 -1
- package/interactions/focus-visible/focus-visible.token.d.ts +1 -1
- package/interactions/hover/hover.directive.d.ts +1 -1
- package/interactions/hover/hover.token.d.ts +1 -1
- package/interactions/index.d.ts +1 -1
- package/interactions/move/move.directive.d.ts +1 -1
- package/interactions/move/move.token.d.ts +1 -1
- package/interactions/press/press.directive.d.ts +1 -1
- package/interactions/press/press.token.d.ts +1 -1
- package/internal/disabled/disabled.d.ts +1 -1
- package/internal/index.d.ts +1 -1
- package/internal/orientation/orientation.d.ts +1 -1
- package/package.json +19 -19
- package/progress/index.d.ts +1 -1
- package/progress/progress/progress.directive.d.ts +1 -1
- package/progress/progress/progress.token.d.ts +1 -1
- package/radio/index.d.ts +1 -1
- package/radio/radio-group/radio-group.directive.d.ts +1 -1
- package/radio/radio-group/radio-group.token.d.ts +1 -1
- package/radio/radio-item/radio-item.directive.d.ts +1 -1
- package/radio/radio-item/radio-item.token.d.ts +1 -1
- package/resize/index.d.ts +1 -1
- package/resize/resize/resize.directive.d.ts +1 -1
- package/resize/utils/resize.d.ts +1 -1
- package/roving-focus/index.d.ts +1 -1
- package/roving-focus/roving-focus-group/roving-focus-group.directive.d.ts +1 -1
- package/roving-focus/roving-focus-group/roving-focus-group.token.d.ts +1 -1
- package/roving-focus/roving-focus-item/roving-focus-item.directive.d.ts +1 -1
- package/roving-focus/roving-focus-item/roving-focus-item.token.d.ts +1 -1
- package/search/index.d.ts +1 -1
- package/search/search-field/search-field.token.d.ts +1 -1
- package/select/index.d.ts +1 -1
- package/select/select/select.directive.d.ts +1 -1
- package/select/select/select.token.d.ts +1 -1
- package/slider/index.d.ts +1 -1
- package/slider/slider/slider.directive.d.ts +1 -1
- package/slider/slider/slider.token.d.ts +1 -1
- package/slider/slider-range/slider-range.token.d.ts +1 -1
- package/slider/slider-thumb/slider-thumb.token.d.ts +1 -1
- package/slider/slider-track/slider-track.directive.d.ts +1 -1
- package/slider/slider-track/slider-track.token.d.ts +1 -1
- package/switch/index.d.ts +1 -1
- package/switch/switch/switch.directive.d.ts +1 -1
- package/switch/switch/switch.token.d.ts +1 -1
- package/tabs/config/tabs.config.d.ts +1 -1
- package/tabs/index.d.ts +1 -1
- package/tabs/tab-button/tab-button.directive.d.ts +1 -1
- package/tabs/tab-panel/tab-panel.token.d.ts +1 -1
- package/tabs/tabset/tabset.directive.d.ts +1 -1
- package/tabs/tabset/tabset.token.d.ts +1 -1
- package/textarea/index.d.ts +1 -1
- package/textarea/textarea/textarea.directive.d.ts +1 -1
- package/textarea/textarea/textarea.token.d.ts +1 -1
- package/toggle/index.d.ts +1 -1
- package/toggle/toggle/toggle.directive.d.ts +1 -1
- package/tooltip/config/tooltip.config.d.ts +1 -1
- package/tooltip/index.d.ts +1 -1
- package/tooltip/tooltip/tooltip.directive.d.ts +1 -1
- package/tooltip/tooltip/tooltip.token.d.ts +1 -1
- package/tooltip/tooltip-trigger/tooltip-trigger.directive.d.ts +1 -1
- package/tooltip/tooltip-trigger/tooltip-trigger.token.d.ts +1 -1
- package/utils/helpers/focus-manager.d.ts +1 -1
- package/utils/helpers/unique-id.d.ts +1 -1
- package/utils/index.d.ts +1 -1
- package/utils/signals/async.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-interactions.mjs","sources":["../../../../packages/ng-primitives/interactions/src/hover/hover.token.ts","../../../../packages/ng-primitives/interactions/src/hover/hover.directive.ts","../../../../packages/ng-primitives/interactions/src/focus/focus.token.ts","../../../../packages/ng-primitives/interactions/src/focus/focus.directive.ts","../../../../packages/ng-primitives/interactions/src/focus-visible/focus-visible.token.ts","../../../../packages/ng-primitives/interactions/src/focus-visible/focus-visible.directive.ts","../../../../packages/ng-primitives/interactions/src/press/press.token.ts","../../../../packages/ng-primitives/interactions/src/press/press.directive.ts","../../../../packages/ng-primitives/interactions/src/move/move.token.ts","../../../../packages/ng-primitives/interactions/src/move/move.directive.ts","../../../../packages/ng-primitives/interactions/src/index.ts","../../../../packages/ng-primitives/interactions/src/ng-primitives-interactions.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpHover } from './hover.directive';\n\nexport const NgpHoverToken = new InjectionToken<NgpHover>('NgpHoverToken');\n\n/**\n * Inject the Hover directive instance\n * @returns Hover directive instance\n */\nexport function injectHover(): NgpHover {\n return inject(NgpHoverToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport type { BooleanInput } from '@angular/cdk/coercion';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n Directive,\n HostListener,\n Injectable,\n OnChanges,\n PLATFORM_ID,\n SimpleChanges,\n booleanAttribute,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { injectDisabled } from 'ng-primitives/internal';\nimport { NgpHoverToken } from './hover.token';\n\n/**\n * We use a service here as this value is a singleton\n * and allows us to register the dom events once.\n */\n@Injectable({\n providedIn: 'root',\n})\nclass GlobalPointerEvents {\n /**\n * Whether global mouse events should be ignored.\n */\n ignoreEmulatedMouseEvents: boolean = false;\n\n /**\n * Access the document.\n */\n private readonly document = inject(DOCUMENT);\n\n /**\n * Determine the platform id.\n */\n private readonly platformId = inject(PLATFORM_ID);\n\n constructor() {\n // we only want to setup events on the client\n if (isPlatformBrowser(this.platformId)) {\n this.setupGlobalTouchEvents();\n }\n }\n\n private setupGlobalTouchEvents(): void {\n this.document.addEventListener('pointerup', this.handleGlobalPointerEvent.bind(this));\n this.document.addEventListener('touchend', this.setGlobalIgnoreEmulatedMouseEvents.bind(this));\n }\n\n private setGlobalIgnoreEmulatedMouseEvents(): void {\n this.ignoreEmulatedMouseEvents = true;\n // Clear globalIgnoreEmulatedMouseEvents after a short timeout. iOS fires onPointerEnter\n // with pointerType=\"mouse\" immediately after onPointerUp and before onFocus. On other\n // devices that don't have this quirk, we don't want to ignore a mouse hover sometime in\n // the distant future because a user previously touched the element.\n setTimeout(() => (this.ignoreEmulatedMouseEvents = false), 50);\n }\n\n private handleGlobalPointerEvent(event: PointerEvent): void {\n if (event.pointerType === 'touch') {\n this.setGlobalIgnoreEmulatedMouseEvents();\n }\n }\n}\n\n/**\n * A directive for normalizing hover events across the different browsers and devices.\n *\n * This is an Angular port of the useHover hook from\n * react-aria: https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/interactions/src/useHover.ts\n */\n@Directive({\n standalone: true,\n selector: '[ngpHover]',\n exportAs: 'ngpHover',\n providers: [{ provide: NgpHoverToken, useExisting: NgpHover }],\n host: {\n '[attr.data-hover]': 'hovered()',\n },\n})\nexport class NgpHover implements OnChanges {\n /**\n * Access the global pointer events handler.\n */\n private readonly globalPointerEvents = inject(GlobalPointerEvents);\n\n /**\n * Whether hoving should be disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpHoverDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the disabled state from any parent.\n */\n private readonly isDisabled = injectDisabled(this.disabled);\n\n /**\n * Store the current hover state.\n */\n protected hovered = signal<boolean>(false);\n\n /**\n * Whether this element should ignore emulated mouse events.\n */\n private ignoreEmulatedMouseEvents: boolean = false;\n\n /**\n * Emit an event when hovering starts.\n */\n readonly hoverStart = output<void>({ alias: 'ngpHoverStart' });\n\n /**\n * Emit an event when hovering ends.\n */\n readonly hoverEnd = output<void>({ alias: 'ngpHoverEnd' });\n\n /**\n * Emit an event when the hover state changes.\n */\n readonly hoverChange = output<boolean>({ alias: 'ngpHover' });\n\n ngOnChanges(changes: SimpleChanges): void {\n if ('disabled' in changes) {\n // if the component is suddenly disabled and is currently hovered\n // switch to the unhovered state.\n if (changes['disabled'].currentValue === true) {\n this.onHoverEnd('mouse');\n }\n }\n }\n\n /**\n * Trigger the hover start events.\n * @param event\n * @param pointerType\n */\n private onHoverStart(event: Event, pointerType: string): void {\n if (\n this.isDisabled() ||\n pointerType === 'touch' ||\n this.hovered() ||\n !(event.currentTarget as Element)?.contains(event.target as Element)\n ) {\n return;\n }\n\n this.hovered.set(true);\n this.hoverStart.emit();\n this.hoverChange.emit(true);\n }\n\n /**\n * Trigger the hover end events.\n * @param pointerType\n */\n private onHoverEnd(pointerType: string): void {\n if (pointerType === 'touch' || !this.hovered()) {\n return;\n }\n\n this.hovered.set(false);\n this.hoverEnd.emit();\n this.hoverChange.emit(false);\n }\n\n @HostListener('pointerenter', ['$event'])\n protected onPointerEnter(event: PointerEvent): void {\n if (this.globalPointerEvents.ignoreEmulatedMouseEvents && event.pointerType === 'mouse') {\n return;\n }\n\n this.onHoverStart(event, event.pointerType);\n }\n\n @HostListener('pointerleave', ['$event'])\n protected onPointerLeave(event: PointerEvent): void {\n if (!this.isDisabled() && (event.currentTarget as Element)?.contains(event.target as Element)) {\n this.onHoverEnd(event.pointerType);\n }\n }\n\n @HostListener('touchstart')\n protected onTouchStart(): void {\n this.ignoreEmulatedMouseEvents = true;\n }\n\n @HostListener('mouseenter', ['$event'])\n protected onMouseEnter(event: MouseEvent): void {\n if (!this.ignoreEmulatedMouseEvents && !this.globalPointerEvents.ignoreEmulatedMouseEvents) {\n this.onHoverStart(event, 'mouse');\n }\n\n this.ignoreEmulatedMouseEvents = false;\n }\n\n @HostListener('mouseleave', ['$event'])\n protected onMouseLeave(event: MouseEvent): void {\n if (!this.isDisabled() && (event.currentTarget as Element)?.contains(event.target as Element)) {\n this.onHoverEnd('mouse');\n }\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpFocus } from './focus.directive';\n\nexport const NgpFocusToken = new InjectionToken<NgpFocus>('NgpFocusToken');\n\n/**\n * Inject the Focus directive instance\n */\nexport function injectFocus(): NgpFocus {\n return inject(NgpFocusToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, HostListener, booleanAttribute, input, output, signal } from '@angular/core';\nimport { injectDisabled } from 'ng-primitives/internal';\nimport { NgpFocusToken } from './focus.token';\n\n/**\n * This was inspired by the React Aria useFocus hook.\n * https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/interactions/src/useFocus.ts#L20\n */\n@Directive({\n standalone: true,\n selector: '[ngpFocus]',\n exportAs: 'ngpFocus',\n providers: [{ provide: NgpFocusToken, useExisting: NgpFocus }],\n host: {\n '[attr.data-focus]': 'isFocused()',\n },\n})\nexport class NgpFocus {\n /**\n * Whether the element is currently focused.\n */\n protected isFocused = signal<boolean>(false);\n\n /**\n * Whether listening for focus events is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpFocusDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the disabled state from any parent.\n */\n private readonly isDisabled = injectDisabled(this.disabled);\n\n /**\n * Emit when the focus state changes.\n */\n readonly focus = output<boolean>({ alias: 'ngpFocus' });\n\n /**\n * Listen for focus events.\n * @param event\n */\n @HostListener('focus', ['$event'])\n protected onFocus(event: FocusEvent) {\n if (this.isDisabled()) {\n return;\n }\n\n const ownerDocument = (event.target as HTMLElement)?.ownerDocument ?? document;\n\n // ensure this element is still focused\n if (ownerDocument.activeElement === event.target && event.currentTarget === event.target) {\n this.focus.emit(true);\n this.isFocused.set(true);\n }\n }\n\n /**\n * Listen for blur events.\n * @param event\n */\n @HostListener('blur', ['$event'])\n protected onBlur(event: FocusEvent) {\n if (this.isDisabled()) {\n return;\n }\n\n if (event.currentTarget === event.target) {\n this.focus.emit(false);\n this.isFocused.set(false);\n }\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpFocusVisible } from './focus-visible.directive';\n\nexport const NgpFocusVisibleToken = new InjectionToken<NgpFocusVisible>('NgpFocusVisibleToken');\n\n/**\n * Inject the FocusVisible directive instance\n */\nexport function injectFocusVisible(): NgpFocusVisible {\n return inject(NgpFocusVisibleToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport {\n Directive,\n ElementRef,\n HostListener,\n booleanAttribute,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { injectDisabled } from 'ng-primitives/internal';\nimport { NgpFocusVisibleToken } from './focus-visible.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpFocusVisible]',\n exportAs: 'ngpFocusVisible',\n providers: [{ provide: NgpFocusVisibleToken, useExisting: NgpFocusVisible }],\n host: {\n '[attr.data-focus-visible]': 'isFocused()',\n },\n})\nexport class NgpFocusVisible {\n /**\n * Access the element that the directive is applied to.\n */\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Access the focus monitor.\n */\n private readonly focusMonitor = inject(FocusMonitor);\n\n /**\n * Whether focus events are listened to.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpFocusVisibleDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the disabled state from any parent.\n */\n private readonly isDisabled = injectDisabled(this.disabled);\n\n /**\n * Emit when the element is visually focused.\n */\n readonly focusChange = output<boolean>({\n alias: 'ngpFocusVisible',\n });\n\n /**\n * Whether the element is currently focused.\n */\n protected readonly isFocused = signal<boolean>(false);\n\n constructor() {\n this.focusMonitor\n .monitor(this.elementRef.nativeElement)\n .pipe(takeUntilDestroyed())\n .subscribe(origin => this.onFocus(origin));\n }\n\n private onFocus(origin: FocusOrigin): void {\n if (this.isDisabled() || this.isFocused()) {\n return;\n }\n\n // for some elements the focus visible state should always appear on focus\n if (this.alwaysShowFocus()) {\n this.isFocused.set(true);\n this.focusChange.emit(true);\n return;\n }\n\n // if the focus origin is keyboard, then the focus is visible\n if (origin === 'keyboard') {\n this.isFocused.set(true);\n this.focusChange.emit(true);\n return;\n }\n }\n\n /**\n * Listen for blur events.\n */\n @HostListener('blur')\n protected onBlur(): void {\n if (this.isDisabled() || !this.isFocused()) {\n return;\n }\n\n this.isFocused.set(false);\n this.focusChange.emit(false);\n }\n\n private alwaysShowFocus(): boolean {\n const nonTextInputTypes = [\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset',\n ];\n\n // if this is an input element and it is a text input\n if (\n this.elementRef.nativeElement instanceof HTMLInputElement &&\n !nonTextInputTypes.includes(this.elementRef.nativeElement.type)\n ) {\n return true;\n }\n\n // if this is a textarea\n if (this.elementRef.nativeElement instanceof HTMLTextAreaElement) {\n return true;\n }\n\n // if this is an element with contenteditable\n if (\n this.elementRef.nativeElement.isContentEditable ||\n this.elementRef.nativeElement.hasAttribute('contenteditable')\n ) {\n return true;\n }\n\n return false;\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpPress } from './press.directive';\n\nexport const NgpPressToken = new InjectionToken<NgpPress>('NgpPressToken');\n\n/**\n * Inject the Press directive instance\n */\nexport function injectPress(): NgpPress {\n return inject(NgpPressToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport {\n Directive,\n ElementRef,\n HostListener,\n booleanAttribute,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { injectDisabled } from 'ng-primitives/internal';\nimport { injectDisposables } from 'ng-primitives/utils';\nimport { NgpPressToken } from './press.token';\n\n/**\n * This was inpsired by Headless UI's active-press hook:\n * https://github.com/tailwindlabs/headlessui/blob/main/packages/%40headlessui-react/src/hooks/use-active-press.tsx\n */\n\n@Directive({\n standalone: true,\n selector: '[ngpPress]',\n exportAs: 'ngpPress',\n providers: [{ provide: NgpPressToken, useExisting: NgpPress }],\n host: {\n '[attr.data-press]': 'pressed()',\n },\n})\nexport class NgpPress {\n /**\n * Access the HTML Element.\n */\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Access the disposables.\n */\n private readonly disposables = injectDisposables();\n\n /**\n * Whether listening for press events is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpPressDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the disabled state from any parent.\n */\n private readonly isDisabled = injectDisabled(this.disabled);\n\n /**\n * Emit when the press begins.\n */\n readonly pressStart = output<void>({\n alias: 'ngpPressStart',\n });\n\n /**\n * Emit when the press ends.\n */\n readonly pressEnd = output<void>({\n alias: 'ngpPressEnd',\n });\n\n /**\n * Emit when the press changes.\n */\n readonly pressChange = output<boolean>({\n alias: 'ngpPress',\n });\n\n /**\n * The press state.\n */\n protected readonly pressed = signal(false);\n\n /**\n * Reset the press state.\n */\n private reset(): void {\n // if we are not pressing, then do nothing\n if (!this.pressed()) {\n return;\n }\n\n // clear any existing disposables\n this.disposableListeners.forEach(dispose => dispose());\n this.pressed.set(false);\n this.pressEnd.emit();\n this.pressChange.emit(false);\n }\n\n /**\n * Store the list of disposables.\n */\n private disposableListeners: (() => void)[] = [];\n\n @HostListener('pointerdown')\n protected onPointerDown(): void {\n if (this.isDisabled()) {\n return;\n }\n\n // clear any existing disposables\n this.disposableListeners.forEach(dispose => dispose());\n\n // update the press state\n this.pressed.set(true);\n this.pressStart.emit();\n this.pressChange.emit(true);\n\n // setup global event listeners to catch events on elements outside the directive\n const ownerDocument = this.element.nativeElement.ownerDocument ?? document;\n\n // if the pointer up event happens on any elements, then we are no longer pressing on this element\n const pointerUp = this.disposables.addEventListener(\n ownerDocument,\n 'pointerup',\n this.reset.bind(this),\n false,\n );\n\n // Instead of relying on the `pointerleave` event, which is not consistently called on iOS Safari,\n // we use the `pointermove` event to determine if we are still \"pressing\".\n // By checking if the target is still within the element, we can determine if the press is ongoing.\n const pointerMove = this.disposables.addEventListener(\n ownerDocument,\n 'pointermove',\n this.onPointerMove.bind(this) as EventListener,\n false,\n );\n\n // if the pointer is cancelled, then we are no longer pressing on this element\n const pointerCancel = this.disposables.addEventListener(\n ownerDocument,\n 'pointercancel',\n this.reset.bind(this),\n false,\n );\n\n this.disposableListeners = [pointerUp, pointerMove, pointerCancel];\n }\n\n private onPointerMove(event: PointerEvent): void {\n if (\n this.element.nativeElement !== event.target &&\n !this.element.nativeElement.contains(event.target as Node)\n ) {\n this.reset();\n }\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpMove } from './move.directive';\n\nexport const NgpMoveToken = new InjectionToken<NgpMove>('NgpMoveToken');\n\n/**\n * Inject the Move directive instance\n */\nexport function injectMove(): NgpMove {\n return inject(NgpMoveToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, HostListener, input, output, signal } from '@angular/core';\nimport { injectDisabled } from 'ng-primitives/internal';\nimport { injectDisposables } from 'ng-primitives/utils';\nimport { NgpMoveToken } from './move.token';\n\n/**\n * Inspired by react-aria useMove hook:\n * https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/interactions/src/useMove.ts\n */\n\n@Directive({\n standalone: true,\n selector: '[ngpMove]',\n exportAs: 'ngpMove',\n providers: [{ provide: NgpMoveToken, useExisting: NgpMove }],\n host: {\n '[attr.data-move]': 'isMoving()',\n },\n})\nexport class NgpMove {\n /**\n * Access the disposable helper.\n */\n private readonly disposables = injectDisposables();\n\n /**\n * Whether movement is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpMoveDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the disabled state from any parent.\n */\n private readonly isDisabled = injectDisabled(this.disabled);\n\n /**\n * Emit when the move event begins.\n */\n readonly start = output<NgpMoveStartEvent>({\n alias: 'ngpMoveStart',\n });\n\n /**\n * Emit when the element is moved.\n */\n readonly move = output<NgpMoveEvent>({\n alias: 'ngpMove',\n });\n\n /**\n * Emit when the move event ends.\n */\n readonly end = output<NgpMoveEndEvent>({\n alias: 'ngpMoveEnd',\n });\n\n /**\n * Whether the element is currently being moved.\n */\n private isMoving = signal<boolean>(false);\n\n /**\n * Store the last x position of the element.\n */\n private x: number | null = null;\n\n /**\n * Store the last y position of the element.\n */\n private y: number | null = null;\n\n /**\n * Store the id of the last pointer.\n */\n private pointerId: number | null = null;\n\n /**\n * Store the disposable event listeners.\n */\n private disposableListeners: (() => void)[] = [];\n\n /**\n * Handle a move start.\n */\n private onMoveStart(event: PointerEvent | KeyboardEvent, pointerType: PointerType): void {\n this.start.emit({\n pointerType,\n shiftKey: event.shiftKey,\n ctrlKey: event.ctrlKey,\n metaKey: event.metaKey,\n altKey: event.altKey,\n });\n this.isMoving.set(true);\n }\n\n /**\n * Handle a move event.\n */\n private onMove(\n event: PointerEvent | KeyboardEvent,\n pointerType: PointerType,\n deltaX: number,\n deltaY: number,\n ): void {\n if (deltaX === 0 && deltaY === 0) {\n return;\n }\n\n this.move.emit({\n deltaX,\n deltaY,\n pointerType,\n shiftKey: event.shiftKey,\n ctrlKey: event.ctrlKey,\n metaKey: event.metaKey,\n altKey: event.altKey,\n });\n }\n\n /**\n * Handle a move end.\n */\n private onMoveEnd(event: PointerEvent | KeyboardEvent, pointerType: PointerType): void {\n this.end.emit({\n pointerType,\n shiftKey: event.shiftKey,\n ctrlKey: event.ctrlKey,\n metaKey: event.metaKey,\n altKey: event.altKey,\n });\n this.isMoving.set(false);\n }\n\n /**\n * Handle the pointer down event.\n */\n @HostListener('pointerdown', ['$event'])\n protected onPointerDown(event: PointerEvent): void {\n // ignore right-click or additional pointers\n if (event.button !== 0 || this.pointerId !== null || this.isDisabled()) {\n return;\n }\n\n // prevent the default behavior\n event.preventDefault();\n event.stopPropagation();\n\n this.onMoveStart(event, event.pointerType as PointerType);\n\n // store the pointer id and initial position\n this.pointerId = event.pointerId;\n this.x = event.pageX;\n this.y = event.pageY;\n\n // add global event listeners\n const pointerMove = this.disposables.addEventListener(\n window,\n 'pointermove',\n this.onPointerMove.bind(this) as EventListener,\n false,\n );\n\n const pointerUp = this.disposables.addEventListener(\n window,\n 'pointerup',\n this.onPointerUp.bind(this) as EventListener,\n false,\n );\n\n const pointerCancel = this.disposables.addEventListener(\n window,\n 'pointercancel',\n this.onPointerUp.bind(this) as EventListener,\n false,\n );\n\n // store the disposable event listeners\n this.disposableListeners = [pointerMove, pointerUp, pointerCancel];\n }\n\n /**\n * Handle the pointer up event.\n */\n protected onPointerUp(event: PointerEvent): void {\n if (this.pointerId !== event.pointerId) {\n return;\n }\n\n const pointerType = (event.pointerType ?? 'mouse') as PointerType;\n this.onMoveEnd(event, pointerType);\n this.pointerId = null;\n this.disposableListeners.forEach(dispose => dispose());\n }\n\n /**\n * Handle the pointer move event.\n */\n protected onPointerMove(event: PointerEvent): void {\n if (this.pointerId !== event.pointerId) {\n return;\n }\n\n // Problems with PointerEvent#movementX/movementY:\n // 1. it is always 0 on macOS Safari.\n // 2. On Chrome Android, it's scaled by devicePixelRatio, but not on Chrome macOS\n this.onMove(\n event,\n event.pointerType as PointerType,\n event.pageX - (this.x ?? 0),\n event.pageY - (this.y ?? 0),\n );\n this.x = event.pageX;\n this.y = event.pageY;\n }\n\n private triggerKeyboardMove(event: KeyboardEvent, deltaX: number, deltaY: number): void {\n if (this.isDisabled()) {\n return;\n }\n\n this.onMoveStart(event, 'keyboard');\n this.onMove(event, 'keyboard', deltaX, deltaY);\n this.onMoveEnd(event, 'keyboard');\n }\n\n @HostListener('keydown.ArrowUp', ['$event'])\n protected onArrowUp(event: KeyboardEvent): void {\n event.preventDefault();\n event.stopPropagation();\n this.triggerKeyboardMove(event, 0, -1);\n }\n\n @HostListener('keydown.ArrowDown', ['$event'])\n protected onArrowDown(event: KeyboardEvent): void {\n event.preventDefault();\n event.stopPropagation();\n this.triggerKeyboardMove(event, 0, 1);\n }\n\n @HostListener('keydown.ArrowLeft', ['$event'])\n protected onArrowLeft(event: KeyboardEvent): void {\n event.preventDefault();\n event.stopPropagation();\n this.triggerKeyboardMove(event, -1, 0);\n }\n\n @HostListener('keydown.ArrowRight', ['$event'])\n protected onArrowRight(event: KeyboardEvent): void {\n event.preventDefault();\n event.stopPropagation();\n this.triggerKeyboardMove(event, 1, 0);\n }\n}\n\ninterface NgpMoveBaseEvent {\n /**\n * Whether the event was triggered by a mouse or keyboard event.\n */\n pointerType: PointerType;\n /**\n * Whether the shift key was pressed during the event.\n */\n shiftKey: boolean;\n /**\n * Whether the control key was pressed during the event.\n */\n ctrlKey: boolean;\n /**\n * Whether the meta key was pressed during the event.\n */\n metaKey: boolean;\n /**\n * Whether the alt key was pressed during the event.\n */\n altKey: boolean;\n}\n\nexport type NgpMoveStartEvent = NgpMoveBaseEvent;\nexport type NgpMoveEndEvent = NgpMoveBaseEvent;\n\nexport interface NgpMoveEvent extends NgpMoveBaseEvent {\n /**\n * The amount of pixels moved in the x-axis.\n */\n deltaX: number;\n /**\n * The amount of pixels moved in the y-axis.\n */\n deltaY: number;\n}\n\nexport type PointerType = 'mouse' | 'pen' | 'touch' | 'keyboard' | 'virtual';\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport { NgpHover } from './hover/hover.directive';\nexport { NgpHoverToken, injectHover } from './hover/hover.token';\nexport { NgpFocus } from './focus/focus.directive';\nexport { NgpFocusToken } from './focus/focus.token';\nexport { NgpFocusVisible } from './focus-visible/focus-visible.directive';\nexport { NgpFocusVisibleToken } from './focus-visible/focus-visible.token';\nexport { NgpPress } from './press/press.directive';\nexport { NgpPressToken } from './press/press.token';\nexport { NgpMove } from './move/move.directive';\nexport { NgpMoveToken } from './move/move.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;AAMG;MAIU,aAAa,GAAG,IAAI,cAAc,CAAW,eAAe,EAAE;AAE3E;;;AAGG;SACa,WAAW,GAAA;AACzB,IAAA,OAAO,MAAM,C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UAAA,EAAA,EAAA,gBAAA,EAAA,YAAA,EAAA,EAAA,EAAA,SAAA,EALP,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAKjD,OAAO,EAAA,UAAA,EAAA,CAAA;kBATnB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,QAAQ,EAAE,SAAS;oBACnB,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAS,OAAA,EAAE,CAAC;AAC5D,oBAAA,IAAI,EAAE;AACJ,wBAAA,kBAAkB,EAAE,YAAY;AACjC,qBAAA;AACF,iBAAA,CAAA;8BA0HW,aAAa,EAAA,CAAA;sBADtB,YAAY;uBAAC,aAAa,EAAE,CAAC,QAAQ,CAAC,CAAA;gBA0F7B,SAAS,EAAA,CAAA;sBADlB,YAAY;uBAAC,iBAAiB,EAAE,CAAC,QAAQ,CAAC,CAAA;gBAQjC,WAAW,EAAA,CAAA;sBADpB,YAAY;uBAAC,mBAAmB,EAAE,CAAC,QAAQ,CAAC,CAAA;gBAQnC,WAAW,EAAA,CAAA;sBADpB,YAAY;uBAAC,mBAAmB,EAAE,CAAC,QAAQ,CAAC,CAAA;gBAQnC,YAAY,EAAA,CAAA;sBADrB,YAAY;uBAAC,oBAAoB,EAAE,CAAC,QAAQ,CAAC,CAAA;;;ACjQhD;;;;;;AAMG;;ACNH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-primitives-interactions.mjs","sources":["../../../../packages/ng-primitives/interactions/src/hover/hover.token.ts","../../../../packages/ng-primitives/interactions/src/hover/hover.directive.ts","../../../../packages/ng-primitives/interactions/src/focus/focus.token.ts","../../../../packages/ng-primitives/interactions/src/focus/focus.directive.ts","../../../../packages/ng-primitives/interactions/src/focus-visible/focus-visible.token.ts","../../../../packages/ng-primitives/interactions/src/focus-visible/focus-visible.directive.ts","../../../../packages/ng-primitives/interactions/src/press/press.token.ts","../../../../packages/ng-primitives/interactions/src/press/press.directive.ts","../../../../packages/ng-primitives/interactions/src/move/move.token.ts","../../../../packages/ng-primitives/interactions/src/move/move.directive.ts","../../../../packages/ng-primitives/interactions/src/index.ts","../../../../packages/ng-primitives/interactions/src/ng-primitives-interactions.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpHover } from './hover.directive';\n\nexport const NgpHoverToken = new InjectionToken<NgpHover>('NgpHoverToken');\n\n/**\n * Inject the Hover directive instance\n * @returns Hover directive instance\n */\nexport function injectHover(): NgpHover {\n return inject(NgpHoverToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport type { BooleanInput } from '@angular/cdk/coercion';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n Directive,\n HostListener,\n Injectable,\n OnChanges,\n PLATFORM_ID,\n SimpleChanges,\n booleanAttribute,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { injectDisabled } from 'ng-primitives/internal';\nimport { NgpHoverToken } from './hover.token';\n\n/**\n * We use a service here as this value is a singleton\n * and allows us to register the dom events once.\n */\n@Injectable({\n providedIn: 'root',\n})\nclass GlobalPointerEvents {\n /**\n * Whether global mouse events should be ignored.\n */\n ignoreEmulatedMouseEvents: boolean = false;\n\n /**\n * Access the document.\n */\n private readonly document = inject(DOCUMENT);\n\n /**\n * Determine the platform id.\n */\n private readonly platformId = inject(PLATFORM_ID);\n\n constructor() {\n // we only want to setup events on the client\n if (isPlatformBrowser(this.platformId)) {\n this.setupGlobalTouchEvents();\n }\n }\n\n private setupGlobalTouchEvents(): void {\n this.document.addEventListener('pointerup', this.handleGlobalPointerEvent.bind(this));\n this.document.addEventListener('touchend', this.setGlobalIgnoreEmulatedMouseEvents.bind(this));\n }\n\n private setGlobalIgnoreEmulatedMouseEvents(): void {\n this.ignoreEmulatedMouseEvents = true;\n // Clear globalIgnoreEmulatedMouseEvents after a short timeout. iOS fires onPointerEnter\n // with pointerType=\"mouse\" immediately after onPointerUp and before onFocus. On other\n // devices that don't have this quirk, we don't want to ignore a mouse hover sometime in\n // the distant future because a user previously touched the element.\n setTimeout(() => (this.ignoreEmulatedMouseEvents = false), 50);\n }\n\n private handleGlobalPointerEvent(event: PointerEvent): void {\n if (event.pointerType === 'touch') {\n this.setGlobalIgnoreEmulatedMouseEvents();\n }\n }\n}\n\n/**\n * A directive for normalizing hover events across the different browsers and devices.\n *\n * This is an Angular port of the useHover hook from\n * react-aria: https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/interactions/src/useHover.ts\n */\n@Directive({\n standalone: true,\n selector: '[ngpHover]',\n exportAs: 'ngpHover',\n providers: [{ provide: NgpHoverToken, useExisting: NgpHover }],\n host: {\n '[attr.data-hover]': 'hovered()',\n },\n})\nexport class NgpHover implements OnChanges {\n /**\n * Access the global pointer events handler.\n */\n private readonly globalPointerEvents = inject(GlobalPointerEvents);\n\n /**\n * Whether hoving should be disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpHoverDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the disabled state from any parent.\n */\n private readonly isDisabled = injectDisabled(this.disabled);\n\n /**\n * Store the current hover state.\n */\n protected hovered = signal<boolean>(false);\n\n /**\n * Whether this element should ignore emulated mouse events.\n */\n private ignoreEmulatedMouseEvents: boolean = false;\n\n /**\n * Emit an event when hovering starts.\n */\n readonly hoverStart = output<void>({ alias: 'ngpHoverStart' });\n\n /**\n * Emit an event when hovering ends.\n */\n readonly hoverEnd = output<void>({ alias: 'ngpHoverEnd' });\n\n /**\n * Emit an event when the hover state changes.\n */\n readonly hoverChange = output<boolean>({ alias: 'ngpHover' });\n\n ngOnChanges(changes: SimpleChanges): void {\n if ('disabled' in changes) {\n // if the component is suddenly disabled and is currently hovered\n // switch to the unhovered state.\n if (changes['disabled'].currentValue === true) {\n this.onHoverEnd('mouse');\n }\n }\n }\n\n /**\n * Trigger the hover start events.\n * @param event\n * @param pointerType\n */\n private onHoverStart(event: Event, pointerType: string): void {\n if (\n this.isDisabled() ||\n pointerType === 'touch' ||\n this.hovered() ||\n !(event.currentTarget as Element)?.contains(event.target as Element)\n ) {\n return;\n }\n\n this.hovered.set(true);\n this.hoverStart.emit();\n this.hoverChange.emit(true);\n }\n\n /**\n * Trigger the hover end events.\n * @param pointerType\n */\n private onHoverEnd(pointerType: string): void {\n if (pointerType === 'touch' || !this.hovered()) {\n return;\n }\n\n this.hovered.set(false);\n this.hoverEnd.emit();\n this.hoverChange.emit(false);\n }\n\n @HostListener('pointerenter', ['$event'])\n protected onPointerEnter(event: PointerEvent): void {\n if (this.globalPointerEvents.ignoreEmulatedMouseEvents && event.pointerType === 'mouse') {\n return;\n }\n\n this.onHoverStart(event, event.pointerType);\n }\n\n @HostListener('pointerleave', ['$event'])\n protected onPointerLeave(event: PointerEvent): void {\n if (!this.isDisabled() && (event.currentTarget as Element)?.contains(event.target as Element)) {\n this.onHoverEnd(event.pointerType);\n }\n }\n\n @HostListener('touchstart')\n protected onTouchStart(): void {\n this.ignoreEmulatedMouseEvents = true;\n }\n\n @HostListener('mouseenter', ['$event'])\n protected onMouseEnter(event: MouseEvent): void {\n if (!this.ignoreEmulatedMouseEvents && !this.globalPointerEvents.ignoreEmulatedMouseEvents) {\n this.onHoverStart(event, 'mouse');\n }\n\n this.ignoreEmulatedMouseEvents = false;\n }\n\n @HostListener('mouseleave', ['$event'])\n protected onMouseLeave(event: MouseEvent): void {\n if (!this.isDisabled() && (event.currentTarget as Element)?.contains(event.target as Element)) {\n this.onHoverEnd('mouse');\n }\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpFocus } from './focus.directive';\n\nexport const NgpFocusToken = new InjectionToken<NgpFocus>('NgpFocusToken');\n\n/**\n * Inject the Focus directive instance\n */\nexport function injectFocus(): NgpFocus {\n return inject(NgpFocusToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, HostListener, booleanAttribute, input, output, signal } from '@angular/core';\nimport { injectDisabled } from 'ng-primitives/internal';\nimport { NgpFocusToken } from './focus.token';\n\n/**\n * This was inspired by the React Aria useFocus hook.\n * https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/interactions/src/useFocus.ts#L20\n */\n@Directive({\n standalone: true,\n selector: '[ngpFocus]',\n exportAs: 'ngpFocus',\n providers: [{ provide: NgpFocusToken, useExisting: NgpFocus }],\n host: {\n '[attr.data-focus]': 'isFocused()',\n },\n})\nexport class NgpFocus {\n /**\n * Whether the element is currently focused.\n */\n protected isFocused = signal<boolean>(false);\n\n /**\n * Whether listening for focus events is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpFocusDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the disabled state from any parent.\n */\n private readonly isDisabled = injectDisabled(this.disabled);\n\n /**\n * Emit when the focus state changes.\n */\n readonly focus = output<boolean>({ alias: 'ngpFocus' });\n\n /**\n * Listen for focus events.\n * @param event\n */\n @HostListener('focus', ['$event'])\n protected onFocus(event: FocusEvent) {\n if (this.isDisabled()) {\n return;\n }\n\n const ownerDocument = (event.target as HTMLElement)?.ownerDocument ?? document;\n\n // ensure this element is still focused\n if (ownerDocument.activeElement === event.target && event.currentTarget === event.target) {\n this.focus.emit(true);\n this.isFocused.set(true);\n }\n }\n\n /**\n * Listen for blur events.\n * @param event\n */\n @HostListener('blur', ['$event'])\n protected onBlur(event: FocusEvent) {\n if (this.isDisabled()) {\n return;\n }\n\n if (event.currentTarget === event.target) {\n this.focus.emit(false);\n this.isFocused.set(false);\n }\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpFocusVisible } from './focus-visible.directive';\n\nexport const NgpFocusVisibleToken = new InjectionToken<NgpFocusVisible>('NgpFocusVisibleToken');\n\n/**\n * Inject the FocusVisible directive instance\n */\nexport function injectFocusVisible(): NgpFocusVisible {\n return inject(NgpFocusVisibleToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport {\n Directive,\n ElementRef,\n HostListener,\n booleanAttribute,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { injectDisabled } from 'ng-primitives/internal';\nimport { NgpFocusVisibleToken } from './focus-visible.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpFocusVisible]',\n exportAs: 'ngpFocusVisible',\n providers: [{ provide: NgpFocusVisibleToken, useExisting: NgpFocusVisible }],\n host: {\n '[attr.data-focus-visible]': 'isFocused()',\n },\n})\nexport class NgpFocusVisible {\n /**\n * Access the element that the directive is applied to.\n */\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Access the focus monitor.\n */\n private readonly focusMonitor = inject(FocusMonitor);\n\n /**\n * Whether focus events are listened to.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpFocusVisibleDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the disabled state from any parent.\n */\n private readonly isDisabled = injectDisabled(this.disabled);\n\n /**\n * Emit when the element is visually focused.\n */\n readonly focusChange = output<boolean>({\n alias: 'ngpFocusVisible',\n });\n\n /**\n * Whether the element is currently focused.\n */\n protected readonly isFocused = signal<boolean>(false);\n\n constructor() {\n this.focusMonitor\n .monitor(this.elementRef.nativeElement)\n .pipe(takeUntilDestroyed())\n .subscribe(origin => this.onFocus(origin));\n }\n\n private onFocus(origin: FocusOrigin): void {\n if (this.isDisabled() || this.isFocused()) {\n return;\n }\n\n // for some elements the focus visible state should always appear on focus\n if (this.alwaysShowFocus()) {\n this.isFocused.set(true);\n this.focusChange.emit(true);\n return;\n }\n\n // if the focus origin is keyboard, then the focus is visible\n if (origin === 'keyboard') {\n this.isFocused.set(true);\n this.focusChange.emit(true);\n return;\n }\n }\n\n /**\n * Listen for blur events.\n */\n @HostListener('blur')\n protected onBlur(): void {\n if (this.isDisabled() || !this.isFocused()) {\n return;\n }\n\n this.isFocused.set(false);\n this.focusChange.emit(false);\n }\n\n private alwaysShowFocus(): boolean {\n const nonTextInputTypes = [\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset',\n ];\n\n // if this is an input element and it is a text input\n if (\n this.elementRef.nativeElement instanceof HTMLInputElement &&\n !nonTextInputTypes.includes(this.elementRef.nativeElement.type)\n ) {\n return true;\n }\n\n // if this is a textarea\n if (this.elementRef.nativeElement instanceof HTMLTextAreaElement) {\n return true;\n }\n\n // if this is an element with contenteditable\n if (\n this.elementRef.nativeElement.isContentEditable ||\n this.elementRef.nativeElement.hasAttribute('contenteditable')\n ) {\n return true;\n }\n\n return false;\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpPress } from './press.directive';\n\nexport const NgpPressToken = new InjectionToken<NgpPress>('NgpPressToken');\n\n/**\n * Inject the Press directive instance\n */\nexport function injectPress(): NgpPress {\n return inject(NgpPressToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport {\n Directive,\n ElementRef,\n HostListener,\n booleanAttribute,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { injectDisabled } from 'ng-primitives/internal';\nimport { injectDisposables } from 'ng-primitives/utils';\nimport { NgpPressToken } from './press.token';\n\n/**\n * This was inpsired by Headless UI's active-press hook:\n * https://github.com/tailwindlabs/headlessui/blob/main/packages/%40headlessui-react/src/hooks/use-active-press.tsx\n */\n\n@Directive({\n standalone: true,\n selector: '[ngpPress]',\n exportAs: 'ngpPress',\n providers: [{ provide: NgpPressToken, useExisting: NgpPress }],\n host: {\n '[attr.data-press]': 'pressed()',\n },\n})\nexport class NgpPress {\n /**\n * Access the HTML Element.\n */\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Access the disposables.\n */\n private readonly disposables = injectDisposables();\n\n /**\n * Whether listening for press events is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpPressDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the disabled state from any parent.\n */\n private readonly isDisabled = injectDisabled(this.disabled);\n\n /**\n * Emit when the press begins.\n */\n readonly pressStart = output<void>({\n alias: 'ngpPressStart',\n });\n\n /**\n * Emit when the press ends.\n */\n readonly pressEnd = output<void>({\n alias: 'ngpPressEnd',\n });\n\n /**\n * Emit when the press changes.\n */\n readonly pressChange = output<boolean>({\n alias: 'ngpPress',\n });\n\n /**\n * The press state.\n */\n protected readonly pressed = signal(false);\n\n /**\n * Reset the press state.\n */\n private reset(): void {\n // if we are not pressing, then do nothing\n if (!this.pressed()) {\n return;\n }\n\n // clear any existing disposables\n this.disposableListeners.forEach(dispose => dispose());\n this.pressed.set(false);\n this.pressEnd.emit();\n this.pressChange.emit(false);\n }\n\n /**\n * Store the list of disposables.\n */\n private disposableListeners: (() => void)[] = [];\n\n @HostListener('pointerdown')\n protected onPointerDown(): void {\n if (this.isDisabled()) {\n return;\n }\n\n // clear any existing disposables\n this.disposableListeners.forEach(dispose => dispose());\n\n // update the press state\n this.pressed.set(true);\n this.pressStart.emit();\n this.pressChange.emit(true);\n\n // setup global event listeners to catch events on elements outside the directive\n const ownerDocument = this.element.nativeElement.ownerDocument ?? document;\n\n // if the pointer up event happens on any elements, then we are no longer pressing on this element\n const pointerUp = this.disposables.addEventListener(\n ownerDocument,\n 'pointerup',\n this.reset.bind(this),\n false,\n );\n\n // Instead of relying on the `pointerleave` event, which is not consistently called on iOS Safari,\n // we use the `pointermove` event to determine if we are still \"pressing\".\n // By checking if the target is still within the element, we can determine if the press is ongoing.\n const pointerMove = this.disposables.addEventListener(\n ownerDocument,\n 'pointermove',\n this.onPointerMove.bind(this) as EventListener,\n false,\n );\n\n // if the pointer is cancelled, then we are no longer pressing on this element\n const pointerCancel = this.disposables.addEventListener(\n ownerDocument,\n 'pointercancel',\n this.reset.bind(this),\n false,\n );\n\n this.disposableListeners = [pointerUp, pointerMove, pointerCancel];\n }\n\n private onPointerMove(event: PointerEvent): void {\n if (\n this.element.nativeElement !== event.target &&\n !this.element.nativeElement.contains(event.target as Node)\n ) {\n this.reset();\n }\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpMove } from './move.directive';\n\nexport const NgpMoveToken = new InjectionToken<NgpMove>('NgpMoveToken');\n\n/**\n * Inject the Move directive instance\n */\nexport function injectMove(): NgpMove {\n return inject(NgpMoveToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, HostListener, input, output, signal } from '@angular/core';\nimport { injectDisabled } from 'ng-primitives/internal';\nimport { injectDisposables } from 'ng-primitives/utils';\nimport { NgpMoveToken } from './move.token';\n\n/**\n * Inspired by react-aria useMove hook:\n * https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/interactions/src/useMove.ts\n */\n\n@Directive({\n standalone: true,\n selector: '[ngpMove]',\n exportAs: 'ngpMove',\n providers: [{ provide: NgpMoveToken, useExisting: NgpMove }],\n host: {\n '[attr.data-move]': 'isMoving()',\n },\n})\nexport class NgpMove {\n /**\n * Access the disposable helper.\n */\n private readonly disposables = injectDisposables();\n\n /**\n * Whether movement is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpMoveDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the disabled state from any parent.\n */\n private readonly isDisabled = injectDisabled(this.disabled);\n\n /**\n * Emit when the move event begins.\n */\n readonly start = output<NgpMoveStartEvent>({\n alias: 'ngpMoveStart',\n });\n\n /**\n * Emit when the element is moved.\n */\n readonly move = output<NgpMoveEvent>({\n alias: 'ngpMove',\n });\n\n /**\n * Emit when the move event ends.\n */\n readonly end = output<NgpMoveEndEvent>({\n alias: 'ngpMoveEnd',\n });\n\n /**\n * Whether the element is currently being moved.\n */\n private isMoving = signal<boolean>(false);\n\n /**\n * Store the last x position of the element.\n */\n private x: number | null = null;\n\n /**\n * Store the last y position of the element.\n */\n private y: number | null = null;\n\n /**\n * Store the id of the last pointer.\n */\n private pointerId: number | null = null;\n\n /**\n * Store the disposable event listeners.\n */\n private disposableListeners: (() => void)[] = [];\n\n /**\n * Handle a move start.\n */\n private onMoveStart(event: PointerEvent | KeyboardEvent, pointerType: PointerType): void {\n this.start.emit({\n pointerType,\n shiftKey: event.shiftKey,\n ctrlKey: event.ctrlKey,\n metaKey: event.metaKey,\n altKey: event.altKey,\n });\n this.isMoving.set(true);\n }\n\n /**\n * Handle a move event.\n */\n private onMove(\n event: PointerEvent | KeyboardEvent,\n pointerType: PointerType,\n deltaX: number,\n deltaY: number,\n ): void {\n if (deltaX === 0 && deltaY === 0) {\n return;\n }\n\n this.move.emit({\n deltaX,\n deltaY,\n pointerType,\n shiftKey: event.shiftKey,\n ctrlKey: event.ctrlKey,\n metaKey: event.metaKey,\n altKey: event.altKey,\n });\n }\n\n /**\n * Handle a move end.\n */\n private onMoveEnd(event: PointerEvent | KeyboardEvent, pointerType: PointerType): void {\n this.end.emit({\n pointerType,\n shiftKey: event.shiftKey,\n ctrlKey: event.ctrlKey,\n metaKey: event.metaKey,\n altKey: event.altKey,\n });\n this.isMoving.set(false);\n }\n\n /**\n * Handle the pointer down event.\n */\n @HostListener('pointerdown', ['$event'])\n protected onPointerDown(event: PointerEvent): void {\n // ignore right-click or additional pointers\n if (event.button !== 0 || this.pointerId !== null || this.isDisabled()) {\n return;\n }\n\n // prevent the default behavior\n event.preventDefault();\n event.stopPropagation();\n\n this.onMoveStart(event, event.pointerType as PointerType);\n\n // store the pointer id and initial position\n this.pointerId = event.pointerId;\n this.x = event.pageX;\n this.y = event.pageY;\n\n // add global event listeners\n const pointerMove = this.disposables.addEventListener(\n window,\n 'pointermove',\n this.onPointerMove.bind(this) as EventListener,\n false,\n );\n\n const pointerUp = this.disposables.addEventListener(\n window,\n 'pointerup',\n this.onPointerUp.bind(this) as EventListener,\n false,\n );\n\n const pointerCancel = this.disposables.addEventListener(\n window,\n 'pointercancel',\n this.onPointerUp.bind(this) as EventListener,\n false,\n );\n\n // store the disposable event listeners\n this.disposableListeners = [pointerMove, pointerUp, pointerCancel];\n }\n\n /**\n * Handle the pointer up event.\n */\n protected onPointerUp(event: PointerEvent): void {\n if (this.pointerId !== event.pointerId) {\n return;\n }\n\n const pointerType = (event.pointerType ?? 'mouse') as PointerType;\n this.onMoveEnd(event, pointerType);\n this.pointerId = null;\n this.disposableListeners.forEach(dispose => dispose());\n }\n\n /**\n * Handle the pointer move event.\n */\n protected onPointerMove(event: PointerEvent): void {\n if (this.pointerId !== event.pointerId) {\n return;\n }\n\n // Problems with PointerEvent#movementX/movementY:\n // 1. it is always 0 on macOS Safari.\n // 2. On Chrome Android, it's scaled by devicePixelRatio, but not on Chrome macOS\n this.onMove(\n event,\n event.pointerType as PointerType,\n event.pageX - (this.x ?? 0),\n event.pageY - (this.y ?? 0),\n );\n this.x = event.pageX;\n this.y = event.pageY;\n }\n\n private triggerKeyboardMove(event: KeyboardEvent, deltaX: number, deltaY: number): void {\n if (this.isDisabled()) {\n return;\n }\n\n this.onMoveStart(event, 'keyboard');\n this.onMove(event, 'keyboard', deltaX, deltaY);\n this.onMoveEnd(event, 'keyboard');\n }\n\n @HostListener('keydown.ArrowUp', ['$event'])\n protected onArrowUp(event: KeyboardEvent): void {\n event.preventDefault();\n event.stopPropagation();\n this.triggerKeyboardMove(event, 0, -1);\n }\n\n @HostListener('keydown.ArrowDown', ['$event'])\n protected onArrowDown(event: KeyboardEvent): void {\n event.preventDefault();\n event.stopPropagation();\n this.triggerKeyboardMove(event, 0, 1);\n }\n\n @HostListener('keydown.ArrowLeft', ['$event'])\n protected onArrowLeft(event: KeyboardEvent): void {\n event.preventDefault();\n event.stopPropagation();\n this.triggerKeyboardMove(event, -1, 0);\n }\n\n @HostListener('keydown.ArrowRight', ['$event'])\n protected onArrowRight(event: KeyboardEvent): void {\n event.preventDefault();\n event.stopPropagation();\n this.triggerKeyboardMove(event, 1, 0);\n }\n}\n\ninterface NgpMoveBaseEvent {\n /**\n * Whether the event was triggered by a mouse or keyboard event.\n */\n pointerType: PointerType;\n /**\n * Whether the shift key was pressed during the event.\n */\n shiftKey: boolean;\n /**\n * Whether the control key was pressed during the event.\n */\n ctrlKey: boolean;\n /**\n * Whether the meta key was pressed during the event.\n */\n metaKey: boolean;\n /**\n * Whether the alt key was pressed during the event.\n */\n altKey: boolean;\n}\n\nexport type NgpMoveStartEvent = NgpMoveBaseEvent;\nexport type NgpMoveEndEvent = NgpMoveBaseEvent;\n\nexport interface NgpMoveEvent extends NgpMoveBaseEvent {\n /**\n * The amount of pixels moved in the x-axis.\n */\n deltaX: number;\n /**\n * The amount of pixels moved in the y-axis.\n */\n deltaY: number;\n}\n\nexport type PointerType = 'mouse' | 'pen' | 'touch' | 'keyboard' | 'virtual';\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport { NgpHover } from './hover/hover.directive';\nexport { NgpHoverToken, injectHover } from './hover/hover.token';\nexport { NgpFocus } from './focus/focus.directive';\nexport { NgpFocusToken } from './focus/focus.token';\nexport { NgpFocusVisible } from './focus-visible/focus-visible.directive';\nexport { NgpFocusVisibleToken } from './focus-visible/focus-visible.token';\nexport { NgpPress } from './press/press.directive';\nexport { NgpPressToken } from './press/press.token';\nexport { NgpMove } from './move/move.directive';\nexport { NgpMoveToken } from './move/move.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;AAMG;MAIU,aAAa,GAAG,IAAI,cAAc,CAAW,eAAe,EAAE;AAE3E;;;AAGG;SACa,WAAW,GAAA;AACzB,IAAA,OAAO,MAAM,CAAC,aAAa,CAAC,CAAC;AAC/B;;ACOA;;;AAGG;AACH,MAGM,mBAAmB,CAAA;AAgBvB,IAAA,WAAA,GAAA;AAfA;;AAEG;QACH,IAAyB,CAAA,yBAAA,GAAY,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A,EAAA,CAAA,SAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAKjD,OAAO,EAAA,UAAA,EAAA,CAAA;kBATnB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,QAAQ,EAAE,SAAS;oBACnB,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAS,OAAA,EAAE,CAAC;AAC5D,oBAAA,IAAI,EAAE;AACJ,wBAAA,kBAAkB,EAAE,YAAY;AACjC,qBAAA;AACF,iBAAA,CAAA;8BA0HW,aAAa,EAAA,CAAA;sBADtB,YAAY;uBAAC,aAAa,EAAE,CAAC,QAAQ,CAAC,CAAA;gBA0F7B,SAAS,EAAA,CAAA;sBADlB,YAAY;uBAAC,iBAAiB,EAAE,CAAC,QAAQ,CAAC,CAAA;gBAQjC,WAAW,EAAA,CAAA;sBADpB,YAAY;uBAAC,mBAAmB,EAAE,CAAC,QAAQ,CAAC,CAAA;gBAQnC,WAAW,EAAA,CAAA;sBADpB,YAAY;uBAAC,mBAAmB,EAAE,CAAC,QAAQ,CAAC,CAAA;gBAQnC,YAAY,EAAA,CAAA;sBADrB,YAAY;uBAAC,oBAAoB,EAAE,CAAC,QAAQ,CAAC,CAAA;;;ACjQhD;;;;;;AAMG;;ACNH;;AAEG;;;;"}
|
|
@@ -6,7 +6,7 @@ import { isPlatformBrowser } from '@angular/common';
|
|
|
6
6
|
* Copyright © 2024 Angular Primitives.
|
|
7
7
|
* https://github.com/ng-primitives/ng-primitives
|
|
8
8
|
*
|
|
9
|
-
* This source code is licensed under the
|
|
9
|
+
* This source code is licensed under the Apache 2.0 license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
12
|
const NgpDisabledToken = new InjectionToken('NgpDisabledToken');
|
|
@@ -24,7 +24,7 @@ function injectDisabled(disabled = signal(false)) {
|
|
|
24
24
|
* Copyright © 2024 Angular Primitives.
|
|
25
25
|
* https://github.com/ng-primitives/ng-primitives
|
|
26
26
|
*
|
|
27
|
-
* This source code is licensed under the
|
|
27
|
+
* This source code is licensed under the Apache 2.0 license found in the
|
|
28
28
|
* LICENSE file in the root directory of this source tree.
|
|
29
29
|
*/
|
|
30
30
|
const NgpOrientationToken = new InjectionToken('NgpOrientationToken');
|
|
@@ -42,7 +42,7 @@ function injectOrientation(orientation = signal('horizontal')) {
|
|
|
42
42
|
* Copyright © 2024 Angular Primitives.
|
|
43
43
|
* https://github.com/ng-primitives/ng-primitives
|
|
44
44
|
*
|
|
45
|
-
* This source code is licensed under the
|
|
45
|
+
* This source code is licensed under the Apache 2.0 license found in the
|
|
46
46
|
* LICENSE file in the root directory of this source tree.
|
|
47
47
|
*/
|
|
48
48
|
/**
|
|
@@ -120,7 +120,7 @@ function injectStyleInjector() {
|
|
|
120
120
|
* Copyright © 2024 Angular Primitives.
|
|
121
121
|
* https://github.com/ng-primitives/ng-primitives
|
|
122
122
|
*
|
|
123
|
-
* This source code is licensed under the
|
|
123
|
+
* This source code is licensed under the Apache 2.0 license found in the
|
|
124
124
|
* LICENSE file in the root directory of this source tree.
|
|
125
125
|
*/
|
|
126
126
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-internal.mjs","sources":["../../../../packages/ng-primitives/internal/src/disabled/disabled.ts","../../../../packages/ng-primitives/internal/src/orientation/orientation.ts","../../../../packages/ng-primitives/internal/src/style-injector/style-injector.ts","../../../../packages/ng-primitives/internal/src/index.ts","../../../../packages/ng-primitives/internal/src/ng-primitives-internal.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the
|
|
1
|
+
{"version":3,"file":"ng-primitives-internal.mjs","sources":["../../../../packages/ng-primitives/internal/src/disabled/disabled.ts","../../../../packages/ng-primitives/internal/src/orientation/orientation.ts","../../../../packages/ng-primitives/internal/src/style-injector/style-injector.ts","../../../../packages/ng-primitives/internal/src/index.ts","../../../../packages/ng-primitives/internal/src/ng-primitives-internal.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { inject, InjectionToken, signal, Signal } from '@angular/core';\n\nexport const NgpDisabledToken = new InjectionToken<NgpCanDisable>('NgpDisabledToken');\n\nexport interface NgpCanDisable {\n /**\n * Whether the element is disabled.\n */\n readonly disabled: Signal<boolean>;\n}\n\n/**\n * Determine if we are in a disabled context.\n * @param disabled The disabled signal for the local context.\n * @returns The disabled signal.\n */\nexport function injectDisabled(\n disabled: Signal<boolean> = signal<boolean>(false),\n): Signal<boolean> {\n const provider = inject(NgpDisabledToken, { optional: true });\n\n return provider ? provider.disabled : disabled;\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { inject, InjectionToken, signal, Signal } from '@angular/core';\n\nexport const NgpOrientationToken = new InjectionToken<NgpCanOrientate>('NgpOrientationToken');\n\nexport interface NgpCanOrientate {\n /**\n * The desired orientation.\n */\n readonly orientation: Signal<NgpOrientation>;\n}\n\n/**\n * Determine if we are in a orientation context.\n * @param orientation The orientation signal for the local context.\n * @returns The orientation signal.\n */\nexport function injectOrientation(\n orientation: Signal<NgpOrientation> = signal<NgpOrientation>('horizontal'),\n): Signal<NgpOrientation> {\n const provider = inject(NgpOrientationToken, { optional: true });\n\n return provider ? provider.orientation : orientation;\n}\n\nexport type NgpOrientation = 'horizontal' | 'vertical';\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { isPlatformBrowser } from '@angular/common';\nimport { inject, Injectable, PLATFORM_ID } from '@angular/core';\n\n/**\n * A utility service for injecting styles into the document.\n * Angular doesn't allow directives to specify styles, only components.\n * As we ship directives, occasionally we need to associate styles with them.\n * This service allows us to programmatically inject styles into the document.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class StyleInjector {\n /**\n * Detect the platform.\n */\n private readonly platformId = inject(PLATFORM_ID);\n\n /**\n * Store the map of style elements with their unique identifiers.\n */\n private readonly styleElements = new Map<string, HTMLStyleElement>();\n\n constructor() {\n if (isPlatformBrowser(this.platformId)) {\n this.collectServerStyles();\n }\n }\n\n /**\n * Inject a style into the document.\n * @param id The unique identifier for the style.\n * @param style The style to inject.\n */\n add(id: string, style: string): void {\n if (this.styleElements.has(id)) {\n return;\n }\n\n const styleElement = document.createElement('style');\n styleElement.setAttribute('data-ngp-style', id);\n styleElement.textContent = style;\n\n document.head.appendChild(styleElement);\n this.styleElements.set(id, styleElement);\n }\n\n /**\n * Remove a style from the document.\n * @param id The unique identifier for the style.\n */\n remove(id: string): void {\n const styleElement = this.styleElements.get(id);\n\n if (styleElement) {\n document.head.removeChild(styleElement);\n this.styleElements.delete(id);\n }\n }\n\n /**\n * Collect any styles that were rendered by the server.\n */\n private collectServerStyles(): void {\n const styleElements = document.querySelectorAll<HTMLStyleElement>('style[data-ngp-style]');\n\n styleElements.forEach(styleElement => {\n const id = styleElement.getAttribute('data-ngp-style');\n\n if (id) {\n this.styleElements.set(id, styleElement);\n }\n });\n }\n}\n\nexport function injectStyleInjector(): StyleInjector {\n return inject(StyleInjector);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport * from './disabled/disabled';\nexport * from './orientation/orientation';\nexport * from './style-injector/style-injector';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;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AHzB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;SAiEe,mBAAmB,GAAA;AACjC,IAAA,OAAO,MAAM,CAAC,aAAa,CAAC,CAAC;AAC/B;;ACrFA;;;;;;AAMG;;ACNH;;AAEG;;;;"}
|
|
@@ -5,7 +5,7 @@ import { InjectionToken, inject, Directive, input, numberAttribute, computed } f
|
|
|
5
5
|
* Copyright © 2024 Angular Primitives.
|
|
6
6
|
* https://github.com/ng-primitives/ng-primitives
|
|
7
7
|
*
|
|
8
|
-
* This source code is licensed under the
|
|
8
|
+
* This source code is licensed under the Apache 2.0 license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
11
|
const NgpProgressToken = new InjectionToken('NgpProgressDirective');
|
|
@@ -20,7 +20,7 @@ function injectProgress() {
|
|
|
20
20
|
* Copyright © 2024 Angular Primitives.
|
|
21
21
|
* https://github.com/ng-primitives/ng-primitives
|
|
22
22
|
*
|
|
23
|
-
* This source code is licensed under the
|
|
23
|
+
* This source code is licensed under the Apache 2.0 license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
25
|
*/
|
|
26
26
|
class NgpProgressIndicator {
|
|
@@ -107,7 +107,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
|
|
|
107
107
|
* Copyright © 2024 Angular Primitives.
|
|
108
108
|
* https://github.com/ng-primitives/ng-primitives
|
|
109
109
|
*
|
|
110
|
-
* This source code is licensed under the
|
|
110
|
+
* This source code is licensed under the Apache 2.0 license found in the
|
|
111
111
|
* LICENSE file in the root directory of this source tree.
|
|
112
112
|
*/
|
|
113
113
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-progress.mjs","sources":["../../../../packages/ng-primitives/progress/src/progress/progress.token.ts","../../../../packages/ng-primitives/progress/src/progress-indicator/progress-indicator.directive.ts","../../../../packages/ng-primitives/progress/src/progress/progress.directive.ts","../../../../packages/ng-primitives/progress/src/index.ts","../../../../packages/ng-primitives/progress/src/ng-primitives-progress.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the
|
|
1
|
+
{"version":3,"file":"ng-primitives-progress.mjs","sources":["../../../../packages/ng-primitives/progress/src/progress/progress.token.ts","../../../../packages/ng-primitives/progress/src/progress-indicator/progress-indicator.directive.ts","../../../../packages/ng-primitives/progress/src/progress/progress.directive.ts","../../../../packages/ng-primitives/progress/src/index.ts","../../../../packages/ng-primitives/progress/src/ng-primitives-progress.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpProgress } from './progress.directive';\n\nexport const NgpProgressToken = new InjectionToken<NgpProgress>('NgpProgressDirective');\n\n/**\n *\n */\nexport function injectProgress(): NgpProgress {\n return inject(NgpProgressToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Directive } from '@angular/core';\nimport { injectProgress } from '../progress/progress.token';\n\n@Directive({\n selector: '[ngpProgressIndicator]',\n standalone: true,\n host: {\n '[attr.data-state]': 'progress.state()',\n '[attr.data-value]': 'progress.value()',\n '[attr.data-max]': 'progress.max()',\n },\n})\nexport class NgpProgressIndicator {\n /**\n * Access the progress directive.\n */\n protected readonly progress = injectProgress();\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { NumberInput } from '@angular/cdk/coercion';\nimport { Directive, computed, input, numberAttribute } from '@angular/core';\nimport { NgpProgressToken } from './progress.token';\n\n@Directive({\n selector: '[ngpProgress]',\n standalone: true,\n providers: [{ provide: NgpProgressToken, useExisting: NgpProgress }],\n host: {\n role: 'progressbar',\n '[attr.aria-valuemax]': 'max()',\n '[attr.aria-valuemin]': '0',\n '[attr.aria-valuenow]': 'value()',\n '[attr.aria-valuetext]': 'label()',\n '[attr.data-state]': 'state()',\n '[attr.data-value]': 'value()',\n '[attr.data-max]': 'max()',\n },\n})\nexport class NgpProgress {\n /**\n * Define the progress value.\n */\n readonly value = input<number, NumberInput>(0, {\n alias: 'ngpProgressValue',\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<NgpProgressValueLabelFn>(\n (value, max) => `${Math.round((value / max) * 100)}%`,\n );\n\n /**\n * Get the state of the progress bar.\n * @returns 'indeterminate' | 'loading' | 'complete'\n * @internal\n */\n protected readonly state = computed(() =>\n this.value() == null ? 'indeterminate' : this.value() === this.max() ? 'complete' : 'loading',\n );\n\n /**\n * Get the progress value label.\n */\n protected readonly label = computed(() => this.valueLabel()(this.value(), this.max()));\n}\n\nexport type NgpProgressValueLabelFn = (value: number, max: number) => string;\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport { NgpProgressIndicator } from './progress-indicator/progress-indicator.directive';\nexport { NgpProgress, NgpProgressValueLabelFn } from './progress/progress.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;AAMG;AAII,MAAM,gBAAgB,GAAG,IAAI,cAAc,CAAc,sBAAsB,CAAC,CA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,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,aAAA,EAAA,EAAA,UAAA,EAAA,EAAA,oBAAA,EAAA,OAAA,EAAA,oBAAA,EAAA,GAAA,EAAA,oBAAA,EAAA,SAAA,EAAA,qBAAA,EAAA,SAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,eAAA,EAAA,OAAA,EAAA,EAAA,EAAA,SAAA,EAZX,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAYzD,WAAW,EAAA,UAAA,EAAA,CAAA;kBAfvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,UAAU,EAAE,IAAI;oBAChB,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAa,WAAA,EAAE,CAAC;AACpE,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,aAAa;AACnB,wBAAA,sBAAsB,EAAE,OAAO;AAC/B,wBAAA,sBAAsB,EAAE,GAAG;AAC3B,wBAAA,sBAAsB,EAAE,SAAS;AACjC,wBAAA,uBAAuB,EAAE,SAAS;AAClC,wBAAA,mBAAmB,EAAE,SAAS;AAC9B,wBAAA,mBAAmB,EAAE,SAAS;AAC9B,wBAAA,iBAAiB,EAAE,OAAO;AAC3B,qBAAA;AACF,iBAAA,CAAA;;;ACzBD;;;;;;AAMG;;ACNH;;AAEG;;;;"}
|
|
@@ -12,7 +12,7 @@ import { NgpHover, NgpPress, NgpFocusVisible } from 'ng-primitives/interactions'
|
|
|
12
12
|
* Copyright © 2024 Angular Primitives.
|
|
13
13
|
* https://github.com/ng-primitives/ng-primitives
|
|
14
14
|
*
|
|
15
|
-
* This source code is licensed under the
|
|
15
|
+
* This source code is licensed under the Apache 2.0 license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
17
|
*/
|
|
18
18
|
const NgpRadioGroupToken = new InjectionToken('NgpRadioGroupToken');
|
|
@@ -80,7 +80,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
|
|
|
80
80
|
* Copyright © 2024 Angular Primitives.
|
|
81
81
|
* https://github.com/ng-primitives/ng-primitives
|
|
82
82
|
*
|
|
83
|
-
* This source code is licensed under the
|
|
83
|
+
* This source code is licensed under the Apache 2.0 license found in the
|
|
84
84
|
* LICENSE file in the root directory of this source tree.
|
|
85
85
|
*/
|
|
86
86
|
const NgpRadioItemToken = new InjectionToken('NgpRadioItemToken');
|
|
@@ -96,7 +96,7 @@ function injectRadioItem() {
|
|
|
96
96
|
* Copyright © 2024 Angular Primitives.
|
|
97
97
|
* https://github.com/ng-primitives/ng-primitives
|
|
98
98
|
*
|
|
99
|
-
* This source code is licensed under the
|
|
99
|
+
* This source code is licensed under the Apache 2.0 license found in the
|
|
100
100
|
* LICENSE file in the root directory of this source tree.
|
|
101
101
|
*/
|
|
102
102
|
class NgpRadioIndicator {
|
|
@@ -196,7 +196,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
|
|
|
196
196
|
* Copyright © 2024 Angular Primitives.
|
|
197
197
|
* https://github.com/ng-primitives/ng-primitives
|
|
198
198
|
*
|
|
199
|
-
* This source code is licensed under the
|
|
199
|
+
* This source code is licensed under the Apache 2.0 license found in the
|
|
200
200
|
* LICENSE file in the root directory of this source tree.
|
|
201
201
|
*/
|
|
202
202
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-radio.mjs","sources":["../../../../packages/ng-primitives/radio/src/radio-group/radio-group.token.ts","../../../../packages/ng-primitives/radio/src/radio-group/radio-group.directive.ts","../../../../packages/ng-primitives/radio/src/radio-item/radio-item.token.ts","../../../../packages/ng-primitives/radio/src/radio-indicator/radio-indicator.directive.ts","../../../../packages/ng-primitives/radio/src/radio-item/radio-item.directive.ts","../../../../packages/ng-primitives/radio/src/index.ts","../../../../packages/ng-primitives/radio/src/ng-primitives-radio.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpRadioGroup } from './radio-group.directive';\n\nexport const NgpRadioGroupToken = new InjectionToken<NgpRadioGroup>('NgpRadioGroupToken');\n\n/**\n * Injects the radio group directive.\n * @returns The radio group directive.\n */\nexport function injectRadioGroup(): NgpRadioGroup {\n return inject(NgpRadioGroupToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, input, model } from '@angular/core';\nimport { NgpFormControl } from 'ng-primitives/form-field';\nimport { NgpCanDisable, NgpDisabledToken } from 'ng-primitives/internal';\nimport { NgpRovingFocusGroup } from 'ng-primitives/roving-focus';\nimport { NgpRadioGroupToken } from './radio-group.token';\n\n@Directive({\n selector: '[ngpRadioGroup]',\n standalone: true,\n providers: [\n { provide: NgpRadioGroupToken, useExisting: NgpRadioGroup },\n { provide: NgpDisabledToken, useExisting: NgpRadioGroup },\n ],\n hostDirectives: [NgpRovingFocusGroup, NgpFormControl],\n host: {\n role: 'radiogroup',\n '[attr.aria-orientation]': 'orientation()',\n '[attr.data-orientation]': 'orientation()',\n },\n})\nexport class NgpRadioGroup implements NgpCanDisable {\n /**\n * The value of the radio group.\n */\n readonly value = model<string | null>(null, { alias: 'ngpRadioGroupValue' });\n\n /**\n * Whether the radio group is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpRadioGroupDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * The orientation of the radio group.\n * @default 'horizontal'\n */\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal', {\n alias: 'ngpRadioGroupOrientation',\n });\n\n /**\n * Select a radio item.\n * @param value The value of the radio item to select.\n */\n select(value: string): void {\n this.value.set(value);\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpRadioItem } from './radio-item.directive';\n\nexport const NgpRadioItemToken = new InjectionToken<NgpRadioItem>('NgpRadioItemToken');\n\n/**\n * Inject the RadioItem directive instance\n * @returns The RadioItem directive instance\n */\nexport function injectRadioItem(): NgpRadioItem {\n return inject(NgpRadioItemToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Directive, computed } from '@angular/core';\nimport { NgpHover, NgpPress } from 'ng-primitives/interactions';\nimport { injectRadioGroup } from '../radio-group/radio-group.token';\nimport { injectRadioItem } from '../radio-item/radio-item.token';\n\n@Directive({\n selector: '[ngpRadioIndicator]',\n standalone: true,\n host: {\n '[attr.data-checked]': 'checked()',\n '[attr.data-disabled]': 'radioItem.disabled()',\n },\n hostDirectives: [NgpHover, NgpPress],\n})\nexport class NgpRadioIndicator {\n /**\n * Access the radio group.\n */\n protected readonly radioGroup = injectRadioGroup();\n\n /**\n * Access the radio group item.\n */\n protected readonly radioItem = injectRadioItem();\n\n /**\n * Determine if the radio indicator is checked.\n */\n readonly checked = computed(() => this.radioGroup.value() === this.radioItem.value());\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, HostListener, booleanAttribute, computed, input } from '@angular/core';\nimport { NgpFocusVisible, NgpHover, NgpPress } from 'ng-primitives/interactions';\nimport { NgpRovingFocusItem } from 'ng-primitives/roving-focus';\nimport { injectRadioGroup } from '../radio-group/radio-group.token';\nimport { NgpRadioItemToken } from './radio-item.token';\n\n@Directive({\n selector: '[ngpRadioItem]',\n standalone: true,\n hostDirectives: [NgpRovingFocusItem, NgpHover, NgpFocusVisible, NgpPress],\n providers: [{ provide: NgpRadioItemToken, useExisting: NgpRadioItem }],\n host: {\n role: 'radio',\n '[attr.aria-checked]': 'checked() ? \"true\" : \"false\"',\n '[attr.data-disabled]': 'disabled()',\n '[attr.data-checked]': 'checked()',\n },\n})\nexport class NgpRadioItem {\n /**\n * Access the radio group.\n */\n private readonly radioGroup = injectRadioGroup();\n\n /**\n * The value of the radio item.\n */\n readonly value = input.required<string>({ alias: 'ngpRadioItemValue' });\n\n /**\n * Whether the radio item is disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpRadioItemDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Whether the radio item is checked.\n */\n readonly checked = computed(() => this.radioGroup.value() === this.value());\n\n /**\n * When the item receives focus, select it.\n * @internal\n */\n @HostListener('focus')\n protected onFocus(): void {\n this.radioGroup.select(this.value());\n }\n\n /**\n * When the item receives a click, select it.\n * @internal\n */\n @HostListener('click')\n protected onClick(): void {\n this.radioGroup.select(this.value());\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport { NgpRadioGroup } from './radio-group/radio-group.directive';\nexport { NgpRadioGroupToken } from './radio-group/radio-group.token';\nexport { NgpRadioIndicator } from './radio-indicator/radio-indicator.directive';\nexport { NgpRadioItem } from './radio-item/radio-item.directive';\nexport { NgpRadioItemToken } from './radio-item/radio-item.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;AAAA;;;;;;AAMG;MAIU,kBAAkB,GAAG,IAAI,cAAc,CAAgB,oBAAoB,EAAE;AAE1F;;;AAGG;SACa,gBAAgB,GAAA;AAC9B,IAAA,OAAO,MAAM,CAAC,kBAAkB,CAAC,CAAC;AACpC;;MCUa,aAAa,CAAA;AAd1B,IAAA,WAAA,GAAA;AAeE;;AAEG;QACM,IAAK,CAAA,KAAA,GAAG,KAAK,CAAgB,IAAI,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC,CAAC;AAE7E;;AAEG;AACM,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,EAAE;AACtD,YAAA,KAAK,EAAE,uBAAuB;AAC9B,YAAA,SAAS,EAAE,gBAAgB;AAC5B,SAAA,CAAC,CAAC;AAEH;;;AAGG;AACM,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAA4B,YAAY,EAAE;AACpE,YAAA,KAAK,EAAE,0BAA0B;AAClC,SAAA,CAAC,CAAC;AASJ,KAAA;AAPC;;;AAGG;AACH,IAAA,MAAM,CAAC,KAAa,EAAA;AAClB,QAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;KACvB;8GA5BU,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,EAXb,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,KAA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AS,EAAE,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAc,YAAA,EAAE,CAAC;AACtE,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,qBAAqB,EAAE,8BAA8B;AACrD,wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,qBAAqB,EAAE,WAAW;AACnC,qBAAA;AACF,iBAAA,CAAA;8BA+BW,OAAO,EAAA,CAAA;sBADhB,YAAY;uBAAC,OAAO,CAAA;gBAUX,OAAO,EAAA,CAAA;sBADhB,YAAY;uBAAC,OAAO,CAAA;;;AChEvB;;;;;;AAMG;;ACNH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-primitives-radio.mjs","sources":["../../../../packages/ng-primitives/radio/src/radio-group/radio-group.token.ts","../../../../packages/ng-primitives/radio/src/radio-group/radio-group.directive.ts","../../../../packages/ng-primitives/radio/src/radio-item/radio-item.token.ts","../../../../packages/ng-primitives/radio/src/radio-indicator/radio-indicator.directive.ts","../../../../packages/ng-primitives/radio/src/radio-item/radio-item.directive.ts","../../../../packages/ng-primitives/radio/src/index.ts","../../../../packages/ng-primitives/radio/src/ng-primitives-radio.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpRadioGroup } from './radio-group.directive';\n\nexport const NgpRadioGroupToken = new InjectionToken<NgpRadioGroup>('NgpRadioGroupToken');\n\n/**\n * Injects the radio group directive.\n * @returns The radio group directive.\n */\nexport function injectRadioGroup(): NgpRadioGroup {\n return inject(NgpRadioGroupToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, input, model } from '@angular/core';\nimport { NgpFormControl } from 'ng-primitives/form-field';\nimport { NgpCanDisable, NgpDisabledToken } from 'ng-primitives/internal';\nimport { NgpRovingFocusGroup } from 'ng-primitives/roving-focus';\nimport { NgpRadioGroupToken } from './radio-group.token';\n\n@Directive({\n selector: '[ngpRadioGroup]',\n standalone: true,\n providers: [\n { provide: NgpRadioGroupToken, useExisting: NgpRadioGroup },\n { provide: NgpDisabledToken, useExisting: NgpRadioGroup },\n ],\n hostDirectives: [NgpRovingFocusGroup, NgpFormControl],\n host: {\n role: 'radiogroup',\n '[attr.aria-orientation]': 'orientation()',\n '[attr.data-orientation]': 'orientation()',\n },\n})\nexport class NgpRadioGroup implements NgpCanDisable {\n /**\n * The value of the radio group.\n */\n readonly value = model<string | null>(null, { alias: 'ngpRadioGroupValue' });\n\n /**\n * Whether the radio group is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpRadioGroupDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * The orientation of the radio group.\n * @default 'horizontal'\n */\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal', {\n alias: 'ngpRadioGroupOrientation',\n });\n\n /**\n * Select a radio item.\n * @param value The value of the radio item to select.\n */\n select(value: string): void {\n this.value.set(value);\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpRadioItem } from './radio-item.directive';\n\nexport const NgpRadioItemToken = new InjectionToken<NgpRadioItem>('NgpRadioItemToken');\n\n/**\n * Inject the RadioItem directive instance\n * @returns The RadioItem directive instance\n */\nexport function injectRadioItem(): NgpRadioItem {\n return inject(NgpRadioItemToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Directive, computed } from '@angular/core';\nimport { NgpHover, NgpPress } from 'ng-primitives/interactions';\nimport { injectRadioGroup } from '../radio-group/radio-group.token';\nimport { injectRadioItem } from '../radio-item/radio-item.token';\n\n@Directive({\n selector: '[ngpRadioIndicator]',\n standalone: true,\n host: {\n '[attr.data-checked]': 'checked()',\n '[attr.data-disabled]': 'radioItem.disabled()',\n },\n hostDirectives: [NgpHover, NgpPress],\n})\nexport class NgpRadioIndicator {\n /**\n * Access the radio group.\n */\n protected readonly radioGroup = injectRadioGroup();\n\n /**\n * Access the radio group item.\n */\n protected readonly radioItem = injectRadioItem();\n\n /**\n * Determine if the radio indicator is checked.\n */\n readonly checked = computed(() => this.radioGroup.value() === this.radioItem.value());\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, HostListener, booleanAttribute, computed, input } from '@angular/core';\nimport { NgpFocusVisible, NgpHover, NgpPress } from 'ng-primitives/interactions';\nimport { NgpRovingFocusItem } from 'ng-primitives/roving-focus';\nimport { injectRadioGroup } from '../radio-group/radio-group.token';\nimport { NgpRadioItemToken } from './radio-item.token';\n\n@Directive({\n selector: '[ngpRadioItem]',\n standalone: true,\n hostDirectives: [NgpRovingFocusItem, NgpHover, NgpFocusVisible, NgpPress],\n providers: [{ provide: NgpRadioItemToken, useExisting: NgpRadioItem }],\n host: {\n role: 'radio',\n '[attr.aria-checked]': 'checked() ? \"true\" : \"false\"',\n '[attr.data-disabled]': 'disabled()',\n '[attr.data-checked]': 'checked()',\n },\n})\nexport class NgpRadioItem {\n /**\n * Access the radio group.\n */\n private readonly radioGroup = injectRadioGroup();\n\n /**\n * The value of the radio item.\n */\n readonly value = input.required<string>({ alias: 'ngpRadioItemValue' });\n\n /**\n * Whether the radio item is disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpRadioItemDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Whether the radio item is checked.\n */\n readonly checked = computed(() => this.radioGroup.value() === this.value());\n\n /**\n * When the item receives focus, select it.\n * @internal\n */\n @HostListener('focus')\n protected onFocus(): void {\n this.radioGroup.select(this.value());\n }\n\n /**\n * When the item receives a click, select it.\n * @internal\n */\n @HostListener('click')\n protected onClick(): void {\n this.radioGroup.select(this.value());\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport { NgpRadioGroup } from './radio-group/radio-group.directive';\nexport { NgpRadioGroupToken } from './radio-group/radio-group.token';\nexport { NgpRadioIndicator } from './radio-indicator/radio-indicator.directive';\nexport { NgpRadioItem } from './radio-item/radio-item.directive';\nexport { NgpRadioItemToken } from './radio-item/radio-item.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;AAAA;;;;;;AAMG;MAIU,kBAAkB,GAAG,IAAI,cAAc,CAAgB,oBAAoB,EAAE;AAE1F;;;AAGG;SACa,gBAAgB,GAAA;AAC9B,IAAA,OAAO,MAAM,CAAC,kBAAkB,CAAC,CAAC;AACpC;;MCUa,aAAa,CAAA;AAd1B,IAAA,WAAA,GAAA;AAeE;;AAEG;QACM,IAAK,CAAA,KAAA,GAAG,KAAK,CAAgB,IAAI,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC,CAAC;AAE7E;;AAEG;AACM,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,EAAE;AACtD,YAAA,KAAK,EAAE,uBAAuB;AAC9B,YAAA,SAAS,EAAE,gBAAgB;AAC5B,SAAA,CAAC,CAAC;AAEH;;;AAGG;AACM,QAAA,IAAA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O,EAAE,iBAAiB,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,EAAA,EAAA,SAAA,EAAAC,IAAA,CAAA,QAAA,EAAA,EAAA,EAAA,SAAA,EAAAA,IAAA,CAAA,eAAA,EAAA,EAAA,EAAA,SAAA,EAAAA,IAAA,CAAA,QAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAQ3D,YAAY,EAAA,UAAA,EAAA,CAAA;kBAZxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,UAAU,EAAE,IAAI;oBAChB,cAAc,EAAE,CAAC,kBAAkB,EAAE,QAAQ,EAAE,eAAe,EAAE,QAAQ,CAAC;oBACzE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAc,YAAA,EAAE,CAAC;AACtE,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,qBAAqB,EAAE,8BAA8B;AACrD,wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,qBAAqB,EAAE,WAAW;AACnC,qBAAA;AACF,iBAAA,CAAA;8BA+BW,OAAO,EAAA,CAAA;sBADhB,YAAY;uBAAC,OAAO,CAAA;gBAUX,OAAO,EAAA,CAAA;sBADhB,YAAY;uBAAC,OAAO,CAAA;;;AChEvB;;;;;;AAMG;;ACNH;;AAEG;;;;"}
|
|
@@ -7,7 +7,7 @@ import { Observable } from 'rxjs';
|
|
|
7
7
|
* Copyright © 2024 Angular Primitives.
|
|
8
8
|
* https://github.com/ng-primitives/ng-primitives
|
|
9
9
|
*
|
|
10
|
-
* This source code is licensed under the
|
|
10
|
+
* This source code is licensed under the Apache 2.0 license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
@@ -47,7 +47,7 @@ function fromResizeEvent(element) {
|
|
|
47
47
|
* Copyright © 2024 Angular Primitives.
|
|
48
48
|
* https://github.com/ng-primitives/ng-primitives
|
|
49
49
|
*
|
|
50
|
-
* This source code is licensed under the
|
|
50
|
+
* This source code is licensed under the Apache 2.0 license found in the
|
|
51
51
|
* LICENSE file in the root directory of this source tree.
|
|
52
52
|
*/
|
|
53
53
|
class NgpResize {
|
|
@@ -92,7 +92,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
|
|
|
92
92
|
* Copyright © 2024 Angular Primitives.
|
|
93
93
|
* https://github.com/ng-primitives/ng-primitives
|
|
94
94
|
*
|
|
95
|
-
* This source code is licensed under the
|
|
95
|
+
* This source code is licensed under the Apache 2.0 license found in the
|
|
96
96
|
* LICENSE file in the root directory of this source tree.
|
|
97
97
|
*/
|
|
98
98
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-resize.mjs","sources":["../../../../packages/ng-primitives/resize/src/utils/resize.ts","../../../../packages/ng-primitives/resize/src/resize/resize.directive.ts","../../../../packages/ng-primitives/resize/src/index.ts","../../../../packages/ng-primitives/resize/src/ng-primitives-resize.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the
|
|
1
|
+
{"version":3,"file":"ng-primitives-resize.mjs","sources":["../../../../packages/ng-primitives/resize/src/utils/resize.ts","../../../../packages/ng-primitives/resize/src/resize/resize.directive.ts","../../../../packages/ng-primitives/resize/src/index.ts","../../../../packages/ng-primitives/resize/src/ng-primitives-resize.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Observable } from 'rxjs';\n\n/**\n * A simple helper function to create a resize observer as an RxJS Observable.\n * @param element The element to observe for resize events.\n * @returns The resize event as an Observable.\n */\nexport function fromResizeEvent(element: HTMLElement): Observable<Dimensions> {\n return new Observable(observer => {\n const resizeObserver = new ResizeObserver(entries => {\n // if there are no entries, ignore the event\n if (!entries.length) {\n return;\n }\n\n // otherwise, take the first entry and emit the dimensions\n const entry = entries[0];\n\n if ('borderBoxSize' in entry) {\n const borderSizeEntry = entry['borderBoxSize'];\n // this may be different across browsers so normalize it\n const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;\n\n observer.next({ width: borderSize['inlineSize'], height: borderSize['blockSize'] });\n } else {\n // fallback for browsers that don't support borderBoxSize\n observer.next({\n width: element.offsetWidth,\n height: element.offsetHeight,\n });\n }\n });\n\n resizeObserver.observe(element);\n\n return () => resizeObserver.disconnect();\n });\n}\n\nexport interface Dimensions {\n width: number;\n height: number;\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { DestroyRef, Directive, ElementRef, NgZone, OnInit, inject, output } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Dimensions, fromResizeEvent } from '../utils/resize';\n\n@Directive({\n selector: '[ngpResize]',\n standalone: true,\n})\nexport class NgpResize implements OnInit {\n /**\n * Access the element.\n */\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Access zone.js\n */\n private readonly ngZone = inject(NgZone);\n\n /**\n * Access the destroy ref\n */\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * Emit when the element is resized.\n */\n readonly didResize = output<Dimensions>({\n alias: 'ngpResize',\n });\n\n ngOnInit(): void {\n // oberve the element for resize events\n fromResizeEvent(this.element.nativeElement)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => this.ngZone.run(() => this.didResize.emit(event)));\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport { NgpResize } from './resize/resize.directive';\nexport { Dimensions, fromResizeEvent } from './utils/resize';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;AAMG;AAGH;;;;AAIG;AACG,SAAU,eAAe,CAAC,OAAoB,EAAA;AAClD,IAAA,OAAO,IAAI,UAAU,CAAC,QAAQ,IAAG;AAC/B,QAAA,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,OAAO,IAAG;;AAElD,YAAA,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;gBACnB,OAAO;aACR;;AAGD,YAAA,MAAM,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAEzB,YAAA,IAAI,eAAe,IAAI,KAAK,EAAE;AAC5B,gBAAA,MAAM,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC;;AAE/C,gBAAA,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC;AAEzF,gBAAA,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;aACrF;iBAAM;;gBAEL,QAAQ,CAAC,IAAI,CAAC;oBACZ,KAAK,EAAE,OAAO,CAAC,WAAW;oBAC1B,MAAM,EAAE,OAAO,CAAC,YAAY;AAC7B,iBAAA,CAAC,CAAC;aACJ;AACH,SAAC,CAAC,CAAC;AAEH,QAAA,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAEhC,QAAA,OAAO,MAAM,cAAc,CAAC,UAAU,EAAE,CAAC;AAC3C,KAAC,CAAC,CAAC;AACL;;AC5CA;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a11y';
|
|
|
8
8
|
* Copyright © 2024 Angular Primitives.
|
|
9
9
|
* https://github.com/ng-primitives/ng-primitives
|
|
10
10
|
*
|
|
11
|
-
* This source code is licensed under the
|
|
11
|
+
* This source code is licensed under the Apache 2.0 license found in the
|
|
12
12
|
* LICENSE file in the root directory of this source tree.
|
|
13
13
|
*/
|
|
14
14
|
const NgpRovingFocusGroupToken = new InjectionToken('NgpRovingFocusGroupToken');
|
|
@@ -266,7 +266,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
|
|
|
266
266
|
* Copyright © 2024 Angular Primitives.
|
|
267
267
|
* https://github.com/ng-primitives/ng-primitives
|
|
268
268
|
*
|
|
269
|
-
* This source code is licensed under the
|
|
269
|
+
* This source code is licensed under the Apache 2.0 license found in the
|
|
270
270
|
* LICENSE file in the root directory of this source tree.
|
|
271
271
|
*/
|
|
272
272
|
const NgpRovingFocusItemToken = new InjectionToken('NgpRovingFocusItemToken');
|
|
@@ -282,7 +282,7 @@ function injectRovingFocusItem() {
|
|
|
282
282
|
* Copyright © 2024 Angular Primitives.
|
|
283
283
|
* https://github.com/ng-primitives/ng-primitives
|
|
284
284
|
*
|
|
285
|
-
* This source code is licensed under the
|
|
285
|
+
* This source code is licensed under the Apache 2.0 license found in the
|
|
286
286
|
* LICENSE file in the root directory of this source tree.
|
|
287
287
|
*/
|
|
288
288
|
class NgpRovingFocusItem {
|
|
@@ -375,7 +375,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
|
|
|
375
375
|
* Copyright © 2024 Angular Primitives.
|
|
376
376
|
* https://github.com/ng-primitives/ng-primitives
|
|
377
377
|
*
|
|
378
|
-
* This source code is licensed under the
|
|
378
|
+
* This source code is licensed under the Apache 2.0 license found in the
|
|
379
379
|
* LICENSE file in the root directory of this source tree.
|
|
380
380
|
*/
|
|
381
381
|
|