{"version":3,"file":"types2.mjs","sources":["../../../../../../../packages/components/button/src/types.ts"],"sourcesContent":["import { propTypes } from '@tav-ui/utils/propTypes'\nimport type { ExtractPropTypes, PropType } from 'vue'\nimport type { ButtonShape } from 'ant-design-vue/lib/button'\nconst tuple = <T extends string[]>(...args: T) => args\nconst ButtonTypes = tuple('default', 'primary', 'ghost', 'dashed', 'link', 'text')\n// const ButtonShapes = tuple('circle', 'round')\nconst ButtonHTMLTypes = tuple('submit', 'button', 'reset')\n\nexport const buttonProps = {\n  //antdv button\n  prefixCls: propTypes.string,\n  type: propTypes.oneOf(ButtonTypes),\n  htmlType: propTypes.oneOf(ButtonHTMLTypes).def('button'),\n  shape: {\n    type: String as PropType<ButtonShape>,\n  },\n  size: {\n    type: String as PropType<'small' | 'middle' | 'large' | undefined>,\n  },\n  loading: {\n    type: [Boolean, Object] as PropType<boolean | { delay?: number }>,\n    default: (): boolean | { delay?: number } => false,\n  },\n  // // disabled: propTypes.looseBool,\n  ghost: propTypes.looseBool,\n  block: propTypes.looseBool,\n  danger: propTypes.looseBool,\n  icon: propTypes.VNodeChild,\n  href: propTypes.string,\n  target: propTypes.string,\n  title: propTypes.string,\n  // // onClick: {\n  // //   type: Function\n  // // }\n\n  // extend\n  color: { type: String, validator: (v: any) => ['error', 'warning', 'success', ''].includes(v) },\n  // loading: { type: Boolean },\n  disabled: { type: Boolean },\n  /**\n   * Text before icon.\n   */\n  preIcon: { type: String },\n  preIconColor: { type: String },\n  /**\n   * Text after icon.\n   */\n  postIcon: { type: String },\n  postIconColor: { type: String },\n  /**\n   * preIcon and postIcon icon size.\n   * @default: 14\n   */\n  iconSize: { type: Number, default: 14 },\n  onClick: { type: Function as PropType<(...args: any[]) => any>, default: null },\n  permission: { type: String },\n  permissionCode: { type: Number },\n  usePermission: {\n    type: Object as PropType<{\n      code: string\n      ref: any\n      row?: any\n    }>,\n  },\n  ifShow: { type: Boolean, default: true },\n}\n\nexport declare type ButtonProps = Partial<ExtractPropTypes<typeof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