{"version":3,"file":"skeleton-shape.cjs","sources":["../../../components/skeleton/skeleton-shape.vue"],"sourcesContent":["<template>\n  <div\n    ref=\"skeleton\"\n    data-qa=\"skeleton-shape\"\n    :class=\"[\n      'd-skeleton-placeholder',\n      SKELETON_SHAPES[shape],\n      {\n        'd-skeleton-placeholder--animate': animate,\n      },\n      contentClass,\n    ]\"\n    :style=\"shapeStyles\"\n  />\n</template>\n\n<script>\nimport SkeletonAnimation from '@/common/mixins/skeleton';\nimport {\n  SKELETON_SHAPES,\n  SKELETON_SHAPE_SIZES,\n} from './skeleton_constants';\n\nexport default {\n  compatConfig: { MODE: 3 },\n  name: 'DtSkeletonShape',\n\n  mixins: [SkeletonAnimation],\n\n  props: {\n    /**\n     * Defines the shape of the skeleton, accepts circle or square.\n     * @values circle, square\n     */\n    shape: {\n      type: String,\n      default: 'circle',\n      validator: shape => Object.keys(SKELETON_SHAPES).includes(shape),\n    },\n\n    /**\n     * Size of the shape\n     * @values xs, sm, md, lg, xl\n     */\n    size: {\n      type: String,\n      default: 'md',\n    },\n\n    /**\n     * Duration time of the animation (ms), set -1 for an infinite animation.\n     */\n    animationDuration: {\n      type: Number,\n      default: -1,\n    },\n\n    /**\n     * This property has higher priority than \"option.animate\"\n     * @values true, false\n     */\n    animate: {\n      type: Boolean,\n      default: true,\n    },\n\n    /**\n     * RippleDuration controls how long the delay is for the animation of a\n     * placeholder 1000 pixels from the top of the page. Each placeholder\n     * from the top down will have a delay duration from 0 to this offset.\n     * The delay of each placeholder animation is based on how far down the page\n     * the placeholder is rendered. This is a linear relationship. The unit\n     * is milliseconds.\n     */\n    offset: {\n      type: Number,\n      default: 1,\n    },\n\n    /**\n     * Additional class name for the content.\n     */\n    contentClass: {\n      type: [String, Object, Array],\n      default: '',\n    },\n  },\n\n  data () {\n    return {\n      SKELETON_SHAPES,\n    };\n  },\n\n  computed: {\n    shapeStyles () {\n      const size = SKELETON_SHAPE_SIZES[this.size] || this.size;\n      return {\n        ...this.skeletonStyle,\n        'min-width': size,\n        'max-width': size,\n        'min-height': size,\n        'max-height': size,\n      };\n    },\n  },\n};\n</script>\n"],"names":["_sfc_main","SkeletonAnimation","shape","SKELETON_SHAPES","size","SKELETON_SHAPE_SIZES","_createElementBlock","_normalizeClass","$data","$props","_normalizeStyle","$options"],"mappings":"iRAuBKA,EAAU,CACb,aAAc,CAAE,KAAM,GACtB,KAAM,kBAEN,OAAQ,CAACC,EAAAA,OAAiB,EAE1B,MAAO,CAKL,MAAO,CACL,KAAM,OACN,QAAS,SACT,UAAWC,GAAS,OAAO,KAAKC,EAAAA,eAAe,EAAE,SAASD,CAAK,GAOjE,KAAM,CACJ,KAAM,OACN,QAAS,MAMX,kBAAmB,CACjB,KAAM,OACN,QAAS,IAOX,QAAS,CACP,KAAM,QACN,QAAS,IAWX,OAAQ,CACN,KAAM,OACN,QAAS,GAMX,aAAc,CACZ,KAAM,CAAC,OAAQ,OAAQ,KAAK,EAC5B,QAAS,KAIb,MAAQ,CACN,MAAO,CACL,gBAAAC,EAAAA,gBAEJ,EAEA,SAAU,CACR,aAAe,CACb,MAAMC,EAAOC,EAAAA,qBAAqB,KAAK,IAAI,GAAK,KAAK,KACrD,MAAO,CACL,GAAG,KAAK,cACR,YAAaD,EACb,YAAaA,EACb,aAAcA,EACd,aAAcA,EAElB,EAEJ,+CAzGEE,EAAAA,mBAYE,MAAA,CAXA,IAAI,WACJ,UAAQ,iBACP,MAJLC,EAAAA,eAAA,0BAIoDC,EAAA,gBAAgBC,EAAA,KAAK,qCAAsDA,EAAA,SAAwBA,EAAA,eAQlJ,MAZLC,EAAAA,eAYYC,EAAA,WAAW"}