{"version":3,"file":"popconfirm.mjs","sources":["../../../../../../../packages/components/popconfirm/src/popconfirm.ts"],"sourcesContent":["import { buttonTypes } from '@hd-front-end/components/button'\nimport { QuestionFilled } from '@element-plus/icons-vue'\nimport { buildProps, iconPropType } from '@hd-front-end/utils'\nimport { useTooltipContentProps } from '@hd-front-end/components/tooltip'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\nimport type Popconfirm from './popconfirm.vue'\n\nexport const popconfirmProps = buildProps({\n  /**\n   * @description Title\n   */\n  title: String,\n  /**\n   * @description Confirm button text\n   */\n  confirmButtonText: String,\n  /**\n   * @description Cancel button text\n   */\n  cancelButtonText: String,\n  /**\n   * @description Confirm button type\n   */\n  confirmButtonType: {\n    type: String,\n    values: buttonTypes,\n    default: 'primary',\n  },\n  /**\n   * @description Cancel button type\n   */\n  cancelButtonType: {\n    type: String,\n    values: buttonTypes,\n    default: 'text',\n  },\n  /**\n   * @description Icon Component\n   */\n  icon: {\n    type: iconPropType,\n    default: () => QuestionFilled,\n  },\n  /**\n   * @description Icon color\n   */\n  iconColor: {\n    type: String,\n    default: '#f90',\n  },\n  /**\n   * @description is hide Icon\n   */\n  hideIcon: Boolean,\n  /**\n   * @description delay of disappear, in millisecond\n   */\n  hideAfter: {\n    type: Number,\n    default: 200,\n  },\n  /**\n   * @description Tooltip theme, built-in theme: `dark` / `light`\n   */\n  effect: {\n    ...useTooltipContentProps.effect,\n    default: 'light',\n  },\n  /**\n   * @description whether popconfirm is teleported to the body\n   */\n  teleported: useTooltipContentProps.teleported,\n  /**\n   * @description when popconfirm inactive and `persistent` is `false` , popconfirm will be destroyed\n   */\n  persistent: useTooltipContentProps.persistent,\n  /**\n   * @description popconfirm width, min width 150px\n   */\n  width: {\n    type: [String, Number],\n    default: 150,\n  },\n  /**\n   * @description whether the popConfirm can be closed by pressing ESC\n   */\n  closeOnPressEscape: {\n    type: Boolean,\n    default: true,\n  },\n} as const)\n\nexport const popconfirmEmits = {\n  /**\n   * @description triggers when click confirm button\n   */\n  confirm: (e: MouseEvent) => e instanceof MouseEvent,\n  /**\n   * @description triggers when click cancel button\n   */\n  cancel: (e: MouseEvent | KeyboardEvent) =>\n    e instanceof MouseEvent || e instanceof KeyboardEvent,\n}\n\nexport type PopconfirmEmits = typeof popconfirmEmits\n\nexport type PopconfirmProps = ExtractPropTypes<typeof popconfirmProps>\nexport type PopconfirmPropsPublic = __ExtractPublicPropTypes<\n  typeof popconfirmProps\n>\n\nexport type PopconfirmInstance = InstanceType<typeof Popconfirm> & unknown\n"],"names":[],"mappings":";;;;;;AAQO,MAAM,kBAAkB,UAAW,CAAA;AAAA,EAIxC,KAAO,EAAA,MAAA;AAAA,EAIP,iBAAmB,EAAA,MAAA;AAAA,EAInB,gBAAkB,EAAA,MAAA;AAAA,EAIlB,iBAAmB,EAAA;AAAA,IACjB,IAAM,EAAA,MAAA;AAAA,IACN,MAAQ,EAAA,WAAA;AAAA,IACR,OAAS,EAAA,SAAA;AAAA,GACX;AAAA,EAIA,gBAAkB,EAAA;AAAA,IAChB,IAAM,EAAA,MAAA;AAAA,IACN,MAAQ,EAAA,WAAA;AAAA,IACR,OAAS,EAAA,MAAA;AAAA,GACX;AAAA,EAIA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,YAAA;AAAA,IACN,SAAS,MAAM,cAAA;AAAA,GACjB;AAAA,EAIA,SAAW,EAAA;AAAA,IACT,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,MAAA;AAAA,GACX;AAAA,EAIA,QAAU,EAAA,OAAA;AAAA,EAIV,SAAW,EAAA;AAAA,IACT,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,GAAA;AAAA,GACX;AAAA,EAIA,MAAQ,EAAA;AAAA,IACN,GAAG,sBAAuB,CAAA,MAAA;AAAA,IAC1B,OAAS,EAAA,OAAA;AAAA,GACX;AAAA,EAIA,YAAY,sBAAuB,CAAA,UAAA;AAAA,EAInC,YAAY,sBAAuB,CAAA,UAA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