@radix-ng/primitives 0.19.0 → 0.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compodoc/documentation.json +2751 -957
- package/esm2022/popover/index.mjs +41 -0
- package/esm2022/popover/radix-ng-primitives-popover.mjs +5 -0
- package/esm2022/popover/src/popover-arrow.directive.mjs +112 -0
- package/esm2022/popover/src/popover-arrow.token.mjs +3 -0
- package/esm2022/popover/src/popover-close.directive.mjs +37 -0
- package/esm2022/popover/src/popover-content.directive.mjs +227 -0
- package/esm2022/popover/src/popover-root.directive.mjs +142 -0
- package/esm2022/popover/src/popover-root.inject.mjs +7 -0
- package/esm2022/popover/src/popover-root.token.mjs +3 -0
- package/esm2022/popover/src/popover-trigger.directive.mjs +42 -0
- package/esm2022/popover/src/popover.constants.mjs +90 -0
- package/esm2022/popover/src/popover.types.mjs +14 -0
- package/esm2022/popover/src/popover.utils.mjs +115 -0
- package/esm2022/radio/src/radio-indicator.directive.mjs +3 -3
- package/esm2022/radio/src/radio-item-input.directive.mjs +2 -2
- package/esm2022/radio/src/radio-item.directive.mjs +10 -13
- package/esm2022/radio/src/radio-root.directive.mjs +16 -20
- package/esm2022/radio/src/radio-tokens.mjs +1 -1
- package/fesm2022/radix-ng-primitives-popover.mjs +796 -0
- package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-radio.mjs +26 -33
- package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
- package/package.json +7 -1
- package/popover/README.md +3 -0
- package/popover/index.d.ts +17 -0
- package/popover/src/popover-arrow.directive.d.ts +37 -0
- package/popover/src/popover-arrow.token.d.ts +3 -0
- package/popover/src/popover-close.directive.d.ts +15 -0
- package/popover/src/popover-content.directive.d.ts +84 -0
- package/popover/src/popover-root.directive.d.ts +58 -0
- package/popover/src/popover-root.inject.d.ts +2 -0
- package/popover/src/popover-root.token.d.ts +3 -0
- package/popover/src/popover-trigger.directive.d.ts +18 -0
- package/popover/src/popover.constants.d.ts +8 -0
- package/popover/src/popover.types.d.ts +34 -0
- package/popover/src/popover.utils.d.ts +12 -0
- package/radio/src/radio-item.directive.d.ts +2 -2
- package/radio/src/radio-root.directive.d.ts +9 -8
- package/radio/src/radio-tokens.d.ts +6 -4
@@ -0,0 +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: 10\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<HTMLElement>>(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<HTMLElement>>(ElementRef<HTMLElement>);\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 {\n directive: CdkConnectedOverlay\n }\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() ?? (greatestDimensionFromTheArrow || 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((value, 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 this.onControlledExternallyChangeEffect();\n }\n\n /** @ignore */\n ngOnInit() {\n this.setOrigin();\n this.setScrollStrategy();\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 }),\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 = this.popoverRoot.controlledExternally()();\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 /** @ignore */\n private onControlledExternallyChangeEffect() {\n effect(() => {\n this.popoverRoot.controlledExternally()();\n untracked(() => {\n this.setDisableClose();\n });\n });\n }\n}\n","import { CdkOverlayOrigin } from '@angular/cdk/overlay';\nimport { computed, Directive, ElementRef, inject, input } from '@angular/core';\nimport { injectPopoverRoot } from './popover-root.inject';\n\nlet nextId = 0;\n\n@Directive({\n selector: '[rdxPopoverTrigger]',\n standalone: true,\n hostDirectives: [CdkOverlayOrigin],\n host: {\n type: 'button',\n '[attr.id]': 'id()',\n '[attr.aria-haspopup]': '\"dialog\"',\n '[attr.aria-expanded]': 'popoverRoot.isOpen()',\n '[attr.aria-controls]': 'popoverId()',\n '[attr.data-state]': 'popoverRoot.state()',\n '(click)': 'onClick()'\n }\n})\nexport class RdxPopoverTriggerDirective {\n readonly id = input(`rdx-popover-root-${nextId++}`);\n readonly popoverId = computed(() => `rdx-popover-${this.id()}`);\n\n /** @ignore */\n readonly popoverRoot = injectPopoverRoot();\n /** @ignore */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef<HTMLElement>);\n /** @ignore */\n readonly overlayOrigin = inject(CdkOverlayOrigin);\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\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 /**\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 if (open) {\n this.document.dispatchEvent(new CustomEvent('popover.open'));\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,CAA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AAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAXzB,wBAAwB;YACxB,wBAAwB;YACxB,0BAA0B;YAC1B,0BAA0B;AAC1B,YAAA,uBAAuB,aAJvB,wBAAwB;YACxB,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,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { InjectionToken, model,
|
2
|
+
import { InjectionToken, model, input, booleanAttribute, output, signal, computed, Directive, Input, inject, ElementRef } from '@angular/core';
|
3
3
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
4
4
|
import * as i1 from '@radix-ng/primitives/roving-focus';
|
5
5
|
import { RdxRovingFocusGroupDirective, RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';
|
@@ -10,12 +10,16 @@ const RDX_RADIO_GROUP = new InjectionToken('RdxRadioGroup');
|
|
10
10
|
|
11
11
|
class RdxRadioGroupDirective {
|
12
12
|
constructor() {
|
13
|
-
this.value = model();
|
14
|
-
this.disabled = false;
|
13
|
+
this.value = model(null);
|
14
|
+
this.disabled = input(false, { transform: booleanAttribute });
|
15
|
+
this.required = input(false, { transform: booleanAttribute });
|
16
|
+
this.orientation = input();
|
15
17
|
/**
|
16
18
|
* Event handler called when the value changes.
|
17
19
|
*/
|
18
|
-
this.onValueChange =
|
20
|
+
this.onValueChange = output();
|
21
|
+
this.disable = signal(this.disabled());
|
22
|
+
this.disableState = computed(() => this.disable() || this.disabled());
|
19
23
|
/**
|
20
24
|
* The callback function to call when the value of the radio group changes.
|
21
25
|
*/
|
@@ -67,14 +71,14 @@ class RdxRadioGroupDirective {
|
|
67
71
|
* @ignore
|
68
72
|
*/
|
69
73
|
setDisabledState(isDisabled) {
|
70
|
-
this.
|
74
|
+
this.disable.set(isDisabled);
|
71
75
|
}
|
72
76
|
onKeydown() {
|
73
|
-
if (this.
|
77
|
+
if (this.disableState())
|
74
78
|
return;
|
75
79
|
}
|
76
80
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxRadioGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
77
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.11", type: RdxRadioGroupDirective, isStandalone: true, selector: "[rdxRadioRoot]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal:
|
81
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.11", type: RdxRadioGroupDirective, isStandalone: true, selector: "[rdxRadioRoot]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: false, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", onValueChange: "onValueChange" }, host: { attributes: { "role": "radiogroup" }, listeners: { "keydown": "onKeydown()" }, properties: { "attr.aria-orientation": "orientation()", "attr.aria-required": "required()", "attr.data-disabled": "disableState() ? \"\" : null" } }, providers: [
|
78
82
|
{ provide: RDX_RADIO_GROUP, useExisting: RdxRadioGroupDirective },
|
79
83
|
{ provide: NG_VALUE_ACCESSOR, useExisting: RdxRadioGroupDirective, multi: true }
|
80
84
|
], exportAs: ["rdxRadioRoot"], hostDirectives: [{ directive: i1.RdxRovingFocusGroupDirective, inputs: ["dir", "dir", "orientation", "orientation", "loop", "loop"] }], ngImport: i0 }); }
|
@@ -92,22 +96,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImpo
|
|
92
96
|
hostDirectives: [{ directive: RdxRovingFocusGroupDirective, inputs: ['dir', 'orientation', 'loop'] }],
|
93
97
|
host: {
|
94
98
|
role: 'radiogroup',
|
95
|
-
'[attr.aria-orientation]': 'orientation',
|
96
|
-
'[attr.
|
99
|
+
'[attr.aria-orientation]': 'orientation()',
|
100
|
+
'[attr.aria-required]': 'required()',
|
101
|
+
'[attr.data-disabled]': 'disableState() ? "" : null',
|
97
102
|
'(keydown)': 'onKeydown()'
|
98
103
|
}
|
99
104
|
}]
|
100
|
-
}], propDecorators: {
|
101
|
-
type: Input,
|
102
|
-
args: [{ transform: booleanAttribute }]
|
103
|
-
}], defaultValue: [{
|
104
|
-
type: Input
|
105
|
-
}], required: [{
|
106
|
-
type: Input
|
107
|
-
}], orientation: [{
|
105
|
+
}], propDecorators: { defaultValue: [{
|
108
106
|
type: Input
|
109
|
-
}], onValueChange: [{
|
110
|
-
type: Output
|
111
107
|
}] } });
|
112
108
|
|
113
109
|
const RdxRadioItemToken = new InjectionToken('RadioItemToken');
|
@@ -122,6 +118,8 @@ class RdxRadioItemDirective {
|
|
122
118
|
this.id = input();
|
123
119
|
this.required = input();
|
124
120
|
this.disabled = input(false, { transform: booleanAttribute });
|
121
|
+
this.disabledState = computed(() => this.radioGroup.disableState() || this.disabled());
|
122
|
+
this.checkedState = computed(() => this.radioGroup.value() === this.value());
|
125
123
|
this.ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'];
|
126
124
|
this.isArrowKeyPressedSignal = signal(false);
|
127
125
|
}
|
@@ -132,14 +130,8 @@ class RdxRadioItemDirective {
|
|
132
130
|
}
|
133
131
|
}
|
134
132
|
/** @ignore */
|
135
|
-
get checked() {
|
136
|
-
if (this.radioGroup.value == undefined)
|
137
|
-
return false;
|
138
|
-
return this.radioGroup.value() === this.value();
|
139
|
-
}
|
140
|
-
/** @ignore */
|
141
133
|
onClick() {
|
142
|
-
if (!this.
|
134
|
+
if (!this.disabledState()) {
|
143
135
|
this.radioGroup.select(this.value());
|
144
136
|
this.isArrowKeyPressedSignal.set(true);
|
145
137
|
}
|
@@ -168,7 +160,7 @@ class RdxRadioItemDirective {
|
|
168
160
|
}, 0);
|
169
161
|
}
|
170
162
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxRadioItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
171
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.11", type: RdxRadioItemDirective, isStandalone: true, selector: "[rdxRadioItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button", "role": "radio" }, listeners: { "click": "onClick()", "keydown": "onKeyDown($event)", "keyup": "onKeyUp()", "focus": "onFocus()" }, properties: { "attr.aria-checked": "
|
163
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.11", type: RdxRadioItemDirective, isStandalone: true, selector: "[rdxRadioItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button", "role": "radio" }, listeners: { "click": "onClick()", "keydown": "onKeyDown($event)", "keyup": "onKeyUp()", "focus": "onFocus()" }, properties: { "attr.aria-checked": "checkedState()", "attr.data-disabled": "disabledState() ? \"\" : null", "attr.data-state": "checkedState() ? \"checked\" : \"unchecked\"", "disabled": "disabledState()" } }, providers: [{ provide: RdxRadioItemToken, useExisting: RdxRadioItemDirective }], exportAs: ["rdxRadioItem"], hostDirectives: [{ directive: i1.RdxRovingFocusItemDirective, inputs: ["tabStopId", "id", "focusable", "focusable", "active", "active", "allowShiftKey", "allowShiftKey"] }], ngImport: i0 }); }
|
172
164
|
}
|
173
165
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxRadioItemDirective, decorators: [{
|
174
166
|
type: Directive,
|
@@ -183,9 +175,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImpo
|
|
183
175
|
host: {
|
184
176
|
type: 'button',
|
185
177
|
role: 'radio',
|
186
|
-
'[attr.aria-checked]': '
|
187
|
-
'[attr.data-disabled]': '
|
188
|
-
'[attr.data-state]': '
|
178
|
+
'[attr.aria-checked]': 'checkedState()',
|
179
|
+
'[attr.data-disabled]': 'disabledState() ? "" : null',
|
180
|
+
'[attr.data-state]': 'checkedState() ? "checked" : "unchecked"',
|
181
|
+
'[disabled]': 'disabledState()',
|
189
182
|
'(click)': 'onClick()',
|
190
183
|
'(keydown)': 'onKeyDown($event)',
|
191
184
|
'(keyup)': 'onKeyUp()',
|
@@ -200,7 +193,7 @@ class RdxRadioIndicatorDirective {
|
|
200
193
|
this.radioItem = inject(RdxRadioItemDirective);
|
201
194
|
}
|
202
195
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxRadioIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
203
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.11", type: RdxRadioIndicatorDirective, isStandalone: true, selector: "[rdxRadioIndicator]", host: { properties: { "attr.data-state": "radioItem.
|
196
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.11", type: RdxRadioIndicatorDirective, isStandalone: true, selector: "[rdxRadioIndicator]", host: { properties: { "attr.data-state": "radioItem.checkedState() ? \"checked\" : \"unchecked\"", "attr.data-disabled": "radioItem.disabled ? \"\" : null" } }, exportAs: ["rdxRadioIndicator"], ngImport: i0 }); }
|
204
197
|
}
|
205
198
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: RdxRadioIndicatorDirective, decorators: [{
|
206
199
|
type: Directive,
|
@@ -209,7 +202,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImpo
|
|
209
202
|
exportAs: 'rdxRadioIndicator',
|
210
203
|
standalone: true,
|
211
204
|
host: {
|
212
|
-
'[attr.data-state]': 'radioItem.
|
205
|
+
'[attr.data-state]': 'radioItem.checkedState() ? "checked" : "unchecked"',
|
213
206
|
'[attr.data-disabled]': 'radioItem.disabled ? "" : null'
|
214
207
|
}
|
215
208
|
}]
|
@@ -220,7 +213,7 @@ class RdxRadioItemInputDirective {
|
|
220
213
|
this.radioItem = injectRadioItem();
|
221
214
|
this.name = input();
|
222
215
|
this.value = computed(() => this.radioItem.value() || undefined);
|
223
|
-
this.checked = computed(() => this.radioItem.
|
216
|
+
this.checked = computed(() => this.radioItem.checkedState() || undefined);
|
224
217
|
this.required = input(this.radioItem.required());
|
225
218
|
this.disabled = input(this.radioItem.disabled());
|
226
219
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"radix-ng-primitives-radio.mjs","sources":["../../../packages/primitives/radio/src/radio-tokens.ts","../../../packages/primitives/radio/src/radio-root.directive.ts","../../../packages/primitives/radio/src/radio-item.directive.ts","../../../packages/primitives/radio/src/radio-indicator.directive.ts","../../../packages/primitives/radio/src/radio-item-input.directive.ts","../../../packages/primitives/radio/radix-ng-primitives-radio.ts"],"sourcesContent":["import { InjectionToken, ModelSignal } from '@angular/core';\n\nexport interface RadioGroupProps {\n name?: string;\n disabled?: boolean;\n defaultValue?: string;\n value?: ModelSignal<string | undefined>;\n}\n\nexport interface RadioGroupDirective extends RadioGroupProps {\n select(value: string | undefined): void;\n\n onTouched(): void;\n}\n\nexport const RDX_RADIO_GROUP = new InjectionToken<RadioGroupDirective>('RdxRadioGroup');\n","import { booleanAttribute, Directive, EventEmitter, Input, model, Output } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Orientation, RdxRovingFocusGroupDirective } from '@radix-ng/primitives/roving-focus';\nimport { RadioGroupDirective, RadioGroupProps, RDX_RADIO_GROUP } from './radio-tokens';\n\n@Directive({\n selector: '[rdxRadioRoot]',\n exportAs: 'rdxRadioRoot',\n standalone: true,\n providers: [\n { provide: RDX_RADIO_GROUP, useExisting: RdxRadioGroupDirective },\n { provide: NG_VALUE_ACCESSOR, useExisting: RdxRadioGroupDirective, multi: true }\n ],\n hostDirectives: [{ directive: RdxRovingFocusGroupDirective, inputs: ['dir', 'orientation', 'loop'] }],\n host: {\n role: 'radiogroup',\n '[attr.aria-orientation]': 'orientation',\n '[attr.data-disabled]': 'disabled ? \"\" : null',\n '(keydown)': 'onKeydown()'\n }\n})\nexport class RdxRadioGroupDirective implements RadioGroupProps, RadioGroupDirective, ControlValueAccessor {\n readonly value = model<string | undefined>();\n\n @Input({ transform: booleanAttribute }) disabled = false;\n\n @Input() defaultValue?: string;\n\n @Input() required: boolean;\n\n @Input() orientation: Orientation;\n\n /**\n * Event handler called when the value changes.\n */\n @Output() readonly onValueChange = new EventEmitter<string>();\n\n /**\n * The callback function to call when the value of the radio group changes.\n */\n private onChange: (value: string) => void = () => {\n /* Empty */\n };\n\n /**\n * The callback function to call when the radio group is touched.\n * @ignore\n */\n onTouched: () => void = () => {\n /* Empty */\n };\n\n /**\n * Select a radio item.\n * @param value The value of the radio item to select.\n * @ignore\n */\n select(value: string): void {\n this.value.set(value);\n this.onValueChange.emit(value);\n this.onChange?.(value);\n this.onTouched();\n }\n\n /**\n * Update the value of the radio group.\n * @param value The new value of the radio group.\n * @ignore\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 * @ignore\n */\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n /** @ignore */\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 * @ignore\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n protected onKeydown(): void {\n if (this.disabled) return;\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, ElementRef, inject, InjectionToken, input, OnInit, signal } from '@angular/core';\nimport { RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';\nimport { RDX_RADIO_GROUP } from './radio-tokens';\n\nexport const RdxRadioItemToken = new InjectionToken<RdxRadioItemDirective>('RadioItemToken');\n\nexport function injectRadioItem(): RdxRadioItemDirective {\n return inject(RdxRadioItemToken);\n}\n\n@Directive({\n selector: '[rdxRadioItem]',\n exportAs: 'rdxRadioItem',\n standalone: true,\n providers: [{ provide: RdxRadioItemToken, useExisting: RdxRadioItemDirective }],\n hostDirectives: [\n { directive: RdxRovingFocusItemDirective, inputs: ['tabStopId: id', 'focusable', 'active', 'allowShiftKey'] }],\n\n host: {\n type: 'button',\n role: 'radio',\n '[attr.aria-checked]': 'checked',\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\n '[attr.data-state]': 'checked ? \"checked\" : \"unchecked\"',\n '(click)': 'onClick()',\n '(keydown)': 'onKeyDown($event)',\n '(keyup)': 'onKeyUp()',\n '(focus)': 'onFocus()'\n }\n})\nexport class RdxRadioItemDirective implements OnInit {\n private readonly radioGroup = inject(RDX_RADIO_GROUP);\n private readonly elementRef = inject(ElementRef);\n\n readonly value = input.required<string>();\n\n readonly id = input<string>();\n\n readonly required = input<boolean>();\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n private readonly ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'];\n private readonly isArrowKeyPressedSignal = signal(false);\n\n /** @ignore */\n ngOnInit() {\n if (this.radioGroup.defaultValue === this.value()) {\n this.radioGroup.select(this.value());\n }\n }\n\n /** @ignore */\n get checked(): boolean {\n if (this.radioGroup.value == undefined) return false;\n\n return this.radioGroup.value() === this.value();\n }\n\n /** @ignore */\n onClick() {\n if (!this.disabled()) {\n this.radioGroup.select(this.value());\n this.isArrowKeyPressedSignal.set(true);\n }\n }\n\n /** @ignore */\n onKeyDown(event: KeyboardEvent): void {\n if (this.ARROW_KEYS.includes(event.key)) {\n this.isArrowKeyPressedSignal.set(true);\n }\n }\n\n /** @ignore */\n onKeyUp() {\n this.isArrowKeyPressedSignal.set(false);\n }\n\n /** @ignore */\n onFocus() {\n this.radioGroup.select(this.value());\n setTimeout(() => {\n /**\n * When navigating with arrow keys, focus triggers on the radio item.\n * To \"check\" the radio, we programmatically trigger a click event.\n */\n if (this.isArrowKeyPressedSignal()) {\n this.elementRef.nativeElement.click();\n }\n }, 0);\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { RdxRadioItemDirective } from './radio-item.directive';\nimport { RDX_RADIO_GROUP, RadioGroupDirective } from './radio-tokens';\n\n@Directive({\n selector: '[rdxRadioIndicator]',\n exportAs: 'rdxRadioIndicator',\n standalone: true,\n host: {\n '[attr.data-state]': 'radioItem.checked ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'radioItem.disabled ? \"\" : null'\n }\n})\nexport class RdxRadioIndicatorDirective {\n protected readonly radioGroup: RadioGroupDirective = inject(RDX_RADIO_GROUP);\n protected readonly radioItem: RdxRadioItemDirective = inject(RdxRadioItemDirective);\n}\n","import { computed, Directive, input } from '@angular/core';\nimport { RdxVisuallyHiddenDirective } from '@radix-ng/primitives/visually-hidden';\nimport { injectRadioItem } from './radio-item.directive';\n\n@Directive({\n selector: '[rdxRadioItemInput]',\n exportAs: 'rdxRadioItemInput',\n standalone: true,\n hostDirectives: [\n { directive: RdxVisuallyHiddenDirective, inputs: ['feature'] }],\n host: {\n type: 'radio',\n '[attr.name]': 'name()',\n '[attr.required]': 'required()',\n '[attr.disabled]': 'disabled() ? disabled() : undefined',\n '[attr.checked]': 'checked()',\n '[value]': 'value()'\n }\n})\nexport class RdxRadioItemInputDirective {\n private readonly radioItem = injectRadioItem();\n\n readonly name = input<string>();\n readonly value = computed(() => this.radioItem.value() || undefined);\n readonly checked = computed(() => this.radioItem.checked || undefined);\n readonly required = input<boolean | undefined>(this.radioItem.required());\n readonly disabled = input<boolean | undefined>(this.radioItem.disabled());\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;AAeO,MAAM,eAAe,GAAG,IAAI,cAAc,CAAsB,eAAe,CAAC;;MCM1E,sBAAsB,CAAA;AAhBnC,IAAA,WAAA,GAAA;QAiBa,IAAK,CAAA,KAAA,GAAG,KAAK,EAAsB;QAEJ,IAAQ,CAAA,QAAA,GAAG,KAAK;AAQxD;;AAEG;AACgB,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,YAAY,EAAU;AAE7D;;AAEG;QACK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AS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,cAAc,EAAE;wBACZ,EAAE,SAAS,EAAE,0BAA0B,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC;AAAG,qBAAA;AACnE,oBAAA,IAAI,EAAE;AACF,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,iBAAiB,EAAE,YAAY;AAC/B,wBAAA,iBAAiB,EAAE,qCAAqC;AACxD,wBAAA,gBAAgB,EAAE,WAAW;AAC7B,wBAAA,SAAS,EAAE;AACd;AACJ,iBAAA;;;AClBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"radix-ng-primitives-radio.mjs","sources":["../../../packages/primitives/radio/src/radio-tokens.ts","../../../packages/primitives/radio/src/radio-root.directive.ts","../../../packages/primitives/radio/src/radio-item.directive.ts","../../../packages/primitives/radio/src/radio-indicator.directive.ts","../../../packages/primitives/radio/src/radio-item-input.directive.ts","../../../packages/primitives/radio/radix-ng-primitives-radio.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion';\nimport { InjectionToken, InputSignalWithTransform, ModelSignal, Signal } from '@angular/core';\n\nexport interface RadioGroupProps {\n name?: string;\n disabled?: InputSignalWithTransform<boolean, BooleanInput>;\n defaultValue?: string;\n value: ModelSignal<string | null>;\n disableState: Signal<boolean>;\n}\n\nexport interface RadioGroupDirective extends RadioGroupProps {\n select(value: string | null): void;\n\n onTouched(): void;\n}\n\nexport const RDX_RADIO_GROUP = new InjectionToken<RadioGroupDirective>('RdxRadioGroup');\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, input, Input, model, output, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Orientation, RdxRovingFocusGroupDirective } from '@radix-ng/primitives/roving-focus';\nimport { RadioGroupDirective, RadioGroupProps, RDX_RADIO_GROUP } from './radio-tokens';\n\n@Directive({\n selector: '[rdxRadioRoot]',\n exportAs: 'rdxRadioRoot',\n standalone: true,\n providers: [\n { provide: RDX_RADIO_GROUP, useExisting: RdxRadioGroupDirective },\n { provide: NG_VALUE_ACCESSOR, useExisting: RdxRadioGroupDirective, multi: true }\n ],\n hostDirectives: [{ directive: RdxRovingFocusGroupDirective, inputs: ['dir', 'orientation', 'loop'] }],\n host: {\n role: 'radiogroup',\n '[attr.aria-orientation]': 'orientation()',\n '[attr.aria-required]': 'required()',\n '[attr.data-disabled]': 'disableState() ? \"\" : null',\n '(keydown)': 'onKeydown()'\n }\n})\nexport class RdxRadioGroupDirective implements RadioGroupProps, RadioGroupDirective, ControlValueAccessor {\n readonly value = model<string | null>(null);\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n @Input() defaultValue?: string;\n\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly orientation = input<Orientation>();\n\n /**\n * Event handler called when the value changes.\n */\n readonly onValueChange = output<string>();\n\n private readonly disable = signal<boolean>(this.disabled());\n readonly disableState = computed(() => this.disable() || this.disabled());\n\n /**\n * The callback function to call when the value of the radio group changes.\n */\n private onChange: (value: string) => void = () => {\n /* Empty */\n };\n\n /**\n * The callback function to call when the radio group is touched.\n * @ignore\n */\n onTouched: () => void = () => {\n /* Empty */\n };\n\n /**\n * Select a radio item.\n * @param value The value of the radio item to select.\n * @ignore\n */\n select(value: string): void {\n this.value.set(value);\n this.onValueChange.emit(value);\n this.onChange?.(value);\n this.onTouched();\n }\n\n /**\n * Update the value of the radio group.\n * @param value The new value of the radio group.\n * @ignore\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 * @ignore\n */\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n /** @ignore */\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 * @ignore\n */\n setDisabledState(isDisabled: boolean): void {\n this.disable.set(isDisabled);\n }\n\n protected onKeydown(): void {\n if (this.disableState()) return;\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n InjectionToken,\n input,\n OnInit,\n signal\n} from '@angular/core';\nimport { RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';\nimport { RDX_RADIO_GROUP } from './radio-tokens';\n\nexport const RdxRadioItemToken = new InjectionToken<RdxRadioItemDirective>('RadioItemToken');\n\nexport function injectRadioItem(): RdxRadioItemDirective {\n return inject(RdxRadioItemToken);\n}\n\n@Directive({\n selector: '[rdxRadioItem]',\n exportAs: 'rdxRadioItem',\n standalone: true,\n providers: [{ provide: RdxRadioItemToken, useExisting: RdxRadioItemDirective }],\n hostDirectives: [\n { directive: RdxRovingFocusItemDirective, inputs: ['tabStopId: id', 'focusable', 'active', 'allowShiftKey'] }],\n\n host: {\n type: 'button',\n role: 'radio',\n '[attr.aria-checked]': 'checkedState()',\n '[attr.data-disabled]': 'disabledState() ? \"\" : null',\n '[attr.data-state]': 'checkedState() ? \"checked\" : \"unchecked\"',\n '[disabled]': 'disabledState()',\n '(click)': 'onClick()',\n '(keydown)': 'onKeyDown($event)',\n '(keyup)': 'onKeyUp()',\n '(focus)': 'onFocus()'\n }\n})\nexport class RdxRadioItemDirective implements OnInit {\n private readonly radioGroup = inject(RDX_RADIO_GROUP);\n private readonly elementRef = inject(ElementRef);\n\n readonly value = input.required<string>();\n\n readonly id = input<string>();\n\n readonly required = input<boolean>();\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n protected readonly disabledState = computed(() => this.radioGroup.disableState() || this.disabled());\n\n readonly checkedState = computed(() => this.radioGroup.value() === this.value());\n\n private readonly ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'];\n private readonly isArrowKeyPressedSignal = signal(false);\n\n /** @ignore */\n ngOnInit() {\n if (this.radioGroup.defaultValue === this.value()) {\n this.radioGroup.select(this.value());\n }\n }\n\n /** @ignore */\n onClick() {\n if (!this.disabledState()) {\n this.radioGroup.select(this.value());\n this.isArrowKeyPressedSignal.set(true);\n }\n }\n\n /** @ignore */\n onKeyDown(event: KeyboardEvent): void {\n if (this.ARROW_KEYS.includes(event.key)) {\n this.isArrowKeyPressedSignal.set(true);\n }\n }\n\n /** @ignore */\n onKeyUp() {\n this.isArrowKeyPressedSignal.set(false);\n }\n\n /** @ignore */\n onFocus() {\n this.radioGroup.select(this.value());\n setTimeout(() => {\n /**\n * When navigating with arrow keys, focus triggers on the radio item.\n * To \"check\" the radio, we programmatically trigger a click event.\n */\n if (this.isArrowKeyPressedSignal()) {\n this.elementRef.nativeElement.click();\n }\n }, 0);\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { RdxRadioItemDirective } from './radio-item.directive';\nimport { RDX_RADIO_GROUP, RadioGroupDirective } from './radio-tokens';\n\n@Directive({\n selector: '[rdxRadioIndicator]',\n exportAs: 'rdxRadioIndicator',\n standalone: true,\n host: {\n '[attr.data-state]': 'radioItem.checkedState() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'radioItem.disabled ? \"\" : null'\n }\n})\nexport class RdxRadioIndicatorDirective {\n protected readonly radioGroup: RadioGroupDirective = inject(RDX_RADIO_GROUP);\n protected readonly radioItem: RdxRadioItemDirective = inject(RdxRadioItemDirective);\n}\n","import { computed, Directive, input } from '@angular/core';\nimport { RdxVisuallyHiddenDirective } from '@radix-ng/primitives/visually-hidden';\nimport { injectRadioItem } from './radio-item.directive';\n\n@Directive({\n selector: '[rdxRadioItemInput]',\n exportAs: 'rdxRadioItemInput',\n standalone: true,\n hostDirectives: [\n { directive: RdxVisuallyHiddenDirective, inputs: ['feature'] }],\n host: {\n type: 'radio',\n '[attr.name]': 'name()',\n '[attr.required]': 'required()',\n '[attr.disabled]': 'disabled() ? disabled() : undefined',\n '[attr.checked]': 'checked()',\n '[value]': 'value()'\n }\n})\nexport class RdxRadioItemInputDirective {\n private readonly radioItem = injectRadioItem();\n\n readonly name = input<string>();\n readonly value = computed(() => this.radioItem.value() || undefined);\n readonly checked = computed(() => this.radioItem.checkedState() || undefined);\n readonly required = input<boolean | undefined>(this.radioItem.required());\n readonly disabled = input<boolean | undefined>(this.radioItem.disabled());\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;AAiBO,MAAM,eAAe,GAAG,IAAI,cAAc,CAAsB,eAAe,CAAC;;MCM1E,sBAAsB,CAAA;AAjBnC,IAAA,WAAA,GAAA;AAkBa,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,CAAC;QAElC,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAwB,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;QAI/E,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAwB,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;QAE/E,IAAW,CAAA,WAAA,GAAG,KAAK,EAAe;AAE3C;;AAEG;QACM,IAAa,CAAA,aAAA,GAAG,MAAM,EAAU;QAExB,IAAO,CAAA,OAAA,GAAG,MAAM,CAAU,IAAI,CAAC,QAAQ,EAAE,CAAC;AAClD,QAAA,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;AAEzE;;AAEG;QACK,IAAQ,CAAA,QAAA,GAA4B,MAAK;;AAEjD,SAAC;AAED;;;AAGG;QACH,IAAS,CAAA,SAAA,GAAe,MAAK;;AAE7B,SAAC;AAiDJ;AA/CG;;;;AAIG;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;kBAftC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,cAAc,EAAE;wBACZ,EAAE,SAAS,EAAE,0BAA0B,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC;AAAG,qBAAA;AACnE,oBAAA,IAAI,EAAE;AACF,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,iBAAiB,EAAE,YAAY;AAC/B,wBAAA,iBAAiB,EAAE,qCAAqC;AACxD,wBAAA,gBAAgB,EAAE,WAAW;AAC7B,wBAAA,SAAS,EAAE;AACd;AACJ,iBAAA;;;AClBD;;AAEG;;;;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@radix-ng/primitives",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.20.1",
|
4
4
|
"license": "MIT",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -115,6 +115,12 @@
|
|
115
115
|
"esm": "./esm2022/menubar/radix-ng-primitives-menubar.mjs",
|
116
116
|
"default": "./fesm2022/radix-ng-primitives-menubar.mjs"
|
117
117
|
},
|
118
|
+
"./popover": {
|
119
|
+
"types": "./popover/index.d.ts",
|
120
|
+
"esm2022": "./esm2022/popover/radix-ng-primitives-popover.mjs",
|
121
|
+
"esm": "./esm2022/popover/radix-ng-primitives-popover.mjs",
|
122
|
+
"default": "./fesm2022/radix-ng-primitives-popover.mjs"
|
123
|
+
},
|
118
124
|
"./progress": {
|
119
125
|
"types": "./progress/index.d.ts",
|
120
126
|
"esm2022": "./esm2022/progress/radix-ng-primitives-progress.mjs",
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./src/popover-arrow.directive";
|
3
|
+
import * as i2 from "./src/popover-close.directive";
|
4
|
+
import * as i3 from "./src/popover-content.directive";
|
5
|
+
import * as i4 from "./src/popover-trigger.directive";
|
6
|
+
import * as i5 from "./src/popover-root.directive";
|
7
|
+
export * from './src/popover-arrow.directive';
|
8
|
+
export * from './src/popover-close.directive';
|
9
|
+
export * from './src/popover-content.directive';
|
10
|
+
export * from './src/popover-root.directive';
|
11
|
+
export * from './src/popover-trigger.directive';
|
12
|
+
export * from './src/popover.types';
|
13
|
+
export declare class RdxPopoverModule {
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxPopoverModule, never>;
|
15
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<RdxPopoverModule, never, [typeof i1.RdxPopoverArrowDirective, typeof i2.RdxPopoverCloseDirective, typeof i3.RdxPopoverContentDirective, typeof i4.RdxPopoverTriggerDirective, typeof i5.RdxPopoverRootDirective], [typeof i1.RdxPopoverArrowDirective, typeof i2.RdxPopoverCloseDirective, typeof i3.RdxPopoverContentDirective, typeof i4.RdxPopoverTriggerDirective, typeof i5.RdxPopoverRootDirective]>;
|
16
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<RdxPopoverModule>;
|
17
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { AfterViewInit } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class RdxPopoverArrowDirective implements AfterViewInit {
|
4
|
+
/** @ignore */
|
5
|
+
private readonly renderer;
|
6
|
+
/** @ignore */
|
7
|
+
private readonly popoverRoot;
|
8
|
+
/** @ignore */
|
9
|
+
private readonly elementRef;
|
10
|
+
/**
|
11
|
+
* The width of the arrow in pixels.
|
12
|
+
*/
|
13
|
+
readonly width: import("@angular/core").InputSignal<number>;
|
14
|
+
/**
|
15
|
+
* The height of the arrow in pixels.
|
16
|
+
*/
|
17
|
+
readonly height: import("@angular/core").InputSignal<number>;
|
18
|
+
/** @ignore */
|
19
|
+
readonly arrowSvgElement: import("@angular/core").Signal<HTMLElement>;
|
20
|
+
/** @ignore */
|
21
|
+
private readonly currentArrowSvgElement;
|
22
|
+
/** @ignore */
|
23
|
+
private readonly position;
|
24
|
+
/** @ignore */
|
25
|
+
private triggerRect;
|
26
|
+
constructor();
|
27
|
+
/** @ignore */
|
28
|
+
ngAfterViewInit(): void;
|
29
|
+
/** @ignore */
|
30
|
+
private setPosition;
|
31
|
+
/** @ignore */
|
32
|
+
private onArrowSvgElementChangeEffect;
|
33
|
+
/** @ignore */
|
34
|
+
private onContentPositionChangeEffect;
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxPopoverArrowDirective, never>;
|
36
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxPopoverArrowDirective, "[rdxPopoverArrow]", never, { "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
37
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class RdxPopoverCloseDirective {
|
4
|
+
/** @ignore */
|
5
|
+
readonly popoverRoot: import("@radix-ng/primitives/popover").RdxPopoverRootDirective;
|
6
|
+
/** @ignore */
|
7
|
+
readonly elementRef: ElementRef<HTMLElement>;
|
8
|
+
/** @ignore */
|
9
|
+
private readonly renderer;
|
10
|
+
constructor();
|
11
|
+
/** @ignore */
|
12
|
+
private onIsControlledExternallyEffect;
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxPopoverCloseDirective, never>;
|
14
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxPopoverCloseDirective, "[rdxPopoverClose]", never, {}, {}, never, never, true, never>;
|
15
|
+
}
|
@@ -0,0 +1,84 @@
|
|
1
|
+
import { Overlay } from '@angular/cdk/overlay';
|
2
|
+
import { DestroyRef, OnInit, TemplateRef } from '@angular/core';
|
3
|
+
import { RdxPopoverAlign, RdxPopoverSide } from './popover.types';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
import * as i1 from "@angular/cdk/overlay";
|
6
|
+
export declare class RdxPopoverContentDirective implements OnInit {
|
7
|
+
/** @ignore */
|
8
|
+
readonly popoverRoot: import("@radix-ng/primitives/popover").RdxPopoverRootDirective;
|
9
|
+
/** @ignore */
|
10
|
+
readonly templateRef: TemplateRef<any>;
|
11
|
+
/** @ignore */
|
12
|
+
readonly overlay: Overlay;
|
13
|
+
/** @ignore */
|
14
|
+
readonly destroyRef: DestroyRef;
|
15
|
+
/** @ignore */
|
16
|
+
private readonly connectedOverlay;
|
17
|
+
/**
|
18
|
+
* The preferred side of the trigger to render against when open. Will be reversed when collisions occur and avoidCollisions is enabled.
|
19
|
+
*/
|
20
|
+
readonly side: import("@angular/core").InputSignal<RdxPopoverSide>;
|
21
|
+
/**
|
22
|
+
* The distance in pixels from the trigger.
|
23
|
+
*/
|
24
|
+
readonly sideOffset: import("@angular/core").InputSignal<number | undefined>;
|
25
|
+
/**
|
26
|
+
* The preferred alignment against the trigger. May change when collisions occur.
|
27
|
+
*/
|
28
|
+
readonly align: import("@angular/core").InputSignal<RdxPopoverAlign>;
|
29
|
+
/**
|
30
|
+
* An offset in pixels from the "start" or "end" alignment options.
|
31
|
+
*/
|
32
|
+
readonly alignOffset: import("@angular/core").InputSignal<number | undefined>;
|
33
|
+
/**
|
34
|
+
* Whether to add some alternate positions of the content.
|
35
|
+
*/
|
36
|
+
readonly disableAlternatePositions: import("@angular/core").InputSignal<boolean>;
|
37
|
+
/** @ingore */
|
38
|
+
readonly positions: import("@angular/core").Signal<import("@angular/cdk/overlay").ConnectedPosition[]>;
|
39
|
+
/**
|
40
|
+
* Event handler called when the escape key is down. It can be prevented by calling event.preventDefault.
|
41
|
+
*/
|
42
|
+
readonly onEscapeKeyDown: import("@angular/core").OutputEmitterRef<KeyboardEvent>;
|
43
|
+
/**
|
44
|
+
* Event handler called when a pointer event occurs outside the bounds of the component. It can be prevented by calling event.preventDefault.
|
45
|
+
*/
|
46
|
+
readonly onPointerDownOutside: import("@angular/core").OutputEmitterRef<MouseEvent>;
|
47
|
+
/**
|
48
|
+
* Event handler called when the overlay is atached
|
49
|
+
*/
|
50
|
+
readonly onShow: import("@angular/core").OutputEmitterRef<void>;
|
51
|
+
/**
|
52
|
+
* Event handler called when the overlay is detached
|
53
|
+
*/
|
54
|
+
readonly onHide: import("@angular/core").OutputEmitterRef<void>;
|
55
|
+
constructor();
|
56
|
+
/** @ignore */
|
57
|
+
ngOnInit(): void;
|
58
|
+
/** @ignore */
|
59
|
+
show(): void;
|
60
|
+
/** @ignore */
|
61
|
+
hide(): void;
|
62
|
+
/** @ignore */
|
63
|
+
positionChange(): import("rxjs").Observable<import("@angular/cdk/overlay").ConnectedOverlayPositionChange>;
|
64
|
+
/** @ignore */
|
65
|
+
private connectKeydownEscape;
|
66
|
+
/** @ignore */
|
67
|
+
private connectOutsideClick;
|
68
|
+
/** @ignore */
|
69
|
+
private onAttach;
|
70
|
+
/** @ignore */
|
71
|
+
private onDetach;
|
72
|
+
/** @ignore */
|
73
|
+
private setScrollStrategy;
|
74
|
+
/** @ignore */
|
75
|
+
private setDisableClose;
|
76
|
+
/** @ignore */
|
77
|
+
private setOrigin;
|
78
|
+
/** @ignore */
|
79
|
+
private onPositionChangeEffect;
|
80
|
+
/** @ignore */
|
81
|
+
private onControlledExternallyChangeEffect;
|
82
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxPopoverContentDirective, never>;
|
83
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxPopoverContentDirective, "[rdxPopoverContent]", never, { "side": { "alias": "side"; "required": false; "isSignal": true; }; "sideOffset": { "alias": "sideOffset"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "alignOffset": { "alias": "alignOffset"; "required": false; "isSignal": true; }; "disableAlternatePositions": { "alias": "disableAlternatePositions"; "required": false; "isSignal": true; }; }, { "onEscapeKeyDown": "onEscapeKeyDown"; "onPointerDownOutside": "onPointerDownOutside"; "onShow": "onShow"; "onHide": "onHide"; }, never, never, true, [{ directive: typeof i1.CdkConnectedOverlay; inputs: {}; outputs: {}; }]>;
|
84
|
+
}
|