@radix-ng/primitives 0.20.2 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/avatar/src/avatar-fallback.directive.d.ts +1 -1
  2. package/avatar/src/avatar-image.directive.d.ts +3 -3
  3. package/compodoc/documentation.json +5818 -1682
  4. package/core/index.d.ts +1 -0
  5. package/core/src/id-generator.d.ts +12 -0
  6. package/esm2022/avatar/src/avatar-fallback.directive.mjs +6 -8
  7. package/esm2022/avatar/src/avatar-image.directive.mjs +4 -3
  8. package/esm2022/core/index.mjs +2 -1
  9. package/esm2022/core/src/create-inject-context/index.mjs +2 -2
  10. package/esm2022/core/src/id-generator.mjs +43 -0
  11. package/esm2022/popover/index.mjs +14 -4
  12. package/esm2022/popover/src/popover-anchor.directive.mjs +70 -0
  13. package/esm2022/popover/src/popover-anchor.token.mjs +3 -0
  14. package/esm2022/popover/src/popover-arrow.directive.mjs +12 -7
  15. package/esm2022/popover/src/popover-close.directive.mjs +16 -4
  16. package/esm2022/popover/src/popover-close.token.mjs +3 -0
  17. package/esm2022/popover/src/popover-content-attributes.component.mjs +70 -0
  18. package/esm2022/popover/src/popover-content-attributes.token.mjs +3 -0
  19. package/esm2022/popover/src/popover-content.directive.mjs +120 -84
  20. package/esm2022/popover/src/popover-root.directive.mjs +232 -64
  21. package/esm2022/popover/src/popover-root.inject.mjs +4 -4
  22. package/esm2022/popover/src/popover-trigger.directive.mjs +5 -7
  23. package/esm2022/popover/src/popover.types.mjs +18 -1
  24. package/esm2022/popover/src/popover.utils.mjs +4 -6
  25. package/esm2022/switch/src/switch-input.directive.mjs +16 -7
  26. package/esm2022/switch/src/switch-root.directive.mjs +59 -14
  27. package/esm2022/switch/src/switch-thumb.directive.mjs +3 -3
  28. package/esm2022/toggle/index.mjs +2 -2
  29. package/esm2022/toggle/src/toggle-visually-hidden-input.directive.mjs +31 -0
  30. package/esm2022/toggle/src/toggle.directive.mjs +37 -8
  31. package/fesm2022/radix-ng-primitives-avatar.mjs +8 -9
  32. package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
  33. package/fesm2022/radix-ng-primitives-core.mjs +44 -3
  34. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
  35. package/fesm2022/radix-ng-primitives-popover.mjs +672 -303
  36. package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
  37. package/fesm2022/radix-ng-primitives-switch.mjs +76 -22
  38. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  39. package/fesm2022/radix-ng-primitives-toggle.mjs +45 -15
  40. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
  41. package/package.json +1 -1
  42. package/popover/index.d.ts +5 -1
  43. package/popover/src/popover-anchor.directive.d.ts +28 -0
  44. package/popover/src/popover-anchor.token.d.ts +3 -0
  45. package/popover/src/popover-arrow.directive.d.ts +8 -5
  46. package/popover/src/popover-close.directive.d.ts +1 -1
  47. package/popover/src/popover-close.token.d.ts +3 -0
  48. package/popover/src/popover-content-attributes.component.d.ts +17 -0
  49. package/popover/src/popover-content-attributes.token.d.ts +3 -0
  50. package/popover/src/popover-content.directive.d.ts +36 -23
  51. package/popover/src/popover-root.directive.d.ts +89 -18
  52. package/popover/src/popover-root.inject.d.ts +2 -1
  53. package/popover/src/popover-trigger.directive.d.ts +3 -5
  54. package/popover/src/popover.types.d.ts +14 -3
  55. package/switch/src/switch-input.directive.d.ts +2 -0
  56. package/switch/src/switch-root.directive.d.ts +33 -5
  57. package/toggle/index.d.ts +2 -2
  58. package/toggle/src/toggle-visually-hidden-input.directive.d.ts +6 -0
  59. package/toggle/src/toggle.directive.d.ts +19 -2
  60. package/esm2022/popover/src/popover-root.token.mjs +0 -3
  61. package/esm2022/toggle/src/toggle-input.directive.mjs +0 -30
  62. package/popover/src/popover-root.token.d.ts +0 -3
  63. package/toggle/src/toggle-input.directive.d.ts +0 -6
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-popover.mjs","sources":["../../../packages/primitives/popover/src/popover-arrow.token.ts","../../../packages/primitives/popover/src/popover-root.token.ts","../../../packages/primitives/popover/src/popover-root.inject.ts","../../../packages/primitives/popover/src/popover.types.ts","../../../packages/primitives/popover/src/popover.constants.ts","../../../packages/primitives/popover/src/popover.utils.ts","../../../packages/primitives/popover/src/popover-arrow.directive.ts","../../../packages/primitives/popover/src/popover-close.directive.ts","../../../packages/primitives/popover/src/popover-content.directive.ts","../../../packages/primitives/popover/src/popover-trigger.directive.ts","../../../packages/primitives/popover/src/popover-root.directive.ts","../../../packages/primitives/popover/index.ts","../../../packages/primitives/popover/radix-ng-primitives-popover.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { RdxPopoverArrowDirective } from './popover-arrow.directive';\n\nexport const RdxPopoverArrowToken = new InjectionToken<RdxPopoverArrowDirective>('RdxPopoverArrowToken');\n","import { InjectionToken } from '@angular/core';\nimport { RdxPopoverRootDirective } from './popover-root.directive';\n\nexport const RdxPopoverRootToken = new InjectionToken<RdxPopoverRootDirective>('RdxPopoverRootToken');\n","import { assertInInjectionContext, inject, isDevMode } from '@angular/core';\nimport { RdxPopoverRootDirective } from './popover-root.directive';\nimport { RdxPopoverRootToken } from './popover-root.token';\n\nexport function injectPopoverRoot(): RdxPopoverRootDirective {\n isDevMode() && assertInInjectionContext(injectPopoverRoot);\n return inject(RdxPopoverRootToken);\n}\n","import { ConnectionPositionPair } from '@angular/cdk/overlay';\n\nexport enum RdxPopoverSide {\n Top = 'top',\n Right = 'right',\n Bottom = 'bottom',\n Left = 'left'\n}\n\nexport enum RdxPopoverAlign {\n Start = 'start',\n Center = 'center',\n End = 'end'\n}\n\nexport type RdxPopoverState = 'open' | 'closed';\n\nexport type RdxSideAndAlign = { side: RdxPopoverSide; align: RdxPopoverAlign };\nexport type RdxSideAndAlignOffsets = { sideOffset: number; alignOffset: number };\n\nexport type RdxPopoverPositions = {\n [key in RdxPopoverSide]: {\n [key in RdxPopoverAlign]: ConnectionPositionPair;\n };\n};\n\nexport type RdxAllPossibleConnectedPositions = ReadonlyMap<\n `${RdxPopoverSide}|${RdxPopoverAlign}`,\n ConnectionPositionPair\n>;\n\nexport type RdxArrowPositionParams = {\n top: string;\n bottom: string;\n left: string;\n right: string;\n transform: string;\n};\n","import { RdxPopoverAlign, RdxPopoverPositions, RdxPopoverSide } from './popover.types';\n\nexport const POPOVER_POSITIONS: RdxPopoverPositions = {\n [RdxPopoverSide.Top]: {\n [RdxPopoverAlign.Center]: {\n originX: 'center',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'bottom'\n },\n [RdxPopoverAlign.Start]: {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom'\n },\n [RdxPopoverAlign.End]: {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom'\n }\n },\n [RdxPopoverSide.Right]: {\n [RdxPopoverAlign.Center]: {\n originX: 'end',\n originY: 'center',\n overlayX: 'start',\n overlayY: 'center'\n },\n [RdxPopoverAlign.Start]: {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top'\n },\n [RdxPopoverAlign.End]: {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'bottom'\n }\n },\n [RdxPopoverSide.Bottom]: {\n [RdxPopoverAlign.Center]: {\n originX: 'center',\n originY: 'bottom',\n overlayX: 'center',\n overlayY: 'top'\n },\n [RdxPopoverAlign.Start]: {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top'\n },\n [RdxPopoverAlign.End]: {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top'\n }\n },\n [RdxPopoverSide.Left]: {\n [RdxPopoverAlign.Center]: {\n originX: 'start',\n originY: 'center',\n overlayX: 'end',\n overlayY: 'center'\n },\n [RdxPopoverAlign.Start]: {\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'top'\n },\n [RdxPopoverAlign.End]: {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'bottom'\n }\n }\n} as const;\n\nexport const DEFAULTS = {\n offsets: {\n side: 10,\n align: 0\n }\n} as const;\n","import { ConnectedPosition, ConnectionPositionPair } from '@angular/cdk/overlay';\nimport { POPOVER_POSITIONS } from './popover.constants';\nimport {\n RdxAllPossibleConnectedPositions,\n RdxArrowPositionParams,\n RdxPopoverAlign,\n RdxPopoverSide,\n RdxSideAndAlign,\n RdxSideAndAlignOffsets\n} from './popover.types';\n\nlet allPossibleConnectedPositions: RdxAllPossibleConnectedPositions;\nexport function getAllPossibleConnectedPositions() {\n if (!allPossibleConnectedPositions) {\n allPossibleConnectedPositions = new Map();\n }\n if (allPossibleConnectedPositions.size < 1) {\n Object.keys(POPOVER_POSITIONS).forEach((side) => {\n Object.keys(POPOVER_POSITIONS[side as RdxPopoverSide] ?? {}).forEach((align) => {\n (allPossibleConnectedPositions as Map<any, any>).set(\n `${side as RdxPopoverSide}|${align as RdxPopoverAlign}`,\n POPOVER_POSITIONS[side as RdxPopoverSide][align as RdxPopoverAlign]\n );\n });\n });\n }\n return allPossibleConnectedPositions;\n}\n\nexport function getSideAndAlignFromAllPossibleConnectedPositions(position: ConnectionPositionPair): RdxSideAndAlign {\n const allPossibleConnectedPositions = getAllPossibleConnectedPositions();\n let sideAndAlign: RdxSideAndAlign | undefined;\n allPossibleConnectedPositions.forEach((value, key) => {\n if (\n position.originX === value.originX &&\n position.originY === value.originY &&\n position.overlayX === value.overlayX &&\n position.overlayY === value.overlayY\n ) {\n const sideAndAlignArray = key.split('|');\n sideAndAlign = {\n side: sideAndAlignArray[0] as RdxPopoverSide,\n align: sideAndAlignArray[1] as RdxPopoverAlign\n };\n }\n });\n if (!sideAndAlign) {\n throw Error(\n `[RdxPopover] cannot infer both side and align from the given position (${JSON.stringify(position)})`\n );\n }\n return sideAndAlign;\n}\n\nexport function getContentPosition(\n sideAndAlignWithOffsets: RdxSideAndAlign & RdxSideAndAlignOffsets\n): ConnectedPosition {\n const { side, align, sideOffset, alignOffset } = sideAndAlignWithOffsets;\n\n const position = {\n ...(POPOVER_POSITIONS[side]?.[align] ?? POPOVER_POSITIONS[RdxPopoverSide.Top][RdxPopoverAlign.Center])\n };\n\n if (sideOffset > 0) {\n let xFactor = 0;\n let yFactor = 0;\n\n switch (side) {\n case RdxPopoverSide.Top:\n yFactor = -1;\n break;\n case RdxPopoverSide.Bottom:\n yFactor = 1;\n break;\n case RdxPopoverSide.Left:\n xFactor = -1;\n break;\n case RdxPopoverSide.Right:\n xFactor = 1;\n break;\n }\n\n position.offsetX = xFactor * sideOffset;\n position.offsetY = yFactor * sideOffset;\n }\n\n if ([RdxPopoverAlign.Start, RdxPopoverAlign.End].includes(align) && alignOffset) {\n const alignOffsetFactor = align === RdxPopoverAlign.End ? -1 : 1;\n\n position.offsetX = alignOffsetFactor * alignOffset;\n }\n\n return position;\n}\n\nexport function getArrowPositionParams(\n sideAndAlign: RdxSideAndAlign,\n arrowWidthAndHeight: { width: number; height: number },\n triggerWidthAndHeight: { width: number; height: number }\n): RdxArrowPositionParams {\n const posParams = {\n top: '',\n bottom: '',\n left: '',\n right: '',\n transform: ''\n };\n\n if ([RdxPopoverSide.Top, RdxPopoverSide.Bottom].includes(sideAndAlign.side)) {\n if (sideAndAlign.side === RdxPopoverSide.Top) {\n posParams.top = '100%';\n } else {\n posParams.top = `-${arrowWidthAndHeight.height}px`;\n posParams.transform = `rotate(180deg)`;\n }\n\n if (sideAndAlign.align === RdxPopoverAlign.Start) {\n posParams.left = `${(triggerWidthAndHeight.width - arrowWidthAndHeight.width) / 2}px`;\n } else if (sideAndAlign.align === RdxPopoverAlign.Center) {\n posParams.left = `calc(50% - ${arrowWidthAndHeight.width / 2}px)`;\n } else if (sideAndAlign.align === RdxPopoverAlign.End) {\n posParams.right = `${(triggerWidthAndHeight.width - arrowWidthAndHeight.width) / 2}px`;\n }\n } else if ([RdxPopoverSide.Left, RdxPopoverSide.Right].includes(sideAndAlign.side)) {\n if (sideAndAlign.side === RdxPopoverSide.Left) {\n posParams.right = `-${arrowWidthAndHeight.width}px`;\n posParams.transform = `rotate(-90deg) translate(0, -50%)`;\n } else {\n posParams.left = `-${arrowWidthAndHeight.width}px`;\n posParams.transform = `rotate(90deg) translate(0, -50%)`;\n }\n\n if (sideAndAlign.align === RdxPopoverAlign.Start) {\n posParams.top = `${(triggerWidthAndHeight.height - arrowWidthAndHeight.height) / 2}px`;\n } else if (sideAndAlign.align === RdxPopoverAlign.Center) {\n posParams.top = `calc(50% - ${arrowWidthAndHeight.height / 2}px)`;\n } else if (sideAndAlign.align === RdxPopoverAlign.End) {\n posParams.bottom = `${(triggerWidthAndHeight.height - arrowWidthAndHeight.height) / 2}px`;\n }\n }\n\n return posParams;\n}\n","import { ConnectedOverlayPositionChange } from '@angular/cdk/overlay';\nimport {\n AfterViewInit,\n computed,\n Directive,\n effect,\n ElementRef,\n forwardRef,\n inject,\n input,\n Renderer2,\n signal,\n untracked\n} from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { RdxPopoverArrowToken } from './popover-arrow.token';\nimport { injectPopoverRoot } from './popover-root.inject';\nimport { getArrowPositionParams, getSideAndAlignFromAllPossibleConnectedPositions } from './popover.utils';\n\n@Directive({\n selector: '[rdxPopoverArrow]',\n standalone: true,\n providers: [\n {\n provide: RdxPopoverArrowToken,\n useExisting: forwardRef(() => RdxPopoverArrowDirective)\n }\n ]\n})\nexport class RdxPopoverArrowDirective implements AfterViewInit {\n /** @ignore */\n private readonly renderer = inject(Renderer2);\n /** @ignore */\n private readonly popoverRoot = injectPopoverRoot();\n /** @ignore */\n private readonly elementRef = inject(ElementRef);\n\n /**\n * The width of the arrow in pixels.\n */\n readonly width = input<number>(10);\n\n /**\n * The height of the arrow in pixels.\n */\n readonly height = input<number>(5);\n\n /** @ignore */\n readonly arrowSvgElement = computed<HTMLElement>(() => {\n const width = this.width();\n const height = this.height();\n\n const svgElement = this.renderer.createElement('svg', 'svg');\n this.renderer.setAttribute(svgElement, 'viewBox', '0 0 30 10');\n this.renderer.setAttribute(svgElement, 'width', String(width));\n this.renderer.setAttribute(svgElement, 'height', String(height));\n const polygonElement = this.renderer.createElement('polygon', 'svg');\n this.renderer.setAttribute(polygonElement, 'points', '0,0 30,0 15,10');\n this.renderer.setAttribute(svgElement, 'preserveAspectRatio', 'none');\n this.renderer.appendChild(svgElement, polygonElement);\n\n return svgElement;\n });\n\n /** @ignore */\n private readonly currentArrowSvgElement = signal<HTMLOrSVGElement | undefined>(void 0);\n /** @ignore */\n private readonly position = toSignal(this.popoverRoot.popoverContentDirective().positionChange());\n\n /** @ignore */\n private triggerRect: DOMRect;\n\n constructor() {\n this.onArrowSvgElementChangeEffect();\n this.onContentPositionChangeEffect();\n }\n\n /** @ignore */\n ngAfterViewInit() {\n if (this.elementRef.nativeElement.parentElement) {\n this.renderer.setStyle(this.elementRef.nativeElement.parentElement, 'position', 'relative');\n }\n this.renderer.setStyle(this.elementRef.nativeElement, 'position', 'absolute');\n this.renderer.setStyle(this.elementRef.nativeElement, 'boxSizing', '');\n this.renderer.setStyle(this.elementRef.nativeElement, 'fontSize', '0px');\n this.triggerRect = this.popoverRoot.popoverTriggerDirective().elementRef.nativeElement.getBoundingClientRect();\n }\n\n /** @ignore */\n private setPosition(position: ConnectedOverlayPositionChange) {\n const posParams = getArrowPositionParams(\n getSideAndAlignFromAllPossibleConnectedPositions(position.connectionPair),\n { width: this.width(), height: this.height() },\n { width: this.triggerRect.width, height: this.triggerRect.height }\n );\n\n this.renderer.setStyle(this.elementRef.nativeElement, 'top', posParams.top);\n this.renderer.setStyle(this.elementRef.nativeElement, 'bottom', posParams.bottom);\n this.renderer.setStyle(this.elementRef.nativeElement, 'left', posParams.left);\n this.renderer.setStyle(this.elementRef.nativeElement, 'right', posParams.right);\n this.renderer.setStyle(this.elementRef.nativeElement, 'transform', posParams.transform);\n }\n\n /** @ignore */\n private onArrowSvgElementChangeEffect() {\n effect(() => {\n const arrowElement = this.arrowSvgElement();\n untracked(() => {\n const currentArrowSvgElement = this.currentArrowSvgElement();\n if (currentArrowSvgElement) {\n this.renderer.removeChild(this.elementRef.nativeElement, currentArrowSvgElement);\n }\n this.currentArrowSvgElement.set(arrowElement);\n this.renderer.setStyle(this.elementRef.nativeElement, 'width', `${this.width()}px`);\n this.renderer.setStyle(this.elementRef.nativeElement, 'height', `${this.height()}px`);\n this.renderer.appendChild(this.elementRef.nativeElement, this.currentArrowSvgElement());\n });\n });\n }\n\n /** @ignore */\n private onContentPositionChangeEffect() {\n effect(() => {\n const position = this.position();\n untracked(() => {\n if (!position) {\n return;\n }\n this.setPosition(position);\n });\n });\n }\n}\n","import { Directive, effect, ElementRef, inject, Renderer2, untracked } from '@angular/core';\nimport { injectPopoverRoot } from './popover-root.inject';\n\n@Directive({\n selector: '[rdxPopoverClose]',\n standalone: true,\n host: {\n type: 'button',\n '(click)': 'popoverRoot.handleClose()'\n }\n})\nexport class RdxPopoverCloseDirective {\n /** @ignore */\n readonly popoverRoot = injectPopoverRoot();\n /** @ignore */\n readonly elementRef = inject(ElementRef);\n /** @ignore */\n private readonly renderer = inject(Renderer2);\n\n constructor() {\n this.onIsControlledExternallyEffect();\n }\n\n /** @ignore */\n private onIsControlledExternallyEffect() {\n effect(() => {\n const isControlledExternally = this.popoverRoot.controlledExternally()();\n\n untracked(() => {\n this.renderer.setStyle(\n this.elementRef.nativeElement,\n 'display',\n isControlledExternally ? 'none' : null\n );\n });\n });\n }\n}\n","import { CdkConnectedOverlay, Overlay } from '@angular/cdk/overlay';\nimport {\n computed,\n DestroyRef,\n Directive,\n effect,\n inject,\n input,\n OnInit,\n output,\n SimpleChange,\n TemplateRef,\n untracked\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { filter, tap } from 'rxjs';\nimport { injectPopoverRoot } from './popover-root.inject';\nimport { DEFAULTS } from './popover.constants';\nimport { RdxPopoverAlign, RdxPopoverSide, RdxSideAndAlignOffsets } from './popover.types';\nimport { getAllPossibleConnectedPositions, getContentPosition } from './popover.utils';\n\n@Directive({\n selector: '[rdxPopoverContent]',\n standalone: true,\n hostDirectives: [\n CdkConnectedOverlay\n ]\n})\nexport class RdxPopoverContentDirective implements OnInit {\n /** @ignore */\n readonly popoverRoot = injectPopoverRoot();\n /** @ignore */\n readonly templateRef = inject(TemplateRef);\n /** @ignore */\n readonly overlay = inject(Overlay);\n /** @ignore */\n readonly destroyRef = inject(DestroyRef);\n /** @ignore */\n private readonly connectedOverlay = inject(CdkConnectedOverlay);\n\n /**\n * The preferred side of the trigger to render against when open. Will be reversed when collisions occur and avoidCollisions is enabled.\n */\n readonly side = input<RdxPopoverSide>(RdxPopoverSide.Top);\n /**\n * The distance in pixels from the trigger.\n */\n readonly sideOffset = input<number | undefined>(void 0);\n\n /**\n * The preferred alignment against the trigger. May change when collisions occur.\n */\n readonly align = input<RdxPopoverAlign>(RdxPopoverAlign.Center);\n /**\n * An offset in pixels from the \"start\" or \"end\" alignment options.\n */\n readonly alignOffset = input<number | undefined>(void 0);\n\n /**\n * Whether to add some alternate positions of the content.\n */\n readonly disableAlternatePositions = input(false);\n\n /** @ingore */\n readonly positions = computed(() => {\n const greatestDimensionFromTheArrow = Math.max(\n this.popoverRoot.popoverArrowDirective()?.width() ?? 0,\n this.popoverRoot.popoverArrowDirective()?.height() ?? 0\n );\n const offsets: RdxSideAndAlignOffsets = {\n sideOffset: this.sideOffset() ?? (greatestDimensionFromTheArrow || DEFAULTS.offsets.side),\n alignOffset: this.alignOffset() ?? DEFAULTS.offsets.align\n };\n const basePosition = getContentPosition({\n side: this.side(),\n align: this.align(),\n sideOffset: offsets.sideOffset,\n alignOffset: offsets.alignOffset\n });\n const positions = [basePosition];\n if (!this.disableAlternatePositions()) {\n /**\n * Alternate positions for better user experience along the X/Y axis (e.g. vertical/horizontal scrolling)\n */\n const allPossibleConnectedPositions = getAllPossibleConnectedPositions();\n allPossibleConnectedPositions.forEach((_, key) => {\n const sideAndAlignArray = key.split('|');\n if (\n (sideAndAlignArray[0] as RdxPopoverSide) !== this.side() ||\n (sideAndAlignArray[1] as RdxPopoverAlign) !== this.align()\n ) {\n positions.push(\n getContentPosition({\n side: sideAndAlignArray[0] as RdxPopoverSide,\n align: sideAndAlignArray[1] as RdxPopoverAlign,\n sideOffset: offsets.sideOffset,\n alignOffset: offsets.alignOffset\n })\n );\n }\n });\n }\n return positions;\n });\n\n /**\n * Event handler called when the escape key is down. It can be prevented by calling event.preventDefault.\n */\n readonly onEscapeKeyDown = output<KeyboardEvent>();\n\n /**\n * Event handler called when a pointer event occurs outside the bounds of the component. It can be prevented by calling event.preventDefault.\n */\n readonly onPointerDownOutside = output<MouseEvent>();\n\n /**\n * Event handler called when the overlay is atached\n */\n readonly onShow = output<void>();\n /**\n * Event handler called when the overlay is detached\n */\n readonly onHide = output<void>();\n\n constructor() {\n this.onPositionChangeEffect();\n }\n\n /** @ignore */\n ngOnInit() {\n this.setOrigin();\n this.setScrollStrategy();\n this.setDisableClose();\n this.onAttach();\n this.onDetach();\n this.connectKeydownEscape();\n this.connectOutsideClick();\n }\n\n /** @ignore */\n show() {\n const prevOpen = this.connectedOverlay.open;\n this.connectedOverlay.open = true;\n if (!prevOpen) {\n this.connectedOverlay.ngOnChanges({ open: new SimpleChange(prevOpen, true, false) });\n }\n }\n\n /** @ignore */\n hide() {\n const prevOpen = this.connectedOverlay.open;\n this.connectedOverlay.open = false;\n if (prevOpen) {\n this.connectedOverlay.ngOnChanges({ open: new SimpleChange(prevOpen, false, false) });\n }\n }\n\n /** @ignore */\n positionChange() {\n return this.connectedOverlay.positionChange.asObservable();\n }\n\n /** @ignore */\n private connectKeydownEscape() {\n this.connectedOverlay.overlayKeydown\n .asObservable()\n .pipe(\n filter((event) => event.key === 'Escape'),\n tap((event) => {\n this.onEscapeKeyDown.emit(event);\n if (!event.defaultPrevented) {\n this.popoverRoot.handleClose();\n }\n }),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe();\n }\n\n /** @ignore */\n private connectOutsideClick() {\n this.connectedOverlay.overlayOutsideClick\n .asObservable()\n .pipe(\n tap((event) => {\n this.onPointerDownOutside.emit(event);\n if (!event.defaultPrevented) {\n this.popoverRoot.handleClose();\n }\n }),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe();\n }\n\n /** @ignore */\n private onAttach() {\n this.connectedOverlay.attach\n .asObservable()\n .pipe(\n tap(() => {\n this.onShow.emit();\n }),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe();\n }\n\n /** @ignore */\n private onDetach() {\n this.connectedOverlay.detach\n .asObservable()\n .pipe(\n tap(() => {\n this.onHide.emit();\n }),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe();\n }\n\n /** @ignore */\n private setScrollStrategy() {\n const prevScrollStrategy = this.connectedOverlay.scrollStrategy;\n this.connectedOverlay.scrollStrategy = this.overlay.scrollStrategies.reposition();\n this.connectedOverlay.ngOnChanges({\n scrollStrategy: new SimpleChange(prevScrollStrategy, this.connectedOverlay.scrollStrategy, false)\n });\n }\n\n /** @ignore */\n private setDisableClose() {\n const prevDisableClose = this.connectedOverlay.disableClose;\n this.connectedOverlay.disableClose = true;\n this.connectedOverlay.ngOnChanges({\n disableClose: new SimpleChange(prevDisableClose, this.connectedOverlay.disableClose, false)\n });\n }\n\n /** @ignore */\n private setOrigin() {\n const prevOrigin = this.connectedOverlay.origin;\n this.connectedOverlay.origin = this.popoverRoot.popoverTriggerDirective().overlayOrigin;\n this.connectedOverlay.ngOnChanges({\n origin: new SimpleChange(prevOrigin, this.connectedOverlay.origin, false)\n });\n }\n\n /** @ignore */\n private onPositionChangeEffect() {\n effect(() => {\n const positions = this.positions();\n this.disableAlternatePositions();\n untracked(() => {\n const prevPositions = this.connectedOverlay.positions;\n this.connectedOverlay.positions = positions;\n this.connectedOverlay.ngOnChanges({\n positions: new SimpleChange(prevPositions, this.connectedOverlay.positions, false)\n });\n this.connectedOverlay.overlayRef?.updatePosition();\n });\n });\n }\n}\n","import { CdkOverlayOrigin } from '@angular/cdk/overlay';\nimport { computed, Directive, ElementRef, inject } from '@angular/core';\nimport { injectPopoverRoot } from './popover-root.inject';\n\n@Directive({\n selector: '[rdxPopoverTrigger]',\n standalone: true,\n hostDirectives: [CdkOverlayOrigin],\n host: {\n type: 'button',\n '[attr.id]': 'name()',\n '[attr.aria-haspopup]': '\"dialog\"',\n '[attr.aria-expanded]': 'popoverRoot.isOpen()',\n '[attr.aria-controls]': 'controlsId()',\n '[attr.data-state]': 'popoverRoot.state()',\n '(click)': 'onClick()'\n }\n})\nexport class RdxPopoverTriggerDirective {\n /** @ignore */\n readonly popoverRoot = injectPopoverRoot();\n /** @ignore */\n readonly elementRef = inject(ElementRef);\n /** @ignore */\n readonly overlayOrigin = inject(CdkOverlayOrigin);\n\n /** @ignore */\n readonly name = computed(() => `rdx-popover-trigger-${this.popoverRoot.uniqueId()}`);\n /** @ignore */\n readonly controlsId = computed(() => `rdx-popover-trigger-controls-${this.popoverRoot.uniqueId()}`);\n\n /** @ignore */\n onClick(): void {\n this.popoverRoot.handleToggle();\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n computed,\n contentChild,\n Directive,\n effect,\n forwardRef,\n inject,\n input,\n OnInit,\n output,\n signal,\n untracked,\n ViewContainerRef\n} from '@angular/core';\nimport { RdxPopoverArrowToken } from './popover-arrow.token';\nimport { RdxPopoverContentDirective } from './popover-content.directive';\nimport { RdxPopoverRootToken } from './popover-root.token';\nimport { RdxPopoverTriggerDirective } from './popover-trigger.directive';\nimport { RdxPopoverState } from './popover.types';\n\nlet nextId = 0;\n\n@Directive({\n selector: '[rdxPopoverRoot]',\n standalone: true,\n providers: [\n {\n provide: RdxPopoverRootToken,\n useExisting: forwardRef(() => RdxPopoverRootDirective)\n }\n ],\n exportAs: 'rdxPopoverRoot'\n})\nexport class RdxPopoverRootDirective implements OnInit {\n readonly uniqueId = signal(++nextId);\n readonly name = computed(() => `rdx-popover-root-${this.uniqueId()}`);\n\n /**\n * The open state of the popover when it is initially rendered. Use when you do not need to control its open state.\n */\n readonly defaultOpen = input<boolean>(false);\n /**\n * The controlled open state of the popover. Must be used in conjunction with onOpenChange.\n */\n readonly open = input<boolean | undefined>();\n\n /**\n * Event handler called when the open state of the popover changes.\n */\n readonly onOpenChange = output<boolean>();\n\n /** @ignore */\n readonly popoverContentDirective = contentChild.required(RdxPopoverContentDirective);\n /** @ignore */\n readonly popoverTriggerDirective = contentChild.required(RdxPopoverTriggerDirective);\n /** @ignore */\n readonly popoverArrowDirective = contentChild(RdxPopoverArrowToken);\n\n /** @ignore */\n readonly viewContainerRef = inject(ViewContainerRef);\n /** @ignore */\n private readonly document = inject(DOCUMENT);\n\n /** @ignore */\n readonly isOpen = signal<boolean>(this.defaultOpen());\n /** @ignore */\n readonly state = computed<RdxPopoverState>(() => {\n const currentIsOpen = this.isOpen();\n if (currentIsOpen) {\n return 'open';\n }\n return 'closed';\n });\n\n /** @ignore */\n private isControlledExternally = computed(() => signal(this.open() !== void 0));\n\n constructor() {\n this.onOpenChangeEffect();\n this.onIsOpenChangeEffect();\n }\n\n /** @ignore */\n ngOnInit(): void {\n if (this.defaultOpen()) {\n this.handleOpen();\n }\n }\n\n /** @ignore */\n controlledExternally() {\n return this.isControlledExternally().asReadonly();\n }\n\n /** @ignore */\n handleOpen(): void {\n if (this.isControlledExternally()()) {\n return;\n }\n this.setOpen(true);\n }\n\n /** @ignore */\n handleClose(): void {\n if (this.isControlledExternally()()) {\n return;\n }\n this.setOpen(false);\n }\n\n /** @ignore */\n handleToggle(): void {\n if (this.isControlledExternally()()) {\n return;\n }\n this.isOpen() ? this.handleClose() : this.handleOpen();\n }\n\n /** @ignore */\n private setOpen(open = false): void {\n this.document.dispatchEvent(\n new CustomEvent(`popover.${open ? 'open' : 'close'}`, {\n detail: {\n id: this.name()\n }\n })\n );\n\n this.isOpen.set(open);\n this.onOpenChange.emit(open);\n }\n\n /** @ignore */\n private show(): void {\n this.popoverContentDirective().show();\n }\n\n /** @ignore */\n private hide(): void {\n this.popoverContentDirective().hide();\n }\n\n /** @ignore */\n private onIsOpenChangeEffect() {\n effect(() => {\n const isOpen = this.isOpen();\n\n untracked(() => {\n if (isOpen) {\n this.show();\n } else {\n this.hide();\n }\n });\n });\n }\n\n /** @ignore */\n private onOpenChangeEffect() {\n effect(() => {\n const currentOpen = this.open();\n\n untracked(() => {\n this.isControlledExternally().set(currentOpen !== void 0);\n if (this.isControlledExternally()()) {\n this.setOpen(currentOpen);\n }\n });\n });\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RdxPopoverArrowDirective } from './src/popover-arrow.directive';\nimport { RdxPopoverCloseDirective } from './src/popover-close.directive';\nimport { RdxPopoverContentDirective } from './src/popover-content.directive';\nimport { RdxPopoverRootDirective } from './src/popover-root.directive';\nimport { RdxPopoverTriggerDirective } from './src/popover-trigger.directive';\n\nexport * from './src/popover-arrow.directive';\nexport * from './src/popover-close.directive';\nexport * from './src/popover-content.directive';\nexport * from './src/popover-root.directive';\nexport * from './src/popover-trigger.directive';\nexport * from './src/popover.types';\n\nconst _imports = [\n RdxPopoverArrowDirective,\n RdxPopoverCloseDirective,\n RdxPopoverContentDirective,\n RdxPopoverTriggerDirective,\n RdxPopoverRootDirective\n];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxPopoverModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAGO,MAAM,oBAAoB,GAAG,IAAI,cAAc,CAA2B,sBAAsB,CAAC;;ACAjG,MAAM,mBAAmB,GAAG,IAAI,cAAc,CAA0B,qBAAqB,CAAC;;SCCrF,iBAAiB,GAAA;AAC7B,IAAA,SAAS,EAAE,IAAI,wBAAwB,CAAC,iBAAiB,CAAC;AAC1D,IAAA,OAAO,MAAM,CAAC,mBAAmB,CAAC;AACtC;;ICLY;AAAZ,CAAA,UAAY,cAAc,EAAA;AACtB,IAAA,cAAA,CAAA,KAAA,CAAA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,wBAAwB;YACxB,0BAA0B;YAC1B,0BAA0B;YAC1B,uBAAuB,CAAA,EAAA,CAAA,CAAA;gHAOd,gBAAgB,EAAA,CAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC;AACtB,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ;AACxB,iBAAA;;;ACzBD;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-popover.mjs","sources":["../../../packages/primitives/popover/src/popover-anchor.token.ts","../../../packages/primitives/popover/src/popover-arrow.token.ts","../../../packages/primitives/popover/src/popover-close.token.ts","../../../packages/primitives/popover/src/popover-content-attributes.token.ts","../../../packages/primitives/popover/src/popover.types.ts","../../../packages/primitives/popover/src/popover.constants.ts","../../../packages/primitives/popover/src/popover.utils.ts","../../../packages/primitives/popover/src/popover-content.directive.ts","../../../packages/primitives/popover/src/popover-trigger.directive.ts","../../../packages/primitives/popover/src/popover-root.directive.ts","../../../packages/primitives/popover/src/popover-root.inject.ts","../../../packages/primitives/popover/src/popover-anchor.directive.ts","../../../packages/primitives/popover/src/popover-arrow.directive.ts","../../../packages/primitives/popover/src/popover-close.directive.ts","../../../packages/primitives/popover/src/popover-content-attributes.component.ts","../../../packages/primitives/popover/index.ts","../../../packages/primitives/popover/radix-ng-primitives-popover.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { RdxPopoverAnchorDirective } from './popover-anchor.directive';\n\nexport const RdxPopoverAnchorToken = new InjectionToken<RdxPopoverAnchorDirective>('RdxPopoverAnchorToken');\n","import { InjectionToken } from '@angular/core';\nimport { RdxPopoverArrowDirective } from './popover-arrow.directive';\n\nexport const RdxPopoverArrowToken = new InjectionToken<RdxPopoverArrowDirective>('RdxPopoverArrowToken');\n","import { InjectionToken } from '@angular/core';\nimport { RdxPopoverCloseDirective } from './popover-close.directive';\n\nexport const RdxPopoverCloseToken = new InjectionToken<RdxPopoverCloseDirective>('RdxPopoverCloseToken');\n","import { InjectionToken } from '@angular/core';\nimport { RdxPopoverContentAttributesComponent } from './popover-content-attributes.component';\n\nexport const RdxPopoverContentAttributesToken = new InjectionToken<RdxPopoverContentAttributesComponent>(\n 'RdxPopoverContentAttributesToken'\n);\n","import { ConnectionPositionPair } from '@angular/cdk/overlay';\n\nexport enum RdxPopoverSide {\n Top = 'top',\n Right = 'right',\n Bottom = 'bottom',\n Left = 'left'\n}\n\nexport enum RdxPopoverAlign {\n Start = 'start',\n Center = 'center',\n End = 'end'\n}\n\nexport enum RdxPopoverState {\n OPEN = 'open',\n CLOSED = 'closed'\n}\n\nexport enum RdxPopoverAttachDetachEvent {\n ATTACH = 'attach',\n DETACH = 'detach'\n}\n\nexport enum RdxPopoverAnimationStatus {\n OPEN_STARTED = 'open_started',\n OPEN_ENDED = 'open_ended',\n CLOSED_STARTED = 'closed_started',\n CLOSED_ENDED = 'closed_ended'\n}\n\nexport type RdxSideAndAlign = { side: RdxPopoverSide; align: RdxPopoverAlign };\nexport type RdxSideAndAlignOffsets = { sideOffset: number; alignOffset: number };\n\nexport type RdxPopoverPositions = {\n [key in RdxPopoverSide]: {\n [key in RdxPopoverAlign]: ConnectionPositionPair;\n };\n};\n\nexport type RdxAllPossibleConnectedPositions = ReadonlyMap<\n `${RdxPopoverSide}|${RdxPopoverAlign}`,\n ConnectionPositionPair\n>;\n\nexport type RdxArrowPositionParams = {\n top: string;\n left: string;\n transform: string;\n};\n","import { RdxPopoverAlign, RdxPopoverPositions, RdxPopoverSide } from './popover.types';\n\nexport const POPOVER_POSITIONS: RdxPopoverPositions = {\n [RdxPopoverSide.Top]: {\n [RdxPopoverAlign.Center]: {\n originX: 'center',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'bottom'\n },\n [RdxPopoverAlign.Start]: {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom'\n },\n [RdxPopoverAlign.End]: {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom'\n }\n },\n [RdxPopoverSide.Right]: {\n [RdxPopoverAlign.Center]: {\n originX: 'end',\n originY: 'center',\n overlayX: 'start',\n overlayY: 'center'\n },\n [RdxPopoverAlign.Start]: {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top'\n },\n [RdxPopoverAlign.End]: {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'bottom'\n }\n },\n [RdxPopoverSide.Bottom]: {\n [RdxPopoverAlign.Center]: {\n originX: 'center',\n originY: 'bottom',\n overlayX: 'center',\n overlayY: 'top'\n },\n [RdxPopoverAlign.Start]: {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top'\n },\n [RdxPopoverAlign.End]: {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top'\n }\n },\n [RdxPopoverSide.Left]: {\n [RdxPopoverAlign.Center]: {\n originX: 'start',\n originY: 'center',\n overlayX: 'end',\n overlayY: 'center'\n },\n [RdxPopoverAlign.Start]: {\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'top'\n },\n [RdxPopoverAlign.End]: {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'bottom'\n }\n }\n} as const;\n\nexport const DEFAULTS = {\n offsets: {\n side: 10,\n align: 0\n }\n} as const;\n","import { ConnectedPosition, ConnectionPositionPair } from '@angular/cdk/overlay';\nimport { POPOVER_POSITIONS } from './popover.constants';\nimport {\n RdxAllPossibleConnectedPositions,\n RdxArrowPositionParams,\n RdxPopoverAlign,\n RdxPopoverSide,\n RdxSideAndAlign,\n RdxSideAndAlignOffsets\n} from './popover.types';\n\nlet allPossibleConnectedPositions: RdxAllPossibleConnectedPositions;\nexport function getAllPossibleConnectedPositions() {\n if (!allPossibleConnectedPositions) {\n allPossibleConnectedPositions = new Map();\n }\n if (allPossibleConnectedPositions.size < 1) {\n Object.keys(POPOVER_POSITIONS).forEach((side) => {\n Object.keys(POPOVER_POSITIONS[side as RdxPopoverSide] ?? {}).forEach((align) => {\n (allPossibleConnectedPositions as Map<any, any>).set(\n `${side as RdxPopoverSide}|${align as RdxPopoverAlign}`,\n POPOVER_POSITIONS[side as RdxPopoverSide][align as RdxPopoverAlign]\n );\n });\n });\n }\n return allPossibleConnectedPositions;\n}\n\nexport function getSideAndAlignFromAllPossibleConnectedPositions(position: ConnectionPositionPair): RdxSideAndAlign {\n const allPossibleConnectedPositions = getAllPossibleConnectedPositions();\n let sideAndAlign: RdxSideAndAlign | undefined;\n allPossibleConnectedPositions.forEach((value, key) => {\n if (\n position.originX === value.originX &&\n position.originY === value.originY &&\n position.overlayX === value.overlayX &&\n position.overlayY === value.overlayY\n ) {\n const sideAndAlignArray = key.split('|');\n sideAndAlign = {\n side: sideAndAlignArray[0] as RdxPopoverSide,\n align: sideAndAlignArray[1] as RdxPopoverAlign\n };\n }\n });\n if (!sideAndAlign) {\n throw Error(\n `[RdxPopover] cannot infer both side and align from the given position (${JSON.stringify(position)})`\n );\n }\n return sideAndAlign;\n}\n\nexport function getContentPosition(\n sideAndAlignWithOffsets: RdxSideAndAlign & RdxSideAndAlignOffsets\n): ConnectedPosition {\n const { side, align, sideOffset, alignOffset } = sideAndAlignWithOffsets;\n\n const position = {\n ...(POPOVER_POSITIONS[side]?.[align] ?? POPOVER_POSITIONS[RdxPopoverSide.Top][RdxPopoverAlign.Center])\n };\n\n if (sideOffset > 0) {\n let xFactor = 0;\n let yFactor = 0;\n\n switch (side) {\n case RdxPopoverSide.Top:\n yFactor = -1;\n break;\n case RdxPopoverSide.Bottom:\n yFactor = 1;\n break;\n case RdxPopoverSide.Left:\n xFactor = -1;\n break;\n case RdxPopoverSide.Right:\n xFactor = 1;\n break;\n }\n\n position.offsetX = xFactor * sideOffset;\n position.offsetY = yFactor * sideOffset;\n }\n\n if ([RdxPopoverAlign.Start, RdxPopoverAlign.End].includes(align) && alignOffset) {\n const alignOffsetFactor = align === RdxPopoverAlign.End ? -1 : 1;\n\n position.offsetX = alignOffsetFactor * alignOffset;\n }\n\n return position;\n}\n\nexport function getArrowPositionParams(\n sideAndAlign: RdxSideAndAlign,\n arrowWidthAndHeight: { width: number; height: number },\n triggerWidthAndHeight: { width: number; height: number }\n): RdxArrowPositionParams {\n const posParams: RdxArrowPositionParams = {\n top: '',\n left: '',\n transform: ''\n };\n\n if ([RdxPopoverSide.Top, RdxPopoverSide.Bottom].includes(sideAndAlign.side)) {\n if (sideAndAlign.side === RdxPopoverSide.Top) {\n posParams.top = '100%';\n } else {\n posParams.top = `-${arrowWidthAndHeight.height}px`;\n posParams.transform = `rotate(180deg)`;\n }\n\n if (sideAndAlign.align === RdxPopoverAlign.Start) {\n posParams.left = `${(triggerWidthAndHeight.width - arrowWidthAndHeight.width) / 2}px`;\n } else if (sideAndAlign.align === RdxPopoverAlign.Center) {\n posParams.left = `calc(50% - ${arrowWidthAndHeight.width / 2}px)`;\n } else if (sideAndAlign.align === RdxPopoverAlign.End) {\n posParams.left = `calc(100% - ${(triggerWidthAndHeight.width + arrowWidthAndHeight.width) / 2}px)`;\n }\n } else if ([RdxPopoverSide.Left, RdxPopoverSide.Right].includes(sideAndAlign.side)) {\n if (sideAndAlign.side === RdxPopoverSide.Left) {\n posParams.left = `100%`;\n posParams.transform = `rotate(-90deg) translate(0, -50%)`;\n } else {\n posParams.left = `-${arrowWidthAndHeight.width}px`;\n posParams.transform = `rotate(90deg) translate(0, -50%)`;\n }\n\n if (sideAndAlign.align === RdxPopoverAlign.Start) {\n posParams.top = `${(triggerWidthAndHeight.height - arrowWidthAndHeight.height) / 2}px`;\n } else if (sideAndAlign.align === RdxPopoverAlign.Center) {\n posParams.top = `calc(50% - ${arrowWidthAndHeight.height / 2}px)`;\n } else if (sideAndAlign.align === RdxPopoverAlign.End) {\n posParams.top = `calc(100% - ${(triggerWidthAndHeight.height + arrowWidthAndHeight.height) / 2}px)`;\n }\n }\n\n return posParams;\n}\n","import { CdkConnectedOverlay, Overlay } from '@angular/cdk/overlay';\nimport {\n computed,\n DestroyRef,\n Directive,\n effect,\n inject,\n input,\n OnInit,\n output,\n SimpleChange,\n TemplateRef,\n untracked\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { filter, tap } from 'rxjs';\nimport { injectPopoverRoot } from './popover-root.inject';\nimport { DEFAULTS } from './popover.constants';\nimport { RdxPopoverAlign, RdxPopoverAttachDetachEvent, RdxPopoverSide, RdxSideAndAlignOffsets } from './popover.types';\nimport { getAllPossibleConnectedPositions, getContentPosition } from './popover.utils';\n\n@Directive({\n selector: '[rdxPopoverContent]',\n standalone: true,\n hostDirectives: [\n CdkConnectedOverlay\n ]\n})\nexport class RdxPopoverContentDirective implements OnInit {\n /** @ignore */\n private readonly popoverRoot = injectPopoverRoot();\n /** @ignore */\n private readonly templateRef = inject(TemplateRef);\n /** @ignore */\n private readonly overlay = inject(Overlay);\n /** @ignore */\n private readonly destroyRef = inject(DestroyRef);\n /** @ignore */\n private readonly connectedOverlay = inject(CdkConnectedOverlay);\n\n /** @ignore */\n readonly name = computed(() => `rdx-popover-trigger-${this.popoverRoot.uniqueId()}`);\n\n /**\n * @description The preferred side of the trigger to render against when open. Will be reversed when collisions occur and avoidCollisions is enabled.\n * @default top\n */\n readonly side = input<RdxPopoverSide>(RdxPopoverSide.Top);\n /**\n * @description The distance in pixels from the trigger.\n * @default undefined\n */\n readonly sideOffset = input<number | undefined>(void 0);\n /**\n * @description The preferred alignment against the trigger. May change when collisions occur.\n * @default center\n */\n readonly align = input<RdxPopoverAlign>(RdxPopoverAlign.Center);\n /**\n * @description An offset in pixels from the \"start\" or \"end\" alignment options.\n * @default undefined\n */\n readonly alignOffset = input<number | undefined>(void 0);\n\n /**\n * @description Whether to add some alternate positions of the content.\n * @default false\n */\n readonly disableAlternatePositions = input(false);\n\n /**\n * @description Event handler called when the escape key is down. It can be prevented by calling event.preventDefault.\n */\n readonly onEscapeKeyDown = output<KeyboardEvent>();\n\n /**\n * @description Event handler called when a pointer event occurs outside the bounds of the component. It can be prevented by calling event.preventDefault.\n */\n readonly onOutsideClick = output<MouseEvent>();\n\n /**\n * @description Event handler called after the overlay is open\n */\n readonly onOpen = output<void>();\n /**\n * @description Event handler called after the overlay is closed\n */\n readonly onClosed = output<void>();\n\n /** @ingore */\n readonly positions = computed(() => this.computePositions());\n\n constructor() {\n this.onOriginChangeEffect();\n this.onPositionChangeEffect();\n }\n\n /** @ignore */\n ngOnInit() {\n this.setScrollStrategy();\n this.setDisableClose();\n this.onAttach();\n this.onDetach();\n this.connectKeydownEscape();\n this.connectOutsideClick();\n }\n\n /** @ignore */\n open() {\n if (this.connectedOverlay.open) {\n return;\n }\n const prevOpen = this.connectedOverlay.open;\n this.connectedOverlay.open = true;\n this.fireOverlayNgOnChanges('open', this.connectedOverlay.open, prevOpen);\n }\n\n /** @ignore */\n close() {\n if (!this.connectedOverlay.open) {\n return;\n }\n const prevOpen = this.connectedOverlay.open;\n this.connectedOverlay.open = false;\n this.fireOverlayNgOnChanges('open', this.connectedOverlay.open, prevOpen);\n }\n\n /** @ignore */\n positionChange() {\n return this.connectedOverlay.positionChange.asObservable();\n }\n\n /** @ignore */\n private connectKeydownEscape() {\n this.connectedOverlay.overlayKeydown\n .asObservable()\n .pipe(\n filter((event) => event.key === 'Escape'),\n tap((event) => {\n this.onEscapeKeyDown.emit(event);\n }),\n filter((event) => !event.defaultPrevented && !this.popoverRoot.firstDefaultOpen()),\n tap(() => {\n this.popoverRoot.handleClose();\n }),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe();\n }\n\n /** @ignore */\n private connectOutsideClick() {\n this.connectedOverlay.overlayOutsideClick\n .asObservable()\n .pipe(\n /**\n * Handle the situation when an anchor is added and the anchor becomes the origin of the overlay\n * hence the trigger will be considered the outside element\n */\n filter((event) => {\n return (\n !this.popoverRoot.popoverAnchorDirective() ||\n !this.popoverRoot\n .popoverTriggerDirective()\n .elementRef.nativeElement.contains(event.target as Element)\n );\n }),\n tap((event) => {\n this.onOutsideClick.emit(event);\n }),\n filter((event) => !event.defaultPrevented && !this.popoverRoot.firstDefaultOpen()),\n tap(() => {\n this.popoverRoot.handleClose();\n }),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe();\n }\n\n /** @ignore */\n private onAttach() {\n this.connectedOverlay.attach\n .asObservable()\n .pipe(\n tap(() => {\n /**\n * `this.onOpen.emit();` is being delegated to the root directive due to the opening animation\n */\n this.popoverRoot.attachDetachEvent.set(RdxPopoverAttachDetachEvent.ATTACH);\n }),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe();\n }\n\n /** @ignore */\n private onDetach() {\n this.connectedOverlay.detach\n .asObservable()\n .pipe(\n tap(() => {\n /**\n * `this.onClosed.emit();` is being delegated to the root directive due to the closing animation\n */\n this.popoverRoot.attachDetachEvent.set(RdxPopoverAttachDetachEvent.DETACH);\n }),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe();\n }\n\n /** @ignore */\n private setScrollStrategy() {\n const prevScrollStrategy = this.connectedOverlay.scrollStrategy;\n this.connectedOverlay.scrollStrategy = this.overlay.scrollStrategies.reposition();\n this.fireOverlayNgOnChanges('scrollStrategy', this.connectedOverlay.scrollStrategy, prevScrollStrategy);\n }\n\n /** @ignore */\n private setDisableClose() {\n const prevDisableClose = this.connectedOverlay.disableClose;\n this.connectedOverlay.disableClose = true;\n this.fireOverlayNgOnChanges('disableClose', this.connectedOverlay.disableClose, prevDisableClose);\n }\n\n /** @ignore */\n private setOrigin(origin: CdkConnectedOverlay['origin']) {\n const prevOrigin = this.connectedOverlay.origin;\n this.connectedOverlay.origin = origin;\n this.fireOverlayNgOnChanges('origin', this.connectedOverlay.origin, prevOrigin);\n }\n\n /** @ignore */\n private setPositions(positions: CdkConnectedOverlay['positions']) {\n const prevPositions = this.connectedOverlay.positions;\n this.connectedOverlay.positions = positions;\n this.fireOverlayNgOnChanges('positions', this.connectedOverlay.positions, prevPositions);\n this.connectedOverlay.overlayRef?.updatePosition();\n }\n\n /** @ignore */\n private computePositions() {\n const greatestDimensionFromTheArrow = Math.max(\n this.popoverRoot.popoverArrowDirective()?.width() ?? 0,\n this.popoverRoot.popoverArrowDirective()?.height() ?? 0\n );\n const offsets: RdxSideAndAlignOffsets = {\n sideOffset: this.sideOffset() ?? (greatestDimensionFromTheArrow || DEFAULTS.offsets.side),\n alignOffset: this.alignOffset() ?? DEFAULTS.offsets.align\n };\n const basePosition = getContentPosition({\n side: this.side(),\n align: this.align(),\n sideOffset: offsets.sideOffset,\n alignOffset: offsets.alignOffset\n });\n const positions = [basePosition];\n if (!this.disableAlternatePositions()) {\n /**\n * Alternate positions for better user experience along the X/Y axis (e.g. vertical/horizontal scrolling)\n */\n const allPossibleConnectedPositions = getAllPossibleConnectedPositions();\n allPossibleConnectedPositions.forEach((_, key) => {\n const sideAndAlignArray = key.split('|');\n if (\n (sideAndAlignArray[0] as RdxPopoverSide) !== this.side() ||\n (sideAndAlignArray[1] as RdxPopoverAlign) !== this.align()\n ) {\n positions.push(\n getContentPosition({\n side: sideAndAlignArray[0] as RdxPopoverSide,\n align: sideAndAlignArray[1] as RdxPopoverAlign,\n sideOffset: offsets.sideOffset,\n alignOffset: offsets.alignOffset\n })\n );\n }\n });\n }\n return positions;\n }\n\n private onOriginChangeEffect() {\n effect(() => {\n const origin = (this.popoverRoot.popoverAnchorDirective() ?? this.popoverRoot.popoverTriggerDirective())\n .overlayOrigin;\n untracked(() => {\n this.setOrigin(origin);\n });\n });\n }\n\n /** @ignore */\n private onPositionChangeEffect() {\n effect(() => {\n const positions = this.positions();\n this.disableAlternatePositions();\n untracked(() => {\n this.setPositions(positions);\n });\n });\n }\n\n /** @ignore */\n private fireOverlayNgOnChanges<K extends keyof CdkConnectedOverlay, V extends CdkConnectedOverlay[K]>(\n input: K,\n currentValue: V,\n previousValue: V,\n firstChange = false\n ) {\n this.connectedOverlay.ngOnChanges({\n [input]: new SimpleChange(previousValue, currentValue, firstChange)\n });\n }\n}\n","import { CdkOverlayOrigin } from '@angular/cdk/overlay';\nimport { computed, Directive, ElementRef, inject } from '@angular/core';\nimport { injectPopoverRoot } from './popover-root.inject';\n\n@Directive({\n selector: '[rdxPopoverTrigger]',\n standalone: true,\n hostDirectives: [CdkOverlayOrigin],\n host: {\n type: 'button',\n '[attr.id]': 'name()',\n '[attr.aria-haspopup]': '\"dialog\"',\n '[attr.aria-expanded]': 'popoverRoot.isOpen()',\n '[attr.aria-controls]': 'popoverRoot.popoverContentDirective().name()',\n '[attr.data-state]': 'popoverRoot.state()',\n '(click)': 'click()'\n }\n})\nexport class RdxPopoverTriggerDirective {\n /** @ignore */\n protected readonly popoverRoot = injectPopoverRoot();\n /** @ignore */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n /** @ignore */\n readonly overlayOrigin = inject(CdkOverlayOrigin);\n\n /** @ignore */\n readonly name = computed(() => `rdx-popover-trigger-${this.popoverRoot.uniqueId()}`);\n\n /** @ignore */\n click(): void {\n this.popoverRoot.handleToggle();\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n afterNextRender,\n booleanAttribute,\n computed,\n contentChild,\n DestroyRef,\n Directive,\n effect,\n inject,\n input,\n signal,\n untracked,\n ViewContainerRef\n} from '@angular/core';\nimport { RdxPopoverAnchorDirective } from './popover-anchor.directive';\nimport { RdxPopoverAnchorToken } from './popover-anchor.token';\nimport { RdxPopoverArrowToken } from './popover-arrow.token';\nimport { RdxPopoverCloseToken } from './popover-close.token';\nimport { RdxPopoverContentAttributesToken } from './popover-content-attributes.token';\nimport { RdxPopoverContentDirective } from './popover-content.directive';\nimport { RdxPopoverTriggerDirective } from './popover-trigger.directive';\nimport { RdxPopoverAnimationStatus, RdxPopoverAttachDetachEvent, RdxPopoverState } from './popover.types';\n\nlet nextId = 0;\n\n@Directive({\n selector: '[rdxPopoverRoot]',\n standalone: true,\n exportAs: 'rdxPopoverRoot'\n})\nexport class RdxPopoverRootDirective {\n /** @ignore */\n readonly uniqueId = signal(++nextId);\n /** @ignore */\n readonly name = computed(() => `rdx-popover-root-${this.uniqueId()}`);\n\n /**\n * @description The anchor directive that comes form outside the popover root\n * @default undefined\n */\n readonly anchor = input<RdxPopoverAnchorDirective | undefined>(void 0);\n /**\n * @description The open state of the popover when it is initially rendered. Use when you do not need to control its open state.\n * @default false\n */\n readonly defaultOpen = input<boolean>(false);\n /**\n * @description The controlled state of the popover. `open` input take precedence of `defaultOpen` input.\n * @default undefined\n */\n readonly open = input<boolean | undefined>(void 0);\n /**\n * @description Whether to control the state of the popover from external. Use in conjunction with `open` input.\n * @default undefined\n */\n readonly externalControl = input<boolean | undefined>(void 0);\n /**\n * @description Whether to take into account CSS opening/closing animations.\n * @default false\n */\n readonly cssAnimation = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n /**\n * @description Whether to take into account CSS opening animations. `cssAnimation` input must be set to 'true'\n * @default false\n */\n readonly cssOpeningAnimation = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n /**\n * @description Whether to take into account CSS closing animations. `cssAnimation` input must be set to 'true'\n * @default false\n */\n readonly cssClosingAnimation = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** @ignore */\n readonly cssAnimationStatus = signal<RdxPopoverAnimationStatus | null>(null);\n\n /** @ignore */\n readonly popoverContentDirective = contentChild.required(RdxPopoverContentDirective);\n /** @ignore */\n readonly popoverTriggerDirective = contentChild.required(RdxPopoverTriggerDirective);\n /** @ignore */\n readonly popoverArrowDirective = contentChild(RdxPopoverArrowToken);\n /** @ignore */\n readonly popoverCloseDirective = contentChild(RdxPopoverCloseToken);\n /** @ignore */\n readonly popoverContentAttributesComponent = contentChild(RdxPopoverContentAttributesToken);\n /** @ignore */\n private readonly internalPopoverAnchorDirective = contentChild(RdxPopoverAnchorToken);\n\n /** @ignore */\n readonly viewContainerRef = inject(ViewContainerRef);\n /** @ignore */\n readonly destroyRef = inject(DestroyRef);\n\n /** @ignore */\n readonly state = signal(RdxPopoverState.CLOSED);\n\n /** @ignore */\n readonly attachDetachEvent = signal(RdxPopoverAttachDetachEvent.DETACH);\n\n /** @ignore */\n private isFirstDefaultOpen = signal(false);\n\n /** @ignore */\n readonly popoverAnchorDirective = computed(() => this.internalPopoverAnchorDirective() ?? this.anchor());\n\n constructor() {\n this.onStateChangeEffect();\n this.onCssAnimationStatusChangeChangeEffect();\n this.onOpenChangeEffect();\n this.onIsFirstDefaultOpenChangeEffect();\n this.onAnchorChangeEffect();\n this.emitOpenOrClosedEventEffect();\n afterNextRender({\n write: () => {\n if (this.defaultOpen() && !this.open()) {\n this.isFirstDefaultOpen.set(true);\n }\n }\n });\n }\n\n /** @ignore */\n getAnimationParamsSnapshot() {\n return {\n cssAnimation: this.cssAnimation(),\n cssOpeningAnimation: this.cssOpeningAnimation(),\n cssClosingAnimation: this.cssClosingAnimation(),\n cssAnimationStatus: this.cssAnimationStatus(),\n attachDetachEvent: this.attachDetachEvent(),\n state: this.state(),\n canEmitOnOpenOrOnClosed: this.canEmitOnOpenOrOnClosed()\n };\n }\n\n /** @ignore */\n controlledExternally() {\n return this.externalControl;\n }\n\n /** @ignore */\n firstDefaultOpen() {\n return this.isFirstDefaultOpen();\n }\n\n /** @ignore */\n handleOpen(): void {\n if (this.externalControl()) {\n return;\n }\n this.setState(RdxPopoverState.OPEN);\n }\n\n /** @ignore */\n handleClose(): void {\n if (this.isFirstDefaultOpen()) {\n this.isFirstDefaultOpen.set(false);\n }\n if (this.externalControl()) {\n return;\n }\n this.setState(RdxPopoverState.CLOSED);\n }\n\n /** @ignore */\n handleToggle(): void {\n if (this.externalControl()) {\n return;\n }\n this.isOpen() ? this.handleClose() : this.handleOpen();\n }\n\n /** @ignore */\n isOpen(state?: RdxPopoverState) {\n return (state ?? this.state()) === RdxPopoverState.OPEN;\n }\n\n /** @ignore */\n private setState(state = RdxPopoverState.CLOSED): void {\n if (state === this.state()) {\n return;\n }\n this.state.set(state);\n }\n\n /** @ignore */\n private openContent(): void {\n this.popoverContentDirective().open();\n if (!this.cssAnimation() || !this.cssOpeningAnimation()) {\n this.cssAnimationStatus.set(null);\n }\n }\n\n /** @ignore */\n private closeContent(): void {\n this.popoverContentDirective().close();\n if (!this.cssAnimation() || !this.cssClosingAnimation()) {\n this.cssAnimationStatus.set(null);\n }\n }\n\n /** @ignore */\n private emitOnOpen(): void {\n this.popoverContentDirective().onOpen.emit();\n }\n\n /** @ignore */\n private emitOnClosed(): void {\n this.popoverContentDirective().onClosed.emit();\n }\n\n /** @ignore */\n private ifOpenOrCloseWithoutAnimations(state: RdxPopoverState) {\n return (\n !this.popoverContentAttributesComponent() ||\n !this.cssAnimation() ||\n (this.cssAnimation() && !this.cssClosingAnimation() && state === RdxPopoverState.CLOSED) ||\n (this.cssAnimation() && !this.cssOpeningAnimation() && state === RdxPopoverState.OPEN) ||\n // !this.cssAnimationStatus() ||\n (this.cssOpeningAnimation() &&\n state === RdxPopoverState.OPEN &&\n [RdxPopoverAnimationStatus.OPEN_STARTED].includes(this.cssAnimationStatus()!)) ||\n (this.cssClosingAnimation() &&\n state === RdxPopoverState.CLOSED &&\n [RdxPopoverAnimationStatus.CLOSED_STARTED].includes(this.cssAnimationStatus()!))\n );\n }\n\n /** @ignore */\n private ifOpenOrCloseWithAnimations(cssAnimationStatus: RdxPopoverAnimationStatus | null) {\n return (\n this.popoverContentAttributesComponent() &&\n this.cssAnimation() &&\n cssAnimationStatus &&\n ((this.cssOpeningAnimation() &&\n this.state() === RdxPopoverState.OPEN &&\n [RdxPopoverAnimationStatus.OPEN_ENDED].includes(cssAnimationStatus)) ||\n (this.cssClosingAnimation() &&\n this.state() === RdxPopoverState.CLOSED &&\n [RdxPopoverAnimationStatus.CLOSED_ENDED].includes(cssAnimationStatus)))\n );\n }\n\n /** @ignore */\n private openOrClose(state: RdxPopoverState) {\n const isOpen = this.isOpen(state);\n isOpen ? this.openContent() : this.closeContent();\n }\n\n /** @ignore */\n private emitOnOpenOrOnClosed(state: RdxPopoverState) {\n this.isOpen(state)\n ? this.attachDetachEvent() === RdxPopoverAttachDetachEvent.ATTACH && this.emitOnOpen()\n : this.attachDetachEvent() === RdxPopoverAttachDetachEvent.DETACH && this.emitOnClosed();\n }\n\n /** @ignore */\n private canEmitOnOpenOrOnClosed() {\n return (\n !this.cssAnimation() ||\n (!this.cssOpeningAnimation() && this.state() === RdxPopoverState.OPEN) ||\n (this.cssOpeningAnimation() &&\n this.state() === RdxPopoverState.OPEN &&\n this.cssAnimationStatus() === RdxPopoverAnimationStatus.OPEN_ENDED) ||\n (!this.cssClosingAnimation() && this.state() === RdxPopoverState.CLOSED) ||\n (this.cssClosingAnimation() &&\n this.state() === RdxPopoverState.CLOSED &&\n this.cssAnimationStatus() === RdxPopoverAnimationStatus.CLOSED_ENDED)\n );\n }\n\n /** @ignore */\n private onStateChangeEffect() {\n let isFirst = true;\n effect(() => {\n const state = this.state();\n untracked(() => {\n if (isFirst) {\n isFirst = false;\n return;\n }\n if (!this.ifOpenOrCloseWithoutAnimations(state)) {\n return;\n }\n this.openOrClose(state);\n });\n }, {});\n }\n\n /** @ignore */\n private onCssAnimationStatusChangeChangeEffect() {\n let isFirst = true;\n effect(() => {\n const cssAnimationStatus = this.cssAnimationStatus();\n untracked(() => {\n if (isFirst) {\n isFirst = false;\n return;\n }\n if (!this.ifOpenOrCloseWithAnimations(cssAnimationStatus)) {\n return;\n }\n this.openOrClose(this.state());\n });\n });\n }\n\n /** @ignore */\n private emitOpenOrClosedEventEffect() {\n let isFirst = true;\n effect(() => {\n this.attachDetachEvent();\n this.cssAnimationStatus();\n untracked(() => {\n if (isFirst) {\n isFirst = false;\n return;\n }\n const canEmitOpenClose = untracked(() => this.canEmitOnOpenOrOnClosed());\n if (!canEmitOpenClose) {\n return;\n }\n this.emitOnOpenOrOnClosed(this.state());\n });\n });\n }\n\n /** @ignore */\n private onOpenChangeEffect() {\n effect(() => {\n const open = this.open();\n untracked(() => {\n this.setState(open ? RdxPopoverState.OPEN : RdxPopoverState.CLOSED);\n });\n });\n }\n\n /** @ignore */\n private onIsFirstDefaultOpenChangeEffect() {\n const effectRef = effect(() => {\n const defaultOpen = this.defaultOpen();\n untracked(() => {\n if (!defaultOpen || this.open()) {\n effectRef.destroy();\n return;\n }\n this.handleOpen();\n });\n });\n }\n\n /** @ignore */\n private onAnchorChangeEffect = () => {\n effect(() => {\n const anchor = this.anchor();\n untracked(() => {\n if (anchor) {\n anchor.setPopoverRoot(this);\n }\n });\n });\n };\n}\n","import { assertInInjectionContext, inject, isDevMode } from '@angular/core';\nimport { RdxPopoverRootDirective } from './popover-root.directive';\n\nexport function injectPopoverRoot(optional?: false): RdxPopoverRootDirective;\nexport function injectPopoverRoot(optional: true): RdxPopoverRootDirective | null;\nexport function injectPopoverRoot(optional = false): RdxPopoverRootDirective | null {\n isDevMode() && assertInInjectionContext(injectPopoverRoot);\n return inject(RdxPopoverRootDirective, { optional });\n}\n","import { CdkOverlayOrigin } from '@angular/cdk/overlay';\nimport { DOCUMENT } from '@angular/common';\nimport { computed, Directive, ElementRef, forwardRef, inject } from '@angular/core';\nimport { RdxPopoverAnchorToken } from './popover-anchor.token';\nimport { RdxPopoverRootDirective } from './popover-root.directive';\nimport { injectPopoverRoot } from './popover-root.inject';\n\n@Directive({\n selector: '[rdxPopoverAnchor]',\n standalone: true,\n exportAs: 'rdxPopoverAnchor',\n hostDirectives: [CdkOverlayOrigin],\n host: {\n type: 'button',\n '[attr.id]': 'name()',\n '[attr.aria-haspopup]': '\"dialog\"',\n '(click)': 'click()'\n },\n providers: [\n {\n provide: RdxPopoverAnchorToken,\n useExisting: forwardRef(() => RdxPopoverAnchorDirective)\n }\n ]\n})\nexport class RdxPopoverAnchorDirective {\n /**\n * @ignore\n * If outside the root then null, otherwise the root directive - with optional `true` passed in as the first param.\n * If outside the root and non-null value that means the html structure is wrong - popover inside popover.\n * */\n protected popoverRoot = injectPopoverRoot(true);\n /** @ignore */\n readonly elementRef = inject(ElementRef);\n /** @ignore */\n readonly overlayOrigin = inject(CdkOverlayOrigin);\n /** @ignore */\n readonly document = inject(DOCUMENT);\n\n /** @ignore */\n readonly name = computed(() => `rdx-popover-external-anchor-${this.popoverRoot?.uniqueId()}`);\n\n /** @ignore */\n click(): void {\n this.emitOutsideClick();\n }\n\n /** @ignore */\n setPopoverRoot(popoverRoot: RdxPopoverRootDirective) {\n this.popoverRoot = popoverRoot;\n }\n\n private emitOutsideClick() {\n const clickEvent = new MouseEvent('click', {\n view: this.document.defaultView,\n bubbles: true,\n cancelable: true\n });\n this.document.body.dispatchEvent(clickEvent);\n }\n}\n","import { ConnectedOverlayPositionChange } from '@angular/cdk/overlay';\nimport {\n AfterViewInit,\n computed,\n Directive,\n effect,\n ElementRef,\n forwardRef,\n inject,\n input,\n Renderer2,\n signal,\n untracked\n} from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { RdxPopoverArrowToken } from './popover-arrow.token';\nimport { injectPopoverRoot } from './popover-root.inject';\nimport { getArrowPositionParams, getSideAndAlignFromAllPossibleConnectedPositions } from './popover.utils';\n\n@Directive({\n selector: '[rdxPopoverArrow]',\n standalone: true,\n providers: [\n {\n provide: RdxPopoverArrowToken,\n useExisting: forwardRef(() => RdxPopoverArrowDirective)\n }\n ]\n})\nexport class RdxPopoverArrowDirective implements AfterViewInit {\n /** @ignore */\n private readonly renderer = inject(Renderer2);\n /** @ignore */\n private readonly popoverRoot = injectPopoverRoot();\n /** @ignore */\n readonly elementRef = inject(ElementRef);\n\n /**\n * @description The width of the arrow in pixels.\n * @default 10\n */\n readonly width = input<number>(10);\n\n /**\n * @description The height of the arrow in pixels.\n * @default 5\n */\n readonly height = input<number>(5);\n\n /** @ignore */\n readonly arrowSvgElement = computed<HTMLElement>(() => {\n const width = this.width();\n const height = this.height();\n\n const svgElement = this.renderer.createElement('svg', 'svg');\n this.renderer.setAttribute(svgElement, 'viewBox', '0 0 30 10');\n this.renderer.setAttribute(svgElement, 'width', String(width));\n this.renderer.setAttribute(svgElement, 'height', String(height));\n const polygonElement = this.renderer.createElement('polygon', 'svg');\n this.renderer.setAttribute(polygonElement, 'points', '0,0 30,0 15,10');\n this.renderer.setAttribute(svgElement, 'preserveAspectRatio', 'none');\n this.renderer.appendChild(svgElement, polygonElement);\n\n return svgElement;\n });\n\n /** @ignore */\n private readonly currentArrowSvgElement = signal<HTMLOrSVGElement | undefined>(void 0);\n /** @ignore */\n private readonly position = toSignal(this.popoverRoot.popoverContentDirective().positionChange());\n\n /** @ignore */\n private anchorOrTriggerRect: DOMRect;\n\n constructor() {\n this.onArrowSvgElementChangeEffect();\n this.onContentPositionChangeEffect();\n }\n\n /** @ignore */\n ngAfterViewInit() {\n if (this.elementRef.nativeElement.parentElement) {\n this.renderer.setStyle(this.elementRef.nativeElement.parentElement, 'position', 'relative');\n }\n this.renderer.setStyle(this.elementRef.nativeElement, 'position', 'absolute');\n this.renderer.setStyle(this.elementRef.nativeElement, 'boxSizing', '');\n this.renderer.setStyle(this.elementRef.nativeElement, 'fontSize', '0px');\n }\n\n private setAnchorOrTriggerRect() {\n this.anchorOrTriggerRect = (\n this.popoverRoot.popoverAnchorDirective() ?? this.popoverRoot.popoverTriggerDirective()\n ).elementRef.nativeElement.getBoundingClientRect();\n }\n\n /** @ignore */\n private setPosition(position: ConnectedOverlayPositionChange) {\n this.setAnchorOrTriggerRect();\n const posParams = getArrowPositionParams(\n getSideAndAlignFromAllPossibleConnectedPositions(position.connectionPair),\n { width: this.width(), height: this.height() },\n { width: this.anchorOrTriggerRect.width, height: this.anchorOrTriggerRect.height }\n );\n\n this.renderer.setStyle(this.elementRef.nativeElement, 'top', posParams.top);\n this.renderer.setStyle(this.elementRef.nativeElement, 'bottom', '');\n this.renderer.setStyle(this.elementRef.nativeElement, 'left', posParams.left);\n this.renderer.setStyle(this.elementRef.nativeElement, 'right', '');\n this.renderer.setStyle(this.elementRef.nativeElement, 'transform', posParams.transform);\n }\n\n /** @ignore */\n private onArrowSvgElementChangeEffect() {\n effect(() => {\n const arrowElement = this.arrowSvgElement();\n untracked(() => {\n const currentArrowSvgElement = this.currentArrowSvgElement();\n if (currentArrowSvgElement) {\n this.renderer.removeChild(this.elementRef.nativeElement, currentArrowSvgElement);\n }\n this.currentArrowSvgElement.set(arrowElement);\n this.renderer.setStyle(this.elementRef.nativeElement, 'width', `${this.width()}px`);\n this.renderer.setStyle(this.elementRef.nativeElement, 'height', `${this.height()}px`);\n this.renderer.appendChild(this.elementRef.nativeElement, this.currentArrowSvgElement());\n });\n });\n }\n\n /** @ignore */\n private onContentPositionChangeEffect() {\n effect(() => {\n const position = this.position();\n untracked(() => {\n if (!position) {\n return;\n }\n this.setPosition(position);\n });\n });\n }\n}\n","import { Directive, effect, ElementRef, forwardRef, inject, Renderer2, untracked } from '@angular/core';\nimport { RdxPopoverCloseToken } from './popover-close.token';\nimport { injectPopoverRoot } from './popover-root.inject';\n\n@Directive({\n selector: '[rdxPopoverClose]',\n standalone: true,\n host: {\n type: 'button',\n '(click)': 'popoverRoot.handleClose()'\n },\n providers: [\n {\n provide: RdxPopoverCloseToken,\n useExisting: forwardRef(() => RdxPopoverCloseDirective)\n }\n ]\n})\nexport class RdxPopoverCloseDirective {\n /** @ignore */\n protected readonly popoverRoot = injectPopoverRoot();\n /** @ignore */\n readonly elementRef = inject(ElementRef);\n /** @ignore */\n private readonly renderer = inject(Renderer2);\n\n constructor() {\n this.onIsControlledExternallyEffect();\n }\n\n /** @ignore */\n private onIsControlledExternallyEffect() {\n effect(() => {\n const isControlledExternally = this.popoverRoot.controlledExternally()();\n\n untracked(() => {\n this.renderer.setStyle(\n this.elementRef.nativeElement,\n 'display',\n isControlledExternally ? 'none' : null\n );\n });\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, forwardRef } from '@angular/core';\nimport { RdxPopoverContentAttributesToken } from './popover-content-attributes.token';\nimport { injectPopoverRoot } from './popover-root.inject';\nimport { RdxPopoverAnimationStatus, RdxPopoverState } from './popover.types';\n\n@Component({\n selector: '[rdxPopoverContentAttributes]',\n standalone: true,\n template: `\n <ng-content />\n `,\n host: {\n '[attr.role]': '\"dialog\"',\n '[attr.id]': 'name()',\n '[attr.data-state]': 'popoverRoot.state()',\n '[attr.data-side]': 'popoverRoot.popoverContentDirective().side()',\n '[attr.data-align]': 'popoverRoot.popoverContentDirective().align()',\n '[style]': 'disableAnimation() ? {animation: \"none !important\"} : null',\n '(animationstart)': 'onAnimationStart($event)',\n '(animationend)': 'onAnimationEnd($event)'\n },\n providers: [\n {\n provide: RdxPopoverContentAttributesToken,\n useExisting: forwardRef(() => RdxPopoverContentAttributesComponent)\n }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class RdxPopoverContentAttributesComponent {\n /** @ignore */\n protected readonly popoverRoot = injectPopoverRoot();\n\n /** @ignore */\n readonly name = computed(() => `rdx-popover-content-attributes-${this.popoverRoot.uniqueId()}`);\n\n /** @ignore */\n readonly disableAnimation = computed(() => !this.canAnimate());\n\n /** @ignore */\n protected onAnimationStart(_: AnimationEvent) {\n this.popoverRoot.cssAnimationStatus.set(\n this.popoverRoot.state() === RdxPopoverState.OPEN\n ? RdxPopoverAnimationStatus.OPEN_STARTED\n : RdxPopoverAnimationStatus.CLOSED_STARTED\n );\n }\n\n /** @ignore */\n protected onAnimationEnd(_: AnimationEvent) {\n this.popoverRoot.cssAnimationStatus.set(\n this.popoverRoot.state() === RdxPopoverState.OPEN\n ? RdxPopoverAnimationStatus.OPEN_ENDED\n : RdxPopoverAnimationStatus.CLOSED_ENDED\n );\n }\n\n /** @ignore */\n private canAnimate() {\n return (\n this.popoverRoot.cssAnimation() &&\n ((this.popoverRoot.cssOpeningAnimation() && this.popoverRoot.state() === RdxPopoverState.OPEN) ||\n (this.popoverRoot.cssClosingAnimation() && this.popoverRoot.state() === RdxPopoverState.CLOSED))\n );\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RdxPopoverAnchorDirective } from './src/popover-anchor.directive';\nimport { RdxPopoverArrowDirective } from './src/popover-arrow.directive';\nimport { RdxPopoverCloseDirective } from './src/popover-close.directive';\nimport { RdxPopoverContentAttributesComponent } from './src/popover-content-attributes.component';\nimport { RdxPopoverContentDirective } from './src/popover-content.directive';\nimport { RdxPopoverRootDirective } from './src/popover-root.directive';\nimport { RdxPopoverTriggerDirective } from './src/popover-trigger.directive';\n\nexport * from './src/popover-anchor.directive';\nexport * from './src/popover-arrow.directive';\nexport * from './src/popover-close.directive';\nexport * from './src/popover-content-attributes.component';\nexport * from './src/popover-content.directive';\nexport * from './src/popover-root.directive';\nexport * from './src/popover-trigger.directive';\nexport * from './src/popover.types';\n\nconst _imports = [\n RdxPopoverArrowDirective,\n RdxPopoverCloseDirective,\n RdxPopoverContentDirective,\n RdxPopoverTriggerDirective,\n RdxPopoverRootDirective,\n RdxPopoverAnchorDirective,\n RdxPopoverContentAttributesComponent\n];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxPopoverModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAGO,MAAM,qBAAqB,GAAG,IAAI,cAAc,CAA4B,uBAAuB,CAAC;;ACApG,MAAM,oBAAoB,GAAG,IAAI,cAAc,CAA2B,sBAAsB,CAAC;;ACAjG,MAAM,oBAAoB,GAAG,IAAI,cAAc,CAA2B,sBAAsB,CAAC;;ACAjG,MAAM,gCAAgC,GAAG,IAAI,cAAc,CAC9D,kCAAkC,CACrC;;ICHW;AAAZ,CAAA,UAAY,cAAc,EAAA;AACtB,IAAA,cAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACX,IAAA,cAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,cAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,cAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACjB,CAAC,EALW,cAAc,KAAd,cAAc,GAKzB,EAAA,CAAA,CAAA;IAEW;AAAZ,CAAA,UAAY,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 from '@angular/core';
2
- import { InjectionToken, inject, input, computed, booleanAttribute, model, output, Directive, NgModule } from '@angular/core';
2
+ import { InjectionToken, inject, forwardRef, input, computed, booleanAttribute, model, output, signal, effect, Directive, NgModule } from '@angular/core';
3
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
3
4
 
4
5
  const RdxSwitchToken = new InjectionToken('RdxSwitchToken');
5
6
  function injectSwitch() {
6
7
  return inject(RdxSwitchToken);
7
8
  }
9
+ const SWITCH_VALUE_ACCESSOR = {
10
+ provide: NG_VALUE_ACCESSOR,
11
+ useExisting: forwardRef(() => RdxSwitchRootDirective),
12
+ multi: true
13
+ };
8
14
  let idIterator = 0;
9
15
  class RdxSwitchRootDirective {
10
16
  constructor() {
11
17
  this.id = input(`rdx-switch-${idIterator++}`);
12
18
  this.elementId = computed(() => (this.id() ? this.id() : null));
19
+ this.inputId = input(null);
13
20
  /**
14
21
  * When true, indicates that the user must check the switch before the owning form can be submitted.
15
22
  */
16
23
  this.required = input(false, {
17
24
  transform: booleanAttribute
18
25
  });
26
+ this.ariaLabelledBy = input(null, {
27
+ alias: 'aria-labelledby'
28
+ });
29
+ this.ariaLabel = input(null, {
30
+ alias: 'aria-label'
31
+ });
19
32
  /**
20
33
  * The controlled state of the switch. Must be used in conjunction with onCheckedChange.
21
34
  */
22
35
  this.checked = model(false);
36
+ this.defaultChecked = input(false, { transform: booleanAttribute });
37
+ /**
38
+ * The state of the switch.
39
+ * If `defaultChecked` is provided, it takes precedence over the `checked` state.
40
+ * @ignore
41
+ */
42
+ this.checkedState = computed(() => this.checked());
23
43
  /**
24
44
  * When true, prevents the user from interacting with the switch.
25
45
  */
26
46
  this.disabled = input(false, {
27
47
  transform: booleanAttribute
28
48
  });
29
- /*
30
- * @ignore
31
- */
32
- this.disabledState = computed(() => this.disabled());
49
+ /** @ignore */
50
+ this.disabledState = computed(() => this.disabled() || this.accessorDisabled());
33
51
  /**
34
52
  * Event handler called when the state of the switch changes.
35
53
  */
36
54
  this.onCheckedChange = output();
55
+ this.defaultCheckedUsed = computed(() => this.defaultChecked());
56
+ this.accessorDisabled = signal(false);
57
+ this.onChange = () => { };
58
+ effect(() => {
59
+ if (this.defaultCheckedUsed()) {
60
+ this.checked.set(this.defaultChecked());
61
+ }
62
+ }, { allowSignalWrites: true });
37
63
  }
38
64
  /**
39
65
  * Toggles the checked state of the switch.
40
66
  * If the switch is disabled, the function returns early.
67
+ * @ignore
41
68
  */
42
69
  toggle() {
43
70
  if (this.disabledState()) {
44
71
  return;
45
72
  }
46
73
  this.checked.set(!this.checked());
74
+ this.onChange(this.checked());
47
75
  this.onCheckedChange.emit(this.checked());
48
76
  }
77
+ /** @ignore */
78
+ writeValue(value) {
79
+ this.checked.set(value);
80
+ }
81
+ /** @ignore */
82
+ registerOnChange(fn) {
83
+ this.onChange = fn;
84
+ }
85
+ /** @ignore */
86
+ registerOnTouched(fn) {
87
+ this.onTouched = fn;
88
+ }
89
+ /** @ignore */
90
+ setDisabledState(isDisabled) {
91
+ this.accessorDisabled.set(isDisabled);
92
+ }
49
93
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSwitchRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
50
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.11", type: RdxSwitchRootDirective, isStandalone: true, selector: "button[rdxSwitchRoot]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", onCheckedChange: "onCheckedChange" }, host: { attributes: { "role": "switch", "type": "button" }, listeners: { "click": "toggle()" }, properties: { "id": "elementId()", "attr.aria-checked": "checked()", "attr.aria-required": "required", "attr.data-state": "checked() ? \"checked\" : \"unchecked\"", "attr.data-disabled": "disabledState() ? \"true\" : null", "attr.disabled": "disabledState() ? disabledState() : null" } }, providers: [
51
- { provide: RdxSwitchToken, useExisting: RdxSwitchRootDirective }
94
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.11", type: RdxSwitchRootDirective, isStandalone: true, selector: "button[rdxSwitchRoot]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, defaultChecked: { classPropertyName: "defaultChecked", publicName: "defaultChecked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", onCheckedChange: "onCheckedChange" }, host: { attributes: { "type": "button" }, listeners: { "click": "toggle()" }, properties: { "id": "elementId()", "attr.aria-checked": "checkedState()", "attr.aria-required": "required()", "attr.data-state": "checkedState() ? \"checked\" : \"unchecked\"", "attr.data-disabled": "disabledState() ? \"true\" : null", "attr.disabled": "disabledState() ? disabledState() : null" } }, providers: [
95
+ { provide: RdxSwitchToken, useExisting: RdxSwitchRootDirective },
96
+ SWITCH_VALUE_ACCESSOR
52
97
  ], exportAs: ["rdxSwitchRoot"], ngImport: i0 }); }
53
98
  }
