UNPKG

@guruhotel/aura-ui

Version:

⚛️ React UI library by GuruHotel

1 lines 6.02 kB
exports.__esModule=!0,exports.StyledToggleGroup=exports.StyledItem=void 0;var o=require("../theme"),r=function(o,r){if(!r&&o&&o.__esModule)return o;if(null===o||"object"!=typeof o&&"function"!=typeof o)return{default:o};var e=t(r);if(e&&e.has(o))return e.get(o);var d={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in o)if("default"!==i&&Object.prototype.hasOwnProperty.call(o,i)){var l=a?Object.getOwnPropertyDescriptor(o,i):null;l&&(l.get||l.set)?Object.defineProperty(d,i,l):d[i]=o[i]}d.default=o,e&&e.set(o,d);return d}(require("@radix-ui/react-toggle-group"));function t(o){if("function"!=typeof WeakMap)return null;var r=new WeakMap,e=new WeakMap;return(t=function(o){return o?e:r})(o)}const e=(0,o.styled)(r.Item,{all:"unset",display:"flex",alignItems:"center",justifyContent:"center",_focusVisible:{position:"relative",boxShadow:"0 0 0 2px black"}});exports.StyledItem=e;const d=(0,o.styled)(r.Root,{display:"inline-flex",backgroundColor:"$text6",variants:{rounded:{none:{rounded:"$none",[`& ${e}`]:{"&:first-child":{marginLeft:0,borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:last-child":{borderTopRightRadius:0,borderBottomRightRadius:0}}},xs:{rounded:"$xs",[`& ${e}`]:{"&:first-child":{marginLeft:0,borderTopLeftRadius:"$xs",borderBottomLeftRadius:"$xs"},"&:last-child":{borderTopRightRadius:"$xs",borderBottomRightRadius:"$xs"}}},sm:{rounded:"$sm",[`& ${e}`]:{"&:first-child":{marginLeft:0,borderTopLeftRadius:"$sm",borderBottomLeftRadius:"$sm"},"&:last-child":{borderTopRightRadius:"$sm",borderBottomRightRadius:"$sm"}}},md:{rounded:"$md",[`& ${e}`]:{"&:first-child":{marginLeft:0,borderTopLeftRadius:"$md",borderBottomLeftRadius:"$md"},"&:last-child":{borderTopRightRadius:"$md",borderBottomRightRadius:"$md"}}},lg:{rounded:"$lg",[`& ${e}`]:{"&:first-child":{marginLeft:0,borderTopLeftRadius:"$lg",borderBottomLeftRadius:"$lg"},"&:last-child":{borderTopRightRadius:"$lg",borderBottomRightRadius:"$lg"}}},xl:{rounded:"$xl",[`& ${e}`]:{"&:first-child":{marginLeft:0,borderTopLeftRadius:"$xl",borderBottomLeftRadius:"$xl"},"&:last-child":{borderTopRightRadius:"$xl",borderBottomRightRadius:"$xl"}}},"2xl":{rounded:"$2xl",[`& ${e}`]:{"&:first-child":{marginLeft:0,borderTopLeftRadius:"$2xl",borderBottomLeftRadius:"$2xl"},"&:last-child":{borderTopRightRadius:"$2xl",borderBottomRightRadius:"$2xl"}}},"3xl":{rounded:"$3xl",[`& ${e}`]:{"&:first-child":{marginLeft:0,borderTopLeftRadius:"$3xl",borderBottomLeftRadius:"$3xl"},"&:last-child":{borderTopRightRadius:"$3xl",borderBottomRightRadius:"$3xl"}}},full:{rounded:"$full",[`& ${e}`]:{"&:first-child":{marginLeft:0,borderTopLeftRadius:"$full",borderBottomLeftRadius:"$full"},"&:last-child":{borderTopRightRadius:"$full",borderBottomRightRadius:"$full"}}},base:{rounded:"$base",[`& ${e}`]:{"&:first-child":{marginLeft:0,borderTopLeftRadius:"$base",borderBottomLeftRadius:"$base"},"&:last-child":{borderTopRightRadius:"$base",borderBottomRightRadius:"$base"}}},halfBase:{rounded:"$halfBase",[`& ${e}`]:{"&:first-child":{marginLeft:0,borderTopLeftRadius:"$halfBase",borderBottomLeftRadius:"$halfBase"},"&:last-child":{borderTopRightRadius:"$halfBase",borderBottomRightRadius:"$halfBase"}}}},size:{xs:{[`& ${e}`]:{fontSize:"$xs",height:"$6",paddingInlineStart:"$3",paddingInlineEnd:"$3"}},sm:{[`& ${e}`]:{fontSize:"$sm",height:"$8",paddingInlineStart:"$4",paddingInlineEnd:"$4"}},md:{[`& ${e}`]:{fontSize:"$md",height:"$10",paddingInlineStart:"$5",paddingInlineEnd:"$5"}},lg:{[`& ${e}`]:{fontSize:"$lg",height:"$12",paddingInlineStart:"$6",paddingInlineEnd:"$6"}},xl:{[`& ${e}`]:{fontSize:"$xl",height:"$14",paddingInlineStart:"$8",paddingInlineEnd:"$8"}}},colorScheme:{text:{[`& ${e}`]:{backgroundColor:"$text3",color:"$text11","&:hover":{backgroundColor:"$text4"},"&[data-state=on]":{backgroundColor:"$text5",color:"$text11",fontWeight:"bold"}}},guru:{[`& ${e}`]:{backgroundColor:"$guru3",color:"$guru11","&:hover":{backgroundColor:"$guru4"},"&[data-state=on]":{backgroundColor:"$guru5",color:"$guru11",fontWeight:"bold"}}},fellow:{[`& ${e}`]:{backgroundColor:"$fellow3",color:"$fellow11","&:hover":{backgroundColor:"$fellow4"},"&[data-state=on]":{backgroundColor:"$fellow5",color:"$fellow11",fontWeight:"bold"}}},darkie:{[`& ${e}`]:{backgroundColor:"$darkie3",color:"$darkie11","&:hover":{backgroundColor:"$darkie4"},"&[data-state=on]":{backgroundColor:"$darkie5",color:"$darkie11",fontWeight:"bold"}}},red:{[`& ${e}`]:{backgroundColor:"$red3",color:"$red11","&:hover":{backgroundColor:"$red4"},"&[data-state=on]":{backgroundColor:"$red5",color:"$red11",fontWeight:"bold"}}},nature:{[`& ${e}`]:{backgroundColor:"$nature3",color:"$nature11","&:hover":{backgroundColor:"$nature4"},"&[data-state=on]":{backgroundColor:"$nature5",color:"$nature11",fontWeight:"bold"}}},sunshine:{[`& ${e}`]:{backgroundColor:"$sunshine3",color:"$sunshine11","&:hover":{backgroundColor:"$sunshine4"},"&[data-state=on]":{backgroundColor:"$sunshine5",color:"$sunshine11",fontWeight:"bold"}}},violet:{[`& ${e}`]:{backgroundColor:"$violet3",color:"$violet11","&:hover":{backgroundColor:"$violet4"},"&[data-state=on]":{backgroundColor:"$violet5",color:"$violet11",fontWeight:"bold"}}},gray:{[`& ${e}`]:{backgroundColor:"$gray3",color:"$gray11","&:hover":{backgroundColor:"$gray4"},"&[data-state=on]":{backgroundColor:"$gray5",color:"$gray11",fontWeight:"bold"}}},primary:{[`& ${e}`]:{backgroundColor:"$primary3",color:"$primary11","&:hover":{backgroundColor:"$primary4"},"&[data-state=on]":{backgroundColor:"$primary5",color:"$primary11",fontWeight:"bold"}}},secondary:{[`& ${e}`]:{backgroundColor:"$secondary3",color:"$secondary11","&:hover":{backgroundColor:"$secondary4"},"&[data-state=on]":{backgroundColor:"$secondary5",color:"$secondary11",fontWeight:"bold"}}},utilitary:{[`& ${e}`]:{backgroundColor:"$utilitary3",color:"$utilitary11","&:hover":{backgroundColor:"$utilitary4"},"&[data-state=on]":{backgroundColor:"$utilitary5",color:"$utilitary11",fontWeight:"bold"}}}}},defaultVariants:{rounded:"md",colorScheme:"guru",size:"md"}});exports.StyledToggleGroup=d;