@raqm/ui 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/README.md +87 -126
- package/fesm2022/raqm-ui-badge.mjs +3 -1
- package/fesm2022/raqm-ui-badge.mjs.map +1 -1
- package/fesm2022/raqm-ui-calendar.mjs +79 -12
- package/fesm2022/raqm-ui-calendar.mjs.map +1 -1
- package/fesm2022/raqm-ui-combobox.mjs +47 -23
- package/fesm2022/raqm-ui-combobox.mjs.map +1 -1
- package/fesm2022/raqm-ui-command.mjs +60 -12
- package/fesm2022/raqm-ui-command.mjs.map +1 -1
- package/fesm2022/raqm-ui-dialog.mjs +1 -3
- package/fesm2022/raqm-ui-dialog.mjs.map +1 -1
- package/fesm2022/raqm-ui-icon.mjs +160 -0
- package/fesm2022/raqm-ui-icon.mjs.map +1 -0
- package/fesm2022/raqm-ui-input-otp.mjs +7 -4
- package/fesm2022/raqm-ui-input-otp.mjs.map +1 -1
- package/fesm2022/raqm-ui-overlay-internal.mjs +15 -5
- package/fesm2022/raqm-ui-overlay-internal.mjs.map +1 -1
- package/fesm2022/raqm-ui-popover.mjs +51 -19
- package/fesm2022/raqm-ui-popover.mjs.map +1 -1
- package/fesm2022/raqm-ui-resizable.mjs +14 -4
- package/fesm2022/raqm-ui-resizable.mjs.map +1 -1
- package/fesm2022/raqm-ui-scroll-area.mjs +85 -29
- package/fesm2022/raqm-ui-scroll-area.mjs.map +1 -1
- package/fesm2022/raqm-ui-select.mjs +46 -19
- package/fesm2022/raqm-ui-select.mjs.map +1 -1
- package/fesm2022/raqm-ui-sidebar.mjs +13 -3
- package/fesm2022/raqm-ui-sidebar.mjs.map +1 -1
- package/fesm2022/raqm-ui-slider.mjs +59 -12
- package/fesm2022/raqm-ui-slider.mjs.map +1 -1
- package/fesm2022/raqm-ui-toast.mjs +60 -20
- package/fesm2022/raqm-ui-toast.mjs.map +1 -1
- package/fesm2022/raqm-ui-tooltip.mjs +28 -3
- package/fesm2022/raqm-ui-tooltip.mjs.map +1 -1
- package/fesm2022/raqm-ui.mjs +1 -0
- package/package.json +53 -20
- package/styles/accordion.css +1 -0
- package/styles/alert-dialog.css +1 -0
- package/styles/alert.css +1 -0
- package/styles/attachment.css +1 -0
- package/styles/avatar.css +1 -0
- package/styles/badge.css +1 -0
- package/styles/base.css +1 -0
- package/styles/button-group.css +1 -0
- package/styles/button.css +1 -0
- package/styles/checkbox.css +1 -0
- package/styles/combobox.css +1 -0
- package/styles/command.css +1 -0
- package/styles/common.css +17 -0
- package/styles/context-menu.css +1 -0
- package/styles/dialog.css +1 -0
- package/styles/drawer.css +1 -0
- package/styles/dropdown-menu.css +1 -0
- package/styles/empty.css +1 -0
- package/styles/field-parts.css +1 -0
- package/styles/field-relationships.css +1 -0
- package/styles/input-group-button.css +1 -0
- package/styles/input-group-relationships.css +1 -0
- package/styles/input-otp.css +1 -0
- package/styles/input.css +1 -0
- package/styles/item.css +1 -0
- package/styles/kbd.css +1 -0
- package/styles/menubar.css +1 -0
- package/styles/native-select.css +1 -0
- package/styles/navigation-menu.css +1 -0
- package/styles/overlay.css +1 -0
- package/styles/pagination.css +1 -0
- package/styles/popover.css +1 -0
- package/styles/questionnaire.css +1 -0
- package/styles/radio-group.css +1 -0
- package/styles/resizable.css +1 -0
- package/styles/sheet.css +1 -0
- package/styles/sidebar.css +1 -0
- package/styles/spinner.css +1 -0
- package/styles/switch.css +1 -0
- package/styles/table.css +1 -0
- package/styles/tabs.css +1 -0
- package/styles/textarea.css +1 -0
- package/styles/theme.css +50 -4324
- package/styles/toggle-group.css +1 -0
- package/styles/toggle.css +1 -0
- package/styles/tooltip.css +1 -0
- package/types/raqm-ui-calendar.d.ts +1 -0
- package/types/raqm-ui-combobox.d.ts +8 -4
- package/types/raqm-ui-command.d.ts +4 -0
- package/types/raqm-ui-dialog.d.ts +7 -1
- package/types/raqm-ui-icon.d.ts +65 -0
- package/types/raqm-ui-input-otp.d.ts +1 -0
- package/types/raqm-ui-resizable.d.ts +4 -0
- package/types/raqm-ui-scroll-area.d.ts +11 -0
- package/types/raqm-ui-slider.d.ts +1 -1
- package/types/raqm-ui-toast.d.ts +6 -0
- package/types/raqm-ui.d.ts +1 -0
- package/fesm2022/raqm-ui-carousel.mjs +0 -410
- package/fesm2022/raqm-ui-carousel.mjs.map +0 -1
- package/types/raqm-ui-carousel.d.ts +0 -81
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"raqm-ui-tooltip.mjs","names":[],"sources":["../../../projects/ui/tooltip/tooltip-context.ts","../../../projects/ui/tooltip/tooltip-lifecycle.ts","../../../projects/ui/tooltip/tooltip-model.ts","../../../projects/ui/tooltip/tooltip-pane.ts","../../../projects/ui/tooltip/tooltip-position.ts","../../../projects/ui/tooltip/tooltip-slot.ts","../../../projects/ui/tooltip/tooltip-timers.ts","../../../projects/ui/tooltip/tooltip.ts","../../../projects/ui/tooltip/tooltip.html","../../../projects/ui/tooltip/tooltip.directive.ts","../../../projects/ui/tooltip/public-api.ts"],"sourcesContent":["import { InjectionToken, Signal, TemplateRef } from '@angular/core';\r\n\r\nexport interface RaqmTooltipTriggerRef {\r\n /** The native button or passive span the root anchors the tooltip to. */\r\n readonly element: HTMLElement;\r\n /** Live native disabled state, read by the root's open policy at event time. */\r\n readonly disabled: boolean;\r\n}\r\n\r\n/** The interaction that requested the tooltip open. */\r\nexport type RaqmTooltipOpenReason = 'mouse' | 'focus';\r\n\r\n/** The interaction that requested the tooltip close. */\r\nexport type RaqmTooltipCloseReason = 'mouse' | 'focus' | 'press' | 'escape';\r\n\r\nexport interface RaqmTooltipContext {\r\n /** Whether the tooltip is currently shown (enabled and attached). */\r\n readonly open: Signal<boolean>;\r\n /** The live content id while shown (the trigger's `aria-describedby` token), or `null`. */\r\n readonly tooltipId: Signal<string | null>;\r\n /** Registers the single trigger; called once per root. */\r\n registerTrigger(ref: RaqmTooltipTriggerRef): void;\r\n /** Unregisters the trigger on destroy; never changes open state. */\r\n unregisterTrigger(ref: RaqmTooltipTriggerRef): void;\r\n /** Registers the single content template; called once per root. */\r\n registerContent(template: TemplateRef<unknown>): void;\r\n /** Unregisters the content template on destroy. */\r\n unregisterContent(template: TemplateRef<unknown>): void;\r\n /** Requests opening from a hover or keyboard-focus interaction. */\r\n requestOpen(ref: RaqmTooltipTriggerRef, reason: RaqmTooltipOpenReason): void;\r\n /** Requests closing from a hover, blur, press or Escape interaction. */\r\n requestClose(ref: RaqmTooltipTriggerRef, reason: RaqmTooltipCloseReason): void;\r\n /** Cancels a pending hover-gap close when the pointer enters the content. */\r\n cancelHoverClose(): void;\r\n /** Schedules a bounded hover-gap close when the pointer leaves the content. */\r\n scheduleHoverClose(): void;\r\n}\r\n\r\n/** One open tooltip registered with a provider, so the provider keeps a single active one. */\r\nexport interface RaqmTooltipActive {\r\n /** Immediately closes this tooltip without an exit animation (peer opened). */\r\n closeForPeer(): void;\r\n}\r\n\r\nexport interface RaqmTooltipProviderContext {\r\n /** The hover-open delay in milliseconds applied to descendant tooltips. */\r\n readonly delay: Signal<number>;\r\n /** Registers a newly open tooltip and closes the previous active one. */\r\n registerActive(active: RaqmTooltipActive): void;\r\n /** Clears the active registration when a tooltip closes or is destroyed. */\r\n clearActive(active: RaqmTooltipActive): void;\r\n}\r\n\r\n/** Injection token for the parent Tooltip root; injected optionally, so a misplaced child reports rather than crashes. */\r\nexport const RAQM_TOOLTIP = new InjectionToken<RaqmTooltipContext>('RaqmTooltip');\r\n\r\n/** Injection token for the nearest Tooltip provider; without one a root uses a 0ms delay and has no sibling scope. */\r\nexport const RAQM_TOOLTIP_PROVIDER = new InjectionToken<RaqmTooltipProviderContext>(\r\n 'RaqmTooltipProvider',\r\n);\r\n","// Tooltip lifecycle: the open/close policy, provider claim and the pane hand-off.\r\n\r\nimport { TemplateRef } from '@angular/core';\r\n\r\nimport { OverlayRef } from '@angular/cdk/overlay';\r\n\r\nimport {\r\n RaqmTooltipActive,\r\n RaqmTooltipOpenReason,\r\n RaqmTooltipProviderContext,\r\n RaqmTooltipTriggerRef,\r\n} from './tooltip-context';\r\nimport { RaqmTooltipPane } from './tooltip-pane';\r\nimport { RaqmTooltipPosition } from './tooltip-position';\r\nimport { RaqmTooltipSlot } from './tooltip-slot';\r\nimport { RaqmTooltipTimers } from './tooltip-timers';\r\n\r\nexport interface RaqmTooltipLifecycleHost {\r\n readonly pane: RaqmTooltipPane;\r\n readonly position: RaqmTooltipPosition;\r\n readonly slot: RaqmTooltipSlot;\r\n readonly timers: RaqmTooltipTimers;\r\n /** Nearest provider (shared delay + single-active scope). */\r\n readonly provider: RaqmTooltipProviderContext | null;\r\n disabled(): boolean;\r\n destroyed(): boolean;\r\n /** The hover delay from the nearest provider, or 0 without one. */\r\n delay(): number;\r\n /** The panel template; an open has nothing to attach without it. */\r\n panel(): TemplateRef<unknown> | undefined;\r\n}\r\n\r\nexport class RaqmTooltipLifecycle implements RaqmTooltipActive {\r\n // Set while an open is requested, so a late trigger/content registration retries.\r\n private openRequested = false;\r\n\r\n private openReason: RaqmTooltipOpenReason = 'mouse';\r\n\r\n // Whether focus may open the tooltip; set by a press/Escape close and cleared on blur.\r\n private suppressFocusOpen = false;\r\n\r\n private providerRegistered = false;\r\n\r\n constructor(private readonly host: RaqmTooltipLifecycleHost) {}\r\n\r\n /** The interaction that requested the current open; hover closes are skipped for focus. */\r\n currentReason(): RaqmTooltipOpenReason {\r\n return this.openReason;\r\n }\r\n\r\n requestOpen(ref: RaqmTooltipTriggerRef, reason: RaqmTooltipOpenReason): void {\r\n if (ref !== this.host.slot.trigger()) {\r\n return;\r\n }\r\n // A live native disabled button never opens; a passive span around one stays allowed.\r\n if (this.host.disabled() || ref.disabled) {\r\n return;\r\n }\r\n if (reason === 'focus' && this.suppressFocusOpen) {\r\n return;\r\n }\r\n if (this.host.pane.open() || this.host.pane.hasPane) {\r\n // A re-entry cancels a pending hover close; only focus upgrades ownership.\r\n this.host.timers.cancelHoverClose();\r\n if (reason === 'focus') {\r\n this.openReason = 'focus';\r\n }\r\n return;\r\n }\r\n if (!this.host.slot.canOpen()) {\r\n this.openRequested = true;\r\n this.openReason = reason;\r\n return;\r\n }\r\n this.openRequested = true;\r\n this.openReason = reason;\r\n this.host.timers.cancelOpen();\r\n if (reason === 'focus') {\r\n this.host.timers.cancelHoverClose();\r\n this.beginOpen('focus');\r\n return;\r\n }\r\n const delay = this.host.delay();\r\n if (delay > 0) {\r\n this.host.timers.armOpen(delay);\r\n return;\r\n }\r\n this.beginOpen('mouse');\r\n }\r\n\r\n requestClose(ref: RaqmTooltipTriggerRef, reason: 'mouse' | 'focus' | 'press' | 'escape'): void {\r\n if (ref !== this.host.slot.trigger()) {\r\n return;\r\n }\r\n this.openRequested = false;\r\n this.host.timers.cancelOpen();\r\n if (reason === 'focus') {\r\n this.suppressFocusOpen = false;\r\n this.host.timers.cancelHoverClose();\r\n if (this.host.pane.open() || this.host.pane.hasPane) {\r\n this.beginClose(false);\r\n }\r\n return;\r\n }\r\n if (reason === 'mouse') {\r\n if (!this.host.pane.open()) {\r\n return;\r\n }\r\n if (this.openReason === 'focus' && this.host.slot.isTriggerFocused()) {\r\n return;\r\n }\r\n this.host.timers.scheduleHoverClose();\r\n return;\r\n }\r\n // Press/Escape suppresses the focus event that may follow, even with no surface yet.\r\n this.suppressFocusOpen = true;\r\n this.host.timers.cancelHoverClose();\r\n if (!this.host.pane.open()) {\r\n return;\r\n }\r\n this.beginClose(false);\r\n }\r\n\r\n // A disabled root drops any pending request and closes immediately; a peer take-over does the same.\r\n closeNow(): void {\r\n this.openRequested = false;\r\n this.host.timers.cancelOpen();\r\n this.host.timers.cancelHoverClose();\r\n if (this.host.pane.open() || this.host.pane.hasPane) {\r\n this.beginClose(true);\r\n }\r\n }\r\n\r\n closeForPeer(): void {\r\n this.closeNow();\r\n }\r\n\r\n /** Registers this tooltip as the scope's active one, before the overlay exists. */\r\n claimActive(): void {\r\n this.host.provider?.registerActive(this);\r\n this.providerRegistered = true;\r\n }\r\n\r\n // Retries a requested open if it was waiting for a late trigger/template.\r\n retryRequestedOpen(): void {\r\n if (!this.openRequested || this.host.destroyed() || this.host.pane.hasPane) {\r\n return;\r\n }\r\n if (!this.host.slot.canOpen()) {\r\n return;\r\n }\r\n this.beginOpen(this.openReason);\r\n }\r\n\r\n // Re-checks the open policy once the provider's hover delay has elapsed.\r\n onOpenElapsed(): void {\r\n const trigger = this.host.slot.trigger();\r\n if (this.openRequested && !this.host.destroyed() && trigger !== null) {\r\n if (trigger.disabled) {\r\n this.openRequested = false;\r\n return;\r\n }\r\n this.beginOpen('mouse');\r\n }\r\n }\r\n\r\n // The CDK detached the pane, so its subscriptions and the active claim go with it.\r\n handleDetached(overlayRef: OverlayRef): void {\r\n if (!this.host.pane.owns(overlayRef)) {\r\n return;\r\n }\r\n this.host.pane.releaseOwnership();\r\n this.openRequested = false;\r\n this.host.pane.open.set(false);\r\n this.host.pane.tooltipId.set(null);\r\n this.host.pane.closing.set(false);\r\n this.host.position.clear();\r\n this.host.timers.cancelOpen();\r\n this.host.timers.cancelHoverClose();\r\n this.clearProviderRegistration();\r\n this.host.pane.releaseSubscriptions();\r\n }\r\n\r\n /** Tears down every timer, subscription and pane the destroy pass still owns. */\r\n destroy(): void {\r\n this.openRequested = false;\r\n this.host.timers.cancelOpen();\r\n this.host.timers.cancelHoverClose();\r\n this.host.pane.releaseSubscriptions();\r\n const { pending, overlay } = this.host.pane.takeForDestroy();\r\n this.clearProviderRegistration();\r\n pending?.dispose();\r\n overlay?.dispose();\r\n }\r\n\r\n // Creates the one overlay for a fresh open; content is revealed after the next render.\r\n private beginOpen(reason: RaqmTooltipOpenReason): void {\r\n const trigger = this.host.slot.trigger();\r\n const content = this.host.slot.content();\r\n const panel = this.host.panel();\r\n if (\r\n this.host.destroyed() ||\r\n this.host.disabled() ||\r\n trigger === null ||\r\n trigger.disabled ||\r\n content === null ||\r\n panel === undefined ||\r\n this.host.pane.hasPane\r\n ) {\r\n return;\r\n }\r\n this.openRequested = true;\r\n this.openReason = reason;\r\n this.host.timers.removePendingEscape();\r\n this.host.pane.flushPendingDispose();\r\n this.host.timers.cancelHoverClose();\r\n this.host.pane.openLayer(trigger, panel);\r\n }\r\n\r\n // Tears down now when requested or under reduced motion, else after the exit transition.\r\n beginClose(immediate: boolean): void {\r\n this.openRequested = false;\r\n this.host.pane.open.set(false);\r\n this.host.pane.tooltipId.set(null);\r\n this.host.timers.cancelOpen();\r\n this.host.timers.cancelHoverClose();\r\n this.clearProviderRegistration();\r\n this.host.pane.disposePane(immediate);\r\n }\r\n\r\n private clearProviderRegistration(): void {\r\n if (this.providerRegistered) {\r\n this.host.provider?.clearActive(this);\r\n this.providerRegistered = false;\r\n }\r\n }\r\n}\r\n","// Tooltip model: accepted input values, defaults, durations and the root id mint.\r\n\r\nimport { numberAttribute } from '@angular/core';\r\n\r\nexport type RaqmTooltipSide = 'top' | 'bottom' | 'left' | 'right' | 'inline-start' | 'inline-end';\r\n\r\nexport type RaqmTooltipAlign = 'start' | 'center' | 'end';\r\n\r\n// A side after logical resolution; positions, arrow placement and motion all use it.\r\nexport type RaqmTooltipPhysicalSide = 'top' | 'bottom' | 'left' | 'right';\r\n\r\n// The accepted input values; anything else falls back to the default.\r\nconst SIDES: readonly RaqmTooltipSide[] = [\r\n 'top',\r\n 'bottom',\r\n 'left',\r\n 'right',\r\n 'inline-start',\r\n 'inline-end',\r\n];\r\nconst ALIGNS: readonly RaqmTooltipAlign[] = ['start', 'center', 'end'];\r\n\r\nexport const DEFAULT_SIDE: RaqmTooltipSide = 'top';\r\nexport const DEFAULT_ALIGN: RaqmTooltipAlign = 'center';\r\nexport const DEFAULT_SIDE_OFFSET = 4;\r\nexport const DEFAULT_ALIGN_OFFSET = 0;\r\n\r\n// 5px is the positioner's collision padding; the CDK gets the same margin.\r\nexport const VIEWPORT_MARGIN = 5;\r\n\r\nexport const EXIT_ANIMATION_MS = 150;\r\n\r\n// Grace for a pointer crossing the 4px trigger/content gap; not an animation duration.\r\nexport const HOVER_GAP_MS = 100;\r\n\r\n// The overlay pane class; the visual surface lives on `.raqm-tooltip-content`.\r\nexport const PANE_CLASS = 'raqm-tooltip-overlay-pane';\r\n\r\n// The library-owned classes this component toggles directly on the overlay nodes.\r\nexport const CONTENT_CLASS = 'raqm-tooltip-content';\r\nexport const CONTENT_ENTERING_CLASS = 'raqm-tooltip-content--entering';\r\nexport const CONTENT_CLOSING_CLASS = 'raqm-tooltip-content--closing';\r\n\r\nlet nextTooltipId = 0;\r\n\r\n// Minted once per root and exposed only while the content exists.\r\nexport function nextTooltipRootId(): string {\r\n return `raqm-tooltip-${++nextTooltipId}`;\r\n}\r\n\r\nexport function prefersReducedMotion(): boolean {\r\n return typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;\r\n}\r\n\r\nexport function toSide(value: unknown): RaqmTooltipSide {\r\n return SIDES.includes(value as RaqmTooltipSide) ? (value as RaqmTooltipSide) : DEFAULT_SIDE;\r\n}\r\n\r\nexport function toAlign(value: unknown): RaqmTooltipAlign {\r\n return ALIGNS.includes(value as RaqmTooltipAlign) ? (value as RaqmTooltipAlign) : DEFAULT_ALIGN;\r\n}\r\n\r\nexport function toDir(value: unknown): 'ltr' | 'rtl' | undefined {\r\n return value === 'ltr' || value === 'rtl' ? value : undefined;\r\n}\r\n\r\nexport function toOffset(fallback: number): (value: unknown) => number {\r\n return (value: unknown): number => {\r\n const parsed = numberAttribute(value, fallback);\r\n return Number.isFinite(parsed) ? parsed : fallback;\r\n };\r\n}\r\n","// Tooltip pane: overlay creation, pane subscriptions, the exit transition and disposal.\r\n\r\nimport {\r\n Injector,\r\n TemplateRef,\r\n ViewContainerRef,\r\n WritableSignal,\r\n afterNextRender,\r\n signal,\r\n} from '@angular/core';\r\n\r\nimport { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\r\nimport { TemplatePortal } from '@angular/cdk/portal';\r\nimport { ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';\r\n\r\nimport { registerOverlayOwnership } from '@raqm/ui/overlay-internal';\r\n\r\nimport { RaqmTooltipTriggerRef } from './tooltip-context';\r\nimport {\r\n CONTENT_CLASS,\r\n CONTENT_CLOSING_CLASS,\r\n CONTENT_ENTERING_CLASS,\r\n EXIT_ANIMATION_MS,\r\n PANE_CLASS,\r\n nextTooltipRootId,\r\n prefersReducedMotion,\r\n} from './tooltip-model';\r\nimport { RaqmTooltipPosition } from './tooltip-position';\r\n\r\nexport interface RaqmTooltipPaneHost {\r\n /** Injection context for the after-render placement pass. */\r\n readonly injector: Injector;\r\n /** Registers this tooltip as the scope's active one, before the overlay exists. */\r\n claimActive(): void;\r\n /** A primary press outside the pane asks the caller to close. */\r\n onOutsidePress(trigger: RaqmTooltipTriggerRef): void;\r\n /** Escape while the pane is visible asks the caller to close. */\r\n onEscape(trigger: RaqmTooltipTriggerRef): void;\r\n /** The CDK detached the pane, so the caller syncs its own state. */\r\n onDetached(overlayRef: OverlayRef): void;\r\n}\r\n\r\nexport class RaqmTooltipPane {\r\n readonly open: WritableSignal<boolean> = signal(false);\r\n readonly tooltipId: WritableSignal<string | null> = signal(null);\r\n readonly closing: WritableSignal<boolean> = signal(false);\r\n\r\n // Minted once per root and exposed only while the content exists.\r\n private readonly rootId = nextTooltipRootId();\r\n\r\n private overlayRef: OverlayRef | undefined;\r\n\r\n // Bumped per open and on destroy, so a queued after-render pass cannot reveal a dead pane.\r\n private generation = 0;\r\n\r\n private exitTimer: ReturnType<typeof setTimeout> | undefined;\r\n\r\n private pendingDisposeOverlay: OverlayRef | undefined;\r\n\r\n // The overlay subscriptions, all torn down on every close/detach/destroy path.\r\n private detachSubscription: { unsubscribe(): void } | undefined;\r\n private outsideSubscription: { unsubscribe(): void } | undefined;\r\n private viewportSubscription: { unsubscribe(): void } | undefined;\r\n private scrollSubscription: { unsubscribe(): void } | undefined;\r\n\r\n private escapeListener: ((event: KeyboardEvent) => void) | undefined;\r\n\r\n constructor(\r\n private readonly overlay: Overlay,\r\n private readonly viewportRuler: ViewportRuler,\r\n private readonly scrollDispatcher: ScrollDispatcher,\r\n private readonly document: Document,\r\n private readonly viewContainerRef: ViewContainerRef,\r\n private readonly position: RaqmTooltipPosition,\r\n private readonly host: RaqmTooltipPaneHost,\r\n ) {}\r\n\r\n get hasPane(): boolean {\r\n return this.overlayRef !== undefined;\r\n }\r\n\r\n get ref(): OverlayRef | undefined {\r\n return this.overlayRef;\r\n }\r\n\r\n owns(overlayRef: OverlayRef): boolean {\r\n return this.overlayRef === overlayRef;\r\n }\r\n\r\n /** Creates and attaches the one overlay for a fresh open. */\r\n openLayer(trigger: RaqmTooltipTriggerRef, panel: TemplateRef<unknown>): void {\r\n const generation = ++this.generation;\r\n const preferred = this.position.beginPlacement();\r\n\r\n // Register before the overlay exists, so two surfaces are never visible at once.\r\n this.host.claimActive();\r\n\r\n const strategy = this.position.buildStrategy(trigger.element, preferred);\r\n const config: OverlayConfig = {\r\n positionStrategy: strategy,\r\n // Descriptive and nonmodal: no backdrop, scroll lock, focus trap or role.\r\n hasBackdrop: false,\r\n scrollStrategy: this.overlay.scrollStrategies.noop(),\r\n panelClass: [PANE_CLASS],\r\n disposeOnNavigation: true,\r\n direction: this.position.direction,\r\n };\r\n const overlayRef = this.overlay.create(config);\r\n registerOverlayOwnership(trigger.element, overlayRef);\r\n this.overlayRef = overlayRef;\r\n this.position.watchSide(strategy, overlayRef);\r\n // A primary press anywhere outside the content dismisses the tooltip.\r\n this.outsideSubscription = overlayRef.outsidePointerEvents().subscribe((event) => {\r\n if (event.button === 0) {\r\n this.host.onOutsidePress(trigger);\r\n }\r\n });\r\n this.detachSubscription = overlayRef\r\n .detachments()\r\n .subscribe(() => this.host.onDetached(overlayRef));\r\n this.viewportSubscription = this.viewportRuler\r\n .change(0)\r\n .subscribe(() => this.position.reposition());\r\n this.scrollSubscription = this.scrollDispatcher\r\n .ancestorScrolled(trigger.element, 0)\r\n .subscribe(() => this.position.reposition());\r\n // Escape while a hover-opened tooltip is visible (focus elsewhere) still dismisses it.\r\n this.escapeListener = (event: KeyboardEvent) => {\r\n if (event.key !== 'Escape' || !this.open()) {\r\n return;\r\n }\r\n this.host.onEscape(trigger);\r\n };\r\n this.document.addEventListener('keydown', this.escapeListener);\r\n\r\n overlayRef.attach(new TemplatePortal(panel, this.viewContainerRef));\r\n // Hidden until the after-render placement pass, so it never paints at the CDK origin.\r\n overlayRef.overlayElement.style.visibility = 'hidden';\r\n overlayRef.overlayElement.style.pointerEvents = 'none';\r\n this.open.set(true);\r\n this.tooltipId.set(this.rootId);\r\n this.position.attachResizeObserver(trigger.element, overlayRef);\r\n\r\n afterNextRender(\r\n () => {\r\n if (generation !== this.generation || this.overlayRef !== overlayRef) {\r\n return;\r\n }\r\n this.position.reposition();\r\n this.reveal(overlayRef);\r\n },\r\n { injector: this.host.injector },\r\n );\r\n }\r\n\r\n /** Repositions the live pane; a closed tooltip is a no-op. */\r\n reposition(): void {\r\n this.position.reposition();\r\n }\r\n\r\n /** Drops the pane reference and its strategy; the element is the caller's to dispose. */\r\n releaseOwnership(): void {\r\n this.overlayRef = undefined;\r\n this.position.discard();\r\n }\r\n\r\n /** Blocks a queued after-render reveal for a pane that is going away. */\r\n invalidate(): void {\r\n this.generation += 1;\r\n }\r\n\r\n // Tears down now when requested or under reduced motion, else after the exit transition.\r\n disposePane(immediate: boolean): void {\r\n const overlayRef = this.overlayRef;\r\n this.overlayRef = undefined;\r\n this.position.reset();\r\n this.releaseSubscriptions();\r\n if (!overlayRef) {\r\n this.closing.set(false);\r\n return;\r\n }\r\n // Inert and aria-hidden before disposal: not clickable or announced while it fades.\r\n overlayRef.overlayElement.setAttribute('inert', '');\r\n overlayRef.overlayElement.setAttribute('aria-hidden', 'true');\r\n if (immediate || prefersReducedMotion()) {\r\n this.closing.set(false);\r\n overlayRef.dispose();\r\n return;\r\n }\r\n const surface = overlayRef.overlayElement.querySelector<HTMLElement>(`.${CONTENT_CLASS}`);\r\n surface?.classList.remove(CONTENT_ENTERING_CLASS);\r\n surface?.classList.add(CONTENT_CLOSING_CLASS);\r\n this.closing.set(true);\r\n this.pendingDisposeOverlay = overlayRef;\r\n this.exitTimer = setTimeout(() => {\r\n this.exitTimer = undefined;\r\n this.pendingDisposeOverlay = undefined;\r\n this.closing.set(false);\r\n overlayRef.dispose();\r\n }, EXIT_ANIMATION_MS);\r\n }\r\n\r\n flushPendingDispose(): void {\r\n if (this.exitTimer !== undefined) {\r\n clearTimeout(this.exitTimer);\r\n this.exitTimer = undefined;\r\n }\r\n this.closing.set(false);\r\n const pending = this.pendingDisposeOverlay;\r\n this.pendingDisposeOverlay = undefined;\r\n pending?.dispose();\r\n }\r\n\r\n private reveal(overlayRef: OverlayRef): void {\r\n const surface = overlayRef.overlayElement.querySelector<HTMLElement>(`.${CONTENT_CLASS}`);\r\n if (!surface || this.overlayRef !== overlayRef) {\r\n return;\r\n }\r\n surface.classList.remove(CONTENT_CLOSING_CLASS);\r\n surface.classList.add(CONTENT_ENTERING_CLASS);\r\n overlayRef.overlayElement.style.pointerEvents = '';\r\n overlayRef.overlayElement.style.visibility = '';\r\n }\r\n\r\n /** Clears the exit timer and hands over the panes a destroy pass still has to dispose. */\r\n takeForDestroy(): { pending: OverlayRef | undefined; overlay: OverlayRef | undefined } {\r\n if (this.exitTimer !== undefined) {\r\n clearTimeout(this.exitTimer);\r\n this.exitTimer = undefined;\r\n }\r\n const pending = this.pendingDisposeOverlay;\r\n this.pendingDisposeOverlay = undefined;\r\n const overlayRef = this.overlayRef;\r\n this.overlayRef = undefined;\r\n this.position.discard();\r\n this.closing.set(false);\r\n this.open.set(false);\r\n this.tooltipId.set(null);\r\n return { pending, overlay: overlayRef };\r\n }\r\n\r\n // Safe to call repeatedly; never disposes an overlay itself.\r\n releaseSubscriptions(): void {\r\n this.position.releaseSide();\r\n this.detachSubscription?.unsubscribe();\r\n this.detachSubscription = undefined;\r\n this.outsideSubscription?.unsubscribe();\r\n this.outsideSubscription = undefined;\r\n this.viewportSubscription?.unsubscribe();\r\n this.viewportSubscription = undefined;\r\n this.scrollSubscription?.unsubscribe();\r\n this.scrollSubscription = undefined;\r\n this.position.releaseResizeObserver();\r\n if (this.escapeListener !== undefined) {\r\n this.document.removeEventListener('keydown', this.escapeListener);\r\n this.escapeListener = undefined;\r\n }\r\n }\r\n}\r\n","// Tooltip positioning: direction, physical sides, the CDK strategy, the arrow and resize.\r\n\r\nimport { signal } from '@angular/core';\r\n\r\nimport { Directionality } from '@angular/cdk/bidi';\r\nimport {\r\n ConnectedPosition,\r\n FlexibleConnectedPositionStrategy,\r\n Overlay,\r\n OverlayRef,\r\n} from '@angular/cdk/overlay';\r\n\r\nimport {\r\n CONTENT_CLASS,\r\n RaqmTooltipAlign,\r\n RaqmTooltipPhysicalSide,\r\n RaqmTooltipSide,\r\n VIEWPORT_MARGIN,\r\n} from './tooltip-model';\r\n\r\nexport interface RaqmTooltipPositionHost {\r\n /** The root element; its computed direction is read before the CDK Bidi value. */\r\n readonly element: HTMLElement;\r\n /** Optional Bidi service; the computed direction wins so a CSS-only `dir` ancestor works. */\r\n readonly directionality: Directionality | null;\r\n side(): RaqmTooltipSide;\r\n align(): RaqmTooltipAlign;\r\n sideOffset(): number;\r\n alignOffset(): number;\r\n dir(): 'ltr' | 'rtl' | undefined;\r\n /** The trigger element the pane is anchored to. */\r\n anchor(): HTMLElement | null;\r\n /** The live pane, while one exists. */\r\n pane(): OverlayRef | undefined;\r\n}\r\n\r\n// The surface's layout box in viewport coordinates; a transform on it (the enter/exit\r\n// scale) is excluded, since it would skew the measured arrow centre.\r\nfunction layoutBox(element: HTMLElement): {\r\n left: number;\r\n top: number;\r\n width: number;\r\n height: number;\r\n} {\r\n const parent = element.offsetParent as HTMLElement | null;\r\n if (!parent) {\r\n const rect = element.getBoundingClientRect();\r\n return { left: rect.left, top: rect.top, width: rect.width, height: rect.height };\r\n }\r\n const parentRect = parent.getBoundingClientRect();\r\n return {\r\n left: parentRect.left + parent.clientLeft + element.offsetLeft,\r\n top: parentRect.top + parent.clientTop + element.offsetTop,\r\n width: element.offsetWidth,\r\n height: element.offsetHeight,\r\n };\r\n}\r\n\r\nexport class RaqmTooltipPosition {\r\n readonly panelDir = signal<'ltr' | 'rtl'>('ltr');\r\n readonly resolvedSide = signal<RaqmTooltipPhysicalSide>('top');\r\n\r\n private positionStrategy: FlexibleConnectedPositionStrategy | undefined;\r\n\r\n private currentPositions: ConnectedPosition[] = [];\r\n private currentSides: RaqmTooltipPhysicalSide[] = [];\r\n\r\n private currentAppliedSide: RaqmTooltipPhysicalSide = 'top';\r\n\r\n private currentDir: 'ltr' | 'rtl' = 'ltr';\r\n\r\n // Torn down on every close/detach/destroy path.\r\n private sideSubscription: { unsubscribe(): void } | undefined;\r\n\r\n private resizeObserver: ResizeObserver | undefined;\r\n\r\n constructor(\r\n private readonly overlay: Overlay,\r\n private readonly host: RaqmTooltipPositionHost,\r\n ) {}\r\n\r\n /** The direction the open pane was placed with. */\r\n get direction(): 'ltr' | 'rtl' {\r\n return this.currentDir;\r\n }\r\n\r\n /** Resolves direction and the preferred side; both seed the arrow and motion state. */\r\n beginPlacement(): RaqmTooltipPhysicalSide {\r\n const dir = this.readResolvedDir();\r\n this.currentDir = dir;\r\n this.panelDir.set(dir);\r\n const preferred = this.resolvePhysicalSide(this.host.side());\r\n this.currentAppliedSide = preferred;\r\n this.resolvedSide.set(preferred);\r\n return preferred;\r\n }\r\n\r\n // Seeded with the preferred and opposite side, so attach always has a position.\r\n buildStrategy(\r\n origin: HTMLElement,\r\n preferred: RaqmTooltipPhysicalSide,\r\n ): FlexibleConnectedPositionStrategy {\r\n const strategy = this.overlay.position().flexibleConnectedTo(origin);\r\n strategy\r\n .withFlexibleDimensions(false)\r\n .withGrowAfterOpen(false)\r\n .withPush(true)\r\n .withViewportMargin(VIEWPORT_MARGIN);\r\n this.setPositions(strategy, [preferred, this.oppositeSide(preferred)]);\r\n this.positionStrategy = strategy;\r\n return strategy;\r\n }\r\n\r\n reposition(): void {\r\n const overlayRef = this.host.pane();\r\n const strategy = this.positionStrategy;\r\n if (!overlayRef || !strategy) {\r\n return;\r\n }\r\n const dir = this.readResolvedDir();\r\n if (dir !== this.currentDir) {\r\n this.currentDir = dir;\r\n this.panelDir.set(dir);\r\n overlayRef.setDirection(dir);\r\n }\r\n const preferred = this.resolvePhysicalSide(this.host.side());\r\n this.setPositions(strategy, [preferred, this.oppositeSide(preferred)]);\r\n overlayRef.updatePosition();\r\n this.positionArrow(this.currentAppliedSide);\r\n }\r\n\r\n // Arrow and enter motion follow a collision flip rather than the preferred side.\r\n watchSide(strategy: FlexibleConnectedPositionStrategy, overlayRef: OverlayRef): void {\r\n this.sideSubscription = strategy.positionChanges.subscribe((change) => {\r\n const index = this.currentPositions.indexOf(change.connectionPair);\r\n const side = this.currentSides[index] ?? this.currentSides[0] ?? this.resolvedSide();\r\n this.currentAppliedSide = side;\r\n this.resolvedSide.set(side);\r\n const surface = overlayRef.overlayElement.querySelector<HTMLElement>(`.${CONTENT_CLASS}`);\r\n surface?.setAttribute('data-raqm-side', side);\r\n this.positionArrow(side, surface ?? undefined);\r\n });\r\n }\r\n\r\n // Keeps the index -> side map in step, so a collision fallback maps back.\r\n private setPositions(\r\n strategy: FlexibleConnectedPositionStrategy,\r\n sides: readonly RaqmTooltipPhysicalSide[],\r\n ): void {\r\n this.currentSides = [...sides];\r\n this.currentPositions = sides.map((side) => this.buildPositionFor(side));\r\n strategy.withPositions(this.currentPositions);\r\n }\r\n\r\n // The single position for one physical side; offsets are signed outward from the\r\n // trigger, with logical start/end resolved for horizontal sides.\r\n private buildPositionFor(side: RaqmTooltipPhysicalSide): ConnectedPosition {\r\n const align = this.host.align();\r\n const x = align;\r\n const y = this.toVerticalAlign(align);\r\n const mainOffset = this.signedSideOffset(side);\r\n switch (side) {\r\n case 'bottom':\r\n return {\r\n originX: x,\r\n originY: 'bottom',\r\n overlayX: x,\r\n overlayY: 'top',\r\n offsetX: this.host.alignOffset(),\r\n offsetY: mainOffset,\r\n };\r\n case 'left':\r\n return this.horizontalPosition('left', y, mainOffset);\r\n case 'right':\r\n return this.horizontalPosition('right', y, mainOffset);\r\n case 'top':\r\n default:\r\n return {\r\n originX: x,\r\n originY: 'top',\r\n overlayX: x,\r\n overlayY: 'bottom',\r\n offsetX: this.host.alignOffset(),\r\n offsetY: mainOffset,\r\n };\r\n }\r\n }\r\n\r\n // Direction-aware on the inline axis; the alignment offset applies vertically.\r\n private horizontalPosition(\r\n side: 'left' | 'right',\r\n alignY: 'top' | 'center' | 'bottom',\r\n offsetX: number,\r\n ): ConnectedPosition {\r\n const rtl = this.currentDir === 'rtl';\r\n const originX = side === 'right' ? (rtl ? 'start' : 'end') : rtl ? 'end' : 'start';\r\n const overlayX = side === 'right' ? (rtl ? 'end' : 'start') : rtl ? 'start' : 'end';\r\n return {\r\n originX,\r\n originY: alignY,\r\n overlayX,\r\n overlayY: alignY,\r\n offsetX,\r\n offsetY: this.host.alignOffset(),\r\n };\r\n }\r\n\r\n private signedSideOffset(side: RaqmTooltipPhysicalSide): number {\r\n return side === 'bottom' || side === 'right' ? this.host.sideOffset() : -this.host.sideOffset();\r\n }\r\n\r\n private toVerticalAlign(align: RaqmTooltipAlign): 'top' | 'center' | 'bottom' {\r\n return align === 'start' ? 'top' : align === 'end' ? 'bottom' : 'center';\r\n }\r\n\r\n // Physical sides pass through; logical sides resolve against the live direction.\r\n private resolvePhysicalSide(side: RaqmTooltipSide): RaqmTooltipPhysicalSide {\r\n switch (side) {\r\n case 'inline-start':\r\n return this.currentDir === 'rtl' ? 'right' : 'left';\r\n case 'inline-end':\r\n return this.currentDir === 'rtl' ? 'left' : 'right';\r\n default:\r\n return side;\r\n }\r\n }\r\n\r\n // The opposite physical side, used as the collision fallback.\r\n private oppositeSide(side: RaqmTooltipPhysicalSide): RaqmTooltipPhysicalSide {\r\n switch (side) {\r\n case 'top':\r\n return 'bottom';\r\n case 'bottom':\r\n return 'top';\r\n case 'left':\r\n return 'right';\r\n default:\r\n return 'left';\r\n }\r\n }\r\n\r\n // Centers the arrow on the trigger, clamped inside the rounded corners via a CSS var.\r\n private positionArrow(side: RaqmTooltipPhysicalSide, surface?: HTMLElement): void {\r\n const content =\r\n surface ?? this.host.pane()?.overlayElement.querySelector<HTMLElement>(`.${CONTENT_CLASS}`);\r\n const trigger = this.host.anchor();\r\n if (!content || !trigger) {\r\n return;\r\n }\r\n // The enter/exit animation scales the surface, so its layout box is measured.\r\n const contentRect = layoutBox(content);\r\n const triggerRect = trigger.getBoundingClientRect();\r\n const vertical = side === 'top' || side === 'bottom';\r\n const size = vertical ? contentRect.width : contentRect.height;\r\n const center = vertical\r\n ? triggerRect.left + triggerRect.width / 2 - contentRect.left\r\n : triggerRect.top + triggerRect.height / 2 - contentRect.top;\r\n if (size <= 0) {\r\n return;\r\n }\r\n const edge = Math.min(12, size / 2);\r\n const offset = Math.max(edge, Math.min(center, size - edge));\r\n content.style.setProperty('--raqm-tooltip-arrow-offset', `${offset}px`);\r\n }\r\n\r\n // Explicit input first, then the computed direction, then the CDK Bidi value.\r\n private readResolvedDir(): 'ltr' | 'rtl' {\r\n const explicit = this.host.dir();\r\n if (explicit === 'ltr' || explicit === 'rtl') {\r\n return explicit;\r\n }\r\n const computedStyle = getComputedStyle(this.host.element).direction;\r\n if (computedStyle === 'rtl') {\r\n return 'rtl';\r\n }\r\n if (computedStyle === 'ltr') {\r\n return 'ltr';\r\n }\r\n return this.host.directionality?.value ?? 'ltr';\r\n }\r\n\r\n // Observes trigger/content size changes while open; one bounded reposition each.\r\n attachResizeObserver(trigger: HTMLElement, overlayRef: OverlayRef): void {\r\n if (typeof ResizeObserver === 'undefined') {\r\n return;\r\n }\r\n this.resizeObserver?.disconnect();\r\n const observer = new ResizeObserver(() => {\r\n if (this.host.pane() === overlayRef) {\r\n this.reposition();\r\n }\r\n });\r\n this.resizeObserver = observer;\r\n observer.observe(trigger);\r\n const surface = overlayRef.overlayElement.querySelector<HTMLElement>(`.${CONTENT_CLASS}`);\r\n if (surface) {\r\n observer.observe(surface);\r\n }\r\n }\r\n\r\n releaseSide(): void {\r\n this.sideSubscription?.unsubscribe();\r\n this.sideSubscription = undefined;\r\n }\r\n\r\n releaseResizeObserver(): void {\r\n if (this.resizeObserver !== undefined) {\r\n this.resizeObserver.disconnect();\r\n this.resizeObserver = undefined;\r\n }\r\n }\r\n\r\n // A closed pane drops the strategy and the position/arrow map together.\r\n reset(): void {\r\n this.positionStrategy = undefined;\r\n this.currentPositions = [];\r\n this.currentSides = [];\r\n }\r\n\r\n // A detached or destroyed pane drops the strategy; the map is cleared separately.\r\n discard(): void {\r\n this.positionStrategy = undefined;\r\n }\r\n\r\n clear(): void {\r\n this.currentPositions = [];\r\n this.currentSides = [];\r\n }\r\n}\r\n","// Tooltip slots: the single trigger and the single content template, with their guards.\r\n\r\nimport { TemplateRef, computed, isDevMode, signal } from '@angular/core';\r\n\r\nimport { RaqmTooltipTriggerRef } from './tooltip-context';\r\n\r\nexport interface RaqmTooltipSlotHost {\r\n /** The panel template; without it an open has nothing to attach. */\r\n panel(): TemplateRef<unknown> | undefined;\r\n /** A registration changed, so a pending open may now be possible. */\r\n onChanged(): void;\r\n /** A registered slot went away; an open tooltip is closed rather than orphaned. */\r\n onLost(): void;\r\n}\r\n\r\nexport class RaqmTooltipSlot {\r\n private readonly triggerRef = signal<RaqmTooltipTriggerRef | null>(null);\r\n\r\n /** Template-facing: the consumer content, or `null` before it registers. */\r\n readonly contentTemplate = signal<TemplateRef<unknown> | null>(null);\r\n\r\n /** Whether every slot an open needs is registered. */\r\n readonly canOpen = computed(\r\n () =>\r\n this.triggerRef() !== null &&\r\n this.contentTemplate() !== null &&\r\n this.host.panel() !== undefined,\r\n );\r\n\r\n constructor(\r\n private readonly document: Document,\r\n private readonly host: RaqmTooltipSlotHost,\r\n ) {}\r\n\r\n trigger(): RaqmTooltipTriggerRef | null {\r\n return this.triggerRef();\r\n }\r\n\r\n content(): TemplateRef<unknown> | null {\r\n return this.contentTemplate();\r\n }\r\n\r\n registerTrigger(ref: RaqmTooltipTriggerRef): void {\r\n const current = this.triggerRef();\r\n if (current !== null && current !== ref) {\r\n if (isDevMode()) {\r\n console.error(\r\n '[raqm-tooltip] Only one `[raqm-tooltip-trigger]` is supported per <raqm-tooltip>; the extra trigger is ignored.',\r\n );\r\n }\r\n return;\r\n }\r\n this.triggerRef.set(ref);\r\n this.host.onChanged();\r\n }\r\n\r\n /** Unregisters the trigger; an open tooltip is closed rather than orphaned. */\r\n unregisterTrigger(ref: RaqmTooltipTriggerRef): void {\r\n if (this.triggerRef() !== ref) {\r\n return;\r\n }\r\n this.triggerRef.set(null);\r\n this.host.onLost();\r\n }\r\n\r\n registerContent(template: TemplateRef<unknown>): void {\r\n const current = this.contentTemplate();\r\n if (current !== null && current !== template) {\r\n if (isDevMode()) {\r\n console.error(\r\n '[raqm-tooltip] Only one `ng-template[raqm-tooltip-content]` is supported per <raqm-tooltip>; the extra template is ignored.',\r\n );\r\n }\r\n return;\r\n }\r\n this.contentTemplate.set(template);\r\n this.host.onChanged();\r\n }\r\n\r\n /** Unregisters the content template; an open tooltip is closed rather than orphaned. */\r\n unregisterContent(template: TemplateRef<unknown>): void {\r\n if (this.contentTemplate() !== template) {\r\n return;\r\n }\r\n this.contentTemplate.set(null);\r\n this.host.onLost();\r\n }\r\n\r\n isTriggerFocused(): boolean {\r\n const trigger = this.triggerRef();\r\n return trigger !== null && this.document.activeElement === trigger.element;\r\n }\r\n}\r\n","// Tooltip timers: the provider hover-open delay, the hover gap and the pending-open Escape.\r\n\r\nimport { RaqmTooltipOpenReason, RaqmTooltipTriggerRef } from './tooltip-context';\r\nimport { HOVER_GAP_MS } from './tooltip-model';\r\n\r\nexport interface RaqmTooltipTimersHost {\r\n open(): boolean;\r\n openReason(): RaqmTooltipOpenReason;\r\n destroyed(): boolean;\r\n trigger(): RaqmTooltipTriggerRef | null;\r\n /** The hover delay elapsed; the caller re-checks its open policy. */\r\n onOpenElapsed(): void;\r\n /** The hover gap elapsed for a still-open tooltip; the caller closes it. */\r\n onHoverElapsed(): void;\r\n /** Escape during a pending delay, or while the pane is visible. */\r\n onEscape(trigger: RaqmTooltipTriggerRef): void;\r\n}\r\n\r\nexport class RaqmTooltipTimers {\r\n private openTimer: ReturnType<typeof setTimeout> | undefined;\r\n private hoverCloseTimer: ReturnType<typeof setTimeout> | undefined;\r\n\r\n // Armed only while a delayed hover open is pending; dismissible without trigger focus.\r\n private pendingEscapeListener: ((event: KeyboardEvent) => void) | undefined;\r\n\r\n constructor(\r\n private readonly document: Document,\r\n private readonly host: RaqmTooltipTimersHost,\r\n ) {}\r\n\r\n /** Arms the one pending hover-open delay, and its pending-open Escape listener. */\r\n armOpen(delay: number): void {\r\n this.openTimer = setTimeout(() => {\r\n this.openTimer = undefined;\r\n this.removePendingEscape();\r\n this.host.onOpenElapsed();\r\n }, delay);\r\n // Escape can dismiss the pending hover interaction before any overlay exists.\r\n this.armPendingEscape();\r\n }\r\n\r\n /** Cancels the one pending hover-open delay and its pending Escape listener. */\r\n cancelOpen(): void {\r\n if (this.openTimer !== undefined) {\r\n clearTimeout(this.openTimer);\r\n this.openTimer = undefined;\r\n }\r\n this.removePendingEscape();\r\n }\r\n\r\n cancelHoverClose(): void {\r\n if (this.hoverCloseTimer !== undefined) {\r\n clearTimeout(this.hoverCloseTimer);\r\n this.hoverCloseTimer = undefined;\r\n }\r\n }\r\n\r\n scheduleHoverClose(): void {\r\n if (\r\n !this.host.open() ||\r\n this.host.openReason() === 'focus' ||\r\n this.hoverCloseTimer !== undefined\r\n ) {\r\n return;\r\n }\r\n this.hoverCloseTimer = setTimeout(() => {\r\n this.hoverCloseTimer = undefined;\r\n if (!this.host.destroyed() && this.host.open()) {\r\n this.host.onHoverElapsed();\r\n }\r\n }, HOVER_GAP_MS);\r\n }\r\n\r\n /** Removes only the pending-open Escape listener; the hover-open delay is untouched. */\r\n removePendingEscape(): void {\r\n if (this.pendingEscapeListener !== undefined) {\r\n this.document.removeEventListener('keydown', this.pendingEscapeListener);\r\n this.pendingEscapeListener = undefined;\r\n }\r\n }\r\n\r\n // Dismissible while pending, even when focus is not on the trigger.\r\n private armPendingEscape(): void {\r\n this.removePendingEscape();\r\n const trigger = this.host.trigger();\r\n if (trigger === null) {\r\n return;\r\n }\r\n this.pendingEscapeListener = (event: KeyboardEvent) => {\r\n if (event.key !== 'Escape') {\r\n return;\r\n }\r\n this.host.onEscape(trigger);\r\n };\r\n this.document.addEventListener('keydown', this.pendingEscapeListener);\r\n }\r\n}\r\n","import { DOCUMENT, NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n Injector,\r\n OnDestroy,\r\n TemplateRef,\r\n ViewContainerRef,\r\n booleanAttribute,\r\n computed,\r\n effect,\r\n inject,\r\n input,\r\n untracked,\r\n viewChild,\r\n} from '@angular/core';\r\n\r\nimport { Directionality } from '@angular/cdk/bidi';\r\nimport { Overlay } from '@angular/cdk/overlay';\r\nimport { ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';\r\n\r\nimport {\r\n RAQM_TOOLTIP,\r\n RAQM_TOOLTIP_PROVIDER,\r\n RaqmTooltipContext,\r\n RaqmTooltipOpenReason,\r\n RaqmTooltipTriggerRef,\r\n} from './tooltip-context';\r\nimport { RaqmTooltipLifecycle } from './tooltip-lifecycle';\r\nimport {\r\n DEFAULT_ALIGN,\r\n DEFAULT_ALIGN_OFFSET,\r\n DEFAULT_SIDE,\r\n DEFAULT_SIDE_OFFSET,\r\n RaqmTooltipAlign,\r\n RaqmTooltipSide,\r\n toAlign,\r\n toDir,\r\n toOffset,\r\n toSide,\r\n} from './tooltip-model';\r\nimport { RaqmTooltipPane } from './tooltip-pane';\r\nimport { RaqmTooltipPosition } from './tooltip-position';\r\nimport { RaqmTooltipSlot } from './tooltip-slot';\r\nimport { RaqmTooltipTimers } from './tooltip-timers';\r\n\r\nexport type { RaqmTooltipAlign, RaqmTooltipSide } from './tooltip-model';\r\n\r\n@Component({\r\n selector: 'raqm-tooltip',\r\n imports: [NgTemplateOutlet],\r\n templateUrl: './tooltip.html',\r\n styleUrl: './tooltip.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'raqmTooltip',\r\n providers: [\r\n // A dedicated token (not a component import) avoids a runtime module cycle.\r\n { provide: RAQM_TOOLTIP, useExisting: RaqmTooltipComponent },\r\n ],\r\n})\r\nexport class RaqmTooltipComponent implements RaqmTooltipContext, OnDestroy {\r\n // Read only for the live computed direction; the host renders no box of its own.\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\r\n\r\n private readonly overlay = inject(Overlay);\r\n\r\n private readonly viewContainerRef = inject(ViewContainerRef);\r\n\r\n private readonly injector = inject(Injector);\r\n\r\n // Optional Bidi service; the computed direction wins so a CSS-only `dir` ancestor works.\r\n private readonly directionality = inject(Directionality, { optional: true });\r\n\r\n private readonly viewportRuler = inject(ViewportRuler);\r\n\r\n private readonly scrollDispatcher = inject(ScrollDispatcher);\r\n\r\n private readonly document = inject(DOCUMENT);\r\n\r\n // Nearest provider (shared delay + single-active scope); without one the delay is 0.\r\n private readonly provider = inject(RAQM_TOOLTIP_PROVIDER, { optional: true });\r\n\r\n // An optional query so an interaction cannot throw while the view query is unresolved.\r\n private readonly panelTemplate = viewChild('panel', { read: TemplateRef });\r\n\r\n readonly disabled = input(false, { transform: booleanAttribute });\r\n\r\n readonly side = input<RaqmTooltipSide>(DEFAULT_SIDE, { transform: toSide });\r\n\r\n readonly align = input<RaqmTooltipAlign>(DEFAULT_ALIGN, {\r\n transform: toAlign,\r\n });\r\n\r\n readonly sideOffset = input(DEFAULT_SIDE_OFFSET, {\r\n transform: toOffset(DEFAULT_SIDE_OFFSET),\r\n });\r\n\r\n readonly alignOffset = input(DEFAULT_ALIGN_OFFSET, {\r\n transform: toOffset(DEFAULT_ALIGN_OFFSET),\r\n });\r\n\r\n readonly dir = input<'ltr' | 'rtl' | undefined>(undefined, {\r\n transform: toDir,\r\n });\r\n\r\n // Direction, physical side, the CDK strategy and the arrow.\r\n private readonly position: RaqmTooltipPosition = new RaqmTooltipPosition(this.overlay, {\r\n element: this.host.nativeElement,\r\n directionality: this.directionality,\r\n side: () => this.side(),\r\n align: () => this.align(),\r\n sideOffset: () => this.sideOffset(),\r\n alignOffset: () => this.alignOffset(),\r\n dir: () => this.dir(),\r\n anchor: () => this.slot.trigger()?.element ?? null,\r\n pane: () => this.pane.ref,\r\n });\r\n\r\n // The overlay pane, its subscriptions and the exit transition.\r\n private readonly pane: RaqmTooltipPane = new RaqmTooltipPane(\r\n this.overlay,\r\n this.viewportRuler,\r\n this.scrollDispatcher,\r\n this.document,\r\n this.viewContainerRef,\r\n this.position,\r\n {\r\n injector: this.injector,\r\n claimActive: () => this.lifecycle.claimActive(),\r\n onOutsidePress: (trigger) => this.lifecycle.requestClose(trigger, 'press'),\r\n onEscape: (trigger) => this.lifecycle.requestClose(trigger, 'escape'),\r\n onDetached: (overlayRef) => this.lifecycle.handleDetached(overlayRef),\r\n },\r\n );\r\n\r\n // The single trigger and the single content template, with their guards.\r\n private readonly slot: RaqmTooltipSlot = new RaqmTooltipSlot(this.document, {\r\n panel: () => this.panelTemplate(),\r\n onChanged: () => this.lifecycle.retryRequestedOpen(),\r\n onLost: () => this.lifecycle.closeForPeer(),\r\n });\r\n\r\n // The provider hover-open delay, the hover gap and the pending-open Escape listener.\r\n private readonly timers: RaqmTooltipTimers = new RaqmTooltipTimers(this.document, {\r\n open: () => this.open(),\r\n openReason: () => this.lifecycle.currentReason(),\r\n destroyed: () => this.destroyed,\r\n trigger: () => this.slot.trigger(),\r\n onOpenElapsed: () => this.lifecycle.onOpenElapsed(),\r\n onHoverElapsed: () => this.lifecycle.beginClose(false),\r\n onEscape: (trigger) => this.lifecycle.requestClose(trigger, 'escape'),\r\n });\r\n\r\n // The open/close policy, the provider claim and the pane hand-off.\r\n private readonly lifecycle: RaqmTooltipLifecycle = new RaqmTooltipLifecycle({\r\n pane: this.pane,\r\n position: this.position,\r\n slot: this.slot,\r\n timers: this.timers,\r\n provider: this.provider,\r\n disabled: () => this.disabled(),\r\n destroyed: () => this.destroyed,\r\n delay: () => this.delay(),\r\n panel: () => this.panelTemplate(),\r\n });\r\n\r\n // The hover delay from the nearest provider, or 0 without one.\r\n private readonly delay = computed(() => this.provider?.delay() ?? 0);\r\n\r\n private destroyed = false;\r\n\r\n readonly open = this.pane.open;\r\n\r\n readonly tooltipId = this.pane.tooltipId;\r\n\r\n private readonly contentTemplate = this.slot.contentTemplate;\r\n\r\n protected readonly panelDir = this.position.panelDir;\r\n\r\n protected readonly resolvedSide = this.position.resolvedSide;\r\n\r\n protected readonly closing = this.pane.closing;\r\n\r\n constructor() {\r\n // A root disabled while open closes immediately; a disabled root never opens.\r\n effect(() => {\r\n const disabled = this.disabled();\r\n untracked(() => {\r\n if (!disabled) {\r\n return;\r\n }\r\n this.lifecycle.closeNow();\r\n });\r\n });\r\n\r\n // A placement/offset/direction change while open repositions; closed it is a no-op.\r\n effect(() => {\r\n this.side();\r\n this.align();\r\n this.sideOffset();\r\n this.alignOffset();\r\n this.dir();\r\n untracked(() => this.applyPositionInputs());\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.destroyed = true;\r\n this.pane.invalidate();\r\n this.lifecycle.destroy();\r\n }\r\n\r\n registerTrigger(ref: RaqmTooltipTriggerRef): void {\r\n this.slot.registerTrigger(ref);\r\n }\r\n\r\n /** Unregisters the trigger; an open tooltip is closed rather than orphaned. */\r\n unregisterTrigger(ref: RaqmTooltipTriggerRef): void {\r\n this.slot.unregisterTrigger(ref);\r\n }\r\n\r\n registerContent(template: TemplateRef<unknown>): void {\r\n this.slot.registerContent(template);\r\n }\r\n\r\n /** Unregisters the content template; an open tooltip is closed rather than orphaned. */\r\n unregisterContent(template: TemplateRef<unknown>): void {\r\n this.slot.unregisterContent(template);\r\n }\r\n\r\n requestOpen(ref: RaqmTooltipTriggerRef, reason: RaqmTooltipOpenReason): void {\r\n this.lifecycle.requestOpen(ref, reason);\r\n }\r\n\r\n requestClose(ref: RaqmTooltipTriggerRef, reason: 'mouse' | 'focus' | 'press' | 'escape'): void {\r\n this.lifecycle.requestClose(ref, reason);\r\n }\r\n\r\n cancelHoverClose(): void {\r\n this.timers.cancelHoverClose();\r\n }\r\n\r\n scheduleHoverClose(): void {\r\n this.timers.scheduleHoverClose();\r\n }\r\n\r\n closeForPeer(): void {\r\n this.lifecycle.closeForPeer();\r\n }\r\n\r\n // The wrapper's own pointer events keep a hover tooltip open across the gap.\r\n\r\n protected onContentPointerEnter(event: PointerEvent): void {\r\n if (event.pointerType === 'mouse') {\r\n this.timers.cancelHoverClose();\r\n }\r\n }\r\n\r\n protected onContentPointerLeave(event: PointerEvent): void {\r\n if (event.pointerType === 'mouse') {\r\n this.timers.scheduleHoverClose();\r\n }\r\n }\r\n\r\n private applyPositionInputs(): void {\r\n if (this.pane.hasPane) {\r\n this.pane.reposition();\r\n }\r\n }\r\n}\r\n","<!-- One `button[raqm-tooltip-trigger]` (or passive span for a disabled button) plus one\r\n `ng-template[raqm-tooltip-content]`; the root never wraps or clones the trigger. -->\r\n<ng-content />\r\n\r\n<ng-template #panel>\r\n <div\r\n class=\"raqm-tooltip-content\"\r\n role=\"tooltip\"\r\n [attr.id]=\"tooltipId()\"\r\n [attr.dir]=\"panelDir()\"\r\n [attr.data-raqm-side]=\"resolvedSide()\"\r\n [class.raqm-tooltip-content--closing]=\"closing()\"\r\n (pointerenter)=\"onContentPointerEnter($event)\"\r\n (pointerleave)=\"onContentPointerLeave($event)\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"contentTemplate()\" />\r\n\r\n <!-- The decorative diamond arrow is inert and never part of the description. -->\r\n <span class=\"raqm-tooltip-arrow\" aria-hidden=\"true\"></span>\r\n </div>\r\n</ng-template>\r\n","import {\r\n DestroyRef,\r\n Directive,\r\n ElementRef,\r\n OnInit,\r\n Renderer2,\r\n TemplateRef,\r\n effect,\r\n inject,\r\n input,\r\n isDevMode,\r\n numberAttribute,\r\n untracked,\r\n} from '@angular/core';\r\n\r\nimport {\r\n RAQM_TOOLTIP,\r\n RAQM_TOOLTIP_PROVIDER,\r\n RaqmTooltipActive,\r\n RaqmTooltipContext,\r\n RaqmTooltipProviderContext,\r\n RaqmTooltipTriggerRef,\r\n} from './tooltip-context';\r\n\r\nfunction toDelay(value: unknown): number {\r\n const parsed = numberAttribute(value, 0);\r\n return Number.isFinite(parsed) && parsed > 0 ? parsed : 0;\r\n}\r\n\r\n@Directive({\r\n selector: '[raqm-tooltip-provider]',\r\n exportAs: 'raqmTooltipProvider',\r\n providers: [{ provide: RAQM_TOOLTIP_PROVIDER, useExisting: RaqmTooltipProviderDirective }],\r\n})\r\nexport class RaqmTooltipProviderDirective implements RaqmTooltipProviderContext {\r\n readonly delay = input(0, { transform: toDelay });\r\n\r\n // The one currently open tooltip inside this provider scope, or null.\r\n private active: RaqmTooltipActive | null = null;\r\n\r\n /** Registers a newly open tooltip, closing the previous active one in this scope. */\r\n registerActive(active: RaqmTooltipActive): void {\r\n if (this.active !== null && this.active !== active) {\r\n this.active.closeForPeer();\r\n }\r\n this.active = active;\r\n }\r\n\r\n /** Clears the active registration only when it still belongs to this tooltip. */\r\n clearActive(active: RaqmTooltipActive): void {\r\n if (this.active === active) {\r\n this.active = null;\r\n }\r\n }\r\n}\r\n\r\n@Directive({\r\n selector: 'button[raqm-tooltip-trigger], span[raqm-tooltip-trigger]',\r\n host: {\r\n class: 'raqm-tooltip-trigger',\r\n '(pointerenter)': 'onPointerEnter($event)',\r\n '(pointerleave)': 'onPointerLeave($event)',\r\n '(pointerdown)': 'onPointerDown($event)',\r\n '(focus)': 'onFocus()',\r\n '(blur)': 'onBlur()',\r\n '(keydown)': 'onKeydown($event)',\r\n '(click)': 'onClick()',\r\n },\r\n})\r\nexport class RaqmTooltipTriggerDirective implements OnInit {\r\n // Native host element; the selector guarantees a button or a span.\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\r\n\r\n // Optional, so a misplaced trigger reports rather than crashes.\r\n private readonly tooltip = inject<RaqmTooltipContext | null>(RAQM_TOOLTIP, {\r\n optional: true,\r\n });\r\n\r\n private readonly renderer = inject(Renderer2);\r\n\r\n private readonly destroyRef = inject(DestroyRef);\r\n\r\n private ownedToken: string | null = null;\r\n\r\n // Live getters keep the disabled state current.\r\n private readonly ref: RaqmTooltipTriggerRef = (() => {\r\n const self = this;\r\n return {\r\n get element(): HTMLElement {\r\n return self.host.nativeElement;\r\n },\r\n get disabled(): boolean {\r\n const element = self.host.nativeElement;\r\n return element instanceof HTMLButtonElement && element.disabled;\r\n },\r\n };\r\n })();\r\n\r\n constructor() {\r\n // Keep the host's aria-describedby in step with the root's live tooltip id.\r\n effect(() => {\r\n const token = this.tooltip?.open() ? this.tooltip.tooltipId() : null;\r\n untracked(() => this.syncDescribedBy(token));\r\n });\r\n\r\n // Default a native button's type to `button` so a trigger never submits its form.\r\n const element = this.host.nativeElement;\r\n if (element instanceof HTMLButtonElement && !element.hasAttribute('type')) {\r\n element.setAttribute('type', 'button');\r\n }\r\n\r\n if (isDevMode() && this.tooltip === null) {\r\n console.error(\r\n '[raqm-tooltip-trigger] No parent <raqm-tooltip> found; the trigger cannot show a tooltip.',\r\n );\r\n }\r\n\r\n this.destroyRef.onDestroy(() => {\r\n this.tooltip?.unregisterTrigger(this.ref);\r\n this.syncDescribedBy(null);\r\n });\r\n }\r\n\r\n /** Registers the trigger with the root once the directive is initialized. */\r\n ngOnInit(): void {\r\n this.tooltip?.registerTrigger(this.ref);\r\n }\r\n\r\n /** Opens on mouse hover only; touch/pen hover is deliberately ignored. */\r\n protected onPointerEnter(event: Event): void {\r\n const pointer = event as PointerEvent;\r\n if (pointer.pointerType !== 'mouse') {\r\n return;\r\n }\r\n this.tooltip?.requestOpen(this.ref, 'mouse');\r\n }\r\n\r\n /** Requests the bounded hover-gap close on mouse leave. */\r\n protected onPointerLeave(event: Event): void {\r\n const pointer = event as PointerEvent;\r\n if (pointer.pointerType !== 'mouse') {\r\n return;\r\n }\r\n this.tooltip?.requestClose(this.ref, 'mouse');\r\n }\r\n\r\n /** A primary press closes an open tooltip; touch presses are included. */\r\n protected onPointerDown(event: Event): void {\r\n const pointer = event as PointerEvent;\r\n if (pointer.button !== 0) {\r\n return;\r\n }\r\n this.tooltip?.requestClose(this.ref, 'press');\r\n }\r\n\r\n /** Native keyboard focus opens immediately (the root applies any suppression). */\r\n protected onFocus(): void {\r\n this.tooltip?.requestOpen(this.ref, 'focus');\r\n }\r\n\r\n /** Losing focus closes the tooltip and clears any focus suppression in the root. */\r\n protected onBlur(): void {\r\n this.tooltip?.requestClose(this.ref, 'focus');\r\n }\r\n\r\n /** Escape closes an open tooltip or dismisses a pending delayed open. */\r\n protected onKeydown(event: Event): void {\r\n const key = event as KeyboardEvent;\r\n if (key.key !== 'Escape' || this.tooltip === null) {\r\n return;\r\n }\r\n // Consume the key only while open; a pending delayed open closes via the policy.\r\n if (this.tooltip.open()) {\r\n key.preventDefault();\r\n key.stopPropagation();\r\n }\r\n this.tooltip.requestClose(this.ref, 'escape');\r\n }\r\n\r\n /** A native/assistive click (including Enter/Space) closes an open tooltip. */\r\n protected onClick(): void {\r\n if (this.tooltip?.open()) {\r\n this.tooltip.requestClose(this.ref, 'press');\r\n }\r\n }\r\n\r\n // Merges/removes only the owned id in the host's aria-describedby token list.\r\n private syncDescribedBy(nextToken: string | null): void {\r\n const element = this.host.nativeElement;\r\n const previous = this.ownedToken;\r\n if (previous === nextToken) {\r\n return;\r\n }\r\n const tokens = (element.getAttribute('aria-describedby') ?? '')\r\n .split(/\\s+/)\r\n .filter((token) => token.length > 0 && token !== previous);\r\n if (nextToken !== null && !tokens.includes(nextToken)) {\r\n tokens.push(nextToken);\r\n }\r\n if (tokens.length > 0) {\r\n this.renderer.setAttribute(element, 'aria-describedby', tokens.join(' '));\r\n } else {\r\n this.renderer.removeAttribute(element, 'aria-describedby');\r\n }\r\n this.ownedToken = nextToken;\r\n }\r\n}\r\n\r\n@Directive({\r\n selector: 'ng-template[raqm-tooltip-content]',\r\n exportAs: 'raqmTooltipContent',\r\n})\r\nexport class RaqmTooltipContentDirective implements OnInit {\r\n private readonly template = inject<TemplateRef<unknown>>(TemplateRef);\r\n\r\n // Optional, so a misplaced template reports instead of crashing.\r\n private readonly tooltip = inject<RaqmTooltipContext | null>(RAQM_TOOLTIP, {\r\n optional: true,\r\n });\r\n\r\n private readonly destroyRef = inject(DestroyRef);\r\n\r\n constructor() {\r\n if (isDevMode() && this.tooltip === null) {\r\n console.error(\r\n '[raqm-tooltip-content] No parent <raqm-tooltip> found; the content is never rendered.',\r\n );\r\n }\r\n this.destroyRef.onDestroy(() => this.tooltip?.unregisterContent(this.template));\r\n }\r\n\r\n /** Registers the content template with the root once initialized. */\r\n ngOnInit(): void {\r\n this.tooltip?.registerContent(this.template);\r\n }\r\n}\r\n","import { RaqmTooltipComponent } from './tooltip';\r\nimport {\r\n RaqmTooltipContentDirective,\r\n RaqmTooltipProviderDirective,\r\n RaqmTooltipTriggerDirective,\r\n} from './tooltip.directive';\r\n\r\nexport {\r\n RaqmTooltipComponent,\r\n RaqmTooltipContentDirective,\r\n RaqmTooltipProviderDirective,\r\n RaqmTooltipTriggerDirective,\r\n};\r\n// @internal Sidebar composition contract.\r\nexport type { RaqmTooltipTriggerRef } from './tooltip-context';\r\n\r\nexport const RaqmTooltip = [\r\n RaqmTooltipComponent,\r\n RaqmTooltipContentDirective,\r\n RaqmTooltipProviderDirective,\r\n RaqmTooltipTriggerDirective,\r\n] as const;\r\n"],"mappings":";;;;;;;;AAsDA,MAAa,eAAe,IAAI,eAAmC,aAAa;AAGhF,MAAa,wBAAwB,IAAI,eACvC,qBAAqB;AC1BvB,IAAa,uBAAb,MAAiC;CAWF;CATrB,gBAAgB;CAEhB,aAAoC;CAGpC,oBAAoB;CAEpB,qBAAqB;CAE7B,YAA6B,MAA8B;EAA9B,KAAA,OAAA;CAAiC;CAG9D,gBAAa;EACX,OAAO,KAAK;CACd;CAEA,YAAY,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AAY,MAClC,QAAQ,MACN,uFAAuF;EAG3F,KAAK,WAAW,gBAAgB,KAAK,SAAS,kBAAkB,KAAK,QAAQ,CAAC;CAChF;CAGA,WAAQ;EACN,KAAK,SAAS,gBAAgB,KAAK,QAAQ;CAC7C;CAtBW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAA2B,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAA3B,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAA2B,cAAA;EAAA,UAAA;EAAA,UAAA,CAAA,oBAAA;EAAA,UAAA;CAAA,CAAA;;AAA3B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA2B,YAAA,CAAA;EAJvC,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,UAAU;EACX,CAAA;;;;ACnMD,MAAa,cAAc;CACzB;CACA;CACA;CACA;AACQ"}
|
|
1
|
+
{"version":3,"file":"raqm-ui-tooltip.mjs","names":[],"sources":["../../../projects/ui/tooltip/tooltip-context.ts","../../../projects/ui/tooltip/tooltip-lifecycle.ts","../../../projects/ui/tooltip/tooltip-model.ts","../../../projects/ui/tooltip/tooltip-pane.ts","../../../projects/ui/tooltip/tooltip-position.ts","../../../projects/ui/tooltip/tooltip-slot.ts","../../../projects/ui/tooltip/tooltip-timers.ts","../../../projects/ui/tooltip/tooltip.ts","../../../projects/ui/tooltip/tooltip.html","../../../projects/ui/tooltip/tooltip.directive.ts","../../../projects/ui/tooltip/public-api.ts"],"sourcesContent":["import { InjectionToken, Signal, TemplateRef } from '@angular/core';\r\n\r\nexport interface RaqmTooltipTriggerRef {\r\n /** The native button or passive span the root anchors the tooltip to. */\r\n readonly element: HTMLElement;\r\n /** Live native disabled state, read by the root's open policy at event time. */\r\n readonly disabled: boolean;\r\n}\r\n\r\n/** The interaction that requested the tooltip open. */\r\nexport type RaqmTooltipOpenReason = 'mouse' | 'focus';\r\n\r\n/** The interaction that requested the tooltip close. */\r\nexport type RaqmTooltipCloseReason = 'mouse' | 'focus' | 'press' | 'escape';\r\n\r\nexport interface RaqmTooltipContext {\r\n /** Whether the tooltip is currently shown (enabled and attached). */\r\n readonly open: Signal<boolean>;\r\n /** The live content id while shown (the trigger's `aria-describedby` token), or `null`. */\r\n readonly tooltipId: Signal<string | null>;\r\n /** Registers the single trigger; called once per root. */\r\n registerTrigger(ref: RaqmTooltipTriggerRef): void;\r\n /** Unregisters the trigger on destroy; never changes open state. */\r\n unregisterTrigger(ref: RaqmTooltipTriggerRef): void;\r\n /** Registers the single content template; called once per root. */\r\n registerContent(template: TemplateRef<unknown>): void;\r\n /** Unregisters the content template on destroy. */\r\n unregisterContent(template: TemplateRef<unknown>): void;\r\n /** Requests opening from a hover or keyboard-focus interaction. */\r\n requestOpen(ref: RaqmTooltipTriggerRef, reason: RaqmTooltipOpenReason): void;\r\n /** Requests closing from a hover, blur, press or Escape interaction. */\r\n requestClose(ref: RaqmTooltipTriggerRef, reason: RaqmTooltipCloseReason): void;\r\n /** Cancels a pending hover-gap close when the pointer enters the content. */\r\n cancelHoverClose(): void;\r\n /** Schedules a bounded hover-gap close when the pointer leaves the content. */\r\n scheduleHoverClose(): void;\r\n}\r\n\r\n/** One open tooltip registered with a provider, so the provider keeps a single active one. */\r\nexport interface RaqmTooltipActive {\r\n /** Immediately closes this tooltip without an exit animation (peer opened). */\r\n closeForPeer(): void;\r\n}\r\n\r\nexport interface RaqmTooltipProviderContext {\r\n /** The hover-open delay in milliseconds applied to descendant tooltips. */\r\n readonly delay: Signal<number>;\r\n /** Registers a newly open tooltip and closes the previous active one. */\r\n registerActive(active: RaqmTooltipActive): void;\r\n /** Clears the active registration when a tooltip closes or is destroyed. */\r\n clearActive(active: RaqmTooltipActive): void;\r\n}\r\n\r\n/** Injection token for the parent Tooltip root; injected optionally, so a misplaced child reports rather than crashes. */\r\nexport const RAQM_TOOLTIP = new InjectionToken<RaqmTooltipContext>('RaqmTooltip');\r\n\r\n/** Injection token for the nearest Tooltip provider; without one a root uses a 0ms delay and has no sibling scope. */\r\nexport const RAQM_TOOLTIP_PROVIDER = new InjectionToken<RaqmTooltipProviderContext>(\r\n 'RaqmTooltipProvider',\r\n);\r\n","// Tooltip lifecycle: the open/close policy, provider claim and the pane hand-off.\r\n\r\nimport { TemplateRef } from '@angular/core';\r\n\r\nimport { OverlayRef } from '@angular/cdk/overlay';\r\n\r\nimport {\r\n RaqmTooltipActive,\r\n RaqmTooltipOpenReason,\r\n RaqmTooltipProviderContext,\r\n RaqmTooltipTriggerRef,\r\n} from './tooltip-context';\r\nimport { RaqmTooltipPane } from './tooltip-pane';\r\nimport { RaqmTooltipPosition } from './tooltip-position';\r\nimport { RaqmTooltipSlot } from './tooltip-slot';\r\nimport { RaqmTooltipTimers } from './tooltip-timers';\r\n\r\nexport interface RaqmTooltipLifecycleHost {\r\n readonly pane: RaqmTooltipPane;\r\n readonly position: RaqmTooltipPosition;\r\n readonly slot: RaqmTooltipSlot;\r\n readonly timers: RaqmTooltipTimers;\r\n /** Nearest provider (shared delay + single-active scope). */\r\n readonly provider: RaqmTooltipProviderContext | null;\r\n disabled(): boolean;\r\n destroyed(): boolean;\r\n /** The hover delay from the nearest provider, or 0 without one. */\r\n delay(): number;\r\n /** The panel template; an open has nothing to attach without it. */\r\n panel(): TemplateRef<unknown> | undefined;\r\n}\r\n\r\nexport class RaqmTooltipLifecycle implements RaqmTooltipActive {\r\n // Set while an open is requested, so a late trigger/content registration retries.\r\n private openRequested = false;\r\n\r\n private openReason: RaqmTooltipOpenReason = 'mouse';\r\n\r\n // Whether focus may open the tooltip; set by a press/Escape close and cleared on blur.\r\n private suppressFocusOpen = false;\r\n\r\n private providerRegistered = false;\r\n\r\n constructor(private readonly host: RaqmTooltipLifecycleHost) {}\r\n\r\n /** The interaction that requested the current open; hover closes are skipped for focus. */\r\n currentReason(): RaqmTooltipOpenReason {\r\n return this.openReason;\r\n }\r\n\r\n requestOpen(ref: RaqmTooltipTriggerRef, reason: RaqmTooltipOpenReason): void {\r\n if (ref !== this.host.slot.trigger()) {\r\n return;\r\n }\r\n // A live native disabled button never opens; a passive span around one stays allowed.\r\n if (this.host.disabled() || ref.disabled) {\r\n return;\r\n }\r\n if (reason === 'focus' && this.suppressFocusOpen) {\r\n return;\r\n }\r\n if (this.host.pane.open() || this.host.pane.hasPane) {\r\n // A re-entry cancels a pending hover close; only focus upgrades ownership.\r\n this.host.timers.cancelHoverClose();\r\n if (reason === 'focus') {\r\n this.openReason = 'focus';\r\n }\r\n return;\r\n }\r\n if (!this.host.slot.canOpen()) {\r\n this.openRequested = true;\r\n this.openReason = reason;\r\n return;\r\n }\r\n this.openRequested = true;\r\n this.openReason = reason;\r\n this.host.timers.cancelOpen();\r\n if (reason === 'focus') {\r\n this.host.timers.cancelHoverClose();\r\n this.beginOpen('focus');\r\n return;\r\n }\r\n const delay = this.host.delay();\r\n if (delay > 0) {\r\n this.host.timers.armOpen(delay);\r\n return;\r\n }\r\n this.beginOpen('mouse');\r\n }\r\n\r\n requestClose(ref: RaqmTooltipTriggerRef, reason: 'mouse' | 'focus' | 'press' | 'escape'): void {\r\n if (ref !== this.host.slot.trigger()) {\r\n return;\r\n }\r\n this.openRequested = false;\r\n this.host.timers.cancelOpen();\r\n if (reason === 'focus') {\r\n this.suppressFocusOpen = false;\r\n this.host.timers.cancelHoverClose();\r\n if (this.host.pane.open() || this.host.pane.hasPane) {\r\n this.beginClose(false);\r\n }\r\n return;\r\n }\r\n if (reason === 'mouse') {\r\n if (!this.host.pane.open()) {\r\n return;\r\n }\r\n if (this.openReason === 'focus' && this.host.slot.isTriggerFocused()) {\r\n return;\r\n }\r\n this.host.timers.scheduleHoverClose();\r\n return;\r\n }\r\n // Press/Escape suppresses the focus event that may follow, even with no surface yet.\r\n this.suppressFocusOpen = true;\r\n this.host.timers.cancelHoverClose();\r\n if (!this.host.pane.open()) {\r\n return;\r\n }\r\n this.beginClose(false);\r\n }\r\n\r\n // A disabled root drops any pending request and closes immediately; a peer take-over does the same.\r\n closeNow(): void {\r\n this.openRequested = false;\r\n this.host.timers.cancelOpen();\r\n this.host.timers.cancelHoverClose();\r\n if (this.host.pane.open() || this.host.pane.hasPane) {\r\n this.beginClose(true);\r\n }\r\n }\r\n\r\n closeForPeer(): void {\r\n this.closeNow();\r\n }\r\n\r\n /** Registers this tooltip as the scope's active one, before the overlay exists. */\r\n claimActive(): void {\r\n this.host.provider?.registerActive(this);\r\n this.providerRegistered = true;\r\n }\r\n\r\n // Retries a requested open if it was waiting for a late trigger/template.\r\n retryRequestedOpen(): void {\r\n if (!this.openRequested || this.host.destroyed() || this.host.pane.hasPane) {\r\n return;\r\n }\r\n if (!this.host.slot.canOpen()) {\r\n return;\r\n }\r\n this.beginOpen(this.openReason);\r\n }\r\n\r\n // Re-checks the open policy once the provider's hover delay has elapsed.\r\n onOpenElapsed(): void {\r\n const trigger = this.host.slot.trigger();\r\n if (this.openRequested && !this.host.destroyed() && trigger !== null) {\r\n if (trigger.disabled) {\r\n this.openRequested = false;\r\n return;\r\n }\r\n this.beginOpen('mouse');\r\n }\r\n }\r\n\r\n // The CDK detached the pane, so its subscriptions and the active claim go with it.\r\n handleDetached(overlayRef: OverlayRef): void {\r\n if (!this.host.pane.owns(overlayRef)) {\r\n return;\r\n }\r\n this.host.pane.releaseOwnership();\r\n this.openRequested = false;\r\n this.host.pane.open.set(false);\r\n this.host.pane.tooltipId.set(null);\r\n this.host.pane.closing.set(false);\r\n this.host.position.clear();\r\n this.host.timers.cancelOpen();\r\n this.host.timers.cancelHoverClose();\r\n this.clearProviderRegistration();\r\n this.host.pane.releaseSubscriptions();\r\n }\r\n\r\n /** Tears down every timer, subscription and pane the destroy pass still owns. */\r\n destroy(): void {\r\n this.openRequested = false;\r\n this.host.timers.cancelOpen();\r\n this.host.timers.cancelHoverClose();\r\n this.host.pane.releaseSubscriptions();\r\n const { pending, overlay } = this.host.pane.takeForDestroy();\r\n this.clearProviderRegistration();\r\n pending?.dispose();\r\n overlay?.dispose();\r\n }\r\n\r\n // Creates the one overlay for a fresh open; content is revealed after the next render.\r\n private beginOpen(reason: RaqmTooltipOpenReason): void {\r\n const trigger = this.host.slot.trigger();\r\n const content = this.host.slot.content();\r\n const panel = this.host.panel();\r\n if (\r\n this.host.destroyed() ||\r\n this.host.disabled() ||\r\n trigger === null ||\r\n trigger.disabled ||\r\n content === null ||\r\n panel === undefined ||\r\n this.host.pane.hasPane\r\n ) {\r\n return;\r\n }\r\n this.openRequested = true;\r\n this.openReason = reason;\r\n this.host.timers.removePendingEscape();\r\n this.host.pane.flushPendingDispose();\r\n this.host.timers.cancelHoverClose();\r\n this.host.pane.openLayer(trigger, panel);\r\n }\r\n\r\n // Tears down now when requested or under reduced motion, else after the exit transition.\r\n beginClose(immediate: boolean): void {\r\n this.openRequested = false;\r\n this.host.pane.open.set(false);\r\n this.host.pane.tooltipId.set(null);\r\n this.host.timers.cancelOpen();\r\n this.host.timers.cancelHoverClose();\r\n this.clearProviderRegistration();\r\n this.host.pane.disposePane(immediate);\r\n }\r\n\r\n private clearProviderRegistration(): void {\r\n if (this.providerRegistered) {\r\n this.host.provider?.clearActive(this);\r\n this.providerRegistered = false;\r\n }\r\n }\r\n}\r\n","// Tooltip model: accepted input values, defaults, durations and the root id mint.\r\n\r\nimport { numberAttribute } from '@angular/core';\r\n\r\nexport type RaqmTooltipSide = 'top' | 'bottom' | 'left' | 'right' | 'inline-start' | 'inline-end';\r\n\r\nexport type RaqmTooltipAlign = 'start' | 'center' | 'end';\r\n\r\n// A side after logical resolution; positions, arrow placement and motion all use it.\r\nexport type RaqmTooltipPhysicalSide = 'top' | 'bottom' | 'left' | 'right';\r\n\r\n// The accepted input values; anything else falls back to the default.\r\nconst SIDES: readonly RaqmTooltipSide[] = [\r\n 'top',\r\n 'bottom',\r\n 'left',\r\n 'right',\r\n 'inline-start',\r\n 'inline-end',\r\n];\r\nconst ALIGNS: readonly RaqmTooltipAlign[] = ['start', 'center', 'end'];\r\n\r\nexport const DEFAULT_SIDE: RaqmTooltipSide = 'top';\r\nexport const DEFAULT_ALIGN: RaqmTooltipAlign = 'center';\r\nexport const DEFAULT_SIDE_OFFSET = 4;\r\nexport const DEFAULT_ALIGN_OFFSET = 0;\r\n\r\n// 5px is the positioner's collision padding; the CDK gets the same margin.\r\nexport const VIEWPORT_MARGIN = 5;\r\n\r\nexport const EXIT_ANIMATION_MS = 150;\r\n\r\n// Grace for a pointer crossing the 4px trigger/content gap; not an animation duration.\r\nexport const HOVER_GAP_MS = 100;\r\n\r\n// The overlay pane class; the visual surface lives on `.raqm-tooltip-content`.\r\nexport const PANE_CLASS = 'raqm-tooltip-overlay-pane';\r\n\r\n// The library-owned classes this component toggles directly on the overlay nodes.\r\nexport const CONTENT_CLASS = 'raqm-tooltip-content';\r\nexport const CONTENT_ENTERING_CLASS = 'raqm-tooltip-content--entering';\r\nexport const CONTENT_CLOSING_CLASS = 'raqm-tooltip-content--closing';\r\n\r\nlet nextTooltipId = 0;\r\n\r\n// Minted once per root and exposed only while the content exists.\r\nexport function nextTooltipRootId(): string {\r\n return `raqm-tooltip-${++nextTooltipId}`;\r\n}\r\n\r\nexport function prefersReducedMotion(): boolean {\r\n return typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;\r\n}\r\n\r\nexport function toSide(value: unknown): RaqmTooltipSide {\r\n return SIDES.includes(value as RaqmTooltipSide) ? (value as RaqmTooltipSide) : DEFAULT_SIDE;\r\n}\r\n\r\nexport function toAlign(value: unknown): RaqmTooltipAlign {\r\n return ALIGNS.includes(value as RaqmTooltipAlign) ? (value as RaqmTooltipAlign) : DEFAULT_ALIGN;\r\n}\r\n\r\nexport function toDir(value: unknown): 'ltr' | 'rtl' | undefined {\r\n return value === 'ltr' || value === 'rtl' ? value : undefined;\r\n}\r\n\r\nexport function toOffset(fallback: number): (value: unknown) => number {\r\n return (value: unknown): number => {\r\n const parsed = numberAttribute(value, fallback);\r\n return Number.isFinite(parsed) ? parsed : fallback;\r\n };\r\n}\r\n","// Tooltip pane: overlay creation, pane subscriptions, the exit transition and disposal.\r\n\r\nimport {\r\n Injector,\r\n TemplateRef,\r\n ViewContainerRef,\r\n WritableSignal,\r\n afterNextRender,\r\n signal,\r\n} from '@angular/core';\r\n\r\nimport { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\r\nimport { TemplatePortal } from '@angular/cdk/portal';\r\nimport { ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';\r\n\r\nimport { registerOverlayOwnership } from '@raqm/ui/overlay-internal';\r\n\r\nimport { RaqmTooltipTriggerRef } from './tooltip-context';\r\nimport {\r\n CONTENT_CLASS,\r\n CONTENT_CLOSING_CLASS,\r\n CONTENT_ENTERING_CLASS,\r\n EXIT_ANIMATION_MS,\r\n PANE_CLASS,\r\n nextTooltipRootId,\r\n prefersReducedMotion,\r\n} from './tooltip-model';\r\nimport { RaqmTooltipPosition } from './tooltip-position';\r\n\r\nexport interface RaqmTooltipPaneHost {\r\n /** Injection context for the after-render placement pass. */\r\n readonly injector: Injector;\r\n /** Registers this tooltip as the scope's active one, before the overlay exists. */\r\n claimActive(): void;\r\n /** A primary press outside the pane asks the caller to close. */\r\n onOutsidePress(trigger: RaqmTooltipTriggerRef): void;\r\n /** Escape while the pane is visible asks the caller to close. */\r\n onEscape(trigger: RaqmTooltipTriggerRef): void;\r\n /** The CDK detached the pane, so the caller syncs its own state. */\r\n onDetached(overlayRef: OverlayRef): void;\r\n}\r\n\r\nexport class RaqmTooltipPane {\r\n readonly open: WritableSignal<boolean> = signal(false);\r\n readonly tooltipId: WritableSignal<string | null> = signal(null);\r\n readonly closing: WritableSignal<boolean> = signal(false);\r\n\r\n // Minted once per root and exposed only while the content exists.\r\n private readonly rootId = nextTooltipRootId();\r\n\r\n private overlayRef: OverlayRef | undefined;\r\n\r\n // Bumped per open and on destroy, so a queued after-render pass cannot reveal a dead pane.\r\n private generation = 0;\r\n\r\n private exitTimer: ReturnType<typeof setTimeout> | undefined;\r\n\r\n private pendingDisposeOverlay: OverlayRef | undefined;\r\n\r\n // The overlay subscriptions, all torn down on every close/detach/destroy path.\r\n private detachSubscription: { unsubscribe(): void } | undefined;\r\n private outsideSubscription: { unsubscribe(): void } | undefined;\r\n private viewportSubscription: { unsubscribe(): void } | undefined;\r\n private scrollSubscription: { unsubscribe(): void } | undefined;\r\n\r\n private escapeListener: ((event: KeyboardEvent) => void) | undefined;\r\n\r\n constructor(\r\n private readonly overlay: Overlay,\r\n private readonly viewportRuler: ViewportRuler,\r\n private readonly scrollDispatcher: ScrollDispatcher,\r\n private readonly document: Document,\r\n private readonly viewContainerRef: ViewContainerRef,\r\n private readonly position: RaqmTooltipPosition,\r\n private readonly host: RaqmTooltipPaneHost,\r\n ) {}\r\n\r\n get hasPane(): boolean {\r\n return this.overlayRef !== undefined;\r\n }\r\n\r\n get ref(): OverlayRef | undefined {\r\n return this.overlayRef;\r\n }\r\n\r\n owns(overlayRef: OverlayRef): boolean {\r\n return this.overlayRef === overlayRef;\r\n }\r\n\r\n /** Creates and attaches the one overlay for a fresh open. */\r\n openLayer(trigger: RaqmTooltipTriggerRef, panel: TemplateRef<unknown>): void {\r\n const generation = ++this.generation;\r\n const preferred = this.position.beginPlacement();\r\n\r\n // Register before the overlay exists, so two surfaces are never visible at once.\r\n this.host.claimActive();\r\n\r\n const strategy = this.position.buildStrategy(trigger.element, preferred);\r\n const config: OverlayConfig = {\r\n positionStrategy: strategy,\r\n // Descriptive and nonmodal: no backdrop, scroll lock, focus trap or role.\r\n hasBackdrop: false,\r\n scrollStrategy: this.overlay.scrollStrategies.noop(),\r\n panelClass: [PANE_CLASS],\r\n disposeOnNavigation: true,\r\n direction: this.position.direction,\r\n };\r\n const overlayRef = this.overlay.create(config);\r\n registerOverlayOwnership(trigger.element, overlayRef);\r\n this.overlayRef = overlayRef;\r\n this.position.watchSide(strategy, overlayRef);\r\n // A primary press anywhere outside the content dismisses the tooltip.\r\n this.outsideSubscription = overlayRef.outsidePointerEvents().subscribe((event) => {\r\n if (event.button === 0) {\r\n this.host.onOutsidePress(trigger);\r\n }\r\n });\r\n this.detachSubscription = overlayRef\r\n .detachments()\r\n .subscribe(() => this.host.onDetached(overlayRef));\r\n // The position collapses burst notifications into one placement pass per frame.\r\n this.viewportSubscription = this.viewportRuler\r\n .change(0)\r\n .subscribe(() => this.position.scheduleReposition());\r\n this.scrollSubscription = this.scrollDispatcher\r\n .ancestorScrolled(trigger.element, 0)\r\n .subscribe(() => this.position.scheduleReposition());\r\n // Escape while a hover-opened tooltip is visible (focus elsewhere) still dismisses it.\r\n this.escapeListener = (event: KeyboardEvent) => {\r\n if (event.key !== 'Escape' || !this.open()) {\r\n return;\r\n }\r\n this.host.onEscape(trigger);\r\n };\r\n this.document.addEventListener('keydown', this.escapeListener);\r\n\r\n overlayRef.attach(new TemplatePortal(panel, this.viewContainerRef));\r\n // Hidden until the after-render placement pass, so it never paints at the CDK origin.\r\n overlayRef.overlayElement.style.visibility = 'hidden';\r\n overlayRef.overlayElement.style.pointerEvents = 'none';\r\n this.open.set(true);\r\n this.tooltipId.set(this.rootId);\r\n this.position.attachResizeObserver(trigger.element, overlayRef);\r\n\r\n afterNextRender(\r\n () => {\r\n if (generation !== this.generation || this.overlayRef !== overlayRef) {\r\n return;\r\n }\r\n this.position.reposition();\r\n this.reveal(overlayRef);\r\n },\r\n { injector: this.host.injector },\r\n );\r\n }\r\n\r\n /** Repositions the live pane; a closed tooltip is a no-op. */\r\n reposition(): void {\r\n this.position.reposition();\r\n }\r\n\r\n /** Drops the pane reference and its strategy; the element is the caller's to dispose. */\r\n releaseOwnership(): void {\r\n this.overlayRef = undefined;\r\n this.position.discard();\r\n }\r\n\r\n /** Blocks a queued after-render reveal for a pane that is going away. */\r\n invalidate(): void {\r\n this.generation += 1;\r\n }\r\n\r\n // Tears down now when requested or under reduced motion, else after the exit transition.\r\n disposePane(immediate: boolean): void {\r\n const overlayRef = this.overlayRef;\r\n this.overlayRef = undefined;\r\n this.position.reset();\r\n this.releaseSubscriptions();\r\n if (!overlayRef) {\r\n this.closing.set(false);\r\n return;\r\n }\r\n // Inert and aria-hidden before disposal: not clickable or announced while it fades.\r\n overlayRef.overlayElement.setAttribute('inert', '');\r\n overlayRef.overlayElement.setAttribute('aria-hidden', 'true');\r\n if (immediate || prefersReducedMotion()) {\r\n this.closing.set(false);\r\n overlayRef.dispose();\r\n return;\r\n }\r\n const surface = overlayRef.overlayElement.querySelector<HTMLElement>(`.${CONTENT_CLASS}`);\r\n surface?.classList.remove(CONTENT_ENTERING_CLASS);\r\n surface?.classList.add(CONTENT_CLOSING_CLASS);\r\n this.closing.set(true);\r\n this.pendingDisposeOverlay = overlayRef;\r\n this.exitTimer = setTimeout(() => {\r\n this.exitTimer = undefined;\r\n this.pendingDisposeOverlay = undefined;\r\n this.closing.set(false);\r\n overlayRef.dispose();\r\n }, EXIT_ANIMATION_MS);\r\n }\r\n\r\n flushPendingDispose(): void {\r\n if (this.exitTimer !== undefined) {\r\n clearTimeout(this.exitTimer);\r\n this.exitTimer = undefined;\r\n }\r\n this.closing.set(false);\r\n const pending = this.pendingDisposeOverlay;\r\n this.pendingDisposeOverlay = undefined;\r\n pending?.dispose();\r\n }\r\n\r\n private reveal(overlayRef: OverlayRef): void {\r\n const surface = overlayRef.overlayElement.querySelector<HTMLElement>(`.${CONTENT_CLASS}`);\r\n if (!surface || this.overlayRef !== overlayRef) {\r\n return;\r\n }\r\n surface.classList.remove(CONTENT_CLOSING_CLASS);\r\n surface.classList.add(CONTENT_ENTERING_CLASS);\r\n overlayRef.overlayElement.style.pointerEvents = '';\r\n overlayRef.overlayElement.style.visibility = '';\r\n }\r\n\r\n /** Clears the exit timer and hands over the panes a destroy pass still has to dispose. */\r\n takeForDestroy(): { pending: OverlayRef | undefined; overlay: OverlayRef | undefined } {\r\n if (this.exitTimer !== undefined) {\r\n clearTimeout(this.exitTimer);\r\n this.exitTimer = undefined;\r\n }\r\n const pending = this.pendingDisposeOverlay;\r\n this.pendingDisposeOverlay = undefined;\r\n const overlayRef = this.overlayRef;\r\n this.overlayRef = undefined;\r\n this.position.discard();\r\n this.closing.set(false);\r\n this.open.set(false);\r\n this.tooltipId.set(null);\r\n return { pending, overlay: overlayRef };\r\n }\r\n\r\n // Safe to call repeatedly; never disposes an overlay itself.\r\n releaseSubscriptions(): void {\r\n this.position.releaseSide();\r\n this.detachSubscription?.unsubscribe();\r\n this.detachSubscription = undefined;\r\n this.outsideSubscription?.unsubscribe();\r\n this.outsideSubscription = undefined;\r\n this.viewportSubscription?.unsubscribe();\r\n this.viewportSubscription = undefined;\r\n this.scrollSubscription?.unsubscribe();\r\n this.scrollSubscription = undefined;\r\n this.position.releaseResizeObserver();\r\n if (this.escapeListener !== undefined) {\r\n this.document.removeEventListener('keydown', this.escapeListener);\r\n this.escapeListener = undefined;\r\n }\r\n }\r\n}\r\n","// Tooltip positioning: direction, physical sides, the CDK strategy, the arrow and resize.\r\n\r\nimport { signal } from '@angular/core';\r\n\r\nimport { Directionality } from '@angular/cdk/bidi';\r\nimport {\r\n ConnectedPosition,\r\n FlexibleConnectedPositionStrategy,\r\n Overlay,\r\n OverlayRef,\r\n} from '@angular/cdk/overlay';\r\n\r\nimport {\r\n CONTENT_CLASS,\r\n RaqmTooltipAlign,\r\n RaqmTooltipPhysicalSide,\r\n RaqmTooltipSide,\r\n VIEWPORT_MARGIN,\r\n} from './tooltip-model';\r\n\r\nexport interface RaqmTooltipPositionHost {\r\n /** The root element; its computed direction is read before the CDK Bidi value. */\r\n readonly element: HTMLElement;\r\n /** Optional Bidi service; the computed direction wins so a CSS-only `dir` ancestor works. */\r\n readonly directionality: Directionality | null;\r\n side(): RaqmTooltipSide;\r\n align(): RaqmTooltipAlign;\r\n sideOffset(): number;\r\n alignOffset(): number;\r\n dir(): 'ltr' | 'rtl' | undefined;\r\n /** The trigger element the pane is anchored to. */\r\n anchor(): HTMLElement | null;\r\n /** The live pane, while one exists. */\r\n pane(): OverlayRef | undefined;\r\n}\r\n\r\n// The surface's layout box in viewport coordinates; a transform on it (the enter/exit\r\n// scale) is excluded, since it would skew the measured arrow centre.\r\nfunction layoutBox(element: HTMLElement): {\r\n left: number;\r\n top: number;\r\n width: number;\r\n height: number;\r\n} {\r\n const parent = element.offsetParent as HTMLElement | null;\r\n if (!parent) {\r\n const rect = element.getBoundingClientRect();\r\n return { left: rect.left, top: rect.top, width: rect.width, height: rect.height };\r\n }\r\n const parentRect = parent.getBoundingClientRect();\r\n return {\r\n left: parentRect.left + parent.clientLeft + element.offsetLeft,\r\n top: parentRect.top + parent.clientTop + element.offsetTop,\r\n width: element.offsetWidth,\r\n height: element.offsetHeight,\r\n };\r\n}\r\n\r\nexport class RaqmTooltipPosition {\r\n readonly panelDir = signal<'ltr' | 'rtl'>('ltr');\r\n readonly resolvedSide = signal<RaqmTooltipPhysicalSide>('top');\r\n\r\n private positionStrategy: FlexibleConnectedPositionStrategy | undefined;\r\n\r\n private currentPositions: ConnectedPosition[] = [];\r\n private currentSides: RaqmTooltipPhysicalSide[] = [];\r\n\r\n private currentAppliedSide: RaqmTooltipPhysicalSide = 'top';\r\n\r\n private currentDir: 'ltr' | 'rtl' = 'ltr';\r\n\r\n // Torn down on every close/detach/destroy path.\r\n private sideSubscription: { unsubscribe(): void } | undefined;\r\n\r\n private resizeObserver: ResizeObserver | undefined;\r\n\r\n private frame = 0;\r\n private frameView: Window | undefined;\r\n\r\n constructor(\r\n private readonly overlay: Overlay,\r\n private readonly host: RaqmTooltipPositionHost,\r\n ) {}\r\n\r\n /** The direction the open pane was placed with. */\r\n get direction(): 'ltr' | 'rtl' {\r\n return this.currentDir;\r\n }\r\n\r\n /** Resolves direction and the preferred side; both seed the arrow and motion state. */\r\n beginPlacement(): RaqmTooltipPhysicalSide {\r\n const dir = this.readResolvedDir();\r\n this.currentDir = dir;\r\n this.panelDir.set(dir);\r\n const preferred = this.resolvePhysicalSide(this.host.side());\r\n this.currentAppliedSide = preferred;\r\n this.resolvedSide.set(preferred);\r\n return preferred;\r\n }\r\n\r\n // Seeded with the preferred and opposite side, so attach always has a position.\r\n buildStrategy(\r\n origin: HTMLElement,\r\n preferred: RaqmTooltipPhysicalSide,\r\n ): FlexibleConnectedPositionStrategy {\r\n const strategy = this.overlay.position().flexibleConnectedTo(origin);\r\n strategy\r\n .withFlexibleDimensions(false)\r\n .withGrowAfterOpen(false)\r\n .withPush(true)\r\n .withViewportMargin(VIEWPORT_MARGIN);\r\n this.setPositions(strategy, [preferred, this.oppositeSide(preferred)]);\r\n this.positionStrategy = strategy;\r\n return strategy;\r\n }\r\n\r\n reposition(): void {\r\n this.cancelScheduledReposition();\r\n const overlayRef = this.host.pane();\r\n const strategy = this.positionStrategy;\r\n if (!overlayRef || !strategy) {\r\n return;\r\n }\r\n const dir = this.readResolvedDir();\r\n if (dir !== this.currentDir) {\r\n this.currentDir = dir;\r\n this.panelDir.set(dir);\r\n overlayRef.setDirection(dir);\r\n }\r\n const preferred = this.resolvePhysicalSide(this.host.side());\r\n this.setPositions(strategy, [preferred, this.oppositeSide(preferred)]);\r\n overlayRef.updatePosition();\r\n this.positionArrow(this.currentAppliedSide);\r\n }\r\n\r\n // Scroll and resize notifications can burst within one frame; one pass leaves the same\r\n // final placement and arrow as the last event would.\r\n scheduleReposition(): void {\r\n if (!this.host.pane() || !this.positionStrategy || this.frame) {\r\n return;\r\n }\r\n const view = this.host.element.ownerDocument.defaultView;\r\n if (!view || typeof view.requestAnimationFrame !== 'function') {\r\n this.reposition();\r\n return;\r\n }\r\n this.frameView = view;\r\n this.frame = view.requestAnimationFrame(() => {\r\n this.frame = 0;\r\n this.frameView = undefined;\r\n this.reposition();\r\n });\r\n }\r\n\r\n // Arrow and enter motion follow a collision flip rather than the preferred side.\r\n watchSide(strategy: FlexibleConnectedPositionStrategy, overlayRef: OverlayRef): void {\r\n this.sideSubscription = strategy.positionChanges.subscribe((change) => {\r\n const index = this.currentPositions.indexOf(change.connectionPair);\r\n const side = this.currentSides[index] ?? this.currentSides[0] ?? this.resolvedSide();\r\n this.currentAppliedSide = side;\r\n this.resolvedSide.set(side);\r\n const surface = overlayRef.overlayElement.querySelector<HTMLElement>(`.${CONTENT_CLASS}`);\r\n surface?.setAttribute('data-raqm-side', side);\r\n this.positionArrow(side, surface ?? undefined);\r\n });\r\n }\r\n\r\n // Keeps the index -> side map in step, so a collision fallback maps back.\r\n private setPositions(\r\n strategy: FlexibleConnectedPositionStrategy,\r\n sides: readonly RaqmTooltipPhysicalSide[],\r\n ): void {\r\n this.currentSides = [...sides];\r\n this.currentPositions = sides.map((side) => this.buildPositionFor(side));\r\n strategy.withPositions(this.currentPositions);\r\n }\r\n\r\n // The single position for one physical side; offsets are signed outward from the\r\n // trigger, with logical start/end resolved for horizontal sides.\r\n private buildPositionFor(side: RaqmTooltipPhysicalSide): ConnectedPosition {\r\n const align = this.host.align();\r\n const x = align;\r\n const y = this.toVerticalAlign(align);\r\n const mainOffset = this.signedSideOffset(side);\r\n switch (side) {\r\n case 'bottom':\r\n return {\r\n originX: x,\r\n originY: 'bottom',\r\n overlayX: x,\r\n overlayY: 'top',\r\n offsetX: this.host.alignOffset(),\r\n offsetY: mainOffset,\r\n };\r\n case 'left':\r\n return this.horizontalPosition('left', y, mainOffset);\r\n case 'right':\r\n return this.horizontalPosition('right', y, mainOffset);\r\n case 'top':\r\n default:\r\n return {\r\n originX: x,\r\n originY: 'top',\r\n overlayX: x,\r\n overlayY: 'bottom',\r\n offsetX: this.host.alignOffset(),\r\n offsetY: mainOffset,\r\n };\r\n }\r\n }\r\n\r\n // Direction-aware on the inline axis; the alignment offset applies vertically.\r\n private horizontalPosition(\r\n side: 'left' | 'right',\r\n alignY: 'top' | 'center' | 'bottom',\r\n offsetX: number,\r\n ): ConnectedPosition {\r\n const rtl = this.currentDir === 'rtl';\r\n const originX = side === 'right' ? (rtl ? 'start' : 'end') : rtl ? 'end' : 'start';\r\n const overlayX = side === 'right' ? (rtl ? 'end' : 'start') : rtl ? 'start' : 'end';\r\n return {\r\n originX,\r\n originY: alignY,\r\n overlayX,\r\n overlayY: alignY,\r\n offsetX,\r\n offsetY: this.host.alignOffset(),\r\n };\r\n }\r\n\r\n private signedSideOffset(side: RaqmTooltipPhysicalSide): number {\r\n return side === 'bottom' || side === 'right' ? this.host.sideOffset() : -this.host.sideOffset();\r\n }\r\n\r\n private toVerticalAlign(align: RaqmTooltipAlign): 'top' | 'center' | 'bottom' {\r\n return align === 'start' ? 'top' : align === 'end' ? 'bottom' : 'center';\r\n }\r\n\r\n // Physical sides pass through; logical sides resolve against the live direction.\r\n private resolvePhysicalSide(side: RaqmTooltipSide): RaqmTooltipPhysicalSide {\r\n switch (side) {\r\n case 'inline-start':\r\n return this.currentDir === 'rtl' ? 'right' : 'left';\r\n case 'inline-end':\r\n return this.currentDir === 'rtl' ? 'left' : 'right';\r\n default:\r\n return side;\r\n }\r\n }\r\n\r\n // The opposite physical side, used as the collision fallback.\r\n private oppositeSide(side: RaqmTooltipPhysicalSide): RaqmTooltipPhysicalSide {\r\n switch (side) {\r\n case 'top':\r\n return 'bottom';\r\n case 'bottom':\r\n return 'top';\r\n case 'left':\r\n return 'right';\r\n default:\r\n return 'left';\r\n }\r\n }\r\n\r\n // Centers the arrow on the trigger, clamped inside the rounded corners via a CSS var.\r\n private positionArrow(side: RaqmTooltipPhysicalSide, surface?: HTMLElement): void {\r\n const content =\r\n surface ?? this.host.pane()?.overlayElement.querySelector<HTMLElement>(`.${CONTENT_CLASS}`);\r\n const trigger = this.host.anchor();\r\n if (!content || !trigger) {\r\n return;\r\n }\r\n // The enter/exit animation scales the surface, so its layout box is measured.\r\n const contentRect = layoutBox(content);\r\n const triggerRect = trigger.getBoundingClientRect();\r\n const vertical = side === 'top' || side === 'bottom';\r\n const size = vertical ? contentRect.width : contentRect.height;\r\n const center = vertical\r\n ? triggerRect.left + triggerRect.width / 2 - contentRect.left\r\n : triggerRect.top + triggerRect.height / 2 - contentRect.top;\r\n if (size <= 0) {\r\n return;\r\n }\r\n const edge = Math.min(12, size / 2);\r\n const offset = Math.max(edge, Math.min(center, size - edge));\r\n content.style.setProperty('--raqm-tooltip-arrow-offset', `${offset}px`);\r\n }\r\n\r\n // Explicit input first, then the computed direction, then the CDK Bidi value.\r\n private readResolvedDir(): 'ltr' | 'rtl' {\r\n const explicit = this.host.dir();\r\n if (explicit === 'ltr' || explicit === 'rtl') {\r\n return explicit;\r\n }\r\n const computedStyle = getComputedStyle(this.host.element).direction;\r\n if (computedStyle === 'rtl') {\r\n return 'rtl';\r\n }\r\n if (computedStyle === 'ltr') {\r\n return 'ltr';\r\n }\r\n return this.host.directionality?.value ?? 'ltr';\r\n }\r\n\r\n // Observes trigger/content size changes while open; one bounded reposition each.\r\n attachResizeObserver(trigger: HTMLElement, overlayRef: OverlayRef): void {\r\n if (typeof ResizeObserver === 'undefined') {\r\n return;\r\n }\r\n this.resizeObserver?.disconnect();\r\n const observer = new ResizeObserver(() => {\r\n if (this.host.pane() === overlayRef) {\r\n this.scheduleReposition();\r\n }\r\n });\r\n this.resizeObserver = observer;\r\n observer.observe(trigger);\r\n const surface = overlayRef.overlayElement.querySelector<HTMLElement>(`.${CONTENT_CLASS}`);\r\n if (surface) {\r\n observer.observe(surface);\r\n }\r\n }\r\n\r\n releaseSide(): void {\r\n this.sideSubscription?.unsubscribe();\r\n this.sideSubscription = undefined;\r\n }\r\n\r\n releaseResizeObserver(): void {\r\n if (this.resizeObserver !== undefined) {\r\n this.resizeObserver.disconnect();\r\n this.resizeObserver = undefined;\r\n }\r\n }\r\n\r\n // A closed pane drops the strategy and the position/arrow map together.\r\n reset(): void {\r\n this.cancelScheduledReposition();\r\n this.positionStrategy = undefined;\r\n this.currentPositions = [];\r\n this.currentSides = [];\r\n }\r\n\r\n // A detached or destroyed pane drops the strategy; the map is cleared separately.\r\n discard(): void {\r\n this.cancelScheduledReposition();\r\n this.positionStrategy = undefined;\r\n }\r\n\r\n clear(): void {\r\n this.currentPositions = [];\r\n this.currentSides = [];\r\n }\r\n\r\n private cancelScheduledReposition(): void {\r\n if (!this.frame) {\r\n return;\r\n }\r\n this.frameView?.cancelAnimationFrame(this.frame);\r\n this.frame = 0;\r\n this.frameView = undefined;\r\n }\r\n}\r\n","// Tooltip slots: the single trigger and the single content template, with their guards.\r\n\r\nimport { TemplateRef, computed, isDevMode, signal } from '@angular/core';\r\n\r\nimport { RaqmTooltipTriggerRef } from './tooltip-context';\r\n\r\nexport interface RaqmTooltipSlotHost {\r\n /** The panel template; without it an open has nothing to attach. */\r\n panel(): TemplateRef<unknown> | undefined;\r\n /** A registration changed, so a pending open may now be possible. */\r\n onChanged(): void;\r\n /** A registered slot went away; an open tooltip is closed rather than orphaned. */\r\n onLost(): void;\r\n}\r\n\r\nexport class RaqmTooltipSlot {\r\n private readonly triggerRef = signal<RaqmTooltipTriggerRef | null>(null);\r\n\r\n /** Template-facing: the consumer content, or `null` before it registers. */\r\n readonly contentTemplate = signal<TemplateRef<unknown> | null>(null);\r\n\r\n /** Whether every slot an open needs is registered. */\r\n readonly canOpen = computed(\r\n () =>\r\n this.triggerRef() !== null &&\r\n this.contentTemplate() !== null &&\r\n this.host.panel() !== undefined,\r\n );\r\n\r\n constructor(\r\n private readonly document: Document,\r\n private readonly host: RaqmTooltipSlotHost,\r\n ) {}\r\n\r\n trigger(): RaqmTooltipTriggerRef | null {\r\n return this.triggerRef();\r\n }\r\n\r\n content(): TemplateRef<unknown> | null {\r\n return this.contentTemplate();\r\n }\r\n\r\n registerTrigger(ref: RaqmTooltipTriggerRef): void {\r\n const current = this.triggerRef();\r\n if (current !== null && current !== ref) {\r\n if (isDevMode()) {\r\n console.error(\r\n '[raqm-tooltip] Only one `[raqm-tooltip-trigger]` is supported per <raqm-tooltip>; the extra trigger is ignored.',\r\n );\r\n }\r\n return;\r\n }\r\n this.triggerRef.set(ref);\r\n this.host.onChanged();\r\n }\r\n\r\n /** Unregisters the trigger; an open tooltip is closed rather than orphaned. */\r\n unregisterTrigger(ref: RaqmTooltipTriggerRef): void {\r\n if (this.triggerRef() !== ref) {\r\n return;\r\n }\r\n this.triggerRef.set(null);\r\n this.host.onLost();\r\n }\r\n\r\n registerContent(template: TemplateRef<unknown>): void {\r\n const current = this.contentTemplate();\r\n if (current !== null && current !== template) {\r\n if (isDevMode()) {\r\n console.error(\r\n '[raqm-tooltip] Only one `ng-template[raqm-tooltip-content]` is supported per <raqm-tooltip>; the extra template is ignored.',\r\n );\r\n }\r\n return;\r\n }\r\n this.contentTemplate.set(template);\r\n this.host.onChanged();\r\n }\r\n\r\n /** Unregisters the content template; an open tooltip is closed rather than orphaned. */\r\n unregisterContent(template: TemplateRef<unknown>): void {\r\n if (this.contentTemplate() !== template) {\r\n return;\r\n }\r\n this.contentTemplate.set(null);\r\n this.host.onLost();\r\n }\r\n\r\n isTriggerFocused(): boolean {\r\n const trigger = this.triggerRef();\r\n return trigger !== null && this.document.activeElement === trigger.element;\r\n }\r\n}\r\n","// Tooltip timers: the provider hover-open delay, the hover gap and the pending-open Escape.\r\n\r\nimport { RaqmTooltipOpenReason, RaqmTooltipTriggerRef } from './tooltip-context';\r\nimport { HOVER_GAP_MS } from './tooltip-model';\r\n\r\nexport interface RaqmTooltipTimersHost {\r\n open(): boolean;\r\n openReason(): RaqmTooltipOpenReason;\r\n destroyed(): boolean;\r\n trigger(): RaqmTooltipTriggerRef | null;\r\n /** The hover delay elapsed; the caller re-checks its open policy. */\r\n onOpenElapsed(): void;\r\n /** The hover gap elapsed for a still-open tooltip; the caller closes it. */\r\n onHoverElapsed(): void;\r\n /** Escape during a pending delay, or while the pane is visible. */\r\n onEscape(trigger: RaqmTooltipTriggerRef): void;\r\n}\r\n\r\nexport class RaqmTooltipTimers {\r\n private openTimer: ReturnType<typeof setTimeout> | undefined;\r\n private hoverCloseTimer: ReturnType<typeof setTimeout> | undefined;\r\n\r\n // Armed only while a delayed hover open is pending; dismissible without trigger focus.\r\n private pendingEscapeListener: ((event: KeyboardEvent) => void) | undefined;\r\n\r\n constructor(\r\n private readonly document: Document,\r\n private readonly host: RaqmTooltipTimersHost,\r\n ) {}\r\n\r\n /** Arms the one pending hover-open delay, and its pending-open Escape listener. */\r\n armOpen(delay: number): void {\r\n this.openTimer = setTimeout(() => {\r\n this.openTimer = undefined;\r\n this.removePendingEscape();\r\n this.host.onOpenElapsed();\r\n }, delay);\r\n // Escape can dismiss the pending hover interaction before any overlay exists.\r\n this.armPendingEscape();\r\n }\r\n\r\n /** Cancels the one pending hover-open delay and its pending Escape listener. */\r\n cancelOpen(): void {\r\n if (this.openTimer !== undefined) {\r\n clearTimeout(this.openTimer);\r\n this.openTimer = undefined;\r\n }\r\n this.removePendingEscape();\r\n }\r\n\r\n cancelHoverClose(): void {\r\n if (this.hoverCloseTimer !== undefined) {\r\n clearTimeout(this.hoverCloseTimer);\r\n this.hoverCloseTimer = undefined;\r\n }\r\n }\r\n\r\n scheduleHoverClose(): void {\r\n if (\r\n !this.host.open() ||\r\n this.host.openReason() === 'focus' ||\r\n this.hoverCloseTimer !== undefined\r\n ) {\r\n return;\r\n }\r\n this.hoverCloseTimer = setTimeout(() => {\r\n this.hoverCloseTimer = undefined;\r\n if (!this.host.destroyed() && this.host.open()) {\r\n this.host.onHoverElapsed();\r\n }\r\n }, HOVER_GAP_MS);\r\n }\r\n\r\n /** Removes only the pending-open Escape listener; the hover-open delay is untouched. */\r\n removePendingEscape(): void {\r\n if (this.pendingEscapeListener !== undefined) {\r\n this.document.removeEventListener('keydown', this.pendingEscapeListener);\r\n this.pendingEscapeListener = undefined;\r\n }\r\n }\r\n\r\n // Dismissible while pending, even when focus is not on the trigger.\r\n private armPendingEscape(): void {\r\n this.removePendingEscape();\r\n const trigger = this.host.trigger();\r\n if (trigger === null) {\r\n return;\r\n }\r\n this.pendingEscapeListener = (event: KeyboardEvent) => {\r\n if (event.key !== 'Escape') {\r\n return;\r\n }\r\n this.host.onEscape(trigger);\r\n };\r\n this.document.addEventListener('keydown', this.pendingEscapeListener);\r\n }\r\n}\r\n","import { DOCUMENT, NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n Injector,\r\n OnDestroy,\r\n TemplateRef,\r\n ViewContainerRef,\r\n booleanAttribute,\r\n computed,\r\n effect,\r\n inject,\r\n input,\r\n untracked,\r\n viewChild,\r\n} from '@angular/core';\r\n\r\nimport { Directionality } from '@angular/cdk/bidi';\r\nimport { Overlay } from '@angular/cdk/overlay';\r\nimport { ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';\r\n\r\nimport {\r\n RAQM_TOOLTIP,\r\n RAQM_TOOLTIP_PROVIDER,\r\n RaqmTooltipContext,\r\n RaqmTooltipOpenReason,\r\n RaqmTooltipTriggerRef,\r\n} from './tooltip-context';\r\nimport { RaqmTooltipLifecycle } from './tooltip-lifecycle';\r\nimport {\r\n DEFAULT_ALIGN,\r\n DEFAULT_ALIGN_OFFSET,\r\n DEFAULT_SIDE,\r\n DEFAULT_SIDE_OFFSET,\r\n RaqmTooltipAlign,\r\n RaqmTooltipSide,\r\n toAlign,\r\n toDir,\r\n toOffset,\r\n toSide,\r\n} from './tooltip-model';\r\nimport { RaqmTooltipPane } from './tooltip-pane';\r\nimport { RaqmTooltipPosition } from './tooltip-position';\r\nimport { RaqmTooltipSlot } from './tooltip-slot';\r\nimport { RaqmTooltipTimers } from './tooltip-timers';\r\n\r\nexport type { RaqmTooltipAlign, RaqmTooltipSide } from './tooltip-model';\r\n\r\n@Component({\r\n selector: 'raqm-tooltip',\r\n imports: [NgTemplateOutlet],\r\n templateUrl: './tooltip.html',\r\n styleUrl: './tooltip.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'raqmTooltip',\r\n providers: [\r\n // A dedicated token (not a component import) avoids a runtime module cycle.\r\n { provide: RAQM_TOOLTIP, useExisting: RaqmTooltipComponent },\r\n ],\r\n})\r\nexport class RaqmTooltipComponent implements RaqmTooltipContext, OnDestroy {\r\n // Read only for the live computed direction; the host renders no box of its own.\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\r\n\r\n private readonly overlay = inject(Overlay);\r\n\r\n private readonly viewContainerRef = inject(ViewContainerRef);\r\n\r\n private readonly injector = inject(Injector);\r\n\r\n // Optional Bidi service; the computed direction wins so a CSS-only `dir` ancestor works.\r\n private readonly directionality = inject(Directionality, { optional: true });\r\n\r\n private readonly viewportRuler = inject(ViewportRuler);\r\n\r\n private readonly scrollDispatcher = inject(ScrollDispatcher);\r\n\r\n private readonly document = inject(DOCUMENT);\r\n\r\n // Nearest provider (shared delay + single-active scope); without one the delay is 0.\r\n private readonly provider = inject(RAQM_TOOLTIP_PROVIDER, { optional: true });\r\n\r\n // An optional query so an interaction cannot throw while the view query is unresolved.\r\n private readonly panelTemplate = viewChild('panel', { read: TemplateRef });\r\n\r\n readonly disabled = input(false, { transform: booleanAttribute });\r\n\r\n readonly side = input<RaqmTooltipSide>(DEFAULT_SIDE, { transform: toSide });\r\n\r\n readonly align = input<RaqmTooltipAlign>(DEFAULT_ALIGN, {\r\n transform: toAlign,\r\n });\r\n\r\n readonly sideOffset = input(DEFAULT_SIDE_OFFSET, {\r\n transform: toOffset(DEFAULT_SIDE_OFFSET),\r\n });\r\n\r\n readonly alignOffset = input(DEFAULT_ALIGN_OFFSET, {\r\n transform: toOffset(DEFAULT_ALIGN_OFFSET),\r\n });\r\n\r\n readonly dir = input<'ltr' | 'rtl' | undefined>(undefined, {\r\n transform: toDir,\r\n });\r\n\r\n // Direction, physical side, the CDK strategy and the arrow.\r\n private readonly position: RaqmTooltipPosition = new RaqmTooltipPosition(this.overlay, {\r\n element: this.host.nativeElement,\r\n directionality: this.directionality,\r\n side: () => this.side(),\r\n align: () => this.align(),\r\n sideOffset: () => this.sideOffset(),\r\n alignOffset: () => this.alignOffset(),\r\n dir: () => this.dir(),\r\n anchor: () => this.slot.trigger()?.element ?? null,\r\n pane: () => this.pane.ref,\r\n });\r\n\r\n // The overlay pane, its subscriptions and the exit transition.\r\n private readonly pane: RaqmTooltipPane = new RaqmTooltipPane(\r\n this.overlay,\r\n this.viewportRuler,\r\n this.scrollDispatcher,\r\n this.document,\r\n this.viewContainerRef,\r\n this.position,\r\n {\r\n injector: this.injector,\r\n claimActive: () => this.lifecycle.claimActive(),\r\n onOutsidePress: (trigger) => this.lifecycle.requestClose(trigger, 'press'),\r\n onEscape: (trigger) => this.lifecycle.requestClose(trigger, 'escape'),\r\n onDetached: (overlayRef) => this.lifecycle.handleDetached(overlayRef),\r\n },\r\n );\r\n\r\n // The single trigger and the single content template, with their guards.\r\n private readonly slot: RaqmTooltipSlot = new RaqmTooltipSlot(this.document, {\r\n panel: () => this.panelTemplate(),\r\n onChanged: () => this.lifecycle.retryRequestedOpen(),\r\n onLost: () => this.lifecycle.closeForPeer(),\r\n });\r\n\r\n // The provider hover-open delay, the hover gap and the pending-open Escape listener.\r\n private readonly timers: RaqmTooltipTimers = new RaqmTooltipTimers(this.document, {\r\n open: () => this.open(),\r\n openReason: () => this.lifecycle.currentReason(),\r\n destroyed: () => this.destroyed,\r\n trigger: () => this.slot.trigger(),\r\n onOpenElapsed: () => this.lifecycle.onOpenElapsed(),\r\n onHoverElapsed: () => this.lifecycle.beginClose(false),\r\n onEscape: (trigger) => this.lifecycle.requestClose(trigger, 'escape'),\r\n });\r\n\r\n // The open/close policy, the provider claim and the pane hand-off.\r\n private readonly lifecycle: RaqmTooltipLifecycle = new RaqmTooltipLifecycle({\r\n pane: this.pane,\r\n position: this.position,\r\n slot: this.slot,\r\n timers: this.timers,\r\n provider: this.provider,\r\n disabled: () => this.disabled(),\r\n destroyed: () => this.destroyed,\r\n delay: () => this.delay(),\r\n panel: () => this.panelTemplate(),\r\n });\r\n\r\n // The hover delay from the nearest provider, or 0 without one.\r\n private readonly delay = computed(() => this.provider?.delay() ?? 0);\r\n\r\n private destroyed = false;\r\n\r\n readonly open = this.pane.open;\r\n\r\n readonly tooltipId = this.pane.tooltipId;\r\n\r\n private readonly contentTemplate = this.slot.contentTemplate;\r\n\r\n protected readonly panelDir = this.position.panelDir;\r\n\r\n protected readonly resolvedSide = this.position.resolvedSide;\r\n\r\n protected readonly closing = this.pane.closing;\r\n\r\n constructor() {\r\n // A root disabled while open closes immediately; a disabled root never opens.\r\n effect(() => {\r\n const disabled = this.disabled();\r\n untracked(() => {\r\n if (!disabled) {\r\n return;\r\n }\r\n this.lifecycle.closeNow();\r\n });\r\n });\r\n\r\n // A placement/offset/direction change while open repositions; closed it is a no-op.\r\n effect(() => {\r\n this.side();\r\n this.align();\r\n this.sideOffset();\r\n this.alignOffset();\r\n this.dir();\r\n untracked(() => this.applyPositionInputs());\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.destroyed = true;\r\n this.pane.invalidate();\r\n this.lifecycle.destroy();\r\n }\r\n\r\n registerTrigger(ref: RaqmTooltipTriggerRef): void {\r\n this.slot.registerTrigger(ref);\r\n }\r\n\r\n /** Unregisters the trigger; an open tooltip is closed rather than orphaned. */\r\n unregisterTrigger(ref: RaqmTooltipTriggerRef): void {\r\n this.slot.unregisterTrigger(ref);\r\n }\r\n\r\n registerContent(template: TemplateRef<unknown>): void {\r\n this.slot.registerContent(template);\r\n }\r\n\r\n /** Unregisters the content template; an open tooltip is closed rather than orphaned. */\r\n unregisterContent(template: TemplateRef<unknown>): void {\r\n this.slot.unregisterContent(template);\r\n }\r\n\r\n requestOpen(ref: RaqmTooltipTriggerRef, reason: RaqmTooltipOpenReason): void {\r\n this.lifecycle.requestOpen(ref, reason);\r\n }\r\n\r\n requestClose(ref: RaqmTooltipTriggerRef, reason: 'mouse' | 'focus' | 'press' | 'escape'): void {\r\n this.lifecycle.requestClose(ref, reason);\r\n }\r\n\r\n cancelHoverClose(): void {\r\n this.timers.cancelHoverClose();\r\n }\r\n\r\n scheduleHoverClose(): void {\r\n this.timers.scheduleHoverClose();\r\n }\r\n\r\n closeForPeer(): void {\r\n this.lifecycle.closeForPeer();\r\n }\r\n\r\n // The wrapper's own pointer events keep a hover tooltip open across the gap.\r\n\r\n protected onContentPointerEnter(event: PointerEvent): void {\r\n if (event.pointerType === 'mouse') {\r\n this.timers.cancelHoverClose();\r\n }\r\n }\r\n\r\n protected onContentPointerLeave(event: PointerEvent): void {\r\n if (event.pointerType === 'mouse') {\r\n this.timers.scheduleHoverClose();\r\n }\r\n }\r\n\r\n private applyPositionInputs(): void {\r\n if (this.pane.hasPane) {\r\n this.pane.reposition();\r\n }\r\n }\r\n}\r\n","<!-- One `button[raqm-tooltip-trigger]` (or passive span for a disabled button) plus one\r\n `ng-template[raqm-tooltip-content]`; the root never wraps or clones the trigger. -->\r\n<ng-content />\r\n\r\n<ng-template #panel>\r\n <div\r\n class=\"raqm-tooltip-content\"\r\n role=\"tooltip\"\r\n [attr.id]=\"tooltipId()\"\r\n [attr.dir]=\"panelDir()\"\r\n [attr.data-raqm-side]=\"resolvedSide()\"\r\n [class.raqm-tooltip-content--closing]=\"closing()\"\r\n (pointerenter)=\"onContentPointerEnter($event)\"\r\n (pointerleave)=\"onContentPointerLeave($event)\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"contentTemplate()\" />\r\n\r\n <!-- The decorative diamond arrow is inert and never part of the description. -->\r\n <span class=\"raqm-tooltip-arrow\" aria-hidden=\"true\"></span>\r\n </div>\r\n</ng-template>\r\n","import {\r\n DestroyRef,\r\n Directive,\r\n ElementRef,\r\n OnInit,\r\n Renderer2,\r\n TemplateRef,\r\n effect,\r\n inject,\r\n input,\r\n isDevMode,\r\n numberAttribute,\r\n untracked,\r\n} from '@angular/core';\r\n\r\nimport {\r\n RAQM_TOOLTIP,\r\n RAQM_TOOLTIP_PROVIDER,\r\n RaqmTooltipActive,\r\n RaqmTooltipContext,\r\n RaqmTooltipProviderContext,\r\n RaqmTooltipTriggerRef,\r\n} from './tooltip-context';\r\n\r\nfunction toDelay(value: unknown): number {\r\n const parsed = numberAttribute(value, 0);\r\n return Number.isFinite(parsed) && parsed > 0 ? parsed : 0;\r\n}\r\n\r\n@Directive({\r\n selector: '[raqm-tooltip-provider]',\r\n exportAs: 'raqmTooltipProvider',\r\n providers: [{ provide: RAQM_TOOLTIP_PROVIDER, useExisting: RaqmTooltipProviderDirective }],\r\n})\r\nexport class RaqmTooltipProviderDirective implements RaqmTooltipProviderContext {\r\n readonly delay = input(0, { transform: toDelay });\r\n\r\n // The one currently open tooltip inside this provider scope, or null.\r\n private active: RaqmTooltipActive | null = null;\r\n\r\n /** Registers a newly open tooltip, closing the previous active one in this scope. */\r\n registerActive(active: RaqmTooltipActive): void {\r\n if (this.active !== null && this.active !== active) {\r\n this.active.closeForPeer();\r\n }\r\n this.active = active;\r\n }\r\n\r\n /** Clears the active registration only when it still belongs to this tooltip. */\r\n clearActive(active: RaqmTooltipActive): void {\r\n if (this.active === active) {\r\n this.active = null;\r\n }\r\n }\r\n}\r\n\r\n@Directive({\r\n selector: 'button[raqm-tooltip-trigger], span[raqm-tooltip-trigger]',\r\n host: {\r\n class: 'raqm-tooltip-trigger',\r\n '(pointerenter)': 'onPointerEnter($event)',\r\n '(pointerleave)': 'onPointerLeave($event)',\r\n '(pointerdown)': 'onPointerDown($event)',\r\n '(focus)': 'onFocus()',\r\n '(blur)': 'onBlur()',\r\n '(keydown)': 'onKeydown($event)',\r\n '(click)': 'onClick()',\r\n },\r\n})\r\nexport class RaqmTooltipTriggerDirective implements OnInit {\r\n // Native host element; the selector guarantees a button or a span.\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\r\n\r\n // Optional, so a misplaced trigger reports rather than crashes.\r\n private readonly tooltip = inject<RaqmTooltipContext | null>(RAQM_TOOLTIP, {\r\n optional: true,\r\n });\r\n\r\n private readonly renderer = inject(Renderer2);\r\n\r\n private readonly destroyRef = inject(DestroyRef);\r\n\r\n private ownedToken: string | null = null;\r\n\r\n // Live getters keep the disabled state current.\r\n private readonly ref: RaqmTooltipTriggerRef = (() => {\r\n const self = this;\r\n return {\r\n get element(): HTMLElement {\r\n return self.host.nativeElement;\r\n },\r\n get disabled(): boolean {\r\n const element = self.host.nativeElement;\r\n return element instanceof HTMLButtonElement && element.disabled;\r\n },\r\n };\r\n })();\r\n\r\n constructor() {\r\n // Keep the host's aria-describedby in step with the root's live tooltip id.\r\n effect(() => {\r\n const token = this.tooltip?.open() ? this.tooltip.tooltipId() : null;\r\n untracked(() => this.syncDescribedBy(token));\r\n });\r\n\r\n // Default a native button's type to `button` so a trigger never submits its form.\r\n const element = this.host.nativeElement;\r\n if (element instanceof HTMLButtonElement && !element.hasAttribute('type')) {\r\n element.setAttribute('type', 'button');\r\n }\r\n\r\n if (isDevMode() && this.tooltip === null) {\r\n console.error(\r\n '[raqm-tooltip-trigger] No parent <raqm-tooltip> found; the trigger cannot show a tooltip.',\r\n );\r\n }\r\n\r\n this.destroyRef.onDestroy(() => {\r\n this.tooltip?.unregisterTrigger(this.ref);\r\n this.syncDescribedBy(null);\r\n });\r\n }\r\n\r\n /** Registers the trigger with the root once the directive is initialized. */\r\n ngOnInit(): void {\r\n this.tooltip?.registerTrigger(this.ref);\r\n }\r\n\r\n /** Opens on mouse hover only; touch/pen hover is deliberately ignored. */\r\n protected onPointerEnter(event: Event): void {\r\n const pointer = event as PointerEvent;\r\n if (pointer.pointerType !== 'mouse') {\r\n return;\r\n }\r\n this.tooltip?.requestOpen(this.ref, 'mouse');\r\n }\r\n\r\n /** Requests the bounded hover-gap close on mouse leave. */\r\n protected onPointerLeave(event: Event): void {\r\n const pointer = event as PointerEvent;\r\n if (pointer.pointerType !== 'mouse') {\r\n return;\r\n }\r\n this.tooltip?.requestClose(this.ref, 'mouse');\r\n }\r\n\r\n /** A primary press closes an open tooltip; touch presses are included. */\r\n protected onPointerDown(event: Event): void {\r\n const pointer = event as PointerEvent;\r\n if (pointer.button !== 0) {\r\n return;\r\n }\r\n this.tooltip?.requestClose(this.ref, 'press');\r\n }\r\n\r\n /** Native keyboard focus opens immediately (the root applies any suppression). */\r\n protected onFocus(): void {\r\n this.tooltip?.requestOpen(this.ref, 'focus');\r\n }\r\n\r\n /** Losing focus closes the tooltip and clears any focus suppression in the root. */\r\n protected onBlur(): void {\r\n this.tooltip?.requestClose(this.ref, 'focus');\r\n }\r\n\r\n /** Escape closes an open tooltip or dismisses a pending delayed open. */\r\n protected onKeydown(event: Event): void {\r\n const key = event as KeyboardEvent;\r\n if (key.key !== 'Escape' || this.tooltip === null) {\r\n return;\r\n }\r\n // Consume the key only while open; a pending delayed open closes via the policy.\r\n if (this.tooltip.open()) {\r\n key.preventDefault();\r\n key.stopPropagation();\r\n }\r\n this.tooltip.requestClose(this.ref, 'escape');\r\n }\r\n\r\n /** A native/assistive click (including Enter/Space) closes an open tooltip. */\r\n protected onClick(): void {\r\n if (this.tooltip?.open()) {\r\n this.tooltip.requestClose(this.ref, 'press');\r\n }\r\n }\r\n\r\n // Merges/removes only the owned id in the host's aria-describedby token list.\r\n private syncDescribedBy(nextToken: string | null): void {\r\n const element = this.host.nativeElement;\r\n const previous = this.ownedToken;\r\n if (previous === nextToken) {\r\n return;\r\n }\r\n const tokens = (element.getAttribute('aria-describedby') ?? '')\r\n .split(/\\s+/)\r\n .filter((token) => token.length > 0 && token !== previous);\r\n if (nextToken !== null && !tokens.includes(nextToken)) {\r\n tokens.push(nextToken);\r\n }\r\n if (tokens.length > 0) {\r\n this.renderer.setAttribute(element, 'aria-describedby', tokens.join(' '));\r\n } else {\r\n this.renderer.removeAttribute(element, 'aria-describedby');\r\n }\r\n this.ownedToken = nextToken;\r\n }\r\n}\r\n\r\n@Directive({\r\n selector: 'ng-template[raqm-tooltip-content]',\r\n exportAs: 'raqmTooltipContent',\r\n})\r\nexport class RaqmTooltipContentDirective implements OnInit {\r\n private readonly template = inject<TemplateRef<unknown>>(TemplateRef);\r\n\r\n // Optional, so a misplaced template reports instead of crashing.\r\n private readonly tooltip = inject<RaqmTooltipContext | null>(RAQM_TOOLTIP, {\r\n optional: true,\r\n });\r\n\r\n private readonly destroyRef = inject(DestroyRef);\r\n\r\n constructor() {\r\n if (isDevMode() && this.tooltip === null) {\r\n console.error(\r\n '[raqm-tooltip-content] No parent <raqm-tooltip> found; the content is never rendered.',\r\n );\r\n }\r\n this.destroyRef.onDestroy(() => this.tooltip?.unregisterContent(this.template));\r\n }\r\n\r\n /** Registers the content template with the root once initialized. */\r\n ngOnInit(): void {\r\n this.tooltip?.registerContent(this.template);\r\n }\r\n}\r\n","import { RaqmTooltipComponent } from './tooltip';\r\nimport {\r\n RaqmTooltipContentDirective,\r\n RaqmTooltipProviderDirective,\r\n RaqmTooltipTriggerDirective,\r\n} from './tooltip.directive';\r\n\r\nexport {\r\n RaqmTooltipComponent,\r\n RaqmTooltipContentDirective,\r\n RaqmTooltipProviderDirective,\r\n RaqmTooltipTriggerDirective,\r\n};\r\n// @internal Sidebar composition contract.\r\nexport type { RaqmTooltipTriggerRef } from './tooltip-context';\r\n\r\nexport const RaqmTooltip = [\r\n RaqmTooltipComponent,\r\n RaqmTooltipContentDirective,\r\n RaqmTooltipProviderDirective,\r\n RaqmTooltipTriggerDirective,\r\n] as const;\r\n"],"mappings":";;;;;;;;AAsDA,MAAa,eAAe,IAAI,eAAmC,aAAa;AAGhF,MAAa,wBAAwB,IAAI,eACvC,qBAAqB;AC1BvB,IAAa,uBAAb,MAAiC;CAWF;CATrB,gBAAgB;CAEhB,aAAoC;CAGpC,oBAAoB;CAEpB,qBAAqB;CAE7B,YAA6B,MAA8B;EAA9B,KAAA,OAAA;CAAiC;CAG9D,gBAAa;EACX,OAAO,KAAK;CACd;CAEA,YAAY,KAA4B,QAA6B;EACnE,IAAI,QAAQ,KAAK,KAAK,KAAK,QAAO,GAChC;EAGF,IAAI,KAAK,KAAK,SAAQ,KAAM,IAAI,UAC9B;EAEF,IAAI,WAAW,WAAW,KAAK,mBAC7B;EAEF,IAAI,KAAK,KAAK,KAAK,KAAI,KAAM,KAAK,KAAK,KAAK,SAAS;GAEnD,KAAK,KAAK,OAAO,iBAAgB;GACjC,IAAI,WAAW,SACb,KAAK,a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AClB,kBAAkB;IAClB,iBAAiB;IACjB,WAAW;IACX,UAAU;IACV,aAAa;IACb,WAAW;GACZ;EACF,CAAA;;;;AAgJD,IAAa,8BAAb,MAAa,4BAA2B;CACrB,WAAW,OAA6B,WAAW;CAGnD,UAAU,OAAkC,cAAc,EACzE,UAAU,KACX,CAAA;CAEgB,aAAa,OAAO,UAAU;CAE/C,cAAA;EACE,IAAI,UAAS,KAAM,KAAK,YAAY,MAClC,QAAQ,MACN,uFAAuF;EAG3F,KAAK,WAAW,gBAAgB,KAAK,SAAS,kBAAkB,KAAK,QAAQ,CAAC;CAChF;CAGA,WAAQ;EACN,KAAK,SAAS,gBAAgB,KAAK,QAAQ;CAC7C;CAtBW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAA2B,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAA3B,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAA2B,cAAA;EAAA,UAAA;EAAA,UAAA,CAAA,oBAAA;EAAA,UAAA;CAAA,CAAA;;AAA3B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA2B,YAAA,CAAA;EAJvC,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,UAAU;EACX,CAAA;;;;ACnMD,MAAa,cAAc;CACzB;CACA;CACA;CACA;AACQ"}
|
package/fesm2022/raqm-ui.mjs
CHANGED
|
@@ -19,6 +19,7 @@ export * from "@raqm/ui/dropdown-menu";
|
|
|
19
19
|
export * from "@raqm/ui/empty";
|
|
20
20
|
export * from "@raqm/ui/field";
|
|
21
21
|
export * from "@raqm/ui/hover-card";
|
|
22
|
+
export * from "@raqm/ui/icon";
|
|
22
23
|
export * from "@raqm/ui/input";
|
|
23
24
|
export * from "@raqm/ui/input-group";
|
|
24
25
|
export * from "@raqm/ui/input-otp";
|
package/package.json
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raqm/ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Angular UI components with
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Standalone Angular UI components with signal-based APIs, light and dark themes, and RTL support.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Raqm UI contributors",
|
|
7
|
-
"homepage": "https://
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/KeyLitDev/RaqmUI.git",
|
|
11
|
-
"directory": "Raqm-UI/projects/ui"
|
|
12
|
-
},
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/KeyLitDev/RaqmUI/issues"
|
|
15
|
-
},
|
|
7
|
+
"homepage": "https://raqmui.meabuelgheit.workers.dev/",
|
|
16
8
|
"keywords": [
|
|
17
9
|
"angular",
|
|
18
10
|
"ui",
|
|
@@ -29,6 +21,51 @@
|
|
|
29
21
|
"**/*.css"
|
|
30
22
|
],
|
|
31
23
|
"exports": {
|
|
24
|
+
"./styles/base.css": "./styles/base.css",
|
|
25
|
+
"./styles/common.css": "./styles/common.css",
|
|
26
|
+
"./styles/overlay.css": "./styles/overlay.css",
|
|
27
|
+
"./styles/accordion.css": "./styles/accordion.css",
|
|
28
|
+
"./styles/alert-dialog.css": "./styles/alert-dialog.css",
|
|
29
|
+
"./styles/alert.css": "./styles/alert.css",
|
|
30
|
+
"./styles/attachment.css": "./styles/attachment.css",
|
|
31
|
+
"./styles/avatar.css": "./styles/avatar.css",
|
|
32
|
+
"./styles/badge.css": "./styles/badge.css",
|
|
33
|
+
"./styles/button-group.css": "./styles/button-group.css",
|
|
34
|
+
"./styles/button.css": "./styles/button.css",
|
|
35
|
+
"./styles/checkbox.css": "./styles/checkbox.css",
|
|
36
|
+
"./styles/combobox.css": "./styles/combobox.css",
|
|
37
|
+
"./styles/command.css": "./styles/command.css",
|
|
38
|
+
"./styles/context-menu.css": "./styles/context-menu.css",
|
|
39
|
+
"./styles/dialog.css": "./styles/dialog.css",
|
|
40
|
+
"./styles/drawer.css": "./styles/drawer.css",
|
|
41
|
+
"./styles/dropdown-menu.css": "./styles/dropdown-menu.css",
|
|
42
|
+
"./styles/empty.css": "./styles/empty.css",
|
|
43
|
+
"./styles/field-parts.css": "./styles/field-parts.css",
|
|
44
|
+
"./styles/field-relationships.css": "./styles/field-relationships.css",
|
|
45
|
+
"./styles/input-group-button.css": "./styles/input-group-button.css",
|
|
46
|
+
"./styles/input-group-relationships.css": "./styles/input-group-relationships.css",
|
|
47
|
+
"./styles/input-otp.css": "./styles/input-otp.css",
|
|
48
|
+
"./styles/input.css": "./styles/input.css",
|
|
49
|
+
"./styles/item.css": "./styles/item.css",
|
|
50
|
+
"./styles/kbd.css": "./styles/kbd.css",
|
|
51
|
+
"./styles/menubar.css": "./styles/menubar.css",
|
|
52
|
+
"./styles/native-select.css": "./styles/native-select.css",
|
|
53
|
+
"./styles/navigation-menu.css": "./styles/navigation-menu.css",
|
|
54
|
+
"./styles/pagination.css": "./styles/pagination.css",
|
|
55
|
+
"./styles/popover.css": "./styles/popover.css",
|
|
56
|
+
"./styles/questionnaire.css": "./styles/questionnaire.css",
|
|
57
|
+
"./styles/radio-group.css": "./styles/radio-group.css",
|
|
58
|
+
"./styles/resizable.css": "./styles/resizable.css",
|
|
59
|
+
"./styles/sheet.css": "./styles/sheet.css",
|
|
60
|
+
"./styles/sidebar.css": "./styles/sidebar.css",
|
|
61
|
+
"./styles/spinner.css": "./styles/spinner.css",
|
|
62
|
+
"./styles/switch.css": "./styles/switch.css",
|
|
63
|
+
"./styles/table.css": "./styles/table.css",
|
|
64
|
+
"./styles/tabs.css": "./styles/tabs.css",
|
|
65
|
+
"./styles/textarea.css": "./styles/textarea.css",
|
|
66
|
+
"./styles/toggle-group.css": "./styles/toggle-group.css",
|
|
67
|
+
"./styles/toggle.css": "./styles/toggle.css",
|
|
68
|
+
"./styles/tooltip.css": "./styles/tooltip.css",
|
|
32
69
|
"./theme.css": "./styles/theme.css",
|
|
33
70
|
"./package.json": {
|
|
34
71
|
"default": "./package.json"
|
|
@@ -85,10 +122,6 @@
|
|
|
85
122
|
"types": "./types/raqm-ui-card.d.ts",
|
|
86
123
|
"default": "./fesm2022/raqm-ui-card.mjs"
|
|
87
124
|
},
|
|
88
|
-
"./carousel": {
|
|
89
|
-
"types": "./types/raqm-ui-carousel.d.ts",
|
|
90
|
-
"default": "./fesm2022/raqm-ui-carousel.mjs"
|
|
91
|
-
},
|
|
92
125
|
"./checkbox": {
|
|
93
126
|
"types": "./types/raqm-ui-checkbox.d.ts",
|
|
94
127
|
"default": "./fesm2022/raqm-ui-checkbox.mjs"
|
|
@@ -133,6 +166,10 @@
|
|
|
133
166
|
"types": "./types/raqm-ui-hover-card.d.ts",
|
|
134
167
|
"default": "./fesm2022/raqm-ui-hover-card.mjs"
|
|
135
168
|
},
|
|
169
|
+
"./icon": {
|
|
170
|
+
"types": "./types/raqm-ui-icon.d.ts",
|
|
171
|
+
"default": "./fesm2022/raqm-ui-icon.mjs"
|
|
172
|
+
},
|
|
136
173
|
"./input": {
|
|
137
174
|
"types": "./types/raqm-ui-input.d.ts",
|
|
138
175
|
"default": "./fesm2022/raqm-ui-input.mjs"
|
|
@@ -268,11 +305,7 @@
|
|
|
268
305
|
"@angular/core": "^22.2.2",
|
|
269
306
|
"@angular/forms": "^22.2.2"
|
|
270
307
|
},
|
|
271
|
-
"dependencies": {
|
|
272
|
-
"embla-carousel": "8.5.2",
|
|
273
|
-
"tslib": "^2.3.0"
|
|
274
|
-
},
|
|
275
308
|
"module": "fesm2022/raqm-ui.mjs",
|
|
276
309
|
"typings": "types/raqm-ui.d.ts",
|
|
277
310
|
"type": "module"
|
|
278
|
-
}
|
|
311
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.raqm-accordion-content a{text-decoration-line:underline;text-underline-offset:3px}.raqm-accordion-content a:hover{color:var(--raqm-foreground)}.raqm-accordion-content p:not(:last-child){margin-block-end:calc(var(--raqm-spacing)*4)}.raqm-accordion-trigger{position:relative;display:flex;flex:1 1 0%;align-items:flex-start;justify-content:space-between;border:1px solid rgba(0,0,0,0);border-radius:var(--raqm-radius-lg);padding-block:calc(var(--raqm-spacing)*2.5);padding-inline:0;box-sizing:border-box;font-family:inherit;font-size:var(--raqm-font-size-sm);font-weight:var(--raqm-font-weight-medium);color:inherit;line-height:calc(var(--raqm-spacing)*5);text-align:start;background-color:rgba(0,0,0,0);outline:none;transition-property:color,background-color,border-color,box-shadow;transition-duration:var(--raqm-duration-base);transition-timing-function:var(--raqm-ease-standard)}.raqm-accordion-trigger:hover{text-decoration-line:underline}.raqm-accordion-trigger:focus-visible{border-color:var(--raqm-ring);box-shadow:0 0 0 var(--raqm-focus-ring-width) var(--raqm-focus-ring-color);outline:1px solid var(--raqm-ring)}.raqm-accordion-trigger[aria-disabled=true]{pointer-events:none;opacity:var(--raqm-disabled-opacity)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.raqm-alert-dialog-header{display:grid;grid-template-rows:auto 1fr;place-items:center;gap:calc(var(--raqm-spacing)*1.5);text-align:center}.raqm-alert-dialog-header:has(.raqm-alert-dialog-media){grid-template-rows:auto auto 1fr;column-gap:calc(var(--raqm-spacing)*4)}.raqm-alert-dialog-media{display:inline-flex;align-items:center;justify-content:center;inline-size:calc(var(--raqm-spacing)*10);block-size:calc(var(--raqm-spacing)*10);margin-block-end:calc(var(--raqm-spacing)*2);border-radius:var(--raqm-radius-md);background-color:var(--raqm-muted)}.raqm-alert-dialog-media>svg:not([class*=size-]){inline-size:calc(var(--raqm-spacing)*6);block-size:calc(var(--raqm-spacing)*6)}.raqm-alert-dialog-title{margin:0;font-size:var(--raqm-font-size-base);font-weight:var(--raqm-font-weight-medium);line-height:var(--raqm-line-height-normal)}.raqm-alert-dialog-description{margin:0;color:var(--raqm-muted-foreground);font-size:var(--raqm-font-size-sm);line-height:calc(var(--raqm-spacing)*5);text-wrap:balance}.raqm-alert-dialog-description>a{text-decoration:underline;text-underline-offset:calc(var(--raqm-spacing)*.75)}.raqm-alert-dialog-description>a:hover{color:var(--raqm-foreground)}.raqm-alert-dialog-footer{display:flex;flex-direction:column-reverse;gap:calc(var(--raqm-spacing)*2);padding:calc(var(--raqm-spacing)*6);margin-inline:calc(var(--raqm-spacing)*-6);margin-block-end:calc(var(--raqm-spacing)*-6);background-color:color-mix(in oklch, var(--raqm-muted) 50%, transparent);border-block-start:1px solid var(--raqm-border);border-end-start-radius:var(--raqm-radius-xl);border-end-end-radius:var(--raqm-radius-xl)}.raqm-alert-dialog-content[data-raqm-small] .raqm-alert-dialog-footer{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr))}@media(min-width: 40rem){.raqm-alert-dialog-content:not([data-raqm-small]) .raqm-alert-dialog-header{place-items:start;text-align:start}.raqm-alert-dialog-content:not([data-raqm-small]) .raqm-alert-dialog-header:has(.raqm-alert-dialog-media){grid-template-rows:auto 1fr}.raqm-alert-dialog-content:not([data-raqm-small]) .raqm-alert-dialog-media{grid-row:span 2}.raqm-alert-dialog-content:not([data-raqm-small]):has(.raqm-alert-dialog-media) .raqm-alert-dialog-title{grid-column-start:2}.raqm-alert-dialog-footer{flex-direction:row;justify-content:flex-end}}@media(min-width: 48rem){.raqm-alert-dialog-description{text-wrap:pretty}}@media(forced-colors: active){.raqm-alert-dialog-title{color:CanvasText}.raqm-alert-dialog-description{color:GrayText}}
|
package/styles/alert.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.raqm-alert:has(.raqm-alert-action){position:relative;padding-inline-end:calc(var(--raqm-spacing)*18)}.raqm-alert:has(>svg,>[start]){grid-template-columns:auto 1fr;column-gap:calc(var(--raqm-spacing)*2)}.raqm-alert>svg,.raqm-alert>[start]{grid-row:span 2;transform:translateY(0.125rem);color:currentColor}.raqm-alert>svg:not([class*=size-]){inline-size:calc(var(--raqm-spacing)*4);block-size:calc(var(--raqm-spacing)*4)}.raqm-alert:has(>svg,>[start])>.raqm-alert-title{grid-column-start:2}.raqm-alert[data-raqm-variant=destructive] .raqm-alert-description{color:color-mix(in oklch, var(--raqm-destructive) 90%, transparent)}.raqm-alert-description p:not(:last-child){margin-block-end:calc(var(--raqm-spacing)*4)}.raqm-alert-title a,.raqm-alert-description a{text-decoration:underline;text-underline-offset:3px}.raqm-alert-title a:hover,.raqm-alert-description a:hover{color:var(--raqm-foreground)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.raqm-attachment-media{display:flex;align-items:center;justify-content:center;flex:none;inline-size:2.5rem;aspect-ratio:1;overflow:hidden;border-radius:var(--raqm-radius-lg);background:var(--raqm-muted)}.raqm-attachment[data-raqm-small] .raqm-attachment-media{inline-size:2rem}.raqm-attachment[data-raqm-extra-small] .raqm-attachment-media{inline-size:1.75rem}.raqm-attachment[data-raqm-vertical] .raqm-attachment-media{inline-size:100%}.raqm-attachment[data-raqm-image] .raqm-attachment-media{opacity:.6}.raqm-attachment:is([data-raqm-state=idle],[data-raqm-state=done]) .raqm-attachment-media{opacity:1}.raqm-attachment[data-raqm-state=error] .raqm-attachment-media{color:var(--raqm-destructive);background:color-mix(in srgb, var(--raqm-destructive) 10%, transparent)}.raqm-attachment-media img{inline-size:100%;block-size:100%;object-fit:cover}.raqm-attachment-content{min-inline-size:0;flex:1}.raqm-attachment-title,.raqm-attachment-description{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.raqm-attachment-title{font-weight:500}.raqm-attachment-description{color:var(--raqm-muted-foreground);font-size:var(--raqm-font-size-xs)}.raqm-attachment[data-raqm-state=error] .raqm-attachment-description{color:var(--raqm-destructive)}.raqm-attachment-actions{position:relative;z-index:2;display:flex;flex:none}.raqm-attachment[data-raqm-vertical] .raqm-attachment-actions{position:absolute;inset-block-start:.75rem;inset-inline-end:.75rem}.raqm-attachment-trigger{position:absolute;inset:0;z-index:1;padding:0;border:0;background:rgba(0,0,0,0);color:inherit;font:inherit;cursor:pointer}.raqm-attachment-trigger:focus-visible{outline:2px solid var(--raqm-ring);outline-offset:2px;border-radius:inherit}.raqm-attachment-group{display:flex;gap:.75rem;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}.raqm-attachment-group::-webkit-scrollbar{display:none}.raqm-attachment-group>.raqm-attachment{flex:none;scroll-snap-align:start}@media(prefers-reduced-motion: no-preference){.raqm-attachment:is([data-raqm-state=uploading],[data-raqm-state=processing]) .raqm-attachment-title{animation:raqm-attachment-pulse 1.5s ease-in-out infinite}@keyframes raqm-attachment-pulse{50%{opacity:.55}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.raqm-avatar{position:relative;display:flex;flex-shrink:0;user-select:none;inline-size:calc(var(--raqm-spacing)*8);block-size:calc(var(--raqm-spacing)*8);border-radius:9999px}.raqm-avatar[data-raqm-small]{inline-size:calc(var(--raqm-spacing)*6);block-size:calc(var(--raqm-spacing)*6)}.raqm-avatar[data-raqm-large]{inline-size:calc(var(--raqm-spacing)*10);block-size:calc(var(--raqm-spacing)*10)}.raqm-avatar::after{content:"";position:absolute;inset:0;border:1px solid var(--raqm-border);border-radius:9999px;mix-blend-mode:var(--raqm-avatar-blend)}.raqm-avatar-image{inline-size:100%;block-size:100%;aspect-ratio:1/1;object-fit:cover;border-radius:9999px}.raqm-avatar-image[hidden]{display:none}.raqm-avatar-fallback{display:flex;inline-size:100%;block-size:100%;align-items:center;justify-content:center;border-radius:9999px;background-color:var(--raqm-muted);color:var(--raqm-muted-foreground);font-size:var(--raqm-font-size-sm)}.raqm-avatar[data-raqm-small]>.raqm-avatar-fallback{font-size:var(--raqm-font-size-xs)}.raqm-avatar-fallback[hidden]{display:none}.raqm-avatar-badge{position:absolute;inset-inline-end:0;inset-block-end:0;z-index:10;display:inline-flex;align-items:center;justify-content:center;border-radius:9999px;background-blend-mode:color;user-select:none;box-shadow:0 0 0 2px var(--raqm-background);background-color:var(--raqm-primary);color:var(--raqm-primary-foreground);inline-size:calc(var(--raqm-spacing)*2.5);block-size:calc(var(--raqm-spacing)*2.5)}.raqm-avatar-badge>svg{inline-size:calc(var(--raqm-spacing)*2);block-size:calc(var(--raqm-spacing)*2)}.raqm-avatar[data-raqm-small]>.raqm-avatar-badge{inline-size:calc(var(--raqm-spacing)*2);block-size:calc(var(--raqm-spacing)*2)}.raqm-avatar[data-raqm-small]>.raqm-avatar-badge>svg{display:none}.raqm-avatar[data-raqm-large]>.raqm-avatar-badge{inline-size:calc(var(--raqm-spacing)*3);block-size:calc(var(--raqm-spacing)*3)}.raqm-avatar[data-raqm-large]>.raqm-avatar-badge>svg{inline-size:calc(var(--raqm-spacing)*2);block-size:calc(var(--raqm-spacing)*2)}.raqm-avatar-group{display:flex}.raqm-avatar-group>*+*{margin-inline-start:calc(var(--raqm-spacing)*-2)}.raqm-avatar-group>.raqm-avatar{box-shadow:0 0 0 2px var(--raqm-background)}.raqm-avatar-group-count{position:relative;display:flex;flex-shrink:0;align-items:center;justify-content:center;border-radius:9999px;box-shadow:0 0 0 2px var(--raqm-background);background-color:var(--raqm-muted);color:var(--raqm-muted-foreground);font-size:var(--raqm-font-size-sm);inline-size:calc(var(--raqm-spacing)*8);block-size:calc(var(--raqm-spacing)*8)}.raqm-avatar-group-count>svg{inline-size:calc(var(--raqm-spacing)*4);block-size:calc(var(--raqm-spacing)*4)}.raqm-avatar-group:has(>.raqm-avatar[data-raqm-small])>.raqm-avatar-group-count{inline-size:calc(var(--raqm-spacing)*6);block-size:calc(var(--raqm-spacing)*6)}.raqm-avatar-group:has(>.raqm-avatar[data-raqm-small])>.raqm-avatar-group-count>svg{inline-size:calc(var(--raqm-spacing)*3);block-size:calc(var(--raqm-spacing)*3)}.raqm-avatar-group:has(>.raqm-avatar[data-raqm-large])>.raqm-avatar-group-count{inline-size:calc(var(--raqm-spacing)*10);block-size:calc(var(--raqm-spacing)*10)}.raqm-avatar-group:has(>.raqm-avatar[data-raqm-large])>.raqm-avatar-group-count>svg{inline-size:calc(var(--raqm-spacing)*5);block-size:calc(var(--raqm-spacing)*5)}
|
package/styles/badge.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.raqm-badge>svg{inline-size:var(--raqm-badge-icon-size, calc(var(--raqm-spacing) * 3));block-size:var(--raqm-badge-icon-size, calc(var(--raqm-spacing) * 3));pointer-events:none;flex-shrink:0}.raqm-badge>.raqm-spinner{--raqm-spinner-size: var(--raqm-badge-icon-size, calc(var(--raqm-spacing) * 3))}.raqm-badge:has([start]){padding-inline-start:calc(var(--raqm-spacing)*1.5)}.raqm-badge:has([end]){padding-inline-end:calc(var(--raqm-spacing)*1.5)}
|
package/styles/base.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--raqm-spacing: 0.25rem;--raqm-radius: 0.625rem;--raqm-radius-sm: calc(var(--raqm-radius) * 0.6);--raqm-radius-md: calc(var(--raqm-radius) * 0.8);--raqm-radius-lg: calc(var(--raqm-radius) * 1);--raqm-radius-xl: calc(var(--raqm-radius) * 1.4);--raqm-radius-2xl: calc(var(--raqm-radius) * 1.8);--raqm-font-size-xs: 0.75rem;--raqm-font-size-sm: 0.875rem;--raqm-font-size-base: 1rem;--raqm-font-size-lg: 1.125rem;--raqm-line-height-none: 1;--raqm-line-height-tight: 1.25;--raqm-line-height-snug: 1.375;--raqm-line-height-normal: 1.5;--raqm-line-height-relaxed: 1.625;--raqm-font-weight-normal: 400;--raqm-font-weight-medium: 500;--raqm-shadow-sm: 0 1px 3px 0 oklch(0 0 0 / 10%), 0 1px 2px -1px oklch(0 0 0 / 10%);--raqm-shadow-md: 0 4px 6px -1px oklch(0 0 0 / 10%), 0 2px 4px -2px oklch(0 0 0 / 10%);--raqm-shadow-lg: 0 10px 15px -3px oklch(0 0 0 / 10%), 0 4px 6px -4px oklch(0 0 0 / 10%);--raqm-focus-ring-width: 3px;--raqm-disabled-opacity: 0.5;--raqm-duration-fast: 100ms;--raqm-duration-base: 150ms;--raqm-duration-slow: 200ms;--raqm-duration-slower: 300ms;--raqm-ease-standard: cubic-bezier(0.4, 0, 0.2, 1);--raqm-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);--raqm-ease-out: cubic-bezier(0, 0, 0.2, 1);--raqm-ease-linear: linear;--raqm-ease-emphasized: cubic-bezier(0.22, 1, 0.36, 1)}:root,[data-raqm-theme=light]{color-scheme:light;--raqm-background: oklch(1 0 0);--raqm-foreground: oklch(0.145 0 0);--raqm-card: oklch(1 0 0);--raqm-card-foreground: oklch(0.145 0 0);--raqm-popover: oklch(1 0 0);--raqm-popover-foreground: oklch(0.145 0 0);--raqm-primary: oklch(0.205 0 0);--raqm-primary-foreground: oklch(0.985 0 0);--raqm-secondary: oklch(0.97 0 0);--raqm-secondary-foreground: oklch(0.205 0 0);--raqm-muted: oklch(0.97 0 0);--raqm-muted-foreground: oklch(0.556 0 0);--raqm-accent: oklch(0.97 0 0);--raqm-accent-foreground: oklch(0.205 0 0);--raqm-destructive: oklch(0.577 0.245 27.325);--raqm-destructive-foreground: oklch(0.97 0.01 17);--raqm-border: oklch(0.922 0 0);--raqm-input: oklch(0.922 0 0);--raqm-ring: oklch(0.708 0 0);--raqm-white: oklch(1 0 0);--raqm-primary-hover: color-mix(in oklch, var(--raqm-primary) 80%, transparent);--raqm-secondary-hover: color-mix(in oklch, var(--raqm-secondary), var(--raqm-foreground) 5%);--raqm-control-bg: transparent;--raqm-input-disabled-bg: color-mix(in oklch, var(--raqm-input) 50%, transparent);--raqm-invalid-border: var(--raqm-destructive);--raqm-invalid-ring: color-mix(in oklch, var(--raqm-destructive) 20%, transparent);--raqm-focus-ring-color: color-mix(in oklch, var(--raqm-ring) 50%, transparent);--raqm-outline-border: var(--raqm-border);--raqm-outline-hover: var(--raqm-muted);--raqm-tooltip-kbd-bg: color-mix(in oklch, var(--raqm-background) 20%, transparent);--raqm-theme-light-weight: 100%;--raqm-ghost-hover-alpha: 100%;--raqm-destructive-bg-alpha: 10%;--raqm-destructive-hover-alpha: 20%;--raqm-destructive-focus-alpha: 20%;--raqm-avatar-blend: darken;--raqm-control-bg-alpha: 0%;--raqm-control-hover-alpha: 0%;--raqm-field-checked-border-alpha: 30%;--raqm-field-checked-bg-alpha: 5%;--raqm-switch-unchecked-alpha: 100%;--raqm-check-mark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fafafa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>");--raqm-mixed-mark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fafafa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14'/></svg>");--raqm-native-select-chevron: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>")}[data-raqm-theme=dark]{color-scheme:dark;--raqm-background: oklch(0.145 0 0);--raqm-foreground: oklch(0.985 0 0);--raqm-card: oklch(0.205 0 0);--raqm-card-foreground: oklch(0.985 0 0);--raqm-popover: oklch(0.205 0 0);--raqm-popover-foreground: oklch(0.985 0 0);--raqm-primary: oklch(0.922 0 0);--raqm-primary-foreground: oklch(0.205 0 0);--raqm-secondary: oklch(0.269 0 0);--raqm-secondary-foreground: oklch(0.985 0 0);--raqm-muted: oklch(0.269 0 0);--raqm-muted-foreground: oklch(0.708 0 0);--raqm-accent: oklch(0.269 0 0);--raqm-accent-foreground: oklch(0.985 0 0);--raqm-destructive: oklch(0.704 0.191 22.216);--raqm-destructive-foreground: oklch(0.58 0.22 27);--raqm-border: oklch(1 0 0 / 10%);--raqm-input: oklch(1 0 0 / 15%);--raqm-ring: oklch(0.556 0 0);--raqm-primary-hover: color-mix(in oklch, var(--raqm-primary) 80%, transparent);--raqm-secondary-hover: color-mix(in oklch, var(--raqm-secondary), var(--raqm-foreground) 5%);--raqm-control-bg: color-mix(in oklch, var(--raqm-input) 30%, transparent);--raqm-input-disabled-bg: color-mix(in oklch, var(--raqm-input) 80%, transparent);--raqm-invalid-border: color-mix(in oklch, var(--raqm-destructive) 50%, transparent);--raqm-invalid-ring: color-mix(in oklch, var(--raqm-destructive) 40%, transparent);--raqm-focus-ring-color: color-mix(in oklch, var(--raqm-ring) 50%, transparent);--raqm-outline-border: var(--raqm-input);--raqm-outline-hover: color-mix(in oklch, var(--raqm-input) 50%, transparent);--raqm-tooltip-kbd-bg: color-mix(in oklch, var(--raqm-background) 10%, transparent);--raqm-theme-light-weight: 0%;--raqm-ghost-hover-alpha: 50%;--raqm-destructive-bg-alpha: 20%;--raqm-destructive-hover-alpha: 30%;--raqm-destructive-focus-alpha: 40%;--raqm-avatar-blend: lighten;--raqm-control-bg-alpha: 30%;--raqm-control-hover-alpha: 50%;--raqm-field-checked-border-alpha: 20%;--raqm-field-checked-bg-alpha: 10%;--raqm-switch-unchecked-alpha: 80%;--raqm-check-mark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171717' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>");--raqm-mixed-mark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171717' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14'/></svg>");--raqm-native-select-chevron: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1a1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>")}@media(prefers-reduced-motion: reduce){:root{--raqm-duration-fast: 0s;--raqm-duration-base: 0s;--raqm-duration-slow: 0s;--raqm-duration-slower: 0s}}
|