Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

12.5 KB
Raw Blame
import { useId } from "react";
import { ArrowsLeftRightIcon, CodeIcon } from "@phosphor-icons/react/dist/ssr";

const REVENUE_ICON_DEFAULT_CLASSNAME = "inline-block size-4 align-[-0.125em] shrink-0";

export const StripeIcon = ({ className }: { className?: string }) => (
  <svg
    className={className ?? REVENUE_ICON_DEFAULT_CLASSNAME}
    viewBox="0 0 32 32"
    fill="#5f6bea"
    aria-hidden
  >
    <path
      d="M69.164 8.47l-.302-1.434h-4.196V24.04h4.848V12.5c1.147-1.5 3.082-1.208 3.698-1.017V7.038c-.646-.232-2.913-.658-4.048 1.43zm-9.73-5.646L54.698 3.83l-.02 15.562c0 2.87 2.158 4.993 5.038 4.993 1.585 0 2.756-.302 3.405-.643v-3.95c-.622.248-3.683 1.138-3.683-1.72v-6.9h3.683V7.035h-3.683zM46.3 11.97c0-.758.63-1.05 1.648-1.05a10.868 10.868 0 0 1 4.83 1.25V7.6a12.815 12.815 0 0 0-4.83-.888c-3.924 0-6.557 2.056-6.557 5.488 0 5.37 7.375 4.498 7.375 6.813 0 .906-.78 1.186-1.863 1.186-1.606 0-3.68-.664-5.307-1.55v4.63a13.461 13.461 0 0 0 5.307 1.117c4.033 0 6.813-1.992 6.813-5.485 0-5.796-7.417-4.76-7.417-6.943zM13.88 9.515c0-1.37 1.14-1.9 2.982-1.9A19.661 19.661 0 0 1 25.6 9.876v-8.27A23.184 23.184 0 0 0 16.862.001C9.762.001 5 3.72 5 9.93c0 9.716 13.342 8.138 13.342 12.326 0 1.638-1.4 2.146-3.37 2.146-2.905 0-6.657-1.202-9.6-2.802v8.378A24.353 24.353 0 0 0 14.973 32C22.27 32 27.3 28.395 27.3 22.077c0-10.486-13.42-8.613-13.42-12.56z"
      fillRule="evenodd"
    />
  </svg>
);

export const PaddleIcon = ({ className }: { className?: string }) => {
  const id = useId();

  return (
    <svg
      className={className ?? REVENUE_ICON_DEFAULT_CLASSNAME}
      viewBox="0 0 100 100"
      fill="none"
      aria-hidden
    >
      <g clipPath={`url(#${id})`}>
        <rect width="100" height="100" fill="white" />
        <path d="M100 0H0V100H100V0Z" fill="#FFDD35" />
        <path
          d="M18.9297 41.5476V38.7972C22.3173 38.7972 25.5679 37.4582 27.9715 35.0788C30.367 32.7075 31.714 29.4731 31.7221 26.1016H34.2789C34.2789 29.4811 35.6179 32.7155 38.0215 35.095C40.4251 37.4905 43.6837 38.8294 47.0713 38.8214V41.5718C43.6837 41.5718 40.4332 42.9107 38.0295 45.2901C35.634 47.6615 34.287 50.8959 34.2789 54.2674H31.7221C31.7221 50.8878 30.3831 47.6534 27.9795 45.274C25.5679 42.8865 22.3173 41.5476 18.9297 41.5476Z"
          fill="#040F11"
        />
        <path
          d="M31.7229 21.3354H53.7184C64.4621 21.3354 72.1407 28.9576 72.1407 40.1288C72.1407 51.2999 64.4701 58.9221 53.7184 58.9221H31.7148V90.9273H40.9179V67.0525H53.7103C69.1644 67.0525 81.3438 54.9618 81.3438 40.1288C81.3438 25.2957 69.1644 13.2051 53.7103 13.2051H31.7148V21.3354H31.7229Z"
          fill="#040F11"
        />
      </g>
      <defs>
        <clipPath id={id}>
          <rect width="100" height="100" fill="white" />
        </clipPath>
      </defs>
    </svg>
  );
};

export const RevenueApiIcon = ({ className }: { className?: string }) => (
  <CodeIcon className={className ?? REVENUE_ICON_DEFAULT_CLASSNAME} weight="duotone" aria-hidden />
);

