ng-primitives 0.0.7 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -4
- package/accordion/accordion-trigger/accordion-trigger.directive.d.ts +2 -1
- package/autofill/README.md +3 -0
- package/autofill/autofill/autofill.directive.d.ts +19 -0
- package/{select/select-button/select-button.token.d.ts → autofill/autofill/autofill.token.d.ts} +4 -4
- package/autofill/index.d.ts +9 -0
- package/avatar/avatar/avatar.directive.d.ts +2 -1
- package/button/README.md +3 -0
- package/button/button/button.directive.d.ts +27 -0
- package/{select/select-option/select-option.token.d.ts → button/button/button.token.d.ts} +4 -4
- package/button/index.d.ts +9 -0
- package/checkbox/checkbox/checkbox.directive.d.ts +11 -61
- package/checkbox/index.d.ts +0 -4
- package/esm2022/a11y/visually-hidden/visually-hidden.directive.mjs +3 -3
- package/esm2022/accordion/accordion/accordion.directive.mjs +5 -4
- package/esm2022/accordion/accordion-content/accordion-content.directive.mjs +5 -6
- package/esm2022/accordion/accordion-item/accordion-item.directive.mjs +5 -5
- package/esm2022/accordion/accordion-trigger/accordion-trigger.directive.mjs +8 -5
- package/esm2022/autofill/autofill/autofill.directive.mjs +71 -0
- package/esm2022/autofill/autofill/autofill.token.mjs +16 -0
- package/esm2022/autofill/index.mjs +10 -0
- package/esm2022/autofill/ng-primitives-autofill.mjs +5 -0
- package/esm2022/avatar/avatar/avatar.directive.mjs +7 -4
- package/esm2022/avatar/avatar-fallback/avatar-fallback.directive.mjs +3 -3
- package/esm2022/avatar/avatar-image/avatar-image.directive.mjs +3 -3
- package/esm2022/button/button/button.directive.mjs +47 -0
- package/esm2022/button/button/button.token.mjs +16 -0
- package/esm2022/button/index.mjs +10 -0
- package/esm2022/button/ng-primitives-button.mjs +5 -0
- package/esm2022/checkbox/checkbox/checkbox.directive.mjs +29 -79
- package/esm2022/checkbox/index.mjs +1 -5
- package/esm2022/file-upload/file-upload/file-upload.directive.mjs +7 -4
- package/esm2022/focus-trap/focus-trap/focus-trap.directive.mjs +262 -0
- package/esm2022/focus-trap/focus-trap/focus-trap.token.mjs +16 -0
- package/esm2022/focus-trap/index.mjs +10 -0
- package/esm2022/focus-trap/ng-primitives-focus-trap.mjs +5 -0
- package/esm2022/form-field/description/description.directive.mjs +14 -14
- package/esm2022/form-field/error/error.directive.mjs +27 -29
- package/esm2022/form-field/form-control/form-control.directive.mjs +22 -16
- package/esm2022/form-field/form-field/form-field.directive.mjs +3 -3
- package/esm2022/form-field/form-field/form-field.token.mjs +3 -7
- package/esm2022/form-field/label/label.directive.mjs +56 -17
- package/esm2022/input/index.mjs +10 -0
- package/esm2022/input/input/input.directive.mjs +55 -0
- package/esm2022/input/input/input.token.mjs +16 -0
- package/esm2022/input/ng-primitives-input.mjs +5 -0
- package/esm2022/interactions/focus/focus.directive.mjs +15 -10
- package/esm2022/interactions/focus-visible/focus-visible.directive.mjs +12 -7
- package/esm2022/interactions/hover/hover.directive.mjs +16 -11
- package/esm2022/interactions/index.mjs +5 -1
- package/esm2022/interactions/move/move.directive.mjs +216 -0
- package/esm2022/interactions/move/move.token.mjs +16 -0
- package/esm2022/interactions/press/press.directive.mjs +118 -0
- package/esm2022/interactions/press/press.token.mjs +16 -0
- package/esm2022/internal/disabled/disabled.mjs +19 -0
- package/esm2022/internal/index.mjs +11 -0
- package/esm2022/internal/ng-primitives-internal.mjs +5 -0
- package/esm2022/internal/orientation/orientation.mjs +19 -0
- package/esm2022/internal/style-injector/style-injector.mjs +81 -0
- package/esm2022/progress/progress/progress.directive.mjs +3 -3
- package/esm2022/progress/progress-indicator/progress-indicator.directive.mjs +3 -3
- package/esm2022/radio/radio-group/radio-group.directive.mjs +14 -54
- package/esm2022/radio/radio-indicator/radio-indicator.directive.mjs +8 -5
- package/esm2022/radio/radio-item/radio-item.directive.mjs +8 -6
- package/esm2022/resize/resize/resize.directive.mjs +3 -3
- package/esm2022/roving-focus/roving-focus-group/roving-focus-group.directive.mjs +14 -9
- package/esm2022/roving-focus/roving-focus-item/roving-focus-item.directive.mjs +3 -3
- package/esm2022/search/index.mjs +10 -0
- package/esm2022/search/ng-primitives-search.mjs +5 -0
- package/esm2022/search/search-field/search-field.directive.mjs +47 -0
- package/esm2022/search/search-field/search-field.token.mjs +16 -0
- package/esm2022/select/index.mjs +1 -7
- package/esm2022/select/select/select.directive.mjs +23 -36
- package/esm2022/select/select/select.token.mjs +1 -1
- package/esm2022/slider/slider/slider.directive.mjs +18 -5
- package/esm2022/slider/slider-range/slider-range.directive.mjs +6 -5
- package/esm2022/slider/slider-thumb/slider-thumb.directive.mjs +7 -4
- package/esm2022/slider/slider-track/slider-track.directive.mjs +8 -4
- package/esm2022/switch/switch/switch.directive.mjs +18 -58
- package/esm2022/switch/switch-thumb/switch-thumb.directive.mjs +9 -6
- package/esm2022/tabs/tab-button/tab-button.directive.mjs +8 -6
- package/esm2022/tabs/tab-list/tab-list.directive.mjs +3 -3
- package/esm2022/tabs/tab-panel/tab-panel.directive.mjs +5 -6
- package/esm2022/tabs/tabset/tabset.directive.mjs +14 -18
- package/esm2022/textarea/index.mjs +10 -0
- package/esm2022/textarea/ng-primitives-textarea.mjs +5 -0
- package/esm2022/textarea/textarea/textarea.directive.mjs +37 -0
- package/esm2022/textarea/textarea/textarea.token.mjs +16 -0
- package/esm2022/toggle/toggle/toggle.directive.mjs +33 -13
- package/esm2022/tooltip/tooltip/tooltip.directive.mjs +3 -3
- package/esm2022/tooltip/tooltip-trigger/tooltip-trigger.directive.mjs +7 -7
- package/esm2022/utils/helpers/focus-manager.mjs +3 -3
- package/esm2022/utils/index.mjs +2 -2
- package/esm2022/utils/signals/async.mjs +11 -17
- package/fesm2022/ng-primitives-a11y.mjs +3 -3
- package/fesm2022/ng-primitives-accordion.mjs +19 -16
- package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/ng-primitives-autofill.mjs +100 -0
- package/fesm2022/ng-primitives-autofill.mjs.map +1 -0
- package/fesm2022/ng-primitives-avatar.mjs +13 -10
- package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/ng-primitives-button.mjs +76 -0
- package/fesm2022/ng-primitives-button.mjs.map +1 -0
- package/fesm2022/ng-primitives-checkbox.mjs +25 -203
- package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-file-upload.mjs +6 -3
- package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
- package/fesm2022/ng-primitives-focus-trap.mjs +291 -0
- package/fesm2022/ng-primitives-focus-trap.mjs.map +1 -0
- package/fesm2022/ng-primitives-form-field.mjs +119 -80
- package/fesm2022/ng-primitives-form-field.mjs.map +1 -1
- package/fesm2022/ng-primitives-input.mjs +84 -0
- package/fesm2022/ng-primitives-input.mjs.map +1 -0
- package/fesm2022/ng-primitives-interactions.mjs +394 -26
- package/fesm2022/ng-primitives-interactions.mjs.map +1 -1
- package/fesm2022/ng-primitives-internal.mjs +132 -0
- package/fesm2022/ng-primitives-internal.mjs.map +1 -0
- package/fesm2022/ng-primitives-progress.mjs +6 -6
- package/fesm2022/ng-primitives-radio.mjs +25 -62
- package/fesm2022/ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/ng-primitives-resize.mjs +3 -3
- package/fesm2022/ng-primitives-roving-focus.mjs +15 -10
- package/fesm2022/ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/ng-primitives-search.mjs +76 -0
- package/fesm2022/ng-primitives-search.mjs.map +1 -0
- package/fesm2022/ng-primitives-select.mjs +23 -395
- package/fesm2022/ng-primitives-select.mjs.map +1 -1
- package/fesm2022/ng-primitives-slider.mjs +35 -14
- package/fesm2022/ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/ng-primitives-switch.mjs +23 -62
- package/fesm2022/ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/ng-primitives-tabs.mjs +27 -30
- package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/ng-primitives-textarea.mjs +66 -0
- package/fesm2022/ng-primitives-textarea.mjs.map +1 -0
- package/fesm2022/ng-primitives-toggle.mjs +32 -12
- package/fesm2022/ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/ng-primitives-tooltip.mjs +9 -9
- package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/ng-primitives-utils.mjs +14 -20
- package/fesm2022/ng-primitives-utils.mjs.map +1 -1
- package/file-upload/file-upload/file-upload.directive.d.ts +2 -1
- package/focus-trap/README.md +3 -0
- package/focus-trap/focus-trap/focus-trap.directive.d.ts +64 -0
- package/{select/select-options/select-options.token.d.ts → focus-trap/focus-trap/focus-trap.token.d.ts} +4 -4
- package/focus-trap/index.d.ts +9 -0
- package/form-field/description/description.directive.d.ts +1 -1
- package/form-field/error/error.directive.d.ts +9 -5
- package/form-field/form-control/form-control.directive.d.ts +7 -3
- package/form-field/form-field/form-field.token.d.ts +1 -1
- package/form-field/label/label.directive.d.ts +3 -2
- package/input/README.md +3 -0
- package/input/index.d.ts +9 -0
- package/input/input/input.directive.d.ts +33 -0
- package/input/input/input.token.d.ts +14 -0
- package/interactions/focus/focus.directive.d.ts +6 -2
- package/interactions/focus-visible/focus-visible.directive.d.ts +5 -1
- package/interactions/hover/hover.directive.d.ts +5 -1
- package/interactions/index.d.ts +4 -0
- package/interactions/move/move.directive.d.ts +126 -0
- package/interactions/move/move.token.d.ts +14 -0
- package/interactions/press/press.directive.d.ts +59 -0
- package/interactions/press/press.token.d.ts +14 -0
- package/internal/README.md +3 -0
- package/internal/disabled/disabled.d.ts +21 -0
- package/internal/index.d.ts +10 -0
- package/internal/orientation/orientation.d.ts +22 -0
- package/internal/style-injector/style-injector.d.ts +36 -0
- package/package.json +49 -7
- package/radio/radio-group/radio-group.directive.d.ts +4 -41
- package/radio/radio-indicator/radio-indicator.directive.d.ts +2 -1
- package/radio/radio-item/radio-item.directive.d.ts +2 -1
- package/roving-focus/roving-focus-group/roving-focus-group.directive.d.ts +7 -2
- package/search/README.md +3 -0
- package/search/index.d.ts +9 -0
- package/search/search-field/search-field.directive.d.ts +15 -0
- package/search/search-field/search-field.token.d.ts +14 -0
- package/select/index.d.ts +0 -6
- package/select/select/select.directive.d.ts +7 -22
- package/select/select/select.token.d.ts +2 -2
- package/slider/slider/slider.directive.d.ts +4 -2
- package/slider/slider-thumb/slider-thumb.directive.d.ts +2 -1
- package/slider/slider-track/slider-track.directive.d.ts +1 -1
- package/switch/switch/switch.directive.d.ts +5 -45
- package/switch/switch-thumb/switch-thumb.directive.d.ts +2 -1
- package/tabs/tab-button/tab-button.directive.d.ts +2 -1
- package/tabs/tabset/tabset.directive.d.ts +3 -9
- package/textarea/README.md +3 -0
- package/textarea/index.d.ts +9 -0
- package/textarea/textarea/textarea.directive.d.ts +20 -0
- package/textarea/textarea/textarea.token.d.ts +14 -0
- package/toggle/toggle/toggle.directive.d.ts +16 -4
- package/utils/index.d.ts +1 -1
- package/utils/signals/async.d.ts +10 -12
- package/checkbox/checkbox-indicator/checkbox-indicator.directive.d.ts +0 -19
- package/checkbox/checkbox-indicator/checkbox-indicator.token.d.ts +0 -15
- package/checkbox/checkbox-input/checkbox-input.directive.d.ts +0 -10
- package/checkbox/checkbox-label/checkbox-label.directive.d.ts +0 -9
- package/esm2022/checkbox/checkbox-indicator/checkbox-indicator.directive.mjs +0 -51
- package/esm2022/checkbox/checkbox-indicator/checkbox-indicator.token.mjs +0 -17
- package/esm2022/checkbox/checkbox-input/checkbox-input.directive.mjs +0 -40
- package/esm2022/checkbox/checkbox-label/checkbox-label.directive.mjs +0 -32
- package/esm2022/select/select-button/select-button.directive.mjs +0 -84
- package/esm2022/select/select-button/select-button.token.mjs +0 -16
- package/esm2022/select/select-option/select-option.directive.mjs +0 -90
- package/esm2022/select/select-option/select-option.token.mjs +0 -16
- package/esm2022/select/select-options/select-options.directive.mjs +0 -157
- package/esm2022/select/select-options/select-options.token.mjs +0 -16
- package/select/select-button/select-button.directive.d.ts +0 -51
- package/select/select-option/select-option.directive.d.ts +0 -57
- package/select/select-options/select-options.directive.d.ts +0 -65
|
@@ -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/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 { 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 * 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: 'ngpHoverChange' });\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.disabled() ||\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.disabled() && (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.disabled() && (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 { 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-focused]': '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 * Emit when the focus state changes.\n */\n readonly stateChange = output<boolean>({ alias: 'ngpFocusChange' });\n\n /**\n * Listen for focus events.\n * @param event\n */\n @HostListener('focus', ['$event'])\n protected onFocus(event: FocusEvent) {\n if (this.disabled()) {\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.stateChange.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.disabled()) {\n return;\n }\n\n if (event.currentTarget === event.target) {\n this.stateChange.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 { 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 * Emit when the element is visually focused.\n */\n readonly focusChange = output<boolean>({\n alias: 'ngpFocusVisibleChange',\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.disabled() || 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.disabled() || !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 */\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';\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;;ACMA;;;AAGG;AACH,MAGM,mBAAmB,CAAA;AAgBvB,IAAA,WAAA,GAAA;AAfA;;AAEG;QACH,IAAyB,CAAA,yBAAA,GAAY,KAAK,CAAC;AAE3C;;AAEG;AACc,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAE7C;;AAEG;AACc,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;;AAIhD,QAAA,IAAI,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;YACtC,IAAI,CAAC,sBAAsB,EAAE,CAAC;SAC/B;KACF;IAEO,sBAAsB,GAAA;AAC5B,QAAA,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AACtF,QAAA,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,UAAU,EAAE,IAAI,CAAC,kCAAkC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;KAChG;IAEO,kCAAkC,GAAA;AACxC,QAAA,IAAI,CAAC,yBAAyB,GAAG,IAAI,CAAC;;;;;AAKtC,QAAA,UAAU,CAAC,OAAO,IAAI,CAAC,yBAAyB,GAAG,KAAK,CAAC,EAAE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CAAA;wDA+DW,MAAM,EAAA,CAAA;sBADf,YAAY;uBAAC,MAAM,CAAA;;;AC5FtB;;;;;;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 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 }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ACNH;;AAEG;;;;"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, signal, PLATFORM_ID, Injectable } from '@angular/core';
|
|
3
|
+
import { isPlatformBrowser } from '@angular/common';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Copyright © 2024 Angular Primitives.
|
|
7
|
+
* https://github.com/ng-primitives/ng-primitives
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the CC BY-ND 4.0 license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
const NgpDisabledToken = new InjectionToken('NgpDisabledToken');
|
|
13
|
+
/**
|
|
14
|
+
* Determine if we are in a disabled context.
|
|
15
|
+
* @param disabled The disabled signal for the local context.
|
|
16
|
+
* @returns The disabled signal.
|
|
17
|
+
*/
|
|
18
|
+
function injectDisabled(disabled = signal(false)) {
|
|
19
|
+
const provider = inject(NgpDisabledToken, { optional: true });
|
|
20
|
+
return provider ? provider.disabled : disabled;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Copyright © 2024 Angular Primitives.
|
|
25
|
+
* https://github.com/ng-primitives/ng-primitives
|
|
26
|
+
*
|
|
27
|
+
* This source code is licensed under the CC BY-ND 4.0 license found in the
|
|
28
|
+
* LICENSE file in the root directory of this source tree.
|
|
29
|
+
*/
|
|
30
|
+
const NgpOrientationToken = new InjectionToken('NgpOrientationToken');
|
|
31
|
+
/**
|
|
32
|
+
* Determine if we are in a orientation context.
|
|
33
|
+
* @param orientation The orientation signal for the local context.
|
|
34
|
+
* @returns The orientation signal.
|
|
35
|
+
*/
|
|
36
|
+
function injectOrientation(orientation = signal('horizontal')) {
|
|
37
|
+
const provider = inject(NgpOrientationToken, { optional: true });
|
|
38
|
+
return provider ? provider.orientation : orientation;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Copyright © 2024 Angular Primitives.
|
|
43
|
+
* https://github.com/ng-primitives/ng-primitives
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the CC BY-ND 4.0 license found in the
|
|
46
|
+
* LICENSE file in the root directory of this source tree.
|
|
47
|
+
*/
|
|
48
|
+
/**
|
|
49
|
+
* A utility service for injecting styles into the document.
|
|
50
|
+
* Angular doesn't allow directives to specify styles, only components.
|
|
51
|
+
* As we ship directives, occasionally we need to associate styles with them.
|
|
52
|
+
* This service allows us to programmatically inject styles into the document.
|
|
53
|
+
*/
|
|
54
|
+
class StyleInjector {
|
|
55
|
+
constructor() {
|
|
56
|
+
/**
|
|
57
|
+
* Detect the platform.
|
|
58
|
+
*/
|
|
59
|
+
this.platformId = inject(PLATFORM_ID);
|
|
60
|
+
/**
|
|
61
|
+
* Store the map of style elements with their unique identifiers.
|
|
62
|
+
*/
|
|
63
|
+
this.styleElements = new Map();
|
|
64
|
+
if (isPlatformBrowser(this.platformId)) {
|
|
65
|
+
this.collectServerStyles();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Inject a style into the document.
|
|
70
|
+
* @param id The unique identifier for the style.
|
|
71
|
+
* @param style The style to inject.
|
|
72
|
+
*/
|
|
73
|
+
add(id, style) {
|
|
74
|
+
if (this.styleElements.has(id)) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const styleElement = document.createElement('style');
|
|
78
|
+
styleElement.setAttribute('data-ngp-style', id);
|
|
79
|
+
styleElement.textContent = style;
|
|
80
|
+
document.head.appendChild(styleElement);
|
|
81
|
+
this.styleElements.set(id, styleElement);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Remove a style from the document.
|
|
85
|
+
* @param id The unique identifier for the style.
|
|
86
|
+
*/
|
|
87
|
+
remove(id) {
|
|
88
|
+
const styleElement = this.styleElements.get(id);
|
|
89
|
+
if (styleElement) {
|
|
90
|
+
document.head.removeChild(styleElement);
|
|
91
|
+
this.styleElements.delete(id);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Collect any styles that were rendered by the server.
|
|
96
|
+
*/
|
|
97
|
+
collectServerStyles() {
|
|
98
|
+
const styleElements = document.querySelectorAll('style[data-ngp-style]');
|
|
99
|
+
styleElements.forEach(styleElement => {
|
|
100
|
+
const id = styleElement.getAttribute('data-ngp-style');
|
|
101
|
+
if (id) {
|
|
102
|
+
this.styleElements.set(id, styleElement);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: StyleInjector, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
107
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: StyleInjector, providedIn: 'root' }); }
|
|
108
|
+
}
|
|
109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: StyleInjector, decorators: [{
|
|
110
|
+
type: Injectable,
|
|
111
|
+
args: [{
|
|
112
|
+
providedIn: 'root',
|
|
113
|
+
}]
|
|
114
|
+
}], ctorParameters: () => [] });
|
|
115
|
+
function injectStyleInjector() {
|
|
116
|
+
return inject(StyleInjector);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Copyright © 2024 Angular Primitives.
|
|
121
|
+
* https://github.com/ng-primitives/ng-primitives
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the CC BY-ND 4.0 license found in the
|
|
124
|
+
* LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Generated bundle index. Do not edit.
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
export { NgpDisabledToken, NgpOrientationToken, StyleInjector, injectDisabled, injectOrientation, injectStyleInjector };
|
|
132
|
+
//# sourceMappingURL=ng-primitives-internal.mjs.map
|
|
@@ -0,0 +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 CC BY-ND 4.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 CC BY-ND 4.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 CC BY-ND 4.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 CC BY-ND 4.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":";;;;AAAA;;;;;;AAMG;MAGU,gBAAgB,GAAG,IAAI,cAAc,CAAgB,kBAAkB,EAAE;AAStF;;;;AAIG;SACa,cAAc,CAC5B,WAA4B,MAAM,CAAU,KAAK,CAAC,EAAA;AAElD,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,gBAAgB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IAE9D,OAAO,QAAQ,GAAG,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACjD;;AC7BA;;;;;;AAMG;MAGU,mBAAmB,GAAG,IAAI,cAAc,CAAkB,qBAAqB,EAAE;AAS9F;;;;AAIG;SACa,iBAAiB,CAC/B,cAAsC,MAAM,CAAiB,YAAY,CAAC,EAAA;AAE1E,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IAEjE,OAAO,QAAQ,GAAG,QAAQ,CAAC,WAAW,GAAG,WAAW,CAAC;AACvD;;AC7BA;;;;;;AAMG;AAIH;;;;;AAKG;MAIU,aAAa,CAAA;AAWxB,IAAA,WAAA,GAAA;AAVA;;AAEG;AACc,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;AAElD;;AAEG;AACc,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,GAAG,EAA4B,CAAC;AAGnE,QAAA,IAAI,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;YACtC,IAAI,CAAC,mBAAmB,EAAE,CAAC;SAC5B;KACF;AAED;;;;AAIG;IACH,GAAG,CAAC,EAAU,EAAE,KAAa,EAAA;QAC3B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A,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cAFZ,MAAM,EAAA,CAAA,CAAA,EAAA;;2FAEP,aAAa,EAAA,UAAA,EAAA,CAAA;kBAHzB,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;;;;"}
|
|
@@ -30,10 +30,10 @@ class NgpProgressIndicator {
|
|
|
30
30
|
*/
|
|
31
31
|
this.progress = injectProgress();
|
|
32
32
|
}
|
|
33
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
34
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.
|
|
33
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpProgressIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
34
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.1", type: NgpProgressIndicator, isStandalone: true, selector: "[ngpProgressIndicator]", host: { properties: { "attr.data-state": "progress.state()", "attr.data-value": "progress.value()", "attr.data-max": "progress.max()" } }, ngImport: i0 }); }
|
|
35
35
|
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpProgressIndicator, decorators: [{
|
|
37
37
|
type: Directive,
|
|
38
38
|
args: [{
|
|
39
39
|
selector: '[ngpProgressIndicator]',
|
|
@@ -81,10 +81,10 @@ class NgpProgress {
|
|
|
81
81
|
*/
|
|
82
82
|
this.label = computed(() => this.valueLabel()(this.value(), this.max()));
|
|
83
83
|
}
|
|
84
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
85
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.
|
|
84
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpProgress, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
85
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.1.1", type: NgpProgress, isStandalone: true, selector: "[ngpProgress]", inputs: { value: { classPropertyName: "value", publicName: "ngpProgressValue", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "ngpProgressMax", isSignal: true, isRequired: false, transformFunction: null }, valueLabel: { classPropertyName: "valueLabel", publicName: "valueLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "progressbar" }, properties: { "attr.aria-valuemax": "max()", "attr.aria-valuemin": "0", "attr.aria-valuenow": "value()", "attr.aria-valuetext": "label()", "attr.data-state": "state()", "attr.data-value": "value()", "attr.data-max": "max()" } }, providers: [{ provide: NgpProgressToken, useExisting: NgpProgress }], ngImport: i0 }); }
|
|
86
86
|
}
|
|
87
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
87
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpProgress, decorators: [{
|
|
88
88
|
type: Directive,
|
|
89
89
|
args: [{
|
|
90
90
|
selector: '[ngpProgress]',
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, model, input, booleanAttribute,
|
|
3
|
-
import
|
|
2
|
+
import { InjectionToken, inject, model, input, booleanAttribute, Directive, computed, HostListener } from '@angular/core';
|
|
3
|
+
import * as i2 from 'ng-primitives/form-field';
|
|
4
|
+
import { NgpFormControl } from 'ng-primitives/form-field';
|
|
5
|
+
import { NgpDisabledToken } from 'ng-primitives/internal';
|
|
4
6
|
import * as i1 from 'ng-primitives/roving-focus';
|
|
5
7
|
import { NgpRovingFocusGroup, NgpRovingFocusItem } from 'ng-primitives/roving-focus';
|
|
8
|
+
import * as i2$1 from 'ng-primitives/interactions';
|
|
9
|
+
import { NgpHover, NgpPress, NgpFocusVisible } from 'ng-primitives/interactions';
|
|
6
10
|
|
|
7
11
|
/**
|
|
8
12
|
* Copyright © 2024 Angular Primitives.
|
|
@@ -33,10 +37,6 @@ class NgpRadioGroup {
|
|
|
33
37
|
alias: 'ngpRadioGroupDisabled',
|
|
34
38
|
transform: booleanAttribute,
|
|
35
39
|
});
|
|
36
|
-
/**
|
|
37
|
-
* Whether the radio group is disabled via the form.
|
|
38
|
-
*/
|
|
39
|
-
this.formDisabled = signal(false);
|
|
40
40
|
/**
|
|
41
41
|
* The orientation of the radio group.
|
|
42
42
|
* @default 'horizontal'
|
|
@@ -51,68 +51,30 @@ class NgpRadioGroup {
|
|
|
51
51
|
*/
|
|
52
52
|
select(value) {
|
|
53
53
|
this.value.set(value);
|
|
54
|
-
this.onChange?.(value);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Update the value of the radio group.
|
|
58
|
-
* @param value The new value of the radio group.
|
|
59
|
-
* @internal
|
|
60
|
-
*/
|
|
61
|
-
writeValue(value) {
|
|
62
|
-
this.value.set(value);
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Register a callback function to call when the value of the radio group changes.
|
|
66
|
-
* @param fn The callback function to call when the value of the radio group changes.
|
|
67
|
-
* @internal
|
|
68
|
-
*/
|
|
69
|
-
registerOnChange(fn) {
|
|
70
|
-
this.onChange = fn;
|
|
71
|
-
}
|
|
72
|
-
registerOnTouched(fn) {
|
|
73
|
-
this.onTouched = fn;
|
|
74
54
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
* @param isDisabled Whether the radio group is disabled.
|
|
78
|
-
* @internal
|
|
79
|
-
*/
|
|
80
|
-
setDisabledState(isDisabled) {
|
|
81
|
-
this.formDisabled.set(isDisabled);
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* When focus leaves the radio group, mark it as touched.
|
|
85
|
-
* @internal
|
|
86
|
-
*/
|
|
87
|
-
onFocusout() {
|
|
88
|
-
this.onTouched?.();
|
|
89
|
-
}
|
|
90
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: NgpRadioGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
91
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.0.2", type: NgpRadioGroup, isStandalone: true, selector: "[ngpRadioGroup]", inputs: { value: { classPropertyName: "value", publicName: "ngpRadioGroupValue", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpRadioGroupDisabled", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "ngpRadioGroupOrientation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "ngpRadioGroupValueChange" }, host: { attributes: { "role": "radiogroup" }, listeners: { "focusout": "onFocusout()" }, properties: { "attr.aria-orientation": "orientation()", "attr.data-disabled": "disabled() || formDisabled()" } }, providers: [
|
|
55
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpRadioGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
56
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.1.1", type: NgpRadioGroup, isStandalone: true, selector: "[ngpRadioGroup]", inputs: { value: { classPropertyName: "value", publicName: "ngpRadioGroupValue", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpRadioGroupDisabled", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "ngpRadioGroupOrientation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "ngpRadioGroupValueChange" }, host: { attributes: { "role": "radiogroup" }, properties: { "attr.aria-orientation": "orientation()", "attr.data-orientation": "orientation()" } }, providers: [
|
|
92
57
|
{ provide: NgpRadioGroupToken, useExisting: NgpRadioGroup },
|
|
93
|
-
{ provide:
|
|
94
|
-
], hostDirectives: [{ directive: i1.NgpRovingFocusGroup }], ngImport: i0 }); }
|
|
58
|
+
{ provide: NgpDisabledToken, useExisting: NgpRadioGroup },
|
|
59
|
+
], hostDirectives: [{ directive: i1.NgpRovingFocusGroup }, { directive: i2.NgpFormControl }], ngImport: i0 }); }
|
|
95
60
|
}
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpRadioGroup, decorators: [{
|
|
97
62
|
type: Directive,
|
|
98
63
|
args: [{
|
|
99
64
|
selector: '[ngpRadioGroup]',
|
|
100
65
|
standalone: true,
|
|
101
66
|
providers: [
|
|
102
67
|
{ provide: NgpRadioGroupToken, useExisting: NgpRadioGroup },
|
|
103
|
-
{ provide:
|
|
68
|
+
{ provide: NgpDisabledToken, useExisting: NgpRadioGroup },
|
|
104
69
|
],
|
|
105
|
-
hostDirectives: [NgpRovingFocusGroup],
|
|
70
|
+
hostDirectives: [NgpRovingFocusGroup, NgpFormControl],
|
|
106
71
|
host: {
|
|
107
72
|
role: 'radiogroup',
|
|
108
73
|
'[attr.aria-orientation]': 'orientation()',
|
|
109
|
-
'[attr.data-
|
|
74
|
+
'[attr.data-orientation]': 'orientation()',
|
|
110
75
|
},
|
|
111
76
|
}]
|
|
112
|
-
}]
|
|
113
|
-
type: HostListener,
|
|
114
|
-
args: ['focusout']
|
|
115
|
-
}] } });
|
|
77
|
+
}] });
|
|
116
78
|
|
|
117
79
|
/**
|
|
118
80
|
* Copyright © 2024 Angular Primitives.
|
|
@@ -152,18 +114,19 @@ class NgpRadioIndicator {
|
|
|
152
114
|
*/
|
|
153
115
|
this.checked = computed(() => this.radioGroup.value() === this.radioItem.value());
|
|
154
116
|
}
|
|
155
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
156
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.
|
|
117
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpRadioIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
118
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.1", type: NgpRadioIndicator, isStandalone: true, selector: "[ngpRadioIndicator]", host: { properties: { "attr.data-checked": "checked()", "attr.data-disabled": "radioItem.disabled()" } }, hostDirectives: [{ directive: i2$1.NgpHover }, { directive: i2$1.NgpPress }], ngImport: i0 }); }
|
|
157
119
|
}
|
|
158
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
120
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpRadioIndicator, decorators: [{
|
|
159
121
|
type: Directive,
|
|
160
122
|
args: [{
|
|
161
123
|
selector: '[ngpRadioIndicator]',
|
|
162
124
|
standalone: true,
|
|
163
125
|
host: {
|
|
164
|
-
'[attr.data-
|
|
126
|
+
'[attr.data-checked]': 'checked()',
|
|
165
127
|
'[attr.data-disabled]': 'radioItem.disabled()',
|
|
166
128
|
},
|
|
129
|
+
hostDirectives: [NgpHover, NgpPress],
|
|
167
130
|
}]
|
|
168
131
|
}] });
|
|
169
132
|
|
|
@@ -204,21 +167,21 @@ class NgpRadioItem {
|
|
|
204
167
|
onClick() {
|
|
205
168
|
this.radioGroup.select(this.value());
|
|
206
169
|
}
|
|
207
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
208
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.
|
|
170
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpRadioItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
171
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.1.1", type: NgpRadioItem, isStandalone: true, selector: "[ngpRadioItem]", inputs: { value: { classPropertyName: "value", publicName: "ngpRadioItemValue", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpRadioItemDisabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "radio" }, listeners: { "focus": "onFocus()", "click": "onClick()" }, properties: { "attr.aria-checked": "checked() ? \"true\" : \"false\"", "attr.data-disabled": "disabled()", "attr.data-checked": "checked()" } }, providers: [{ provide: NgpRadioItemToken, useExisting: NgpRadioItem }], hostDirectives: [{ directive: i1.NgpRovingFocusItem }, { directive: i2$1.NgpHover }, { directive: i2$1.NgpFocusVisible }, { directive: i2$1.NgpPress }], ngImport: i0 }); }
|
|
209
172
|
}
|
|
210
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpRadioItem, decorators: [{
|
|
211
174
|
type: Directive,
|
|
212
175
|
args: [{
|
|
213
176
|
selector: '[ngpRadioItem]',
|
|
214
177
|
standalone: true,
|
|
215
|
-
hostDirectives: [NgpRovingFocusItem],
|
|
178
|
+
hostDirectives: [NgpRovingFocusItem, NgpHover, NgpFocusVisible, NgpPress],
|
|
216
179
|
providers: [{ provide: NgpRadioItemToken, useExisting: NgpRadioItem }],
|
|
217
180
|
host: {
|
|
218
181
|
role: 'radio',
|
|
219
182
|
'[attr.aria-checked]': 'checked() ? "true" : "false"',
|
|
220
183
|
'[attr.data-disabled]': 'disabled()',
|
|
221
|
-
'[attr.data-
|
|
184
|
+
'[attr.data-checked]': 'checked()',
|
|
222
185
|
},
|
|
223
186
|
}]
|
|
224
187
|
}], propDecorators: { onFocus: [{
|
|
@@ -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, HostListener, booleanAttribute, input, model, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\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: NG_VALUE_ACCESSOR, useExisting: NgpRadioGroup, multi: true },\n ],\n hostDirectives: [NgpRovingFocusGroup],\n host: {\n role: 'radiogroup',\n '[attr.aria-orientation]': 'orientation()',\n '[attr.data-disabled]': 'disabled() || formDisabled()',\n },\n})\nexport class NgpRadioGroup implements ControlValueAccessor {\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 * Whether the radio group is disabled via the form.\n */\n readonly formDisabled = signal<boolean>(false);\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 * The callback function to call when the value of the radio group changes.\n * @internal\n */\n private onChange?: (value: string) => void;\n\n /**\n * The callback function to call when the radio group is touched.\n * @internal\n */\n private onTouched?: () => void;\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 this.onChange?.(value);\n }\n\n /**\n * Update the value of the radio group.\n * @param value The new value of the radio group.\n * @internal\n */\n writeValue(value: string): void {\n this.value.set(value);\n }\n\n /**\n * Register a callback function to call when the value of the radio group changes.\n * @param fn The callback function to call when the value of the radio group changes.\n * @internal\n */\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * Set the disabled state of the radio group.\n * @param isDisabled Whether the radio group is disabled.\n * @internal\n */\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled);\n }\n\n /**\n * When focus leaves the radio group, mark it as touched.\n * @internal\n */\n @HostListener('focusout')\n protected onFocusout(): void {\n this.onTouched?.();\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 { 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-state]': 'checked() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'radioItem.disabled()',\n },\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 { 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],\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-state]': 'checked() ? \"checked\" : \"unchecked\"',\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":[],"mappings":";;;;;;AAAA;;;;;;AAMG;MAIU,kBAAkB,GAAG,IAAI,cAAc,CAAgB,o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EAAA,CAAA;kBAZxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,UAAU,EAAE,IAAI;oBAChB,cAAc,EAAE,CAAC,kBAAkB,CAAC;oBACpC,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,mBAAmB,EAAE,qCAAqC;AAC3D,qBAAA;AACF,iBAAA,CAAA;8BA+BW,OAAO,EAAA,CAAA;sBADhB,YAAY;uBAAC,OAAO,CAAA;gBAUX,OAAO,EAAA,CAAA;sBADhB,YAAY;uBAAC,OAAO,CAAA;;;AC/DvB;;;;;;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 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,CAA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