{"version":3,"file":"radio.mjs","names":[],"sources":["../../../../../../packages/components/radio/src/radio.ts"],"sourcesContent":["import { buildProps, isBoolean, isNumber, isString } from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useSizeProp } from '@element-plus/hooks'\n\nimport type { ExtractPublicPropTypes } from 'vue'\nimport type { ComponentSize } from '@element-plus/constants'\nimport type Radio from './radio.vue'\n\nexport interface RadioPropsBase {\n  /**\n   * @description binding value\n   */\n  modelValue?: string | number | boolean\n  /**\n   * @description size of the Radio\n   */\n  size?: ComponentSize\n  /**\n   * @description whether Radio is disabled\n   */\n  disabled?: boolean\n  /**\n   * @description the label of Radio\n   */\n  label?: string | number | boolean\n  /**\n   * @description the value of Radio\n   */\n  value?: string | number | boolean\n  /**\n   * @description native `name` attribute\n   */\n  name?: string\n}\n\nexport interface RadioProps extends RadioPropsBase {\n  /**\n   * @description whether to add a border around Radio\n   */\n  border?: boolean\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `RadioPropsBase` instead.\n */\nexport const radioPropsBase = buildProps({\n  /**\n   * @description binding value\n   */\n  modelValue: {\n    type: [String, Number, Boolean],\n    default: undefined,\n  },\n  /**\n   * @description size of the Radio\n   */\n  size: useSizeProp,\n  /**\n   * @description whether Radio is disabled\n   */\n  disabled: {\n    type: Boolean,\n    default: undefined,\n  },\n  /**\n   * @description the label of Radio\n   */\n  label: {\n    type: [String, Number, Boolean],\n    default: undefined,\n  },\n  /**\n   * @description the value of Radio\n   */\n  value: {\n    type: [String, Number, Boolean],\n    default: undefined,\n  },\n  /**\n   * @description native `name` attribute\n   */\n  name: {\n    type: String,\n    default: undefined,\n  },\n})\n\n/**\n * @deprecated Removed after 3.0.0, Use `RadioProps` instead.\n */\nexport const radioProps = buildProps({\n  ...radioPropsBase,\n  /**\n   * @description whether to add a border around Radio\n   */\n  border: Boolean,\n} as const)\n\nexport const radioEmits = {\n  [UPDATE_MODEL_EVENT]: (val: string | number | boolean | undefined) =>\n    isString(val) || isNumber(val) || isBoolean(val),\n  [CHANGE_EVENT]: (val: string | number | boolean | undefined) =>\n    isString(val) || isNumber(val) || isBoolean(val),\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `RadioProps` instead.\n */\nexport type RadioPropsPublic = ExtractPublicPropTypes<typeof radioProps>\nexport type RadioEmits = typeof radioEmits\nexport type RadioInstance = InstanceType<typeof Radio> & unknown\n\n/**\n * @description default values for RadioProps\n */\nexport const radioPropsDefaults = {\n  modelValue: undefined,\n  disabled: undefined,\n  label: undefined,\n  value: undefined,\n  name: undefined,\n  border: false,\n} as const\n"],"mappings":";;;;;;;;;AA6CA,MAAa,iBAAiB,WAAW;CAIvC,YAAY;EACV,MAAM;GAAC;GAAQ;GAAQ;GAAQ;EAC/B,SAAS;EACV;CAID,MAAM;CAIN,UAAU;EACR,MAAM;EACN,SAAS;EACV;CAID,OAAO;EACL,MAAM;GAAC;GAAQ;GAAQ;GAAQ;EAC/B,SAAS;EACV;CAID,OAAO;EACL,MAAM;GAAC;GAAQ;GAAQ;GAAQ;EAC/B,SAAS;EACV;CAID,MAAM;EACJ,MAAM;EACN,SAAS;EACV;CACF,CAAC;;;;AAKF,MAAa,aAAa,WAAW;CACnC,GAAG;CAIH,QAAQ;CACT,CAAU;AAEX,MAAa,aAAa;EACvB,sBAAsB,QACrB,SAAS,IAAI,IAAI,SAAS,IAAI,IAAI,UAAU,IAAI;EACjD,gBAAgB,QACf,SAAS,IAAI,IAAI,SAAS,IAAI,IAAI,UAAU,IAAI;CACnD;;;;AAYD,MAAa,qBAAqB;CAChC,YAAY;CACZ,UAAU;CACV,OAAO;CACP,OAAO;CACP,MAAM;CACN,QAAQ;CACT"}