forty-cdk 0.2.0 → 0.3.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/accordion/README.md +122 -0
- package/aspect-ratio/README.md +76 -0
- package/avatar/README.md +100 -0
- package/breadcrumbs/README.md +49 -0
- package/breakpoints/README.md +81 -0
- package/button/README.md +49 -0
- package/calendar/README.md +458 -0
- package/carousel/README.md +358 -0
- package/checkbox/README.md +146 -0
- package/combobox/README.md +535 -0
- package/context-menu/README.md +139 -0
- package/date-field/README.md +184 -0
- package/date-picker/README.md +338 -0
- package/dialog/README.md +388 -0
- package/disclosure/README.md +114 -0
- package/drag-drop/README.md +359 -0
- package/drawer/README.md +560 -0
- package/dropdown-menu/README.md +176 -0
- package/fesm2022/forty-cdk-accordion.mjs +348 -0
- package/fesm2022/forty-cdk-accordion.mjs.map +1 -0
- package/fesm2022/forty-cdk-aspect-ratio.mjs +74 -0
- package/fesm2022/forty-cdk-aspect-ratio.mjs.map +1 -0
- package/fesm2022/forty-cdk-avatar.mjs +308 -0
- package/fesm2022/forty-cdk-avatar.mjs.map +1 -0
- package/fesm2022/forty-cdk-breadcrumbs.mjs +125 -0
- package/fesm2022/forty-cdk-breadcrumbs.mjs.map +1 -0
- package/fesm2022/forty-cdk-breakpoints.mjs +117 -0
- package/fesm2022/forty-cdk-breakpoints.mjs.map +1 -0
- package/fesm2022/forty-cdk-button.mjs +134 -0
- package/fesm2022/forty-cdk-button.mjs.map +1 -0
- package/fesm2022/forty-cdk-calendar.mjs +2034 -0
- package/fesm2022/forty-cdk-calendar.mjs.map +1 -0
- package/fesm2022/forty-cdk-carousel.mjs +968 -0
- package/fesm2022/forty-cdk-carousel.mjs.map +1 -0
- package/fesm2022/forty-cdk-checkbox.mjs +226 -0
- package/fesm2022/forty-cdk-checkbox.mjs.map +1 -0
- package/fesm2022/forty-cdk-combobox.mjs +2596 -0
- package/fesm2022/forty-cdk-combobox.mjs.map +1 -0
- package/fesm2022/forty-cdk-context-menu.mjs +413 -0
- package/fesm2022/forty-cdk-context-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-core.mjs +9022 -0
- package/fesm2022/forty-cdk-core.mjs.map +1 -0
- package/fesm2022/forty-cdk-date-field.mjs +744 -0
- package/fesm2022/forty-cdk-date-field.mjs.map +1 -0
- package/fesm2022/forty-cdk-date-picker.mjs +1011 -0
- package/fesm2022/forty-cdk-date-picker.mjs.map +1 -0
- package/fesm2022/forty-cdk-dialog.mjs +707 -0
- package/fesm2022/forty-cdk-dialog.mjs.map +1 -0
- package/fesm2022/forty-cdk-disclosure.mjs +190 -0
- package/fesm2022/forty-cdk-disclosure.mjs.map +1 -0
- package/fesm2022/forty-cdk-drag-drop.mjs +1180 -0
- package/fesm2022/forty-cdk-drag-drop.mjs.map +1 -0
- package/fesm2022/forty-cdk-drawer.mjs +1641 -0
- package/fesm2022/forty-cdk-drawer.mjs.map +1 -0
- package/fesm2022/forty-cdk-dropdown-menu.mjs +350 -0
- package/fesm2022/forty-cdk-dropdown-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-field.mjs +425 -0
- package/fesm2022/forty-cdk-field.mjs.map +1 -0
- package/fesm2022/forty-cdk-fieldset.mjs +164 -0
- package/fesm2022/forty-cdk-fieldset.mjs.map +1 -0
- package/fesm2022/forty-cdk-file-upload.mjs +221 -0
- package/fesm2022/forty-cdk-file-upload.mjs.map +1 -0
- package/fesm2022/forty-cdk-hover-card.mjs +496 -0
- package/fesm2022/forty-cdk-hover-card.mjs.map +1 -0
- package/fesm2022/forty-cdk-input.mjs +274 -0
- package/fesm2022/forty-cdk-input.mjs.map +1 -0
- package/fesm2022/forty-cdk-internationalized-date.mjs +1 -1
- package/fesm2022/forty-cdk-internationalized-date.mjs.map +1 -1
- package/fesm2022/forty-cdk-listbox.mjs +1279 -0
- package/fesm2022/forty-cdk-listbox.mjs.map +1 -0
- package/fesm2022/forty-cdk-menu.mjs +1439 -0
- package/fesm2022/forty-cdk-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-menubar.mjs +787 -0
- package/fesm2022/forty-cdk-menubar.mjs.map +1 -0
- package/fesm2022/forty-cdk-meter.mjs +211 -0
- package/fesm2022/forty-cdk-meter.mjs.map +1 -0
- package/fesm2022/forty-cdk-navigation-menu.mjs +1145 -0
- package/fesm2022/forty-cdk-navigation-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-number-input.mjs +559 -0
- package/fesm2022/forty-cdk-number-input.mjs.map +1 -0
- package/fesm2022/forty-cdk-otp-input.mjs +527 -0
- package/fesm2022/forty-cdk-otp-input.mjs.map +1 -0
- package/fesm2022/forty-cdk-pagination.mjs +323 -0
- package/fesm2022/forty-cdk-pagination.mjs.map +1 -0
- package/fesm2022/forty-cdk-pane-resizer.mjs +297 -0
- package/fesm2022/forty-cdk-pane-resizer.mjs.map +1 -0
- package/fesm2022/forty-cdk-popover.mjs +698 -0
- package/fesm2022/forty-cdk-popover.mjs.map +1 -0
- package/fesm2022/forty-cdk-progress.mjs +226 -0
- package/fesm2022/forty-cdk-progress.mjs.map +1 -0
- package/fesm2022/forty-cdk-radio-group.mjs +378 -0
- package/fesm2022/forty-cdk-radio-group.mjs.map +1 -0
- package/fesm2022/forty-cdk-scroll-area.mjs +640 -0
- package/fesm2022/forty-cdk-scroll-area.mjs.map +1 -0
- package/fesm2022/forty-cdk-search.mjs +205 -0
- package/fesm2022/forty-cdk-search.mjs.map +1 -0
- package/fesm2022/forty-cdk-select.mjs +1661 -0
- package/fesm2022/forty-cdk-select.mjs.map +1 -0
- package/fesm2022/forty-cdk-separator.mjs +82 -0
- package/fesm2022/forty-cdk-separator.mjs.map +1 -0
- package/fesm2022/forty-cdk-signal-forms.mjs +97 -0
- package/fesm2022/forty-cdk-signal-forms.mjs.map +1 -0
- package/fesm2022/forty-cdk-slider.mjs +803 -0
- package/fesm2022/forty-cdk-slider.mjs.map +1 -0
- package/fesm2022/forty-cdk-stepper.mjs +886 -0
- package/fesm2022/forty-cdk-stepper.mjs.map +1 -0
- package/fesm2022/forty-cdk-switch.mjs +137 -0
- package/fesm2022/forty-cdk-switch.mjs.map +1 -0
- package/fesm2022/forty-cdk-table.mjs +1518 -0
- package/fesm2022/forty-cdk-table.mjs.map +1 -0
- package/fesm2022/forty-cdk-tabs.mjs +400 -0
- package/fesm2022/forty-cdk-tabs.mjs.map +1 -0
- package/fesm2022/forty-cdk-time-field.mjs +593 -0
- package/fesm2022/forty-cdk-time-field.mjs.map +1 -0
- package/fesm2022/forty-cdk-time-picker.mjs +1013 -0
- package/fesm2022/forty-cdk-time-picker.mjs.map +1 -0
- package/fesm2022/forty-cdk-toast.mjs +1153 -0
- package/fesm2022/forty-cdk-toast.mjs.map +1 -0
- package/fesm2022/forty-cdk-toggle.mjs +516 -0
- package/fesm2022/forty-cdk-toggle.mjs.map +1 -0
- package/fesm2022/forty-cdk-toolbar.mjs +374 -0
- package/fesm2022/forty-cdk-toolbar.mjs.map +1 -0
- package/fesm2022/forty-cdk-tooltip.mjs +672 -0
- package/fesm2022/forty-cdk-tooltip.mjs.map +1 -0
- package/fesm2022/forty-cdk-tree.mjs +2007 -0
- package/fesm2022/forty-cdk-tree.mjs.map +1 -0
- package/fesm2022/forty-cdk-virtualization.mjs +1 -1
- package/fesm2022/forty-cdk-virtualization.mjs.map +1 -1
- package/fesm2022/forty-cdk.mjs +0 -43310
- package/fesm2022/forty-cdk.mjs.map +1 -1
- package/field/README.md +97 -0
- package/fieldset/README.md +86 -0
- package/file-upload/README.md +73 -0
- package/hover-card/README.md +171 -0
- package/input/README.md +156 -0
- package/listbox/README.md +424 -0
- package/menu/README.md +181 -0
- package/menubar/README.md +140 -0
- package/meter/README.md +128 -0
- package/navigation-menu/README.md +253 -0
- package/number-input/README.md +171 -0
- package/otp-input/README.md +198 -0
- package/package.json +213 -1
- package/pagination/README.md +61 -0
- package/pane-resizer/README.md +136 -0
- package/popover/README.md +262 -0
- package/progress/README.md +115 -0
- package/radio-group/README.md +129 -0
- package/scroll-area/README.md +184 -0
- package/search/README.md +42 -0
- package/select/README.md +488 -0
- package/separator/README.md +84 -0
- package/signal-forms/README.md +72 -0
- package/slider/README.md +152 -0
- package/stepper/README.md +292 -0
- package/switch/README.md +116 -0
- package/table/README.md +769 -0
- package/tabs/README.md +130 -0
- package/time-field/README.md +157 -0
- package/time-picker/README.md +172 -0
- package/toast/README.md +398 -0
- package/toggle/README.md +224 -0
- package/toolbar/README.md +109 -0
- package/tooltip/README.md +274 -0
- package/tree/README.md +708 -0
- package/types/forty-cdk-accordion.d.ts +242 -0
- package/types/forty-cdk-aspect-ratio.d.ts +59 -0
- package/types/forty-cdk-avatar.d.ts +133 -0
- package/types/forty-cdk-breadcrumbs.d.ts +92 -0
- package/types/forty-cdk-breakpoints.d.ts +141 -0
- package/types/forty-cdk-button.d.ts +80 -0
- package/types/forty-cdk-calendar.d.ts +914 -0
- package/types/forty-cdk-carousel.d.ts +530 -0
- package/types/forty-cdk-checkbox.d.ts +141 -0
- package/types/forty-cdk-combobox.d.ts +1259 -0
- package/types/forty-cdk-context-menu.d.ts +313 -0
- package/types/forty-cdk-core.d.ts +5774 -0
- package/types/forty-cdk-date-field.d.ts +307 -0
- package/types/forty-cdk-date-picker.d.ts +622 -0
- package/types/forty-cdk-dialog.d.ts +546 -0
- package/types/forty-cdk-disclosure.d.ts +127 -0
- package/types/forty-cdk-drag-drop.d.ts +456 -0
- package/types/forty-cdk-drawer.d.ts +871 -0
- package/types/forty-cdk-dropdown-menu.d.ts +242 -0
- package/types/forty-cdk-field.d.ts +236 -0
- package/types/forty-cdk-fieldset.d.ts +119 -0
- package/types/forty-cdk-file-upload.d.ts +124 -0
- package/types/forty-cdk-hover-card.d.ts +320 -0
- package/types/forty-cdk-input.d.ts +169 -0
- package/types/forty-cdk-internationalized-date.d.ts +1 -1
- package/types/forty-cdk-listbox.d.ts +513 -0
- package/types/forty-cdk-menu.d.ts +629 -0
- package/types/forty-cdk-menubar.d.ts +451 -0
- package/types/forty-cdk-meter.d.ts +122 -0
- package/types/forty-cdk-navigation-menu.d.ts +514 -0
- package/types/forty-cdk-number-input.d.ts +319 -0
- package/types/forty-cdk-otp-input.d.ts +248 -0
- package/types/forty-cdk-pagination.d.ts +214 -0
- package/types/forty-cdk-pane-resizer.d.ts +145 -0
- package/types/forty-cdk-popover.d.ts +509 -0
- package/types/forty-cdk-progress.d.ts +143 -0
- package/types/forty-cdk-radio-group.d.ts +222 -0
- package/types/forty-cdk-scroll-area.d.ts +258 -0
- package/types/forty-cdk-search.d.ts +142 -0
- package/types/forty-cdk-select.d.ts +899 -0
- package/types/forty-cdk-separator.d.ts +59 -0
- package/types/forty-cdk-signal-forms.d.ts +58 -0
- package/types/forty-cdk-slider.d.ts +379 -0
- package/types/forty-cdk-stepper.d.ts +650 -0
- package/types/forty-cdk-switch.d.ts +87 -0
- package/types/forty-cdk-table.d.ts +723 -0
- package/types/forty-cdk-tabs.d.ts +235 -0
- package/types/forty-cdk-time-field.d.ts +307 -0
- package/types/forty-cdk-time-picker.d.ts +578 -0
- package/types/forty-cdk-toast.d.ts +598 -0
- package/types/forty-cdk-toggle.d.ts +310 -0
- package/types/forty-cdk-toolbar.d.ts +217 -0
- package/types/forty-cdk-tooltip.d.ts +436 -0
- package/types/forty-cdk-tree.d.ts +688 -0
- package/types/forty-cdk.d.ts +1 -19743
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forty-cdk-dialog.mjs","sources":["../../../projects/forty-cdk/dialog/src/dialog-context.ts","../../../projects/forty-cdk/dialog/src/dialog.ts","../../../projects/forty-cdk/dialog/src/dialog-trigger.ts","../../../projects/forty-cdk/dialog/src/dialog-title.ts","../../../projects/forty-cdk/dialog/src/dialog-description.ts","../../../projects/forty-cdk/dialog/src/dialog-close.ts","../../../projects/forty-cdk/dialog/src/dialog-backdrop.ts","../../../projects/forty-cdk/dialog/src/dialog-ref.ts","../../../projects/forty-cdk/dialog/src/dialog-defaults.ts","../../../projects/forty-cdk/dialog/src/dialog-outlet.ts","../../../projects/forty-cdk/dialog/src/dialog-manager.ts","../../../projects/forty-cdk/dialog/src/forty-cdk-dialog.ts"],"sourcesContent":["import { inject, InjectionToken, type Signal } from '@angular/core';\n\nexport type ForDialogCloseReason =\n | 'escape'\n | 'backdrop'\n | 'pointerDownOutside'\n | 'focusOutside'\n | 'closeButton'\n | 'programmatic';\n\n/**\n * Coordination contract owned by `ForDialog` (declarative) or by the\n * programmatic `ForDialogManager.open()` machinery. Title / Description register\n * their generated ids so the dialog wires `aria-labelledby` /\n * `aria-describedby` reactively. Close button and backdrop request close\n * via `requestClose` — the implementation decides whether to honor the\n * request based on `dismissible` and on programmatic semantics.\n *\n * The dialog's \"openness\" isn't part of this contract: the directive is\n * mounted iff the dialog is open, so descendants don't need an open\n * signal to coordinate.\n */\nexport interface ForDialogContext {\n readonly dismissible: Signal<boolean>;\n readonly modal: Signal<boolean>;\n readonly alert: Signal<boolean>;\n readonly labelledBy: Signal<string | null>;\n readonly describedBy: Signal<string | null>;\n /**\n * Portal target shared with the backdrop so both resolve the same\n * container. `null` ⇒ `document.body`. Set via the dialog's `container`\n * input; read once per mount.\n */\n readonly container: Signal<HTMLElement | null>;\n\n registerLabel(id: string): void;\n unregisterLabel(id: string): void;\n registerDescription(id: string): void;\n unregisterDescription(id: string): void;\n\n /**\n * Request that the dialog close. Reasons:\n * - `'escape'` / `'backdrop'` / `'pointerDownOutside'` / `'focusOutside'`:\n * honored only when `dismissible()` is true.\n * - `'closeButton'`: always honored.\n * - `'programmatic'`: always honored, used by `ForDialogManager.open()` consumers\n * that drive close imperatively from a child component.\n *\n * `value` is the close result, propagated to `ForDialogRef.close(value)`\n * in programmatic mode. Ignored in declarative mode.\n */\n requestClose(reason: ForDialogCloseReason, value?: unknown): void;\n}\n\nexport const FOR_DIALOG_CONTEXT = new InjectionToken<ForDialogContext>('FOR_DIALOG_CONTEXT');\n\n/**\n * @internal Per-instance dialog id, provided by `ForDialogManager` into the\n * opened component's injector so the portaled `[forDialogBackdrop]` can\n * reflect `data-for-dialog-id` and be paired with its dialog for the\n * manager's exit-animation orchestration. Absent in the declarative path,\n * where the backdrop's own `animate.leave` runs normally.\n */\nexport const FOR_DIALOG_INSTANCE_ID = new InjectionToken<string>('FOR_DIALOG_INSTANCE_ID');\n\nexport function injectDialogContext(piece: string): ForDialogContext {\n const ctx = inject(FOR_DIALOG_CONTEXT, { optional: true });\n if (!ctx) {\n throw new Error(`[forty-cdk/dialog] ${piece} must be used inside a [forDialog] element.`);\n }\n return ctx;\n}\n","import { booleanAttribute, computed, Directive, input, output, signal } from '@angular/core';\n\nimport { injectModalShell, type VetoableEvent, type VetoableNativeEvent } from 'forty-cdk/core';\nimport {\n FOR_DIALOG_CONTEXT,\n type ForDialogCloseReason,\n type ForDialogContext,\n} from './dialog-context';\n\n/**\n * Headless implementation of the [WAI-ARIA Modal Dialog pattern](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/).\n *\n * Apply `[forDialog]` on the dialog box itself — not on a wrapper. The\n * directive moves the host to `document.body` (portal), traps focus, locks\n * body scroll, and listens for Escape while mounted. `aria-labelledby`\n * and `aria-describedby` wire automatically via `[forDialogTitle]` /\n * `[forDialogDescription]`; pass `ariaLabel` instead if you don't render\n * a visible title.\n *\n * Mount/unmount is the consumer's responsibility — the directive does\n * not manage `[hidden]`. Wrap with `@if (open())` and let\n * `animate.enter` / `animate.leave` handle transitions:\n *\n * ```html\n * @if (dialogOpen()) {\n * <div forDialog (dismiss)=\"dialogOpen.set(false)\" animate.leave=\"fade-out\">\n * <h2 forDialogTitle>Confirm</h2>\n * <button forDialogClose>Cancel</button>\n * </div>\n * }\n * ```\n *\n * For programmatic use (open arbitrary components imperatively), see\n * `ForDialogManager.open()`.\n *\n * `data-state` is a static `\"open\"`: because mount is the consumer's\n * responsibility (the host only exists inside `@if (open())`), the element is\n * present iff the dialog is open, so the attribute can never be `\"closed\"`.\n * This is a deliberate choice: rather than keeping the node mounted and\n * flipping `data-state=\"closed\"` to drive an exit transition, exit styling\n * is the consumer's `animate.leave` (see the usage example above), not a\n * `data-state=\"closed\"` selector — so a `[data-state=\"closed\"]` rule would\n * never match and is not a bug.\n */\n@Directive({\n selector: '[forDialog]',\n exportAs: 'forDialog',\n host: {\n '[attr.role]': 'alert() ? \"alertdialog\" : \"dialog\"',\n '[attr.aria-modal]': 'modal() ? \"true\" : null',\n '[attr.aria-label]': 'ariaLabel() || null',\n '[attr.aria-labelledby]': 'labelledBy()',\n '[attr.aria-describedby]': 'describedBy()',\n 'data-state': 'open',\n tabindex: '-1',\n },\n providers: [{ provide: FOR_DIALOG_CONTEXT, useExisting: ForDialog }],\n})\nexport class ForDialog implements ForDialogContext {\n /**\n * When true (default), Escape, backdrop click, pointer-down outside, and\n * focus outside emit `(dismiss)`. Disable for critical confirm flows that\n * must be answered explicitly via `[forDialogClose]`.\n */\n readonly dismissible = input(true, { transform: booleanAttribute });\n\n /**\n * When true (default), sets `aria-modal=\"true\"`, locks body scroll, and\n * traps focus. Set to `false` for non-modal popups (rare for dialogs).\n */\n readonly modal = input(true, { transform: booleanAttribute });\n\n /** When true, role becomes `alertdialog` (interrupts assistive tech). */\n readonly alert = input(false, { transform: booleanAttribute });\n\n /** When true (default), focus returns to the previously focused element on close. */\n readonly returnFocus = input(true, { transform: booleanAttribute });\n\n /**\n * Where to send focus on mount. `'first'` (default) finds the first\n * focusable descendant; `'container'` focuses the dialog box itself\n * (useful when there's nothing focusable inside).\n */\n readonly initialFocus = input<'first' | 'container'>('first');\n\n /** Manual `aria-label`. Use this when no visible title element exists. */\n readonly ariaLabel = input<string | null>(null);\n\n /**\n * Portal target for the dialog surface. Defaults to `document.body`. Pair\n * with `[modal]=\"false\"` for a dialog scoped to a positioned region\n * instead of the viewport. Read once at mount. The backdrop portals to the\n * same container.\n */\n readonly container = input<HTMLElement | null>(null);\n\n /**\n * Emitted when the dialog wants to close. Consumers wire this to flip\n * the signal that gates the surrounding `@if`. Reasons: `'escape'`,\n * `'backdrop'`, `'pointerDownOutside'`, `'focusOutside'`,\n * `'closeButton'`, `'programmatic'`.\n */\n readonly dismiss = output<ForDialogCloseReason>();\n\n /**\n * Fires when the user presses Escape while this dialog is the topmost\n * dismissable layer. Call `preventDefault()` on the emitted veto to\n * suppress the subsequent `(dismiss)` emission (e.g. to ask for\n * confirmation first). The original `KeyboardEvent` is available on\n * `.event` for inspection.\n */\n readonly escapeKeyDown = output<VetoableNativeEvent<KeyboardEvent>>();\n\n /**\n * Fires when a pointer goes down outside the dialog. Call\n * `preventDefault()` on the emitted veto to suppress the auto `(dismiss)`.\n * The native `PointerEvent` is available on `.event`.\n */\n readonly pointerDownOutside = output<VetoableNativeEvent<PointerEvent>>();\n\n /**\n * Fires when focus moves outside the dialog (e.g. user tabs out of a\n * non-modal dialog). `preventDefault()` on the veto suppresses the auto\n * `(dismiss)`. The native `FocusEvent` is available on `.event`.\n */\n readonly focusOutside = output<VetoableNativeEvent<FocusEvent>>();\n\n /**\n * Composite event: fires alongside `pointerDownOutside` and\n * `focusOutside` and shares their veto state — `preventDefault()` on\n * either one suppresses the auto `(dismiss)`.\n */\n readonly interactOutside = output<VetoableNativeEvent<PointerEvent | FocusEvent>>();\n\n /**\n * Callback invoked just before the dialog moves focus into itself on\n * mount. Receives a `VetoableEvent`; call `event.preventDefault()` to\n * skip the imperative focus move — useful when opening a dialog from\n * an input you want to keep focused. The focus trap (modal mode) still\n * cycles Tab inside the dialog once focus enters it.\n *\n * Bound as a function reference (`[autoFocusOnOpen]=\"onOpen\"`), not as\n * an event binding. Symmetric with `ForDialogManager`'s\n * `config.autoFocusOnOpen`. The callback shape (rather than an\n * `output()`) lets the directive invoke it during the destroy hook\n * without depending on Angular's `OutputEmitterRef` lifecycle.\n */\n readonly autoFocusOnOpen = input<((event: VetoableEvent) => void) | undefined>(undefined);\n\n /**\n * Callback invoked just before focus returns to the previously\n * focused element on unmount. Receives a `VetoableEvent`; call\n * `event.preventDefault()` to skip the return-focus — useful when\n * the consumer wants to send focus elsewhere imperatively (e.g. a\n * confirmation toast).\n *\n * Bound as a function reference (`[autoFocusOnClose]=\"onClose\"`), not\n * as an event binding. Fires reliably on both close paths: the\n * `(dismiss)` output flow AND a direct `open.set(false)` from the\n * consumer. Symmetric with `ForDialogManager`'s\n * `config.autoFocusOnClose`.\n */\n readonly autoFocusOnClose = input<((event: VetoableEvent) => void) | undefined>(undefined);\n\n readonly #labelIds = signal<readonly string[]>([]);\n readonly #describedByIds = signal<readonly string[]>([]);\n // Captures the `value` argument from the most recent `requestClose(reason, value)`\n // call. Read by `ForDialogManager` to bridge `[forDialogClose] [closeWith]`\n // into `ForDialogRef.close(value)`. Plain in declarative usage (no consumer\n // ever reads it), so the API surface is unchanged.\n readonly #lastCloseValue = signal<unknown>(undefined);\n\n readonly labelledBy = computed<string | null>(() => {\n const ids = this.#labelIds();\n return ids.length === 0 ? null : ids.join(' ');\n });\n readonly describedBy = computed<string | null>(() => {\n const ids = this.#describedByIds();\n return ids.length === 0 ? null : ids.join(' ');\n });\n\n constructor() {\n // The shared modal-shell handles portal + dismissable layer (with the\n // triple-veto pattern this directive used to implement inline) + modal\n // vs non-modal branching (focus trap + scroll lock + inert siblings) +\n // return-focus on destroy + the WebKit-#136 sync return-target capture.\n // Anything dialog-specific (label / description registration, role\n // binding, ariaLabel) stays here.\n injectModalShell({\n modal: this.modal,\n returnFocus: this.returnFocus,\n initialFocus: this.initialFocus,\n container: this.container,\n autoFocusOnOpen: () => this.autoFocusOnOpen(),\n autoFocusOnClose: () => this.autoFocusOnClose(),\n dismiss: {\n dismissible: this.dismissible,\n requestClose: (reason) => this.requestClose(reason),\n emitEscapeKeyDown: (veto) => this.escapeKeyDown.emit(veto),\n emitPointerDownOutside: (veto) => this.pointerDownOutside.emit(veto),\n emitFocusOutside: (veto) => this.focusOutside.emit(veto),\n emitInteractOutside: (veto) => this.interactOutside.emit(veto),\n },\n });\n }\n\n registerLabel(id: string): void {\n this.#labelIds.update((arr) => (arr.includes(id) ? arr : [...arr, id]));\n }\n unregisterLabel(id: string): void {\n this.#labelIds.update((arr) => arr.filter((x) => x !== id));\n }\n registerDescription(id: string): void {\n this.#describedByIds.update((arr) => (arr.includes(id) ? arr : [...arr, id]));\n }\n unregisterDescription(id: string): void {\n this.#describedByIds.update((arr) => arr.filter((x) => x !== id));\n }\n\n requestClose(reason: ForDialogCloseReason, value?: unknown): void {\n if (reason !== 'closeButton' && reason !== 'programmatic' && !this.dismissible()) {\n return;\n }\n this.#lastCloseValue.set(value);\n // The `autoFocusOnClose` callback fires from the destroy hook (after\n // the consumer's `(dismiss)` listener flips the `@if`-gating signal),\n // so it stays consistent across both close paths: this output-driven\n // flow AND a direct `open.set(false)` that bypasses `requestClose`\n // entirely.\n this.dismiss.emit(reason);\n }\n\n /**\n * The `value` argument from the most recent `requestClose(reason, value)`\n * call. Read by `ForDialogManager` to bridge `[forDialogClose] [closeWith]`\n * into `ForDialogRef.close(value)`. Declarative consumers never need this —\n * it is plumbing for the imperative bootstrap path.\n *\n * @internal\n */\n readonly lastCloseValue = this.#lastCloseValue.asReadonly();\n}\n","import {\n booleanAttribute,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n isDevMode,\n model,\n} from '@angular/core';\n\nimport { reflectDisabled } from 'forty-cdk/core';\n\n/**\n * Button that toggles the dialog when clicked. Apply on a focusable element —\n * preferably a `<button>` — so keyboard users can reach it.\n *\n * Wires `aria-haspopup=\"dialog\"`, `aria-expanded`, `aria-controls`, and\n * `data-state` on the host. Two-way bind `[(open)]` to the same signal that\n * gates the surrounding `@if` around `[forDialog]`. Focus return on close is\n * handled by `[forDialog]` automatically — its focus trap captures the\n * previously-focused element on mount and restores it on destroy, which is\n * the trigger when the user clicked it.\n *\n * ```html\n * <button forDialogTrigger [(open)]=\"dialogOpen\" controls=\"my-dialog\">Open</button>\n * @if (dialogOpen()) {\n * <div forDialog id=\"my-dialog\" (dismiss)=\"dialogOpen.set(false)\">…</div>\n * }\n * ```\n */\n@Directive({\n selector: '[forDialogTrigger]',\n exportAs: 'forDialogTrigger',\n host: {\n type: 'button',\n '[attr.aria-haspopup]': '\"dialog\"',\n '[attr.aria-expanded]': 'open() ? \"true\" : \"false\"',\n '[attr.aria-controls]': 'open() ? controls() : null',\n '[attr.data-state]': 'open() ? \"open\" : \"closed\"',\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\n '[attr.aria-disabled]': 'disabled() ? \"true\" : null',\n '(click)': 'onClick()',\n },\n})\nexport class ForDialogTrigger {\n /**\n * Two-way bindable. Bind to the same signal that gates the surrounding\n * `@if` around `[forDialog]`. The `model()` change emitter (`(openChange)`)\n * fires only on internal transitions (trigger click), never on consumer\n * writes via `[(open)]`.\n */\n readonly open = model<boolean>(false);\n\n /**\n * Id of the controlled dialog box. Mirrored to `aria-controls` while the\n * dialog is open. The consumer is responsible for setting the same `id` on\n * `[forDialog]`. Has no effect on focus or behavior — purely the\n * accessibility relationship between trigger and box. Leaving it unset when\n * the dialog opens drops `aria-controls` silently; a dev-mode warning fires\n * so the missing linkage is visible during development.\n */\n readonly controls = input<string | null>(null);\n\n /**\n * When true, click is ignored and the host reflects `data-disabled=\"\"`,\n * `aria-disabled=\"true\"`, and the native `disabled` attribute so the\n * trigger is announced as disabled by assistive tech and dropped from\n * the tab order.\n */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n reflectDisabled(this.disabled);\n if (isDevMode()) {\n effect(() => {\n if (this.open() && this.controls() === null) {\n console.warn(\n '[forty-cdk/dialog] [forDialogTrigger] is open but has no [controls] — aria-controls is omitted. Set [controls] to the id on [forDialog] so assistive tech links the trigger to its dialog.',\n );\n }\n });\n }\n }\n\n protected onClick(): void {\n if (this.disabled()) {\n return;\n }\n // Force focus back onto the trigger before opening. WebKit/Safari does\n // not focus a `<button>` on `mousedown`, and an already-focused button\n // is blurred by the same `mousedown`, so by the time this click handler\n // runs the active element is `<body>`. The dialog's return-focus\n // contract is \"restore to whatever held focus when I opened\" — without\n // this, that target captures `body` on WebKit and return-focus is a\n // no-op (#136). Idempotent on Chromium / jsdom (already focused).\n this.#host.nativeElement.focus();\n this.open.update((v) => !v);\n }\n}\n","import { Directive } from '@angular/core';\n\nimport { registerA11yName } from 'forty-cdk/core';\nimport { injectDialogContext } from './dialog-context';\n\n/**\n * Convenience: gives the host element a stable id and registers it as the\n * dialog's accessible name (`aria-labelledby`). Apply on a heading element\n * (`<h2>`, `<h3>`...) inside `[forDialog]`.\n *\n * If you don't render visible title text, omit this and pass `ariaLabel`\n * on the dialog itself instead.\n */\n@Directive({\n selector: '[forDialogTitle]',\n exportAs: 'forDialogTitle',\n host: {\n '[id]': 'id()',\n },\n})\nexport class ForDialogTitle {\n protected readonly id = registerA11yName(\n injectDialogContext('ForDialogTitle'),\n 'for-dialog-title',\n );\n}\n","import { Directive } from '@angular/core';\n\nimport { registerA11yDescription } from 'forty-cdk/core';\nimport { injectDialogContext } from './dialog-context';\n\n/**\n * Convenience: gives the host element a stable id and registers it as the\n * dialog's accessible description (`aria-describedby`). Apply on a `<p>` or\n * other element inside `[forDialog]`. Optional — only use when there's\n * non-title supporting copy (the question of a confirm, the rationale of\n * an alert).\n */\n@Directive({\n selector: '[forDialogDescription]',\n exportAs: 'forDialogDescription',\n host: {\n '[id]': 'id()',\n },\n})\nexport class ForDialogDescription {\n protected readonly id = registerA11yDescription(\n injectDialogContext('ForDialogDescription'),\n 'for-dialog-description',\n );\n}\n","import { Directive, input } from '@angular/core';\n\nimport { injectDialogContext } from './dialog-context';\n\n/**\n * Button that closes the surrounding dialog when clicked. Apply on a\n * `<button>` inside `[forDialog]`. Pass `[closeWith]` to propagate a return\n * value to `ForDialogRef.close()` in programmatic usage; ignored in\n * declarative usage.\n */\n@Directive({\n selector: '[forDialogClose]',\n exportAs: 'forDialogClose',\n host: {\n type: 'button',\n 'data-state': 'open',\n '(click)': 'onClick()',\n },\n})\nexport class ForDialogClose {\n readonly #ctx = injectDialogContext('ForDialogClose');\n\n /** Optional value passed to `ForDialogRef.close()` (programmatic mode). */\n readonly closeWith = input<unknown>(undefined);\n\n protected onClick(): void {\n this.#ctx.requestClose('closeButton', this.closeWith());\n }\n}\n","import { Directive, inject } from '@angular/core';\n\nimport { injectPortal } from 'forty-cdk/core';\nimport { FOR_DIALOG_INSTANCE_ID, injectDialogContext } from './dialog-context';\n\n/**\n * Optional backdrop overlay. Portaled to the dialog's `container` (the same\n * target the surface uses) — `document.body` by default. While mounted the\n * backdrop is visible; mount/unmount it alongside the dialog with the same\n * `@if` so `animate.enter` / `animate.leave` works on both.\n *\n * The directive applies no visual styles — set `position: fixed; inset: 0;\n * background: rgba(0,0,0,0.5)` (or whatever) yourself. For a backdrop inside a\n * scoped `container`, use `position: absolute` so it is bounded to that box.\n */\n@Directive({\n selector: '[forDialogBackdrop]',\n exportAs: 'forDialogBackdrop',\n host: {\n 'data-for-dialog-backdrop': '',\n // Marker the inert-siblings utility looks for so the backdrop, which is\n // portaled to body alongside the dialog, is not inerted alongside the\n // rest of the document.\n 'data-for-modal-peer': '',\n 'data-state': 'open',\n '[attr.data-for-dialog-id]': 'instanceId',\n '(click)': 'onClick($event)',\n },\n})\nexport class ForDialogBackdrop {\n protected readonly ctx = injectDialogContext('ForDialogBackdrop');\n\n /**\n * Per-instance dialog id when opened through `ForDialogManager` (reflected\n * as `data-for-dialog-id` so the manager can pair this portaled backdrop\n * with its dialog and drive its exit animation). `null` in the declarative\n * path, where the host binding emits no attribute.\n */\n protected readonly instanceId = inject(FOR_DIALOG_INSTANCE_ID, { optional: true });\n\n constructor() {\n injectPortal({ target: this.ctx.container });\n }\n\n protected onClick(event: MouseEvent): void {\n // Only close on direct backdrop click, not events bubbled from a child.\n if (event.target === event.currentTarget) {\n this.ctx.requestClose('backdrop');\n }\n }\n}\n","import { OverlayRef } from 'forty-cdk/core';\n\n/**\n * Handle returned by `ForDialogManager.open()`. Inject inside the opened\n * component to drive close imperatively. Both reactive (`isClosed`, `result`)\n * and awaitable (`closed`) APIs are exposed — pick what fits the call site.\n *\n * `R` is the close-result type. Default `unknown`; specify it on\n * `manager.open<C, R>(...)` to get type safety.\n */\nexport class ForDialogRef<R = unknown> extends OverlayRef<R> {}\n","import { type Provider } from '@angular/core';\n\nimport { createDefaults } from 'forty-cdk/core';\n\n/**\n * Defaults inherited by descendant dialogs in the surrounding injector\n * scope. Configure with `provideForDialogDefaults`. Applies to both\n * declarative dialogs and `ForDialogManager.open()`; the manager resolves\n * `config[key] ?? defaults[key]` so a per-`open()` value always wins over the\n * scope default.\n */\nexport interface ForDialogDefaults {\n /**\n * CSS class applied (via `animate.enter`) to the programmatic overlay host\n * when it mounts, so it plays an enter animation. The class lands on the\n * `[forDialog]` host that also carries the consumer `class`. No default.\n */\n animateEnter?: string;\n /**\n * CSS class applied to the programmatic overlay host when `close()` is\n * called, kept on the still-mounted host until its CSS animations finish so\n * an exit transition plays before teardown. No default (close is immediate).\n */\n animateLeave?: string;\n /**\n * CSS class applied to the portaled `[forDialogBackdrop]` when `close()` is\n * called, so the backdrop plays an exit animation in lockstep with the\n * host. Needed because a backdrop declared inside the opened component plays\n * its `animate.enter` on mount but cannot run its template `animate.leave` —\n * Angular does not process leave animations across the `ngComponentOutlet`\n * boundary the manager mounts the component through. No default.\n */\n backdropAnimateLeave?: string;\n}\n\nconst FALLBACK: ForDialogDefaults = {};\n\nconst { token, provideDefaults } = createDefaults<ForDialogDefaults>(\n 'FOR_DIALOG_DEFAULTS',\n FALLBACK,\n);\n\n/** Token holding the resolved dialog defaults for the current scope. */\nexport const FOR_DIALOG_DEFAULTS = token;\n\n/**\n * Configures forty-cdk dialog defaults for this injector scope. Partial\n * overrides inherit unspecified keys from the parent scope (or library\n * defaults at the root).\n */\nexport function provideForDialogDefaults(defaults: Partial<ForDialogDefaults> = {}): Provider[] {\n return provideDefaults(defaults);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n Directive,\n inject,\n type Injector,\n type Type,\n} from '@angular/core';\nimport { NgComponentOutlet } from '@angular/common';\n\nimport {\n OverlayContextInjector,\n type OverlayManagerEntry,\n type OverlayManagerOutlet,\n type OverlayManagerOutletHost,\n type VetoableEvent,\n type VetoableNativeEvent,\n} from 'forty-cdk/core';\nimport { ForDialog } from './dialog';\n\n/**\n * @internal Minimal surface the outlet needs from `ForDialogManager` — avoids\n * a circular import between the outlet file and the manager file.\n */\nexport type ForDialogOutletHost = OverlayManagerOutletHost<ForDialogEntry>;\n\n/**\n * Shape of a single open dialog entry stored in the manager.\n *\n * Internal — not re-exported from `public-api.ts`.\n */\nexport interface ForDialogEntry extends OverlayManagerEntry {\n readonly component: Type<unknown>;\n readonly hostClass: string;\n readonly dismissible: boolean | undefined;\n readonly modal: boolean | undefined;\n readonly alert: boolean | undefined;\n readonly returnFocus: boolean | undefined;\n readonly initialFocus: 'first' | 'container' | undefined;\n readonly ariaLabel: string | undefined;\n readonly container: HTMLElement | null | undefined;\n readonly animateEnter: string | undefined;\n readonly autoFocusOnOpen: ((e: VetoableEvent) => void) | undefined;\n readonly autoFocusOnClose: ((e: VetoableEvent) => void) | undefined;\n readonly escapeKeyDown: ((e: VetoableNativeEvent<KeyboardEvent>) => void) | undefined;\n readonly pointerDownOutside: ((e: VetoableNativeEvent<PointerEvent>) => void) | undefined;\n readonly focusOutside: ((e: VetoableNativeEvent<FocusEvent>) => void) | undefined;\n readonly interactOutside:\n | ((e: VetoableNativeEvent<PointerEvent | FocusEvent>) => void)\n | undefined;\n handleClose(value: unknown): void;\n injectorFor(parent: Injector): Injector;\n}\n\n/**\n * @internal Exposes the element injector at a child of the row's `[forDialog]`\n * element so the user component rendered via `NgComponentOutlet` resolves\n * `FOR_DIALOG_CONTEXT` from the enclosing `[forDialog]` host. The shared body\n * lives in `OverlayContextInjector`; this only carries the dialog selector.\n */\n@Directive({\n selector: '[forDialogContextInjector]',\n exportAs: 'forDialogContextInjector',\n})\nexport class ForDialogContextInjector extends OverlayContextInjector {}\n\n/**\n * @internal Outlet component created once by `ForDialogManager` on the first\n * `open()` call. Renders every live entry from the manager's entries signal\n * with `@for`, so Angular's control-flow unmount triggers `animate.leave` on\n * close — identical to the declarative `@if (open()) { <div forDialog …> }` path.\n *\n * Constructed exclusively by `ForDialogManager`. Not exported from\n * `public-api.ts`.\n */\n@Component({\n selector: 'for-dialog-outlet',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ForDialog, NgComponentOutlet, ForDialogContextInjector],\n template: `\n @for (entry of entries(); track entry.id) {\n <div\n forDialog\n [attr.data-for-dialog-id]=\"entry.id\"\n [animate.enter]=\"entry.animateEnter ?? ''\"\n [class]=\"entry.hostClass\"\n [dismissible]=\"entry.dismissible ?? true\"\n [modal]=\"entry.modal ?? true\"\n [alert]=\"entry.alert ?? false\"\n [returnFocus]=\"entry.returnFocus ?? true\"\n [initialFocus]=\"entry.initialFocus ?? 'first'\"\n [ariaLabel]=\"entry.ariaLabel ?? null\"\n [container]=\"entry.container ?? null\"\n [autoFocusOnOpen]=\"entry.autoFocusOnOpen\"\n [autoFocusOnClose]=\"entry.autoFocusOnClose\"\n (dismiss)=\"entry.handleClose(fd.lastCloseValue())\"\n (escapeKeyDown)=\"entry.escapeKeyDown?.($event)\"\n (pointerDownOutside)=\"entry.pointerDownOutside?.($event)\"\n (focusOutside)=\"entry.focusOutside?.($event)\"\n (interactOutside)=\"entry.interactOutside?.($event)\"\n #fd=\"forDialog\"\n >\n <ng-container forDialogContextInjector #ctx=\"forDialogContextInjector\">\n <ng-container\n [ngComponentOutlet]=\"entry.component\"\n [ngComponentOutletInjector]=\"entry.injectorFor(ctx.injector)\"\n />\n </ng-container>\n </div>\n }\n `,\n})\nexport class ForDialogOutlet implements OverlayManagerOutlet<ForDialogEntry> {\n readonly #destroyRef = inject(DestroyRef);\n #host: ForDialogOutletHost | null = null;\n\n /**\n * @internal Called once by `ForDialogManager` right after creating this\n * outlet to wire the reactive entries accessor and the destroy hook.\n */\n init(host: ForDialogOutletHost): void {\n this.#host = host;\n this.#destroyRef.onDestroy(() => host.closeAllForDestroy());\n }\n\n entries(): readonly ForDialogEntry[] {\n return this.#host?.entries() ?? [];\n }\n}\n","import {\n createComponent,\n inject,\n Injectable,\n InjectionToken,\n type Provider,\n type Type,\n} from '@angular/core';\n\nimport {\n resolveConfigClass,\n OverlayManagerCore,\n type VetoableEvent,\n type VetoableNativeEvent,\n} from 'forty-cdk/core';\nimport { FOR_DIALOG_INSTANCE_ID } from './dialog-context';\nimport { FOR_DIALOG_DEFAULTS } from './dialog-defaults';\nimport type { ForDialogEntry } from './dialog-outlet';\nimport { ForDialogOutlet } from './dialog-outlet';\nimport { ForDialogRef } from './dialog-ref';\n\n/**\n * Injection token for the `data` payload passed to `ForDialogManager.open(component, { data })`.\n * The manager always provides this token, falling back to `null` when no `data`\n * was configured, so inject it inside the opened component:\n *\n * ```ts\n * readonly data = inject(FOR_DIALOG_DATA) as MyShape | null;\n * ```\n *\n * Prefer `injectDialogData<T>()` for typed access without manual casts.\n */\nexport const FOR_DIALOG_DATA = new InjectionToken<unknown>('FOR_DIALOG_DATA');\n\n/**\n * Typed accessor for the `data` payload. Returns `T | null` because the manager\n * provides `null` when `open()` is called without `data` — guard for `null`\n * before dereferencing the payload.\n */\nexport function injectDialogData<T = unknown>(): T | null {\n return inject(FOR_DIALOG_DATA) as T | null;\n}\n\nexport interface ForDialogOpenConfig<D = unknown> {\n /** Payload available inside the dialog component via `injectDialogData<T>()`. */\n data?: D;\n\n /** When true (default), Escape closes the dialog. */\n dismissible?: boolean;\n\n /** When true (default), set `aria-modal`, lock body scroll, trap focus. */\n modal?: boolean;\n\n /** When true, role becomes `alertdialog` instead of `dialog`. Default `false`. */\n alert?: boolean;\n\n /** When true (default), focus returns to the previously focused element on close. */\n returnFocus?: boolean;\n\n /** Where to send focus on open. Default `'first'`. */\n initialFocus?: 'first' | 'container';\n\n /** Manual `aria-label`. Use when no visible title element is rendered. */\n ariaLabel?: string;\n\n /**\n * Portal target for the surface + backdrop. Defaults to `document.body`.\n * Pair with `modal: false` for a dialog scoped to a positioned region\n * instead of the viewport.\n */\n container?: HTMLElement | null;\n\n /**\n * CSS class applied (via `animate.enter`) to the overlay root the moment it\n * mounts, so a programmatic dialog plays an enter animation just like a\n * declarative `<div forDialog animate.enter=\"…\">`. The class lands on the\n * same `[forDialog]` host as {@link class}. Falls back to\n * `provideForDialogDefaults({ animateEnter })`.\n */\n animateEnter?: string;\n\n /**\n * CSS class applied to the overlay root when `close()` is called. The\n * manager keeps the host mounted with this class until its CSS animations /\n * transitions finish, then tears the dialog down — so a programmatic dialog\n * plays an exit animation. `close()` still resolves its promise and flips\n * `isClosed()` immediately; only the visual teardown waits. With no class (or\n * no animation, or under `prefers-reduced-motion`), close is immediate. Falls\n * back to `provideForDialogDefaults({ animateLeave })`.\n */\n animateLeave?: string;\n\n /**\n * Exit-animation class for the portaled `[forDialogBackdrop]`: the manager\n * adds it when `close()` is called and keeps the backdrop mounted until the\n * animation finishes, so the backdrop fades out in lockstep with the host.\n *\n * The split with the enter animation is intentional, not an oversight.\n * Declare the backdrop's **enter** with `animate.enter=\"…\"` on the element\n * itself — it fires on mount, which Angular runs normally even inside the\n * manager's `ngComponentOutlet` — and declare only its **leave** here. A\n * template `animate.leave` on the backdrop never fires under the manager:\n * Angular does not run leave animations across the `ngComponentOutlet` the\n * opened component is mounted through. (The host box is symmetric — both\n * `animateEnter` and `animateLeave` are config, since the manager owns that\n * element.) Falls back to `provideForDialogDefaults({ backdropAnimateLeave })`.\n */\n backdropAnimateLeave?: string;\n\n /**\n * Consumer CSS class(es) applied to the overlay root (the `[forDialog]`\n * host). Pass a single class (`'my-dialog'`) or a space-separated string\n * (`'my-dialog my-dialog--pop'`). Merged with the directive's own host\n * attributes — it never clobbers `data-state` / `role` / `aria-modal`.\n *\n * Use this to carry design-system classes onto a programmatic dialog: the\n * host is created class-less and the literal `[forDialog]` attribute is\n * absent, so without this the consumer has no node to style. For multiple\n * classes as an array, prefer {@link classList}.\n */\n class?: string;\n /**\n * Consumer CSS class(es) applied to the overlay root, as an array\n * (`['my-dialog', 'my-dialog--pop']`) or a space-separated string. Merged\n * with {@link class} and with the directive's own host attributes.\n */\n classList?: string | readonly string[];\n\n /** Extra providers for the opened component's injector (alongside `FOR_DIALOG_DATA` + `ForDialogRef`). */\n providers?: Provider[];\n\n /**\n * Fires just before the dialog moves focus into itself on mount.\n * Call `event.preventDefault()` to skip the imperative focus move\n * — useful when opening a dialog from an input you want to keep\n * focused. The focus trap (modal mode) still cycles Tab once focus\n * enters the dialog.\n */\n autoFocusOnOpen?: (event: VetoableEvent) => void;\n\n /**\n * Fires just before focus returns to the previously focused element\n * on unmount. Call `event.preventDefault()` to skip the return-focus.\n */\n autoFocusOnClose?: (event: VetoableEvent) => void;\n\n /**\n * Per-channel dismiss hook mirroring the declarative `(escapeKeyDown)`\n * output. Fires when Escape is pressed while this dialog is the topmost\n * dismissable layer. Call `event.preventDefault()` on the veto to suppress\n * the implicit close while keeping the other dismiss channels live — the\n * programmatic equivalent of `(escapeKeyDown)=\"$event.preventDefault()\"`.\n * The original `KeyboardEvent` is on `.event`.\n */\n escapeKeyDown?: (event: VetoableNativeEvent<KeyboardEvent>) => void;\n\n /**\n * Per-channel dismiss hook mirroring the declarative `(pointerDownOutside)`\n * output. Fires when a pointer goes down outside the dialog. Call\n * `event.preventDefault()` on the veto to suppress the implicit close. The\n * native `PointerEvent` is on `.event`.\n */\n pointerDownOutside?: (event: VetoableNativeEvent<PointerEvent>) => void;\n\n /**\n * Per-channel dismiss hook mirroring the declarative `(focusOutside)`\n * output. Fires when focus moves outside the dialog. Call\n * `event.preventDefault()` on the veto to suppress the implicit close. The\n * native `FocusEvent` is on `.event`.\n */\n focusOutside?: (event: VetoableNativeEvent<FocusEvent>) => void;\n\n /**\n * Composite dismiss hook mirroring the declarative `(interactOutside)`\n * output. Fires alongside `pointerDownOutside` / `focusOutside` and shares\n * their veto state — `event.preventDefault()` on either suppresses the\n * implicit close. Use this to keep a programmatic floater open on outside\n * interaction while leaving Escape live (set `dismissible: true` and veto\n * here). The native `PointerEvent | FocusEvent` is on `.event`.\n */\n interactOutside?: (event: VetoableNativeEvent<PointerEvent | FocusEvent>) => void;\n}\n\ninterface InternalDialogEntry extends ForDialogEntry {\n readonly ref: ForDialogRef<unknown>;\n}\n\n/**\n * Programmatic dialog opener — open a component as a modal dialog from\n * TypeScript. Inject anywhere, call `open(MyComponent, { data, ... })` and get a\n * `ForDialogRef<R>` back. Internally the manager renders the user component\n * inside a manager-owned `@for` outlet, so Angular's control-flow unmount\n * fires `animate.leave` before the node leaves the DOM — identical to the\n * declarative `@if (open()) { <div forDialog animate.leave=\"…\"> }` path.\n *\n * Inside the opened component the usual dialog pieces work without any extra\n * wiring: `[forDialogTitle]`, `[forDialogDescription]`, `[forDialogBackdrop]`,\n * `[forDialogClose]`. `[forDialogClose] [closeWith]` propagates through to\n * `ForDialogRef.close(value)`.\n *\n * Inject `ForDialogRef` to drive close imperatively and `FOR_DIALOG_DATA` (or\n * `injectDialogData<T>()`) for the payload.\n */\n@Injectable({ providedIn: 'root' })\nexport class ForDialogManager extends OverlayManagerCore<ForDialogEntry> {\n readonly #defaults = inject(FOR_DIALOG_DEFAULTS);\n\n constructor() {\n super({\n idPrefix: 'for-dialog-instance',\n idAttribute: 'data-for-dialog-id',\n backdropAttribute: 'data-for-dialog-backdrop',\n createOutlet: (environmentInjector) =>\n createComponent(ForDialogOutlet, { environmentInjector }),\n });\n }\n\n open<C, R = unknown, D = unknown>(\n component: Type<C>,\n config: ForDialogOpenConfig<D> = {},\n ): ForDialogRef<R> {\n const { id, remove } = this.nextId();\n\n const animateEnter = config.animateEnter ?? this.#defaults.animateEnter;\n const animateLeave = config.animateLeave ?? this.#defaults.animateLeave;\n const backdropAnimateLeave = config.backdropAnimateLeave ?? this.#defaults.backdropAnimateLeave;\n\n const ref = new ForDialogRef<R>(() =>\n this.beginLeave(id, animateLeave, backdropAnimateLeave, remove),\n );\n\n const hostClass = resolveConfigClass(config) ?? '';\n const data = config.data ?? null;\n\n const entry: InternalDialogEntry = {\n id,\n component: component as Type<unknown>,\n hostClass,\n dismissible: config.dismissible,\n modal: config.modal,\n alert: config.alert,\n returnFocus: config.returnFocus,\n initialFocus: config.initialFocus,\n ariaLabel: config.ariaLabel,\n container: config.container,\n animateEnter,\n autoFocusOnOpen: config.autoFocusOnOpen,\n autoFocusOnClose: config.autoFocusOnClose,\n escapeKeyDown: config.escapeKeyDown,\n pointerDownOutside: config.pointerDownOutside,\n focusOutside: config.focusOutside,\n interactOutside: config.interactOutside,\n ref: ref as ForDialogRef<unknown>,\n handleClose(value: unknown): void {\n ref.close(value as R);\n },\n injectorFor: this.createInjectorFactory([\n { provide: FOR_DIALOG_DATA, useValue: data },\n { provide: FOR_DIALOG_INSTANCE_ID, useValue: id },\n { provide: ForDialogRef, useValue: ref },\n ...(config.providers ?? []),\n ]),\n };\n\n this.register(entry);\n\n return ref;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAsDa,kBAAkB,GAAG,IAAI,cAAc,CAAmB,oBAAoB;AAE3F;;;;;;AAMG;AACI,MAAM,sBAAsB,GAAG,IAAI,cAAc,CAAS,wBAAwB,CAAC;AAEpF,SAAU,mBAAmB,CAAC,KAAa,EAAA;AAC/C,IAAA,MAAM,GAAG,GAAG,MAAM,CAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC1D,IAAI,CAAC,GAAG,EAAE;AACR,QAAA,MAAM,IAAI,KAAK,CAAC,sBAAsB,KAAK,CAAA,2CAAA,CAA6C,CAAC;IAC3F;AACA,IAAA,OAAO,GAAG;AACZ;;AC9DA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCG;MAeU,SAAS,CAAA;AACpB;;;;AAIG;IACM,WAAW,GAAG,KAAK,CAAC,IAAI,mFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEnE;;;AAGG;IACM,KAAK,GAAG,KAAK,C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AA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cADH,MAAM,EAAA,CAAA;;2FACnB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;AC3MlC;;AAEG;;;;"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, model, input, booleanAttribute, signal, Directive, computed, ElementRef } from '@angular/core';
|
|
3
|
+
import { IdGenerator, adoptHostId, reflectDisabled, createDefaults } from 'forty-cdk/core';
|
|
4
|
+
|
|
5
|
+
const FOR_DISCLOSURE_CONTEXT = new InjectionToken('FOR_DISCLOSURE_CONTEXT');
|
|
6
|
+
/**
|
|
7
|
+
* Injects the disclosure context or throws a prefixed, actionable error
|
|
8
|
+
* naming the piece that was used outside `[forDisclosure]`.
|
|
9
|
+
*/
|
|
10
|
+
function injectDisclosureContext(piece) {
|
|
11
|
+
const ctx = inject(FOR_DISCLOSURE_CONTEXT, { optional: true });
|
|
12
|
+
if (!ctx) {
|
|
13
|
+
throw new Error(`[forty-cdk/disclosure] ${piece} must be used inside a [forDisclosure] element.`);
|
|
14
|
+
}
|
|
15
|
+
return ctx;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Root of the Disclosure primitive. Holds the open/disabled state and
|
|
20
|
+
* the IDs that wire the trigger to its content.
|
|
21
|
+
*
|
|
22
|
+
* Implements the [WAI-ARIA Disclosure pattern](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/).
|
|
23
|
+
*
|
|
24
|
+
* Compose it on any wrapper element with `[forDisclosureTrigger]` and
|
|
25
|
+
* `[forDisclosureContent]` as descendants.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```html
|
|
29
|
+
* <div forDisclosure [(open)]="isOpen">
|
|
30
|
+
* <button type="button" forDisclosureTrigger>Toggle</button>
|
|
31
|
+
* <div forDisclosureContent>...</div>
|
|
32
|
+
* </div>
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
class ForDisclosure {
|
|
36
|
+
#idGen = inject(IdGenerator);
|
|
37
|
+
/**
|
|
38
|
+
* Two-way bindable open state. Use `[(open)]` for both read & write, or
|
|
39
|
+
* `(openChange)` alone to observe transitions when the directive itself
|
|
40
|
+
* toggles state (trigger click). The `model()` change emitter does NOT fire
|
|
41
|
+
* for consumer-driven writes via `[(open)]`, so subscribing to
|
|
42
|
+
* `(openChange)` is safe and only sees internal transitions.
|
|
43
|
+
*/
|
|
44
|
+
open = model(false, /* @ts-ignore */
|
|
45
|
+
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
46
|
+
/** When true, click on the trigger is ignored and `data-disabled` is reflected. */
|
|
47
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
48
|
+
#triggerId = signal(this.#idGen.next('for-disclosure-trigger'), /* @ts-ignore */
|
|
49
|
+
...(ngDevMode ? [{ debugName: "#triggerId" }] : /* istanbul ignore next */ []));
|
|
50
|
+
#contentId = signal(this.#idGen.next('for-disclosure-content'), /* @ts-ignore */
|
|
51
|
+
...(ngDevMode ? [{ debugName: "#contentId" }] : /* istanbul ignore next */ []));
|
|
52
|
+
triggerId = this.#triggerId.asReadonly();
|
|
53
|
+
contentId = this.#contentId.asReadonly();
|
|
54
|
+
/**
|
|
55
|
+
* Adopts a consumer-set static `id` on the `[forDisclosureTrigger]` host into
|
|
56
|
+
* `triggerId` (preserving anchors / external `aria-labelledby` references /
|
|
57
|
+
* label `for`) instead of letting the `[id]` host binding clobber it.
|
|
58
|
+
*/
|
|
59
|
+
adoptTriggerId(el) {
|
|
60
|
+
adoptHostId(el, this.#triggerId);
|
|
61
|
+
}
|
|
62
|
+
/** Adopts a consumer-set static `id` on the content host into `contentId`. */
|
|
63
|
+
adoptContentId(el) {
|
|
64
|
+
adoptHostId(el, this.#contentId);
|
|
65
|
+
}
|
|
66
|
+
toggle() {
|
|
67
|
+
if (this.disabled()) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
this.open.set(!this.open());
|
|
71
|
+
}
|
|
72
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForDisclosure, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
73
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: ForDisclosure, isStandalone: true, selector: "[forDisclosure]", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { properties: { "attr.data-state": "open() ? \"open\" : \"closed\"", "attr.data-disabled": "disabled() ? \"\" : null" } }, providers: [{ provide: FOR_DISCLOSURE_CONTEXT, useExisting: ForDisclosure }], exportAs: ["forDisclosure"], ngImport: i0 });
|
|
74
|
+
}
|
|
75
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForDisclosure, decorators: [{
|
|
76
|
+
type: Directive,
|
|
77
|
+
args: [{
|
|
78
|
+
selector: '[forDisclosure]',
|
|
79
|
+
exportAs: 'forDisclosure',
|
|
80
|
+
host: {
|
|
81
|
+
'[attr.data-state]': 'open() ? "open" : "closed"',
|
|
82
|
+
'[attr.data-disabled]': 'disabled() ? "" : null',
|
|
83
|
+
},
|
|
84
|
+
providers: [{ provide: FOR_DISCLOSURE_CONTEXT, useExisting: ForDisclosure }],
|
|
85
|
+
}]
|
|
86
|
+
}], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Trigger button for a `ForDisclosure`. Apply on a `<button>` so Enter/Space
|
|
90
|
+
* toggling come from native button behavior. The directive host-binds
|
|
91
|
+
* `type="button"` so a trigger inside a `<form>` never submits it on toggle.
|
|
92
|
+
*
|
|
93
|
+
* `aria-controls` is emitted only while open — mirroring the overlay triggers'
|
|
94
|
+
* open-only gating — so the reference never dangles at an unmounted panel
|
|
95
|
+
* under the recommended `@if (open())` mount pattern.
|
|
96
|
+
*
|
|
97
|
+
* Disabling: the trigger merges its own `disabled` input OR the root's
|
|
98
|
+
* `disabled` into `effectiveDisabled`, which drives the native `disabled`
|
|
99
|
+
* attribute, `aria-disabled`, `data-disabled`, and the click guard.
|
|
100
|
+
*/
|
|
101
|
+
class ForDisclosureTrigger {
|
|
102
|
+
ctx = injectDisclosureContext('ForDisclosureTrigger');
|
|
103
|
+
/** Disables this trigger only, in addition to the root's `disabled`. */
|
|
104
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
105
|
+
/** Whether the trigger is disabled — its own `disabled` input OR the root's. */
|
|
106
|
+
effectiveDisabled = computed(() => this.disabled() || this.ctx.disabled(), /* @ts-ignore */
|
|
107
|
+
...(ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []));
|
|
108
|
+
constructor() {
|
|
109
|
+
this.ctx.adoptTriggerId(inject(ElementRef).nativeElement);
|
|
110
|
+
reflectDisabled(this.effectiveDisabled);
|
|
111
|
+
}
|
|
112
|
+
onClick() {
|
|
113
|
+
if (this.effectiveDisabled()) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
this.ctx.toggle();
|
|
117
|
+
}
|
|
118
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForDisclosureTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
119
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: ForDisclosureTrigger, isStandalone: true, selector: "[forDisclosureTrigger]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "onClick()" }, properties: { "id": "ctx.triggerId()", "attr.aria-expanded": "ctx.open() ? \"true\" : \"false\"", "attr.aria-controls": "ctx.open() ? ctx.contentId() : null", "attr.aria-disabled": "effectiveDisabled() ? \"true\" : null", "attr.data-state": "ctx.open() ? \"open\" : \"closed\"", "attr.data-disabled": "effectiveDisabled() ? \"\" : null" } }, exportAs: ["forDisclosureTrigger"], ngImport: i0 });
|
|
120
|
+
}
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForDisclosureTrigger, decorators: [{
|
|
122
|
+
type: Directive,
|
|
123
|
+
args: [{
|
|
124
|
+
selector: '[forDisclosureTrigger]',
|
|
125
|
+
exportAs: 'forDisclosureTrigger',
|
|
126
|
+
host: {
|
|
127
|
+
type: 'button',
|
|
128
|
+
'[id]': 'ctx.triggerId()',
|
|
129
|
+
'[attr.aria-expanded]': 'ctx.open() ? "true" : "false"',
|
|
130
|
+
'[attr.aria-controls]': 'ctx.open() ? ctx.contentId() : null',
|
|
131
|
+
'[attr.aria-disabled]': 'effectiveDisabled() ? "true" : null',
|
|
132
|
+
'[attr.data-state]': 'ctx.open() ? "open" : "closed"',
|
|
133
|
+
'[attr.data-disabled]': 'effectiveDisabled() ? "" : null',
|
|
134
|
+
'(click)': 'onClick()',
|
|
135
|
+
},
|
|
136
|
+
}]
|
|
137
|
+
}], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Disclosed content panel for a `ForDisclosure`. The directive does not
|
|
141
|
+
* manage DOM presence — wrap with `@if (open())` so the panel mounts and
|
|
142
|
+
* unmounts with the disclosure state, and use `animate.enter` /
|
|
143
|
+
* `animate.leave` for transitions if desired. If the consumer prefers to
|
|
144
|
+
* keep the panel mounted (for CSS-only transitions or to preserve internal
|
|
145
|
+
* state), the directive reflects `aria-hidden="true"` and `inert` while
|
|
146
|
+
* closed so the panel is removed from the accessibility tree and focus
|
|
147
|
+
* order automatically.
|
|
148
|
+
*/
|
|
149
|
+
class ForDisclosureContent {
|
|
150
|
+
ctx = injectDisclosureContext('ForDisclosureContent');
|
|
151
|
+
constructor() {
|
|
152
|
+
this.ctx.adoptContentId(inject(ElementRef).nativeElement);
|
|
153
|
+
}
|
|
154
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForDisclosureContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
155
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: ForDisclosureContent, isStandalone: true, selector: "[forDisclosureContent]", host: { properties: { "id": "ctx.contentId()", "attr.aria-hidden": "ctx.open() ? null : \"true\"", "attr.inert": "ctx.open() ? null : \"\"", "attr.data-state": "ctx.open() ? \"open\" : \"closed\"", "attr.data-disabled": "ctx.disabled() ? \"\" : null" } }, exportAs: ["forDisclosureContent"], ngImport: i0 });
|
|
156
|
+
}
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForDisclosureContent, decorators: [{
|
|
158
|
+
type: Directive,
|
|
159
|
+
args: [{
|
|
160
|
+
selector: '[forDisclosureContent]',
|
|
161
|
+
exportAs: 'forDisclosureContent',
|
|
162
|
+
host: {
|
|
163
|
+
'[id]': 'ctx.contentId()',
|
|
164
|
+
'[attr.aria-hidden]': 'ctx.open() ? null : "true"',
|
|
165
|
+
'[attr.inert]': 'ctx.open() ? null : ""',
|
|
166
|
+
'[attr.data-state]': 'ctx.open() ? "open" : "closed"',
|
|
167
|
+
'[attr.data-disabled]': 'ctx.disabled() ? "" : null',
|
|
168
|
+
},
|
|
169
|
+
}]
|
|
170
|
+
}], ctorParameters: () => [] });
|
|
171
|
+
|
|
172
|
+
const FALLBACK = {};
|
|
173
|
+
const { token, provideDefaults } = createDefaults('FOR_DISCLOSURE_DEFAULTS', FALLBACK);
|
|
174
|
+
/** Token holding the resolved disclosure defaults for the current scope. */
|
|
175
|
+
const FOR_DISCLOSURE_DEFAULTS = token;
|
|
176
|
+
/**
|
|
177
|
+
* Configures forty-cdk disclosure defaults for this injector scope. Partial
|
|
178
|
+
* overrides inherit unspecified keys from the parent scope (or library
|
|
179
|
+
* defaults at the root).
|
|
180
|
+
*/
|
|
181
|
+
function provideForDisclosureDefaults(defaults = {}) {
|
|
182
|
+
return provideDefaults(defaults);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Generated bundle index. Do not edit.
|
|
187
|
+
*/
|
|
188
|
+
|
|
189
|
+
export { FOR_DISCLOSURE_CONTEXT, FOR_DISCLOSURE_DEFAULTS, ForDisclosure, ForDisclosureContent, ForDisclosureTrigger, provideForDisclosureDefaults };
|
|
190
|
+
//# sourceMappingURL=forty-cdk-disclosure.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forty-cdk-disclosure.mjs","sources":["../../../projects/forty-cdk/disclosure/src/disclosure-context.ts","../../../projects/forty-cdk/disclosure/src/disclosure.ts","../../../projects/forty-cdk/disclosure/src/disclosure-trigger.ts","../../../projects/forty-cdk/disclosure/src/disclosure-content.ts","../../../projects/forty-cdk/disclosure/src/disclosure-defaults.ts","../../../projects/forty-cdk/disclosure/src/forty-cdk-disclosure.ts"],"sourcesContent":["import { inject, InjectionToken, type Signal } from '@angular/core';\n\n/**\n * Shared state contract between the pieces of a Disclosure primitive.\n * Provided by `ForDisclosure`, consumed by `ForDisclosureTrigger` and\n * `ForDisclosureContent`.\n */\nexport interface ForDisclosureContext {\n readonly open: Signal<boolean>;\n readonly disabled: Signal<boolean>;\n readonly triggerId: Signal<string>;\n readonly contentId: Signal<string>;\n /** Adopts a consumer-set static `id` on the trigger host into `triggerId`. */\n adoptTriggerId(el: HTMLElement): void;\n /** Adopts a consumer-set static `id` on the content host into `contentId`. */\n adoptContentId(el: HTMLElement): void;\n toggle(): void;\n}\n\nexport const FOR_DISCLOSURE_CONTEXT = new InjectionToken<ForDisclosureContext>(\n 'FOR_DISCLOSURE_CONTEXT',\n);\n\n/**\n * Injects the disclosure context or throws a prefixed, actionable error\n * naming the piece that was used outside `[forDisclosure]`.\n */\nexport function injectDisclosureContext(piece: string): ForDisclosureContext {\n const ctx = inject(FOR_DISCLOSURE_CONTEXT, { optional: true });\n if (!ctx) {\n throw new Error(\n `[forty-cdk/disclosure] ${piece} must be used inside a [forDisclosure] element.`,\n );\n }\n return ctx;\n}\n","import { booleanAttribute, Directive, inject, input, model, signal } from '@angular/core';\n\nimport { adoptHostId, IdGenerator } from 'forty-cdk/core';\nimport { FOR_DISCLOSURE_CONTEXT, type ForDisclosureContext } from './disclosure-context';\n\n/**\n * Root of the Disclosure primitive. Holds the open/disabled state and\n * the IDs that wire the trigger to its content.\n *\n * Implements the [WAI-ARIA Disclosure pattern](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/).\n *\n * Compose it on any wrapper element with `[forDisclosureTrigger]` and\n * `[forDisclosureContent]` as descendants.\n *\n * @example\n * ```html\n * <div forDisclosure [(open)]=\"isOpen\">\n * <button type=\"button\" forDisclosureTrigger>Toggle</button>\n * <div forDisclosureContent>...</div>\n * </div>\n * ```\n */\n@Directive({\n selector: '[forDisclosure]',\n exportAs: 'forDisclosure',\n host: {\n '[attr.data-state]': 'open() ? \"open\" : \"closed\"',\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\n },\n providers: [{ provide: FOR_DISCLOSURE_CONTEXT, useExisting: ForDisclosure }],\n})\nexport class ForDisclosure implements ForDisclosureContext {\n readonly #idGen = inject(IdGenerator);\n\n /**\n * Two-way bindable open state. Use `[(open)]` for both read & write, or\n * `(openChange)` alone to observe transitions when the directive itself\n * toggles state (trigger click). The `model()` change emitter does NOT fire\n * for consumer-driven writes via `[(open)]`, so subscribing to\n * `(openChange)` is safe and only sees internal transitions.\n */\n readonly open = model<boolean>(false);\n\n /** When true, click on the trigger is ignored and `data-disabled` is reflected. */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n readonly #triggerId = signal(this.#idGen.next('for-disclosure-trigger'));\n readonly #contentId = signal(this.#idGen.next('for-disclosure-content'));\n\n readonly triggerId = this.#triggerId.asReadonly();\n readonly contentId = this.#contentId.asReadonly();\n\n /**\n * Adopts a consumer-set static `id` on the `[forDisclosureTrigger]` host into\n * `triggerId` (preserving anchors / external `aria-labelledby` references /\n * label `for`) instead of letting the `[id]` host binding clobber it.\n */\n adoptTriggerId(el: HTMLElement): void {\n adoptHostId(el, this.#triggerId);\n }\n\n /** Adopts a consumer-set static `id` on the content host into `contentId`. */\n adoptContentId(el: HTMLElement): void {\n adoptHostId(el, this.#contentId);\n }\n\n toggle(): void {\n if (this.disabled()) {\n return;\n }\n this.open.set(!this.open());\n }\n}\n","import { booleanAttribute, computed, Directive, ElementRef, inject, input } from '@angular/core';\n\nimport { reflectDisabled } from 'forty-cdk/core';\nimport { injectDisclosureContext } from './disclosure-context';\n\n/**\n * Trigger button for a `ForDisclosure`. Apply on a `<button>` so Enter/Space\n * toggling come from native button behavior. The directive host-binds\n * `type=\"button\"` so a trigger inside a `<form>` never submits it on toggle.\n *\n * `aria-controls` is emitted only while open — mirroring the overlay triggers'\n * open-only gating — so the reference never dangles at an unmounted panel\n * under the recommended `@if (open())` mount pattern.\n *\n * Disabling: the trigger merges its own `disabled` input OR the root's\n * `disabled` into `effectiveDisabled`, which drives the native `disabled`\n * attribute, `aria-disabled`, `data-disabled`, and the click guard.\n */\n@Directive({\n selector: '[forDisclosureTrigger]',\n exportAs: 'forDisclosureTrigger',\n host: {\n type: 'button',\n '[id]': 'ctx.triggerId()',\n '[attr.aria-expanded]': 'ctx.open() ? \"true\" : \"false\"',\n '[attr.aria-controls]': 'ctx.open() ? ctx.contentId() : null',\n '[attr.aria-disabled]': 'effectiveDisabled() ? \"true\" : null',\n '[attr.data-state]': 'ctx.open() ? \"open\" : \"closed\"',\n '[attr.data-disabled]': 'effectiveDisabled() ? \"\" : null',\n '(click)': 'onClick()',\n },\n})\nexport class ForDisclosureTrigger {\n protected readonly ctx = injectDisclosureContext('ForDisclosureTrigger');\n\n /** Disables this trigger only, in addition to the root's `disabled`. */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n /** Whether the trigger is disabled — its own `disabled` input OR the root's. */\n readonly effectiveDisabled = computed(() => this.disabled() || this.ctx.disabled());\n\n constructor() {\n this.ctx.adoptTriggerId(inject<ElementRef<HTMLElement>>(ElementRef).nativeElement);\n reflectDisabled(this.effectiveDisabled);\n }\n\n protected onClick(): void {\n if (this.effectiveDisabled()) {\n return;\n }\n this.ctx.toggle();\n }\n}\n","import { Directive, ElementRef, inject } from '@angular/core';\n\nimport { injectDisclosureContext } from './disclosure-context';\n\n/**\n * Disclosed content panel for a `ForDisclosure`. The directive does not\n * manage DOM presence — wrap with `@if (open())` so the panel mounts and\n * unmounts with the disclosure state, and use `animate.enter` /\n * `animate.leave` for transitions if desired. If the consumer prefers to\n * keep the panel mounted (for CSS-only transitions or to preserve internal\n * state), the directive reflects `aria-hidden=\"true\"` and `inert` while\n * closed so the panel is removed from the accessibility tree and focus\n * order automatically.\n */\n@Directive({\n selector: '[forDisclosureContent]',\n exportAs: 'forDisclosureContent',\n host: {\n '[id]': 'ctx.contentId()',\n '[attr.aria-hidden]': 'ctx.open() ? null : \"true\"',\n '[attr.inert]': 'ctx.open() ? null : \"\"',\n '[attr.data-state]': 'ctx.open() ? \"open\" : \"closed\"',\n '[attr.data-disabled]': 'ctx.disabled() ? \"\" : null',\n },\n})\nexport class ForDisclosureContent {\n protected readonly ctx = injectDisclosureContext('ForDisclosureContent');\n\n constructor() {\n this.ctx.adoptContentId(inject<ElementRef<HTMLElement>>(ElementRef).nativeElement);\n }\n}\n","import { type Provider } from '@angular/core';\n\nimport { createDefaults } from 'forty-cdk/core';\n\n/**\n * Defaults inherited by descendant disclosures in the surrounding injector\n * scope. Configure with `provideForDisclosureDefaults`. The shape is a stub\n * today — present so future per-scope tuning can land without churning the\n * public surface.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface ForDisclosureDefaults {}\n\nconst FALLBACK: ForDisclosureDefaults = {};\n\nconst { token, provideDefaults } = createDefaults<ForDisclosureDefaults>(\n 'FOR_DISCLOSURE_DEFAULTS',\n FALLBACK,\n);\n\n/** Token holding the resolved disclosure defaults for the current scope. */\nexport const FOR_DISCLOSURE_DEFAULTS = token;\n\n/**\n * Configures forty-cdk disclosure defaults for this injector scope. Partial\n * overrides inherit unspecified keys from the parent scope (or library\n * defaults at the root).\n */\nexport function provideForDisclosureDefaults(\n defaults: Partial<ForDisclosureDefaults> = {},\n): Provider[] {\n return provideDefaults(defaults);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAmBa,sBAAsB,GAAG,IAAI,cAAc,CACtD,wBAAwB;AAG1B;;;AAGG;AACG,SAAU,uBAAuB,CAAC,KAAa,EAAA;AACnD,IAAA,MAAM,GAAG,GAAG,MAAM,CAAC,sBAAsB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC9D,IAAI,CAAC,GAAG,EAAE;AACR,QAAA,MAAM,IAAI,KAAK,CACb,0BAA0B,KAAK,CAAA,+CAAA,CAAiD,CACjF;IACH;AACA,IAAA,OAAO,GAAG;AACZ;;AC9BA;;;;;;;;;;;;;;;;AAgBG;MAUU,aAAa,CAAA;AACf,IAAA,MAAM,GAAG,MA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