{"version":3,"file":"badge.mjs","names":[],"sources":["../../../../../../packages/components/badge/src/badge.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPublicPropTypes, StyleValue } from 'vue'\nimport type { ClassValue } from '@element-plus/utils'\n\nexport interface BadgeProps {\n  /**\n   * @description display value.\n   */\n  value?: string | number\n  /**\n   * @description maximum value, shows `{max}+` when exceeded. Only works if value is a number.\n   */\n  max?: number\n  /**\n   * @description if a little dot is displayed.\n   */\n  isDot?: boolean\n  /**\n   * @description hidden badge.\n   */\n  hidden?: boolean\n  /**\n   * @description badge type.\n   */\n  type?: 'primary' | 'success' | 'warning' | 'info' | 'danger'\n  /**\n   * @description whether to show badge when value is zero.\n   */\n  showZero?: boolean\n  /**\n   * @description customize dot background color\n   */\n  color?: string\n  /**\n   * @description CSS style of badge\n   */\n  badgeStyle?: StyleValue\n  /**\n   * @description set offset of the badge\n   */\n  offset?: [number, number]\n  /**\n   * @description custom class name of badge\n   */\n  badgeClass?: ClassValue\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `BadgeProps` instead.\n */\nexport const badgeProps = buildProps({\n  /**\n   * @description display value.\n   */\n  value: {\n    type: [String, Number],\n    default: '',\n  },\n  /**\n   * @description maximum value, shows `{max}+` when exceeded. Only works if value is a number.\n   */\n  max: {\n    type: Number,\n    default: 99,\n  },\n  /**\n   * @description if a little dot is displayed.\n   */\n  isDot: Boolean,\n  /**\n   * @description hidden badge.\n   */\n  hidden: Boolean,\n  /**\n   * @description badge type.\n   */\n  type: {\n    type: String,\n    values: ['primary', 'success', 'warning', 'info', 'danger'],\n    default: 'danger',\n  },\n  /**\n   * @description whether to show badge when value is zero.\n   */\n  showZero: {\n    type: Boolean,\n    default: true,\n  },\n  /**\n   * @description customize dot background color\n   */\n  color: String,\n  /**\n   * @description CSS style of badge\n   */\n  badgeStyle: {\n    type: definePropType<StyleValue>([String, Object, Array, Boolean]),\n    default: undefined,\n  },\n  /**\n   * @description set offset of the badge\n   */\n  offset: {\n    type: definePropType<[number, number]>(Array),\n    default: () => [0, 0],\n  },\n  /**\n   * @description custom class name of badge\n   */\n  badgeClass: {\n    type: definePropType<ClassValue>([String, Array, Object, Boolean]),\n    default: undefined,\n  },\n} as const)\n\n/**\n * @deprecated Removed after 3.0.0, Use `BadgeProps` instead.\n */\nexport type BadgePropsPublic = ExtractPublicPropTypes<typeof badgeProps>\n"],"mappings":";;;;;AAmDA,MAAa,aAAa,WAAW;;;;CAInC,OAAO;EACL,MAAM,CAAC,QAAQ,MAAM;EACrB,SAAS;CACX;;;;CAIA,KAAK;EACH,MAAM;EACN,SAAS;CACX;;;;CAIA,OAAO;;;;CAIP,QAAQ;;;;CAIR,MAAM;EACJ,MAAM;EACN,QAAQ;GAAC;GAAW;GAAW;GAAW;GAAQ;EAAQ;EAC1D,SAAS;CACX;;;;CAIA,UAAU;EACR,MAAM;EACN,SAAS;CACX;;;;CAIA,OAAO;;;;CAIP,YAAY;EACV,MAAM,eAA2B;GAAC;GAAQ;GAAQ;GAAO;EAAO,CAAC;EACjE,SAAS,KAAA;CACX;;;;CAIA,QAAQ;EACN,MAAM,eAAiC,KAAK;EAC5C,eAAe,CAAC,GAAG,CAAC;CACtB;;;;CAIA,YAAY;EACV,MAAM,eAA2B;GAAC;GAAQ;GAAO;GAAQ;EAAO,CAAC;EACjE,SAAS,KAAA;CACX;AACF,CAAU"}