@guruhotel/aura-ui
Version:
⚛️ React UI library by GuruHotel
1 lines • 1.89 kB
JavaScript
exports.__esModule=!0,exports.StyledRadioGroup=exports.StyledRadio=exports.StyledIndicator=exports.RadioGroupItem=exports.RadioGroupIndicator=void 0;var e=require("../theme"),t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in e)if("default"!==d&&Object.prototype.hasOwnProperty.call(e,d)){var n=a?Object.getOwnPropertyDescriptor(e,d):null;n&&(n.get||n.set)?Object.defineProperty(i,d,n):i[d]=e[d]}i.default=e,o&&o.set(e,i);return i}(require("@radix-ui/react-radio-group"));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const o=(0,e.styled)(t.Item,{all:"unset",backgroundColor:"$guru9",borderRadius:"100%",border:"solid",borderWidth:"2px",borderColor:"$guru9",transition:".2s ease",_disabled:{opacity:.5,cursor:"no-drop"},'&[data-state="unchecked"]':{backgroundColor:"$surfaceLight"},"&:hover":{backgroundColor:"$guru4",'&[data-state="checked"]':{backgroundColor:"$guru9"}},_focusVisible:{boxShadow:"0 0 0 1px $colors$surfaceLight, 0 0 0 3px $colors$guru12"}});exports.StyledRadio=o;const i=(0,e.styled)(t.Indicator,{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",position:"relative","&::after":{content:'""',display:"block",padding:"25%",borderRadius:"50%",backgroundColor:"$surfaceLight"}});exports.StyledIndicator=i;const a=(0,e.styled)(t.Root,{variants:{size:{xs:{[`& ${o}`]:{width:16,height:16}},sm:{[`& ${o}`]:{width:20,height:20}},md:{[`& ${o}`]:{width:24,height:24}},lg:{[`& ${o}`]:{width:28,height:28}},xl:{[`& ${o}`]:{width:32,height:32}}}},defaultVariants:{size:"sm"}});exports.StyledRadioGroup=a;const d=o;exports.RadioGroupItem=d;const n=i;exports.RadioGroupIndicator=n;