{"version":3,"file":"index.cjs","names":["Radio"],"sources":["../../../src/components/RadioItem/RadioItem.tsx"],"sourcesContent":["import * as Radio from \"@radix-ui/react-radio-group\";\nimport clsx from \"clsx\";\nimport { CSSProperties, forwardRef, ReactNode, useId } from \"react\";\n\nexport interface RadioItemProps {\n  label?: ReactNode;\n  description?: ReactNode;\n  className?: string;\n  style?: CSSProperties;\n  disabled?: boolean;\n  required?: boolean;\n  value: string;\n}\n\nconst RadioItem = forwardRef<HTMLButtonElement, RadioItemProps>((props, ref) => {\n  const { label, description, className, style, disabled, required, value } = props;\n  const id = useId();\n  return (\n    <label htmlFor={id} className=\"openui-radio-item-container\">\n      <Radio.Item\n        ref={ref}\n        id={id}\n        className={clsx(\"openui-radio-item-root\", className)}\n        value={value}\n        disabled={disabled}\n        required={required}\n        style={style}\n      >\n        <svg\n          width={16}\n          height={16}\n          fill=\"none\"\n          viewBox=\"0 0 16 16\"\n          className=\"openui-radio-item-svg\"\n        >\n          <path // This is the circle that is filled between the border and the circle\n            fill=\"currentColor\"\n            d=\"M1 8a7 7 0 1 1 14 0A7 7 0 0 1 1 8Z\"\n            className=\"openui-radio-item-svg-path\"\n          />\n          <path // This is the border\n            stroke=\"currentColor\"\n            d=\"M1.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z\"\n            className=\"openui-radio-item-svg-border\"\n          />\n          <path // This is the inner circle\n            fill=\"currentColor\"\n            d=\"M4 8a4 4 0 1 1 8 0 4 4 0 0 1-8 0Z\"\n            className=\"openui-radio-item-svg-inner\"\n          />\n        </svg>\n      </Radio.Item>\n      <div className=\"openui-radio-item-content\">\n        {label && (\n          <label htmlFor={id} className=\"openui-radio-item-label\">\n            {label}\n          </label>\n        )}\n        {description && <p className=\"openui-radio-item-description\">{description}</p>}\n      </div>\n    </label>\n  );\n});\n\nRadioItem.displayName = \"RadioItem\";\n\nexport { RadioItem };\n"],"mappings":";;;;;;;;;AAcA,MAAM,aAAA,GAAA,MAAA,aAA2D,OAAO,QAAQ;CAC9E,MAAM,EAAE,OAAO,aAAa,WAAW,OAAO,UAAU,UAAU,UAAU;CAC5E,MAAM,MAAA,GAAA,MAAA,QAAY;AAClB,QACE,iBAAA,GAAA,kBAAA,MAAC,SAAD;EAAO,SAAS;EAAI,WAAU;YAA9B,CACE,iBAAA,GAAA,kBAAA,KAACA,4BAAM,MAAP;GACO;GACD;GACJ,YAAA,GAAA,KAAA,SAAgB,0BAA0B,UAAU;GAC7C;GACG;GACA;GACH;aAEP,iBAAA,GAAA,kBAAA,MAAC,OAAD;IACE,OAAO;IACP,QAAQ;IACR,MAAK;IACL,SAAQ;IACR,WAAU;cALZ;KAOE,iBAAA,GAAA,kBAAA,KAAC,QAAD;MACE,MAAK;MACL,GAAE;MACF,WAAU;MACV,CAAA;KACF,iBAAA,GAAA,kBAAA,KAAC,QAAD;MACE,QAAO;MACP,GAAE;MACF,WAAU;MACV,CAAA;KACF,iBAAA,GAAA,kBAAA,KAAC,QAAD;MACE,MAAK;MACL,GAAE;MACF,WAAU;MACV,CAAA;KACE;;GACK,CAAA,EACb,iBAAA,GAAA,kBAAA,MAAC,OAAD;GAAK,WAAU;aAAf,CACG,SACC,iBAAA,GAAA,kBAAA,KAAC,SAAD;IAAO,SAAS;IAAI,WAAU;cAC3B;IACK,CAAA,EAET,eAAe,iBAAA,GAAA,kBAAA,KAAC,KAAD;IAAG,WAAU;cAAiC;IAAgB,CAAA,CAC1E;KACA;;EAEV;AAEF,UAAU,cAAc"}