Skip to content

Commit 2c3c7fc

Browse files
authored
feat: replace lucide icons with untitled icons (#221)
* feat: replace lucide icons with untitled icons * chore: remove lucide-react dependency
1 parent 25a531e commit 2c3c7fc

17 files changed

+143
-2692
lines changed

package-lock.json

+76-2,642
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@
2929
"@tanstack/react-query": "^5.64.1",
3030
"@types/prismjs": "^1.26.5",
3131
"@types/react-syntax-highlighter": "^15.5.13",
32+
"@untitled-ui/icons-react": "^0.1.4",
3233
"clsx": "^2.1.1",
3334
"date-fns": "^4.1.0",
3435
"fuse.js": "^7.0.0",
3536
"highlight.js": "^11.11.1",
36-
"lucide-react": "^0.471.1",
3737
"prismjs": "^1.29.0",
3838
"react": "19.0.0",
3939
"react-dom": "19.0.0",

src/components/CopyToClipboard.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Button, Tooltip, TooltipTrigger } from "@stacklok/ui-kit";
2-
import { ClipboardCheck, ClipboardCopy } from "lucide-react";
2+
import { ClipboardCheck, Copy02 } from "@untitled-ui/icons-react";
33
import { useEffect, useState } from "react";
44
import { twMerge } from "tailwind-merge";
55

@@ -34,7 +34,7 @@ export function CopyToClipboard({
3434
{copied ? (
3535
<ClipboardCheck data-testid="icon-clipboard-check" />
3636
) : (
37-
<ClipboardCopy data-testid="icon-clipboard-copy" />
37+
<Copy02 data-testid="icon-clipboard-copy" />
3838
)}
3939
</Button>
4040

src/components/Error.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CircleAlert } from "lucide-react";
1+
import { AlertCircle } from "@untitled-ui/icons-react";
22
import { Header } from "../features/header/components/header";
33
import { Card } from "@stacklok/ui-kit";
44

@@ -10,7 +10,7 @@ export function Error() {
1010
</div>
1111
<div className="h-24 flex flex-col flex-1 justify-center">
1212
<Card className="p-8 flex flex-col items-center">
13-
<CircleAlert className="text-red-600 mb-2 size-16" />
13+
<AlertCircle className="text-red-600 mb-2 size-16" />
1414
<div className="text-xl font-semibold text-secondary text-center">
1515
An error occurred
1616
</div>

src/components/HoverPopover.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
} from "@stacklok/ui-kit";
88
import { OverlayTriggerStateContext } from "react-aria-components";
99
import { ReactNode, useContext } from "react";
10-
import { ChevronDown, ChevronUp } from "lucide-react";
10+
import { ChevronDown, ChevronUp } from "@untitled-ui/icons-react";
1111

1212
function PopoverIcon() {
1313
const { isOpen = false } = useContext(OverlayTriggerStateContext) ?? {};

src/components/ui/sheet.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
import * as React from "react";
44
import * as SheetPrimitive from "@radix-ui/react-dialog";
5-
import { X } from "lucide-react";
65

76
import { tv } from "tailwind-variants";
87
import { twMerge } from "tailwind-merge";
8+
import { XClose } from "@untitled-ui/icons-react";
99

1010
const Sheet = SheetPrimitive.Root;
1111

@@ -65,7 +65,7 @@ const SheetContent = React.forwardRef<
6565
>
6666
{children}
6767
<SheetPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-brand-600 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-gray-25">
68-
<X className="size-4" />
68+
<XClose className="size-4" />
6969
<span className="sr-only">Close</span>
7070
</SheetPrimitive.Close>
7171
</SheetPrimitive.Content>

src/components/ui/sidebar.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import * as React from "react";
22
import { Slot } from "@radix-ui/react-slot";
3-
import { PanelLeft } from "lucide-react";
3+
44
import { useIsMobile } from "@/hooks/use-mobile";
55
import { Sheet, SheetContent } from "@/components/ui/sheet";
66
import { Tooltip, TooltipTrigger, Button, Skeleton } from "@stacklok/ui-kit";
77
import { twMerge } from "tailwind-merge";
88
import { tv } from "tailwind-variants";
9+
import { LayoutAlt02 } from "@untitled-ui/icons-react";
910

1011
const SIDEBAR_COOKIE_NAME = "sidebar:state";
1112
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
@@ -271,7 +272,7 @@ const SidebarTrigger = React.forwardRef<
271272
}}
272273
{...props}
273274
>
274-
<PanelLeft className="!w-6 !h-6 text-secondary" />
275+
<LayoutAlt02 className="!w-6 !h-6 text-secondary" />
275276
<span className="sr-only">Toggle Sidebar</span>
276277
</Button>
277278
);