54
99
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSwitchRootDirective, decorators: [{
@@ -58,28 +103,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImpo
58
103
  exportAs: 'rdxSwitchRoot',
59
104
  standalone: true,
60
105
  providers: [
61
- { provide: RdxSwitchToken, useExisting: RdxSwitchRootDirective }
106
+ { provide: RdxSwitchToken, useExisting: RdxSwitchRootDirective },
107
+ SWITCH_VALUE_ACCESSOR
62
108
  ],
63
109
  host: {
64
- role: 'switch',
65
110
  type: 'button',
66
111
  '[id]': 'elementId()',
67
- '[attr.aria-checked]': 'checked()',
68
- '[attr.aria-required]': 'required',
69
- '[attr.data-state]': 'checked() ? "checked" : "unchecked"',
112
+ '[attr.aria-checked]': 'checkedState()',
113
+ '[attr.aria-required]': 'required()',
114
+ '[attr.data-state]': 'checkedState() ? "checked" : "unchecked"',
70
115
  '[attr.data-disabled]': 'disabledState() ? "true" : null',
71
116
  '[attr.disabled]': 'disabledState() ? disabledState() : null',
72
117
  '(click)': 'toggle()'
73
118
  }
74
119
  }]
75
- }] });
120
+ }], ctorParameters: () => [] });
76
121
 
