{"version":3,"file":"skeleton-text.cjs","sources":["../../../components/skeleton/skeleton-text.vue"],"sourcesContent":["<template>\n  <div\n    v-if=\"type === 'body'\"\n    ref=\"skeleton\"\n    data-qa=\"skeleton-text-body\"\n    :class=\"[\n      'd-skeleton-text',\n      'd-skeleton-placeholder',\n      {\n        'd-skeleton-placeholder--animate': animate,\n      },\n      contentClass,\n    ]\"\n    :style=\"{\n      width,\n      ...skeletonStyle,\n    }\"\n  />\n  <div\n    v-else-if=\"type === 'heading'\"\n    ref=\"skeleton\"\n    data-qa=\"skeleton-text-heading\"\n    :class=\"[\n      SKELETON_HEADING_HEIGHTS[headingHeight],\n      'd-skeleton-text--heading',\n      'd-skeleton-placeholder',\n      {\n        'd-skeleton-placeholder--animate': animate,\n      },\n      contentClass,\n    ]\"\n    :style=\"{\n      width,\n      ...skeletonStyle,\n    }\"\n  />\n</template>\n\n<script>\nimport { SKELETON_HEADING_HEIGHTS, SKELETON_TEXT_TYPES } from './skeleton_constants';\nimport SkeletonAnimation from '@/common/mixins/skeleton';\n\nexport default {\n  compatConfig: { MODE: 3 },\n  name: 'DtSkeletonText',\n\n  mixins: [SkeletonAnimation],\n\n  props: {\n    /**\n     * Skeleton type\n     * @values body, heading\n     */\n    type: {\n      type: String,\n      default: 'body',\n      validator: type => SKELETON_TEXT_TYPES.includes(type),\n    },\n\n    /**\n     * Heading height\n     * @values sm, md, lg\n     */\n    headingHeight: {\n      type: String,\n      default: 'md',\n      validator: headingHeight => Object.keys(SKELETON_HEADING_HEIGHTS).includes(headingHeight),\n    },\n\n    /**\n     * Width of the skeleton\n     */\n    width: {\n      type: String,\n      default: '100%',\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: false,\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,\n      default: '',\n    },\n  },\n\n  data () {\n    return {\n      SKELETON_HEADING_HEIGHTS,\n    };\n  },\n};\n</script>\n"],"names":["_sfc_main","SkeletonAnimation","type","SKELETON_TEXT_TYPES","headingHeight","SKELETON_HEADING_HEIGHTS","$props","_createElementBlock","_normalizeClass","_normalizeStyle","_ctx","$data","_createCommentVNode"],"mappings":"iRA0CKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,iBAEN,OAAQ,CAACC,EAAAA,OAAiB,EAE1B,MAAO,CAKL,KAAM,CACJ,KAAM,OACN,QAAS,OACT,UAAWC,GAAQC,sBAAoB,SAASD,CAAI,CACrD,EAMD,cAAe,CACb,KAAM,OACN,QAAS,KACT,UAAWE,GAAiB,OAAO,KAAKC,EAAAA,wBAAwB,EAAE,SAASD,CAAa,CACzF,EAKD,MAAO,CACL,KAAM,OACN,QAAS,MACV,EAKD,kBAAmB,CACjB,KAAM,OACN,QAAS,EACV,EAMD,QAAS,CACP,KAAM,QACN,QAAS,EACV,EAUD,OAAQ,CACN,KAAM,OACN,QAAS,CACV,EAKD,aAAc,CACZ,KAAM,OACN,QAAS,EACV,CACF,EAED,MAAQ,CACN,MAAO,0BACLC,EAAwB,yBAE3B,CACH,iCAvHUC,EAAI,OAAA,sBADZC,EAgBE,mBAAA,MAAA,CAjBJ,IAAA,EAGI,IAAI,WACJ,UAAQ,qBACP,MALLC,EAAAA,eAAA,+EAK0HF,EAAO,SAAiBA,EAAY,eAQzJ,MAbLG,EAAAA,eAAA,OAaoBH,EAAK,SAAWI,EAAa,0BAMlCJ,EAAI,OAAA,yBADjBC,EAiBE,mBAAA,MAAA,CAnCJ,IAAA,EAoBI,IAAI,WACJ,UAAQ,wBACP,MAtBLC,EAAAA,eAAA,CAsBoBG,EAAA,yBAAyBL,EAAa,aAAA,yFAAwHA,EAAO,SAAiBA,EAAY,eASjN,MA/BLG,EAAAA,eAAA,OA+BoBH,EAAK,SAAWI,EAAa,0BA/BjDE,EAAA,mBAAA,GAAA,EAAA"}