{"version":3,"file":"refine-ui34.cjs","sources":["../lib/components/Button/Button.variants.ts"],"sourcesContent":["import { cva, VariantProps } from 'class-variance-authority';\r\nimport { twMerge } from 'tailwind-merge';\r\n\r\nconst buttonVariantsCva = cva(\r\n  'inline-flex justify-center items-center rounded-md transition-colors font-semibold w-fit',\r\n  {\r\n    variants: {\r\n      size: {\r\n        sm: ' px-lg py-md text-sm gap-xs',\r\n        md: ' px-3.5 py-2.5 text-sm gap-xs',\r\n        lg: ' px-lg py-2.5 text-base gap-sm',\r\n        xl: ' px-[1.125rem] py-lg text-base gap-sm',\r\n        '2xl': ' px-[1.375rem] py-xl text-lg gap-[0.625rem]',\r\n      },\r\n      hierarchy: {\r\n        primary:\r\n          'shadow-xs bg-brand-solid text-white hover:bg-brand-solid-hover focus-visible:focus-ring-brand-shadow-xs ',\r\n        error:\r\n          'shadow-xs bg-error-600 text-white hover:bg-error-700 focus-visible:focus-ring-error-shadow-xs ',\r\n        secondaryGray:\r\n          'shadow-xs bg-white text-grayLight-700 border border-primary hover:bg-grayLight-50 hover:text-grayLight-800 focus-visible:focus-ring-gray-shadow-xs',\r\n        secondaryColor:\r\n          'shadow-xs bg-white text-brand-700 border border-brand hover:bg-brand-50 hover:text-brand-800 focus-visible:focus-ring-brand-shadow-xs',\r\n        tertiaryGray:\r\n          ' text-grayLight-600 hover:text-grayLight-700 hover:bg-grayLight-50 focus-visible:focus-ring-gray-shadow-xs',\r\n        tertiaryColor:\r\n          'text-brand-700 hover:text-brand-800 hover:bg-brand-50 focus-visible:focus-ring-brand-shadow-xs',\r\n        linkGray:\r\n          'text-grayLight-600 hover:text-grayLight-700 focus-visible:focus-ring-gray-shadow-xs',\r\n        linkColor:\r\n          'text-brand-700 hover:text-brand-800 focus-visible:focus-ring-brand-shadow-xs',\r\n      },\r\n      onlyIcon: {\r\n        true: '',\r\n        false: '',\r\n      },\r\n      disabled: {\r\n        true: 'opacity-50 cursor-not-allowed text-disabled hover:text-disabled',\r\n        false: '',\r\n      },\r\n      loading: {\r\n        true: 'pointer-events-none opacity-75',\r\n      },\r\n    },\r\n    compoundVariants: [\r\n      {\r\n        hierarchy: ['primary'],\r\n        disabled: true,\r\n        className:\r\n          'bg-disabled border border-disabled-subtle hover:bg-disabled',\r\n      },\r\n      {\r\n        hierarchy: ['secondaryColor'],\r\n        disabled: true,\r\n        className: ' border-disabled-subtle hover:bg-white',\r\n      },\r\n      {\r\n        hierarchy: ['tertiaryColor'],\r\n        disabled: true,\r\n        className: 'hover:bg-white',\r\n      },\r\n      {\r\n        hierarchy: ['linkGray', 'linkColor'],\r\n        className: 'px-0.5 py-0.5',\r\n      },\r\n      {\r\n        onlyIcon: [true],\r\n        size: ['sm'],\r\n        className: 'p-md',\r\n      },\r\n      {\r\n        onlyIcon: [true],\r\n        size: ['md'],\r\n        className: 'p-2.5',\r\n      },\r\n      {\r\n        onlyIcon: [true],\r\n        size: ['lg'],\r\n        className: 'p-lg',\r\n      },\r\n      {\r\n        onlyIcon: [true],\r\n        size: ['xl'],\r\n        className: 'p-3.5',\r\n      },\r\n      {\r\n        onlyIcon: [true],\r\n        size: ['2xl'],\r\n        className: 'p-xl',\r\n      },\r\n    ],\r\n    defaultVariants: {\r\n      size: 'md',\r\n      hierarchy: 'primary',\r\n      disabled: false,\r\n      onlyIcon: false,\r\n      loading: false,\r\n    },\r\n  }\r\n);\r\n\r\n// export default buttonVariants;\r\nconst buttonVariants = (variants: ButtonVariants) =>\r\n  twMerge(buttonVariantsCva(variants));\r\n\r\nexport interface ButtonVariants\r\n  extends VariantProps<typeof buttonVariantsCva> {}\r\n\r\nexport default buttonVariants;\r\n"],"names":["buttonVariantsCva","cva","buttonVariants","variants","twMerge"],"mappings":"oLAGMA,EAAoBC,EAAA,IACxB,2FACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,8BACJ,GAAI,gCACJ,GAAI,iCACJ,GAAI,wCACJ,MAAO,6CACT,EACA,UAAW,CACT,QACE,2GACF,MACE,iGACF,cACE,qJACF,eACE,wIACF,aACE,6GACF,cACE,iGACF,SACE,sFACF,UACE,8EACJ,EACA,SAAU,CACR,KAAM,GACN,MAAO,EACT,EACA,SAAU,CACR,KAAM,kEACN,MAAO,EACT,EACA,QAAS,CACP,KAAM,gCACR,CACF,EACA,iBAAkB,CAChB,CACE,UAAW,CAAC,SAAS,EACrB,SAAU,GACV,UACE,6DACJ,EACA,CACE,UAAW,CAAC,gBAAgB,EAC5B,SAAU,GACV,UAAW,wCACb,EACA,CACE,UAAW,CAAC,eAAe,EAC3B,SAAU,GACV,UAAW,gBACb,EACA,CACE,UAAW,CAAC,WAAY,WAAW,EACnC,UAAW,eACb,EACA,CACE,SAAU,CAAC,EAAI,EACf,KAAM,CAAC,IAAI,EACX,UAAW,MACb,EACA,CACE,SAAU,CAAC,EAAI,EACf,KAAM,CAAC,IAAI,EACX,UAAW,OACb,EACA,CACE,SAAU,CAAC,EAAI,EACf,KAAM,CAAC,IAAI,EACX,UAAW,MACb,EACA,CACE,SAAU,CAAC,EAAI,EACf,KAAM,CAAC,IAAI,EACX,UAAW,OACb,EACA,CACE,SAAU,CAAC,EAAI,EACf,KAAM,CAAC,KAAK,EACZ,UAAW,MACb,CACF,EACA,gBAAiB,CACf,KAAM,KACN,UAAW,UACX,SAAU,GACV,SAAU,GACV,QAAS,EACX,CACF,CACF,EAGMC,EAAkBC,GACtBC,UAAQJ,EAAkBG,CAAQ,CAAC"}