-
-
-
- {label}
-
- {tooltip && }
-
- {extraAction}
+
+
+
+ {tooltip && }
-
-
- {DEFAULT_COLORS.map((swatch) => {
- const isSelected = color === swatch;
- return (
-
- );
- })}
-
+
+
);
@@ -486,8 +420,8 @@ export function ColorSection({
export function SquareDotIcon() {
return (
@@ -573,8 +507,8 @@ export function MarkerCenterSquareIcon() {
export function MarkerCenterCircleIcon() {
return (
(
-
)}
/>
diff --git a/apps/web/ui/partners/groups/group-color-picker.tsx b/apps/web/ui/partners/groups/group-color-picker.tsx
deleted file mode 100644
index f47433b2803..00000000000
--- a/apps/web/ui/partners/groups/group-color-picker.tsx
+++ /dev/null
@@ -1,111 +0,0 @@
-"use client";
-
-import {
- getResourceColorData,
- RAINBOW_CONIC_GRADIENT,
- RESOURCE_COLORS_DATA,
-} from "@/ui/colors";
-import { Popover, Tooltip } from "@dub/ui";
-import { capitalize, cn } from "@dub/utils";
-import { useState } from "react";
-
-export function GroupColorPicker({
- color,
- onChange,
- id,
-}: {
- color?: string | null;
- onChange: (color: string | null) => void;
- id?: string;
-}) {
- const [isOpen, setIsOpen] = useState(false);
-
- const onSelect = (color: string | null) => {
- onChange(color);
- setIsOpen(false);
- };
-
- const colorClassName = color
- ? getResourceColorData(color)?.groupVariants
- : undefined;
-
- return (
-
-
- Select a color
-
- onSelect(null)}
- />
- {RESOURCE_COLORS_DATA.map(({ color, groupVariants }) => (
- onSelect(color)}
- />
- ))}
-
- }
- side="bottom"
- align="end"
- >
-
-
- );
-}
-
-function Swatch({
- colorClassName,
- name,
- onSelect,
-}: {
- colorClassName: string | null;
- name: string;
- onSelect: () => void;
-}) {
- return (
-
-
-
-
-
- );
-}
-
-const Rainbow = () => (
-
-);
diff --git a/apps/web/ui/partners/program-color-picker.tsx b/apps/web/ui/partners/program-color-picker.tsx
deleted file mode 100644
index 8643cf2b45e..00000000000
--- a/apps/web/ui/partners/program-color-picker.tsx
+++ /dev/null
@@ -1,155 +0,0 @@
-"use client";
-
-import { RAINBOW_CONIC_GRADIENT } from "@/ui/colors";
-import { Popover, Tooltip } from "@dub/ui";
-import { cn } from "@dub/utils";
-import { CSSProperties, useState } from "react";
-import { HexColorInput } from "react-colorful";
-
-const COLORS = [
- { color: "#737373", name: "Gray" },
- { color: "#FB2C36", name: "Red" },
- { color: "#FF6900", name: "Orange" },
- { color: "#FD9A00", name: "Amber" },
- { color: "#EFB100", name: "Yellow" },
- { color: "#7CCF00", name: "Lime" },
- { color: "#00C951", name: "Green" },
- { color: "#00BC7D", name: "Emerald" },
- { color: "#00BBA7", name: "Teal" },
- { color: "#00B8DB", name: "Cyan" },
- { color: "#00A6F4", name: "Sky" },
- { color: "#2B7FFF", name: "Blue" },
- { color: "#615FFF", name: "Indigo" },
- { color: "#8E51FF", name: "Violet" },
- { color: "#AD46FF", name: "Purple" },
- { color: "#E12AFB", name: "Fuchsia" },
- { color: "#F6339A", name: "Pink" },
- { color: "#FF2056", name: "Rose" },
-];
-
-export function ProgramColorPicker({
- color,
- onChange,
- id,
-}: {
- color: string | null;
- onChange: (color: string | null) => void;
- id?: string;
-}) {
- const [isOpen, setIsOpen] = useState(false);
-
- const onSelect = (color: string | null) => {
- onChange(color);
- setIsOpen(false);
- };
-
- return (
-
-
- Select a color
-
-
-
onSelect(null)}
- />
-
-
- {!color && }
-
-
onChange(color)}
- prefixed={!!color}
- placeholder="# Default"
- style={{}}
- size={1}
- className="block min-w-32 shrink rounded-md border border-neutral-300 py-1.5 pl-[30px] text-neutral-900 placeholder-neutral-400 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm"
- />
-
-
- {COLORS.map(({ color, name }) => (
- onSelect(color)}
- />
- ))}
-
- }
- side="right"
- align="end"
- >
-