{"version":3,"file":"button.mjs","sources":["../../../../../../packages/components/button/src/button.ts"],"sourcesContent":["import { useSizeProp } from '@sgui-plus/hooks'\r\nimport { buildProps, definePropType } from '@sgui-plus/utils/props'\r\nimport { Loading } from '@sgui-plus/icons-vue'\r\nimport type { ExtractPropTypes, Component } from 'vue'\r\nimport type button from './button.vue'\r\n\r\nexport const buttonType = [\r\n  'default',\r\n  'primary',\r\n  'success',\r\n  'warning',\r\n  'info',\r\n  'danger',\r\n  'text',\r\n  '',\r\n] as const\r\nexport const buttonNativeType = ['button', 'submit', 'reset'] as const\r\n\r\nexport const buttonProps = buildProps({\r\n  size: useSizeProp,\r\n  disabled: Boolean,\r\n  type: {\r\n    type: String,\r\n    values: buttonType,\r\n    default: '',\r\n  },\r\n  icon: {\r\n    type: definePropType<string | Component>([String, Object]),\r\n    default: '',\r\n  },\r\n  nativeType: {\r\n    type: String,\r\n    values: buttonNativeType,\r\n    default: 'button',\r\n  },\r\n  loading: Boolean,\r\n  loadingIcon: {\r\n    type: definePropType<string | Component>([String, Object]),\r\n    default: () => Loading,\r\n  },\r\n  plain: Boolean,\r\n  outline: Boolean,\r\n  text: Boolean,\r\n  round: Boolean,\r\n  circle: Boolean,\r\n  color: String,\r\n  block: Boolean\r\n} as const)\r\n\r\nexport const buttonEmits = {\r\n  click: (evt: MouseEvent) => evt instanceof MouseEvent,\r\n}\r\n\r\nexport type ButtonProps = ExtractPropTypes<typeof buttonProps>\r\nexport type ButtonEmits = typeof buttonEmits\r\n\r\nexport type ButtonType = ButtonProps['type']\r\nexport type ButtonNativeType = ButtonProps['nativeType']\r\n\r\nexport type ButtonInstance = InstanceType<typeof button>\r\n"],"names":[],"mappings":";;;;;AAGY,MAAC,UAAU,GAAG;AAC1B,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,MAAM;AACR,EAAE,QAAQ;AACV,EAAE,MAAM;AACR,EAAE,EAAE;AACJ,EAAE;AACU,MAA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