77
122
  class RdxSwitchInputDirective {
78
123
  constructor() {
79
124
  this.switchRoot = injectSwitch();
80
125
  }
126
+ /** @ignore */
127
+ onBlur() {
128
+ this.switchRoot.onTouched?.();
129
+ }
81
130
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSwitchInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
82
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.11", type: RdxSwitchInputDirective, isStandalone: true, selector: "input[rdxSwitchInput]", host: { attributes: { "type": "checkbox", "tabindex": "-1" }, properties: { "attr.defaultChecked": "switchRoot.checked()", "attr.aria-checked": "switchRoot.checked()", "attr.aria-hidden": "true", "attr.aria-required": "switchRoot.required()", "attr.data-state": "switchRoot.checked() ? \"checked\" : \"unchecked\"", "attr.data-disabled": "switchRoot.disabledState() ? \"true\" : null", "attr.disabled": "switchRoot.disabledState() ? switchRoot.disabledState() : null", "attr.value": "switchRoot.checked() ? \"on\" : \"off\"" }, styleAttribute: "transform: translateX(-100%); position: absolute; overflow: hidden; pointerEvents: none; opacity: 0; margin: 0;" }, exportAs: ["rdxSwitchInput"], ngImport: i0 }); }
131
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.11", type: RdxSwitchInputDirective, isStandalone: true, selector: "input[rdxSwitchInput]", host: { attributes: { "type": "checkbox", "role": "switch", "tabindex": "-1" }, listeners: { "blur": "onBlur()" }, properties: { "attr.id": "switchRoot.inputId()", "attr.defaultChecked": "switchRoot.checkedState()", "attr.aria-checked": "switchRoot.checkedState()", "attr.aria-hidden": "true", "attr.aria-label": "switchRoot.ariaLabel()", "attr.aria-labelledby": "switchRoot.ariaLabelledBy()", "attr.aria-required": "switchRoot.required()", "attr.data-state": "switchRoot.checkedState() ? \"checked\" : \"unchecked\"", "attr.data-disabled": "switchRoot.disabledState() ? \"true\" : null", "attr.disabled": "switchRoot.disabledState() ? switchRoot.disabledState() : null", "attr.value": "switchRoot.checkedState() ? \"on\" : \"off\"" }, styleAttribute: "transform: translateX(-100%); position: absolute; overflow: hidden; pointerEvents: none; opacity: 0; margin: 0;" }, exportAs: ["rdxSwitchInput"], ngImport: i0 }); }
83
132
  }
