{"version":3,"file":"forty-cdk-button.mjs","sources":["../../../projects/forty-cdk/button/src/modality.ts","../../../projects/forty-cdk/button/src/focus-visible.ts","../../../projects/forty-cdk/button/src/hovered.ts","../../../projects/forty-cdk/button/src/pressed.ts","../../../projects/forty-cdk/button/src/button.ts","../../../projects/forty-cdk/button/src/forty-cdk-button.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport {\n  DOCUMENT,\n  DestroyRef,\n  Injectable,\n  PLATFORM_ID,\n  inject,\n  signal,\n  type Signal,\n} from '@angular/core';\n\n/**\n * Application-scoped tracker for the last input modality the user employed —\n * the in-house implementation of input-modality (pointer vs keyboard)\n * detection. Created once per Angular bootstrap (one per SSR\n * request), tied to the root injector lifetime.\n *\n * It installs exactly **one** capture-phase `keydown` and **one** capture-phase\n * `pointerdown` listener on `document`, regardless of how many primitives read\n * its state — every `injectFocusVisible()` consumer shares this single\n * singleton, so the document is never listened to more than once. Capture phase\n * is used so the modality is settled before any overlay content can stop\n * propagation.\n *\n * Why a service rather than module-level state:\n *\n * - SSR isolation: module-level globals leak between simultaneous server\n *   requests in the same Node process. A `providedIn: 'root'` service is\n *   instantiated per application injector.\n * - Bootstrap-safety: `TestBed.resetTestingModule()`, micro-frontend reloads,\n *   and anything else that destroys `ApplicationRef` must not leave stale\n *   `document` listeners behind. The listeners are registered in the\n *   constructor against a single `AbortController` and dropped by one\n *   `abort()` from `DestroyRef`.\n * - SSR safety: `document` is inaccessible on the server. The service is a\n *   no-op when `PLATFORM_ID` is not the browser; `keyboard` stays `false` and\n *   no listener is installed.\n *\n * Internal — not re-exported from `public-api.ts`.\n */\n@Injectable({ providedIn: 'root' })\nexport class InputModality {\n  readonly #document = inject(DOCUMENT);\n  readonly #isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n  readonly #keyboard = signal(false);\n\n  /**\n   * `true` when the most recent input modality was the keyboard, `false` after\n   * a pointer interaction (or before any interaction). Stays `false` on the\n   * server. A `keydown` carrying a `Meta` / `Control` / `Alt` modifier is\n   * treated as a shortcut rather than keyboard navigation and does **not** flip\n   * this to `true` (matching the platform `:focus-visible` heuristic); `Shift`\n   * alone still counts, since `Shift`+`Tab` is legitimate keyboard navigation.\n   */\n  readonly keyboard: Signal<boolean> = this.#keyboard.asReadonly();\n\n  readonly #onKeyDown = (event: KeyboardEvent): void => {\n    if (event.metaKey || event.ctrlKey || event.altKey) {\n      return;\n    }\n    this.#keyboard.set(true);\n  };\n  readonly #onPointerDown = (): void => {\n    this.#keyboard.set(false);\n  };\n\n  constructor() {\n    if (!this.#isBrowser) {\n      return;\n    }\n    const controller = new AbortController();\n    const options = { capture: true, signal: controller.signal };\n    this.#document.addEventListener('keydown', this.#onKeyDown, options);\n    this.#document.addEventListener('pointerdown', this.#onPointerDown, options);\n\n    inject(DestroyRef).onDestroy(() => controller.abort());\n  }\n}\n","import { inject, type Signal } from '@angular/core';\n\nimport { InputModality } from './modality';\n\n/**\n * Returns a `Signal<boolean>` that is `true` while the last global input\n * modality was the keyboard, and `false` after a pointer interaction (or\n * before any interaction). This is the modality half of `:focus-visible`\n * styling: a consumer that wants a focus ring only on keyboard focus combines\n * this with the element's own focused state (`:focus`, or a `focusin` /\n * `focusout` listener) — e.g. `host: { '[attr.data-focus-visible]':\n * \"focused() && focusVisible() ? '' : null\" }`.\n *\n * Backed by the application-scoped {@link InputModality} singleton, so every\n * consumer shares a single capture-phase `keydown` / `pointerdown` listener on\n * `document` no matter how many call this.\n *\n * SSR-safe: on the server the backing service installs no listener and the\n * signal stays `false`. Must be called from an injection context.\n *\n * Internal — not re-exported from `public-api.ts`.\n */\nexport function injectFocusVisible(): Signal<boolean> {\n  return inject(InputModality).keyboard;\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n  DestroyRef,\n  ElementRef,\n  PLATFORM_ID,\n  computed,\n  inject,\n  signal,\n  type Signal,\n} from '@angular/core';\nimport { isNonTouchPointer } from 'forty-cdk/core';\n\n/** Options for {@link injectHovered}. */\nexport interface HoveredOptions {\n  /**\n   * When this signal reports `true`, the returned signal is forced to `false`\n   * and no interaction can set it — a disabled control is never hovered.\n   */\n  disabled?: Signal<boolean>;\n}\n\n/**\n * Returns a `Signal<boolean>` reflecting whether a pointing device is currently\n * hovering the host element. State is set on `pointerenter` and cleared on\n * `pointerleave`.\n *\n * Touch is suppressed through the shared `isNonTouchPointer` predicate: a\n * `pointerenter` whose `pointerType` is `'touch'` does not set the hovered\n * state, so the emulated mouse-enter a tap produces on a touchscreen never\n * leaves the element stuck in a hovered state after the finger lifts. Only\n * `'mouse'` / `'pen'` pointers report hover — this is the pen-inclusive hover\n * vocabulary, not the menu family's mouse-only `isHoverCapablePointer`.\n *\n * Attaches `pointerenter` / `pointerleave` listeners to the host element. The\n * `disabled` option short-circuits the result reactively (a pure `computed`,\n * never an `effect`-written signal) and also stops hover from arming while\n * disabled.\n *\n * SSR-safe: on the server no listener is attached and the signal stays\n * `false`. Must be called from an injection context (injects `ElementRef`,\n * `PLATFORM_ID`, `DestroyRef`).\n *\n * Internal — not re-exported from `public-api.ts`.\n */\nexport function injectHovered(opts?: HoveredOptions): Signal<boolean> {\n  const disabled = opts?.disabled;\n  const isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n  if (!isBrowser) {\n    return signal(false).asReadonly();\n  }\n\n  const el = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n  const hovered = signal(false);\n\n  const onPointerEnter = (event: PointerEvent): void => {\n    if (!isNonTouchPointer(event)) {\n      return;\n    }\n    if (disabled?.()) {\n      return;\n    }\n    hovered.set(true);\n  };\n  const onPointerLeave = (): void => {\n    hovered.set(false);\n  };\n\n  const controller = new AbortController();\n  const options = { signal: controller.signal };\n\n  el.addEventListener('pointerenter', onPointerEnter, options);\n  el.addEventListener('pointerleave', onPointerLeave, options);\n\n  inject(DestroyRef).onDestroy(() => controller.abort());\n\n  return computed(() => (disabled?.() ? false : hovered()));\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n  DestroyRef,\n  ElementRef,\n  PLATFORM_ID,\n  computed,\n  inject,\n  signal,\n  type Signal,\n} from '@angular/core';\n\n/** Options for {@link injectPressed}. */\nexport interface PressedOptions {\n  /**\n   * When this signal reports `true`, the returned signal is forced to `false`\n   * and no interaction can set it — a disabled control is never pressed.\n   */\n  disabled?: Signal<boolean>;\n}\n\n/**\n * Returns a `Signal<boolean>` reflecting whether the host element is currently\n * being pressed — held down via the primary pointer button, or via the\n * <kbd>Enter</kbd> / <kbd>Space</kbd> key while focused. The state clears on\n * pointer release, the pointer leaving the element mid-press, key release, or\n * `blur` (covers focus leaving the element while a key is held).\n *\n * Attaches `pointerdown` / `pointerup` / `pointerleave` / `keydown` / `keyup` /\n * `blur` listeners to the host element. The `disabled` option short-circuits\n * the result reactively (a pure `computed`, never an `effect`-written signal)\n * and also stops a fresh press from arming while disabled.\n *\n * SSR-safe: on the server no listener is attached and the signal stays\n * `false`. Must be called from an injection context (injects `ElementRef`,\n * `PLATFORM_ID`, `DestroyRef`).\n *\n * Internal — not re-exported from `public-api.ts`.\n */\nexport function injectPressed(opts?: PressedOptions): Signal<boolean> {\n  const disabled = opts?.disabled;\n  const isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n  if (!isBrowser) {\n    return signal(false).asReadonly();\n  }\n\n  const el = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n  const pressed = signal(false);\n\n  const onPointerDown = (event: PointerEvent): void => {\n    if (event.pointerType === 'mouse' && event.button !== 0) {\n      return;\n    }\n    if (disabled?.()) {\n      return;\n    }\n    pressed.set(true);\n  };\n  const onPointerEnd = (): void => {\n    pressed.set(false);\n  };\n  const onKeyDown = (event: KeyboardEvent): void => {\n    if (event.key !== 'Enter' && event.key !== ' ') {\n      return;\n    }\n    if (disabled?.()) {\n      return;\n    }\n    pressed.set(true);\n  };\n  const onKeyUp = (event: KeyboardEvent): void => {\n    if (event.key !== 'Enter' && event.key !== ' ') {\n      return;\n    }\n    pressed.set(false);\n  };\n  const onBlur = (): void => {\n    pressed.set(false);\n  };\n\n  const controller = new AbortController();\n  const options = { signal: controller.signal };\n\n  el.addEventListener('pointerdown', onPointerDown, options);\n  el.addEventListener('pointerup', onPointerEnd, options);\n  el.addEventListener('pointerleave', onPointerEnd, options);\n  el.addEventListener('keydown', onKeyDown, options);\n  el.addEventListener('keyup', onKeyUp, options);\n  el.addEventListener('blur', onBlur, options);\n\n  inject(DestroyRef).onDestroy(() => controller.abort());\n\n  return computed(() => (disabled?.() ? false : pressed()));\n}\n","import {\n  Directive,\n  ElementRef,\n  booleanAttribute,\n  computed,\n  inject,\n  input,\n  output,\n  signal,\n} from '@angular/core';\nimport { FOR_FIELDSET_CONTEXT, injectSyntheticActivation } from 'forty-cdk/core';\n\nimport { injectFocusVisible } from './focus-visible';\nimport { injectHovered } from './hovered';\nimport { injectPressed } from './pressed';\n\n/**\n * Headless implementation of the [WAI-ARIA Button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/button/).\n *\n * Works on a native `<button>` host and on any arbitrary host element (e.g. `<div>`, `<span>`).\n * On a native button the platform handles Enter/Space → click synthesis and no `role` or\n * `tabindex` is emitted (the platform owns those). On a non-button host, `role=\"button\"` and\n * `tabindex=\"0\"` are applied, and the directive synthesizes a click through its single `onClick`\n * path: Enter activates on `keydown`, while Space activates on `keyup` (its `keydown` always\n * calls `preventDefault()` to stop the page scrolling, even when disabled) — matching native\n * button and APG behavior.\n *\n * Disabled stays focusable: per the APG a disabled button must remain reachable by assistive\n * technology, so the native `disabled` attribute is never set. Instead `aria-disabled=\"true\"` and\n * `data-disabled=\"\"` are reflected and the activation handler becomes a no-op. `disabled` composes\n * with a surrounding `[forFieldset]`: a disabled group disables the button too (`aria-disabled` +\n * `data-disabled`, activation suppressed), which is what makes a non-native host (`<div forButton>`)\n * behave like a native button inside a native `<fieldset disabled>`.\n *\n * Interaction state is reflected as `data-pressed`, `data-hovered`, and `data-focus-visible`\n * (present/absent boolean attributes). There is no `data-state` — this primitive has no\n * open/closed or checked/unchecked logical state.\n *\n * @example\n * ```html\n * <!-- Native button — platform handles Enter/Space -->\n * <button forButton (activate)=\"doSomething()\">Click me</button>\n *\n * <!-- Non-button host — role, tabindex, and keyboard handling added automatically -->\n * <div forButton (activate)=\"doSomething()\">Click me</div>\n *\n * <!-- Disabled: stays focusable, activation is a no-op -->\n * <button forButton [disabled]=\"true\" (activate)=\"doSomething()\">Disabled</button>\n * ```\n */\n@Directive({\n  selector: '[forButton]',\n  exportAs: 'forButton',\n  host: {\n    '[attr.type]': 'resolvedType()',\n    '[attr.role]': 'resolvedRole()',\n    '[attr.tabindex]': 'resolvedTabindex()',\n    '[attr.aria-disabled]': \"effectiveDisabled() ? 'true' : null\",\n    '[attr.data-disabled]': \"effectiveDisabled() ? '' : null\",\n    '[attr.data-pressed]': \"pressed() ? '' : null\",\n    '[attr.data-hovered]': \"hovered() ? '' : null\",\n    '[attr.data-focus-visible]': \"focusVisible() ? '' : null\",\n    '(click)': 'onClick($event)',\n    '(keydown)': 'onKeydown($event)',\n    '(keyup)': 'onKeyup($event)',\n    '(focusin)': 'onFocusIn()',\n    '(focusout)': 'onFocusOut()',\n  },\n})\nexport class ForButton {\n  readonly #initialType =\n    inject<ElementRef<HTMLElement>>(ElementRef).nativeElement.getAttribute('type');\n  readonly #fieldset = inject(FOR_FIELDSET_CONTEXT, { optional: true });\n\n  /**\n   * When `true`, activation (click, Enter, Space) is suppressed and the element\n   * reflects `aria-disabled=\"true\"` + `data-disabled=\"\"`. The element remains\n   * focusable so assistive technology can announce it. Read\n   * {@link effectiveDisabled} for the value that actually gates behavior — it\n   * also folds in a surrounding disabled `[forFieldset]`.\n   */\n  readonly disabled = input(false, { transform: booleanAttribute });\n\n  /**\n   * The button's own {@link disabled} OR'd with a surrounding disabled\n   * `[forFieldset]`. This is what gates activation and drives `aria-disabled` /\n   * `data-disabled`: a native `<fieldset disabled>` never reaches a non-native\n   * host (`<div forButton>`), so the group's disabled state has to compose in\n   * here. Mirrors `FormUiControlBase.effectiveDisabled`, so a `[forButton]` and\n   * a `[forSwitch]` inside the same disabled group behave identically.\n   */\n  readonly effectiveDisabled = computed(\n    () => this.disabled() || (this.#fieldset?.disabled() ?? false),\n  );\n\n  /**\n   * Emitted once per user activation: a pointer click on any host, or Enter / Space\n   * on a non-native-button host (native buttons synthesize click from keyboard).\n   */\n  readonly activate = output<void>();\n\n  readonly #focused = signal(false);\n  readonly #activation = injectSyntheticActivation({ disabled: this.effectiveDisabled });\n  readonly #keyboardModality = injectFocusVisible();\n  protected readonly hovered = injectHovered({ disabled: this.effectiveDisabled });\n  protected readonly pressed = injectPressed({ disabled: this.effectiveDisabled });\n  protected readonly focusVisible = computed(() => this.#focused() && this.#keyboardModality());\n\n  protected readonly resolvedType = computed(\n    () => this.#initialType ?? (this.#activation.nativeButton ? 'button' : null),\n  );\n  protected readonly resolvedRole = computed(() =>\n    this.#activation.nativeButton ? null : 'button',\n  );\n  protected readonly resolvedTabindex = this.#activation.tabindex;\n\n  protected onClick(event: MouseEvent): void {\n    if (this.effectiveDisabled()) {\n      event.preventDefault();\n      event.stopImmediatePropagation();\n      return;\n    }\n    this.activate.emit();\n  }\n\n  protected onKeydown(event: KeyboardEvent): void {\n    this.#activation.keydown(event);\n  }\n\n  protected onKeyup(event: KeyboardEvent): void {\n    this.#activation.keyup(event);\n  }\n\n  protected onFocusIn(): void {\n    this.#focused.set(true);\n  }\n\n  protected onFocusOut(): void {\n    this.#focused.set(false);\n    this.#activation.reset();\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAWA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;MAEU,aAAa,CAAA;AACf,IAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;IAC5B,UAAU,GAAG,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAEnD,SAAS,GAAG,MAAM,CAAC,KAAK;kFAAC;AAElC;;;;;;;AAOG;AACM,IAAA,Q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