export const HttpRequestIcon = ({ className }: { className?: string }) => (
  <ArrowsLeftRightIcon
    className={className ?? REVENUE_ICON_DEFAULT_CLASSNAME}
    weight="duotone"
    aria-hidden
  />
);

export const NodeIcon = ({ className }: { className?: string }) => {
  const id = useId();
  const clipId = `${id}-node-hex`;
  const mainGradientId = `${id}-node-main`;
  const rightGradientId = `${id}-node-r1`;
  const leftGradientId = `${id}-node-r2`;

  return (
    <svg
      className={className ?? REVENUE_ICON_DEFAULT_CLASSNAME}
      viewBox="0 0 44 50"
      xmlns="http://www.w3.org/2000/svg"
      aria-hidden
    >
      <defs>
        <clipPath id={clipId}>
          <path d="M22.8725 0.4166C22.136 0 21.2616 0 20.5253 0.4166L1.1505 11.6694C0.4142 12.0862 0 12.8733 0 13.707V36.2584C0 37.0921 0.4602 37.8791 1.1505 38.296L20.5253 49.5487C21.2616 49.9653 22.136 49.9653 22.8725 49.5487L42.2471 38.296C42.9836 37.8791 43.3976 37.0921 43.3976 36.2584V13.707C43.3976 12.8733 42.9375 12.0862 42.2471 11.6694L22.8725 0.4166Z" />
        </clipPath>
        <linearGradient
          id={mainGradientId}
          x1="30.33"
          y1="8.56"
          x2="14.9"
          y2="44.7"
          gradientUnits="userSpaceOnUse"
        >
          <stop stopColor="#3F8B3D" />
          <stop offset="0.64" stopColor="#3F873F" />
          <stop offset="0.93" stopColor="#3DA92E" />
          <stop offset="1" stopColor="#3DAE2B" />
        </linearGradient>
        <linearGradient
          id={rightGradientId}
          x1="18.8"
          y1="26.8"
          x2="68"
          y2="0.4"
          gradientUnits="userSpaceOnUse"
        >
          <stop offset="0.14" stopColor="#3F873F" />
          <stop offset="0.4" stopColor="#52A044" />
          <stop offset="0.71" stopColor="#64B749" />
          <stop offset="0.91" stopColor="#6ABF4B" />
        </linearGradient>
        <linearGradient
          id={leftGradientId}
          x1="0.25"
          y1="24.5"
          x2="44"
          y2="24.5"
          gradientUnits="userSpaceOnUse"
        >
          <stop offset="0.09" stopColor="#6ABF4B" />
          <stop offset="0.29" stopColor="#64B749" />
          <stop offset="0.6" stopColor="#52A044" />
          <stop offset="0.86" stopColor="#3F873F" />
        </linearGradient>
      </defs>
      <path
        fill={`url(#${mainGradientId})`}
        d="M22.8725 0.4166C22.136 0 21.2616 0 20.5253 0.4166L1.1505 11.6694C0.4142 12.0862 0 12.8733 0 13.707V36.2584C0 37.0921 0.4602 37.8791 1.1505 38.296L20.5253 49.5487C21.2616 49.9653 22.136 49.9653 22.8725 49.5487L42.2471 38.296C42.9836 37.8791 43.3976 37.0921 43.3976 36.2584V13.707C43.3976 12.8733 42.9375 12.0862 42.2471 11.6694L22.8725 0.4166Z"
      />
      <polygon
        fill={`url(#${rightGradientId})`}
        clipPath={`url(#${clipId})`}
        points="21.698901,-1.046618 43.20532,11.948247 21.698901,51.072715 0.152778,38.055107"
      />
      <polygon
        fill={`url(#${leftGradientId})`}
        clipPath={`url(#${clipId})`}
        points="21.698901,-1.046618 0.152778,11.948247 21.698901,51.072715 43.20532,38.055107"
      />
    </svg>
  );
};

export const GoogleAnalyticsIcon = ({ className }: { className?: string }) => (
  <svg className={className} viewBox="0 0 192 192" width="16" height="16">
    <g>
      <path
        fill="#F9AB00"
        d="M130,29v132c0,14.77,10.19,23,21,23c10,0,21-7,21-23V30c0-13.54-10-22-21-22S130,17.33,130,29z"
      />
      <path
        fill="#E37400"
        d="M75,96v65c0,14.77,10.19,23,21,23c10,0,21-7,21-23V97c0-13.54-10-22-21-22S75,84.33,75,96z"
      />
      <circle fill="#E37400" cx="41" cy="163" r="21" />
    </g>
  </svg>
);