84
133
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSwitchInputDirective, decorators: [{
85
134
  type: Directive,
@@ -89,16 +138,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImpo
89
138
  standalone: true,
90
139
  host: {
91
140
  type: 'checkbox',
141
+ role: 'switch',
92
142
  tabindex: '-1',
93
- '[attr.defaultChecked]': 'switchRoot.checked()',
94
- '[attr.aria-checked]': 'switchRoot.checked()',
143
+ '[attr.id]': 'switchRoot.inputId()',
144
+ '[attr.defaultChecked]': 'switchRoot.checkedState()',
145
+ '[attr.aria-checked]': 'switchRoot.checkedState()',
95
146
  '[attr.aria-hidden]': 'true',
147
+ '[attr.aria-label]': 'switchRoot.ariaLabel()',
148
+ '[attr.aria-labelledby]': 'switchRoot.ariaLabelledBy()',
96
149
  '[attr.aria-required]': 'switchRoot.required()',
97
- '[attr.data-state]': 'switchRoot.checked() ? "checked" : "unchecked"',
150
+ '[attr.data-state]': 'switchRoot.checkedState() ? "checked" : "unchecked"',
98
151
  '[attr.data-disabled]': 'switchRoot.disabledState() ? "true" : null',
99
152
  '[attr.disabled]': 'switchRoot.disabledState() ? switchRoot.disabledState() : null',
100
- '[attr.value]': 'switchRoot.checked() ? "on" : "off"',
101
- style: 'transform: translateX(-100%); position: absolute; overflow: hidden; pointerEvents: none; opacity: 0; margin: 0;'
153
+ '[attr.value]': 'switchRoot.checkedState() ? "on" : "off"',
154
+ style: 'transform: translateX(-100%); position: absolute; overflow: hidden; pointerEvents: none; opacity: 0; margin: 0;',
155
+ '(blur)': 'onBlur()'
102
156
  }
103
157
  }]
