{"version":3,"file":"ng-primitives-button.mjs","sources":["../../../../packages/ng-primitives/button/src/button/button-announcer.ts","../../../../packages/ng-primitives/button/src/button/button-state.ts","../../../../packages/ng-primitives/button/src/button/button.ts","../../../../packages/ng-primitives/button/src/ng-primitives-button.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { DestroyRef, inject, Injectable, NgZone } from '@angular/core';\n\n/** How long an announcement stays in the live region before it is removed. */\nconst ANNOUNCEMENT_TIMEOUT = 7000;\n\n/** Gives a screen reader time to register a live region that was just created. */\nconst NEW_REGION_DELAY = 100;\n\n/**\n * Announces an element's accessible name through an assertive live region.\n *\n * The announcement is a node with `aria-labelledby` pointing at the element, or at what names\n * it when it is named by `aria-labelledby`, so the screen reader computes the name itself\n * instead of reading a string we derive from the DOM.\n * @internal\n */\n@Injectable({ providedIn: 'root' })\nexport class NgpButtonAnnouncer {\n  private readonly document = inject(DOCUMENT);\n  private readonly ngZone = inject(NgZone);\n  private region: HTMLElement | null = null;\n  /** Ids announced while a new region is still being registered, in call order. */\n  private queue: string[] | null = null;\n  private readonly timeouts = new Set<ReturnType<typeof setTimeout>>();\n\n  constructor() {\n    inject(DestroyRef).onDestroy(() => {\n      this.timeouts.forEach(clearTimeout);\n      this.region?.remove();\n      this.region = null;\n      this.queue = null;\n    });\n  }\n\n  /** Announce the accessible name of the element with the given id. */\n  announceName(id: string): void {\n    if (!this.region) {\n      this.createRegion();\n    }\n\n    if (this.queue) {\n      this.queue.push(id);\n    } else {\n      this.append(id);\n    }\n  }\n\n  private append(id: string): void {\n    // The element can leave the DOM before the append runs (e.g. a dialog closing as its\n    // request ends); a node labelled by a missing id would be read as an unnamed image.\n    const element = this.document.getElementById(id);\n    if (!this.region || !element) {\n      return;\n    }\n\n    const node = this.document.createElement('div');\n    // `aria-labelledby` is not allowed on a generic element, so give the node a role that takes a name.\n    node.setAttribute('role', 'img');\n    // Accessible name computation follows one `aria-labelledby` hop, not a second one. Without a\n    // label in the page, the element is named by its content instead.\n    const labelIds = (element.getAttribute('aria-labelledby') ?? '')\n      .split(/\\s+/)\n      .filter(labelId => this.document.getElementById(labelId));\n    node.setAttribute('aria-labelledby', labelIds.join(' ') || id);\n    this.region.appendChild(node);\n    this.schedule(() => node.remove(), ANNOUNCEMENT_TIMEOUT);\n  }\n\n  private createRegion(): void {\n    const region = this.document.createElement('div');\n    region.setAttribute('aria-live', 'assertive');\n    region.setAttribute('data-ngp-button-announcer', '');\n    Object.assign(region.style, {\n      position: 'fixed',\n      width: '1px',\n      height: '1px',\n      padding: '0',\n      margin: '-1px',\n      overflow: 'hidden',\n      clip: 'rect(0, 0, 0, 0)',\n      whiteSpace: 'nowrap',\n      border: '0',\n    });\n    this.document.body.appendChild(region);\n    this.region = region;\n\n    this.queue = [];\n    this.schedule(() => {\n      const queued = this.queue ?? [];\n      this.queue = null;\n      queued.forEach(id => this.append(id));\n    }, NEW_REGION_DELAY);\n  }\n\n  // The callbacks only touch the live region, so they need no change detection, and a zone app\n  // would otherwise stay unstable until the announcement is removed.\n  private schedule(callback: () => void, delay: number): void {\n    const timeout = this.ngZone.runOutsideAngular(() =>\n      setTimeout(() => {\n        this.timeouts.delete(timeout);\n        callback();\n      }, delay),\n    );\n    this.timeouts.add(timeout);\n  }\n}\n","import { computed, HOST_TAG_NAME, inject, signal, Signal } from '@angular/core';\nimport { ngpFocusVisible, ngpInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n  attrBinding,\n  controlled,\n  createPrimitive,\n  dataBinding,\n  listener,\n} from 'ng-primitives/state';\nimport { onChange, uniqueId } from 'ng-primitives/utils';\nimport { NgpButtonAnnouncer } from './button-announcer';\n\nexport interface NgpButtonState {\n  /** Disabled state. `'soft'` means aria-disabled but still focusable. */\n  readonly disabled: Signal<boolean | 'soft'>;\n\n  /** Whether the button is pending. A pending button stays focusable but ignores presses. */\n  readonly pending: Signal<boolean>;\n\n  /** Set the disabled state. `'soft'` keeps the button focusable. */\n  setDisabled(value: boolean | 'soft'): void;\n\n  /** Set the pending state. */\n  setPending(value: boolean): void;\n\n  /**\n   * Fully disable the button while `source` is true, on top of its own disabled state.\n   * @internal\n   */\n  registerDisabledSource(source: Signal<boolean>): void;\n\n  /**\n   * Stop following a source added with `registerDisabledSource`.\n   * @internal\n   */\n  unregisterDisabledSource(source: Signal<boolean>): void;\n}\n\nexport interface NgpButtonProps {\n  /** Disabled state. `'soft'` means aria-disabled but still focusable. */\n  readonly disabled?: Signal<boolean | 'soft'>;\n\n  /** Whether the button is pending. A pending button stays focusable but ignores presses. */\n  readonly pending?: Signal<boolean>;\n}\n\nexport const [NgpButtonStateToken, ngpButton, injectButtonState, provideButtonState] =\n  createPrimitive(\n    'NgpButton',\n    ({\n      disabled: _disabled = signal(false),\n      pending: _pending = signal(false),\n    }: NgpButtonProps): NgpButtonState => {\n      const element = injectElementRef();\n      const isButton = inject(HOST_TAG_NAME) === 'button';\n      const announcer = inject(NgpButtonAnnouncer);\n      const disabled = controlled(_disabled);\n      const pending = controlled(_pending);\n\n      // Another part on the same element (e.g. a search clear button) can disable\n      // the button without overriding the consumer's own disabled binding.\n      const disabledSources = signal<readonly Signal<boolean>[]>([]);\n      const disabledBySource = computed(() => disabledSources().some(source => source()));\n\n      const hardDisabled = computed(() => disabled() === true || disabledBySource());\n      const softDisabled = computed(() => disabled() === 'soft' && !hardDisabled());\n      const anyDisabled = computed(() => hardDisabled() || softDisabled());\n\n      ngpInteractions({\n        hover: true,\n        press: true,\n        disabled: computed(() => anyDisabled() || pending()),\n      });\n\n      // Soft-disabled and pending stay focusable, so only suppress focus-visible when fully disabled.\n      ngpFocusVisible({ disabled: hardDisabled });\n\n      dataBinding(element, 'data-disabled', () => (softDisabled() ? 'soft' : hardDisabled()));\n      dataBinding(element, 'data-pending', pending);\n\n      if (isButton) {\n        attrBinding(element, 'disabled', () => (hardDisabled() ? '' : null));\n        attrBinding(element, 'aria-disabled', () =>\n          softDisabled() || (pending() && !hardDisabled()) ? 'true' : null,\n        );\n      } else {\n        attrBinding(element, 'aria-disabled', () => (anyDisabled() || pending() ? 'true' : null));\n      }\n\n      // Capture runs before the consumer's `(click)` on the same element. Cancelling the click\n      // keeps a submit button from submitting its form, including on Enter in a form field,\n      // while it stays the form's default button. `auxclick` covers a middle click on a link.\n      function cancelWhilePending(event: Event): void {\n        if (pending()) {\n          event.preventDefault();\n          event.stopImmediatePropagation();\n        }\n      }\n      listener(element, 'click', cancelWhilePending, { config: { capture: true } });\n      listener(element, 'auxclick', cancelWhilePending, { config: { capture: true } });\n\n      onChange(pending, (_, previous) => {\n        if (previous === null || !element.nativeElement.matches(':focus')) {\n          return;\n        }\n        element.nativeElement.id ||= uniqueId('ngp-button');\n        announcer.announceName(element.nativeElement.id);\n      });\n\n      function setDisabled(value: boolean | 'soft'): void {\n        disabled.set(value);\n      }\n\n      function setPending(value: boolean): void {\n        pending.set(value);\n      }\n\n      function registerDisabledSource(source: Signal<boolean>): void {\n        disabledSources.update(sources => [...sources, source]);\n      }\n\n      function unregisterDisabledSource(source: Signal<boolean>): void {\n        disabledSources.update(sources => {\n          const index = sources.indexOf(source);\n          return index === -1 ? sources : [...sources.slice(0, index), ...sources.slice(index + 1)];\n        });\n      }\n\n      return {\n        disabled: disabled.asReadonly(),\n        pending: pending.asReadonly(),\n        setDisabled,\n        setPending,\n        registerDisabledSource,\n        unregisterDisabledSource,\n      } satisfies NgpButtonState;\n    },\n  );\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, Signal } from '@angular/core';\nimport { ngpButton, provideButtonState } from './button-state';\n\n@Directive({\n  selector: '[ngpButton]',\n  exportAs: 'ngpButton',\n  providers: [provideButtonState({ inherit: false })],\n})\nexport class NgpButton {\n  /**\n   * Whether the button is disabled. Use `'soft'` for an aria-disabled\n   * button that stays focusable; events still fire, so guard your handlers.\n   */\n  readonly disabled = input<boolean | 'soft', BooleanInput>(false, {\n    transform: v => (v === 'soft' ? 'soft' : booleanAttribute(v)),\n  });\n\n  /**\n   * Whether the button is pending, e.g. while the request it started runs. A pending\n   * button stays focusable, ignores clicks, does not submit its form, and announces\n   * its name when pending starts and ends if it has focus.\n   */\n  readonly pending = input<boolean, BooleanInput>(false, {\n    alias: 'ngpButtonPending',\n    transform: booleanAttribute,\n  });\n\n  /**\n   * The button state.\n   */\n  protected readonly state = ngpButton({ disabled: this.disabled, pending: this.pending });\n\n  /**\n   * Set the disabled state of the button.\n   * @param value The disabled state.\n   */\n  setDisabled(value: boolean | 'soft'): void {\n    this.state.setDisabled(value);\n  }\n\n  /**\n   * Set the pending state of the button.\n   * @param value The pending state.\n   */\n  setPending(value: boolean): void {\n    this.state.setPending(value);\n  }\n\n  /** @internal */\n  registerDisabledSource(source: Signal<boolean>): void {\n    this.state.registerDisabledSource(source);\n  }\n\n  /** @internal */\n  unregisterDisabledSource(source: Signal<boolean>): void {\n    this.state.unregisterDisabledSource(source);\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAGA;AACA,MAAM,oBAAoB,GAAG,IAAI;AAEjC;AACA,MAAM,gBAAgB,GAAG,GAAG;AAE5B;;;;;;;AAOG;MAEU,kBAAkB,CAAA;AAQ7B,IAAA,WAAA,GAAA;AAPiB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAChC,IAAA,CAAA,MAAM,GAAuB,IAAI;;QAEjC,IAAA,CAAA,KAAK,GAAoB,IAAI;AACpB,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,GAAG,EAAiC;AAGlE,QAAA,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,MAAK;AAChC,YAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC;AACnC,YAAA,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE;AACrB,YAAA,IAA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