{"version":3,"file":"ngwr-spinner.mjs","sources":["../../../projects/lib/spinner/spinner.ts","../../../projects/lib/spinner/spinner.html","../../../projects/lib/spinner/ngwr-spinner.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\nimport type { WrSpinnerSize } from './interfaces';\n\n/**\n * Inline loading indicator.\n *\n * Inherits color from the surrounding text (uses `currentColor`).\n *\n * @example\n * ```html\n * <wr-spinner />\n * <wr-spinner size=\"lg\" />\n * ```\n *\n * @see https://ngwr.dev/components/spinner\n */\n@Component({\n  selector: 'wr-spinner',\n  templateUrl: './spinner.html',\n  encapsulation: ViewEncapsulation.None,\n  host: {\n    role: 'status',\n    'aria-label': 'Loading',\n    '[class]': 'classes()',\n  },\n})\nexport class WrSpinner {\n  /**\n   * Size variant. Em-based — scales with surrounding font-size.\n   *\n   * @default 'md'\n   */\n  readonly size = input<WrSpinnerSize>('md');\n\n  protected readonly classes = computed(() => {\n    const size = this.size();\n    return size === 'md' ? 'wr-spinner' : `wr-spinner wr-spinner--${size}`;\n  });\n}\n","<svg viewBox=\"0 0 50 50\" aria-hidden=\"true\">\n  <circle class=\"wr-spinner__path\" cx=\"25\" cy=\"25\" r=\"20\" fill=\"none\" stroke-width=\"5\" />\n</svg>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAAA;;;;;AAKG;AAMH;;;;;;;;;;;;AAYG;MAWU,SAAS,CAAA;AACpB;;;;AAIG;IACM,IAAI,GAAG,KAAK,CAAgB,IAAI;6EAAC;AAEvB,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAK;AACzC,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE;AACxB,QAAA,OAAO,IAAI,KAAK,IAAI,GAAG,YAAY,GAAG,CAAA,uBAAA,EAA0B,IAAI,EAAE;IACxE,CAAC;gFAAC;uGAXS,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAT,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,SAAS,kTClCtB,mKAGA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FD+Ba,SAAS,EAAA,UAAA,EAAA,CAAA;kBAVrB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EAAA,aAAA,EAEP,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACJ,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,YAAY,EAAE,SAAS;AACvB,wBAAA,SAAS,EAAE,WAAW;AACvB,qBAAA,EAAA,QAAA,EAAA,mKAAA,EAAA;;;AEhCH;;AAEG;;;;"}