{"version":3,"file":"radio-group.mjs","sources":["../../../../../../../packages/components/radio/src/radio-group.ts"],"sourcesContent":["import { buildProps, definePropType } from '@hd-front-end/utils'\nimport { useAriaProps, useSizeProp } from '@hd-front-end/hooks'\nimport { radioEmits } from './radio'\n\nimport type { RadioPropsPublic } from './radio'\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\nimport type RadioGroup from './radio-group.vue'\n\nexport const radioGroupProps = buildProps({\n  /**\n   * @description native `id` attribute\n   */\n  id: {\n    type: String,\n    default: undefined,\n  },\n  /**\n   * @description the size of radio buttons or bordered radios\n   */\n  size: useSizeProp,\n  /**\n   * @description whether the nesting radios are disabled\n   */\n  disabled: Boolean,\n  /**\n   * @description binding value\n   */\n  modelValue: {\n    type: [String, Number, Boolean],\n    default: undefined,\n  },\n  /**\n   * @description border and background color when button is active\n   */\n  fill: {\n    type: String,\n    default: '',\n  },\n  /**\n   * @description font color when button is active\n   */\n  textColor: {\n    type: String,\n    default: '',\n  },\n  /**\n   * @description native `name` attribute\n   */\n  name: {\n    type: String,\n    default: undefined,\n  },\n  /**\n   * @description whether to trigger form validation\n   */\n  validateEvent: {\n    type: Boolean,\n    default: true,\n  },\n  options: {\n    type: definePropType<radioOption[]>(Array),\n  },\n  props: {\n    type: definePropType<radioOptionProp>(Object),\n    default: () => radioDefaultProps,\n  },\n  ...useAriaProps(['ariaLabel']),\n} as const)\nexport type RadioGroupProps = ExtractPropTypes<typeof radioGroupProps>\nexport type RadioGroupPropsPublic = __ExtractPublicPropTypes<\n  typeof radioGroupProps\n>\n\nexport const radioGroupEmits = radioEmits\nexport type RadioGroupEmits = typeof radioGroupEmits\nexport type RadioGroupInstance = InstanceType<typeof RadioGroup> & unknown\n\nexport type radioOption = RadioPropsPublic & Record<string, any>\n\nexport const radioDefaultProps: Required<radioOptionProp> = {\n  label: 'label',\n  value: 'value',\n  disabled: 'disabled',\n}\nexport type radioOptionProp = {\n  value?: string\n  label?: string\n  disabled?: string\n}\n"],"names":[],"mappings":";;;;;AAQO,MAAM,kBAAkB,UAAW,CAAA;AAAA,EAIxC,EAAI,EAAA;AAAA,IACF,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,KAAA,CAAA;AAAA,GACX;AAAA,EAIA,IAAM,EAAA,WAAA;AAAA,EAIN,QAAU,EAAA,OAAA;AAAA,EAIV,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,CAAC,MAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA,IAC9B,OAAS,EAAA,KAAA,CAAA;AAAA,GACX;AAAA,EAIA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,SAAW,EAAA;AAAA,IACT,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,KAAA,CAAA;AAAA,GACX;AAAA,EAIA,aAAe,EAAA;AAAA,IACb,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EACA,OAAS,EAAA;AAAA,IACP,IAAA,EAAM,eAA8B,KAAK,CAAA;AAAA,GAC3C;AAAA,EACA,KAAO,EAAA;AAAA,IACL,IAAA,EAAM,eAAgC,MAAM,CAAA;AAAA,IAC5C,SAAS,MAAM,iBAAA;AAAA,GACjB;AAAA,EACA,GAAG,YAAA,CAAa,CAAC,WAAW,CAAC,CAAA;AAC/B,CAAU,EAAA;AAMH,MAAM,eAAkB,GAAA,WAAA;AAMxB,MAAM,iBAA+C,GAAA;AAAA,EAC1D,KAAO,EAAA,OAAA;AAAA,EACP,KAAO,EAAA,OAAA;AAAA,EACP,QAAU,EAAA,UAAA;AACZ;;;;"}