{"version":3,"file":"carousel2.mjs","sources":["../../../../../../../packages/components/carousel/src/carousel.ts"],"sourcesContent":["import { buildProps, isNumber } from '@hd-front-end/utils'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\n\nexport const carouselProps = buildProps({\n  /**\n   * @description index of the initially active slide (starting from 0)\n   */\n  initialIndex: {\n    type: Number,\n    default: 0,\n  },\n  /**\n   * @description height of the carousel\n   */\n  height: {\n    type: String,\n    default: '',\n  },\n  /**\n   * @description how indicators are triggered\n   */\n  trigger: {\n    type: String,\n    values: ['hover', 'click'],\n    default: 'hover',\n  },\n  /**\n   * @description whether automatically loop the slides\n   */\n  autoplay: {\n    type: Boolean,\n    default: true,\n  },\n  /**\n   * @description interval of the auto loop, in milliseconds\n   */\n  interval: {\n    type: Number,\n    default: 3000,\n  },\n  /**\n   * @description position of the indicators\n   */\n  indicatorPosition: {\n    type: String,\n    values: ['', 'none', 'outside'],\n    default: '',\n  },\n  /**\n   * @description when arrows are shown\n   */\n  arrow: {\n    type: String,\n    values: ['always', 'hover', 'never'],\n    default: 'hover',\n  },\n  /**\n   * @description type of the Carousel\n   */\n  type: {\n    type: String,\n    values: ['', 'card'],\n    default: '',\n  },\n  /**\n   * @description when type is card, scaled size of secondary cards\n   */\n  cardScale: {\n    type: Number,\n    default: 0.83,\n  },\n  /**\n   * @description display the items in loop\n   */\n  loop: {\n    type: Boolean,\n    default: true,\n  },\n  /**\n   * @description display direction\n   */\n  direction: {\n    type: String,\n    values: ['horizontal', 'vertical'],\n    default: 'horizontal',\n  },\n  /**\n   * @description pause autoplay when hover\n   */\n  pauseOnHover: {\n    type: Boolean,\n    default: true,\n  },\n  /**\n   * @description infuse dynamism and smoothness into the carousel\n   */\n  motionBlur: Boolean,\n} as const)\n\nexport const carouselEmits = {\n  /**\n   * @description triggers when the active slide switches\n   * @param current index of the new active slide\n   * @param prev index of the old active slide\n   */\n  change: (current: number, prev: number) => [current, prev].every(isNumber),\n}\n\nexport type CarouselProps = ExtractPropTypes<typeof carouselProps>\nexport type CarouselPropsPublic = __ExtractPublicPropTypes<typeof carouselProps>\nexport type CarouselEmits = typeof carouselEmits\n"],"names":[],"mappings":";;;AAIO,MAAM,gBAAgB,UAAW,CAAA;AAAA,EAItC,YAAc,EAAA;AAAA,IACZ,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,CAAA;AAAA,GACX;AAAA,EAIA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,OAAS,EAAA;AAAA,IACP,IAAM,EAAA,MAAA;AAAA,IACN,MAAA,EAAQ,CAAC,OAAA,EAAS,OAAO,CAAA;AAAA,IACzB,OAAS,EAAA,OAAA;AAAA,GACX;AAAA,EAIA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EAIA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,GAAA;AAAA,GACX;AAAA,EAIA,iBAAmB,EAAA;AAAA,IACjB,IAAM,EAAA,MAAA;AAAA,IACN,MAAQ,EAAA,CAAC,EAAI,EAAA,MAAA,EAAQ,SAAS,CAAA;AAAA,IAC9B,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,MAAQ,EAAA,CAAC,QAAU,EAAA,OAAA,EAAS,OAAO,CAAA;AAAA,IACnC,OAAS,EAAA,OAAA;AAAA,GACX;AAAA,EAIA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,MAAA,EAAQ,CAAC,EAAA,EAAI,MAAM,CAAA;AAAA,IACnB,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,SAAW,EAAA;AAAA,IACT,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,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