export const UmamiIcon = ({ className }: { className?: string }) => (
  <svg className={className} viewBox="0 0 428 389.11" width="16" height="16">
    <g>
      <circle
        cx="214.15"
        cy="181"
        r="171"
        fill="#fff"
        stroke="#000"
        strokeMiterlimit="10"
        strokeWidth="20"
      />
      <path d="M413 134.11H15.29a15 15 0 0 0-15 15v15.3C.12 168 0 171.52 0 175.11c0 118.19 95.81 214 214 214 116.4 0 211.1-92.94 213.93-208.67 0-.44.07-.88.07-1.33v-30a15 15 0 0 0-15-15" />
    </g>
  </svg>
);

export const SimpleAnalyticsIcon = ({ className }: { className?: string }) => (
  <svg className={className} viewBox="0 0 400 400" fill="none" width="16" height="16">
    <rect width="400" height="400" rx="90" fill="#FF4F64" />
    <path d="M132.414 201.448H100V298.69H132.414V201.448Z" fill="white" />
    <path d="M210.206 143.103H177.793V298.69H210.206V143.103Z" fill="white" />
    <path d="M288 88H255.586V298.69H288V88Z" fill="white" />
  </svg>
);

export const PlausibleIcon = ({ className }: { className?: string }) => (
  <svg className={className} viewBox="0 0 47 60" fill="none" width="16" height="16">
    <defs>
      <linearGradient
        id="plausibleDocsGradient1"
        x1="14.8413403"
        y1="22.5436904"
        x2="27.4731407"
        y2="44.6493411"
        gradientUnits="userSpaceOnUse"
      >
        <stop offset="0" stopColor="#909cf7" />
        <stop offset="1" stopColor="#4b38d8" />
      </linearGradient>
      <linearGradient
        id="plausibleDocsGradient2"
        x1="7.9837957"
        y1="-1.3582919"
        x2="21.0009873"
        y2="21.4217935"
        gradientUnits="userSpaceOnUse"
      >
        <stop offset="0" stopColor="#909cf7" />
        <stop offset="1" stopColor="#4b38d8" />
      </linearGradient>
    </defs>
    <path
      fill="url(#plausibleDocsGradient1)"
      d="M45.2456059,22.6027536c-1.0911024,10.4557623-10.2327486,18.2272825-20.7452872,18.2272807h-4.047804v9.570007c0,5.3019285-4.2980623,9.5999908-9.5999908,9.5999908H3.3599854c-1.8556687,0-3.3599854-1.5043167-3.3599854-3.3599854v-19.7025146l5.0380685-7.0686343c.9118097-1.2793096,2.587965-1.7566996,4.0369945-1.1497867l2.8657142,1.2002785c1.4444817.6050081,3.1153774.12945,4.0247968-1.1455083l6.7172007-9.417163c.9071158-1.2717288,2.5743943-1.7450816,4.0144283-1.1397262l5.5198678,2.3204187c1.4430268.6066135,3.1137697.1319561,4.0223175-1.1427389l6.4594145-9.0625757c2.0248091,3.5597961,3.0145069,7.7887694,2.5468032,12.2706573Z"
    />
    <path
      fill="url(#plausibleDocsGradient2)"
      d="M3.2920959,28.8726296c.82329-1.1551271,2.0209115-2.0434967,3.4138697-2.3114381,1.0861554-.2089265,2.156905-.0992829,3.1472499.3155174l2.8649902,1.1999512c.1651001.0691528.3388672.104187.5164795.104187.4365845,0,.8488159-.2124634,1.1026611-.5683594l6.5942097-9.2447929c.8231505-1.154021,2.0204067-2.0410099,3.4124878-2.3083136,1.0821376-.2077892,2.1463585-.0989034,3.1282512.3138487l5.5198364,2.3204346c.1665649.0700684.3417969.1055298.5206909.1055298.4351807,0,.8456421-.2113647,1.0979614-.5653687l6.9192505-9.7077637C37.8272145,3.3644409,31.7802174,0,24.9450124,0H3.3599904C1.5043217,0,.000005,1.5043167.000005,3.3599854v30.1316528l3.2920909-4.6190085Z"
    />
  </svg>
);

