{"version":3,"file":"koobiq-components-checkbox.mjs","sources":["../../../packages/components/checkbox/checkbox-config.ts","../../../packages/components/checkbox/checkbox.ts","../../../packages/components/checkbox/checkbox.html","../../../packages/components/checkbox/checkbox-required-validator.ts","../../../packages/components/checkbox/checkbox-module.ts","../../../packages/components/checkbox/koobiq-components-checkbox.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\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 KbqCheckboxClickAction = 'noop' | 'check' | 'check-indeterminate' | undefined;\n\n/**\n * Injection token that can be used to specify the checkbox click behavior.\n */\nexport const KBQ_CHECKBOX_CLICK_ACTION = new InjectionToken<KbqCheckboxClickAction>('kbq-checkbox-click-action');\n","import { FocusMonitor, FocusOrigin } 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    inject,\n    Input,\n    numberAttribute,\n    OnDestroy,\n    Output,\n    ViewChild,\n    ViewEncapsulation\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { KbqCheckedState, KbqColorDirective } from '@koobiq/components/core';\nimport { KBQ_CHECKBOX_CLICK_ACTION, KbqCheckboxClickAction } from './checkbox-config';\n\n// Increasing integer for generating unique ids for checkbox components.\nlet nextUniqueId = 0;\n\n/**\n * Provider Expression that allows kbq-checkbox to register as a ControlValueAccessor.\n * This allows it to support [(ngModel)].\n * @docs-private\n */\nexport const KBQ_CHECKBOX_CONTROL_VALUE_ACCESSOR: any = {\n    provide: NG_VALUE_ACCESSOR,\n    useExisting: forwardRef(() => KbqCheckbox),\n    multi: true\n};\n\n/**\n * Represents the different states that require custom transitions between them.\n * @docs-private\n */\nexport enum TransitionCheckState {\n    /** The initial state of the component before any user interaction. */\n    Init = 'init',\n    /** The state representing the component when it's becoming checked. */\n    Checked = 'checked',\n    /** The state representing the component when it's becoming unchecked. */\n    Unchecked = 'unchecked',\n    /** The state representing the component when it's becoming indeterminate. */\n    Indeterminate = 'indeterminate'\n}\n\n/** Change event object emitted by KbqCheckbox. */\nexport class KbqCheckboxChange {\n    /** The source KbqCheckbox of the event. */\n    source: KbqCheckbox;\n    /** The new `checked` value of the checkbox. */\n    checked: boolean;\n}\n\n/**\n * A Koobiq checkbox component. Supports all of the functionality of an HTML5 checkbox,\n * and exposes a similar API. A KbqCheckbox 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: 'kbq-checkbox',\n    imports: [\n        CdkObserveContent\n    ],\n    templateUrl: 'checkbox.html',\n    styleUrls: ['checkbox.scss', 'checkbox-tokens.scss'],\n    encapsulation: ViewEncapsulation.None,\n    changeDetection: ChangeDetectionStrategy.OnPush,\n    exportAs: 'kbqCheckbox',\n    host: {\n        class: 'kbq-checkbox',\n        '[id]': 'id',\n        '[attr.id]': 'id',\n        '[attr.disabled]': 'disabled',\n        '[class.kbq-checkbox_big]': 'big',\n        '[class.kbq-indeterminate]': 'indeterminate',\n        '[class.kbq-checked]': 'checked',\n        '[class.kbq-disabled]': 'disabled',\n        '[class.kbq-checkbox_label-before]': 'labelPosition == \"before\"'\n    },\n    providers: [KBQ_CHECKBOX_CONTROL_VALUE_ACCESSOR]\n})\nexport class KbqCheckbox extends KbqColorDirective implements ControlValueAccessor, AfterViewInit, OnDestroy {\n    @Input() big: boolean = false;\n\n    /** A unique id for the checkbox input. If none is supplied, it will be auto-generated. */\n    @Input() id: string;\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    /** Event emitted when the checkbox's `checked` value changes. */\n    @Output() readonly change: EventEmitter<KbqCheckboxChange> = new EventEmitter<KbqCheckboxChange>();\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    /** Defines the behavior when a user clicks on the checkbox. */\n    @Input() clickAction: KbqCheckboxClickAction = inject(KBQ_CHECKBOX_CLICK_ACTION, { optional: true }) || undefined;\n\n    /** The native `<input type=\"checkbox\">` element */\n    @ViewChild('input', { static: false }) inputElement: ElementRef;\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 | undefined;\n\n    /**\n     * Whether the checkbox is checked.\n     */\n    @Input()\n    get checked(): boolean {\n        return this._checked;\n    }\n\n    set checked(value: boolean) {\n        if (value !== this.checked) {\n            this._checked = value;\n            this.changeDetectorRef.markForCheck();\n        }\n    }\n\n    private _checked: boolean = false;\n\n    /** Whether the checkbox is disabled. */\n    @Input({ transform: booleanAttribute })\n    get disabled(): boolean {\n        return this._disabled;\n    }\n\n    set disabled(value: boolean) {\n        if (value !== this.disabled) {\n            this._disabled = value;\n            this.changeDetectorRef.markForCheck();\n        }\n    }\n\n    private _disabled: boolean = false;\n\n    @Input({ transform: numberAttribute })\n    get tabIndex(): number {\n        return this.disabled ? -1 : this._tabIndex;\n    }\n\n    set tabIndex(value: number) {\n        this._tabIndex = value;\n    }\n\n    private _tabIndex = 0;\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()\n    get indeterminate(): boolean {\n        return this._indeterminate;\n    }\n\n    set indeterminate(value: boolean) {\n        const changed = value !== this._indeterminate;\n\n        this._indeterminate = value;\n\n        if (changed) {\n            if (this._indeterminate) {\n                this.transitionCheckState(TransitionCheckState.Indeterminate);\n            } else {\n                this.transitionCheckState(this.checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n            }\n\n            this.indeterminateChange.emit(this._indeterminate);\n        }\n    }\n\n    private _indeterminate: boolean = false;\n\n    private uniqueId: string = `kbq-checkbox-${++nextUniqueId}`;\n\n    private currentAnimationClass: string = '';\n\n    private currentCheckState: TransitionCheckState = TransitionCheckState.Init;\n\n    constructor(\n        private changeDetectorRef: ChangeDetectorRef,\n        private focusMonitor: FocusMonitor\n    ) {\n        super();\n\n        this.id = this.uniqueId;\n    }\n\n    /**\n     * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.\n     * @docs-private\n     */\n    onTouched: () => any = () => {};\n\n    ngAfterViewInit() {\n        this.focusMonitor\n            .monitor(this.inputElement.nativeElement)\n            .subscribe((focusOrigin) => this.onInputFocusChange(focusOrigin));\n    }\n\n    ngOnDestroy() {\n        this.focusMonitor.stopMonitoring(this.inputElement.nativeElement);\n    }\n\n    /** Method being called whenever the label text changes. */\n    onLabelTextChange() {\n        // This method is getting called whenever the label of the checkbox changes.\n        // Since the checkbox uses the OnPush strategy we need to notify it about the change\n        // that has been recognized by the cdkObserveContent directive.\n        this.changeDetectorRef.markForCheck();\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    getAriaChecked(): KbqCheckedState {\n        return this.checked ? 'true' : this.indeterminate ? 'mixed' : 'false';\n    }\n\n    /** Toggles the `checked` state of the checkbox. */\n    toggle(): void {\n        this.checked = !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     * @param event Input click event\n     */\n    onInputClick(event: Event) {\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 && this.clickAction !== 'noop') {\n            // When user manually click on the checkbox, `indeterminate` is set to false.\n            if (this.indeterminate && this.clickAction !== 'check') {\n                Promise.resolve().then(() => {\n                    this._indeterminate = false;\n                    this.indeterminateChange.emit(this._indeterminate);\n                });\n            }\n\n            this.toggle();\n            this.transitionCheckState(this._checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\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 && this.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 `kbq-checkbox`.\n            this.inputElement.nativeElement.checked = this.checked;\n            this.inputElement.nativeElement.indeterminate = this.indeterminate;\n        }\n    }\n\n    /** Focuses the checkbox. */\n    focus(): void {\n        this.focusMonitor.focusVia(this.inputElement.nativeElement, 'keyboard');\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    private controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n    private transitionCheckState(newState: TransitionCheckState) {\n        const oldState = this.currentCheckState;\n        const element: HTMLElement = this.elementRef.nativeElement;\n\n        if (oldState === newState) {\n            return;\n        }\n\n        if (this.currentAnimationClass.length > 0) {\n            element.classList.remove(this.currentAnimationClass);\n        }\n\n        this.currentCheckState = newState;\n\n        if (this.currentAnimationClass.length > 0) {\n            element.classList.add(this.currentAnimationClass);\n        }\n    }\n\n    private emitChangeEvent() {\n        const event = new KbqCheckboxChange();\n\n        event.source = this;\n        event.checked = this.checked;\n\n        this.controlValueAccessorChangeFn(this.checked);\n        this.change.emit(event);\n    }\n\n    /** Function is called whenever the focus changes for the input element. */\n    private onInputFocusChange(focusOrigin: FocusOrigin) {\n        if (focusOrigin) {\n            this.onTouched();\n        }\n    }\n}\n","<label #label class=\"kbq-checkbox__layout\" [attr.for]=\"inputId\">\n    <div\n        class=\"kbq-checkbox__inner-container\"\n        [class.kbq-checkbox__inner-container_no-side-margin]=\"\n            !checkboxLabel.textContent || !checkboxLabel.textContent.trim()\n        \"\n    >\n        <input\n            #input\n            type=\"checkbox\"\n            class=\"kbq-checkbox-input cdk-visually-hidden\"\n            [attr.aria-checked]=\"getAriaChecked()\"\n            [attr.name]=\"name\"\n            [attr.value]=\"value\"\n            [checked]=\"checked\"\n            [disabled]=\"disabled\"\n            [id]=\"inputId\"\n            [indeterminate]=\"indeterminate\"\n            [required]=\"required\"\n            [tabIndex]=\"tabIndex\"\n            (change)=\"onInteractionEvent($event)\"\n            (click)=\"onInputClick($event)\"\n        />\n        <div class=\"kbq-checkbox__frame\">\n            <i class=\"kbq-checkbox-checkmark kbq kbq-check-s_16\"></i>\n            <i class=\"kbq-checkbox-mixedmark kbq kbq-minus-s_16\"></i>\n        </div>\n    </div>\n\n    <div class=\"kbq-checkbox__text-container\">\n        <span #checkboxLabel class=\"kbq-checkbox-label\" (cdkObserveContent)=\"onLabelTextChange()\">\n            <ng-content />\n        </span>\n\n        <ng-content select=\"kbq-hint\" />\n    </div>\n</label>\n","import { Directive, forwardRef, Provider } from '@angular/core';\nimport { CheckboxRequiredValidator, NG_VALIDATORS } from '@angular/forms';\n\nexport const KBQ_CHECKBOX_REQUIRED_VALIDATOR: Provider = {\n    provide: NG_VALIDATORS,\n    useExisting: forwardRef(() => KbqCheckboxRequiredValidator),\n    multi: true\n};\n\n/**\n * Validator for koobiq checkbox's required attribute in template-driven checkbox.\n * Current CheckboxRequiredValidator only work with `input type=checkbox` and does not\n * work with `kbq-checkbox`.\n */\n@Directive({\n    selector: `kbq-checkbox[required][formControlName],\n             kbq-checkbox[required][formControl], kbq-checkbox[required][ngModel]`,\n    providers: [KBQ_CHECKBOX_REQUIRED_VALIDATOR],\n    host: { '[attr.required]': 'required ? \"\" : null' }\n})\nexport class KbqCheckboxRequiredValidator extends CheckboxRequiredValidator {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { KbqCheckbox } from './checkbox';\nimport { KbqCheckboxRequiredValidator } from './checkbox-required-validator';\n\n@NgModule({\n    imports: [CommonModule, KbqCheckbox, KbqCheckboxRequiredValidator],\n    exports: [KbqCheckbox, KbqCheckboxRequiredValidator]\n})\nexport class KbqCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAWA;;AAEG;MACU,yBAAyB,GAAG,IAAI,cAAc,CAAyB,2BAA2B;;ACS/G;AACA,IAAI,YAAY,GAAG,CAAC;AAEpB;;;;AAIG;AACI,MAAM,mCAAmC,GAAQ;AACpD,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,WAAW,CAAC;AAC1C,IAAA,KAAK,EAAE;;AAGX;;;AAGG;IACS;AAAZ,CAAA,UAAY,oBAAoB,EAAA;;AAE5B,IAAA,oBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;;AAEb,IAAA,o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