Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

refactor: remove radix icons package

Brad Barbin784a2c152e78
diff --git a/apps/carbon/app/components/Search/Search/Search.tsx b/apps/carbon/app/components/Search/Search/Search.tsx
index 2d84dd1d7b..3b84ee4541 100644
--- a/apps/carbon/app/components/Search/Search/Search.tsx
+++ b/apps/carbon/app/components/Search/Search/Search.tsx
@@ -21,9 +21,9 @@ import { AiOutlinePartition } from "react-icons/ai";
import { BiListCheck } from "react-icons/bi";
import { BsArrowReturnLeft, BsCartDash, BsCartPlus } from "react-icons/bs";
import { CgProfile } from "react-icons/cg";
-import { FaSearch } from "react-icons/fa";
import { HiOutlineDocumentDuplicate } from "react-icons/hi";
import { PiShareNetworkFill } from "react-icons/pi";
+import { RxMagnifyingGlass } from "react-icons/rx";
import { useSidebar } from "~/components/Layout/Sidebar/useSidebar";
import { useSupabase } from "~/lib/supabase";
import type { NavItem } from "~/types";
@@ -198,7 +198,7 @@ const SearchModal = ({
className="ring-0 focus-within:ring-0 shadow-none border-0"
>
<InputLeftElement className="pointer-events-none">
- <FaSearch className="text-muted-foreground" />
+ <RxMagnifyingGlass className="text-muted-foreground" />
</InputLeftElement>
<Input
placeholder="Search..."
@@ -371,7 +371,7 @@ const SearchButton = () => {
return (
<>
<Button
- leftIcon={<FaSearch />}
+ leftIcon={<RxMagnifyingGlass />}
variant="secondary"
className="text-muted-foreground w-[200px] mt-2"
onClick={searchModal.onOpen}
diff --git a/apps/carbon/package.json b/apps/carbon/package.json
index 9553ae0eb9..a8695db7e2 100644
--- a/apps/carbon/package.json
+++ b/apps/carbon/package.json
@@ -25,7 +25,6 @@
"@emotion/styled": "^11.11.0",
"@internationalized/date": "^3.3.0",
"@nanostores/react": "^0.7.1",
- "@radix-ui/react-icons": "^1.3.0",
"@remix-run/eslint-config": "~2.2.0",
"@remix-run/dev": "~2.2.0",
"@remix-run/node": "~2.2.0",
diff --git a/package-lock.json b/package-lock.json
index b2e2a8a8a0..3b5a49891f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -43,7 +43,6 @@
"@emotion/styled": "^11.11.0",
"@internationalized/date": "^3.3.0",
"@nanostores/react": "^0.7.1",
- "@radix-ui/react-icons": "^1.3.0",
"@remix-run/dev": "~2.2.0",
"@remix-run/eslint-config": "~2.2.0",
"@remix-run/node": "~2.2.0",
@@ -4943,14 +4942,6 @@
}
}
},
- "node_modules/@radix-ui/react-icons": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-icons/-/react-icons-1.3.0.tgz",
- "integrity": "sha512-jQxj/0LKgp+j9BiTXz3O3sgs26RNet2iLWmsPyRz2SIcR4q/4SbazXfnYwbAr+vLYKSfc7qxzyGQA1HLlYiuNw==",
- "peerDependencies": {
- "react": "^16.x || ^17.x || ^18.x"
- }
- },
"node_modules/@radix-ui/react-id": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.0.1.tgz",
@@ -29239,7 +29230,6 @@
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@internationalized/date": "^3.3.0",
- "@radix-ui/react-icons": "^1.3.0",
"framer-motion": "^10.13.1",
"react": "^18.0.0 || ^17.0.0",
"react-icons": "^4.12.0"
diff --git a/packages/react/package.json b/packages/react/package.json
index 1a85f6fb48..4391373036 100644
--- a/packages/react/package.json
+++ b/packages/react/package.json
@@ -105,7 +105,6 @@
"@emotion/styled": "^11.11.0",
"@internationalized/date": "^3.3.0",
"framer-motion": "^10.13.1",
- "@radix-ui/react-icons": "^1.3.0",
"react": "^18.0.0 || ^17.0.0",
"react-icons": "^4.12.0"
}
diff --git a/packages/react/src/Command.tsx b/packages/react/src/Command.tsx
index 3d31164668..259ecc24fe 100644
--- a/packages/react/src/Command.tsx
+++ b/packages/react/src/Command.tsx
@@ -1,7 +1,6 @@
"use client";
import { type DialogProps } from "@radix-ui/react-dialog";
-import { MagnifyingGlassIcon } from "@radix-ui/react-icons";
import type { VariantProps } from "class-variance-authority";
import { cva } from "class-variance-authority";
import { Command as CommandPrimitive } from "cmdk";
@@ -11,6 +10,7 @@ import type {
HTMLAttributes,
} from "react";
import { forwardRef } from "react";
+import { RxMagnifyingGlass } from "react-icons/rx";
import { Modal, ModalContent } from "~/Modal";
import { cn } from "~/utils/cn";
@@ -69,7 +69,7 @@ const CommandInput = forwardRef<
className="flex items-center border-b border-border px-3"
cmdk-input-wrapper=""
>
- <MagnifyingGlassIcon className="mr-2 h-4 w-4 shrink-0 opacity-50" />
+ <RxMagnifyingGlass className="mr-2 h-4 w-4 shrink-0 opacity-50" />
<CommandPrimitive.Input
ref={ref}
className={cn(
@@ -205,7 +205,7 @@ const CommandTrigger = forwardRef<ElementRef<"button">, CommandTriggerProps>(
>
{children}
- <MagnifyingGlassIcon className="h-4 w-4 opacity-50" />
+ <RxMagnifyingGlass className="h-4 w-4 opacity-50" />
</button>
)
);
diff --git a/packages/react/src/Select.tsx b/packages/react/src/Select.tsx
index c9cf621a5d..612d5d4a56 100644
--- a/packages/react/src/Select.tsx
+++ b/packages/react/src/Select.tsx
@@ -1,16 +1,16 @@
"use client";
-import {
- CaretSortIcon,
- CheckIcon,
- ChevronDownIcon,
- ChevronUpIcon,
-} from "@radix-ui/react-icons";
import * as SelectPrimitive from "@radix-ui/react-select";
import type { VariantProps } from "class-variance-authority";
import { cva } from "class-variance-authority";
import type { ComponentPropsWithoutRef, ElementRef } from "react";
import { forwardRef } from "react";
+import {
+ RxCaretSort,
+ RxCheck,
+ RxChevronDown,
+ RxChevronUp,
+} from "react-icons/rx";
import { cn } from "~/utils/cn";
@@ -56,7 +56,7 @@ const SelectTrigger = forwardRef<
>
{children}
<SelectPrimitive.Icon asChild>
- <CaretSortIcon className="h-4 w-4 opacity-50" />
+ <RxCaretSort className="h-4 w-4 opacity-50" />
</SelectPrimitive.Icon>
</SelectPrimitive.Trigger>
));
@@ -74,7 +74,7 @@ const SelectScrollUpButton = forwardRef<
)}
{...props}
>
- <ChevronUpIcon />
+ <RxChevronUp />
</SelectPrimitive.ScrollUpButton>
));
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
@@ -91,7 +91,7 @@ const SelectScrollDownButton = forwardRef<
)}
{...props}
>
- <ChevronDownIcon />
+ <RxChevronDown />
</SelectPrimitive.ScrollDownButton>
));
SelectScrollDownButton.displayName =
@@ -155,7 +155,7 @@ const SelectItem = forwardRef<
>
<span className="absolute right-2 flex h-3.5 w-3.5 items-center justify-center">
<SelectPrimitive.ItemIndicator>
- <CheckIcon className="h-4 w-4" />
+ <RxCheck className="h-4 w-4" />
</SelectPrimitive.ItemIndicator>
</span>
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>