{"version":3,"file":"ng-primitives-radio.mjs","sources":["../../../../packages/ng-primitives/radio/src/radio-group/radio-group-state.ts","../../../../packages/ng-primitives/radio/src/radio-group/radio-group.ts","../../../../packages/ng-primitives/radio/src/radio-item/radio-item-state.ts","../../../../packages/ng-primitives/radio/src/radio-indicator/radio-indicator.ts","../../../../packages/ng-primitives/radio/src/radio-item/radio-item.ts","../../../../packages/ng-primitives/radio/src/ng-primitives-radio.ts"],"sourcesContent":["import { Signal, signal, WritableSignal } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { ngpFormControl } from 'ng-primitives/form-field';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { ngpRovingFocusGroup } from 'ng-primitives/roving-focus';\nimport {\n  attrBinding,\n  controlled,\n  controlledState,\n  createPrimitive,\n  dataBinding,\n  deprecatedSetter,\n  SetterOptions,\n  StateInjectionOptions,\n} from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Observable } from 'rxjs';\n\n/**\n * Public state surface for the RadioGroup primitive.\n */\nexport interface NgpRadioGroupState<T> {\n  /**\n   * The id of the radio group.\n   */\n  readonly id: Signal<string>;\n  /**\n   * The selected value of the radio group.\n   */\n  readonly value: WritableSignal<T | null>;\n  /**\n   * Whether the radio group is disabled.\n   */\n  readonly disabled: WritableSignal<boolean>;\n  /**\n   * The orientation of the radio group.\n   */\n  readonly orientation: WritableSignal<NgpOrientation>;\n  /**\n   * The comparator function used to compare values.\n   */\n  readonly compareWith: Signal<(a: T | null, b: T | null) => boolean>;\n  /**\n   * Emits when the selected value changes.\n   */\n  readonly valueChange: Observable<T | null>;\n  /**\n   * Select a value in the radio group.\n   */\n  select(value: T): void;\n  /**\n   * Set the value of the radio group. Fires `onValueChange` and emits on the\n   * `valueChange` observable by default. Pass `{ emit: false }` for cases like\n   * form `writeValue` where the internal state should sync without notifying.\n   */\n  setValue(value: T | null, options?: SetterOptions): void;\n  /**\n   * Set the default value used for uncontrolled usage.\n   */\n  setDefaultValue(value: T | null): void;\n  /**\n   * Set the disabled value.\n   */\n  setDisabled(value: boolean): void;\n  /**\n   * Set the orientation of the radio group.\n   */\n  setOrientation(value: NgpOrientation): void;\n}\n\n/**\n * Inputs for configuring the RadioGroup primitive.\n */\nexport interface NgpRadioGroupProps<T> {\n  /**\n   * The id of the radio group.\n   */\n  readonly id?: Signal<string>;\n  /**\n   * The selected value of the radio group. Leave `undefined` for uncontrolled\n   * usage (the group manages its own value from `defaultValue`).\n   */\n  readonly value?: Signal<T | null | undefined>;\n  /**\n   * The default value for uncontrolled usage.\n   */\n  readonly defaultValue?: Signal<T | null>;\n  /**\n   * Whether the radio group is disabled.\n   */\n  readonly disabled?: Signal<boolean>;\n  /**\n   * The orientation of the radio group.\n   */\n  readonly orientation?: Signal<NgpOrientation>;\n  /**\n   * The comparator function used to compare values.\n   */\n  readonly compareWith?: Signal<(a: T | null, b: T | null) => boolean>;\n  /**\n   * Callback fired when the selected value changes.\n   */\n  readonly onValueChange?: (value: T | null) => void;\n}\n\nexport const [\n  NgpRadioGroupStateToken,\n  ngpRadioGroup,\n  _injectRadioGroupState,\n  provideRadioGroupState,\n] = createPrimitive(\n  'NgpRadioGroup',\n  <T>({\n    id = signal(uniqueId('ngp-radio-group')),\n    value: _value = signal<T | null | undefined>(undefined),\n    defaultValue: _defaultValue,\n    disabled: _disabled = signal(false),\n    orientation: _orientation = signal<NgpOrientation>('horizontal'),\n    compareWith = signal<(a: T | null, b: T | null) => boolean>((a, b) => a === b),\n    onValueChange,\n  }: NgpRadioGroupProps<T>): NgpRadioGroupState<T> => {\n    const element = injectElementRef();\n    const disabled = controlled(_disabled, false);\n    const orientation = controlled(_orientation, 'horizontal');\n    const defaultValue = controlled(_defaultValue, null);\n    const [value, setValueInternal, valueChange] = controlledState<T | null>({\n      value: _value,\n      defaultValue,\n      onChange: onValueChange,\n    });\n\n    // Own the roving focus group so it shares the group's `disabled` and\n    // `orientation` signals directly. This keeps keyboard navigation in sync\n    // with programmatic/form-driven changes (e.g. `setDisabled`, `setOrientation`)\n    // without needing to re-push each value across a directive boundary.\n    // `wrap` is always on to match the ARIA radio pattern (arrow keys cycle).\n    ngpRovingFocusGroup({ orientation, disabled, wrap: signal(true) });\n\n    ngpFormControl({ id, disabled });\n\n    // Host bindings\n    attrBinding(element, 'role', 'radiogroup');\n    attrBinding(element, 'id', id);\n    attrBinding(element, 'aria-orientation', orientation);\n    dataBinding(element, 'data-orientation', orientation);\n    dataBinding(element, 'data-disabled', disabled);\n\n    function setValue(newValue: T | null, options?: SetterOptions): void {\n      setValueInternal(newValue, options);\n    }\n\n    function select(newValue: T): void {\n      // Guard on disabled and dedupe by the comparator so that re-selecting an\n      // equal value (by `compareWith`, not just reference) is a no-op.\n      if (disabled() || compareWith()(value(), newValue)) {\n        return;\n      }\n\n      setValue(newValue);\n    }\n\n    function setDisabled(isDisabled: boolean): void {\n      disabled.set(isDisabled);\n    }\n\n    function setOrientation(newOrientation: NgpOrientation): void {\n      // The roving focus group shares this signal, so it stays in sync.\n      orientation.set(newOrientation);\n    }\n\n    return {\n      id,\n      value: deprecatedSetter(value, 'setValue', newValue => setValue(newValue)),\n      disabled: deprecatedSetter(disabled, 'setDisabled', setDisabled),\n      orientation: deprecatedSetter(orientation, 'setOrientation', setOrientation),\n      compareWith,\n      valueChange,\n      select,\n      setValue,\n      setDefaultValue: defaultValue.set,\n      setDisabled,\n      setOrientation,\n    } satisfies NgpRadioGroupState<T>;\n  },\n);\n\n/**\n * Injects the RadioGroup state.\n */\nexport function injectRadioGroupState<T>(\n  options?: StateInjectionOptions,\n): Signal<NgpRadioGroupState<T>> {\n  return _injectRadioGroupState(options) as Signal<NgpRadioGroupState<T>>;\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, output } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { provideRovingFocusGroupState } from 'ng-primitives/roving-focus';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpRadioGroup, provideRadioGroupState } from './radio-group-state';\n\n/**\n * Apply the `ngpRadioGroup` directive to an element that represents the group of radio items.\n */\n@Directive({\n  selector: '[ngpRadioGroup]',\n  providers: [provideRadioGroupState(), provideRovingFocusGroupState()],\n})\nexport class NgpRadioGroup<T> {\n  /**\n   * The id of the radio group. If not provided, a unique id will be generated.\n   */\n  readonly id = input<string>(uniqueId('ngp-radio-group'));\n\n  /**\n   * The value of the radio group. Leave unset for uncontrolled usage.\n   */\n  readonly value = input<T | null | undefined>(undefined, { alias: 'ngpRadioGroupValue' });\n\n  /**\n   * The default value of the radio group for uncontrolled usage.\n   */\n  readonly defaultValue = input<T | null>(null, { alias: 'ngpRadioGroupDefaultValue' });\n\n  /**\n   * Event emitted when the radio group value changes.\n   */\n  readonly valueChange = output<T | null>({\n    alias: 'ngpRadioGroupValueChange',\n  });\n\n  /**\n   * Whether the radio group is disabled.\n   */\n  readonly disabled = input<boolean, BooleanInput>(false, {\n    alias: 'ngpRadioGroupDisabled',\n    transform: booleanAttribute,\n  });\n\n  /**\n   * The orientation of the radio group.\n   * @default 'horizontal'\n   */\n  readonly orientation = input<NgpOrientation>('horizontal', {\n    alias: 'ngpRadioGroupOrientation',\n  });\n\n  /**\n   * The comparator function for the radio group. This is useful if values are objects and you want to compare them by value, not by reference.\n   * @default (a, b) => a === b\n   */\n  readonly compareWith = input<(a: T | null, b: T | null) => boolean>((a, b) => a === b, {\n    alias: 'ngpRadioGroupCompareWith',\n  });\n\n  /**\n   * The state of the radio group.\n   */\n  protected readonly state = ngpRadioGroup({\n    id: this.id,\n    value: this.value,\n    defaultValue: this.defaultValue,\n    disabled: this.disabled,\n    orientation: this.orientation,\n    compareWith: this.compareWith,\n    onValueChange: value => this.valueChange.emit(value),\n  });\n\n  /**\n   * Select a radio item.\n   * @param value The value of the radio item to select.\n   */\n  select(value: T): void {\n    this.state.select(value);\n  }\n\n  /**\n   * Set the default value of the radio group.\n   */\n  setDefaultValue(value: T | null): void {\n    this.state.setDefaultValue(value);\n  }\n\n  /**\n   * Set the orientation of the radio group.\n   */\n  setOrientation(orientation: NgpOrientation): void {\n    this.state.setOrientation(orientation);\n  }\n}\n","import { computed, Signal, signal } from '@angular/core';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n  attrBinding,\n  createPrimitive,\n  dataBinding,\n  listener,\n  StateInjectionOptions,\n} from 'ng-primitives/state';\nimport { injectRadioGroupState } from '../radio-group/radio-group-state';\n\n/**\n * Public state surface for the RadioItem primitive.\n */\nexport interface NgpRadioItemState<T> {\n  /**\n   * The value of the radio item.\n   */\n  readonly value: Signal<T>;\n  /**\n   * Whether the radio item is disabled, either in its own right or because the\n   * group it belongs to is disabled.\n   */\n  readonly disabled: Signal<boolean>;\n  /**\n   * Whether the radio item is checked.\n   */\n  readonly checked: Signal<boolean>;\n}\n\n/**\n * Inputs for configuring the RadioItem primitive.\n */\nexport interface NgpRadioItemProps<T> {\n  /**\n   * The value of the radio item.\n   */\n  readonly value: Signal<T>;\n  /**\n   * Whether the radio item is disabled.\n   */\n  readonly disabled?: Signal<boolean>;\n}\n\nexport const [NgpRadioItemStateToken, ngpRadioItem, _injectRadioItemState, provideRadioItemState] =\n  createPrimitive(\n    'NgpRadioItem',\n    <T>({\n      value,\n      disabled: _disabled = signal(false),\n    }: NgpRadioItemProps<T>): NgpRadioItemState<T> => {\n      const element = injectElementRef();\n      const radioGroup = injectRadioGroupState<T>();\n\n      const checked = computed(() => radioGroup().compareWith()(radioGroup().value(), value()));\n\n      // A disabled group disables everything in it, so the item reflects both.\n      const disabled = computed(() => _disabled() || radioGroup().disabled());\n\n      // Setup interactions\n      ngpInteractions({ hover: true, press: true, focusVisible: true, disabled });\n\n      // Host bindings\n      attrBinding(element, 'role', 'radio');\n      attrBinding(element, 'aria-checked', () => (checked() ? 'true' : 'false'));\n      attrBinding(element, 'aria-disabled', disabled);\n      dataBinding(element, 'data-disabled', disabled);\n      dataBinding(element, 'data-checked', checked);\n\n      function select(): void {\n        if (disabled()) {\n          return;\n        }\n\n        radioGroup().select(value());\n      }\n\n      // Event listeners\n      listener(element, 'focus', select);\n      listener(element, 'click', select);\n\n      return { value, disabled, checked } satisfies NgpRadioItemState<T>;\n    },\n  );\n\n/**\n * Injects the RadioItem state.\n */\nexport function injectRadioItemState<T>(\n  options?: StateInjectionOptions,\n): Signal<NgpRadioItemState<T>> {\n  return _injectRadioItemState(options) as Signal<NgpRadioItemState<T>>;\n}\n","import { Directive, computed } from '@angular/core';\nimport { injectRadioItemState } from '../radio-item/radio-item-state';\n\n/**\n * Apply the `ngpRadioIndicator` directive to an element that represents the radio indicator (i.e. the dot).\n */\n@Directive({\n  selector: '[ngpRadioIndicator]',\n  host: {\n    '[attr.data-checked]': 'checked() ? \"\" : null',\n    '[attr.data-disabled]': 'radioItemState().disabled() ? \"\" : null',\n  },\n})\nexport class NgpRadioIndicator<T> {\n  /**\n   * Access the radio group item state\n   */\n  protected readonly radioItemState = injectRadioItemState<T>();\n\n  /**\n   * Determine if the radio indicator is checked. Delegates to the item's\n   * checked state so it honours the group's `compareWith` comparator.\n   */\n  protected readonly checked = computed(() => this.radioItemState().checked());\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n  booleanAttribute,\n  Directive,\n  effect,\n  input,\n  OnInit,\n  Signal,\n  untracked,\n} from '@angular/core';\nimport {\n  injectRovingFocusGroupState,\n  ngpRovingFocusItem,\n  provideRovingFocusItemState,\n} from 'ng-primitives/roving-focus';\nimport { ngpRadioItem, provideRadioItemState } from './radio-item-state';\n\n/**\n * Apply the `ngpRadioItem` directive to an element that represents a radio item. This would typically be a `button` element.\n */\n@Directive({\n  selector: '[ngpRadioItem]',\n  providers: [provideRadioItemState(), provideRovingFocusItemState()],\n})\nexport class NgpRadioItem<T> implements OnInit {\n  /**\n   * The value of the radio item.\n   * @required\n   */\n  readonly value = input<T>(undefined, { alias: 'ngpRadioItemValue' });\n\n  /**\n   * Whether the radio item is disabled.\n   * @default false\n   */\n  readonly disabled = input<boolean, BooleanInput>(false, {\n    alias: 'ngpRadioItemDisabled',\n    transform: booleanAttribute,\n  });\n\n  constructor() {\n    const state = ngpRadioItem({\n      value: this.value as Signal<T>,\n      disabled: this.disabled,\n    });\n    const rovingItem = ngpRovingFocusItem({ disabled: this.disabled });\n    const group = injectRovingFocusGroupState();\n\n    // the checked radio holds the roving tab stop so Tab enters the group on it rather than\n    // on the first item - which, because a radio group selects on focus, would otherwise\n    // change the value. setTabStop claims it without stealing focus; roving focus takes over\n    // on keyboard nav.\n    effect(() => {\n      const groupState = group();\n\n      if (!groupState || !state.checked() || this.disabled()) {\n        return;\n      }\n\n      untracked(() => groupState.setTabStop(rovingItem.id()));\n    });\n  }\n\n  ngOnInit(): void {\n    if (this.value() === undefined) {\n      throw new Error('The `ngpRadioItem` directive requires a `value` input.');\n    }\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAyGO,MAAM,CACX,uBAAuB,EACvB,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EACvB,GAAG,eAAe,CACjB,eAAe,EACf,CAAI,EACF,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,EACxC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAuB,SAAS,CAAC,EACvD,YAAY,EAAE,aAAa,EAC3B,QAAQ,EAAE,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,EACnC,WAAW,EAAE,YAAY,GAAG,MAAM,CAAiB,YAAY,CAAC,EAChE,WAAW,GAAG,MAAM,CAAwC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAC9E,aAAa,GACS,KAA2B;AACjD,IAAA,MAAM,OAAO,GAAG,gBAAgB,EAAE;IAClC,MAAM,QAAQ,GAAG,UAAU,CAAC,SAAS,EAAE,KAAK,CAAC;IAC7C,MAAM,WAAW,GAAG,UAAU,CAAC,YA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