104
158
  }] });
@@ -108,7 +162,7 @@ class RdxSwitchThumbDirective {
108
162
  this.switchRoot = injectSwitch();
109
163
  }
110
164
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSwitchThumbDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
111
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.11", type: RdxSwitchThumbDirective, isStandalone: true, selector: "span[rdxSwitchThumb]", host: { properties: { "attr.data-disabled": "switchRoot.disabledState() ? \"true\" : null", "attr.data-state": "switchRoot.checked() ? \"checked\" : \"unchecked\"" } }, exportAs: ["rdxSwitchThumb"], ngImport: i0 }); }
165
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.11", type: RdxSwitchThumbDirective, isStandalone: true, selector: "span[rdxSwitchThumb]", host: { properties: { "attr.data-disabled": "switchRoot.disabledState() ? \"true\" : null", "attr.data-state": "switchRoot.checkedState() ? \"checked\" : \"unchecked\"" } }, exportAs: ["rdxSwitchThumb"], ngImport: i0 }); }
112
166
  }
113
167
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxSwitchThumbDirective, decorators: [{
114
168
  type: Directive,
@@ -118,7 +172,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImpo
118
172
  standalone: true,
119
173
  host: {
120
174
  '[attr.data-disabled]': 'switchRoot.disabledState() ? "true" : null',
121
- '[attr.data-state]': 'switchRoot.checked() ? "checked" : "unchecked"'
175
+ '[attr.data-state]': 'switchRoot.checkedState() ? "checked" : "unchecked"'
122
176
  }
123
177
  }]
124
178
  }] });
@@ -149,5 +203,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImpo
149
203
  * Generated bundle index. Do not edit.
150
204
  */
151
205
 
152
- export { RdxSwitchInputDirective, RdxSwitchModule, RdxSwitchRootDirective, RdxSwitchThumbDirective, RdxSwitchToken, injectSwitch };
206
+ export { RdxSwitchInputDirective, RdxSwitchModule, RdxSwitchRootDirective, RdxSwitchThumbDirective, RdxSwitchToken, SWITCH_VALUE_ACCESSOR, injectSwitch };
153
207
  //# sourceMappingURL=radix-ng-primitives-switch.mjs.map