{"version":3,"file":"avatar2.mjs","sources":["../../../../../../../packages/components/avatar/src/avatar.ts"],"sourcesContent":["import {\n  buildProps,\n  definePropType,\n  iconPropType,\n  isNumber,\n} from '@hd-front-end/utils'\nimport { componentSizes } from '@hd-front-end/constants'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\nimport type { ObjectFitProperty } from 'csstype'\n\nexport const avatarProps = buildProps({\n  /**\n   * @description avatar size.\n   */\n  size: {\n    type: [Number, String],\n    values: componentSizes,\n    default: '',\n    validator: (val: unknown): val is number => isNumber(val),\n  },\n  /**\n   * @description avatar shape.\n   */\n  shape: {\n    type: String,\n    values: ['circle', 'square'],\n    default: 'circle',\n  },\n  /**\n   * @description representation type to icon, more info on icon component.\n   */\n  icon: {\n    type: iconPropType,\n  },\n  /**\n   * @description the source of the image for an image avatar.\n   */\n  src: {\n    type: String,\n    default: '',\n  },\n  /**\n   * @description native attribute `alt` of image avatar.\n   */\n  alt: String,\n  /**\n   * @description native attribute srcset of image avatar.\n   */\n  srcSet: String,\n  /**\n   * @description set how the image fit its container for an image avatar.\n   */\n  fit: {\n    type: definePropType<ObjectFitProperty>(String),\n    default: 'cover',\n  },\n} as const)\nexport type AvatarProps = ExtractPropTypes<typeof avatarProps>\nexport type AvatarPropsPublic = __ExtractPublicPropTypes<typeof avatarProps>\n\nexport const avatarEmits = {\n  error: (evt: Event) => evt instanceof Event,\n}\nexport type AvatarEmits = typeof avatarEmits\n"],"names":[],"mappings":";;;;;AAWO,MAAM,cAAc,UAAW,CAAA;AAAA,EAIpC,IAAM,EAAA;AAAA,IACJ,IAAA,EAAM,CAAC,MAAA,EAAQ,MAAM,CAAA;AAAA,IACrB,MAAQ,EAAA,cAAA;AAAA,IACR,OAAS,EAAA,EAAA;AAAA,IACT,SAAW,EAAA,CAAC,GAAgC,KAAA,QAAA,CAAS,GAAG,CAAA;AAAA,GAC1D;AAAA,EAIA,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,MAAA,EAAQ,CAAC,QAAA,EAAU,QAAQ,CAAA;AAAA,IAC3B,OAAS,EAAA,QAAA;AAAA,GACX;AAAA,EAIA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,YAAA;AAAA,GACR;AAAA,EAIA,GAAK,EAAA;AAAA,IACH,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,GAAK,EAAA,MAAA;AAAA,EAIL,MAAQ,EAAA,MAAA;AAAA,EAIR,GAAK,EAAA;AAAA,IACH,IAAA,EAAM,eAAkC,MAAM,CAAA;AAAA,IAC9C,OAAS,EAAA,OAAA;AAAA,GACX;AACF,CAAU,EAAA;AAIH,MAAM,WAAc,GAAA;AAAA,EACzB,KAAA,EAAO,CAAC,GAAA,KAAe,GAAe,YAAA,KAAA;AACxC;;;;"}