{"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,GACtB,KAAM,iBAEN,OAAQ,CAACC,EAAAA,OAAiB,EAE1B,MAAO,CAKL,KAAM,CACJ,KAAM,OACN,QAAS,OACT,UAAWC,GAAQC,sBAAoB,SAASD,CAAI,GAOtD,cAAe,CACb,KAAM,OACN,QAAS,KACT,UAAWE,GAAiB,OAAO,KAAKC,EAAAA,wBAAwB,EAAE,SAASD,CAAa,GAM1F,MAAO,CACL,KAAM,OACN,QAAS,QAMX,kBAAmB,CACjB,KAAM,OACN,QAAS,IAOX,QAAS,CACP,KAAM,QACN,QAAS,IAWX,OAAQ,CACN,KAAM,OACN,QAAS,GAMX,aAAc,CACZ,KAAM,OACN,QAAS,KAIb,MAAQ,CACN,MAAO,0BACLC,EAAAA,yBAEJ,CACF,iCAvHUC,EAAA,OAAI,sBADZC,EAAAA,mBAgBE,MAAA,CAjBJ,IAAA,EAGI,IAAI,WACJ,UAAQ,qBACP,MALLC,EAAAA,eAAA,+EAK0HF,EAAA,SAAwBA,EAAA,eAQ7I,MAbLG,EAAAA,eAAA,OAaoBH,EAAA,SAAgBI,EAAA,0BAMrBJ,EAAA,OAAI,yBADjBC,EAAAA,mBAiBE,MAAA,CAnCJ,IAAA,EAoBI,IAAI,WACJ,UAAQ,wBACP,MAtBLC,EAAAA,eAAA,CAsBoBG,EAAA,yBAAyBL,EAAA,aAAa,yFAAwHA,EAAA,SAAwBA,EAAA,eASrM,MA/BLG,EAAAA,eAAA,OA+BoBH,EAAA,SAAgBI,EAAA,0BA/BpCE,EAAAA,mBAAA,GAAA,EAAA"}