@raqm/ui 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/LICENSE +21 -0
  3. package/NOTICE.md +28 -0
  4. package/README.md +126 -3
  5. package/combobox/README.md +17 -0
  6. package/fesm2022/raqm-ui-accordion.mjs +414 -0
  7. package/fesm2022/raqm-ui-accordion.mjs.map +1 -0
  8. package/fesm2022/raqm-ui-alert-dialog.mjs +457 -0
  9. package/fesm2022/raqm-ui-alert-dialog.mjs.map +1 -0
  10. package/fesm2022/raqm-ui-alert.mjs +195 -0
  11. package/fesm2022/raqm-ui-alert.mjs.map +1 -0
  12. package/fesm2022/raqm-ui-aspect-ratio.mjs +66 -0
  13. package/fesm2022/raqm-ui-aspect-ratio.mjs.map +1 -0
  14. package/fesm2022/raqm-ui-attachment.mjs +435 -0
  15. package/fesm2022/raqm-ui-attachment.mjs.map +1 -0
  16. package/fesm2022/raqm-ui-avatar.mjs +337 -0
  17. package/fesm2022/raqm-ui-avatar.mjs.map +1 -0
  18. package/fesm2022/raqm-ui-badge.mjs +68 -0
  19. package/fesm2022/raqm-ui-badge.mjs.map +1 -0
  20. package/fesm2022/raqm-ui-breadcrumb.mjs +309 -0
  21. package/fesm2022/raqm-ui-breadcrumb.mjs.map +1 -0
  22. package/fesm2022/raqm-ui-button-group.mjs +138 -0
  23. package/fesm2022/raqm-ui-button-group.mjs.map +1 -0
  24. package/fesm2022/raqm-ui-button.mjs +295 -0
  25. package/fesm2022/raqm-ui-button.mjs.map +1 -0
  26. package/fesm2022/raqm-ui-calendar.mjs +1394 -0
  27. package/fesm2022/raqm-ui-calendar.mjs.map +1 -0
  28. package/fesm2022/raqm-ui-card.mjs +331 -0
  29. package/fesm2022/raqm-ui-card.mjs.map +1 -0
  30. package/fesm2022/raqm-ui-carousel.mjs +410 -0
  31. package/fesm2022/raqm-ui-carousel.mjs.map +1 -0
  32. package/fesm2022/raqm-ui-checkbox.mjs +86 -0
  33. package/fesm2022/raqm-ui-checkbox.mjs.map +1 -0
  34. package/fesm2022/raqm-ui-collapsible.mjs +266 -0
  35. package/fesm2022/raqm-ui-collapsible.mjs.map +1 -0
  36. package/fesm2022/raqm-ui-combobox.mjs +1584 -0
  37. package/fesm2022/raqm-ui-combobox.mjs.map +1 -0
  38. package/fesm2022/raqm-ui-command.mjs +1210 -0
  39. package/fesm2022/raqm-ui-command.mjs.map +1 -0
  40. package/fesm2022/raqm-ui-context-menu.mjs +723 -0
  41. package/fesm2022/raqm-ui-context-menu.mjs.map +1 -0
  42. package/fesm2022/raqm-ui-dialog.mjs +1214 -0
  43. package/fesm2022/raqm-ui-dialog.mjs.map +1 -0
  44. package/fesm2022/raqm-ui-drawer.mjs +687 -0
  45. package/fesm2022/raqm-ui-drawer.mjs.map +1 -0
  46. package/fesm2022/raqm-ui-dropdown-menu.mjs +1168 -0
  47. package/fesm2022/raqm-ui-dropdown-menu.mjs.map +1 -0
  48. package/fesm2022/raqm-ui-empty.mjs +272 -0
  49. package/fesm2022/raqm-ui-empty.mjs.map +1 -0
  50. package/fesm2022/raqm-ui-field.mjs +517 -0
  51. package/fesm2022/raqm-ui-field.mjs.map +1 -0
  52. package/fesm2022/raqm-ui-hover-card.mjs +828 -0
  53. package/fesm2022/raqm-ui-hover-card.mjs.map +1 -0
  54. package/fesm2022/raqm-ui-input-group.mjs +270 -0
  55. package/fesm2022/raqm-ui-input-group.mjs.map +1 -0
  56. package/fesm2022/raqm-ui-input-otp.mjs +788 -0
  57. package/fesm2022/raqm-ui-input-otp.mjs.map +1 -0
  58. package/fesm2022/raqm-ui-input.mjs +73 -0
  59. package/fesm2022/raqm-ui-input.mjs.map +1 -0
  60. package/fesm2022/raqm-ui-item.mjs +495 -0
  61. package/fesm2022/raqm-ui-item.mjs.map +1 -0
  62. package/fesm2022/raqm-ui-kbd.mjs +80 -0
  63. package/fesm2022/raqm-ui-kbd.mjs.map +1 -0
  64. package/fesm2022/raqm-ui-label.mjs +44 -0
  65. package/fesm2022/raqm-ui-label.mjs.map +1 -0
  66. package/fesm2022/raqm-ui-menubar.mjs +536 -0
  67. package/fesm2022/raqm-ui-menubar.mjs.map +1 -0
  68. package/fesm2022/raqm-ui-native-select.mjs +131 -0
  69. package/fesm2022/raqm-ui-native-select.mjs.map +1 -0
  70. package/fesm2022/raqm-ui-navigation-menu.mjs +1399 -0
  71. package/fesm2022/raqm-ui-navigation-menu.mjs.map +1 -0
  72. package/fesm2022/raqm-ui-overlay-internal.mjs +185 -0
  73. package/fesm2022/raqm-ui-overlay-internal.mjs.map +1 -0
  74. package/fesm2022/raqm-ui-pagination.mjs +440 -0
  75. package/fesm2022/raqm-ui-pagination.mjs.map +1 -0
  76. package/fesm2022/raqm-ui-popover.mjs +1495 -0
  77. package/fesm2022/raqm-ui-popover.mjs.map +1 -0
  78. package/fesm2022/raqm-ui-progress.mjs +369 -0
  79. package/fesm2022/raqm-ui-progress.mjs.map +1 -0
  80. package/fesm2022/raqm-ui-questionnaire.mjs +1005 -0
  81. package/fesm2022/raqm-ui-questionnaire.mjs.map +1 -0
  82. package/fesm2022/raqm-ui-radio-group.mjs +151 -0
  83. package/fesm2022/raqm-ui-radio-group.mjs.map +1 -0
  84. package/fesm2022/raqm-ui-resizable.mjs +439 -0
  85. package/fesm2022/raqm-ui-resizable.mjs.map +1 -0
  86. package/fesm2022/raqm-ui-scroll-area.mjs +510 -0
  87. package/fesm2022/raqm-ui-scroll-area.mjs.map +1 -0
  88. package/fesm2022/raqm-ui-select.mjs +1073 -0
  89. package/fesm2022/raqm-ui-select.mjs.map +1 -0
  90. package/fesm2022/raqm-ui-separator.mjs +103 -0
  91. package/fesm2022/raqm-ui-separator.mjs.map +1 -0
  92. package/fesm2022/raqm-ui-sheet.mjs +411 -0
  93. package/fesm2022/raqm-ui-sheet.mjs.map +1 -0
  94. package/fesm2022/raqm-ui-sidebar.mjs +1784 -0
  95. package/fesm2022/raqm-ui-sidebar.mjs.map +1 -0
  96. package/fesm2022/raqm-ui-skeleton.mjs +50 -0
  97. package/fesm2022/raqm-ui-skeleton.mjs.map +1 -0
  98. package/fesm2022/raqm-ui-slider.mjs +609 -0
  99. package/fesm2022/raqm-ui-slider.mjs.map +1 -0
  100. package/fesm2022/raqm-ui-spinner.mjs +137 -0
  101. package/fesm2022/raqm-ui-spinner.mjs.map +1 -0
  102. package/fesm2022/raqm-ui-switch.mjs +109 -0
  103. package/fesm2022/raqm-ui-switch.mjs.map +1 -0
  104. package/fesm2022/raqm-ui-table.mjs +271 -0
  105. package/fesm2022/raqm-ui-table.mjs.map +1 -0
  106. package/fesm2022/raqm-ui-tabs.mjs +536 -0
  107. package/fesm2022/raqm-ui-tabs.mjs.map +1 -0
  108. package/fesm2022/raqm-ui-textarea.mjs +37 -0
  109. package/fesm2022/raqm-ui-textarea.mjs.map +1 -0
  110. package/fesm2022/raqm-ui-toast.mjs +918 -0
  111. package/fesm2022/raqm-ui-toast.mjs.map +1 -0
  112. package/fesm2022/raqm-ui-toggle-group.mjs +462 -0
  113. package/fesm2022/raqm-ui-toggle-group.mjs.map +1 -0
  114. package/fesm2022/raqm-ui-toggle.mjs +158 -0
  115. package/fesm2022/raqm-ui-toggle.mjs.map +1 -0
  116. package/fesm2022/raqm-ui-tooltip.mjs +1226 -0
  117. package/fesm2022/raqm-ui-tooltip.mjs.map +1 -0
  118. package/fesm2022/raqm-ui.mjs +50 -0
  119. package/input-otp/README.md +12 -0
  120. package/package.json +275 -3
  121. package/styles/theme.css +4324 -0
  122. package/types/raqm-ui-accordion.d.ts +124 -0
  123. package/types/raqm-ui-alert-dialog.d.ts +81 -0
  124. package/types/raqm-ui-alert.d.ts +29 -0
  125. package/types/raqm-ui-aspect-ratio.d.ts +13 -0
  126. package/types/raqm-ui-attachment.d.ts +72 -0
  127. package/types/raqm-ui-avatar.d.ts +67 -0
  128. package/types/raqm-ui-badge.d.ts +20 -0
  129. package/types/raqm-ui-breadcrumb.d.ts +35 -0
  130. package/types/raqm-ui-button-group.d.ts +27 -0
  131. package/types/raqm-ui-button.d.ts +80 -0
  132. package/types/raqm-ui-calendar.d.ts +359 -0
  133. package/types/raqm-ui-card.d.ts +34 -0
  134. package/types/raqm-ui-carousel.d.ts +81 -0
  135. package/types/raqm-ui-checkbox.d.ts +24 -0
  136. package/types/raqm-ui-collapsible.d.ts +72 -0
  137. package/types/raqm-ui-combobox.d.ts +405 -0
  138. package/types/raqm-ui-command.d.ts +256 -0
  139. package/types/raqm-ui-context-menu.d.ts +196 -0
  140. package/types/raqm-ui-dialog.d.ts +232 -0
  141. package/types/raqm-ui-drawer.d.ts +121 -0
  142. package/types/raqm-ui-dropdown-menu.d.ts +319 -0
  143. package/types/raqm-ui-empty.d.ts +35 -0
  144. package/types/raqm-ui-field.d.ts +88 -0
  145. package/types/raqm-ui-hover-card.d.ts +139 -0
  146. package/types/raqm-ui-input-group.d.ts +45 -0
  147. package/types/raqm-ui-input-otp.d.ts +197 -0
  148. package/types/raqm-ui-input.d.ts +16 -0
  149. package/types/raqm-ui-item.d.ts +71 -0
  150. package/types/raqm-ui-kbd.d.ts +12 -0
  151. package/types/raqm-ui-label.d.ts +6 -0
  152. package/types/raqm-ui-menubar.d.ts +159 -0
  153. package/types/raqm-ui-native-select.d.ts +23 -0
  154. package/types/raqm-ui-navigation-menu.d.ts +230 -0
  155. package/types/raqm-ui-overlay-internal.d.ts +5 -0
  156. package/types/raqm-ui-pagination.d.ts +84 -0
  157. package/types/raqm-ui-popover.d.ts +235 -0
  158. package/types/raqm-ui-progress.d.ts +79 -0
  159. package/types/raqm-ui-questionnaire.d.ts +217 -0
  160. package/types/raqm-ui-radio-group.d.ts +48 -0
  161. package/types/raqm-ui-resizable.d.ts +98 -0
  162. package/types/raqm-ui-scroll-area.d.ts +132 -0
  163. package/types/raqm-ui-select.d.ts +205 -0
  164. package/types/raqm-ui-separator.d.ts +21 -0
  165. package/types/raqm-ui-sheet.d.ts +79 -0
  166. package/types/raqm-ui-sidebar.d.ts +285 -0
  167. package/types/raqm-ui-skeleton.d.ts +6 -0
  168. package/types/raqm-ui-slider.d.ts +129 -0
  169. package/types/raqm-ui-spinner.d.ts +32 -0
  170. package/types/raqm-ui-switch.d.ts +32 -0
  171. package/types/raqm-ui-table.d.ts +36 -0
  172. package/types/raqm-ui-tabs.d.ts +154 -0
  173. package/types/raqm-ui-textarea.d.ts +6 -0
  174. package/types/raqm-ui-toast.d.ts +190 -0
  175. package/types/raqm-ui-toggle-group.d.ts +167 -0
  176. package/types/raqm-ui-toggle.d.ts +42 -0
  177. package/types/raqm-ui-tooltip.d.ts +207 -0
  178. package/types/raqm-ui.d.ts +50 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"raqm-ui-dialog.mjs","names":[],"sources":["../../../projects/ui/dialog/dialog-context.ts","../../../projects/ui/dialog/dialog-effects.ts","../../../projects/ui/dialog/dialog-model.ts","../../../projects/ui/dialog/dialog-focus.ts","../../../projects/ui/dialog/dialog-overlay.ts","../../../projects/ui/dialog/dialog-registration.ts","../../../projects/ui/dialog/dialog-view-state.ts","../../../projects/ui/dialog/dialog.component.ts","../../../projects/ui/dialog/dialog.component.html","../../../projects/ui/dialog/dialog.directive.ts","../../../projects/ui/dialog/public-api.ts"],"sourcesContent":["import { InjectionToken, Signal, TemplateRef, WritableSignal, inject } from '@angular/core';\r\nimport { ScrollStrategyOptions, type OverlayRef, type ScrollStrategy } from '@angular/cdk/overlay';\r\n\r\n/** Stable reference to the dialog one registered trigger. */\r\nexport interface RaqmDialogTriggerRef {\r\n readonly element: HTMLButtonElement;\r\n readonly disabled: boolean;\r\n}\r\n\r\n/** The typed registration contract a dialog root publishes to its descendants. */\r\nexport interface RaqmDialogContext {\r\n readonly open: Signal<boolean>;\r\n readonly dialogId: Signal<string | null>;\r\n registerTrigger(ref: RaqmDialogTriggerRef): void;\r\n unregisterTrigger(ref: RaqmDialogTriggerRef): void;\r\n registerContent(template: TemplateRef<unknown>): void;\r\n unregisterContent(template: TemplateRef<unknown>): void;\r\n /** Registers a popped title element so the container can point `aria-labelledby` at it. */\r\n registerTitle(element: HTMLElement): void;\r\n unregisterTitle(element: HTMLElement): void;\r\n /** Registers a popped description element so the container can point `aria-describedby` at it. */\r\n registerDescription(element: HTMLElement): void;\r\n unregisterDescription(element: HTMLElement): void;\r\n /** Toggles the dialog from a trigger activation (never opens a disabled root). */\r\n toggleFromTrigger(ref: RaqmDialogTriggerRef): void;\r\n /** Requests an animated close as a user action (close control / Escape / backdrop). */\r\n closeFromUser(): void;\r\n}\r\n\r\n/** @internal Injection token for the parent dialog root; injected optionally. */\r\nexport const RAQM_DIALOG = new InjectionToken<RaqmDialogContext>('RaqmDialog');\r\n\r\n/** @internal Shipped modal-family specialization policy; not application configuration. */\r\nexport interface RaqmDialogPolicy {\r\n readonly role: 'dialog' | 'alertdialog';\r\n readonly contentClass: string;\r\n readonly small?: WritableSignal<boolean>;\r\n readonly touchOpening: WritableSignal<boolean>;\r\n readonly dismissOnBackdrop: boolean;\r\n readonly side?: WritableSignal<'top' | 'right' | 'bottom' | 'left'>;\r\n readonly paneClass?: string;\r\n readonly backdropClass?: string;\r\n readonly exitAnimationMs?: number;\r\n readonly allowWithoutTrigger?: boolean;\r\n}\r\n\r\n/** @internal Integration hook for shipped modal families sharing Dialog's lifecycle. */\r\nexport const RAQM_DIALOG_POLICY = new InjectionToken<RaqmDialogPolicy>('RaqmDialogPolicy');\r\n\r\n/** Application-scoped refcounted document scroll lock shared by all Raqm dialogs. */\r\nexport class RaqmDialogScrollLock {\r\n private readonly strategy: ScrollStrategy;\r\n\r\n private active = 0;\r\n\r\n constructor(options: ScrollStrategyOptions) {\r\n this.strategy = options.block();\r\n }\r\n\r\n // enable() is idempotent, so every acquire re-locks a page that became scrollable later.\r\n acquire(): void {\r\n this.active += 1;\r\n this.strategy.enable();\r\n }\r\n\r\n /** Releases the shared lock; only the last release disables the strategy. */\r\n release(): void {\r\n if (this.active === 0) {\r\n return;\r\n }\r\n this.active -= 1;\r\n if (this.active === 0) {\r\n this.strategy.disable();\r\n }\r\n }\r\n\r\n /** Creates a per-dialog idempotent lease over the shared lock. */\r\n createLease(): ScrollStrategy {\r\n return new RaqmDialogScrollLease(this);\r\n }\r\n}\r\n\r\n/** One dialog lease over the shared scroll lock; acquire and release are idempotent. */\r\nexport class RaqmDialogScrollLease implements ScrollStrategy {\r\n private held = false;\r\n\r\n private readonly lock: RaqmDialogScrollLock;\r\n\r\n constructor(lock: RaqmDialogScrollLock) {\r\n this.lock = lock;\r\n }\r\n\r\n /** The CDK attaches the lease to the overlay; the shared lock needs no reference. */\r\n attach(_overlayRef: OverlayRef): void {}\r\n\r\n enable(): void {\r\n if (this.held) {\r\n return;\r\n }\r\n this.held = true;\r\n this.lock.acquire();\r\n }\r\n\r\n disable(): void {\r\n if (!this.held) {\r\n return;\r\n }\r\n this.held = false;\r\n this.lock.release();\r\n }\r\n\r\n /** Detach is an idempotent alias of {@link disable} for CDK disposal paths. */\r\n detach(): void {\r\n this.disable();\r\n }\r\n}\r\n\r\n/** @internal Root-scoped token so every dialog root shares one scroll-lock count. */\r\nexport const RAQM_DIALOG_SCROLL_LOCK = new InjectionToken<RaqmDialogScrollLock>(\r\n 'RaqmDialogScrollLock',\r\n {\r\n providedIn: 'root',\r\n factory: () => new RaqmDialogScrollLock(inject(ScrollStrategyOptions)),\r\n },\r\n);\r\n","// Dialog effects: the open policy, the panel class hook, container labelling, direction\r\n// and the development close-label check, registered from the component constructor.\r\n\r\nimport { effect, isDevMode, untracked } from '@angular/core';\r\n\r\nexport interface RaqmDialogEffectsHost {\r\n openValue(): boolean;\r\n disabled(): boolean;\r\n canOpen(): boolean;\r\n panelClass(): string | undefined;\r\n label(): string | undefined;\r\n dir(): 'ltr' | 'rtl' | undefined;\r\n closeButtonVisible(): boolean;\r\n closeLabelText(): string | undefined;\r\n syncOpen(next: boolean): void;\r\n applyPanelClass(panelClass: string | undefined): void;\r\n syncContainerAria(): void;\r\n applyDirection(): void;\r\n}\r\n\r\nexport function connectDialogEffects(host: RaqmDialogEffectsHost): void {\r\n // Derived eligibility drives the transition, so a late registration still opens.\r\n effect(() => {\r\n const next = host.openValue() && !host.disabled() && host.canOpen();\r\n untracked(() => host.syncOpen(next));\r\n });\r\n\r\n effect(() => {\r\n const panelClass = host.panelClass();\r\n untracked(() => host.applyPanelClass(panelClass));\r\n });\r\n\r\n effect(() => {\r\n host.label();\r\n untracked(() => host.syncContainerAria());\r\n });\r\n\r\n // Re-resolves the live direction when `dir` changes and pushes it to both the\r\n // content surface and the public overlay.\r\n effect(() => {\r\n host.dir();\r\n untracked(() => host.applyDirection());\r\n });\r\n\r\n // A visible close control must carry an application name; report it in development.\r\n effect(() => {\r\n if (isDevMode() && host.closeButtonVisible() && !host.closeLabelText()) {\r\n console.error(\r\n '[raqm-dialog-family] The close control has no accessible name. Provide `closeLabel`.',\r\n );\r\n }\r\n });\r\n}\r\n","// Dialog model: the shared CDK class names, the focus candidates, the motion constant and\r\n// the small pure helpers every dialog file reads.\r\n\r\nimport { Directionality } from '@angular/cdk/bidi';\r\n\r\n// The CDK overlay pane class; the visual surface lives on `.raqm-dialog-content`.\r\nexport const PANE_CLASS = 'raqm-dialog-overlay-pane';\r\n\r\nexport const BACKDROP_CLASS = 'raqm-dialog-overlay-backdrop';\r\n\r\n// The container, not this component, is the role=dialog node carrying the accessible name.\r\nexport const CONTAINER_CLASS = 'cdk-dialog-container';\r\n\r\n// Candidates for the root-owned focus scan; the CDK checker decides actual tabbability.\r\nexport const FOCUSABLE_SELECTOR =\r\n 'a[href], button, input, select, textarea, [tabindex], [contenteditable=\"true\"]';\r\n\r\n// Must stay in step with the `--raqm-duration-fast` exit transition in the SCSS.\r\nexport const EXIT_ANIMATION_MS = 100;\r\n\r\n// Read per decision so no stale value is cached; every teardown has an immediate fallback.\r\nexport function prefersReducedMotion(): boolean {\r\n return typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;\r\n}\r\n\r\n// Validates a `dir` binding; anything unknown means the nearest direction.\r\nexport function toDir(value: unknown): 'ltr' | 'rtl' | undefined {\r\n return value === 'ltr' || value === 'rtl' ? value : undefined;\r\n}\r\n\r\n// getComputedStyle is read at call time so an RTL ancestor is not frozen to LTR before\r\n// attachment; an explicit `dir` wins, then the nearest computed direction, then the CDK Bidi value.\r\nexport function resolveDialogDirection(\r\n dir: 'ltr' | 'rtl' | undefined,\r\n element: HTMLElement,\r\n directionality: Directionality | null,\r\n): 'ltr' | 'rtl' {\r\n const explicit = dir;\r\n if (explicit === 'ltr' || explicit === 'rtl') {\r\n return explicit;\r\n }\r\n const computedStyle = getComputedStyle(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 directionality?.value ?? 'ltr';\r\n}\r\n","// Dialog focus: initial focus placement, the origin-focus restore on a user close and the\r\n// development accessible-name check.\r\n\r\nimport { FocusMonitor, InteractivityChecker } from '@angular/cdk/a11y';\r\nimport { Dialog } from '@angular/cdk/dialog';\r\nimport { isDevMode } from '@angular/core';\r\n\r\nimport { RaqmDialogTriggerRef } from './dialog-context';\r\nimport { CONTAINER_CLASS, FOCUSABLE_SELECTOR } from './dialog-model';\r\nimport { RaqmDialogState } from './dialog-view-state';\r\n\r\nexport interface RaqmDialogFocusHost {\r\n /** The live overlay pane element, or `undefined` while no dialog is attached. */\r\n pane(): HTMLElement | undefined;\r\n trigger(): RaqmDialogTriggerRef | null;\r\n hasTitle(): boolean;\r\n label(): string | undefined;\r\n touchOpening(): boolean | undefined;\r\n}\r\n\r\nexport class RaqmDialogFocus {\r\n constructor(\r\n private readonly dialogService: Dialog,\r\n private readonly focusMonitor: FocusMonitor,\r\n private readonly checker: InteractivityChecker,\r\n private readonly state: RaqmDialogState,\r\n private readonly host: RaqmDialogFocusHost,\r\n ) {}\r\n\r\n // Restores focus only on a user close, and only if the origin sits inside an open top dialog.\r\n maybeRestoreOriginFocus(): void {\r\n if (this.state.destroyed || this.state.suppressFocusRestore) {\r\n return;\r\n }\r\n const trigger = this.host.trigger()?.element;\r\n const origin = trigger ?? this.state.triggerlessOrigin;\r\n if (!origin || !origin.isConnected) {\r\n return;\r\n }\r\n // The fallback may have become disabled, hidden or inert; never restore to an unusable target.\r\n if (!trigger && (origin.closest('[inert]') || !this.checker.isFocusable(origin))) {\r\n return;\r\n }\r\n const active = origin.ownerDocument.activeElement;\r\n const remaining = this.dialogService.openDialogs;\r\n if (remaining.length > 0) {\r\n const topSurface = remaining[remaining.length - 1].overlayRef.overlayElement;\r\n if (!topSurface.contains(origin)) {\r\n return;\r\n }\r\n if (active !== null && topSurface.contains(active)) {\r\n return;\r\n }\r\n } else if (active !== null && active !== origin.ownerDocument.body) {\r\n return;\r\n }\r\n this.focusMonitor.focusVia(origin, this.state.lastCloseOrigin ?? 'program');\r\n }\r\n\r\n // Moves initial focus to the first tabbable control, falling back to the container.\r\n focusInitial(): void {\r\n const overlayElement = this.host.pane();\r\n if (!overlayElement) {\r\n return;\r\n }\r\n const container =\r\n overlayElement.querySelector<HTMLElement>(`.${CONTAINER_CLASS}`) ?? overlayElement;\r\n const target = this.host.touchOpening() ? container : this.firstTabbable(container);\r\n (target ?? container).focus();\r\n }\r\n\r\n validateAccessibleName(): void {\r\n if (!isDevMode()) {\r\n return;\r\n }\r\n if (!this.host.hasTitle() && !this.host.label()) {\r\n console.error(\r\n '[raqm-dialog] The dialog has no accessible name. Provide a `[raqm-dialog-title]` or an explicit `label`.',\r\n );\r\n }\r\n }\r\n\r\n private firstTabbable(root: HTMLElement): HTMLElement | null {\r\n const candidates = root.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR);\r\n for (const candidate of Array.from(candidates)) {\r\n if (this.checker.isTabbable(candidate)) {\r\n return candidate;\r\n }\r\n }\r\n return null;\r\n }\r\n}\r\n","// Dialog pane lifecycle: the CDK dialog creation, the single animated close path with its\r\n// bounded exit timer, teardown, the owned subscriptions and the panel class hook.\r\n\r\nimport { Injector, TemplateRef, afterNextRender } from '@angular/core';\r\n\r\nimport { type FocusOrigin } from '@angular/cdk/a11y';\r\nimport { Dialog, DialogConfig, DialogRef } from '@angular/cdk/dialog';\r\nimport { hasModifierKey } from '@angular/cdk/keycodes';\r\nimport { registerOverlayOwnership } from '@raqm/ui/overlay-internal';\r\n\r\nimport { RaqmDialogPolicy, RaqmDialogScrollLock, RaqmDialogTriggerRef } from './dialog-context';\r\nimport {\r\n BACKDROP_CLASS,\r\n EXIT_ANIMATION_MS,\r\n PANE_CLASS,\r\n prefersReducedMotion,\r\n} from './dialog-model';\r\nimport { RaqmDialogState } from './dialog-view-state';\r\n\r\nexport interface RaqmDialogOverlayHost {\r\n /** The declarative host; owned focus restore and the overlay pane derive from it. */\r\n root: HTMLElement;\r\n /** The owned id of the role=dialog container. */\r\n readonly dialogRootId: string;\r\n trigger(): RaqmDialogTriggerRef | null;\r\n contentTemplate(): TemplateRef<unknown> | null;\r\n panelTemplate(): TemplateRef<unknown> | undefined;\r\n panelClass(): string | undefined;\r\n openValue(): boolean;\r\n setOpenValue(value: boolean): void;\r\n direction(): 'ltr' | 'rtl';\r\n syncContainerAria(): void;\r\n focusInitial(): void;\r\n validateAccessibleName(): void;\r\n maybeRestoreOriginFocus(): void;\r\n}\r\n\r\nexport class RaqmDialogOverlay {\r\n private dialogRef: DialogRef<unknown, unknown> | undefined;\r\n\r\n // The dialog whose teardown is waiting behind the bounded exit animation.\r\n private pendingDialogRef: DialogRef<unknown, unknown> | undefined;\r\n\r\n private exitTimer: ReturnType<typeof setTimeout> | undefined;\r\n\r\n // The focus origin of the in-flight close (drives the restored focus style).\r\n private pendingCloseOrigin: FocusOrigin | undefined;\r\n\r\n // Set while finalizeClose runs DialogRef.close(), so the synchronous closed emission reads as internal.\r\n private finalizing = false;\r\n\r\n private backdropSubscription: { unsubscribe(): void } | undefined;\r\n private keydownSubscription: { unsubscribe(): void } | undefined;\r\n private closedSubscription: { unsubscribe(): void } | undefined;\r\n\r\n // Tracked so a changed `panelClass` can replace (never accumulate) the app hook.\r\n private appliedPaneClasses: string[] = [];\r\n\r\n constructor(\r\n private readonly dialogService: Dialog,\r\n private readonly scrollLock: RaqmDialogScrollLock,\r\n private readonly injector: Injector,\r\n private readonly state: RaqmDialogState,\r\n private readonly policy: RaqmDialogPolicy | null,\r\n private readonly host: RaqmDialogOverlayHost,\r\n ) {}\r\n\r\n get element(): HTMLElement | undefined {\r\n return this.dialogRef?.overlayRef.overlayElement;\r\n }\r\n\r\n // The single reaction to the derived open state.\r\n syncOpen(next: boolean): void {\r\n if (next === this.state.currentOpen) {\r\n return;\r\n }\r\n if (next) {\r\n this.state.currentOpen = true;\r\n this.beginOpen();\r\n return;\r\n }\r\n this.state.currentOpen = false;\r\n this.beginClose();\r\n }\r\n\r\n private beginOpen(): void {\r\n const trigger = this.host.trigger();\r\n const template = this.host.contentTemplate();\r\n const panelTemplate = this.host.panelTemplate();\r\n if ((!trigger && !this.policy?.allowWithoutTrigger) || !template || !panelTemplate) {\r\n this.state.currentOpen = false;\r\n return;\r\n }\r\n // A rapid reopen cancels a dialog still playing its exit animation.\r\n this.flushPendingDispose();\r\n this.releaseSubscriptions();\r\n const generation = ++this.state.openGeneration;\r\n // Enter motion is set before the container exists, so the first painted frame has it.\r\n this.state.closing.set(false);\r\n this.state.entering.set(true);\r\n this.state.attached.set(false);\r\n this.state.dialogId.set(this.host.dialogRootId);\r\n this.pendingCloseOrigin = undefined;\r\n this.state.suppressFocusRestore = false;\r\n\r\n // Resolved before creating the dialog, so the CDK overlay and the content surface agree.\r\n const dir = this.host.direction();\r\n this.state.panelDir.set(dir);\r\n\r\n const config: DialogConfig<unknown, DialogRef<unknown, unknown>> = {\r\n id: this.host.dialogRootId,\r\n role: this.policy?.role ?? 'dialog',\r\n ariaModal: true,\r\n hasBackdrop: true,\r\n backdropClass: this.policy?.backdropClass ?? BACKDROP_CLASS,\r\n panelClass: this.paneClasses(this.host.panelClass()),\r\n // Sheet owns a viewport-sized, pointer-transparent pane; its edge surface alone takes pointer events.\r\n width: this.policy?.side ? '100%' : undefined,\r\n height: this.policy?.side ? '100%' : undefined,\r\n // Auto-close is disabled so the root marks the exiting surface inert and animates before closing.\r\n disableClose: true,\r\n closeOnNavigation: true,\r\n direction: dir,\r\n scrollStrategy: this.scrollLock.createLease(),\r\n // The root restores origin focus itself, so forced destroy or navigation never drops focus.\r\n restoreFocus: false,\r\n // With autoFocus off the root owns initial focus, so a quick open-close cannot focus an exiting pane.\r\n autoFocus: false,\r\n };\r\n\r\n const focused = this.host.root.ownerDocument.activeElement;\r\n this.state.triggerlessOrigin =\r\n !trigger && this.policy?.allowWithoutTrigger && focused instanceof HTMLElement\r\n ? focused\r\n : null;\r\n const dialogRef = this.dialogService.open(panelTemplate, config);\r\n // Ownership follows the declarative host, not whichever element had focus when opening.\r\n const origin = trigger?.element ?? this.host.root;\r\n registerOverlayOwnership(origin, dialogRef.overlayRef, true);\r\n this.dialogRef = dialogRef;\r\n this.appliedPaneClasses = this.paneClasses(this.host.panelClass());\r\n\r\n this.backdropSubscription = dialogRef.backdropClick.subscribe(() => {\r\n if (this.policy?.dismissOnBackdrop !== false) {\r\n this.requestClose('mouse');\r\n }\r\n });\r\n this.keydownSubscription = dialogRef.keydownEvents.subscribe((event) => {\r\n if (event.key === 'Escape' && !hasModifierKey(event)) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.requestClose('keyboard');\r\n }\r\n });\r\n // An external close synchronizes the root exactly once and never reopens it.\r\n this.closedSubscription = dialogRef.closed.subscribe(() => {\r\n this.onDialogClosed(dialogRef);\r\n });\r\n\r\n this.state.attached.set(true);\r\n this.host.syncContainerAria();\r\n // The portal outlet creates the panel view without change detection, so defer to the next render.\r\n afterNextRender(\r\n () => {\r\n if (\r\n generation !== this.state.openGeneration ||\r\n this.dialogRef !== dialogRef ||\r\n !this.state.attached()\r\n ) {\r\n return;\r\n }\r\n this.host.focusInitial();\r\n this.host.validateAccessibleName();\r\n },\r\n { injector: this.injector },\r\n );\r\n }\r\n\r\n // Immediate under reduced motion, otherwise after the bounded exit with the surface inert first.\r\n private beginClose(): void {\r\n this.state.dialogId.set(null);\r\n this.state.closing.set(false);\r\n this.state.entering.set(false);\r\n this.state.attached.set(false);\r\n\r\n const dialogRef = this.dialogRef;\r\n this.dialogRef = undefined;\r\n // Input streams are dead once the exit starts; the closed subscription is kept.\r\n this.releaseInputSubscriptions();\r\n // Pane classes stay on the outgoing pane until the CDK disposes it, so styling never jumps mid-fade.\r\n this.appliedPaneClasses = [];\r\n\r\n if (!dialogRef) {\r\n return;\r\n }\r\n\r\n const pane = dialogRef.overlayRef.overlayElement;\r\n // inert first, so aria-hidden never marks an ancestor of a focused element.\r\n pane.setAttribute('inert', '');\r\n pane.setAttribute('aria-hidden', 'true');\r\n // Fades the backdrop through the CDK showing class, whose duration the partial overrides.\r\n const backdrop = dialogRef.overlayRef.backdropElement;\r\n backdrop?.classList.remove('cdk-overlay-backdrop-showing');\r\n\r\n const content = pane.querySelector<HTMLElement>('.raqm-dialog-content');\r\n // The enter class is dropped so its animation cannot win over the exit.\r\n content?.classList.remove('raqm-dialog-content--entering');\r\n content?.classList.add('raqm-dialog-content--closing');\r\n this.state.closing.set(true);\r\n\r\n this.pendingDialogRef = dialogRef;\r\n if (prefersReducedMotion()) {\r\n this.finalizeClose(dialogRef, true);\r\n return;\r\n }\r\n this.exitTimer = setTimeout(() => {\r\n this.exitTimer = undefined;\r\n this.state.closing.set(false);\r\n this.finalizeClose(dialogRef, true);\r\n }, this.policy?.exitAnimationMs ?? EXIT_ANIMATION_MS);\r\n }\r\n\r\n private finalizeClose(dialogRef: DialogRef<unknown, unknown>, restore: boolean): void {\r\n const origin = this.pendingCloseOrigin;\r\n this.pendingCloseOrigin = undefined;\r\n this.state.lastCloseOrigin = origin;\r\n if (this.exitTimer !== undefined) {\r\n clearTimeout(this.exitTimer);\r\n this.exitTimer = undefined;\r\n }\r\n const options = origin ? { focusOrigin: origin } : undefined;\r\n this.state.closing.set(false);\r\n // pendingDialogRef stays set so the synchronous closed emission reads as this internal finalize.\r\n this.finalizing = true;\r\n dialogRef.close(undefined, options);\r\n this.finalizing = false;\r\n if (this.pendingDialogRef === dialogRef) {\r\n this.pendingDialogRef = undefined;\r\n }\r\n if (restore) {\r\n this.host.maybeRestoreOriginFocus();\r\n }\r\n }\r\n\r\n requestClose(origin?: FocusOrigin): void {\r\n this.pendingCloseOrigin = origin;\r\n if (this.host.openValue()) {\r\n this.host.setOpenValue(false);\r\n }\r\n }\r\n\r\n private flushPendingDispose(): void {\r\n if (this.exitTimer !== undefined) {\r\n clearTimeout(this.exitTimer);\r\n this.exitTimer = undefined;\r\n }\r\n this.state.closing.set(false);\r\n const pending = this.pendingDialogRef;\r\n if (!pending) {\r\n return;\r\n }\r\n // The outgoing dialog closes with no origin restore; clearing the reference first makes it a no-op.\r\n this.pendingDialogRef = undefined;\r\n this.state.suppressFocusRestore = true;\r\n pending.close();\r\n }\r\n\r\n // Resets state when the CDK dialog closes; never reopens, mirrors it into the model once.\r\n private onDialogClosed(dialogRef: DialogRef<unknown, unknown>): void {\r\n const isLive = this.dialogRef === dialogRef;\r\n const isPending = this.pendingDialogRef === dialogRef;\r\n if (!isLive && !isPending) {\r\n return;\r\n }\r\n // An external close during the exit cancels the owned timer and drops the pending reference.\r\n if (isPending && this.exitTimer !== undefined) {\r\n clearTimeout(this.exitTimer);\r\n this.exitTimer = undefined;\r\n }\r\n if (isPending) {\r\n this.pendingDialogRef = undefined;\r\n }\r\n if (isLive) {\r\n this.dialogRef = undefined;\r\n }\r\n this.releaseInputSubscriptions();\r\n this.releaseClosedSubscription();\r\n this.appliedPaneClasses = [];\r\n this.state.attached.set(false);\r\n this.state.entering.set(false);\r\n this.state.closing.set(false);\r\n this.state.dialogId.set(null);\r\n this.state.currentOpen = false;\r\n // An external close never restores focus; finalizing marks the root own close.\r\n if (!this.finalizing) {\r\n this.state.suppressFocusRestore = true;\r\n }\r\n this.setClosed();\r\n }\r\n\r\n private setClosed(): void {\r\n if (this.host.openValue()) {\r\n this.host.setOpenValue(false);\r\n }\r\n }\r\n\r\n destroy(): void {\r\n this.state.openGeneration += 1;\r\n this.state.destroyed = true;\r\n this.state.triggerlessOrigin = null;\r\n this.state.suppressFocusRestore = true;\r\n this.releaseSubscriptions();\r\n if (this.exitTimer !== undefined) {\r\n clearTimeout(this.exitTimer);\r\n this.exitTimer = undefined;\r\n }\r\n const dialogRef = this.dialogRef;\r\n this.dialogRef = undefined;\r\n const pending = this.pendingDialogRef;\r\n this.pendingDialogRef = undefined;\r\n this.appliedPaneClasses = [];\r\n this.state.attached.set(false);\r\n dialogRef?.close();\r\n pending?.close();\r\n }\r\n\r\n private paneClasses(panelClass: string | undefined): string[] {\r\n const extra = (panelClass ?? '').split(/\\s+/).filter(Boolean);\r\n return [PANE_CLASS, ...(this.policy?.paneClass ? [this.policy.paneClass] : []), ...extra];\r\n }\r\n\r\n applyPanelClass(panelClass: string | undefined): void {\r\n const dialogRef = this.dialogRef;\r\n if (!dialogRef) {\r\n return;\r\n }\r\n const next = this.paneClasses(panelClass);\r\n if (\r\n next.length === this.appliedPaneClasses.length &&\r\n next.every((value, index) => value === this.appliedPaneClasses[index])\r\n ) {\r\n return;\r\n }\r\n this.removePaneClasses(this.appliedPaneClasses);\r\n dialogRef.addPanelClass(next);\r\n this.appliedPaneClasses = next;\r\n }\r\n\r\n private removePaneClasses(classes: string[]): void {\r\n const dialogRef = this.dialogRef;\r\n if (!dialogRef) {\r\n return;\r\n }\r\n dialogRef.removePanelClass(classes);\r\n }\r\n\r\n applyDirection(): void {\r\n const dir = this.host.direction();\r\n this.state.panelDir.set(dir);\r\n this.dialogRef?.overlayRef.setDirection(dir);\r\n }\r\n\r\n private releaseInputSubscriptions(): void {\r\n this.backdropSubscription?.unsubscribe();\r\n this.backdropSubscription = undefined;\r\n this.keydownSubscription?.unsubscribe();\r\n this.keydownSubscription = undefined;\r\n }\r\n\r\n // Releases the `closed` stream; kept separate so the exit path can retain it.\r\n private releaseClosedSubscription(): void {\r\n this.closedSubscription?.unsubscribe();\r\n this.closedSubscription = undefined;\r\n }\r\n\r\n private releaseSubscriptions(): void {\r\n this.releaseInputSubscriptions();\r\n this.releaseClosedSubscription();\r\n }\r\n}\r\n","// Dialog registration: the single trigger, content template, title and description the\r\n// projected slots hand to the root, their stable ids, and the container's labelling.\r\n\r\nimport { Renderer2, TemplateRef, isDevMode, signal } from '@angular/core';\r\n\r\nimport { RaqmDialogTriggerRef } from './dialog-context';\r\nimport { CONTAINER_CLASS } from './dialog-model';\r\n\r\n// Monotonic counter for stable per-instance element ids.\r\nlet nextDialogId = 0;\r\n\r\nexport interface RaqmDialogRegistrationHost {\r\n /** An explicit accessible name used when no title slot is registered. */\r\n label(): string | undefined;\r\n /** The role=dialog container of the live overlay pane, or `undefined` while closed. */\r\n pane(): HTMLElement | undefined;\r\n}\r\n\r\nexport class RaqmDialogRegistration {\r\n readonly triggerRef = signal<RaqmDialogTriggerRef | null>(null);\r\n readonly contentTemplate = signal<TemplateRef<unknown> | null>(null);\r\n\r\n private readonly titleElement = signal<HTMLElement | null>(null);\r\n private readonly descriptionElement = signal<HTMLElement | null>(null);\r\n\r\n private readonly rootId = ++nextDialogId;\r\n\r\n readonly dialogRootId = `raqm-dialog-${this.rootId}`;\r\n private readonly titleRootId = `raqm-dialog-title-${this.rootId}`;\r\n private readonly descriptionRootId = `raqm-dialog-description-${this.rootId}`;\r\n\r\n constructor(\r\n private readonly renderer: Renderer2,\r\n private readonly host: RaqmDialogRegistrationHost,\r\n ) {}\r\n\r\n get hasTitle(): boolean {\r\n return this.titleElement() !== null;\r\n }\r\n\r\n registerTrigger(ref: RaqmDialogTriggerRef): 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-dialog] Only one `button[raqm-dialog-trigger]` is supported per <raqm-dialog>; the extra trigger is ignored.',\r\n );\r\n }\r\n return;\r\n }\r\n this.triggerRef.set(ref);\r\n }\r\n\r\n unregisterTrigger(ref: RaqmDialogTriggerRef): void {\r\n if (this.triggerRef() === ref) {\r\n this.triggerRef.set(null);\r\n }\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-dialog] Only one `ng-template[raqm-dialog-content]` is supported per <raqm-dialog>; the extra template is ignored.',\r\n );\r\n }\r\n return;\r\n }\r\n this.contentTemplate.set(template);\r\n }\r\n\r\n unregisterContent(template: TemplateRef<unknown>): void {\r\n if (this.contentTemplate() === template) {\r\n this.contentTemplate.set(null);\r\n }\r\n }\r\n\r\n registerTitle(element: HTMLElement): void {\r\n if (isDevMode() && this.titleElement() !== null && this.titleElement() !== element) {\r\n console.error(\r\n '[raqm-dialog] Only one `[raqm-dialog-title]` is expected per <raqm-dialog>; the latest registration wins.',\r\n );\r\n }\r\n if (!element.id) {\r\n element.id = this.titleRootId;\r\n }\r\n this.titleElement.set(element);\r\n this.syncContainerAria();\r\n }\r\n\r\n unregisterTitle(element: HTMLElement): void {\r\n if (this.titleElement() === element) {\r\n this.titleElement.set(null);\r\n this.syncContainerAria();\r\n }\r\n }\r\n\r\n registerDescription(element: HTMLElement): void {\r\n if (\r\n isDevMode() &&\r\n this.descriptionElement() !== null &&\r\n this.descriptionElement() !== element\r\n ) {\r\n console.error(\r\n '[raqm-dialog] Only one `[raqm-dialog-description]` is expected per <raqm-dialog>; the latest registration wins.',\r\n );\r\n }\r\n if (!element.id) {\r\n element.id = this.descriptionRootId;\r\n }\r\n this.descriptionElement.set(element);\r\n this.syncContainerAria();\r\n }\r\n\r\n unregisterDescription(element: HTMLElement): void {\r\n if (this.descriptionElement() === element) {\r\n this.descriptionElement.set(null);\r\n this.syncContainerAria();\r\n }\r\n }\r\n\r\n // Host bindings are computed once, so late registrations are written to the public DOM node.\r\n syncContainerAria(): void {\r\n const pane = this.host.pane();\r\n if (!pane) {\r\n return;\r\n }\r\n const container = pane.querySelector<HTMLElement>(`.${CONTAINER_CLASS}`);\r\n if (!container) {\r\n return;\r\n }\r\n const title = this.titleElement();\r\n const label = this.host.label();\r\n if (title) {\r\n this.renderer.setAttribute(container, 'aria-labelledby', title.id);\r\n this.renderer.removeAttribute(container, 'aria-label');\r\n } else {\r\n this.renderer.removeAttribute(container, 'aria-labelledby');\r\n if (label) {\r\n this.renderer.setAttribute(container, 'aria-label', label);\r\n } else {\r\n this.renderer.removeAttribute(container, 'aria-label');\r\n }\r\n }\r\n const description = this.descriptionElement();\r\n if (description) {\r\n this.renderer.setAttribute(container, 'aria-describedby', description.id);\r\n } else {\r\n this.renderer.removeAttribute(container, 'aria-describedby');\r\n }\r\n }\r\n}\r\n","// Dialog pane state: the writable signals the template reads, plus the open bookkeeping\r\n// and focus flags shared by the open, close and destroy paths.\r\n\r\nimport { signal } from '@angular/core';\r\nimport type { FocusOrigin } from '@angular/cdk/a11y';\r\n\r\nexport class RaqmDialogState {\r\n // The public ARIA state never claims \"open\" before content is attached.\r\n readonly attached = signal(false);\r\n\r\n readonly dialogId = signal<string | null>(null);\r\n\r\n readonly entering = signal(false);\r\n readonly closing = signal(false);\r\n\r\n // Updated at open from the live host direction, never cached before attach.\r\n readonly panelDir = signal<'ltr' | 'rtl'>('ltr');\r\n\r\n // Only triggerless specializations capture a fallback.\r\n triggerlessOrigin: HTMLElement | null = null;\r\n\r\n currentOpen = false;\r\n\r\n // A superseded open/validation can never act on a newer dialog.\r\n openGeneration = 0;\r\n\r\n destroyed = false;\r\n\r\n // Whether the current close must not restore origin focus (forced destroy, navigation or external close).\r\n suppressFocusRestore = false;\r\n\r\n // The focus origin of the last close (drives the restored focus style).\r\n lastCloseOrigin: FocusOrigin | undefined;\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n Injector,\r\n OnDestroy,\r\n Renderer2,\r\n Signal,\r\n TemplateRef,\r\n booleanAttribute,\r\n computed,\r\n inject,\r\n input,\r\n model,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { NgTemplateOutlet } from '@angular/common';\r\n\r\nimport { FocusMonitor, InteractivityChecker } from '@angular/cdk/a11y';\r\nimport { Directionality } from '@angular/cdk/bidi';\r\nimport { Dialog } from '@angular/cdk/dialog';\r\n\r\nimport { RaqmButton } from '@raqm/ui/button';\r\nimport {\r\n RAQM_DIALOG,\r\n RAQM_DIALOG_POLICY,\r\n RAQM_DIALOG_SCROLL_LOCK,\r\n RaqmDialogContext,\r\n RaqmDialogTriggerRef,\r\n} from './dialog-context';\r\nimport { connectDialogEffects } from './dialog-effects';\r\nimport { RaqmDialogFocus } from './dialog-focus';\r\nimport { resolveDialogDirection, toDir } from './dialog-model';\r\nimport { RaqmDialogOverlay } from './dialog-overlay';\r\nimport { RaqmDialogRegistration } from './dialog-registration';\r\nimport { RaqmDialogState } from './dialog-view-state';\r\n\r\n/** Modal dialog root shared by Dialog, Alert Dialog, Sheet, Drawer and Command Dialog. */\r\n@Component({\r\n selector: 'raqm-dialog-base',\r\n imports: [NgTemplateOutlet, RaqmButton],\r\n templateUrl: './dialog.component.html',\r\n styleUrl: './dialog.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport abstract class RaqmDialogBaseComponent implements RaqmDialogContext, OnDestroy {\r\n // An absent internal policy preserves ordinary Dialog behavior.\r\n protected readonly policy = inject(RAQM_DIALOG_POLICY, { optional: true, self: true });\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\r\n\r\n // Root-scoped: one shared instance is what makes the global modal stack correct.\r\n private readonly dialogService = inject(Dialog);\r\n\r\n // Optional; 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 renderer = inject(Renderer2);\r\n\r\n // The CDK restore is disabled so a forced destroy or navigation never drops focus into a removed page.\r\n private readonly focusMonitor = inject(FocusMonitor);\r\n\r\n private readonly checker = inject(InteractivityChecker);\r\n\r\n private readonly injector = inject(Injector);\r\n\r\n // One lease per dialog keeps the shared lock until the last sibling closes.\r\n private readonly scrollLock = inject(RAQM_DIALOG_SCROLL_LOCK);\r\n\r\n // Optional so a programmatic initial open cannot throw NG0951 before the view resolves.\r\n private readonly panelTemplate = viewChild('panel', { read: TemplateRef });\r\n\r\n readonly openValue = model(false, { alias: 'open' });\r\n\r\n /** Whether the dialog is disabled; a disabled root never opens. */\r\n readonly disabled = input(false, { transform: booleanAttribute });\r\n\r\n readonly dir = input<'ltr' | 'rtl' | undefined>(undefined, {\r\n transform: toDir,\r\n });\r\n\r\n readonly panelClass = input<string | undefined>(undefined);\r\n\r\n /** An explicit accessible name used when no title slot is registered. */\r\n readonly label = input<string | undefined>(undefined);\r\n\r\n protected abstract readonly closeButtonVisible: Signal<boolean>;\r\n\r\n protected abstract readonly closeLabelText: Signal<string | undefined>;\r\n\r\n private readonly state: RaqmDialogState = new RaqmDialogState();\r\n\r\n private readonly registration: RaqmDialogRegistration = new RaqmDialogRegistration(\r\n this.renderer,\r\n {\r\n label: () => this.label(),\r\n pane: () => this.overlay.element,\r\n },\r\n );\r\n\r\n // The open effect tracks this: a late registration still opens, one unregistered while open closes.\r\n private readonly canOpen = computed(\r\n () =>\r\n (this.registration.triggerRef() !== null || this.policy?.allowWithoutTrigger === true) &&\r\n this.registration.contentTemplate() !== null &&\r\n this.panelTemplate() !== undefined,\r\n );\r\n\r\n readonly open = computed(() => this.openValue() && !this.disabled() && this.state.attached());\r\n\r\n readonly dialogId = this.state.dialogId;\r\n\r\n protected readonly entering = this.state.entering;\r\n protected readonly closing = this.state.closing;\r\n\r\n protected readonly panelDir = this.state.panelDir;\r\n\r\n protected readonly contentTemplate = this.registration.contentTemplate;\r\n\r\n private readonly overlay: RaqmDialogOverlay = new RaqmDialogOverlay(\r\n this.dialogService,\r\n this.scrollLock,\r\n this.injector,\r\n this.state,\r\n this.policy,\r\n {\r\n root: this.host.nativeElement,\r\n dialogRootId: this.registration.dialogRootId,\r\n trigger: () => this.registration.triggerRef(),\r\n contentTemplate: () => this.registration.contentTemplate(),\r\n panelTemplate: () => this.panelTemplate(),\r\n panelClass: () => this.panelClass(),\r\n openValue: () => this.openValue(),\r\n setOpenValue: (value) => this.openValue.set(value),\r\n direction: () => this.readResolvedDir(),\r\n syncContainerAria: () => this.registration.syncContainerAria(),\r\n focusInitial: () => this.focus.focusInitial(),\r\n validateAccessibleName: () => this.focus.validateAccessibleName(),\r\n maybeRestoreOriginFocus: () => this.focus.maybeRestoreOriginFocus(),\r\n },\r\n );\r\n\r\n private readonly focus: RaqmDialogFocus = new RaqmDialogFocus(\r\n this.dialogService,\r\n this.focusMonitor,\r\n this.checker,\r\n this.state,\r\n {\r\n pane: () => this.overlay.element,\r\n trigger: () => this.registration.triggerRef(),\r\n hasTitle: () => this.registration.hasTitle,\r\n label: () => this.label(),\r\n touchOpening: () => this.policy?.touchOpening(),\r\n },\r\n );\r\n\r\n constructor() {\r\n connectDialogEffects({\r\n openValue: () => this.openValue(),\r\n disabled: () => this.disabled(),\r\n canOpen: () => this.canOpen(),\r\n panelClass: () => this.panelClass(),\r\n label: () => this.label(),\r\n dir: () => this.dir(),\r\n closeButtonVisible: () => this.closeButtonVisible(),\r\n closeLabelText: () => this.closeLabelText(),\r\n syncOpen: (next) => this.overlay.syncOpen(next),\r\n applyPanelClass: (panelClass) => this.overlay.applyPanelClass(panelClass),\r\n syncContainerAria: () => this.registration.syncContainerAria(),\r\n applyDirection: () => this.overlay.applyDirection(),\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.overlay.destroy();\r\n }\r\n\r\n registerTrigger(ref: RaqmDialogTriggerRef): void {\r\n this.registration.registerTrigger(ref);\r\n }\r\n\r\n unregisterTrigger(ref: RaqmDialogTriggerRef): void {\r\n this.registration.unregisterTrigger(ref);\r\n }\r\n\r\n registerContent(template: TemplateRef<unknown>): void {\r\n this.registration.registerContent(template);\r\n }\r\n\r\n unregisterContent(template: TemplateRef<unknown>): void {\r\n this.registration.unregisterContent(template);\r\n }\r\n\r\n registerTitle(element: HTMLElement): void {\r\n this.registration.registerTitle(element);\r\n }\r\n\r\n unregisterTitle(element: HTMLElement): void {\r\n this.registration.unregisterTitle(element);\r\n }\r\n\r\n registerDescription(element: HTMLElement): void {\r\n this.registration.registerDescription(element);\r\n }\r\n\r\n unregisterDescription(element: HTMLElement): void {\r\n this.registration.unregisterDescription(element);\r\n }\r\n\r\n // A disabled root or trigger is a no-op, and only the registered trigger may operate the root.\r\n toggleFromTrigger(ref: RaqmDialogTriggerRef): void {\r\n if (ref !== this.registration.triggerRef() || this.disabled() || ref.disabled) {\r\n return;\r\n }\r\n if (this.open()) {\r\n this.closeFromUser();\r\n return;\r\n }\r\n this.openValue.set(true);\r\n }\r\n\r\n // The single animated close path used by the close control, Escape and the backdrop.\r\n closeFromUser(): void {\r\n this.overlay.requestClose();\r\n }\r\n\r\n protected onCloseButtonClick(): void {\r\n this.overlay.requestClose('mouse');\r\n }\r\n\r\n // getComputedStyle is read at call time by the resolver, so an RTL ancestor is never frozen.\r\n private readResolvedDir(): 'ltr' | 'rtl' {\r\n return resolveDialogDirection(this.dir(), this.host.nativeElement, this.directionality);\r\n }\r\n}\r\n\r\n/** Concrete modal root with the optional default close control. */\r\n@Component({\r\n selector: 'raqm-dialog',\r\n imports: [NgTemplateOutlet, RaqmButton],\r\n templateUrl: './dialog.component.html',\r\n styleUrl: './dialog.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'raqmDialog',\r\n providers: [\r\n // A dedicated token (not a component import) avoids a runtime module cycle.\r\n { provide: RAQM_DIALOG, useExisting: RaqmDialogComponent },\r\n ],\r\n})\r\nexport class RaqmDialogComponent extends RaqmDialogBaseComponent {\r\n readonly showCloseButton = input(true, { transform: booleanAttribute });\r\n\r\n readonly closeLabel = input<string | undefined>(undefined);\r\n\r\n protected readonly closeButtonVisible = this.showCloseButton;\r\n protected readonly closeLabelText: Signal<string | undefined> = this.closeLabel;\r\n}\r\n","<ng-content />\r\n\r\n<!-- The CDK container, not this wrapper, is the role=dialog element. -->\r\n<ng-template #panel>\r\n <div\r\n class=\"raqm-dialog-content\"\r\n [class]=\"policy?.contentClass ?? ''\"\r\n [attr.data-raqm-small]=\"policy?.small?.() ? '' : null\"\r\n [attr.data-raqm-side]=\"policy?.side?.() ?? null\"\r\n [attr.dir]=\"panelDir()\"\r\n [class.raqm-dialog-content--entering]=\"entering()\"\r\n [class.raqm-dialog-content--closing]=\"closing()\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"contentTemplate()\" />\r\n\r\n <!-- showCloseButton=false hides only this control; Escape and backdrop dismissal still close. -->\r\n @if (closeButtonVisible()) {\r\n <button\r\n raqm-button=\"ghost\"\r\n icon-small\r\n class=\"raqm-dialog-close\"\r\n [attr.aria-label]=\"closeLabelText()\"\r\n (click)=\"onCloseButtonClick()\"\r\n >\r\n <svg\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n aria-hidden=\"true\"\r\n focusable=\"false\"\r\n >\r\n <path d=\"M18 6 6 18\" />\r\n <path d=\"m6 6 12 12\" />\r\n </svg>\r\n </button>\r\n }\r\n </div>\r\n</ng-template>\r\n","import {\r\n DestroyRef,\r\n Directive,\r\n ElementRef,\r\n OnInit,\r\n TemplateRef,\r\n computed,\r\n inject,\r\n isDevMode,\r\n} from '@angular/core';\r\n\r\nimport { RAQM_DIALOG, RaqmDialogContext, RaqmDialogTriggerRef } from './dialog-context';\r\n\r\n/** Directive on the one native button that opens the modal. */\r\n@Directive({\r\n selector: 'button[raqm-dialog-trigger]',\r\n host: {\r\n class: 'raqm-dialog-trigger',\r\n // The real disclosure ARIA, tied to the modal the root owns.\r\n '[attr.aria-haspopup]': '\"dialog\"',\r\n '[attr.aria-expanded]': 'open() ? \"true\" : \"false\"',\r\n '[attr.aria-controls]': 'open() ? dialogId() : null',\r\n '(click)': 'onClick()',\r\n },\r\n})\r\nexport class RaqmDialogTriggerDirective implements OnInit {\r\n // The `<button>` the selector targets; used for the one-time default `type`.\r\n private readonly host = inject(ElementRef<HTMLButtonElement>);\r\n\r\n // Optional, so a misplaced trigger reports rather than crashes.\r\n private readonly dialog = inject<RaqmDialogContext | null>(RAQM_DIALOG, {\r\n optional: true,\r\n });\r\n\r\n private readonly destroyRef = inject(DestroyRef);\r\n\r\n // Derived from the shared context so `aria-expanded` tracks the real state.\r\n readonly open = computed(() => this.dialog?.open() ?? false);\r\n\r\n readonly dialogId = computed(() => this.dialog?.dialogId() ?? null);\r\n\r\n // Live getters keep registration and focus restore correct.\r\n private readonly ref: RaqmDialogTriggerRef = (() => {\r\n const self = this;\r\n return {\r\n get element(): HTMLButtonElement {\r\n return self.host.nativeElement;\r\n },\r\n get disabled(): boolean {\r\n return self.host.nativeElement.disabled;\r\n },\r\n };\r\n })();\r\n\r\n constructor() {\r\n // Default to a non-submit disclosure; an authored native `type` is preserved.\r\n const element = this.host.nativeElement;\r\n if (!element.hasAttribute('type')) {\r\n element.setAttribute('type', 'button');\r\n }\r\n\r\n // Report a misplaced trigger (no parent root) in development; still renderable.\r\n if (isDevMode() && this.dialog === null) {\r\n console.error(\r\n '[raqm-dialog-trigger] No parent <raqm-dialog> found; the trigger cannot open a dialog.',\r\n );\r\n }\r\n\r\n // Unregisters on destroy; registration waits for ngOnInit.\r\n this.destroyRef.onDestroy(() => this.dialog?.unregisterTrigger(this.ref));\r\n }\r\n\r\n ngOnInit(): void {\r\n this.dialog?.registerTrigger(this.ref);\r\n }\r\n\r\n /** Toggles the modal on a native click; a disabled trigger is a no-op. */\r\n protected onClick(): void {\r\n if (this.host.nativeElement.disabled) {\r\n return;\r\n }\r\n this.dialog?.toggleFromTrigger(this.ref);\r\n }\r\n}\r\n\r\n/** Content identity only: registers its TemplateRef for the root to render. */\r\n@Directive({\r\n selector: 'ng-template[raqm-dialog-content]',\r\n exportAs: 'raqmDialogContent',\r\n})\r\nexport class RaqmDialogContentDirective implements OnInit {\r\n private readonly template = inject<TemplateRef<unknown>>(TemplateRef);\r\n\r\n // The surrounding root; optional so a misplaced template reports, not crashes.\r\n private readonly dialog = inject<RaqmDialogContext | null>(RAQM_DIALOG, {\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.dialog === null) {\r\n console.error(\r\n '[raqm-dialog-content] No parent <raqm-dialog> found; the template is never rendered.',\r\n );\r\n }\r\n this.destroyRef.onDestroy(() => this.dialog?.unregisterContent(this.template));\r\n }\r\n\r\n ngOnInit(): void {\r\n this.dialog?.registerContent(this.template);\r\n }\r\n}\r\n\r\n/** Style hook routing an authored close control click to the root animated close. */\r\n@Directive({\r\n selector: 'button[raqm-dialog-close]',\r\n host: {\r\n class: 'raqm-dialog-close-control',\r\n '(click)': 'onClick()',\r\n },\r\n})\r\nexport class RaqmDialogCloseDirective {\r\n private readonly host = inject(ElementRef<HTMLButtonElement>);\r\n\r\n // Optional, so a misplaced control still renders.\r\n private readonly dialog = inject<RaqmDialogContext | null>(RAQM_DIALOG, {\r\n optional: true,\r\n });\r\n\r\n constructor() {\r\n // A custom close must never submit the surrounding form; an authored `type` wins.\r\n const element = this.host.nativeElement;\r\n if (!element.hasAttribute('type')) {\r\n element.setAttribute('type', 'button');\r\n }\r\n\r\n if (isDevMode() && this.dialog === null) {\r\n console.error(\r\n '[raqm-dialog-close] No parent <raqm-dialog> found; the control cannot close a dialog.',\r\n );\r\n }\r\n }\r\n\r\n /** Requests the root's single animated close path on click. */\r\n protected onClick(): void {\r\n this.dialog?.closeFromUser();\r\n }\r\n}\r\n\r\n@Directive({\r\n selector: '[raqm-dialog-header]',\r\n host: {\r\n class: 'raqm-dialog-header',\r\n },\r\n})\r\nexport class RaqmDialogHeaderDirective {}\r\n\r\n@Directive({\r\n selector: '[raqm-dialog-footer]',\r\n host: {\r\n class: 'raqm-dialog-footer',\r\n },\r\n})\r\nexport class RaqmDialogFooterDirective {}\r\n\r\n/** Registers its host so the container aria-labelledby points at it. */\r\n@Directive({\r\n selector: '[raqm-dialog-title]',\r\n host: {\r\n class: 'raqm-dialog-title',\r\n },\r\n})\r\nexport class RaqmDialogTitleDirective implements OnInit {\r\n // Registered with the root for `aria-labelledby`.\r\n private readonly host = inject(ElementRef<HTMLElement>);\r\n\r\n // Parent root contract; optional so a misplaced title still renders.\r\n private readonly dialog = inject<RaqmDialogContext | null>(RAQM_DIALOG, {\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.dialog === null) {\r\n console.error(\r\n '[raqm-dialog-title] No parent <raqm-dialog> found; the title cannot be associated with a dialog.',\r\n );\r\n }\r\n this.destroyRef.onDestroy(() => this.dialog?.unregisterTitle(this.host.nativeElement));\r\n }\r\n\r\n /** Registers the title element with the root once initialized. */\r\n ngOnInit(): void {\r\n this.dialog?.registerTitle(this.host.nativeElement);\r\n }\r\n}\r\n\r\n/** Registers its host for the container aria-describedby. */\r\n@Directive({\r\n selector: '[raqm-dialog-description]',\r\n host: {\r\n class: 'raqm-dialog-description',\r\n },\r\n})\r\nexport class RaqmDialogDescriptionDirective implements OnInit {\r\n // Registered with the root for `aria-describedby`.\r\n private readonly host = inject(ElementRef<HTMLElement>);\r\n\r\n // Parent root contract; optional so a misplaced description still renders.\r\n private readonly dialog = inject<RaqmDialogContext | null>(RAQM_DIALOG, {\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.dialog === null) {\r\n console.error(\r\n '[raqm-dialog-description] No parent <raqm-dialog> found; the description cannot be associated with a dialog.',\r\n );\r\n }\r\n this.destroyRef.onDestroy(() => this.dialog?.unregisterDescription(this.host.nativeElement));\r\n }\r\n\r\n ngOnInit(): void {\r\n this.dialog?.registerDescription(this.host.nativeElement);\r\n }\r\n}\r\n","import { RaqmDialogBaseComponent, RaqmDialogComponent } from './dialog.component';\r\nimport {\r\n RaqmDialogCloseDirective,\r\n RaqmDialogContentDirective,\r\n RaqmDialogDescriptionDirective,\r\n RaqmDialogFooterDirective,\r\n RaqmDialogHeaderDirective,\r\n RaqmDialogTitleDirective,\r\n RaqmDialogTriggerDirective,\r\n} from './dialog.directive';\r\n\r\nexport {\r\n RaqmDialogComponent,\r\n RaqmDialogTriggerDirective,\r\n RaqmDialogContentDirective,\r\n RaqmDialogCloseDirective,\r\n RaqmDialogHeaderDirective,\r\n RaqmDialogFooterDirective,\r\n RaqmDialogTitleDirective,\r\n RaqmDialogDescriptionDirective,\r\n};\r\n\r\n// @internal Sibling-only export for shipped modal families; not a supported app API.\r\nexport { RAQM_DIALOG, RAQM_DIALOG_POLICY, type RaqmDialogPolicy } from './dialog-context';\r\nexport { RaqmDialogBaseComponent } from './dialog.component';\r\n\r\nexport const RaqmDialog = [\r\n RaqmDialogComponent,\r\n RaqmDialogTriggerDirective,\r\n RaqmDialogContentDirective,\r\n RaqmDialogCloseDirective,\r\n RaqmDialogHeaderDirective,\r\n RaqmDialogFooterDirective,\r\n RaqmDialogTitleDirective,\r\n RaqmDialogDescriptionDirective,\r\n] as const;\r\n"],"mappings":";;;;;;;;;;AA8BA,MAAa,cAAc,IAAI,eAAkC,YAAY;AAiB7E,MAAa,qBAAqB,IAAI,eAAiC,kBAAkB;AAGzF,IAAa,uBAAb,MAAiC;CACd;CAET,SAAS;CAEjB,YAAY,SAA8B;EACxC,KAAK,WAAW,QAAQ,MAAK;CAC/B;CAGA,UAAO;EACL,KAAK,UAAU;EACf,KAAK,SAAS,OAAM;CACtB;CAGA,UAAO;EACL,IAAI,KAAK,WAAW,GAClB;EAEF,KAAK,UAAU;EACf,IAAI,KAAK,WAAW,GAClB,KAAK,SAAS,QAAO;CAEzB;CAGA,cAAW;EACT,OAAO,IAAI,sBAAsB,IAAI;CACvC;AACD;AAGD,IAAa,wB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