{"version":3,"file":"uib-angular-components-progress-bar.mjs","sources":["../../../../libs/angular-components/components/progress-bar/src/lib/models/progress-bar-mode.ts","../../../../libs/angular-components/components/progress-bar/src/lib/progress-bar.component.ts","../../../../libs/angular-components/components/progress-bar/src/lib/progress-bar.component.html","../../../../libs/angular-components/components/progress-bar/src/lib/progress-bar.module.ts","../../../../libs/angular-components/components/progress-bar/src/uib-angular-components-progress-bar.ts"],"sourcesContent":["/** Available modes for {@link ProgressBarComponent} */\nexport type ProgressBarMode = typeof ProgressBarMode[keyof typeof ProgressBarMode];\nexport const ProgressBarMode = {\n  DEFAULT: 'default',\n  INDETERMINATE: 'indeterminate',\n} as const;\n","import { ChangeDetectionStrategy, Component, ElementRef, Input, Renderer2, ViewEncapsulation } from '@angular/core';\nimport { coerceNumberProperty, NumberInput, UibComponent, UibCSSModifier } from '@uib/angular/core';\nimport { clamp } from '@uib/angular/utils';\nimport { ProgressBarMode } from './models';\n\n@UibComponent('progress')\n@Component({\n  selector: 'uib-progress-bar',\n  templateUrl: 'progress-bar.component.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  encapsulation: ViewEncapsulation.None,\n  host: {\n    '[attr.aria-valuenow]': 'ariaValueNow',\n    '[attr.aria-valuemax]': '100',\n    '[attr.aria-valuemin]': '0',\n    '[attr.role]': '\"progressbar\"',\n    '[style.display]': '\"block\"',\n  },\n})\nexport class ProgressBarComponent {\n  public static ngAcceptInputType_value: NumberInput;\n\n  private _value = NaN;\n\n  /**\n   * Sets the progress bar mode\n   */\n  @UibCSSModifier({\n    default: ProgressBarMode.DEFAULT,\n  })\n  @Input()\n  public mode?: ProgressBarMode | null;\n\n  @Input()\n  public set value(value: unknown) {\n    if (this.mode === ProgressBarMode.INDETERMINATE) {\n      this._value = NaN;\n    } else {\n      this._value = clamp(coerceNumberProperty(value), 0, 100);\n    }\n  }\n  public get value(): number {\n    return this._value;\n  }\n\n  public get width(): string | null {\n    return isNaN(this.value) || this.mode === ProgressBarMode.INDETERMINATE ? null : `${this.value}%`;\n  }\n\n  public get ariaValueNow(): number | null {\n    return isNaN(this.value) ? null : this.value;\n  }\n\n  constructor(public readonly element: ElementRef, public readonly renderer: Renderer2) {}\n}\n","<div class=\"uib-progress__bar\" [style.width]=\"width\"></div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ProgressBarComponent } from './progress-bar.component';\n\n@NgModule({\n  declarations: [ProgressBarComponent],\n  exports: [ProgressBarComponent],\n  imports: [CommonModule],\n})\nexport class ProgressBarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAEa,MAAA,eAAe,GAAG;AAC7B,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,aAAa,EAAE,eAAe;;;ACenB,IAAA,oBAAoB,SAApB,oBAAoB,CAAA;IAkC/B,WAA4B,CAAA,OAAmB,EAAkB,QAAmB,EAAA;QAAxD,IAAO,CAAA,OAAA,GAAP,OAAO,CAAY;QAAkB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;QA/B5E,IAAM,CAAA,MAAA,GAAG,GAAG,CAAC;KA+BmE;IApBxF,IACW,KAAK,CAAC,KAAc,EAAA;AAC7B,QAAA,IAAI,IAAI,CAAC,IAAI,KAAK,eAAe,CAAC,aAAa,EAAE;AAC/C,YAAA,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;AACnB,SAAA;AAAM,aAAA;AACL,YAAA,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,oBAAoB,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;AAC1D,SAAA;KACF;AACD,IAAA,IAAW,KAAK,GAAA;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;KACpB;AAED,IAAA,IAAW,KAAK,GAAA;QACd,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,KAAK,eAAe,CAAC,aAAa,GAAG,IAAI,GA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