ngx-com 0.0.19 → 0.0.21
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-alert.mjs +346 -0
- package/fesm2022/ngx-com-components-alert.mjs.map +1 -0
- package/fesm2022/ngx-com-components-button.mjs +1 -1
- package/fesm2022/ngx-com-components-button.mjs.map +1 -1
- package/fesm2022/ngx-com-components-calendar.mjs +29 -36
- package/fesm2022/ngx-com-components-calendar.mjs.map +1 -1
- package/fesm2022/ngx-com-components-card.mjs +1 -1
- package/fesm2022/ngx-com-components-card.mjs.map +1 -1
- package/fesm2022/ngx-com-components-carousel.mjs +708 -0
- package/fesm2022/ngx-com-components-carousel.mjs.map +1 -0
- package/fesm2022/ngx-com-components-checkbox.mjs +17 -8
- package/fesm2022/ngx-com-components-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-com-components-code-block.mjs +158 -0
- package/fesm2022/ngx-com-components-code-block.mjs.map +1 -0
- package/fesm2022/ngx-com-components-collapsible.mjs +1 -1
- package/fesm2022/ngx-com-components-collapsible.mjs.map +1 -1
- package/fesm2022/ngx-com-components-confirm.mjs +3 -3
- package/fesm2022/ngx-com-components-confirm.mjs.map +1 -1
- package/fesm2022/ngx-com-components-dialog.mjs +703 -0
- package/fesm2022/ngx-com-components-dialog.mjs.map +1 -0
- package/fesm2022/ngx-com-components-dropdown.mjs +36 -31
- package/fesm2022/ngx-com-components-dropdown.mjs.map +1 -1
- package/fesm2022/ngx-com-components-form-field.mjs +48 -8
- package/fesm2022/ngx-com-components-form-field.mjs.map +1 -1
- package/fesm2022/ngx-com-components-item.mjs +1 -1
- package/fesm2022/ngx-com-components-item.mjs.map +1 -1
- package/fesm2022/ngx-com-components-paginator.mjs +3 -3
- package/fesm2022/ngx-com-components-paginator.mjs.map +1 -1
- package/fesm2022/ngx-com-components-radio.mjs +16 -9
- package/fesm2022/ngx-com-components-radio.mjs.map +1 -1
- package/fesm2022/ngx-com-components-segmented-control.mjs +1 -1
- package/fesm2022/ngx-com-components-segmented-control.mjs.map +1 -1
- package/fesm2022/ngx-com-components-separator.mjs +102 -0
- package/fesm2022/ngx-com-components-separator.mjs.map +1 -0
- package/fesm2022/ngx-com-components-switch.mjs +258 -0
- package/fesm2022/ngx-com-components-switch.mjs.map +1 -0
- package/fesm2022/ngx-com-components-table.mjs +631 -0
- package/fesm2022/ngx-com-components-table.mjs.map +1 -0
- package/fesm2022/ngx-com-components-tabs.mjs +2 -2
- package/fesm2022/ngx-com-components-tabs.mjs.map +1 -1
- package/fesm2022/ngx-com-components-toast.mjs +783 -0
- package/fesm2022/ngx-com-components-toast.mjs.map +1 -0
- package/package.json +33 -1
- package/types/ngx-com-components-alert.d.ts +166 -0
- package/types/ngx-com-components-carousel.d.ts +281 -0
- package/types/ngx-com-components-checkbox.d.ts +7 -2
- package/types/ngx-com-components-code-block.d.ts +66 -0
- package/types/ngx-com-components-confirm.d.ts +2 -2
- package/types/ngx-com-components-dialog.d.ts +264 -0
- package/types/ngx-com-components-dropdown.d.ts +8 -5
- package/types/ngx-com-components-form-field.d.ts +19 -3
- package/types/ngx-com-components-radio.d.ts +5 -3
- package/types/ngx-com-components-separator.d.ts +75 -0
- package/types/ngx-com-components-switch.d.ts +110 -0
- package/types/ngx-com-components-table.d.ts +377 -0
- package/types/ngx-com-components-toast.d.ts +217 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-com-components-toast.mjs","sources":["../../../projects/com/components/toast/toast.ref.ts","../../../projects/com/components/toast/toast.variants.ts","../../../projects/com/components/toast/toast.utils.ts","../../../projects/com/components/toast/toast.component.ts","../../../projects/com/components/toast/toast.providers.ts","../../../projects/com/components/toast/toast-container.component.ts","../../../projects/com/components/toast/toast.service.ts","../../../projects/com/components/toast/index.ts","../../../projects/com/components/toast/ngx-com-components-toast.ts"],"sourcesContent":["import { Observable, Subject } from 'rxjs';\nimport type { ComToastDismissEvent } from './toast.models';\n\n/**\n * Reference to an active toast notification.\n * Returned by `ComToastService` methods for programmatic control.\n */\nexport class ComToastRef {\n private readonly dismissSubject = new Subject<ComToastDismissEvent>();\n private readonly actionSubject = new Subject<void>();\n private readonly dismissFn: () => void;\n private dismissed = false;\n\n constructor(dismissFn: () => void) {\n this.dismissFn = dismissFn;\n }\n\n /** Programmatically dismiss the toast. */\n dismiss(): void {\n if (!this.dismissed) {\n this.dismissFn();\n }\n }\n\n /** Emits once when the toast is dismissed (for any reason). */\n afterDismissed(): Observable<ComToastDismissEvent> {\n return this.dismissSubject.asObservable();\n }\n\n /** Emits when the action button is clicked. */\n afterAction(): Observable<void> {\n return this.actionSubject.asObservable();\n }\n\n /** @internal */\n _notifyDismissed(event: ComToastDismissEvent): void {\n if (this.dismissed) return;\n this.dismissed = true;\n this.dismissSubject.next(event);\n this.dismissSubject.complete();\n this.actionSubject.complete();\n }\n\n /** @internal */\n _notifyAction(): void {\n this.actionSubject.next();\n }\n}\n","import { cva } from 'class-variance-authority';\nimport type { ComToastType, ComToastPosition } from './toast.models';\n\n/**\n * CVA variants for an individual toast card.\n *\n * @tokens `--color-success`, `--color-success-foreground`,\n * `--color-warn`, `--color-warn-foreground`,\n * `--color-warn-subtle`, `--color-warn-subtle-foreground`,\n * `--color-primary-subtle`, `--color-primary-subtle-foreground`,\n * `--color-border`, `--shadow-lg`, `--radius-card`\n */\nexport const toastVariants: (props?: {\n type?: ComToastType;\n}) => string = cva(\n [\n 'flex',\n 'w-full',\n 'max-w-sm',\n 'items-start',\n 'gap-3',\n 'rounded-card',\n 'border',\n 'p-4',\n 'shadow-lg',\n 'pointer-events-auto',\n 'relative',\n 'overflow-hidden',\n ],\n {\n variants: {\n type: {\n success: 'bg-success text-success-foreground border-success',\n warn: 'bg-warn-subtle text-warn-subtle-foreground border-warn',\n error: 'bg-warn text-warn-foreground border-warn',\n info: 'bg-primary-subtle text-primary-subtle-foreground border-primary',\n },\n },\n defaultVariants: {\n type: 'info',\n },\n },\n);\n\n/**\n * CVA variants for the toast container positioning.\n */\nexport const toastContainerVariants: (props?: {\n position?: ComToastPosition;\n}) => string = cva(\n [\n 'flex',\n 'gap-3',\n 'pointer-events-none',\n 'max-h-screen',\n 'p-4',\n ],\n {\n variants: {\n position: {\n 'top-right': 'flex-col items-end',\n 'top-left': 'flex-col items-start',\n 'top-center': 'flex-col items-center',\n 'bottom-right': 'flex-col-reverse items-end',\n 'bottom-left': 'flex-col-reverse items-start',\n 'bottom-center': 'flex-col-reverse items-center',\n },\n },\n defaultVariants: {\n position: 'bottom-right',\n },\n },\n);\n\n/**\n * CVA variants for the toast progress bar.\n */\nexport const toastProgressVariants: (props?: {\n type?: ComToastType;\n}) => string = cva(\n [\n 'absolute',\n 'bottom-0',\n 'left-0',\n 'h-0.5',\n 'rounded-full',\n ],\n {\n variants: {\n type: {\n success: 'bg-success-foreground/30',\n warn: 'bg-warn-subtle-foreground/30',\n error: 'bg-warn-foreground/30',\n info: 'bg-primary-subtle-foreground/30',\n },\n },\n defaultVariants: {\n type: 'info',\n },\n },\n);\n\n/**\n * CVA variants for the toast close button.\n *\n * @tokens `--color-ring`, `--radius-card`\n */\nexport const toastCloseButtonVariants: (props?: {\n type?: ComToastType;\n}) => string = cva(\n [\n 'shrink-0',\n 'rounded-card',\n 'p-0.5',\n 'transition-colors',\n 'outline-none',\n 'focus-visible:outline-2',\n 'focus-visible:outline-offset-2',\n 'focus-visible:outline-[--color-ring]',\n ],\n {\n variants: {\n type: {\n success: 'text-success-foreground/70 hover:text-success-foreground',\n warn: 'text-warn-subtle-foreground/70 hover:text-warn-subtle-foreground',\n error: 'text-warn-foreground/70 hover:text-warn-foreground',\n info: 'text-primary-subtle-foreground/70 hover:text-primary-subtle-foreground',\n },\n },\n defaultVariants: {\n type: 'info',\n },\n },\n);\n","export { mergeClasses } from 'ngx-com/utils';\n\nlet toastIdCounter = 0;\n\n/**\n * Generate a unique ID for a toast notification.\n */\nexport function generateToastId(): number {\n return ++toastIdCounter;\n}\n\n/** Default Lucide icon names per toast type. */\nexport const DEFAULT_TOAST_ICONS: Record<string, string> = {\n success: 'circle-check',\n warn: 'triangle-alert',\n error: 'circle-x',\n info: 'info',\n};\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n output,\n} from '@angular/core';\nimport type { InputSignal, OutputEmitterRef, Signal } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ComIcon } from 'ngx-com/components/icon';\nimport {\n toastVariants,\n toastProgressVariants,\n toastCloseButtonVariants,\n} from './toast.variants';\nimport { mergeClasses, DEFAULT_TOAST_ICONS } from './toast.utils';\nimport type { ComToastState, ComToastTemplateContext } from './toast.models';\n\n/**\n * Internal toast notification component rendered inside the container.\n *\n * @internal Not exported in public API\n *\n * @tokens `--color-success`, `--color-success-foreground`,\n * `--color-warn`, `--color-warn-foreground`,\n * `--color-warn-subtle`, `--color-warn-subtle-foreground`,\n * `--color-primary-subtle`, `--color-primary-subtle-foreground`,\n * `--color-border`, `--shadow-lg`, `--radius-card`, `--color-ring`\n */\n@Component({\n selector: 'com-toast',\n template: `\n <div\n [class]=\"toastClasses()\"\n [attr.role]=\"ariaRole()\"\n [attr.aria-live]=\"ariaLive()\"\n [attr.data-state]=\"state().visible ? 'open' : 'closed'\"\n (animationend)=\"onAnimationEnd()\"\n >\n @if (state().data.customTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"state().data.customTemplate!\"\n [ngTemplateOutletContext]=\"templateContext()\"\n />\n } @else {\n <com-icon\n [name]=\"resolvedIcon()\"\n size=\"md\"\n class=\"mt-0.5 shrink-0\"\n aria-hidden=\"true\"\n />\n <div class=\"flex-1 min-w-0\">\n @if (state().data.title) {\n <p class=\"text-sm font-semibold\">{{ state().data.title }}</p>\n }\n <p class=\"text-sm\" [class.mt-1]=\"state().data.title\">\n {{ state().data.message }}\n </p>\n @if (state().data.action) {\n <button\n type=\"button\"\n class=\"mt-2 text-sm font-medium underline underline-offset-4\n outline-none\n focus-visible:outline-2\n focus-visible:outline-offset-2\n focus-visible:outline-[--color-ring]\"\n (click)=\"onAction.emit(state().id)\"\n >\n {{ state().data.action!.label }}\n </button>\n }\n </div>\n @if (state().showClose) {\n <button\n type=\"button\"\n [class]=\"closeButtonClasses()\"\n aria-label=\"Dismiss notification\"\n (click)=\"onDismiss.emit(state().id)\"\n >\n <com-icon name=\"x\" size=\"sm\" aria-hidden=\"true\" />\n </button>\n }\n }\n @if (state().showProgress && state().duration > 0) {\n <div\n [class]=\"progressClasses()\"\n [style.width.%]=\"state().remainingPercent\"\n ></div>\n }\n </div>\n `,\n styles: `\n :host {\n display: contents;\n }\n\n [data-state='open'] {\n --tw-enter-opacity: 0;\n --tw-enter-translate-x: 0;\n --tw-enter-translate-y: 0;\n }\n\n [data-state='closed'] {\n --tw-exit-opacity: 0;\n --tw-exit-translate-x: 0;\n --tw-exit-translate-y: 0;\n }\n\n @media (prefers-reduced-motion: reduce) {\n [data-state='open'],\n [data-state='closed'] {\n animation: none;\n }\n }\n `,\n imports: [NgTemplateOutlet, ComIcon],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ComToastComponent {\n /** The toast state, set by the container. */\n readonly state: InputSignal<ComToastState> = input.required<ComToastState>();\n\n /** Emitted when the toast should be dismissed. */\n readonly onDismiss: OutputEmitterRef<number> = output<number>();\n\n /** Emitted when the action button is clicked. */\n readonly onAction: OutputEmitterRef<number> = output<number>();\n\n /** Emitted when the mouse enters the toast. */\n readonly mouseEnter: OutputEmitterRef<void> = output<void>();\n\n /** Emitted when the mouse leaves the toast. */\n readonly mouseLeave: OutputEmitterRef<void> = output<void>();\n\n /** Emitted when the exit animation completes. */\n readonly animationDone: OutputEmitterRef<number> = output<number>();\n\n /** Resolved icon name. */\n protected readonly resolvedIcon: Signal<string> = computed(\n () => this.state().data.icon ?? DEFAULT_TOAST_ICONS[this.state().type] ?? 'info',\n );\n\n /** ARIA role based on toast type. */\n protected readonly ariaRole: Signal<string> = computed(() =>\n this.state().type === 'error' ? 'alert' : 'status',\n );\n\n /** ARIA live region politeness. */\n protected readonly ariaLive: Signal<string> = computed(() =>\n this.state().type === 'error' ? 'assertive' : 'polite',\n );\n\n /** Computed toast card classes. */\n protected readonly toastClasses: Signal<string> = computed(() =>\n mergeClasses(\n toastVariants({ type: this.state().type }),\n this.state().visible\n ? 'animate-in fade-in-0 slide-in-from-bottom-2'\n : 'animate-out fade-out-0 slide-out-to-right-full',\n ),\n );\n\n /** Computed progress bar classes. */\n protected readonly progressClasses: Signal<string> = computed(() =>\n mergeClasses(toastProgressVariants({ type: this.state().type })),\n );\n\n /** Computed close button classes. */\n protected readonly closeButtonClasses: Signal<string> = computed(() =>\n mergeClasses(toastCloseButtonVariants({ type: this.state().type })),\n );\n\n /** Template context for custom templates. */\n protected readonly templateContext: Signal<ComToastTemplateContext> = computed(() => ({\n $implicit: this.state().data,\n dismiss: () => this.onDismiss.emit(this.state().id),\n action: () => this.onAction.emit(this.state().id),\n }));\n\n protected onAnimationEnd(): void {\n if (!this.state().visible) {\n this.animationDone.emit(this.state().id);\n }\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport type { Provider } from '@angular/core';\nimport type { ComToastConfig, ComToastContainerData } from './toast.models';\n\n/**\n * Injection token for global toast configuration.\n */\nexport const COM_TOAST_CONFIG: InjectionToken<ComToastConfig> =\n new InjectionToken<ComToastConfig>('COM_TOAST_CONFIG');\n\n/**\n * Injection token for internal container communication.\n * @internal\n */\nexport const COM_TOAST_CONTAINER_DATA: InjectionToken<ComToastContainerData> =\n new InjectionToken<ComToastContainerData>('COM_TOAST_CONTAINER_DATA');\n\n/**\n * Provides global toast configuration.\n *\n * @example\n * ```typescript\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideComToastConfig({ position: 'top-center', duration: 3000 }),\n * ],\n * });\n * ```\n */\nexport function provideComToastConfig(config: ComToastConfig): Provider {\n return { provide: COM_TOAST_CONFIG, useValue: config };\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n} from '@angular/core';\nimport type { Signal } from '@angular/core';\nimport { ComToastComponent } from './toast.component';\nimport { toastContainerVariants } from './toast.variants';\nimport { mergeClasses } from './toast.utils';\nimport { COM_TOAST_CONTAINER_DATA } from './toast.providers';\nimport type { ComToastContainerData, ComToastState } from './toast.models';\n\n/**\n * Internal toast container component that manages positioning and stacking.\n *\n * @internal Not exported in public API\n *\n * @tokens `--color-success`, `--color-success-foreground`,\n * `--color-warn`, `--color-warn-foreground`,\n * `--color-warn-subtle`, `--color-warn-subtle-foreground`,\n * `--color-primary-subtle`, `--color-primary-subtle-foreground`,\n * `--color-border`, `--shadow-lg`, `--radius-card`\n */\n@Component({\n selector: 'com-toast-container',\n host: {\n '(keydown.escape)': 'onEscapeKey()',\n tabindex: '-1',\n },\n template: `\n <div\n [class]=\"containerClasses()\"\n role=\"region\"\n aria-label=\"Notifications\"\n >\n @for (toast of toasts(); track toast.id) {\n <com-toast\n [state]=\"toast\"\n (onDismiss)=\"containerData.onDismiss($event)\"\n (onAction)=\"containerData.onAction($event)\"\n (mouseEnter)=\"containerData.onMouseEnter(toast.id)\"\n (mouseLeave)=\"containerData.onMouseLeave(toast.id)\"\n (animationDone)=\"containerData.onAnimationDone($event)\"\n />\n }\n </div>\n `,\n styles: `\n :host {\n display: contents;\n }\n `,\n imports: [ComToastComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ComToastContainerComponent {\n protected readonly containerData: ComToastContainerData = inject(COM_TOAST_CONTAINER_DATA);\n\n /** Active toast states, read from the service's signal. */\n protected readonly toasts: Signal<ComToastState[]> = computed(() => this.containerData.toasts());\n\n /** Computed container positioning classes. */\n protected readonly containerClasses: Signal<string> = computed(() =>\n mergeClasses(toastContainerVariants({ position: this.containerData.position() })),\n );\n\n protected onEscapeKey(): void {\n this.containerData.onDismissLatest();\n }\n}\n","import {\n DestroyRef,\n inject,\n Injectable,\n Injector,\n PLATFORM_ID,\n signal,\n} from '@angular/core';\nimport type { WritableSignal } from '@angular/core';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { Overlay } from '@angular/cdk/overlay';\nimport type { GlobalPositionStrategy, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { ComToastRef } from './toast.ref';\nimport { ComToastContainerComponent } from './toast-container.component';\nimport { COM_TOAST_CONFIG, COM_TOAST_CONTAINER_DATA } from './toast.providers';\nimport { generateToastId } from './toast.utils';\nimport type {\n ComToastConfig,\n ComToastContainerData,\n ComToastData,\n ComToastDismissReason,\n ComToastPosition,\n ComToastState,\n ComToastTimerState,\n ComToastType,\n} from './toast.models';\n\n/** Default durations by toast type. */\nconst DEFAULT_DURATION: Record<ComToastType, number> = {\n success: 5000,\n warn: 5000,\n error: 0,\n info: 5000,\n};\n\n/** Fallback timeout for exit animation removal when animationend doesn't fire. */\nconst ANIMATION_FALLBACK_MS = 200;\n\n/**\n * Service for creating toast notifications imperatively.\n *\n * @example\n * ```typescript\n * const toast = inject(ComToastService);\n * toast.success('File uploaded successfully.');\n * toast.error('Failed to save.', 'Error');\n *\n * const ref = toast.show({ type: 'info', message: 'Item deleted.', action: { label: 'Undo' } });\n * ref.afterAction().subscribe(() => undoDelete());\n * ```\n */\n@Injectable({ providedIn: 'root' })\nexport class ComToastService {\n private readonly overlay = inject(Overlay);\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly document = inject(DOCUMENT);\n private readonly globalConfig = inject(COM_TOAST_CONFIG, { optional: true });\n\n private overlayRef: OverlayRef | null = null;\n private readonly toasts: WritableSignal<ComToastState[]> = signal([]);\n private readonly position: WritableSignal<ComToastPosition>;\n private readonly timers = new Map<number, ComToastTimerState>();\n private readonly refs = new Map<number, ComToastRef>();\n private readonly animationFallbacks = new Map<number, ReturnType<typeof setTimeout>>();\n private readonly dismissReasons = new Map<number, ComToastDismissReason>();\n private rafHandle: number | null = null;\n\n private readonly config: Required<ComToastConfig>;\n\n constructor() {\n this.config = {\n position: 'bottom-right',\n duration: 5000,\n maxVisible: 5,\n pauseOnHover: true,\n showProgress: true,\n showClose: true,\n ...this.globalConfig,\n };\n this.position = signal(this.config.position);\n this.destroyRef.onDestroy(() => this.dispose());\n }\n\n /**\n * Show a toast notification with full configuration.\n */\n show(data: ComToastData): ComToastRef {\n this.ensureContainer();\n\n const id = generateToastId();\n const type: ComToastType = data.type ?? 'info';\n const duration = data.duration ?? DEFAULT_DURATION[type] ?? this.config.duration;\n const showProgress = data.showProgress ?? this.config.showProgress;\n const showClose = data.showClose ?? this.config.showClose;\n\n const ref = new ComToastRef(() => this.dismiss(id, 'manual'));\n this.refs.set(id, ref);\n\n const state: ComToastState = {\n id,\n data,\n type,\n duration,\n showProgress,\n showClose,\n visible: true,\n remainingPercent: 100,\n };\n\n this.toasts.update((list) => [...list, state]);\n this.enforceMaxVisible();\n\n if (duration > 0) {\n this.startTimer(id, duration);\n }\n\n return ref;\n }\n\n /** Show a success toast. */\n success(message: string, title?: string): ComToastRef {\n return this.showByType('success', message, title);\n }\n\n /** Show a warning toast. */\n warn(message: string, title?: string): ComToastRef {\n return this.showByType('warn', message, title);\n }\n\n /** Show an error toast. */\n error(message: string, title?: string): ComToastRef {\n return this.showByType('error', message, title);\n }\n\n /** Show an info toast. */\n info(message: string, title?: string): ComToastRef {\n return this.showByType('info', message, title);\n }\n\n /** Dismiss all active toasts. */\n dismissAll(): void {\n for (const toast of this.toasts()) {\n this.dismiss(toast.id, 'manual');\n }\n }\n\n // ─── Private ───\n\n private showByType(type: ComToastType, message: string, title?: string): ComToastRef {\n const data: ComToastData = { type, message };\n if (title !== undefined) data.title = title;\n return this.show(data);\n }\n\n private ensureContainer(): void {\n if (this.overlayRef || !isPlatformBrowser(this.platformId)) return;\n\n const positionStrategy = this.buildPositionStrategy(this.config.position);\n\n const containerData: ComToastContainerData = {\n toasts: this.toasts.asReadonly(),\n position: this.position.asReadonly(),\n onMouseEnter: (id: number) => this.pauseTimer(id),\n onMouseLeave: (id: number) => this.resumeTimer(id),\n onDismiss: (id: number) => this.dismiss(id, 'manual'),\n onAction: (id: number) => this.handleAction(id),\n onDismissLatest: () => this.dismissLatest(),\n onAnimationDone: (id: number) => this.removeToast(id),\n };\n\n const containerInjector = Injector.create({\n providers: [{ provide: COM_TOAST_CONTAINER_DATA, useValue: containerData }],\n parent: this.injector,\n });\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.noop(),\n hasBackdrop: false,\n panelClass: 'com-toast-overlay',\n disposeOnNavigation: false,\n });\n\n const portal = new ComponentPortal(ComToastContainerComponent, null, containerInjector);\n this.overlayRef.attach(portal);\n }\n\n private buildPositionStrategy(position: ComToastPosition): GlobalPositionStrategy {\n const strategy = this.overlay.position().global();\n\n switch (position) {\n case 'top-right':\n return strategy.top('0').right('0');\n case 'top-left':\n return strategy.top('0').left('0');\n case 'top-center':\n return strategy.top('0').centerHorizontally();\n case 'bottom-right':\n return strategy.bottom('0').right('0');\n case 'bottom-left':\n return strategy.bottom('0').left('0');\n case 'bottom-center':\n return strategy.bottom('0').centerHorizontally();\n }\n }\n\n private dismiss(id: number, reason: ComToastDismissReason): void {\n this.clearTimer(id);\n this.dismissReasons.set(id, reason);\n\n // Trigger exit animation\n this.updateToast(id, { visible: false });\n\n // Set fallback timeout in case animationend doesn't fire\n const fallback = setTimeout(() => this.removeToast(id), ANIMATION_FALLBACK_MS);\n this.animationFallbacks.set(id, fallback);\n }\n\n private removeToast(id: number): void {\n // Clear animation fallback\n const fallback = this.animationFallbacks.get(id);\n if (fallback) {\n clearTimeout(fallback);\n this.animationFallbacks.delete(id);\n }\n\n // Check if toast still exists (may have been removed already)\n if (!this.toasts().some((t) => t.id === id)) return;\n\n this.toasts.update((list) => list.filter((t) => t.id !== id));\n\n const reason = this.dismissReasons.get(id) ?? 'auto';\n this.dismissReasons.delete(id);\n\n const ref = this.refs.get(id);\n if (ref) {\n ref._notifyDismissed({ reason });\n this.refs.delete(id);\n }\n\n if (this.toasts().length === 0) {\n this.disposeOverlay();\n }\n }\n\n private handleAction(id: number): void {\n const ref = this.refs.get(id);\n if (ref) {\n ref._notifyAction();\n }\n this.dismiss(id, 'action');\n }\n\n private dismissLatest(): void {\n const visible = this.toasts().filter((t) => t.visible);\n const latest = visible[visible.length - 1];\n if (latest) {\n this.dismiss(latest.id, 'manual');\n }\n }\n\n private enforceMaxVisible(): void {\n const currentToasts = this.toasts();\n const visibleCount = currentToasts.filter((t) => t.visible).length;\n\n if (visibleCount > this.config.maxVisible) {\n const oldest = currentToasts.find((t) => t.visible);\n if (oldest) {\n this.dismiss(oldest.id, 'limit');\n }\n }\n }\n\n // ─── Timer (rAF) ───\n\n private startTimer(id: number, duration: number): void {\n const now = this.now();\n this.timers.set(id, {\n startTime: now,\n elapsed: 0,\n duration,\n paused: false,\n pausedAt: 0,\n });\n\n this.ensureRafLoop();\n }\n\n private ensureRafLoop(): void {\n if (this.rafHandle !== null) return;\n\n const win = this.document.defaultView;\n if (!win) return;\n\n const tick = (): void => {\n const now = this.now();\n let needsUpdate = false;\n\n for (const [id, timer] of this.timers) {\n if (timer.paused) continue;\n\n const elapsed = timer.elapsed + (now - timer.startTime);\n const remaining = Math.max(0, 100 - (elapsed / timer.duration) * 100);\n const rounded = Math.round(remaining);\n\n // Find current state to compare\n const toast = this.toasts().find((t) => t.id === id);\n if (!toast || !toast.visible) {\n this.clearTimer(id);\n continue;\n }\n\n if (Math.round(toast.remainingPercent) !== rounded) {\n needsUpdate = true;\n }\n\n if (remaining <= 0) {\n this.clearTimer(id);\n this.dismiss(id, 'auto');\n needsUpdate = true;\n }\n }\n\n // Batch-update all progress values in a single signal write\n if (needsUpdate) {\n const now2 = this.now();\n this.toasts.update((list) =>\n list.map((t) => {\n const timer = this.timers.get(t.id);\n if (!timer || timer.paused) return t;\n\n const elapsed = timer.elapsed + (now2 - timer.startTime);\n const remaining = Math.max(0, 100 - (elapsed / timer.duration) * 100);\n return { ...t, remainingPercent: remaining };\n }),\n );\n }\n\n // Continue loop if there are active timers\n if (this.timers.size > 0) {\n this.rafHandle = win.requestAnimationFrame(tick);\n } else {\n this.rafHandle = null;\n }\n };\n\n this.rafHandle = win.requestAnimationFrame(tick);\n }\n\n private pauseTimer(id: number): void {\n if (!this.config.pauseOnHover) return;\n\n const timer = this.timers.get(id);\n if (!timer || timer.paused) return;\n\n const now = this.now();\n timer.elapsed += now - timer.startTime;\n timer.paused = true;\n timer.pausedAt = now;\n }\n\n private resumeTimer(id: number): void {\n if (!this.config.pauseOnHover) return;\n\n const timer = this.timers.get(id);\n if (!timer || !timer.paused) return;\n\n timer.paused = false;\n timer.startTime = this.now();\n }\n\n private clearTimer(id: number): void {\n this.timers.delete(id);\n }\n\n private now(): number {\n return this.document.defaultView?.performance.now() ?? Date.now();\n }\n\n // ─── Helpers ───\n\n private updateToast(id: number, patch: Partial<ComToastState>): void {\n this.toasts.update((list) =>\n list.map((t) => (t.id === id ? { ...t, ...patch } : t)),\n );\n }\n\n private disposeOverlay(): void {\n if (this.overlayRef) {\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n\n const win = this.document.defaultView;\n if (this.rafHandle !== null && win) {\n win.cancelAnimationFrame(this.rafHandle);\n this.rafHandle = null;\n }\n }\n\n private dispose(): void {\n for (const id of this.timers.keys()) {\n this.clearTimer(id);\n }\n for (const [, fallback] of this.animationFallbacks) {\n clearTimeout(fallback);\n }\n this.animationFallbacks.clear();\n this.dismissReasons.clear();\n this.refs.clear();\n this.disposeOverlay();\n }\n}\n","// Public API for the toast notification system\n\n// Service\nexport { ComToastService } from './toast.service';\n\n// Ref\nexport { ComToastRef } from './toast.ref';\n\n// Types and interfaces\nexport type {\n ComToastConfig,\n ComToastData,\n ComToastType,\n ComToastPosition,\n ComToastDismissEvent,\n ComToastDismissReason,\n ComToastTemplateContext,\n} from './toast.models';\n\n// Providers\nexport { provideComToastConfig, COM_TOAST_CONFIG } from './toast.providers';\n\n// Variants (for advanced customization)\nexport {\n toastVariants,\n toastContainerVariants,\n toastProgressVariants,\n toastCloseButtonVariants,\n} from './toast.variants';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAGA;;;AAGG;MACU,WAAW,CAAA;AACL,IAAA,cAAc,GAAG,IAAI,OAAO,EAAwB;AACpD,IAAA,aAAa,GAAG,IAAI,OAAO,EAAQ;AACnC,IAAA,SAAS;IAClB,SAAS,GAAG,KAAK;AAEzB,IAAA,WAAA,CAAY,SAAqB,EAAA;AAC/B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;IAC5B;;IAGA,OAAO,GAAA;AACL,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,SAAS,EAAE;QAClB;IACF;;IAGA,cAAc,GAAA;AACZ,QAAA,OAAO,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE;IAC3C;;IAGA,WAAW,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE;IAC1C;;AAGA,IAAA,gBAAgB,CAAC,KAA2B,EAAA;QAC1C,IAAI,IAAI,CAAC,SAAS;YAAE;AACpB,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI;AACrB,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;AAC/B,QAAA,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE;AAC9B,QAAA,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE;IAC/B;;IAGA,aAAa,GAAA;AACX,QAAA,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE;IAC3B;AACD;;AC5CD;;;;;;;;AAQG;AACI,MAAM,aAAa,GAEX,GAAG,CAChB;IACE,MAAM;IACN,QAAQ;IACR,UAAU;IACV,aAAa;IACb,OAAO;IACP,cAAc;IACd,QAAQ;IACR,KAAK;IACL,WAAW;IACX,qBAAqB;IACrB,UAAU;IACV,iBAAiB;CAClB,EACD;AACE,IAAA,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,MAAM,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE;AACnC,YAAA,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;QACrB;QACA,KAAK,MAAM,GAAG,QAAQ,CAAC,IAAI,IAAI,CAAC,kBAAkB,EAAE;YAClD,YAAY,CAAC,QAAQ,CAAC;QACxB;AACA,QAAA,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE;AAC/B,QAAA,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE;AAC3B,QAAA,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;QACjB,IAAI,CAAC,cAAc,EAAE;IACvB;uGAzWW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAf,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cADF,MAAM,EAAA,CAAA;;2FACnB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACpDlC;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.21",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/avs2001/ngx-com"
|
|
@@ -35,6 +35,10 @@
|
|
|
35
35
|
"types": "./types/ngx-com-components.d.ts",
|
|
36
36
|
"default": "./fesm2022/ngx-com-components.mjs"
|
|
37
37
|
},
|
|
38
|
+
"./components/alert": {
|
|
39
|
+
"types": "./types/ngx-com-components-alert.d.ts",
|
|
40
|
+
"default": "./fesm2022/ngx-com-components-alert.mjs"
|
|
41
|
+
},
|
|
38
42
|
"./components/avatar": {
|
|
39
43
|
"types": "./types/ngx-com-components-avatar.d.ts",
|
|
40
44
|
"default": "./fesm2022/ngx-com-components-avatar.mjs"
|
|
@@ -55,10 +59,18 @@
|
|
|
55
59
|
"types": "./types/ngx-com-components-card.d.ts",
|
|
56
60
|
"default": "./fesm2022/ngx-com-components-card.mjs"
|
|
57
61
|
},
|
|
62
|
+
"./components/carousel": {
|
|
63
|
+
"types": "./types/ngx-com-components-carousel.d.ts",
|
|
64
|
+
"default": "./fesm2022/ngx-com-components-carousel.mjs"
|
|
65
|
+
},
|
|
58
66
|
"./components/checkbox": {
|
|
59
67
|
"types": "./types/ngx-com-components-checkbox.d.ts",
|
|
60
68
|
"default": "./fesm2022/ngx-com-components-checkbox.mjs"
|
|
61
69
|
},
|
|
70
|
+
"./components/code-block": {
|
|
71
|
+
"types": "./types/ngx-com-components-code-block.d.ts",
|
|
72
|
+
"default": "./fesm2022/ngx-com-components-code-block.mjs"
|
|
73
|
+
},
|
|
62
74
|
"./components/collapsible": {
|
|
63
75
|
"types": "./types/ngx-com-components-collapsible.d.ts",
|
|
64
76
|
"default": "./fesm2022/ngx-com-components-collapsible.mjs"
|
|
@@ -67,6 +79,10 @@
|
|
|
67
79
|
"types": "./types/ngx-com-components-confirm.d.ts",
|
|
68
80
|
"default": "./fesm2022/ngx-com-components-confirm.mjs"
|
|
69
81
|
},
|
|
82
|
+
"./components/dialog": {
|
|
83
|
+
"types": "./types/ngx-com-components-dialog.d.ts",
|
|
84
|
+
"default": "./fesm2022/ngx-com-components-dialog.mjs"
|
|
85
|
+
},
|
|
70
86
|
"./components/dropdown": {
|
|
71
87
|
"types": "./types/ngx-com-components-dropdown.d.ts",
|
|
72
88
|
"default": "./fesm2022/ngx-com-components-dropdown.mjs"
|
|
@@ -111,6 +127,10 @@
|
|
|
111
127
|
"types": "./types/ngx-com-components-segmented-control.d.ts",
|
|
112
128
|
"default": "./fesm2022/ngx-com-components-segmented-control.mjs"
|
|
113
129
|
},
|
|
130
|
+
"./components/separator": {
|
|
131
|
+
"types": "./types/ngx-com-components-separator.d.ts",
|
|
132
|
+
"default": "./fesm2022/ngx-com-components-separator.mjs"
|
|
133
|
+
},
|
|
114
134
|
"./components/sort": {
|
|
115
135
|
"types": "./types/ngx-com-components-sort.d.ts",
|
|
116
136
|
"default": "./fesm2022/ngx-com-components-sort.mjs"
|
|
@@ -119,10 +139,22 @@
|
|
|
119
139
|
"types": "./types/ngx-com-components-spinner.d.ts",
|
|
120
140
|
"default": "./fesm2022/ngx-com-components-spinner.mjs"
|
|
121
141
|
},
|
|
142
|
+
"./components/switch": {
|
|
143
|
+
"types": "./types/ngx-com-components-switch.d.ts",
|
|
144
|
+
"default": "./fesm2022/ngx-com-components-switch.mjs"
|
|
145
|
+
},
|
|
146
|
+
"./components/table": {
|
|
147
|
+
"types": "./types/ngx-com-components-table.d.ts",
|
|
148
|
+
"default": "./fesm2022/ngx-com-components-table.mjs"
|
|
149
|
+
},
|
|
122
150
|
"./components/tabs": {
|
|
123
151
|
"types": "./types/ngx-com-components-tabs.d.ts",
|
|
124
152
|
"default": "./fesm2022/ngx-com-components-tabs.mjs"
|
|
125
153
|
},
|
|
154
|
+
"./components/toast": {
|
|
155
|
+
"types": "./types/ngx-com-components-toast.d.ts",
|
|
156
|
+
"default": "./fesm2022/ngx-com-components-toast.mjs"
|
|
157
|
+
},
|
|
126
158
|
"./components/tooltip": {
|
|
127
159
|
"types": "./types/ngx-com-components-tooltip.d.ts",
|
|
128
160
|
"default": "./fesm2022/ngx-com-components-tooltip.mjs"
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InputSignal, InputSignalWithTransform, OutputEmitterRef, Signal, WritableSignal } from '@angular/core';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
type AlertVariant = 'info' | 'success' | 'warning' | 'destructive';
|
|
6
|
+
/**
|
|
7
|
+
* CVA variants for the alert container.
|
|
8
|
+
*
|
|
9
|
+
* @tokens `--color-primary-subtle`, `--color-primary-subtle-foreground`,
|
|
10
|
+
* `--color-success-subtle`, `--color-success-subtle-foreground`,
|
|
11
|
+
* `--color-warn-subtle`, `--color-warn-subtle-foreground`,
|
|
12
|
+
* `--color-warn`, `--color-warn-foreground`,
|
|
13
|
+
* `--radius-card`
|
|
14
|
+
*/
|
|
15
|
+
declare const alertVariants: (props?: {
|
|
16
|
+
variant?: AlertVariant;
|
|
17
|
+
}) => string;
|
|
18
|
+
/**
|
|
19
|
+
* CVA variants for the alert close button.
|
|
20
|
+
*
|
|
21
|
+
* @tokens `--color-ring`, `--radius-card`
|
|
22
|
+
*/
|
|
23
|
+
declare const alertCloseButtonVariants: (props?: {
|
|
24
|
+
variant?: AlertVariant;
|
|
25
|
+
}) => string;
|
|
26
|
+
type AlertVariants = VariantProps<typeof alertVariants>;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Custom icon slot for `com-alert`.
|
|
30
|
+
*
|
|
31
|
+
* When present, the alert suppresses the default auto-mapped icon
|
|
32
|
+
* and renders this projected content instead.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```html
|
|
36
|
+
* <com-alert variant="success">
|
|
37
|
+
* <com-icon comAlertIcon name="party-popper" size="md" aria-hidden="true" />
|
|
38
|
+
* <h4 comAlertTitle>Congratulations!</h4>
|
|
39
|
+
* </com-alert>
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
declare class ComAlertIcon {
|
|
43
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComAlertIcon, never>;
|
|
44
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComAlertIcon, "[comAlertIcon]", never, {}, {}, never, never, true, never>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Inline alert component for displaying contextual messages.
|
|
49
|
+
*
|
|
50
|
+
* Unlike toasts (ephemeral overlays), alerts are embedded in the page flow
|
|
51
|
+
* and persist until dismissed or the condition changes.
|
|
52
|
+
*
|
|
53
|
+
* @tokens `--color-primary-subtle`, `--color-primary-subtle-foreground`,
|
|
54
|
+
* `--color-success-subtle`, `--color-success-subtle-foreground`,
|
|
55
|
+
* `--color-warn-subtle`, `--color-warn-subtle-foreground`,
|
|
56
|
+
* `--color-warn`, `--color-warn-foreground`,
|
|
57
|
+
* `--radius-card`, `--color-ring`
|
|
58
|
+
*
|
|
59
|
+
* @example Info alert with title and description
|
|
60
|
+
* ```html
|
|
61
|
+
* <com-alert>
|
|
62
|
+
* <h4 comAlertTitle>Heads up</h4>
|
|
63
|
+
* <p comAlertDescription>You can add components using the CLI.</p>
|
|
64
|
+
* </com-alert>
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @example Dismissible warning
|
|
68
|
+
* ```html
|
|
69
|
+
* <com-alert variant="warning" dismissible (dismissed)="onDismissed()">
|
|
70
|
+
* <h4 comAlertTitle>Storage almost full</h4>
|
|
71
|
+
* <p comAlertDescription>You have used 90% of your storage quota.</p>
|
|
72
|
+
* </com-alert>
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
declare class ComAlertComponent {
|
|
76
|
+
/** Semantic color variant. */
|
|
77
|
+
readonly variant: InputSignal<AlertVariant>;
|
|
78
|
+
/** Shows a dismiss button when true. */
|
|
79
|
+
readonly dismissible: InputSignalWithTransform<boolean, unknown>;
|
|
80
|
+
/** Consumer CSS classes — merged with variant classes. */
|
|
81
|
+
readonly userClass: InputSignal<string>;
|
|
82
|
+
/** Emitted when the dismiss button is clicked. */
|
|
83
|
+
readonly dismissed: OutputEmitterRef<void>;
|
|
84
|
+
/** @internal Detects whether a custom icon directive is projected. */
|
|
85
|
+
protected readonly customIcon: Signal<ComAlertIcon | undefined>;
|
|
86
|
+
/** @internal Controls visibility for dismiss animation. */
|
|
87
|
+
protected readonly visible: WritableSignal<boolean>;
|
|
88
|
+
/** @internal Tracks exit animation state. */
|
|
89
|
+
protected readonly animatingOut: WritableSignal<boolean>;
|
|
90
|
+
/** Default icon name auto-mapped from variant. */
|
|
91
|
+
protected readonly defaultIconName: Signal<string>;
|
|
92
|
+
/** ARIA role based on variant. */
|
|
93
|
+
protected readonly ariaRole: Signal<string>;
|
|
94
|
+
/** ARIA live region politeness. */
|
|
95
|
+
protected readonly ariaLive: Signal<string>;
|
|
96
|
+
/** Computed alert container classes. */
|
|
97
|
+
protected readonly alertClasses: Signal<string>;
|
|
98
|
+
/** Computed close button classes. */
|
|
99
|
+
protected readonly closeButtonClasses: Signal<string>;
|
|
100
|
+
/** @internal Triggers dismiss animation, then removes from DOM. */
|
|
101
|
+
protected dismiss(): void;
|
|
102
|
+
/** @internal Removes element after exit animation completes. */
|
|
103
|
+
protected onAnimationEnd(): void;
|
|
104
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComAlertComponent, never>;
|
|
105
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComAlertComponent, "com-alert", ["comAlert"], { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, { "dismissed": "dismissed"; }, ["customIcon"], ["[comAlertIcon]", "*"], true, never>;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Title slot for `com-alert`.
|
|
110
|
+
*
|
|
111
|
+
* Apply to any heading element. Consumer picks the semantic level (h3, h4, etc.).
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* ```html
|
|
115
|
+
* <com-alert>
|
|
116
|
+
* <h4 comAlertTitle>Heads up</h4>
|
|
117
|
+
* </com-alert>
|
|
118
|
+
* ```
|
|
119
|
+
*
|
|
120
|
+
* @tokens `--color-foreground`
|
|
121
|
+
*/
|
|
122
|
+
declare class ComAlertTitle {
|
|
123
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComAlertTitle, never>;
|
|
124
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComAlertTitle, "[comAlertTitle]", never, {}, {}, never, never, true, never>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Description slot for `com-alert`.
|
|
129
|
+
*
|
|
130
|
+
* Inherits text color from the parent alert variant.
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```html
|
|
134
|
+
* <com-alert>
|
|
135
|
+
* <p comAlertDescription>Your session will expire in 5 minutes.</p>
|
|
136
|
+
* </com-alert>
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
declare class ComAlertDescription {
|
|
140
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComAlertDescription, never>;
|
|
141
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComAlertDescription, "[comAlertDescription]", never, {}, {}, never, never, true, never>;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Actions slot for `com-alert`.
|
|
146
|
+
*
|
|
147
|
+
* Container for action buttons. Place buttons inside.
|
|
148
|
+
*
|
|
149
|
+
* @example
|
|
150
|
+
* ```html
|
|
151
|
+
* <com-alert variant="destructive">
|
|
152
|
+
* <h4 comAlertTitle>Account suspended</h4>
|
|
153
|
+
* <p comAlertDescription>Contact support to restore access.</p>
|
|
154
|
+
* <div comAlertActions>
|
|
155
|
+
* <button comButton variant="outline" size="sm">Contact Support</button>
|
|
156
|
+
* </div>
|
|
157
|
+
* </com-alert>
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
declare class ComAlertActions {
|
|
161
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComAlertActions, never>;
|
|
162
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComAlertActions, "[comAlertActions]", never, {}, {}, never, never, true, never>;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export { ComAlertActions, ComAlertComponent, ComAlertDescription, ComAlertIcon, ComAlertTitle, alertCloseButtonVariants, alertVariants };
|
|
166
|
+
export type { AlertVariant, AlertVariants };
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { ElementRef, TemplateRef, InputSignal, InputSignalWithTransform, ModelSignal, Signal, WritableSignal } from '@angular/core';
|
|
4
|
+
|
|
5
|
+
/** Template context for custom previous-button template. */
|
|
6
|
+
interface CarouselPrevContext {
|
|
7
|
+
/** Whether the carousel can navigate to the previous slide. */
|
|
8
|
+
$implicit: boolean;
|
|
9
|
+
/** Callback to navigate to the previous slide. */
|
|
10
|
+
prev: () => void;
|
|
11
|
+
}
|
|
12
|
+
/** Template context for custom next-button template. */
|
|
13
|
+
interface CarouselNextContext {
|
|
14
|
+
/** Whether the carousel can navigate to the next slide. */
|
|
15
|
+
$implicit: boolean;
|
|
16
|
+
/** Callback to navigate to the next slide. */
|
|
17
|
+
next: () => void;
|
|
18
|
+
}
|
|
19
|
+
/** Template context for custom pagination dot template. */
|
|
20
|
+
interface CarouselPaginationContext {
|
|
21
|
+
/** The page index (0-based). */
|
|
22
|
+
$implicit: number;
|
|
23
|
+
/** Whether this page is currently active. */
|
|
24
|
+
active: boolean;
|
|
25
|
+
/** Total number of pages. */
|
|
26
|
+
total: number;
|
|
27
|
+
/** Same as $implicit — the page index. */
|
|
28
|
+
index: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare const carouselContainerVariants: () => string;
|
|
32
|
+
declare const carouselNavButtonVariants: (props?: {
|
|
33
|
+
position?: 'prev' | 'next';
|
|
34
|
+
}) => string;
|
|
35
|
+
type CarouselNavButtonVariants = VariantProps<typeof carouselNavButtonVariants>;
|
|
36
|
+
declare const carouselDotVariants: (props?: {
|
|
37
|
+
active?: boolean;
|
|
38
|
+
}) => string;
|
|
39
|
+
type CarouselDotVariants = VariantProps<typeof carouselDotVariants>;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Marks an element as a carousel slide item.
|
|
43
|
+
*
|
|
44
|
+
* Apply this directive to each direct child element that should be
|
|
45
|
+
* treated as a slide within `<com-carousel>`.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```html
|
|
49
|
+
* <com-carousel>
|
|
50
|
+
* <div comCarouselItem>Slide 1</div>
|
|
51
|
+
* <div comCarouselItem>Slide 2</div>
|
|
52
|
+
* </com-carousel>
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
declare class ComCarouselItem {
|
|
56
|
+
readonly elementRef: ElementRef<HTMLElement>;
|
|
57
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComCarouselItem, never>;
|
|
58
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComCarouselItem, "[comCarouselItem]", never, {}, {}, never, never, true, never>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Template directive for a custom "previous" navigation button.
|
|
63
|
+
*
|
|
64
|
+
* The template receives a boolean context (`$implicit`) indicating
|
|
65
|
+
* whether the carousel can navigate backward.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```html
|
|
69
|
+
* <com-carousel>
|
|
70
|
+
* <div comCarouselItem>Slide 1</div>
|
|
71
|
+
* <ng-template comCarouselPrev let-canGo>
|
|
72
|
+
* <button [disabled]="!canGo">Back</button>
|
|
73
|
+
* </ng-template>
|
|
74
|
+
* </com-carousel>
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
declare class ComCarouselPrevTpl {
|
|
78
|
+
readonly templateRef: TemplateRef<CarouselPrevContext>;
|
|
79
|
+
static ngTemplateContextGuard(_dir: ComCarouselPrevTpl, _ctx: unknown): _ctx is CarouselPrevContext;
|
|
80
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComCarouselPrevTpl, never>;
|
|
81
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComCarouselPrevTpl, "ng-template[comCarouselPrev]", never, {}, {}, never, never, true, never>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Template directive for a custom "next" navigation button.
|
|
86
|
+
*
|
|
87
|
+
* The template receives a boolean context (`$implicit`) indicating
|
|
88
|
+
* whether the carousel can navigate forward.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```html
|
|
92
|
+
* <com-carousel>
|
|
93
|
+
* <div comCarouselItem>Slide 1</div>
|
|
94
|
+
* <ng-template comCarouselNext let-canGo>
|
|
95
|
+
* <button [disabled]="!canGo">Forward</button>
|
|
96
|
+
* </ng-template>
|
|
97
|
+
* </com-carousel>
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
declare class ComCarouselNextTpl {
|
|
101
|
+
readonly templateRef: TemplateRef<CarouselNextContext>;
|
|
102
|
+
static ngTemplateContextGuard(_dir: ComCarouselNextTpl, _ctx: unknown): _ctx is CarouselNextContext;
|
|
103
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComCarouselNextTpl, never>;
|
|
104
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComCarouselNextTpl, "ng-template[comCarouselNext]", never, {}, {}, never, never, true, never>;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Template directive for custom pagination indicators.
|
|
109
|
+
*
|
|
110
|
+
* Rendered once per "page" in the carousel. The template receives
|
|
111
|
+
* a context with the page index, active state, and total count.
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* ```html
|
|
115
|
+
* <com-carousel>
|
|
116
|
+
* <div comCarouselItem>Slide 1</div>
|
|
117
|
+
* <div comCarouselItem>Slide 2</div>
|
|
118
|
+
* <ng-template comCarouselPagination let-idx let-active="active">
|
|
119
|
+
* <span
|
|
120
|
+
* class="inline-block h-3 w-3 rounded-pill transition-colors"
|
|
121
|
+
* [class]="active ? 'bg-primary' : 'bg-muted'"
|
|
122
|
+
* ></span>
|
|
123
|
+
* </ng-template>
|
|
124
|
+
* </com-carousel>
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
declare class ComCarouselPaginationTpl {
|
|
128
|
+
readonly templateRef: TemplateRef<CarouselPaginationContext>;
|
|
129
|
+
static ngTemplateContextGuard(_dir: ComCarouselPaginationTpl, _ctx: unknown): _ctx is CarouselPaginationContext;
|
|
130
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComCarouselPaginationTpl, never>;
|
|
131
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComCarouselPaginationTpl, "ng-template[comCarouselPagination]", never, {}, {}, never, never, true, never>;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Carousel component — a horizontal slider that navigates content screens
|
|
136
|
+
* using percentage-based CSS `transform: translateX()`.
|
|
137
|
+
*
|
|
138
|
+
* Items are projected via `ng-content` and marked with `comCarouselItem`.
|
|
139
|
+
* Navigation is screen-based: each index step moves one full viewport of items.
|
|
140
|
+
* Supports multi-item views, auto-play, loop, touch/swipe, keyboard
|
|
141
|
+
* navigation, and custom templates for navigation and pagination.
|
|
142
|
+
*
|
|
143
|
+
* @tokens `--color-background`, `--color-foreground`, `--color-muted`,
|
|
144
|
+
* `--color-muted-hover`, `--color-primary`, `--color-border-subtle`,
|
|
145
|
+
* `--color-ring`, `--color-disabled`, `--color-disabled-foreground`
|
|
146
|
+
*
|
|
147
|
+
* @example Basic usage
|
|
148
|
+
* ```html
|
|
149
|
+
* <com-carousel>
|
|
150
|
+
* <div comCarouselItem>Slide 1</div>
|
|
151
|
+
* <div comCarouselItem>Slide 2</div>
|
|
152
|
+
* <div comCarouselItem>Slide 3</div>
|
|
153
|
+
* </com-carousel>
|
|
154
|
+
* ```
|
|
155
|
+
*
|
|
156
|
+
* @example Multiple items per view
|
|
157
|
+
* ```html
|
|
158
|
+
* <com-carousel [slidesPerView]="3">
|
|
159
|
+
* @for (product of products(); track product.id) {
|
|
160
|
+
* <com-card comCarouselItem>{{ product.name }}</com-card>
|
|
161
|
+
* }
|
|
162
|
+
* </com-carousel>
|
|
163
|
+
* ```
|
|
164
|
+
*
|
|
165
|
+
* @example Auto-play with loop
|
|
166
|
+
* ```html
|
|
167
|
+
* <com-carousel autoPlay loop [autoPlayInterval]="4000">
|
|
168
|
+
* <img comCarouselItem *ngFor="let img of images" [src]="img.url" [alt]="img.alt" />
|
|
169
|
+
* </com-carousel>
|
|
170
|
+
* ```
|
|
171
|
+
*
|
|
172
|
+
* @example Two-way index binding
|
|
173
|
+
* ```html
|
|
174
|
+
* <com-carousel [(index)]="currentSlide">
|
|
175
|
+
* <div comCarouselItem>A</div>
|
|
176
|
+
* <div comCarouselItem>B</div>
|
|
177
|
+
* </com-carousel>
|
|
178
|
+
* ```
|
|
179
|
+
*
|
|
180
|
+
* @example Custom navigation
|
|
181
|
+
* ```html
|
|
182
|
+
* <com-carousel>
|
|
183
|
+
* <div comCarouselItem>Slide 1</div>
|
|
184
|
+
* <ng-template comCarouselPrev let-canGo>
|
|
185
|
+
* <button [disabled]="!canGo">Back</button>
|
|
186
|
+
* </ng-template>
|
|
187
|
+
* <ng-template comCarouselNext let-canGo>
|
|
188
|
+
* <button [disabled]="!canGo">Forward</button>
|
|
189
|
+
* </ng-template>
|
|
190
|
+
* </com-carousel>
|
|
191
|
+
* ```
|
|
192
|
+
*
|
|
193
|
+
* @example Custom pagination
|
|
194
|
+
* ```html
|
|
195
|
+
* <com-carousel>
|
|
196
|
+
* <div comCarouselItem>Slide 1</div>
|
|
197
|
+
* <ng-template comCarouselPagination let-idx let-active="active">
|
|
198
|
+
* <span [class]="active ? 'bg-primary' : 'bg-muted'" class="h-3 w-3 rounded-pill inline-block"></span>
|
|
199
|
+
* </ng-template>
|
|
200
|
+
* </com-carousel>
|
|
201
|
+
* ```
|
|
202
|
+
*/
|
|
203
|
+
declare class ComCarouselComponent {
|
|
204
|
+
private readonly destroyRef;
|
|
205
|
+
private readonly renderer;
|
|
206
|
+
private readonly platform;
|
|
207
|
+
private readonly hostEl;
|
|
208
|
+
/** Number of items visible at once. */
|
|
209
|
+
readonly slidesPerView: InputSignal<number>;
|
|
210
|
+
/** Wrap from last to first and vice versa. */
|
|
211
|
+
readonly loop: InputSignalWithTransform<boolean, unknown>;
|
|
212
|
+
/** Enable auto-advancing slides. */
|
|
213
|
+
readonly autoPlay: InputSignalWithTransform<boolean, unknown>;
|
|
214
|
+
/** Auto-play interval in milliseconds. */
|
|
215
|
+
readonly autoPlayInterval: InputSignal<number>;
|
|
216
|
+
/** Slide transition duration in milliseconds. */
|
|
217
|
+
readonly transitionDuration: InputSignal<number>;
|
|
218
|
+
/** Show prev/next navigation buttons. */
|
|
219
|
+
readonly showNavigation: InputSignalWithTransform<boolean, unknown>;
|
|
220
|
+
/** Show pagination dot indicators. */
|
|
221
|
+
readonly showPagination: InputSignalWithTransform<boolean, unknown>;
|
|
222
|
+
/** Accessible label for the carousel region. */
|
|
223
|
+
readonly ariaLabel: InputSignal<string>;
|
|
224
|
+
/** Two-way bindable current screen index. */
|
|
225
|
+
readonly index: ModelSignal<number>;
|
|
226
|
+
readonly items: Signal<readonly ComCarouselItem[]>;
|
|
227
|
+
readonly customPrev: Signal<ComCarouselPrevTpl | undefined>;
|
|
228
|
+
readonly customNext: Signal<ComCarouselNextTpl | undefined>;
|
|
229
|
+
readonly customPagination: Signal<ComCarouselPaginationTpl | undefined>;
|
|
230
|
+
readonly trackEl: Signal<ElementRef<HTMLElement> | undefined>;
|
|
231
|
+
private readonly paused;
|
|
232
|
+
readonly animating: WritableSignal<boolean>;
|
|
233
|
+
private autoPlayTimerId;
|
|
234
|
+
readonly totalSlides: Signal<number>;
|
|
235
|
+
/** Total number of screens (pages). */
|
|
236
|
+
readonly totalScreens: Signal<number>;
|
|
237
|
+
readonly maxIndex: Signal<number>;
|
|
238
|
+
/** Clamp index when items or slidesPerView changes. */
|
|
239
|
+
readonly clampedIndex: Signal<number>;
|
|
240
|
+
readonly canGoPrev: Signal<boolean>;
|
|
241
|
+
readonly canGoNext: Signal<boolean>;
|
|
242
|
+
readonly pages: Signal<number[]>;
|
|
243
|
+
/** Percentage-based translateX — each screen step moves by 100%. */
|
|
244
|
+
readonly translateX: Signal<string>;
|
|
245
|
+
/** Item width as a percentage string. */
|
|
246
|
+
private readonly itemWidth;
|
|
247
|
+
readonly ariaLiveMode: Signal<string>;
|
|
248
|
+
readonly containerClasses: Signal<string>;
|
|
249
|
+
readonly prevButtonClasses: Signal<string>;
|
|
250
|
+
readonly nextButtonClasses: Signal<string>;
|
|
251
|
+
readonly prevContext: Signal<CarouselPrevContext>;
|
|
252
|
+
readonly nextContext: Signal<CarouselNextContext>;
|
|
253
|
+
constructor();
|
|
254
|
+
/** Navigate to the next screen. */
|
|
255
|
+
next(): void;
|
|
256
|
+
/** Navigate to the previous screen. */
|
|
257
|
+
prev(): void;
|
|
258
|
+
/** Navigate to a specific page index. */
|
|
259
|
+
goToPage(pageIndex: number): void;
|
|
260
|
+
/** Get CVA classes for a pagination dot at the given index. */
|
|
261
|
+
getDotClasses(pageIndex: number): string;
|
|
262
|
+
/** Build template context for a custom pagination dot. */
|
|
263
|
+
getPaginationContext(pageIndex: number): CarouselPaginationContext;
|
|
264
|
+
/** Handle keyboard navigation on pagination dots. */
|
|
265
|
+
onPaginationKeydown(event: KeyboardEvent, currentIndex: number): void;
|
|
266
|
+
protected pauseAutoPlay(): void;
|
|
267
|
+
protected resumeAutoPlay(): void;
|
|
268
|
+
private clearAutoPlay;
|
|
269
|
+
private swipeCleanupFns;
|
|
270
|
+
private pointerStartX;
|
|
271
|
+
private pointerStartY;
|
|
272
|
+
private isSwiping;
|
|
273
|
+
private setupSwipe;
|
|
274
|
+
private cleanupSwipe;
|
|
275
|
+
private focusDotAt;
|
|
276
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComCarouselComponent, never>;
|
|
277
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComCarouselComponent, "com-carousel", never, { "slidesPerView": { "alias": "slidesPerView"; "required": false; "isSignal": true; }; "loop": { "alias": "loop"; "required": false; "isSignal": true; }; "autoPlay": { "alias": "autoPlay"; "required": false; "isSignal": true; }; "autoPlayInterval": { "alias": "autoPlayInterval"; "required": false; "isSignal": true; }; "transitionDuration": { "alias": "transitionDuration"; "required": false; "isSignal": true; }; "showNavigation": { "alias": "showNavigation"; "required": false; "isSignal": true; }; "showPagination": { "alias": "showPagination"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "index": { "alias": "index"; "required": false; "isSignal": true; }; }, { "index": "indexChange"; }, ["items", "customPrev", "customNext", "customPagination"], ["[comCarouselItem]"], true, never>;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export { ComCarouselComponent, ComCarouselItem, ComCarouselNextTpl, ComCarouselPaginationTpl, ComCarouselPrevTpl, carouselContainerVariants, carouselDotVariants, carouselNavButtonVariants };
|
|
281
|
+
export type { CarouselDotVariants, CarouselNavButtonVariants, CarouselNextContext, CarouselPaginationContext, CarouselPrevContext };
|