src/features/alerts/components/__tests__/table-alerts.test.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ import {
1010
TokenUsageAggregate,
1111
} from "@/api/generated";
1212

13-
vi.mock("lucide-react", async () => {
14-
const original =
15-
await vi.importActual<typeof import("lucide-react")>("lucide-react");
13+
vi.mock("@untitled-ui/icons-react", async () => {
14+
const original = await vi.importActual<
15+
typeof import("@untitled-ui/icons-react")
16+
>("@untitled-ui/icons-react");
1617
return {
1718
...original,
1819
ArrowDown: () => <div data-testid="icon-arrow-down" />,

src/features/alerts/components/table-alert-token-usage.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { TokenUsage, TokenUsageAggregate } from "@/api/generated";
22
import { formatCurrency } from "@/lib/currency";
33
import { TextLinkButton, Tooltip, TooltipTrigger } from "@stacklok/ui-kit";
4-
import { ArrowDown, ArrowUp } from "lucide-react";
4+
import { ArrowDown, ArrowUp } from "@untitled-ui/icons-react";
55

66
function Icons({
77
input_tokens = 0,

src/features/alerts/components/table-alerts.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ import {
2222
parsingPromptText,
2323
getIssueDetectedType,
2424
} from "@/lib/utils";
25-
import { KeyRoundIcon, PackageX, Search } from "lucide-react";
2625
import { useAlertSearch } from "@/hooks/useAlertSearch";
2726
import { useCallback } from "react";
2827
import { useNavigate, useSearchParams } from "react-router-dom";
2928
import { useFilteredAlerts } from "@/hooks/useAlertsData";
3029
import { useClientSidePagination } from "@/hooks/useClientSidePagination";
3130
import { TableAlertTokenUsage } from "./table-alert-token-usage";
31+
import { Key01, PackageX, SearchMd } from "@untitled-ui/icons-react";
3232

3333
const getTitle = (alert: AlertConversation) => {
3434
const prompt = alert.conversation;
@@ -63,7 +63,7 @@ function IssueDetectedCellContent({ alert }: { alert: AlertConversation }) {
6363
case "leaked_secret":
6464
return (
6565
<>
66-
<KeyRoundIcon className="size-4 text-blue-700" />
66+
<Key01 className="size-4 text-blue-700" />
6767
Blocked secret exposure
6868
</>
6969
);
@@ -167,7 +167,7 @@ export function TableAlerts() {
167167
type="search"
168168
placeholder="Search..."
169169
isBorderless
170-
icon={<Search />}
170+
icon={<SearchMd />}
171171
/>
172172
<SearchFieldClearButton />
173173
</FieldGroup>

src/features/header/components/header-status-menu.tsx

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
import {
2-
AlertCircle,
3-
CheckCircle2,
4-
ShieldCheck,
5-
ShieldX,
6-
ShieldAlert,
7-
} from "lucide-react";
81
import { useCodeGateStatus } from "../hooks/use-codegate-status";
92
import { HealthStatus } from "../types";
103
import {
@@ -19,6 +12,13 @@ import {
1912
import { Dialog } from "react-aria-components";
2013

2114
import { ReactNode } from "react";
15+
import {
16+
AlertCircle,
17+
AlertTriangle,
18+
CheckCircle,
19+
ShieldOff,
20+
ShieldTick,
21+
} from "@untitled-ui/icons-react";
2222

2323
type CodeGateStatus =
2424
| "healthy"
@@ -164,13 +164,13 @@ function ButtonIcon({
164164
case "error_checking_status":
165165
return <AlertCircle className={className} />;
166166
case "healthy":
167-
return <ShieldCheck className={className} />;
167+
return <ShieldTick className={className} />;
168168
case "loading":
169169
return <Loader className={className} />;
170170
case "unhealthy":
171-
return <ShieldX className={className} />;
171+
return <ShieldOff className={className} />;
172172
case "update_available":
173-
return <ShieldAlert className={className} />;
173+
return <AlertTriangle className={className} />;
174174
default:
175175
return status satisfies never;
176176
}
@@ -188,7 +188,7 @@ function HealthCheckIcon({
188188
case "unhealthy":
189189
return <AlertCircle className={className} />;
190190
case "healthy":
191-
return <CheckCircle2 className={className} />;
191+
return <CheckCircle className={className} />;
192192
case "loading":
193193
return <Loader className={className} />;
194194
default:
@@ -209,7 +209,7 @@ function VersionIcon({
209209
case "update_available":
210210
return <AlertCircle className={className} />;
211211
case "up_to_date":
212-
return <CheckCircle2 className={className} />;
212+
return <CheckCircle className={className} />;
213213
case "loading":
214214
return <Loader className={className} />;
215215
default:

src/features/header/constants/certificate-menu-items.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import { OptionsSchema } from "@stacklok/ui-kit";
2-
import { Download, ShieldCheck } from "lucide-react";
2+
import { Download01, ShieldTick } from "@untitled-ui/icons-react";
33

44
export const CERTIFICATE_MENU_ITEMS = [
55
{
6-
icon: <ShieldCheck />,
6+
icon: <ShieldTick />,
77
id: "about-certificate-security",
88
href: "/certificates/security",
99
textValue: "About certificate security",
1010
},
1111
{
12-
icon: <Download />,
12+
icon: <Download01 />,
1313
id: "download-certificates",
1414
href: "/certificates",
1515
textValue: "Download certificates",

src/features/header/constants/help-menu-items.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
Youtube,
77
} from "@/components/icons";
88
import { OptionsSchema } from "@stacklok/ui-kit";
9-
import { BookOpenText } from "lucide-react";
9+
import { BookOpen01 } from "@untitled-ui/icons-react";
1010

1111
export const HELP_MENU_ITEMS = [
1212
{
@@ -28,7 +28,7 @@ export const HELP_MENU_ITEMS = [
2828
target: "_blank",
2929
},
3030
{
31-
icon: <BookOpenText />,
31+
icon: <BookOpen01 />,
3232
id: "documentation",
3333
href: "https://docs.codegate.ai/",
3434
textValue: "Documentation",

src/features/workspace/components/table-actions-workspaces.tsx

+12-6
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ import {
77
Popover,
88
} from "@stacklok/ui-kit";
99

10-
import { Undo2, X, SlidersHorizontal, Check, Ellipsis } from "lucide-react";
1110
import { useMutationArchiveWorkspace } from "@/features/workspace/hooks/use-mutation-archive-workspace";
1211
import { useMutationRestoreWorkspace } from "../hooks/use-mutation-restore-workspace";
1312
import { useMutationHardDeleteWorkspace } from "../hooks/use-mutation-hard-delete-workspace";
1413
import { useMutationActivateWorkspace } from "../hooks/use-mutation-activate-workspace";
1514
import { useConfirmHardDeleteWorkspace } from "../hooks/use-confirm-hard-delete-workspace";
1615
import { hrefs } from "@/lib/hrefs";
16+
import {
17+
Check,
18+
DotsHorizontal,
19+
FlipBackward,
20+
Settings04,
21+
XClose,
22+
} from "@untitled-ui/icons-react";
1723

1824
const getWorkspaceActions = ({
1925
archiveWorkspace,
@@ -41,13 +47,13 @@ const getWorkspaceActions = ({
4147
},
4248
{
4349
textValue: "Edit",
44-
icon: <SlidersHorizontal />,
50+
icon: <Settings04 />,
4551
id: "edit",
4652
href: hrefs.workspaces.edit(workspace.name),
4753
},
4854
{
4955
textValue: "Archive",
50-
icon: <X />,
56+
icon: <XClose />,
5157
id: "archive",
5258
isDisabled:
5359
workspace.name === activeWorkspaceName || workspace.name === "default",
@@ -73,15 +79,15 @@ const getArchivedWorkspaceActions = ({
7379
}): OptionsSchema<"menu">[] => [
7480
{
7581
textValue: "Restore",
76-
icon: <Undo2 />,
82+
icon: <FlipBackward />,
7783
id: "restore",
7884
onAction: () =>
7985
restoreWorkspace({ path: { workspace_name: workspace.name } }),
8086
},
8187
{
8288
textValue: "Permanently delete",
8389
isDestructive: true,
84-
icon: <X />,
90+
icon: <XClose />,
8591
id: "permanently-delete",
8692
onAction: () =>
8793
hardDeleteWorkspace({ path: { workspace_name: workspace.name } }),
@@ -103,7 +109,7 @@ export function TableActionsWorkspaces({
103109
return (
104110
<MenuTrigger>
105111
<Button aria-label="Actions" isIcon variant="tertiary">
106-
<Ellipsis />
112+
<DotsHorizontal />
107113
</Button>
108114
<Popover placement="bottom end">
109115
<Menu

src/features/workspace/components/workspace-custom-instructions.tsx

+12-4
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,13 @@ import {
4646
import { v1GetWorkspaceCustomInstructionsQueryKey } from "@/api/generated/@tanstack/react-query.gen";
4747
import { useQueryGetWorkspaceCustomInstructions } from "../hooks/use-query-get-workspace-custom-instructions";
4848
import { useMutationSetWorkspaceCustomInstructions } from "../hooks/use-mutation-set-workspace-custom-instructions";
49-
import { Bot, Download, Search } from "lucide-react";
5049
import Fuse from "fuse.js";
5150
import systemPrompts from "../constants/built-in-system-prompts.json";
51+
import {
52+
Download01,
53+
MessageTextSquare02,
54+
SearchMd,
55+
} from "@untitled-ui/icons-react";
5256

5357
type DarkModeContextValue = {
5458
preference: "dark" | "light" | null;
@@ -176,7 +180,11 @@ function PromptPresetPicker({ onActivate }: PromptPresetPickerProps) {
176180
onChange={setQuery}
177181
>
178182
<FieldGroup>
179-
<Input icon={<Search />} placeholder="Type to search" autoFocus />
183+
<Input
184+
icon={<SearchMd />}
185+
placeholder="Type to search"
186+
autoFocus
187+
/>
180188
{query.length > 0 ? <SearchFieldClearButton /> : null}
181189
</FieldGroup>
182190
</SearchField>
@@ -191,7 +199,7 @@ function PromptPresetPicker({ onActivate }: PromptPresetPickerProps) {
191199
return (
192200
<Card className=" flex flex-col">
193201
<h2 className="font-bold p-2 flex gap-2 items-center">
194-
<Bot className="size-4" />
202+
<MessageTextSquare02 className="size-4" />
195203
<div className="truncate">{item.name}</div>
196204
</h2>
197205
<pre className="h-72 overflow-hidden text-wrap text-sm bg-gray-50 p-2 overflow-y-auto">
@@ -223,7 +231,7 @@ function PromptPresetPicker({ onActivate }: PromptPresetPickerProps) {
223231
handleActivate(item.text);
224232
}}
225233
>
226-
<Download />
234+
<Download01 />
227235
</Button>
228236
</div>
229237
</Card>

0 commit comments

Comments
 (0)