{"version":3,"file":"checkbox.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/checkbox/checkbox-config.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/checkbox/checkbox.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/checkbox/checkbox.html","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/checkbox/checkbox.module.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n/** Default `sbb-checkbox` options that can be overridden. */\nexport interface SbbCheckboxDefaultOptions {\n  clickAction?: SbbCheckboxClickAction;\n}\n\n/** Injection token to be used to override the default options for `sbb-checkbox`. */\nexport const SBB_CHECKBOX_DEFAULT_OPTIONS = new InjectionToken<SbbCheckboxDefaultOptions>(\n  'sbb-checkbox-default-options',\n  {\n    providedIn: 'root',\n    factory: SBB_CHECKBOX_DEFAULT_OPTIONS_FACTORY,\n  },\n);\n\n/** @docs-private */\nexport function SBB_CHECKBOX_DEFAULT_OPTIONS_FACTORY(): SbbCheckboxDefaultOptions {\n  return {\n    clickAction: 'check-indeterminate',\n  };\n}\n\n/**\n * Checkbox click action when user click on input element.\n * noop: Do not toggle checked or indeterminate.\n * check: Only toggle checked status, ignore indeterminate.\n * check-indeterminate: Toggle checked status, set indeterminate to false. Default behavior.\n * undefined: Same as `check-indeterminate`.\n */\nexport type SbbCheckboxClickAction = 'noop' | 'check' | 'check-indeterminate' | undefined;\n","import { FocusableOption, FocusMonitor, FocusOrigin, _IdGenerator } from '@angular/cdk/a11y';\nimport { CdkObserveContent } from '@angular/cdk/observers';\nimport {\n  AfterViewInit,\n  booleanAttribute,\n  ChangeDetectionStrategy,\n  ChangeDetectorRef,\n  Component,\n  ElementRef,\n  EventEmitter,\n  forwardRef,\n  HostAttributeToken,\n  inject,\n  Input,\n  numberAttribute,\n  OnChanges,\n  OnDestroy,\n  Output,\n  SimpleChanges,\n  ViewChild,\n  ViewEncapsulation,\n} from '@angular/core';\nimport {\n  AbstractControl,\n  ControlValueAccessor,\n  NG_VALIDATORS,\n  NG_VALUE_ACCESSOR,\n  ValidationErrors,\n  Validator,\n} from '@angular/forms';\n\nimport {\n  SbbCheckboxDefaultOptions,\n  SBB_CHECKBOX_DEFAULT_OPTIONS,\n  SBB_CHECKBOX_DEFAULT_OPTIONS_FACTORY,\n} from './checkbox-config';\n\n// Default checkbox configuration.\nconst defaults = SBB_CHECKBOX_DEFAULT_OPTIONS_FACTORY();\n\n/** Change event object emitted by SbbCheckbox. */\nexport class SbbCheckboxChange {\n  /** The source SbbCheckbox of the event. */\n  source: SbbCheckbox;\n  /** The new `checked` value of the checkbox. */\n  checked: boolean;\n}\n\n/**\n * An SBB design checkbox component. Supports all the functionality of an HTML5 checkbox,\n * and exposes a similar API. A SbbCheckbox can be either checked, unchecked, indeterminate, or\n * disabled. Note that all additional accessibility attributes are taken care of by the component,\n * so there is no need to provide them yourself. However, if you want to omit a label and still\n * have the checkbox be accessible, you may supply an [aria-label] input.\n */\n@Component({\n  selector: 'sbb-checkbox',\n  templateUrl: './checkbox.html',\n  exportAs: 'sbbCheckbox',\n  host: {\n    class: 'sbb-checkbox sbb-selection-item',\n    '[id]': 'id',\n    '[attr.tabindex]': 'null',\n    '[attr.aria-label]': 'null',\n    '[attr.aria-labelledby]': 'null',\n    '[class.sbb-selection-indeterminate]': 'indeterminate',\n    '[class.sbb-selection-checked]': 'checked',\n    '[class.sbb-selection-disabled]': 'disabled',\n  },\n  providers: [\n    {\n      provide: NG_VALUE_ACCESSOR,\n      useExisting: forwardRef(() => SbbCheckbox),\n      multi: true,\n    },\n    {\n      provide: NG_VALIDATORS,\n      useExisting: SbbCheckbox,\n      multi: true,\n    },\n  ],\n  inputs: ['tabIndex'],\n  encapsulation: ViewEncapsulation.None,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  imports: [CdkObserveContent],\n})\n// tslint:disable-next-line: naming-convention class-name\nexport class SbbCheckbox\n  implements ControlValueAccessor, AfterViewInit, OnDestroy, OnChanges, Validator, FocusableOption\n{\n  private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n  protected _changeDetectorRef: ChangeDetectorRef = inject(ChangeDetectorRef);\n  private _focusMonitor = inject(FocusMonitor);\n  private _options = inject<SbbCheckboxDefaultOptions>(SBB_CHECKBOX_DEFAULT_OPTIONS, {\n    optional: true,\n  });\n\n  /**\n   * Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will\n   * take precedence so this may be omitted.\n   */\n  @Input('aria-label') ariaLabel: string = '';\n\n  /**\n   * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element\n   */\n  @Input('aria-labelledby') ariaLabelledby: string | null = null;\n\n  /** The 'aria-describedby' attribute is read after the element's label and field type. */\n  @Input('aria-describedby') ariaDescribedby: string;\n\n  /**\n   * Users can specify the `aria-expanded` attribute which will be forwarded to the input element\n   */\n  @Input({ alias: 'aria-expanded', transform: booleanAttribute }) ariaExpanded: boolean;\n\n  /**\n   * Users can specify the `aria-controls` attribute which will be forwarded to the input element\n   */\n  @Input('aria-controls') ariaControls: string;\n\n  /** Users can specify the `aria-owns` attribute which will be forwarded to the input element */\n  @Input('aria-owns') ariaOwns: string;\n\n  private _uniqueId = inject(_IdGenerator).getId('sbb-checkbox-');\n\n  /** A unique id for the checkbox input. If none is supplied, it will be auto-generated. */\n  @Input() id: string = this._uniqueId;\n\n  /** Returns the unique id for the visual hidden input. */\n  get inputId(): string {\n    return `${this.id || this._uniqueId}-input`;\n  }\n\n  /** Whether the checkbox is required. */\n  @Input({ transform: booleanAttribute }) required: boolean;\n\n  /** Whether the label should appear after or before the checkbox. Defaults to 'after' */\n  @Input() labelPosition: 'before' | 'after' = 'after';\n\n  /** Name value will be applied to the input element if present */\n  @Input() name: string | null = null;\n\n  /** Tabindex for the checkbox. */\n  @Input({ transform: (value: unknown) => (value == null ? undefined : numberAttribute(value)) })\n  tabIndex: number;\n\n  /** Event emitted when the checkbox's `checked` value changes. */\n  @Output()\n  readonly change: EventEmitter<SbbCheckboxChange> = new EventEmitter<SbbCheckboxChange>();\n\n  /** Event emitted when the checkbox's `indeterminate` value changes. */\n  @Output() readonly indeterminateChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n  /** The value attribute of the native input element */\n  @Input() value: string;\n\n  /** The native `<input type=\"checkbox\">` element */\n  @ViewChild('input') _inputElement: ElementRef<HTMLInputElement>;\n\n  /**\n   * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.\n   * @docs-private\n   */\n  _onTouched: () => any = () => {};\n\n  private _controlValueAccessorChangeFn: (value: any) => void = () => {};\n  private _validatorChangeFn = () => {};\n\n  constructor(...args: unknown[]);\n  constructor() {\n    const tabIndex = inject(new HostAttributeToken('tabindex'), { optional: true });\n    this._options = this._options || defaults;\n    this.tabIndex = tabIndex == null ? 0 : parseInt(tabIndex, 10) || 0;\n  }\n\n  ngOnChanges(changes: SimpleChanges) {\n    if (changes['required']) {\n      this._validatorChangeFn();\n    }\n  }\n\n  ngAfterViewInit() {\n    this._focusMonitor.monitor(this._elementRef, true).subscribe((focusOrigin) => {\n      if (!focusOrigin) {\n        // When a focused element becomes disabled, the browser *immediately* fires a blur event.\n        // Angular does not expect events to be raised during change detection, so any state change\n        // (such as a form control's 'ng-touched') will cause a changed-after-checked error.\n        // See https://github.com/angular/angular/issues/17793. To work around this, we defer\n        // telling the form control it has been touched until the next tick.\n        Promise.resolve().then(() => {\n          this._onTouched();\n          this._changeDetectorRef.markForCheck();\n        });\n      }\n    });\n\n    this._syncIndeterminate(this._indeterminate);\n  }\n\n  ngOnDestroy() {\n    this._focusMonitor.stopMonitoring(this._elementRef);\n  }\n\n  /**\n   * Whether the checkbox is checked.\n   */\n  @Input({ transform: booleanAttribute })\n  get checked(): boolean {\n    return this._checked;\n  }\n  set checked(value: boolean) {\n    if (value !== this.checked) {\n      this._checked = value;\n      this._changeDetectorRef.markForCheck();\n    }\n  }\n  private _checked: boolean = false;\n\n  /**\n   * Whether the checkbox is disabled. This fully overrides the implementation provided by the input.\n   */\n  @Input({ transform: booleanAttribute })\n  get disabled(): boolean {\n    return this._disabled;\n  }\n  set disabled(value: boolean) {\n    if (value !== this.disabled) {\n      this._disabled = value;\n      this._changeDetectorRef.markForCheck();\n    }\n  }\n  private _disabled: boolean = false;\n\n  /**\n   * Whether the checkbox is indeterminate. This is also known as \"mixed\" mode and can be used to\n   * represent a checkbox with three states, e.g. a checkbox that represents a nested list of\n   * checkable items. Note that whenever checkbox is manually clicked, indeterminate is immediately\n   * set to false.\n   */\n  @Input({ transform: booleanAttribute })\n  get indeterminate(): boolean {\n    return this._indeterminate;\n  }\n  set indeterminate(value: boolean) {\n    const changed = value !== this._indeterminate;\n    this._indeterminate = value;\n\n    if (changed) {\n      this.indeterminateChange.emit(this._indeterminate);\n    }\n\n    this._syncIndeterminate(this._indeterminate);\n  }\n  private _indeterminate: boolean = false;\n\n  /** Method being called whenever the label text changes. */\n  _onLabelTextChange() {\n    // Since the event of the `cdkObserveContent` directive runs outside of the zone, the checkbox\n    // component will be only marked for check, but no actual change detection runs automatically.\n    // Instead of going back into the zone in order to trigger a change detection which causes\n    // *all* components to be checked (if explicitly marked or not using OnPush), we only trigger\n    // an explicit change detection for the checkbox view and its children.\n    this._changeDetectorRef.detectChanges();\n  }\n\n  // Implemented as part of ControlValueAccessor.\n  writeValue(value: any) {\n    this.checked = !!value;\n  }\n\n  // Implemented as part of ControlValueAccessor.\n  registerOnChange(fn: (value: any) => void) {\n    this._controlValueAccessorChangeFn = fn;\n  }\n\n  // Implemented as part of ControlValueAccessor.\n  registerOnTouched(fn: any) {\n    this._onTouched = fn;\n  }\n\n  // Implemented as part of ControlValueAccessor.\n  setDisabledState(isDisabled: boolean) {\n    this.disabled = isDisabled;\n  }\n\n  // Implemented as a part of Validator.\n  validate(control: AbstractControl<boolean>): ValidationErrors | null {\n    return this.required && control.value !== true ? { required: true } : null;\n  }\n\n  // Implemented as a part of Validator.\n  registerOnValidatorChange(fn: () => void): void {\n    this._validatorChangeFn = fn;\n  }\n\n  protected _emitChangeEvent() {\n    const event = new SbbCheckboxChange();\n    event.source = this;\n    event.checked = this.checked;\n\n    this._controlValueAccessorChangeFn(this.checked);\n    this.change.emit(event);\n  }\n\n  /** Toggles the `checked` state of the checkbox. */\n  toggle(): void {\n    this.checked = !this.checked;\n    this._controlValueAccessorChangeFn(this.checked);\n  }\n\n  /**\n   * Event handler for checkbox input element.\n   * Toggles checked state if element is not disabled.\n   * Do not toggle on (change) event since IE doesn't fire change event when\n   *   indeterminate checkbox is clicked.\n   */\n  _onInputClick(event: Event) {\n    const clickAction = this._options?.clickAction;\n\n    // We have to stop propagation for click events on the visual hidden input element.\n    // By default, when a user clicks on a label element, a generated click event will be\n    // dispatched on the associated input element. Since we are using a label element as our\n    // root container, the click event on the `checkbox` will be executed twice.\n    // The real click event will bubble up, and the generated click event also tries to bubble up.\n    // This will lead to multiple click events.\n    // Preventing bubbling for the second event will solve that issue.\n    event.stopPropagation();\n\n    // If resetIndeterminate is false, and the current state is indeterminate, do nothing on click\n    if (!this.disabled && clickAction !== 'noop') {\n      // When user manually click on the checkbox, `indeterminate` is set to false.\n      if (this.indeterminate && clickAction !== 'check') {\n        Promise.resolve().then(() => {\n          this._indeterminate = false;\n          this.indeterminateChange.emit(this._indeterminate);\n        });\n      }\n\n      this._checked = !this._checked;\n\n      // Emit our custom change event if the native input emitted one.\n      // It is important to only emit it, if the native input triggered one, because\n      // we don't want to trigger a change event, when the `checked` variable changes for example.\n      this._emitChangeEvent();\n    } else if (!this.disabled && clickAction === 'noop') {\n      // Reset native input when clicked with noop. The native checkbox becomes checked after\n      // click, reset it to be align with `checked` value of `sbb-checkbox`.\n      this._inputElement.nativeElement.checked = this.checked;\n      this._inputElement.nativeElement.indeterminate = this.indeterminate;\n    }\n  }\n\n  /** Focuses the checkbox. */\n  focus(origin?: FocusOrigin, options?: FocusOptions): void {\n    if (origin) {\n      this._focusMonitor.focusVia(this._inputElement, origin, options);\n    } else {\n      this._inputElement.nativeElement.focus(options);\n    }\n  }\n\n  _onInteractionEvent(event: Event) {\n    // We always have to stop propagation on the change event.\n    // Otherwise the change event, from the input element, will bubble up and\n    // emit its event object to the `change` output.\n    event.stopPropagation();\n  }\n\n  /**\n   * Syncs the indeterminate value with the checkbox DOM node.\n   *\n   * We sync `indeterminate` directly on the DOM node, because in Ivy the check for whether a\n   * property is supported on an element boils down to `if (propName in element)`. Domino's\n   * HTMLInputElement doesn't have an `indeterminate` property so Ivy will warn during\n   * server-side rendering.\n   */\n  private _syncIndeterminate(value: boolean) {\n    const nativeCheckbox = this._inputElement;\n\n    if (nativeCheckbox) {\n      nativeCheckbox.nativeElement.indeterminate = value;\n    }\n  }\n}\n","<label [attr.for]=\"inputId\" class=\"sbb-selection-item-label\">\n  <input\n    #input\n    type=\"checkbox\"\n    class=\"cdk-visually-hidden sbb-selection-input sbb-checkbox-input sbb-transparent-parent-overlay\"\n    [id]=\"inputId\"\n    [indeterminate]=\"indeterminate\"\n    [required]=\"required\"\n    [checked]=\"checked\"\n    [attr.value]=\"value\"\n    [disabled]=\"disabled\"\n    [attr.name]=\"name\"\n    [tabIndex]=\"disabled ? -1 : tabIndex\"\n    [attr.aria-expanded]=\"ariaExpanded\"\n    [attr.aria-label]=\"ariaLabel || null\"\n    [attr.aria-labelledby]=\"ariaLabelledby\"\n    [attr.aria-describedby]=\"ariaDescribedby\"\n    [attr.aria-checked]=\"indeterminate ? 'mixed' : null\"\n    [attr.aria-controls]=\"ariaControls\"\n    [attr.aria-owns]=\"ariaOwns\"\n    (change)=\"_onInteractionEvent($event)\"\n    (click)=\"_onInputClick($event)\"\n  />\n\n  <div class=\"sbb-selection-container\">\n    <span class=\"sbb-selection-container-checked\">\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        width=\"24\"\n        height=\"24\"\n        viewBox=\"0 0 24 24\"\n        focusable=\"false\"\n      >\n        <polyline\n          fill=\"none\"\n          fill-rule=\"evenodd\"\n          stroke=\"#000\"\n          stroke-width=\"1\"\n          points=\"6 12 10 16 19 7.01\"\n        />\n      </svg>\n    </span>\n  </div>\n\n  <div class=\"sbb-selection-content\" (cdkObserveContent)=\"_onLabelTextChange()\">\n    <!-- Add an invisible span so JAWS can read the label -->\n    <span hidden>&nbsp;</span>\n    <ng-content></ng-content>\n  </div>\n</label>\n","import { ObserversModule } from '@angular/cdk/observers';\nimport { NgModule } from '@angular/core';\nimport { SbbCommonModule } from '@sbb-esta/angular/core';\n\nimport { SbbCheckbox } from './checkbox';\n\n@NgModule({\n  imports: [ObserversModule, SbbCommonModule, SbbCheckbox],\n  exports: [SbbCheckbox],\n})\nexport class SbbCheckboxModule {}\n"],"names":["SBB_CHECKBOX_DEFAULT_OPTIONS","InjectionToken","providedIn","factory","SBB_CHECKBOX_DEFAULT_OPTIONS_FACTORY","clickAction","defaults","SbbCheckboxChange","source","checked","SbbCheckbox","_elementRef","inject","ElementRef","_changeDetectorRef","ChangeDetectorRef","_focusMonitor","FocusMonitor","_options","optional","ariaLabel","ariaLabelledby","ariaDescribedby","ariaExpanded","ariaControls","ariaOwns","_uniqueId","_IdGenerator","getId","id","inputId","required","labelPosition","name","tabIndex","change","EventEmitter","indeterminateChange","value","_inputElement","_onTouched","_controlValueAccessorChangeFn","_validatorChangeFn","constructor","HostAttributeToken","parseInt","ngOnChanges","changes","ngAfterViewInit","monitor","subscribe","focusOrigin","Promise","resolve","then","markForCheck","_syncIndeterminate","_indeterminate","ngOnDestroy","stopMonitoring","_checked","disabled","_disabled","indeterminate","changed","emit","_onLabelTextChange","detectChanges","writeValue","registerOnChange","fn","registerOnTouched","setDisabledState","isDisabled","validate","control","registerOnValidatorChange","_emitChangeEvent","event","toggle","_onInputClick","stopPropagation","nativeElement","focus","origin","options","focusVia","_onInteractionEvent","nativeCheckbox","deps","target","i0","ɵɵFactoryTarget","Component","ɵcmp","ɵɵngDeclareComponent","minVersion","version","type","isStandalone","selector","inputs","undefined","numberAttribute","booleanAttribute","outputs","host","properties","classAttribute","providers","provide","NG_VALUE_ACCESSOR","useExisting","forwardRef","multi","NG_VALIDATORS","viewQueries","propertyName","first","predicate","descendants","exportAs","usesOnChanges","ngImport","template","CdkObserveContent","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","decorators","class","imports","Input","args","alias","transform","Output","ViewChild","SbbCheckboxModule","NgModule","ɵmod","ɵɵngDeclareNgModule","ObserversModule","SbbCommonModule","exports"],"mappings":";;;;;;;MAQaA,4BAA4B,GAAG,IAAIC,cAAc,CAC5D,8BAA8B,EAC9B;AACEC,EAAAA,UAAU,EAAE,MAAM;AAClBC,EAAAA,OAAO,EAAEC;AACV,CAAA;SAIaA,oCAAoCA,GAAA;EAClD,OAAO;AACLC,IAAAA,WAAW,EAAE;GACd;AACH;;ACiBA,MAAMC,QAAQ,GAAGF,oCAAoC,EAAE;MAG1CG,iBAAiB,CAAA;EAE5BC,MAAM;EAENC,OAAO;AACR;MAyCYC,WAAW,CAAA;AAGdC,EAAAA,WAAW,GAAGC,MAAM,CAA0BC,UAAU,CAAC;AACvDC,EAAAA,kBAAkB,GAAsBF,MAAM,CAACG,iBAAiB,CAAC;AACnEC,EAAAA,aAAa,GAAGJ,MAAM,CAACK,YAAY,CAAC;AACpCC,EAAAA,QAAQ,GAAGN,MAAM,CAA4BZ,4BAA4B,EAAE;AACjFmB,IAAAA,QAAQ,EAAE;AACX,GAAA,CAAC;AAMmBC,EAAAA,SAAS,GAAW,EAAE;AAKjBC,EAAAA,cAAc,GAAkB,IAAI;EAGnCC,eAAe;EAKsBC,YAAY;EAKpDC,YAAY;EAGhBC,QAAQ;EAEpBC,SAAS,GAAGd,MAAM,CAACe,YAAY,CAAC,CAACC,KAAK,CAAC,eAAe,CAAC;EAGtDC,EAAE,GAAW,IAAI,CAACH,SAAS;EAGpC,IAAII,OAAOA,GAAA;IACT,OAAO,CAAA,EAAG,IAAI,CAACD,EAAE,IAAI,IAAI,CAACH,SAAS,CAAQ,MAAA,CAAA;AAC7C;EAGwCK,QAAQ;AA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