ngx-com 0.0.3 → 0.0.5
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/fesm2022/ngx-com-components-avatar.mjs +772 -0
- package/fesm2022/ngx-com-components-avatar.mjs.map +1 -0
- package/fesm2022/ngx-com-components-calendar.mjs +33 -130
- package/fesm2022/ngx-com-components-calendar.mjs.map +1 -1
- package/fesm2022/ngx-com-components-confirm.mjs +562 -0
- package/fesm2022/ngx-com-components-confirm.mjs.map +1 -0
- package/fesm2022/ngx-com-components-dropdown.mjs +119 -25
- package/fesm2022/ngx-com-components-dropdown.mjs.map +1 -1
- package/fesm2022/ngx-com-components-empty-state.mjs +382 -0
- package/fesm2022/ngx-com-components-empty-state.mjs.map +1 -0
- package/fesm2022/ngx-com-components-form-field.mjs +16 -15
- package/fesm2022/ngx-com-components-form-field.mjs.map +1 -1
- package/fesm2022/ngx-com-components-item.mjs +578 -0
- package/fesm2022/ngx-com-components-item.mjs.map +1 -0
- package/fesm2022/ngx-com-components-paginator.mjs +823 -0
- package/fesm2022/ngx-com-components-paginator.mjs.map +1 -0
- package/fesm2022/ngx-com-components-segmented-control.mjs +538 -0
- package/fesm2022/ngx-com-components-segmented-control.mjs.map +1 -0
- package/fesm2022/ngx-com-components-spinner.mjs +189 -0
- package/fesm2022/ngx-com-components-spinner.mjs.map +1 -0
- package/fesm2022/ngx-com-components-tooltip.mjs +625 -0
- package/fesm2022/ngx-com-components-tooltip.mjs.map +1 -0
- package/package.json +33 -1
- package/types/ngx-com-components-avatar.d.ts +409 -0
- package/types/ngx-com-components-calendar.d.ts +5 -0
- package/types/ngx-com-components-confirm.d.ts +160 -0
- package/types/ngx-com-components-dropdown.d.ts +52 -28
- package/types/ngx-com-components-empty-state.d.ts +269 -0
- package/types/ngx-com-components-item.d.ts +336 -0
- package/types/ngx-com-components-paginator.d.ts +265 -0
- package/types/ngx-com-components-segmented-control.d.ts +274 -0
- package/types/ngx-com-components-spinner.d.ts +120 -0
- package/types/ngx-com-components-tooltip.d.ts +200 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-com-components-tooltip.mjs","sources":["../../../projects/com/components/tooltip/tooltip.variants.ts","../../../projects/com/components/tooltip/tooltip.utils.ts","../../../projects/com/components/tooltip/tooltip-panel.component.ts","../../../projects/com/components/tooltip/tooltip.directive.ts","../../../projects/com/components/tooltip/index.ts","../../../projects/com/components/tooltip/ngx-com-components-tooltip.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\nimport type { TooltipColor, TooltipSize, TooltipSide } from './tooltip.models';\n\n/**\n * CVA variants for the tooltip panel wrapper.\n *\n * @tokens `--color-tooltip`, `--color-tooltip-foreground`, `--color-primary`, `--color-primary-foreground`,\n * `--color-accent`, `--color-accent-foreground`, `--color-warn`, `--color-warn-foreground`,\n * `--color-popover`, `--color-popover-foreground`, `--color-border`\n */\nexport const tooltipPanelVariants: (props?: {\n color?: TooltipColor;\n size?: TooltipSize;\n}) => string = cva(\n [\n 'com-tooltip-panel',\n 'z-50',\n 'pointer-events-auto',\n 'select-none',\n 'leading-normal',\n ],\n {\n variants: {\n color: {\n default: 'bg-tooltip text-tooltip-foreground',\n primary: 'bg-primary text-primary-foreground',\n accent: 'bg-accent text-accent-foreground',\n warn: 'bg-warn text-warn-foreground',\n invert: 'bg-popover text-popover-foreground border border-border shadow-md',\n },\n size: {\n sm: 'px-2 py-1 text-xs max-w-48 rounded-md',\n md: 'px-3 py-1.5 text-sm max-w-64 rounded-lg',\n lg: 'px-4 py-2.5 text-sm max-w-80 rounded-xl',\n },\n },\n defaultVariants: {\n color: 'default',\n size: 'md',\n },\n },\n);\n\n/**\n * CVA variants for the tooltip arrow element.\n * The arrow points toward the trigger element.\n *\n * @tokens `--color-tooltip`, `--color-primary`, `--color-accent`, `--color-warn`,\n * `--color-popover`, `--color-border`\n */\nexport const tooltipArrowVariants: (props?: {\n color?: TooltipColor;\n side?: TooltipSide;\n}) => string = cva('absolute size-2 rotate-45', {\n variants: {\n color: {\n default: 'bg-tooltip',\n primary: 'bg-primary',\n accent: 'bg-accent',\n warn: 'bg-warn',\n invert: 'bg-popover border-l border-t border-border',\n },\n side: {\n // Arrow points DOWN (tooltip is above trigger)\n top: 'left-1/2 -translate-x-1/2 bottom-0 translate-y-1/2',\n // Arrow points UP (tooltip is below trigger)\n bottom: 'left-1/2 -translate-x-1/2 top-0 -translate-y-1/2',\n // Arrow points RIGHT (tooltip is left of trigger)\n left: 'top-1/2 -translate-y-1/2 right-0 translate-x-1/2',\n // Arrow points LEFT (tooltip is right of trigger)\n right: 'top-1/2 -translate-y-1/2 left-0 -translate-x-1/2',\n },\n },\n compoundVariants: [\n // Invert arrow needs different rotation for border visibility\n { color: 'invert', side: 'top', class: 'rotate-[225deg]' },\n { color: 'invert', side: 'bottom', class: 'rotate-45' },\n { color: 'invert', side: 'left', class: 'rotate-[135deg]' },\n { color: 'invert', side: 'right', class: '-rotate-45' },\n ],\n defaultVariants: {\n color: 'default',\n side: 'top',\n },\n});\n","export { mergeClasses } from 'ngx-com/utils';\n\nlet tooltipIdCounter = 0;\n\n/**\n * Generate a unique ID for a tooltip instance.\n */\nexport function generateTooltipId(): string {\n return `tooltip-${++tooltipIdCounter}`;\n}\n","import { ChangeDetectionStrategy, Component, computed, signal } from '@angular/core';\nimport type { Signal, TemplateRef, WritableSignal } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { tooltipPanelVariants, tooltipArrowVariants } from './tooltip.variants';\nimport type { TooltipColor, TooltipSize, TooltipSide, TooltipTemplateContext } from './tooltip.models';\nimport { mergeClasses } from './tooltip.utils';\n\n/**\n * Internal tooltip panel component rendered inside the CDK overlay.\n * Receives content (string or template) and variant inputs from the directive.\n *\n * @internal Not exported in public API\n *\n * @tokens `--color-tooltip`, `--color-tooltip-foreground`, `--color-primary`, `--color-primary-foreground`,\n * `--color-accent`, `--color-accent-foreground`, `--color-warn`, `--color-warn-foreground`,\n * `--color-popover`, `--color-popover-foreground`, `--color-border`\n */\n@Component({\n selector: 'com-tooltip-panel',\n template: `\n <div\n class=\"relative\"\n [attr.data-state]=\"visible() ? 'visible' : 'hidden'\"\n [attr.data-side]=\"activeSide()\"\n >\n @if (showArrow()) {\n <span [class]=\"arrowClasses()\" aria-hidden=\"true\"></span>\n }\n <div\n [class]=\"panelClasses()\"\n role=\"tooltip\"\n [attr.id]=\"tooltipId()\"\n >\n @if (templateRef()) {\n <ng-container\n [ngTemplateOutlet]=\"templateRef()!\"\n [ngTemplateOutletContext]=\"templateContext()\"\n />\n } @else {\n {{ textContent() }}\n }\n </div>\n </div>\n `,\n styles: `\n :host {\n display: contents;\n }\n\n /* Animation styles */\n [data-state='visible'] {\n animation: tooltip-in 120ms ease-out;\n }\n\n [data-state='hidden'] {\n animation: tooltip-out 80ms ease-in forwards;\n }\n\n /* Transform origin based on side */\n [data-side='top'] {\n transform-origin: bottom center;\n }\n\n [data-side='bottom'] {\n transform-origin: top center;\n }\n\n [data-side='left'] {\n transform-origin: right center;\n }\n\n [data-side='right'] {\n transform-origin: left center;\n }\n\n @keyframes tooltip-in {\n from {\n opacity: 0;\n transform: scale(0.95);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n }\n\n @keyframes tooltip-out {\n from {\n opacity: 1;\n transform: scale(1);\n }\n to {\n opacity: 0;\n transform: scale(0.95);\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n [data-state='visible'],\n [data-state='hidden'] {\n animation: none;\n }\n }\n `,\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TooltipPanelComponent {\n /** Plain text content to display. */\n readonly textContent: WritableSignal<string> = signal('');\n\n /** Optional template for rich content. */\n readonly templateRef: WritableSignal<TemplateRef<TooltipTemplateContext> | null> = signal(null);\n\n /** Color variant. */\n readonly color: WritableSignal<TooltipColor> = signal<TooltipColor>('default');\n\n /** Size variant. */\n readonly size: WritableSignal<TooltipSize> = signal<TooltipSize>('md');\n\n /** Whether to show the arrow. */\n readonly showArrow: WritableSignal<boolean> = signal(true);\n\n /** Which side the tooltip is positioned on. */\n readonly activeSide: WritableSignal<TooltipSide> = signal<TooltipSide>('top');\n\n /** Unique ID for accessibility. */\n readonly tooltipId: WritableSignal<string> = signal('');\n\n /** Whether the tooltip is visible (for animation state). */\n readonly visible: WritableSignal<boolean> = signal(false);\n\n /** Function to hide the tooltip (passed to template context). */\n readonly hideFn: WritableSignal<() => void> = signal(() => {});\n\n /** Computed template context. */\n protected readonly templateContext: Signal<TooltipTemplateContext> = computed(() => ({\n $implicit: this.textContent(),\n hide: this.hideFn(),\n }));\n\n /** Computed panel CSS classes. */\n protected readonly panelClasses: Signal<string> = computed(() =>\n mergeClasses(\n tooltipPanelVariants({\n color: this.color(),\n size: this.size(),\n }),\n ),\n );\n\n /** Computed arrow CSS classes. */\n protected readonly arrowClasses: Signal<string> = computed(() =>\n mergeClasses(\n tooltipArrowVariants({\n color: this.color(),\n side: this.activeSide(),\n }),\n ),\n );\n}\n","import {\n booleanAttribute,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n Injector,\n input,\n numberAttribute,\n output,\n PLATFORM_ID,\n Renderer2,\n signal,\n ViewContainerRef,\n} from '@angular/core';\nimport type {\n InputSignal,\n InputSignalWithTransform,\n OutputEmitterRef,\n TemplateRef,\n WritableSignal,\n} from '@angular/core';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport type { ConnectedPosition, ConnectedOverlayPositionChange, ConnectionPositionPair, FlexibleConnectedPositionStrategy } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { TooltipPanelComponent } from './tooltip-panel.component';\nimport { generateTooltipId } from './tooltip.utils';\nimport type {\n TooltipColor,\n TooltipPosition,\n TooltipSize,\n TooltipSide,\n TooltipTemplateContext,\n TooltipTouchGestures,\n} from './tooltip.models';\n\n/** Default show delay in milliseconds. */\nconst DEFAULT_SHOW_DELAY = 200;\n\n/** Default hide delay in milliseconds. */\nconst DEFAULT_HIDE_DELAY = 100;\n\n/** Offset between trigger and tooltip in pixels. */\nconst TOOLTIP_OFFSET = 8;\n\n/** Viewport margin in pixels. */\nconst VIEWPORT_MARGIN = 8;\n\n/**\n * Build position strategy entries for the tooltip.\n * Primary position is the preferred direction, with fallbacks.\n */\nfunction buildTooltipPositions(position: TooltipPosition): ConnectedPosition[] {\n const positions: Record<TooltipPosition, ConnectedPosition[]> = {\n top: [\n // Top center (preferred)\n { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -TOOLTIP_OFFSET },\n // Bottom center (flip)\n { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: TOOLTIP_OFFSET },\n // Right center (fallback)\n { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: TOOLTIP_OFFSET },\n // Left center (fallback)\n { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -TOOLTIP_OFFSET },\n ],\n bottom: [\n { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: TOOLTIP_OFFSET },\n { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -TOOLTIP_OFFSET },\n { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: TOOLTIP_OFFSET },\n { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -TOOLTIP_OFFSET },\n ],\n left: [\n { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -TOOLTIP_OFFSET },\n { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: TOOLTIP_OFFSET },\n { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -TOOLTIP_OFFSET },\n { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: TOOLTIP_OFFSET },\n ],\n right: [\n { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: TOOLTIP_OFFSET },\n { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -TOOLTIP_OFFSET },\n { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -TOOLTIP_OFFSET },\n { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: TOOLTIP_OFFSET },\n ],\n };\n\n return positions[position];\n}\n\n/**\n * Derive the tooltip side from a position change event.\n */\nfunction deriveSideFromPosition(pair: ConnectionPositionPair): TooltipSide {\n if (pair.originY === 'top' && pair.overlayY === 'bottom') return 'top';\n if (pair.originY === 'bottom' && pair.overlayY === 'top') return 'bottom';\n if (pair.originX === 'start' && pair.overlayX === 'end') return 'left';\n if (pair.originX === 'end' && pair.overlayX === 'start') return 'right';\n return 'top';\n}\n\n/**\n * Tooltip directive — displays supplementary information on hover/focus.\n *\n * Applied as an attribute directive to any trigger element. The tooltip panel\n * is rendered via CDK Overlay when triggered by mouse hover, keyboard focus,\n * or programmatically.\n *\n * @tokens `--color-tooltip`, `--color-tooltip-foreground`, `--color-primary`, `--color-primary-foreground`,\n * `--color-accent`, `--color-accent-foreground`, `--color-warn`, `--color-warn-foreground`,\n * `--color-popover`, `--color-popover-foreground`, `--color-border`\n *\n * @example Simple text tooltip\n * ```html\n * <button comTooltip=\"Save your changes\">\n * <com-icon name=\"save\" />\n * </button>\n * ```\n *\n * @example Positioned\n * ```html\n * <button comTooltip=\"Settings\" comTooltipPosition=\"right\">\n * <com-icon name=\"settings\" />\n * </button>\n * ```\n *\n * @example Color variants\n * ```html\n * <com-icon name=\"alert-triangle\" comTooltip=\"3 warnings found\" comTooltipColor=\"warn\" />\n * ```\n *\n * @example Custom template\n * ```html\n * <button\n * comTooltip=\"Keyboard shortcuts\"\n * [comTooltipTpl]=\"shortcutsTpl\"\n * comTooltipSize=\"lg\"\n * >\n * <com-icon name=\"keyboard\" />\n * </button>\n *\n * <ng-template #shortcutsTpl let-hide=\"hide\">\n * <div class=\"flex flex-col gap-1\">\n * <span>Press Ctrl+S to save</span>\n * <button (click)=\"hide()\">Got it</button>\n * </div>\n * </ng-template>\n * ```\n *\n * @example Programmatic control\n * ```html\n * <input\n * #tooltipRef=\"comTooltip\"\n * comTooltip=\"Invalid email\"\n * comTooltipColor=\"warn\"\n * [comTooltipDisabled]=\"true\"\n * />\n * ```\n *\n * ```ts\n * // Show tooltip on validation error\n * if (emailInvalid) {\n * this.tooltipRef.show();\n * }\n * ```\n */\n@Directive({\n selector: '[comTooltip]',\n exportAs: 'comTooltip',\n host: {\n '(mouseenter)': 'onMouseEnter()',\n '(mouseleave)': 'onMouseLeave()',\n '(focusin)': 'onFocusIn()',\n '(focusout)': 'onFocusOut()',\n '(keydown.escape)': 'onEscapeKey()',\n '(touchstart)': 'onTouchStart($event)',\n },\n})\nexport class ComTooltip {\n private readonly overlay = inject(Overlay);\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n private readonly renderer = inject(Renderer2);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly document = inject(DOCUMENT);\n\n private overlayRef: OverlayRef | null = null;\n private panelInstance: TooltipPanelComponent | null = null;\n private showTimeoutId: ReturnType<typeof setTimeout> | null = null;\n private hideTimeoutId: ReturnType<typeof setTimeout> | null = null;\n private touchTimeoutId: ReturnType<typeof setTimeout> | null = null;\n private readonly tooltipId = generateTooltipId();\n\n /** Current active side (updated from position changes). */\n private readonly activeSide: WritableSignal<TooltipSide> = signal<TooltipSide>('top');\n\n /** Whether the tooltip is currently visible. */\n private readonly isVisible: WritableSignal<boolean> = signal(false);\n\n // ─── Content Inputs ───\n\n /** Simple text content for the tooltip. Also serves as the directive selector. */\n readonly comTooltip: InputSignal<string> = input.required<string>();\n\n /** Custom template for rich tooltip content. Takes precedence over text when provided. */\n readonly comTooltipTpl: InputSignal<TemplateRef<TooltipTemplateContext> | null> =\n input<TemplateRef<TooltipTemplateContext> | null>(null);\n\n // ─── Positioning Inputs ───\n\n /** Preferred position direction. Default: 'top'. */\n readonly comTooltipPosition: InputSignal<TooltipPosition> = input<TooltipPosition>('top');\n\n // ─── Behavior Inputs ───\n\n /** Delay in ms before showing the tooltip. Default: 200. */\n readonly comTooltipShowDelay: InputSignalWithTransform<number, unknown> = input(DEFAULT_SHOW_DELAY, {\n transform: numberAttribute,\n });\n\n /** Delay in ms before hiding the tooltip. Default: 100. */\n readonly comTooltipHideDelay: InputSignalWithTransform<number, unknown> = input(DEFAULT_HIDE_DELAY, {\n transform: numberAttribute,\n });\n\n /** Disable the tooltip entirely. Default: false. */\n readonly comTooltipDisabled: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n\n /** Touch device handling. Default: 'auto'. */\n readonly comTooltipTouchGestures: InputSignal<TooltipTouchGestures> = input<TooltipTouchGestures>('auto');\n\n // ─── Variant Inputs ───\n\n /** Color variant. Default: 'default'. */\n readonly comTooltipColor: InputSignal<TooltipColor> = input<TooltipColor>('default');\n\n /** Size variant. Default: 'md'. */\n readonly comTooltipSize: InputSignal<TooltipSize> = input<TooltipSize>('md');\n\n /** Whether to show the arrow/caret. Default: true. */\n readonly comTooltipHasArrow: InputSignalWithTransform<boolean, unknown> = input(true, {\n transform: booleanAttribute,\n });\n\n // ─── Outputs ───\n\n /** Emitted when the tooltip becomes visible (after delay + animation). */\n readonly comTooltipShown: OutputEmitterRef<void> = output<void>();\n\n /** Emitted when the tooltip is fully hidden. */\n readonly comTooltipHidden: OutputEmitterRef<void> = output<void>();\n\n constructor() {\n // Cleanup on destroy\n this.destroyRef.onDestroy(() => {\n this.clearTimers();\n this.disposeOverlay();\n });\n }\n\n // ─── Public API ───\n\n /** Programmatically show the tooltip (ignores disabled state for error validation use cases). */\n show(): void {\n if (this.isVisible()) return;\n this.clearTimers();\n this.createOverlay();\n this.attachPanel();\n }\n\n /** Programmatically hide the tooltip. */\n hide(): void {\n if (!this.isVisible()) return;\n this.clearTimers();\n this.detachPanel();\n }\n\n // ─── Event Handlers ───\n\n protected onMouseEnter(): void {\n if (this.comTooltipDisabled()) return;\n this.scheduleShow(this.comTooltipShowDelay());\n }\n\n protected onMouseLeave(): void {\n this.scheduleHide(this.comTooltipHideDelay());\n }\n\n protected onFocusIn(): void {\n if (this.comTooltipDisabled()) return;\n // Keyboard users get instant feedback\n this.scheduleShow(0);\n }\n\n protected onFocusOut(): void {\n this.scheduleHide(this.comTooltipHideDelay());\n }\n\n protected onEscapeKey(): void {\n if (this.isVisible()) {\n this.hide();\n }\n }\n\n protected onTouchStart(event: TouchEvent): void {\n const touchMode = this.comTooltipTouchGestures();\n if (touchMode === 'off' || this.comTooltipDisabled()) return;\n\n // Long-press to show (500ms)\n this.clearTimers();\n this.touchTimeoutId = setTimeout(() => {\n this.show();\n\n // Set up tap-elsewhere to hide\n const touchEndHandler = (e: Event): void => {\n const touch = (e as TouchEvent).changedTouches?.[0];\n if (touch) {\n const target = this.document.elementFromPoint(touch.clientX, touch.clientY);\n if (!this.overlayRef?.overlayElement.contains(target)) {\n this.hide();\n }\n }\n this.document.removeEventListener('touchend', touchEndHandler);\n };\n this.document.addEventListener('touchend', touchEndHandler);\n }, 500);\n\n // Cancel long-press if finger moves\n const touchMoveHandler = (): void => {\n this.clearTouchTimeout();\n this.document.removeEventListener('touchmove', touchMoveHandler);\n };\n this.document.addEventListener('touchmove', touchMoveHandler);\n\n // Cancel long-press if finger lifts before timeout\n const touchEndCancelHandler = (): void => {\n this.clearTouchTimeout();\n this.document.removeEventListener('touchend', touchEndCancelHandler);\n };\n this.document.addEventListener('touchend', touchEndCancelHandler);\n }\n\n // ─── Panel Mouse Events ───\n\n /** Called when mouse enters the tooltip panel. */\n private onPanelMouseEnter(): void {\n // Cancel hide timer when hovering over panel (for interactive templates)\n this.clearHideTimeout();\n }\n\n /** Called when mouse leaves the tooltip panel. */\n private onPanelMouseLeave(): void {\n this.scheduleHide(this.comTooltipHideDelay());\n }\n\n // ─── Timer Management ───\n\n private scheduleShow(delay: number): void {\n this.clearTimers();\n if (delay === 0) {\n this.createOverlay();\n this.attachPanel();\n } else {\n this.showTimeoutId = setTimeout(() => {\n this.createOverlay();\n this.attachPanel();\n }, delay);\n }\n }\n\n private scheduleHide(delay: number): void {\n this.clearShowTimeout();\n if (!this.isVisible()) return;\n\n if (delay === 0) {\n this.detachPanel();\n } else {\n this.hideTimeoutId = setTimeout(() => {\n this.detachPanel();\n }, delay);\n }\n }\n\n private clearTimers(): void {\n this.clearShowTimeout();\n this.clearHideTimeout();\n this.clearTouchTimeout();\n }\n\n private clearShowTimeout(): void {\n if (this.showTimeoutId !== null) {\n clearTimeout(this.showTimeoutId);\n this.showTimeoutId = null;\n }\n }\n\n private clearHideTimeout(): void {\n if (this.hideTimeoutId !== null) {\n clearTimeout(this.hideTimeoutId);\n this.hideTimeoutId = null;\n }\n }\n\n private clearTouchTimeout(): void {\n if (this.touchTimeoutId !== null) {\n clearTimeout(this.touchTimeoutId);\n this.touchTimeoutId = null;\n }\n }\n\n // ─── Overlay Management ───\n\n private createOverlay(): void {\n if (this.overlayRef) return;\n if (!isPlatformBrowser(this.platformId)) return;\n\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef)\n .withPositions(buildTooltipPositions(this.comTooltipPosition()))\n .withFlexibleDimensions(false)\n .withPush(true)\n .withViewportMargin(VIEWPORT_MARGIN);\n\n const scrollStrategy = this.overlay.scrollStrategies.reposition({ autoClose: true });\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy,\n panelClass: 'com-tooltip-overlay',\n hasBackdrop: false,\n });\n\n // Track position changes for arrow orientation\n (positionStrategy as FlexibleConnectedPositionStrategy).positionChanges\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((change: ConnectedOverlayPositionChange) => {\n const side = deriveSideFromPosition(change.connectionPair);\n this.activeSide.set(side);\n if (this.panelInstance) {\n this.panelInstance.activeSide.set(side);\n }\n });\n\n // Close when overlay detaches\n this.overlayRef\n .detachments()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.handleDetachment();\n });\n }\n\n private attachPanel(): void {\n if (!this.overlayRef || this.overlayRef.hasAttached()) return;\n\n const portal = new ComponentPortal(TooltipPanelComponent, this.viewContainerRef, this.injector);\n const componentRef = this.overlayRef.attach(portal);\n this.panelInstance = componentRef.instance;\n\n // Configure panel inputs\n this.panelInstance.textContent.set(this.comTooltip());\n this.panelInstance.templateRef.set(this.comTooltipTpl());\n this.panelInstance.color.set(this.comTooltipColor());\n this.panelInstance.size.set(this.comTooltipSize());\n this.panelInstance.showArrow.set(this.comTooltipHasArrow());\n this.panelInstance.activeSide.set(this.activeSide());\n this.panelInstance.tooltipId.set(this.tooltipId);\n this.panelInstance.hideFn.set(() => this.hide());\n\n // Set up panel mouse events for interactive templates\n const overlayElement = this.overlayRef.overlayElement;\n this.renderer.listen(overlayElement, 'mouseenter', () => this.onPanelMouseEnter());\n this.renderer.listen(overlayElement, 'mouseleave', () => this.onPanelMouseLeave());\n\n // Set ARIA on trigger\n this.renderer.setAttribute(this.elementRef.nativeElement, 'aria-describedby', this.tooltipId);\n\n // Trigger show animation after a microtask (allows initial styles to apply)\n requestAnimationFrame(() => {\n if (this.panelInstance) {\n this.panelInstance.visible.set(true);\n }\n });\n\n this.isVisible.set(true);\n this.comTooltipShown.emit();\n }\n\n private detachPanel(): void {\n if (!this.panelInstance) return;\n\n // Trigger hide animation\n this.panelInstance.visible.set(false);\n\n // Wait for animation to complete before detaching\n setTimeout(() => {\n this.disposeOverlay();\n }, 80); // Match animation duration\n }\n\n private handleDetachment(): void {\n // Remove ARIA from trigger\n this.renderer.removeAttribute(this.elementRef.nativeElement, 'aria-describedby');\n\n this.isVisible.set(false);\n this.panelInstance = null;\n this.comTooltipHidden.emit();\n }\n\n private disposeOverlay(): void {\n if (this.overlayRef) {\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n this.panelInstance = null;\n this.isVisible.set(false);\n\n // Remove ARIA from trigger\n this.renderer.removeAttribute(this.elementRef.nativeElement, 'aria-describedby');\n }\n}\n","// Public API for the tooltip directive\n\n// Main directive\nexport { ComTooltip } from './tooltip.directive';\n\n// Types and interfaces\nexport type {\n TooltipPosition,\n TooltipColor,\n TooltipSize,\n TooltipTouchGestures,\n TooltipTemplateContext,\n} from './tooltip.models';\n\n// Variants (for advanced customization)\nexport { tooltipPanelVariants, tooltipArrowVariants } from './tooltip.variants';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAGA;;;;;;AAMG;AACI,MAAM,oBAAoB,GAGlB,GAAG,CAChB;IACE,mBAAmB;IACnB,MAAM;IACN,qBAAqB;IACrB,aAAa;IACb,gBAAgB;CACjB,EACD;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,KAAK,EAAE;AACL,YAAA,OAAO,EAAE,oCAAoC;AAC7C,YAAA,OAAO,EAAE,oCAAoC;AAC7C,YAAA,MAAM,EAAE,kCAAkC;AAC1C,YAAA,IAAI,EAAE,8BAA8B;AACpC,YAAA,MAAM,EAAE,mEAAmE;AAC5E,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,uCAAuC;AAC3C,YAAA,EAAE,EAAE,yCAAyC;AAC7C,YAAA,EAAE,EAAE,yCAAyC;AAC9C,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,IAAI,EAAE,IAAI;AACX,KAAA;AACF,CAAA;AAGH;;;;;;AAMG;AACI,MAAM,oBAAoB,GAGlB,GAAG,CAAC,2BAA2B,EAAE;AAC9C,IAAA,QAAQ,EAAE;AACR,QAAA,KAAK,EAAE;AACL,YAAA,OAAO,EAAE,YAAY;AACrB,YAAA,OAAO,EAAE,YAAY;AAC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AAA,EAAA,gBAAA,EAAA,SAAA,EAAA,aAAA,EAAA,UAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,eAAA,EAAA,YAAA,EAAA,sBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAV,UAAU,EAAA,UAAA,EAAA,CAAA;kBAZtB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,QAAQ,EAAE,YAAY;AACtB,oBAAA,IAAI,EAAE;AACJ,wBAAA,cAAc,EAAE,gBAAgB;AAChC,wBAAA,cAAc,EAAE,gBAAgB;AAChC,wBAAA,WAAW,EAAE,aAAa;AAC1B,wBAAA,YAAY,EAAE,cAAc;AAC5B,wBAAA,kBAAkB,EAAE,eAAe;AACnC,wBAAA,cAAc,EAAE,sBAAsB;AACvC,qBAAA;AACF,iBAAA;;;AChLD;AAEA;;ACFA;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-com",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/avs2001/ngx-com"
|
|
@@ -27,6 +27,10 @@
|
|
|
27
27
|
"types": "./types/ngx-com-components.d.ts",
|
|
28
28
|
"default": "./fesm2022/ngx-com-components.mjs"
|
|
29
29
|
},
|
|
30
|
+
"./components/avatar": {
|
|
31
|
+
"types": "./types/ngx-com-components-avatar.d.ts",
|
|
32
|
+
"default": "./fesm2022/ngx-com-components-avatar.mjs"
|
|
33
|
+
},
|
|
30
34
|
"./components/badge": {
|
|
31
35
|
"types": "./types/ngx-com-components-badge.d.ts",
|
|
32
36
|
"default": "./fesm2022/ngx-com-components-badge.mjs"
|
|
@@ -51,6 +55,10 @@
|
|
|
51
55
|
"types": "./types/ngx-com-components-collapsible.d.ts",
|
|
52
56
|
"default": "./fesm2022/ngx-com-components-collapsible.mjs"
|
|
53
57
|
},
|
|
58
|
+
"./components/confirm": {
|
|
59
|
+
"types": "./types/ngx-com-components-confirm.d.ts",
|
|
60
|
+
"default": "./fesm2022/ngx-com-components-confirm.mjs"
|
|
61
|
+
},
|
|
54
62
|
"./components/dropdown": {
|
|
55
63
|
"types": "./types/ngx-com-components-dropdown.d.ts",
|
|
56
64
|
"default": "./fesm2022/ngx-com-components-dropdown.mjs"
|
|
@@ -59,6 +67,10 @@
|
|
|
59
67
|
"types": "./types/ngx-com-components-dropdown-testing.d.ts",
|
|
60
68
|
"default": "./fesm2022/ngx-com-components-dropdown-testing.mjs"
|
|
61
69
|
},
|
|
70
|
+
"./components/empty-state": {
|
|
71
|
+
"types": "./types/ngx-com-components-empty-state.d.ts",
|
|
72
|
+
"default": "./fesm2022/ngx-com-components-empty-state.mjs"
|
|
73
|
+
},
|
|
62
74
|
"./components/form-field": {
|
|
63
75
|
"types": "./types/ngx-com-components-form-field.d.ts",
|
|
64
76
|
"default": "./fesm2022/ngx-com-components-form-field.mjs"
|
|
@@ -67,10 +79,18 @@
|
|
|
67
79
|
"types": "./types/ngx-com-components-icon.d.ts",
|
|
68
80
|
"default": "./fesm2022/ngx-com-components-icon.mjs"
|
|
69
81
|
},
|
|
82
|
+
"./components/item": {
|
|
83
|
+
"types": "./types/ngx-com-components-item.d.ts",
|
|
84
|
+
"default": "./fesm2022/ngx-com-components-item.mjs"
|
|
85
|
+
},
|
|
70
86
|
"./components/menu": {
|
|
71
87
|
"types": "./types/ngx-com-components-menu.d.ts",
|
|
72
88
|
"default": "./fesm2022/ngx-com-components-menu.mjs"
|
|
73
89
|
},
|
|
90
|
+
"./components/paginator": {
|
|
91
|
+
"types": "./types/ngx-com-components-paginator.d.ts",
|
|
92
|
+
"default": "./fesm2022/ngx-com-components-paginator.mjs"
|
|
93
|
+
},
|
|
74
94
|
"./components/popover": {
|
|
75
95
|
"types": "./types/ngx-com-components-popover.d.ts",
|
|
76
96
|
"default": "./fesm2022/ngx-com-components-popover.mjs"
|
|
@@ -79,14 +99,26 @@
|
|
|
79
99
|
"types": "./types/ngx-com-components-radio.d.ts",
|
|
80
100
|
"default": "./fesm2022/ngx-com-components-radio.mjs"
|
|
81
101
|
},
|
|
102
|
+
"./components/segmented-control": {
|
|
103
|
+
"types": "./types/ngx-com-components-segmented-control.d.ts",
|
|
104
|
+
"default": "./fesm2022/ngx-com-components-segmented-control.mjs"
|
|
105
|
+
},
|
|
82
106
|
"./components/sort": {
|
|
83
107
|
"types": "./types/ngx-com-components-sort.d.ts",
|
|
84
108
|
"default": "./fesm2022/ngx-com-components-sort.mjs"
|
|
85
109
|
},
|
|
110
|
+
"./components/spinner": {
|
|
111
|
+
"types": "./types/ngx-com-components-spinner.d.ts",
|
|
112
|
+
"default": "./fesm2022/ngx-com-components-spinner.mjs"
|
|
113
|
+
},
|
|
86
114
|
"./components/tabs": {
|
|
87
115
|
"types": "./types/ngx-com-components-tabs.d.ts",
|
|
88
116
|
"default": "./fesm2022/ngx-com-components-tabs.mjs"
|
|
89
117
|
},
|
|
118
|
+
"./components/tooltip": {
|
|
119
|
+
"types": "./types/ngx-com-components-tooltip.d.ts",
|
|
120
|
+
"default": "./fesm2022/ngx-com-components-tooltip.mjs"
|
|
121
|
+
},
|
|
90
122
|
"./tokens": {
|
|
91
123
|
"types": "./types/ngx-com-tokens.d.ts",
|
|
92
124
|
"default": "./fesm2022/ngx-com-tokens.mjs"
|
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { TemplateRef, ElementRef, InputSignal, OutputEmitterRef, Signal, WritableSignal } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/** Avatar size variants. */
|
|
5
|
+
type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
6
|
+
/** Avatar color variants. */
|
|
7
|
+
type AvatarColor = 'primary' | 'accent' | 'muted' | 'warn' | 'auto';
|
|
8
|
+
/** Avatar shape variants. */
|
|
9
|
+
type AvatarShape = 'circle' | 'rounded';
|
|
10
|
+
/** Avatar variant types. */
|
|
11
|
+
type AvatarVariant = 'soft' | 'filled' | 'outline';
|
|
12
|
+
/** Resolved color (excludes 'auto' which is computed at runtime). */
|
|
13
|
+
type ResolvedAvatarColor = Exclude<AvatarColor, 'auto'>;
|
|
14
|
+
/**
|
|
15
|
+
* Generates initials from a display name.
|
|
16
|
+
*
|
|
17
|
+
* @param name - The display name to extract initials from
|
|
18
|
+
* @param maxLength - Maximum number of characters (default: 2)
|
|
19
|
+
* @returns Uppercase initials, or empty string if name is empty
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* getInitials('Jane Doe') // 'JD'
|
|
24
|
+
* getInitials('Jane') // 'JA'
|
|
25
|
+
* getInitials('Jane Marie Doe') // 'JD' (first + last)
|
|
26
|
+
* getInitials('j') // 'J'
|
|
27
|
+
* getInitials('') // ''
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
declare function getInitials(name: string, maxLength?: number): string;
|
|
31
|
+
/**
|
|
32
|
+
* CVA variants for the avatar container.
|
|
33
|
+
*
|
|
34
|
+
* @tokens `--color-primary`, `--color-primary-foreground`, `--color-primary-subtle`, `--color-primary-subtle-foreground`,
|
|
35
|
+
* `--color-accent`, `--color-accent-foreground`, `--color-accent-subtle`, `--color-accent-subtle-foreground`,
|
|
36
|
+
* `--color-warn`, `--color-warn-foreground`, `--color-warn-subtle`, `--color-warn-subtle-foreground`,
|
|
37
|
+
* `--color-muted`, `--color-muted-foreground`,
|
|
38
|
+
* `--color-border`, `--color-background`, `--color-foreground`, `--color-ring`
|
|
39
|
+
*/
|
|
40
|
+
declare const avatarVariants: (props?: {
|
|
41
|
+
size?: AvatarSize;
|
|
42
|
+
shape?: AvatarShape;
|
|
43
|
+
interactive?: boolean;
|
|
44
|
+
}) => string;
|
|
45
|
+
/**
|
|
46
|
+
* CVA variants for the avatar color/variant styling.
|
|
47
|
+
* These are applied based on the resolved color and variant.
|
|
48
|
+
*/
|
|
49
|
+
declare const avatarColorVariants: (props?: {
|
|
50
|
+
variant?: AvatarVariant;
|
|
51
|
+
color?: ResolvedAvatarColor;
|
|
52
|
+
}) => string;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Template context provided to custom avatar templates.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```html
|
|
59
|
+
* <com-avatar name="Acme Corp" size="lg">
|
|
60
|
+
* <ng-template comAvatarCustom let-name let-initials="initials" let-size="size">
|
|
61
|
+
* <img src="/logos/acme.svg" class="size-full object-contain p-1" [alt]="name" />
|
|
62
|
+
* </ng-template>
|
|
63
|
+
* </com-avatar>
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
interface AvatarTemplateContext {
|
|
67
|
+
/** The `name` input value (default for `let-name`). */
|
|
68
|
+
$implicit: string | undefined;
|
|
69
|
+
/** Computed initials from the name. */
|
|
70
|
+
initials: string;
|
|
71
|
+
/** Current size variant, allowing templates to adapt. */
|
|
72
|
+
size: AvatarSize;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Directive to provide a custom template for avatar content.
|
|
76
|
+
*
|
|
77
|
+
* When this directive is used, the avatar ignores the `src`, `name`, and
|
|
78
|
+
* default icon fallback — the template has full control over the content.
|
|
79
|
+
* Use this for company logos, emoji avatars, or custom graphics.
|
|
80
|
+
*
|
|
81
|
+
* @example Company logo
|
|
82
|
+
* ```html
|
|
83
|
+
* <com-avatar name="Acme Corp" size="lg" color="primary">
|
|
84
|
+
* <ng-template comAvatarCustom let-initials="initials">
|
|
85
|
+
* <img src="/logos/acme.svg" class="size-full object-contain p-1" alt="Acme Corp" />
|
|
86
|
+
* </ng-template>
|
|
87
|
+
* </com-avatar>
|
|
88
|
+
* ```
|
|
89
|
+
*
|
|
90
|
+
* @example Emoji avatar
|
|
91
|
+
* ```html
|
|
92
|
+
* <com-avatar name="Bot" color="accent" variant="filled">
|
|
93
|
+
* <ng-template comAvatarCustom>
|
|
94
|
+
* <span class="text-lg">🤖</span>
|
|
95
|
+
* </ng-template>
|
|
96
|
+
* </com-avatar>
|
|
97
|
+
* ```
|
|
98
|
+
*
|
|
99
|
+
* @example Adaptive content using size context
|
|
100
|
+
* ```html
|
|
101
|
+
* <com-avatar name="Jane" [size]="avatarSize">
|
|
102
|
+
* <ng-template comAvatarCustom let-size="size">
|
|
103
|
+
* @if (size === 'xs' || size === 'sm') {
|
|
104
|
+
* <span class="text-xs">👤</span>
|
|
105
|
+
* } @else {
|
|
106
|
+
* <img src="/custom-avatar.png" class="size-full object-cover" />
|
|
107
|
+
* }
|
|
108
|
+
* </ng-template>
|
|
109
|
+
* </com-avatar>
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
declare class ComAvatarCustom {
|
|
113
|
+
readonly templateRef: TemplateRef<AvatarTemplateContext>;
|
|
114
|
+
/**
|
|
115
|
+
* Static type guard for template type checking.
|
|
116
|
+
* Enables type-safe access to context properties in templates.
|
|
117
|
+
*/
|
|
118
|
+
static ngTemplateContextGuard(_dir: ComAvatarCustom, ctx: unknown): ctx is AvatarTemplateContext;
|
|
119
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComAvatarCustom, never>;
|
|
120
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComAvatarCustom, "ng-template[comAvatarCustom]", never, {}, {}, never, never, true, never>;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/** Image loading state. */
|
|
124
|
+
type ImageState = 'idle' | 'loading' | 'loaded' | 'error';
|
|
125
|
+
/**
|
|
126
|
+
* Avatar component — displays a user's profile image, initials, or a fallback icon.
|
|
127
|
+
*
|
|
128
|
+
* Handles the full lifecycle of image loading with a graceful fallback chain:
|
|
129
|
+
* 1. Custom template (via `comAvatarCustom` directive) — if provided, always wins
|
|
130
|
+
* 2. Image — if `src` is provided and loads successfully
|
|
131
|
+
* 3. Initials — if `name` is provided, auto-generated from the name
|
|
132
|
+
* 4. Default icon — generic user silhouette via `com-icon`
|
|
133
|
+
*
|
|
134
|
+
* **Note:** The default fallback icon requires the `User` icon from lucide-angular
|
|
135
|
+
* to be registered via `provideComIcons({ User })` in your application config.
|
|
136
|
+
*
|
|
137
|
+
* @tokens `--color-primary`, `--color-primary-foreground`, `--color-primary-subtle`, `--color-primary-subtle-foreground`,
|
|
138
|
+
* `--color-accent`, `--color-accent-foreground`, `--color-accent-subtle`, `--color-accent-subtle-foreground`,
|
|
139
|
+
* `--color-warn`, `--color-warn-foreground`, `--color-warn-subtle`, `--color-warn-subtle-foreground`,
|
|
140
|
+
* `--color-muted`, `--color-muted-foreground`,
|
|
141
|
+
* `--color-border`, `--color-background`, `--color-foreground`, `--color-ring`
|
|
142
|
+
*
|
|
143
|
+
* @example Simple image avatar
|
|
144
|
+
* ```html
|
|
145
|
+
* <com-avatar src="/photos/jane.jpg" name="Jane Doe" />
|
|
146
|
+
* ```
|
|
147
|
+
*
|
|
148
|
+
* @example Initials fallback (no image)
|
|
149
|
+
* ```html
|
|
150
|
+
* <com-avatar name="Jane Doe" />
|
|
151
|
+
* <!-- renders "JD" with auto-computed background color -->
|
|
152
|
+
* ```
|
|
153
|
+
*
|
|
154
|
+
* @example Explicit color and shape
|
|
155
|
+
* ```html
|
|
156
|
+
* <com-avatar name="John Smith" color="primary" variant="filled" />
|
|
157
|
+
* <com-avatar name="Alice" color="accent" shape="rounded" />
|
|
158
|
+
* ```
|
|
159
|
+
*
|
|
160
|
+
* @example Sizes — from badge to profile header
|
|
161
|
+
* ```html
|
|
162
|
+
* <!-- Tiny: inside a badge or inline with text -->
|
|
163
|
+
* <com-avatar name="JD" size="xs" />
|
|
164
|
+
*
|
|
165
|
+
* <!-- Small: list items, comments -->
|
|
166
|
+
* <com-avatar src="/photos/jane.jpg" name="Jane" size="sm" />
|
|
167
|
+
*
|
|
168
|
+
* <!-- Medium: default, cards -->
|
|
169
|
+
* <com-avatar src="/photos/jane.jpg" name="Jane" />
|
|
170
|
+
*
|
|
171
|
+
* <!-- Large: profile sidebar -->
|
|
172
|
+
* <com-avatar src="/photos/jane.jpg" name="Jane" size="lg" />
|
|
173
|
+
*
|
|
174
|
+
* <!-- Extra large: profile hero -->
|
|
175
|
+
* <com-avatar src="/photos/jane.jpg" name="Jane" size="xl" />
|
|
176
|
+
*
|
|
177
|
+
* <!-- 2XL: full profile page header -->
|
|
178
|
+
* <com-avatar src="/photos/jane.jpg" name="Jane" size="2xl" />
|
|
179
|
+
* ```
|
|
180
|
+
*
|
|
181
|
+
* @example Default icon fallback (no name, no image)
|
|
182
|
+
* ```html
|
|
183
|
+
* <!-- Shows generic user icon -->
|
|
184
|
+
* <com-avatar />
|
|
185
|
+
* ```
|
|
186
|
+
*
|
|
187
|
+
* @example Interactive (clickable, for menus)
|
|
188
|
+
* ```html
|
|
189
|
+
* <com-avatar
|
|
190
|
+
* src="/photos/me.jpg"
|
|
191
|
+
* name="My Profile"
|
|
192
|
+
* [interactive]="true"
|
|
193
|
+
* (click)="openProfileMenu()"
|
|
194
|
+
* />
|
|
195
|
+
* ```
|
|
196
|
+
*
|
|
197
|
+
* @example With status indicator (composed externally)
|
|
198
|
+
* ```html
|
|
199
|
+
* <!-- The avatar itself doesn't own the status dot — the consumer composes it -->
|
|
200
|
+
* <div class="relative inline-flex">
|
|
201
|
+
* <com-avatar src="/photos/jane.jpg" name="Jane" size="sm" />
|
|
202
|
+
* <span class="absolute bottom-0 right-0 size-2.5 rounded-full bg-success ring-2 ring-background"></span>
|
|
203
|
+
* </div>
|
|
204
|
+
* ```
|
|
205
|
+
*
|
|
206
|
+
* @example Custom template — company logo with fallback
|
|
207
|
+
* ```html
|
|
208
|
+
* <com-avatar name="Acme Corp" size="lg" color="primary">
|
|
209
|
+
* <ng-template comAvatarCustom let-initials="initials">
|
|
210
|
+
* <img src="/logos/acme.svg" class="size-full object-contain p-1" alt="Acme Corp" />
|
|
211
|
+
* </ng-template>
|
|
212
|
+
* </com-avatar>
|
|
213
|
+
* ```
|
|
214
|
+
*
|
|
215
|
+
* @example Custom template — emoji avatar
|
|
216
|
+
* ```html
|
|
217
|
+
* <com-avatar name="Bot" color="accent" variant="filled">
|
|
218
|
+
* <ng-template comAvatarCustom>
|
|
219
|
+
* <span class="text-lg">🤖</span>
|
|
220
|
+
* </ng-template>
|
|
221
|
+
* </com-avatar>
|
|
222
|
+
* ```
|
|
223
|
+
*
|
|
224
|
+
* @example Inline with text
|
|
225
|
+
* ```html
|
|
226
|
+
* <span class="inline-flex items-center gap-2">
|
|
227
|
+
* <com-avatar name="Jane Doe" size="xs" />
|
|
228
|
+
* <span class="text-sm">Jane Doe</span>
|
|
229
|
+
* </span>
|
|
230
|
+
* ```
|
|
231
|
+
*
|
|
232
|
+
* @example Avatar in a badge context
|
|
233
|
+
* ```html
|
|
234
|
+
* <!-- Works at xs/sm sizes without breaking layout -->
|
|
235
|
+
* <div class="flex items-center gap-1.5 rounded-pill bg-muted px-2 py-0.5">
|
|
236
|
+
* <com-avatar name="Jane" size="xs" />
|
|
237
|
+
* <span class="text-xs">Jane Doe</span>
|
|
238
|
+
* <button class="text-muted-foreground hover:text-foreground">
|
|
239
|
+
* <com-icon name="x" size="xs" />
|
|
240
|
+
* </button>
|
|
241
|
+
* </div>
|
|
242
|
+
* ```
|
|
243
|
+
*
|
|
244
|
+
* @example Outline variant (good for overlapping stacks)
|
|
245
|
+
* ```html
|
|
246
|
+
* <div class="flex -space-x-2">
|
|
247
|
+
* <com-avatar src="/photos/a.jpg" name="Alice" size="sm" variant="outline" />
|
|
248
|
+
* <com-avatar src="/photos/b.jpg" name="Bob" size="sm" variant="outline" />
|
|
249
|
+
* <com-avatar src="/photos/c.jpg" name="Carol" size="sm" variant="outline" />
|
|
250
|
+
* <com-avatar name="+3" size="sm" variant="outline" color="muted" />
|
|
251
|
+
* </div>
|
|
252
|
+
* ```
|
|
253
|
+
*/
|
|
254
|
+
declare class ComAvatar {
|
|
255
|
+
/** Host element reference (used by ComAvatarGroup). */
|
|
256
|
+
readonly elementRef: ElementRef<HTMLElement>;
|
|
257
|
+
/** Image URL for the avatar. */
|
|
258
|
+
readonly src: InputSignal<string | undefined>;
|
|
259
|
+
/** Alt text for the image. Falls back to `name` if not provided. */
|
|
260
|
+
readonly alt: InputSignal<string | undefined>;
|
|
261
|
+
/** User's display name — used to generate initials and as aria fallback. */
|
|
262
|
+
readonly name: InputSignal<string | undefined>;
|
|
263
|
+
/** Size variant. */
|
|
264
|
+
readonly size: InputSignal<AvatarSize>;
|
|
265
|
+
/** Color variant. 'auto' deterministically picks a color based on the name. */
|
|
266
|
+
readonly color: InputSignal<AvatarColor>;
|
|
267
|
+
/** Shape variant. */
|
|
268
|
+
readonly shape: InputSignal<AvatarShape>;
|
|
269
|
+
/** Visual style variant. */
|
|
270
|
+
readonly variant: InputSignal<AvatarVariant>;
|
|
271
|
+
/** When true, renders as a button with hover/active states. */
|
|
272
|
+
readonly interactive: InputSignal<boolean>;
|
|
273
|
+
/** Emits when the image fails to load (after fallback kicks in). */
|
|
274
|
+
readonly imageError: OutputEmitterRef<void>;
|
|
275
|
+
/** Emits when the image loads successfully. */
|
|
276
|
+
readonly imageLoaded: OutputEmitterRef<void>;
|
|
277
|
+
/** Custom template for full control over avatar content. */
|
|
278
|
+
readonly customTemplate: Signal<ComAvatarCustom | undefined>;
|
|
279
|
+
/**
|
|
280
|
+
* Current image loading state.
|
|
281
|
+
* Resets to 'loading' or 'idle' when `src` changes.
|
|
282
|
+
*/
|
|
283
|
+
protected readonly imageState: WritableSignal<ImageState>;
|
|
284
|
+
/** Resolved color (handles 'auto' based on name). */
|
|
285
|
+
protected readonly resolvedColor: Signal<ResolvedAvatarColor>;
|
|
286
|
+
/** Computed initials from the name. */
|
|
287
|
+
readonly computedInitials: Signal<string>;
|
|
288
|
+
/** Template context for custom templates. */
|
|
289
|
+
protected readonly templateContext: Signal<AvatarTemplateContext>;
|
|
290
|
+
/** CSS classes for the host element. */
|
|
291
|
+
protected readonly hostClasses: Signal<string>;
|
|
292
|
+
/** Font size class for initials. */
|
|
293
|
+
protected readonly initialsSizeClass: Signal<string>;
|
|
294
|
+
/** Icon size for the fallback icon (same as avatar size). */
|
|
295
|
+
protected readonly iconSize: Signal<AvatarSize>;
|
|
296
|
+
/** @internal Handles successful image load. */
|
|
297
|
+
protected onImageLoad(): void;
|
|
298
|
+
/** @internal Handles image load error. */
|
|
299
|
+
protected onImageError(): void;
|
|
300
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComAvatar, never>;
|
|
301
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComAvatar, "com-avatar", ["comAvatar"], { "src": { "alias": "src"; "required": false; "isSignal": true; }; "alt": { "alias": "alt"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; }, { "imageError": "imageError"; "imageLoaded": "imageLoaded"; }, ["customTemplate"], never, true, never>;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Avatar group directive — displays multiple avatars in an overlapping stack.
|
|
306
|
+
*
|
|
307
|
+
* Apply this directive to a container element with `com-avatar` children.
|
|
308
|
+
* The directive handles negative spacing, ring styling for visual separation,
|
|
309
|
+
* and optionally limits the visible avatars with an overflow indicator.
|
|
310
|
+
*
|
|
311
|
+
* **Note:** Child avatars should use `variant="outline"` for best visual results,
|
|
312
|
+
* as this provides the ring that separates overlapping avatars. The directive
|
|
313
|
+
* adds `ring-background` to ensure proper visual separation.
|
|
314
|
+
*
|
|
315
|
+
* @tokens `--color-background`, `--color-muted`, `--color-muted-foreground`
|
|
316
|
+
*
|
|
317
|
+
* @example Basic usage
|
|
318
|
+
* ```html
|
|
319
|
+
* <div comAvatarGroup>
|
|
320
|
+
* <com-avatar src="/photos/a.jpg" name="Alice" variant="outline" />
|
|
321
|
+
* <com-avatar src="/photos/b.jpg" name="Bob" variant="outline" />
|
|
322
|
+
* <com-avatar src="/photos/c.jpg" name="Carol" variant="outline" />
|
|
323
|
+
* </div>
|
|
324
|
+
* ```
|
|
325
|
+
*
|
|
326
|
+
* @example With max limit and overflow indicator
|
|
327
|
+
* ```html
|
|
328
|
+
* <div comAvatarGroup [max]="3">
|
|
329
|
+
* <com-avatar src="/photos/a.jpg" name="Alice" variant="outline" />
|
|
330
|
+
* <com-avatar src="/photos/b.jpg" name="Bob" variant="outline" />
|
|
331
|
+
* <com-avatar src="/photos/c.jpg" name="Carol" variant="outline" />
|
|
332
|
+
* <com-avatar src="/photos/d.jpg" name="Dave" variant="outline" />
|
|
333
|
+
* <com-avatar src="/photos/e.jpg" name="Eve" variant="outline" />
|
|
334
|
+
* </div>
|
|
335
|
+
* <!-- Shows 3 avatars + "+2" indicator -->
|
|
336
|
+
* ```
|
|
337
|
+
*
|
|
338
|
+
* @example Different sizes
|
|
339
|
+
* ```html
|
|
340
|
+
* <div comAvatarGroup size="sm">
|
|
341
|
+
* <com-avatar name="A" size="sm" variant="outline" />
|
|
342
|
+
* <com-avatar name="B" size="sm" variant="outline" />
|
|
343
|
+
* </div>
|
|
344
|
+
*
|
|
345
|
+
* <div comAvatarGroup size="lg">
|
|
346
|
+
* <com-avatar name="A" size="lg" variant="outline" />
|
|
347
|
+
* <com-avatar name="B" size="lg" variant="outline" />
|
|
348
|
+
* </div>
|
|
349
|
+
* ```
|
|
350
|
+
*
|
|
351
|
+
* @example Reversed stacking (last avatar on top)
|
|
352
|
+
* ```html
|
|
353
|
+
* <div comAvatarGroup [reverse]="true">
|
|
354
|
+
* <com-avatar name="First" variant="outline" />
|
|
355
|
+
* <com-avatar name="Second" variant="outline" />
|
|
356
|
+
* <com-avatar name="Third (on top)" variant="outline" />
|
|
357
|
+
* </div>
|
|
358
|
+
* ```
|
|
359
|
+
*/
|
|
360
|
+
declare class ComAvatarGroup {
|
|
361
|
+
private readonly renderer;
|
|
362
|
+
private readonly elementRef;
|
|
363
|
+
/** Query all child ComAvatar components. */
|
|
364
|
+
private readonly avatars;
|
|
365
|
+
/**
|
|
366
|
+
* Size variant — should match child avatar sizes for proper spacing.
|
|
367
|
+
* If not provided, defaults to 'md'.
|
|
368
|
+
*/
|
|
369
|
+
readonly size: InputSignal<AvatarSize>;
|
|
370
|
+
/**
|
|
371
|
+
* Maximum number of avatars to display.
|
|
372
|
+
* When exceeded, remaining avatars are hidden and an overflow indicator shows "+N".
|
|
373
|
+
* Set to 0 or undefined for unlimited.
|
|
374
|
+
*/
|
|
375
|
+
readonly max: InputSignal<number | undefined>;
|
|
376
|
+
/**
|
|
377
|
+
* When true, reverses the stacking order (last avatar on top instead of first).
|
|
378
|
+
* Also reverses the visual order via flex-row-reverse.
|
|
379
|
+
*/
|
|
380
|
+
readonly reverse: InputSignal<boolean>;
|
|
381
|
+
/** Overflow element reference for cleanup. */
|
|
382
|
+
private overflowElement;
|
|
383
|
+
/** Track the number of hidden avatars. */
|
|
384
|
+
protected readonly overflowCount: WritableSignal<number>;
|
|
385
|
+
/** Whether to show the overflow indicator. */
|
|
386
|
+
protected readonly showOverflow: Signal<boolean>;
|
|
387
|
+
constructor();
|
|
388
|
+
/**
|
|
389
|
+
* Applies overlapping styles to child avatars and manages visibility.
|
|
390
|
+
*/
|
|
391
|
+
private applyAvatarStyles;
|
|
392
|
+
/**
|
|
393
|
+
* Gets the native element of an avatar by index.
|
|
394
|
+
*/
|
|
395
|
+
private getAvatarElement;
|
|
396
|
+
/**
|
|
397
|
+
* Creates or updates the overflow indicator element.
|
|
398
|
+
*/
|
|
399
|
+
private updateOverflowIndicator;
|
|
400
|
+
/**
|
|
401
|
+
* Returns size-specific classes for the overflow indicator.
|
|
402
|
+
*/
|
|
403
|
+
private getOverflowSizeClasses;
|
|
404
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComAvatarGroup, never>;
|
|
405
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComAvatarGroup, "[comAvatarGroup]", ["comAvatarGroup"], { "size": { "alias": "size"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "reverse": { "alias": "reverse"; "required": false; "isSignal": true; }; }, {}, ["avatars"], never, true, never>;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
export { ComAvatar, ComAvatarCustom, ComAvatarGroup, avatarColorVariants, avatarVariants, getInitials };
|
|
409
|
+
export type { AvatarColor, AvatarShape, AvatarSize, AvatarTemplateContext, AvatarVariant, ResolvedAvatarColor };
|
|
@@ -2,6 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { InjectionToken, InputSignal, TemplateRef, OutputEmitterRef, Signal, WritableSignal, Provider, OnDestroy } from '@angular/core';
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
import { ControlValueAccessor, Validator, ValidationErrors } from '@angular/forms';
|
|
5
|
+
import { IconSize } from 'ngx-com/components/icon';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Calendar shared types and interfaces
|
|
@@ -1417,6 +1418,8 @@ declare class ComDatepicker<D> implements ControlValueAccessor, Validator, OnDes
|
|
|
1417
1418
|
readonly panelId: Signal<string>;
|
|
1418
1419
|
/** Whether the datepicker has a value. */
|
|
1419
1420
|
readonly hasValue: Signal<boolean>;
|
|
1421
|
+
/** Icon size based on datepicker size. */
|
|
1422
|
+
readonly iconSize: Signal<IconSize>;
|
|
1420
1423
|
/** Formatted display value. */
|
|
1421
1424
|
readonly displayValue: Signal<string>;
|
|
1422
1425
|
/** Computed trigger classes. */
|
|
@@ -1592,6 +1595,8 @@ declare class ComDateRangePicker<D> implements ControlValueAccessor, Validator,
|
|
|
1592
1595
|
readonly panelId: Signal<string>;
|
|
1593
1596
|
/** Whether the datepicker has a value. */
|
|
1594
1597
|
readonly hasValue: Signal<boolean>;
|
|
1598
|
+
/** Icon size based on datepicker size. */
|
|
1599
|
+
readonly iconSize: Signal<IconSize>;
|
|
1595
1600
|
/** Calendar selection (converts DateRangeValue to DateRange for calendar). */
|
|
1596
1601
|
readonly calendarSelection: Signal<DateRange<D> | null>;
|
|
1597
1602
|
/** Formatted start display value. */
|