{"version":3,"file":"ngwr-skeleton.mjs","sources":["../../../projects/lib/skeleton/skeleton.ts","../../../projects/lib/skeleton/ngwr-skeleton.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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\nimport type { WrColor } from 'ngwr/theme';\n\n/**\n * Placeholder block shown while content is loading.\n *\n * Default sizing fills the parent width and matches the surrounding\n * text height (`1lh`). Override `--wr-skeleton-height` / `width` on the\n * host for custom shapes.\n *\n * @example\n * ```html\n * <wr-skeleton />\n * <wr-skeleton color=\"primary\" [animated]=\"false\" />\n * ```\n *\n * @see https://ngwr.dev/components/skeleton\n */\n@Component({\n  selector: 'wr-skeleton',\n  template: '',\n  encapsulation: ViewEncapsulation.None,\n  host: {\n    'aria-busy': 'true',\n    'aria-live': 'polite',\n    '[class]': 'classes()',\n  },\n})\nexport class WrSkeleton {\n  /**\n   * Color tint for the placeholder.\n   *\n   * Default is `'light'` because it's theme-stable — the `light` token is\n   * slate-300 in light mode (subtle gray on white) and slate-800 in dark\n   * mode (subtle lift on near-black). The `'dark'` value flips to a near-\n   * white wash in dark mode and breaks the placeholder affordance.\n   *\n   * @default 'light'\n   */\n  readonly color = input<WrColor>('light');\n\n  /**\n   * Whether the shimmer animation runs.\n   *\n   * @default true\n   */\n  readonly animated = input(true, { transform: coerceBooleanProperty });\n\n  protected readonly classes = computed(() => {\n    const parts = ['wr-skeleton', `wr-skeleton--${this.color()}`];\n    if (this.animated()) parts.push('wr-skeleton--animated');\n    return parts.join(' ');\n  });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;AAKG;AAOH;;;;;;;;;;;;;;AAcG;MAWU,UAAU,CAAA;AACrB;;;;;;;;;AASG;IACM,KAAK,GAA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