import type { BoxProps } from '@mui/material/Box'; import type { Theme, SxProps } from '@mui/material/styles'; import type { Transition, MotionProps } from 'framer-motion'; import { useId } from 'react'; import { m } from 'framer-motion'; import Box from '@mui/material/Box'; import { styled } from '@mui/material/styles'; import { varFade } from 'src/components/animate'; // ---------------------------------------------------------------------- const baseStyles = (theme: Theme): SxProps => ({ zIndex: 2, display: 'none', color: 'grey.500', position: 'absolute', '& line': { strokeDasharray: 3, stroke: 'currentColor' }, '& path': { fill: 'currentColor', stroke: 'currentColor' }, [theme.breakpoints.up(1440)]: { display: 'block' }, }); const transition: Transition = { duration: 0.64, ease: [0.43, 0.13, 0.23, 0.96], }; type SvgRootProps = React.ComponentProps; const SvgRoot = styled(m.svg)``; // ---------------------------------------------------------------------- export function FloatLine({ sx, vertical, ...other }: SvgRootProps & { vertical?: boolean }) { return ( ({ ...baseStyles(theme), width: 1, zIndex: 1, height: '1px', opacity: 0.24, ...(vertical && { width: '1px', height: 1 }), }), ...(Array.isArray(sx) ? sx : [sx]), ]} {...other} > {vertical ? ( ) : ( )} ); } // ---------------------------------------------------------------------- export function FloatPlusIcon({ sx, ...other }: SvgRootProps) { return ( ({ ...baseStyles(theme), width: 16, height: 16, }), ...(Array.isArray(sx) ? sx : [sx]), ]} {...other} > ); } // ---------------------------------------------------------------------- export function FloatXIcon({ sx, ...other }: SvgRootProps) { return ( ({ ...baseStyles(theme), width: 16, height: 16, }), ...(Array.isArray(sx) ? sx : [sx]), ]} {...other} > ); } // ---------------------------------------------------------------------- export function FloatTriangleLeftIcon({ sx, ...other }: SvgRootProps) { return ( ({ ...baseStyles(theme), width: 10, height: 20, }), ...(Array.isArray(sx) ? sx : [sx]), ]} {...other} > ); } export function FloatTriangleDownIcon({ sx, ...other }: SvgRootProps) { return ( ({ ...baseStyles(theme), width: 20, height: 10, }), ...(Array.isArray(sx) ? sx : [sx]), ]} {...other} > ); } // ---------------------------------------------------------------------- export function CircleSvg({ sx, variants }: SvgRootProps) { const maskId = useId(); const clipPathId = useId(); const gradientId = useId(); return ( ({ top: 0, left: 0, right: 0, bottom: 0, m: 'auto', width: 560, height: 560, color: 'grey.500', position: 'absolute', }), ...(Array.isArray(sx) ? sx : [sx]), ]} > ); } // ---------------------------------------------------------------------- export function FloatDotIcon({ sx, ...other }: BoxProps<'span'> & MotionProps) { return ( ({ ...baseStyles(theme), width: 12, height: 12, borderRadius: '50%', bgcolor: 'currentColor', }), ...(Array.isArray(sx) ? sx : [sx]), ]} {...other} /> ); }