export const NpmIcon = ({ className }: { className?: string }) => (
  <svg
    className={className}
    role="img"
    viewBox="0 0 24 24"
    xmlns="http://www.w3.org/2000/svg"
    width="16"
    height="16"
    fill="#CB3837"
  >
    <title>npm</title>
    <path d="M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z" />
  </svg>
);

export const FathomIcon = ({ className }: { className?: string }) => (
  <svg className={className} viewBox="0 0 67.851 50" width="16" height="16">
    <g transform="translate(11882.544 12524.362)">
      <path
        d="M81.249,324.048H78.86a1.962,1.962,0,0,0-1.855,1.318l-14.9,42.741a1.963,1.963,0,0,0,1.855,2.61h2.388a1.963,1.963,0,0,0,1.854-1.317l14.9-42.741a1.964,1.964,0,0,0-1.854-2.611"
        transform="translate(-11897.906 -12845.645)"
        fill="hsla(250, 100%, 75%, 1)"
      />
      <path
        d="M14.677,336.886v-1.948a1.964,1.964,0,0,0-1.963-1.964H8.957v-1.805c-.006-2.11.471-3.374.9-3.834l.02-.025a2.2,2.2,0,0,1,1.061-.579,25.624,25.624,0,0,1,4.2-.325h.722a1.964,1.964,0,0,0,1.963-1.964v-1.76a1.96,1.96,0,0,0-1.588-1.928c-.238-.046-.5-.093-.8-.138-.371-.057-2.317-.085-2.7-.086h-.027c-3.163,0-5.856.739-7.66,2.674l0,0c-1.762,1.941-2.4,4.687-2.4,8.023V368A1.964,1.964,0,0,0,4.6,369.962H6.993A1.962,1.962,0,0,0,8.957,368V338.849h3.756a1.962,1.962,0,0,0,1.963-1.963"
        transform="translate(-11885.184 -12844.891)"
        fill="hsla(60, 3%, 20%, 1)"
      />
      <path
        d="M43.125,337.381a14.827,14.827,0,0,0-7.629-1.813,17.368,17.368,0,0,0-7.612,1.546A12.219,12.219,0,0,0,22.7,341.75l-.009.013a1.694,1.694,0,0,0-.254.895,1.792,1.792,0,0,0,1.2,1.684h0l1.927.686a2.748,2.748,0,0,0,3.053-.863,7.86,7.86,0,0,1,.582-.637c1.261-1.224,3.132-1.945,6.044-1.956a10.514,10.514,0,0,1,3.686.574,5.038,5.038,0,0,1,2.175,1.529c1.091,1.339,1.778,3.408,1.842,6.374-2.806.044-5.3.161-7.446.362a34.983,34.983,0,0,0-7.946,1.654h0l-.009,0-.023.006,0,0a12.629,12.629,0,0,0-6.1,3.776,10.233,10.233,0,0,0-2.216,6.72v.064a10.849,10.849,0,0,0,1.67,6.015,10.4,10.4,0,0,0,4.665,3.87,16.69,16.69,0,0,0,6.692,1.232,15.255,15.255,0,0,0,5.159-.965,16.393,16.393,0,0,0,5.07-2.992c.3-.251.573-.52.843-.8a9.263,9.263,0,0,0,1.146,3.251,1.95,1.95,0,0,0,1.673.935h0l1.149-.013a1.964,1.964,0,0,0,1.941-1.963V350.166a18.409,18.409,0,0,0-1.426-7.523,11.334,11.334,0,0,0-4.662-5.262m-1.6,24.9a11.575,11.575,0,0,1-3.878,4.041,9.525,9.525,0,0,1-5.235,1.486,7.992,7.992,0,0,1-5.25-1.5,4.367,4.367,0,0,1-1.228-1.59,5.665,5.665,0,0,1-.42-2.242,5.093,5.093,0,0,1,.655-2.579,5.261,5.261,0,0,1,2.41-1.934,22.124,22.124,0,0,1,6.1-1.587,68.356,68.356,0,0,1,8.281-.581v1.215a10.274,10.274,0,0,1-1.432,5.269"
        transform="translate(-11888.733 -12848.114)"
        fill="hsla(60, 3%, 20%, 1)"
      />
    </g>
  </svg>
);