You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
5.7 KiB
1 lines
5.7 KiB
{"ast":null,"code":"import { Loading } from '@element-plus/icons-vue';\nimport { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';\nimport { useSizeProp } from '../../../hooks/use-size/index.mjs';\nimport { iconPropType } from '../../../utils/vue/icon.mjs';\nconst buttonTypes = [\"default\", \"primary\", \"success\", \"warning\", \"info\", \"danger\", \"text\", \"\"];\nconst buttonNativeTypes = [\"button\", \"submit\", \"reset\"];\nconst buttonProps = buildProps({\n size: useSizeProp,\n disabled: Boolean,\n type: {\n type: String,\n values: buttonTypes,\n default: \"\"\n },\n icon: {\n type: iconPropType\n },\n nativeType: {\n type: String,\n values: buttonNativeTypes,\n default: \"button\"\n },\n loading: Boolean,\n loadingIcon: {\n type: iconPropType,\n default: () => Loading\n },\n plain: Boolean,\n text: Boolean,\n link: Boolean,\n bg: Boolean,\n autofocus: Boolean,\n round: Boolean,\n circle: Boolean,\n color: String,\n dark: Boolean,\n autoInsertSpace: {\n type: Boolean,\n default: void 0\n },\n tag: {\n type: definePropType([String, Object]),\n default: \"button\"\n }\n});\nconst buttonEmits = {\n click: evt => evt instanceof MouseEvent\n};\nexport { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes };","map":{"version":3,"names":["buttonTypes","buttonNativeTypes","buttonProps","buildProps","size","useSizeProp","disabled","Boolean","type","String","values","default","icon","iconPropType","nativeType","loading","loadingIcon","Loading","plain","text","link","bg","autofocus","round","circle","color","dark","autoInsertSpace","tag","definePropType","Object","buttonEmits","click","evt","MouseEvent"],"sources":["../../../../../../packages/components/button/src/button.ts"],"sourcesContent":["import { useSizeProp } from '@element-plus/hooks'\nimport { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { Loading } from '@element-plus/icons-vue'\nimport type { Component, ExtractPropTypes } from 'vue'\n\nexport const buttonTypes = [\n 'default',\n 'primary',\n 'success',\n 'warning',\n 'info',\n 'danger',\n /**\n * @deprecated\n * Text type will be deprecated in the next major version (3.0.0)\n */\n 'text',\n '',\n] as const\nexport const buttonNativeTypes = ['button', 'submit', 'reset'] as const\n\nexport const buttonProps = buildProps({\n /**\n * @description button size\n */\n size: useSizeProp,\n /**\n * @description disable the button\n */\n disabled: Boolean,\n /**\n * @description button type\n */\n type: {\n type: String,\n values: buttonTypes,\n default: '',\n },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description native button type\n */\n nativeType: {\n type: String,\n values: buttonNativeTypes,\n default: 'button',\n },\n /**\n * @description determine whether it's loading\n */\n loading: Boolean,\n /**\n * @description customize loading icon component\n */\n loadingIcon: {\n type: iconPropType,\n default: () => Loading,\n },\n /**\n * @description determine whether it's a plain button\n */\n plain: Boolean,\n /**\n * @description determine whether it's a text button\n */\n text: Boolean,\n /**\n * @description determine whether it's a link button\n */\n link: Boolean,\n /**\n * @description determine whether the text button background color is always on\n */\n bg: Boolean,\n /**\n * @description native button autofocus\n */\n autofocus: Boolean,\n /**\n * @description determine whether it's a round button\n */\n round: Boolean,\n /**\n * @description determine whether it's a circle button\n */\n circle: Boolean,\n /**\n * @description custom button color, automatically calculate `hover` and `active` color\n */\n color: String,\n /**\n * @description dark mode, which automatically converts `color` to dark mode colors\n */\n dark: Boolean,\n /**\n * @description automatically insert a space between two chinese characters\n */\n autoInsertSpace: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description custom element tag\n */\n tag: {\n type: definePropType<string | Component>([String, Object]),\n default: 'button',\n },\n} as const)\nexport const buttonEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\n\nexport type ButtonProps = ExtractPropTypes<typeof buttonProps>\nexport type ButtonEmits = typeof buttonEmits\n\nexport type ButtonType = ButtonProps['type']\nexport type ButtonNativeType = ButtonProps['nativeType']\n\nexport interface ButtonConfigContext {\n autoInsertSpace?: boolean\n}\n"],"mappings":";;;;AAGY,MAACA,WAAW,GAAG,CACzB,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,MAAM,EACN,QAAQ,EACR,MAAM,EACN,EAAE,CACJ;AACY,MAACC,iBAAiB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO;AACjD,MAACC,WAAW,GAAGC,UAAU,CAAC;EACpCC,IAAI,EAAEC,WAAW;EACjBC,QAAQ,EAAEC,OAAO;EACjBC,IAAI,EAAE;IACJA,IAAI,EAAEC,MAAM;IACZC,MAAM,EAAEV,WAAW;IACnBW,OAAO,EAAE;EACb,CAAG;EACDC,IAAI,EAAE;IACJJ,IAAI,EAAEK;EACV,CAAG;EACDC,UAAU,EAAE;IACVN,IAAI,EAAEC,MAAM;IACZC,MAAM,EAAET,iBAAiB;IACzBU,OAAO,EAAE;EACb,CAAG;EACDI,OAAO,EAAER,OAAO;EAChBS,WAAW,EAAE;IACXR,IAAI,EAAEK,YAAY;IAClBF,OAAO,EAAEA,CAAA,KAAMM;EACnB,CAAG;EACDC,KAAK,EAAEX,OAAO;EACdY,IAAI,EAAEZ,OAAO;EACba,IAAI,EAAEb,OAAO;EACbc,EAAE,EAAEd,OAAO;EACXe,SAAS,EAAEf,OAAO;EAClBgB,KAAK,EAAEhB,OAAO;EACdiB,MAAM,EAAEjB,OAAO;EACfkB,KAAK,EAAEhB,MAAM;EACbiB,IAAI,EAAEnB,OAAO;EACboB,eAAe,EAAE;IACfnB,IAAI,EAAED,OAAO;IACbI,OAAO,EAAE,KAAK;EAClB,CAAG;EACDiB,GAAG,EAAE;IACHpB,IAAI,EAAEqB,cAAc,CAAC,CAACpB,MAAM,EAAEqB,MAAM,CAAC,CAAC;IACtCnB,OAAO,EAAE;EACb;AACA,CAAC;AACW,MAACoB,WAAW,GAAG;EACzBC,KAAK,EAAGC,GAAG,IAAKA,GAAG,YAAYC;AACjC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|