@guruhotel/aura-ui
Version:
⚛️ React UI library by GuruHotel
1 lines • 7.22 kB
JavaScript
exports.__esModule=!0,exports.SpanSeparator=exports.PopoverContent=exports.DatePickerContainer=exports.Button=void 0;var o=require("../date-field/date-field.styles"),e=require("../theme");const r=(0,e.styled)("button",{all:"unset",display:"inline-flex",alignItems:"center",justifyContent:"center",rounded:"$halfBase",_focusWithin:{"> svg path":{fill:"$surfaceLight"}},variants:{isPressed:{true:{"&:disabled":{cursor:"no-drop"}}},rounded:{none:{rounded:"$none"},xs:{rounded:"$xs"},sm:{rounded:"$xs"},md:{rounded:"$sm"},lg:{rounded:"$md"},xl:{rounded:"$lg"},"2xl":{rounded:"$xl"},"3xl":{rounded:"$2xl"},full:{rounded:"$full"},halfBase:{rounded:Math.abs(parseInt(e.theme.radii.halfBase.value.replace(/\D/g,""),10)/2)},base:{rounded:"$halfBase"}}}});exports.Button=r;const n=(0,e.styled)("div",{width:"max-content",position:"relative",display:"flex",alignItems:"center",bg:"$surfaceLight",rounded:"$base",transition:"$default",variants:{colorScheme:{text:{boxShadow:"0 0 0 1px $colors$gray7",_hover:{boxShadow:"0 0 0 1px $colors$gray9"},_focusWithin:{boxShadow:"0 0 0 2px $colors$text9",_hover:{boxShadow:"0 0 0 2px $colors$text9"}},[`& ${o.SegmentContainer}`]:{_focus:{bg:"$text11",color:"$surfaceLight"}},[`& ${r}`]:{_focusWithin:{bg:"$text11"}}},guru:{boxShadow:"0 0 0 1px $colors$gray7",_hover:{boxShadow:"0 0 0 1px $colors$gray9"},_focusWithin:{boxShadow:"0 0 0 2px $colors$guru9",_hover:{boxShadow:"0 0 0 2px $colors$guru9"}},[`& ${o.SegmentContainer}`]:{_focus:{bg:"$guru11",color:"$surfaceLight"}},[`& ${r}`]:{_focusWithin:{bg:"$guru11"}}},fellow:{boxShadow:"0 0 0 1px $colors$gray7",_hover:{boxShadow:"0 0 0 1px $colors$gray9"},_focusWithin:{boxShadow:"0 0 0 2px $colors$fellow9",_hover:{boxShadow:"0 0 0 2px $colors$fellow9"}},[`& ${o.SegmentContainer}`]:{_focus:{bg:"$fellow11",color:"$surfaceLight"}},[`& ${r}`]:{_focusWithin:{bg:"$fellow11"}}},darkie:{boxShadow:"0 0 0 1px $colors$gray7",_hover:{boxShadow:"0 0 0 1px $colors$gray9"},_focusWithin:{boxShadow:"0 0 0 2px $colors$darkie9",_hover:{boxShadow:"0 0 0 2px $colors$darkie9"}},[`& ${o.SegmentContainer}`]:{_focus:{bg:"$darkie11",color:"$surfaceLight"}},[`& ${r}`]:{_focusWithin:{bg:"$darkie11"}}},red:{boxShadow:"0 0 0 1px $colors$gray7",_hover:{boxShadow:"0 0 0 1px $colors$gray9"},_focusWithin:{boxShadow:"0 0 0 2px $colors$red9",_hover:{boxShadow:"0 0 0 2px $colors$red9"}},[`& ${o.SegmentContainer}`]:{_focus:{bg:"$red11",color:"$surfaceLight"}},[`& ${r}`]:{_focusWithin:{bg:"$red11"}}},nature:{boxShadow:"0 0 0 1px $colors$gray7",_hover:{boxShadow:"0 0 0 1px $colors$gray9"},_focusWithin:{boxShadow:"0 0 0 2px $colors$nature9",_hover:{boxShadow:"0 0 0 2px $colors$nature9"}},[`& ${o.SegmentContainer}`]:{_focus:{bg:"$nature11",color:"$surfaceLight"}},[`& ${r}`]:{_focusWithin:{bg:"$nature11"}}},sunshine:{boxShadow:"0 0 0 1px $colors$gray7",_hover:{boxShadow:"0 0 0 1px $colors$gray9"},_focusWithin:{boxShadow:"0 0 0 2px $colors$sunshine10",_hover:{boxShadow:"0 0 0 2px $colors$sunshine10"}},[`& ${o.SegmentContainer}`]:{_focus:{bg:"$sunshine11",color:"$surfaceLight"}},[`& ${r}`]:{_focusWithin:{bg:"$sunshine11"}}},violet:{boxShadow:"0 0 0 1px $colors$gray7",_hover:{boxShadow:"0 0 0 1px $colors$gray9"},_focusWithin:{boxShadow:"0 0 0 2px $colors$violet9",_hover:{boxShadow:"0 0 0 2px $colors$violet9"}},[`& ${o.SegmentContainer}`]:{_focus:{bg:"$violet11",color:"$surfaceLight"}},[`& ${r}`]:{_focusWithin:{bg:"$violet11"}}},gray:{boxShadow:"0 0 0 1px $colors$gray7",_hover:{boxShadow:"0 0 0 1px $colors$gray9"},_focusWithin:{boxShadow:"0 0 0 2px $colors$gray9",_hover:{boxShadow:"0 0 0 2px $colors$gray9"}},[`& ${o.SegmentContainer}`]:{_focus:{bg:"$gray11",color:"$surfaceLight"}},[`& ${r}`]:{_focusWithin:{bg:"$gray11"}}},primary:{boxShadow:"0 0 0 1px $colors$gray7",_hover:{boxShadow:"0 0 0 1px $colors$gray9"},_focusWithin:{boxShadow:"0 0 0 2px $colors$primary9",_hover:{boxShadow:"0 0 0 2px $colors$primary9"}},[`& ${o.SegmentContainer}`]:{_focus:{bg:"$primary11",color:"$surfaceLight"}},[`& ${r}`]:{_focusWithin:{bg:"$primary11"}}},secondary:{boxShadow:"0 0 0 1px $colors$gray7",_hover:{boxShadow:"0 0 0 1px $colors$gray9"},_focusWithin:{boxShadow:"0 0 0 2px $colors$secondary9",_hover:{boxShadow:"0 0 0 2px $colors$secondary9"}},[`& ${o.SegmentContainer}`]:{_focus:{bg:"$secondary11",color:"$surfaceLight"}},[`& ${r}`]:{_focusWithin:{bg:"$secondary11"}}},utilitary:{boxShadow:"0 0 0 1px $colors$gray7",_hover:{boxShadow:"0 0 0 1px $colors$gray9"},_focusWithin:{boxShadow:"0 0 0 2px $colors$utilitary9",_hover:{boxShadow:"0 0 0 2px $colors$utilitary9"}},[`& ${o.SegmentContainer}`]:{_focus:{bg:"$utilitary11",color:"$surfaceLight"}},[`& ${r}`]:{_focusWithin:{bg:"$utilitary11"}}},unstyled:{boxShadow:"$none"}},size:{xs:{fontSize:"$xs",height:"$6",paddingInlineStart:"$1",paddingInlineEnd:"$1",[`& ${o.DateFieldElements}`]:{fontSize:"$xs",px:"$1",backgroundColor:"transparent"},[`& ${o.SegmentContainer}`]:{px:"$1"},[`& ${r}`]:{py:4,paddingInlineStart:"$1",paddingInlineEnd:"$1",mr:4}},sm:{fontSize:"$sm",height:"$8",paddingInlineStart:"$1",paddingInlineEnd:"$1",[`& ${o.DateFieldElements}`]:{fontSize:"$sm",px:6,backgroundColor:"transparent"},[`& ${o.SegmentContainer}`]:{px:"$1",py:4},[`& ${r}`]:{py:5,paddingInlineStart:"$2",paddingInlineEnd:"$2",mr:6}},md:{height:"$10",fontSize:"$md",paddingInlineStart:"$1",paddingInlineEnd:"$1",[`& ${o.DateFieldElements}`]:{fontSize:"$md",px:"$2",backgroundColor:"transparent"},[`& ${o.SegmentContainer}`]:{px:"$1",py:6},[`& ${r}`]:{py:6,paddingInlineStart:"$2",paddingInlineEnd:"$2",mr:8}},lg:{height:"$12",fontSize:"$lg",paddingInlineStart:"$1",paddingInlineEnd:"$1",[`& ${o.DateFieldElements}`]:{fontSize:"$lg",px:"$2",backgroundColor:"transparent"},[`& ${o.SegmentContainer}`]:{px:"$1",py:8},[`& ${r}`]:{py:10,paddingInlineStart:"$2",paddingInlineEnd:"$2",mr:8}},xl:{height:"$14",fontSize:"$xl",paddingInlineStart:"$3",paddingInlineEnd:"$3",[`& ${o.DateFieldElements}`]:{fontSize:"$xl",px:"$2",backgroundColor:"transparent"},[`& ${o.SegmentContainer}`]:{px:"$1",py:10},[`& ${r}`]:{py:12,paddingInlineStart:"$3",paddingInlineEnd:"$3",mr:2}}},rounded:{none:{rounded:"$none",[`& ${r}`]:{rounded:"$none"}},xs:{rounded:"$xs",[`& ${r}`]:{rounded:"$xs"}},sm:{rounded:"$sm",[`& ${r}`]:{rounded:"$sm"}},md:{rounded:"$md",[`& ${r}`]:{rounded:"$md"}},lg:{rounded:"$lg",[`& ${r}`]:{rounded:"$lg"}},xl:{rounded:"$xl",[`& ${r}`]:{rounded:"$xl"}},"2xl":{rounded:"$2xl",[`& ${r}`]:{rounded:"$2x"}},"3xl":{rounded:"$3xl",[`& ${r}`]:{rounded:"$3x"}},full:{rounded:"$full",[`& ${r}`]:{rounded:"$fu"}},base:{rounded:"$base",[`& ${r}`]:{rounded:"$ba"}},halfBase:{rounded:"$halfBase",[`& ${r}`]:{rounded:"$ha"}}}}});exports.DatePickerContainer=n;const $=(0,e.styled)("span",{px:"$2"});exports.SpanSeparator=$;const d=(0,e.styled)("div",{position:"absolute",top:"100%",left:0,mt:"$2",bg:"$surfaceLight",border:"1px solid $colors$gray7",rounded:"$base",zIndex:"$docked",variants:{isDatePicker:{true:{width:"$full"}},rounded:{none:{rounded:"$none"},xs:{rounded:"$xs"},sm:{rounded:"$sm"},md:{rounded:"$md"},lg:{rounded:"$lg"},xl:{rounded:"$xl"},"2xl":{rounded:"$2xl"},"3xl":{rounded:"$3xl"},full:{rounded:"$full"},base:{rounded:"$base"},halfBase:{rounded:"$halfBase"}}},defaultVariants:{isDatePicker:!1}});exports.PopoverContent=d;