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: button component

Brad Barbindde5a0ffe74a
diff --git a/apps/carbon/app/components/Address/Address.tsx b/apps/carbon/app/components/Address/Address.tsx
index f183dab699..aced734861 100644
--- a/apps/carbon/app/components/Address/Address.tsx
+++ b/apps/carbon/app/components/Address/Address.tsx
@@ -1,5 +1,5 @@
import { ActionMenu, VStack } from "@carbon/react";
-import { Grid, Icon, MenuItem } from "@chakra-ui/react";
+import { Grid, MenuItem } from "@chakra-ui/react";
import { BsPinMapFill } from "react-icons/bs";
import type { Action } from "~/types";
@@ -20,7 +20,7 @@ const Address = ({ address, actions }: AddressProps) => {
}`;
return (
<Grid w="full" gridColumnGap={4} gridTemplateColumns="auto 1fr auto">
- <Icon as={BsPinMapFill} w={8} h={8} />
+ <BsPinMapFill className="w-8 h-8" />
<VStack spacing={0}>
<p className="font-bold line-clamp-1">{location}</p>
<p className="text-sm text-muted-foreground line-clamp-1">
diff --git a/apps/carbon/app/components/Form/Array.tsx b/apps/carbon/app/components/Form/Array.tsx
index 39f128f899..7af5f51549 100644
--- a/apps/carbon/app/components/Form/Array.tsx
+++ b/apps/carbon/app/components/Form/Array.tsx
@@ -1,7 +1,6 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import type { InputProps } from "@chakra-ui/react";
import {
- Button,
Input as ChakraInput,
FormControl,
FormErrorMessage,
@@ -36,7 +35,11 @@ const Array = forwardRef<HTMLInputElement, FormArrayProps>(
{...rest}
/>
))}
- <Button leftIcon={<IoMdAdd />} onClick={() => push("")}>
+ <Button
+ variant="secondary"
+ leftIcon={<IoMdAdd />}
+ onClick={() => push("")}
+ >
New Option
</Button>
</VStack>
diff --git a/apps/carbon/app/components/Form/Submit.tsx b/apps/carbon/app/components/Form/Submit.tsx
index 7b12e43792..b1ff21d7bf 100644
--- a/apps/carbon/app/components/Form/Submit.tsx
+++ b/apps/carbon/app/components/Form/Submit.tsx
@@ -1,5 +1,5 @@
+import type { ButtonProps } from "@carbon/react";
import { Button } from "@carbon/react";
-import type { ButtonProps } from "@chakra-ui/react";
import type { PropsWithChildren } from "react";
import { useIsSubmitting } from "remix-validated-form";
@@ -14,9 +14,8 @@ export const Submit = ({
form={formId}
type="submit"
size="md"
- colorScheme="brand"
- isLoading={isSubmitting || props.isLoading}
- isDisabled={isSubmitting || props.isDisabled}
+ isLoading={isSubmitting}
+ isDisabled={isSubmitting}
{...props}
>
{children}
diff --git a/apps/carbon/app/components/Grid/Grid.tsx b/apps/carbon/app/components/Grid/Grid.tsx
index 505e68533e..422f508d90 100644
--- a/apps/carbon/app/components/Grid/Grid.tsx
+++ b/apps/carbon/app/components/Grid/Grid.tsx
@@ -1,6 +1,6 @@
import { HStack, VStack, useColor, useEscape, useMount } from "@carbon/react";
import { clip } from "@carbon/utils";
-import { Icon, Table, Tbody, Td, Th, Thead, Tr } from "@chakra-ui/react";
+import { Table, Tbody, Td, Th, Thead, Tr } from "@chakra-ui/react";
import type { ColumnDef, ColumnOrderState } from "@tanstack/react-table";
import {
flexRender,
@@ -451,7 +451,7 @@ const Grid = <T extends object>({
>
<Td colSpan={24}>
<HStack className="items-start h-6">
- <Icon color="gray.500" as={BsPlus} w={6} h={6} />
+ <BsPlus className="text-muted-foreground h-6 w-6" />
</HStack>
</Td>
</Tr>
diff --git a/apps/carbon/app/components/Layout/Sidebar/CollapsibleSidebar.tsx b/apps/carbon/app/components/Layout/Sidebar/CollapsibleSidebar.tsx
index 81d4b01769..349ad52312 100644
--- a/apps/carbon/app/components/Layout/Sidebar/CollapsibleSidebar.tsx
+++ b/apps/carbon/app/components/Layout/Sidebar/CollapsibleSidebar.tsx
@@ -29,7 +29,7 @@ export const CollapsibleSidebar = ({ children }: PropsWithChildren<{}>) => {
<motion.div
animate={sidebar.isOpen ? "visible" : "hidden"}
initial={variants.visible}
- transition={{ duration: 0.5 }}
+ transition={{ duration: 0.2, ease: "easeInOut" }}
variants={variants}
className="bg-popover text-popover-foreground border-r border-border h-full min-h-[calc(100vh-50px)] sticky top-50 z-[3]"
>
diff --git a/apps/carbon/app/components/Layout/Sidebar/ContentSidebar.tsx b/apps/carbon/app/components/Layout/Sidebar/ContentSidebar.tsx
index 0899f1dddc..45f8551eb1 100644
--- a/apps/carbon/app/components/Layout/Sidebar/ContentSidebar.tsx
+++ b/apps/carbon/app/components/Layout/Sidebar/ContentSidebar.tsx
@@ -1,5 +1,4 @@
-import { VStack } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, VStack } from "@carbon/react";
import { Link, useMatches } from "@remix-run/react";
import { useUrlParams } from "~/hooks";
import type { Route } from "~/types";
@@ -23,16 +22,14 @@ const ContentSidebar = ({ links }: { links: Route[] }) => {
return (
<Button
key={route.name}
- as={Link}
- to={route.to + (route.q ? `?q=${route.q}` : "")}
+ asChild
leftIcon={route.icon}
variant={isActive ? "solid" : "ghost"}
- border="none"
- fontWeight={isActive ? "bold" : "normal"}
- justifyContent="start"
- w="full"
+ className="w-full justify-start"
>
- {route.name}
+ <Link to={route.to + (route.q ? `?q=${route.q}` : "")}>
+ {route.name}
+ </Link>
</Button>
);
})}
diff --git a/apps/carbon/app/components/Layout/Sidebar/DetailSidebar.tsx b/apps/carbon/app/components/Layout/Sidebar/DetailSidebar.tsx
index bf372d43fd..59a90b5ae2 100644
--- a/apps/carbon/app/components/Layout/Sidebar/DetailSidebar.tsx
+++ b/apps/carbon/app/components/Layout/Sidebar/DetailSidebar.tsx
@@ -1,5 +1,4 @@
-import { Count, VStack } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, Count, VStack } from "@carbon/react";
import { Link, useMatches } from "@remix-run/react";
import type { IconType } from "react-icons";
@@ -27,19 +26,17 @@ const DetailSidebar = ({ links }: DetailSidebarProps) => {
return (
<Button
key={route.name}
- className="border-border"
- as={Link}
- to={route.to}
- colorScheme={isActive ? "brand" : "gray"}
- variant={isActive ? "solid" : "ghost"}
- border={isActive ? "1px solid" : "none"}
- fontWeight={isActive ? "bold" : "normal"}
- justifyContent="space-between"
- size="md"
- w="full"
+ asChild
+ variant={isActive ? "primary" : "ghost"}
+ className="w-full justify-start"
>
- <span>{route.name}</span>
- {route.count !== undefined && <Count count={route.count} />}
+ <Link to={route.to}>
+ {route.icon && <route.icon className="mr-2" />}
+ <span>{route.name}</span>
+ {route.count !== undefined && (
+ <Count count={route.count} className="ml-auto" />
+ )}
+ </Link>
</Button>
);
})}
diff --git a/apps/carbon/app/components/Layout/Sidebar/GroupedContentSidebar.tsx b/apps/carbon/app/components/Layout/Sidebar/GroupedContentSidebar.tsx
index a63c599ca8..cd3085a2eb 100644
--- a/apps/carbon/app/components/Layout/Sidebar/GroupedContentSidebar.tsx
+++ b/apps/carbon/app/components/Layout/Sidebar/GroupedContentSidebar.tsx
@@ -1,5 +1,4 @@
-import { VStack } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, VStack } from "@carbon/react";
import { Link, useMatches } from "@remix-run/react";
import type { RouteGroup } from "~/types";
import { CollapsibleSidebar } from "./CollapsibleSidebar";
@@ -27,16 +26,14 @@ const GroupedContentSidebar = ({ groups }: { groups: RouteGroup[] }) => {
return (
<Button
key={route.name}
- as={Link}
- to={route.to}
- variant={isActive ? "solid" : "ghost"}
- border="none"
- fontWeight={isActive ? "bold" : "normal"}
+ asChild
leftIcon={route.icon}
- justifyContent="start"
- w="full"
+ variant={isActive ? "solid" : "ghost"}
+ className="w-full justify-start"
>
- {route.name}
+ <Link to={route.to + (route.q ? `?q=${route.q}` : "")}>
+ {route.name}
+ </Link>
</Button>
);
})}
diff --git a/apps/carbon/app/components/Layout/Sidebar/IconSidebar.tsx b/apps/carbon/app/components/Layout/Sidebar/IconSidebar.tsx
index c15df37113..85bb34ac0e 100644
--- a/apps/carbon/app/components/Layout/Sidebar/IconSidebar.tsx
+++ b/apps/carbon/app/components/Layout/Sidebar/IconSidebar.tsx
@@ -61,7 +61,7 @@ const IconSidebar = () => {
borderWidth={1}
borderColor={isActive ? "gray.200" : "transparent"}
aria-label={link.name}
- icon={link.icon}
+ icon={<link.icon />}
/>
</TooltipTrigger>
<TooltipContent side="right">{link.name}</TooltipContent>
diff --git a/apps/carbon/app/components/Layout/Sidebar/useSidebar.tsx b/apps/carbon/app/components/Layout/Sidebar/useSidebar.tsx
index d80945e3b3..d0aa02007e 100644
--- a/apps/carbon/app/components/Layout/Sidebar/useSidebar.tsx
+++ b/apps/carbon/app/components/Layout/Sidebar/useSidebar.tsx
@@ -24,90 +24,90 @@ export function useSidebar() {
permission: "parts",
name: "Parts",
to: path.to.parts,
- icon: <AiOutlinePartition />,
+ icon: AiOutlinePartition,
},
{
permission: "jobs",
name: "Jobs",
to: path.to.jobs,
- icon: <BiListCheck />,
+ icon: BiListCheck,
},
{
permission: "inventory",
name: "Inventory",
to: path.to.inventory,
- icon: <HiOutlineCube />,
+ icon: HiOutlineCube,
},
{
permission: "scheduling",
name: "Scheduling",
to: path.to.scheduling,
- icon: <BsCalendar2Week />,
+ icon: BsCalendar2Week,
},
{
permission: "timecards",
name: "Timecards",
to: path.to.timecards,
- icon: <AiOutlineFieldTime />,
+ icon: AiOutlineFieldTime,
},
{
permission: "sales",
name: "Sales",
to: path.to.sales,
- icon: <BsCartPlus />,
+ icon: BsCartPlus,
},
{
permission: "purchasing",
name: "Purchasing",
to: path.to.purchasing,
- icon: <BsCartDash />,
+ icon: BsCartDash,
},
{
permission: "documents",
name: "Documents",
to: path.to.documents,
- icon: <HiOutlineDocumentDuplicate />,
+ icon: HiOutlineDocumentDuplicate,
},
{
permission: "messages",
name: "Messaging",
to: path.to.messaging,
- icon: <BiMessage />,
+ icon: BiMessage,
},
{
permission: "accounting",
name: "Accounting",
to: path.to.accounting,
- icon: <TbPigMoney />,
+ icon: TbPigMoney,
},
{
permission: "invoicing",
name: "Invoicing",
to: path.to.invoicing,
- icon: <BsCreditCard />,
+ icon: BsCreditCard,
},
{
permission: "resources",
name: "Resources",
to: path.to.resources,
- icon: <BsPeopleFill />,
+ icon: BsPeopleFill,
},
{
permission: "users",
name: "Users",
to: path.to.users,
- icon: <BsShieldLock />,
+ icon: BsShieldLock,
},
{
permission: "settings",
name: "Settings",
to: path.to.settings,
- icon: <LuSettings2 />,
+ icon: LuSettings2,
},
{
name: "My Account",
to: path.to.account,
- icon: <CgProfile />,
+ icon: CgProfile,
},
];
diff --git a/apps/carbon/app/components/Layout/Topbar/Create.tsx b/apps/carbon/app/components/Layout/Topbar/Create.tsx
index 98ceebbbd3..4a5dfae470 100644
--- a/apps/carbon/app/components/Layout/Topbar/Create.tsx
+++ b/apps/carbon/app/components/Layout/Topbar/Create.tsx
@@ -1,4 +1,5 @@
-import { Button, Menu, MenuButton, MenuItem, MenuList } from "@chakra-ui/react";
+import { Button } from "@carbon/react";
+import { Menu, MenuButton, MenuItem, MenuList } from "@chakra-ui/react";
import { Link } from "@remix-run/react";
import useCreate from "./useCreate";
@@ -9,16 +10,7 @@ const Create = () => {
return (
<Menu>
- <MenuButton
- arial-label="User Menu"
- as={Button}
- variant="solid"
- colorScheme="brand"
- size="sm"
- cursor="pointer"
- >
- Create
- </MenuButton>
+ <MenuButton as={Button}>Create</MenuButton>
<MenuList fontSize="sm" boxShadow="xl" minW={48}>
{createLinks.map((link) => (
<MenuItem key={link.to} as={Link} to={link.to} icon={link.icon}>
diff --git a/apps/carbon/app/components/Layout/Topbar/Topbar.tsx b/apps/carbon/app/components/Layout/Topbar/Topbar.tsx
index db190fe6a9..e1406b320b 100644
--- a/apps/carbon/app/components/Layout/Topbar/Topbar.tsx
+++ b/apps/carbon/app/components/Layout/Topbar/Topbar.tsx
@@ -1,5 +1,5 @@
-import { HStack } from "@carbon/react";
-import { Button, GridItem } from "@chakra-ui/react";
+import { Button, HStack } from "@carbon/react";
+import { GridItem } from "@chakra-ui/react";
import { BiHelpCircle } from "react-icons/bi";
import { BsChatSquare } from "react-icons/bs";
import { Search } from "~/components/Search";
@@ -17,32 +17,24 @@ const Topbar = () => {
<Search />
<HStack spacing={1} className="justify-end py-2">
<Create />
- <a
- target="_blank"
- href="https://github.com/barbinbrad/carbon/issues/new/choose"
- rel="noreferrer"
- >
- <Button
- colorScheme="gray"
- leftIcon={<BiHelpCircle />}
- variant="outline"
+ <Button asChild leftIcon={<BiHelpCircle />} variant="secondary">
+ <a
+ target="_blank"
+ href="https://github.com/barbinbrad/carbon/issues/new/choose"
+ rel="noreferrer"
>
Help
- </Button>
- </a>
- <a
- target="_blank"
- href="https://github.com/barbinbrad/carbon/discussions/new/choose"
- rel="noreferrer"
- >
- <Button
- colorScheme="gray"
- leftIcon={<BsChatSquare />}
- variant="outline"
+ </a>
+ </Button>
+ <Button asChild leftIcon={<BsChatSquare />} variant="secondary">
+ <a
+ target="_blank"
+ href="https://github.com/barbinbrad/carbon/discussions/new/choose"
+ rel="noreferrer"
>
Feedback
- </Button>
- </a>
+ </a>
+ </Button>
<AvatarMenu />
</HStack>
</GridItem>
diff --git a/apps/carbon/app/components/Layout/Topbar/useCreate.tsx b/apps/carbon/app/components/Layout/Topbar/useCreate.tsx
index c56f24f82e..125b5c2371 100644
--- a/apps/carbon/app/components/Layout/Topbar/useCreate.tsx
+++ b/apps/carbon/app/components/Layout/Topbar/useCreate.tsx
@@ -2,7 +2,7 @@ import { useMemo } from "react";
import { AiOutlinePartition } from "react-icons/ai";
import { BsCartDash, BsShieldLock } from "react-icons/bs";
import { IoMdPeople } from "react-icons/io";
-import { SiHandshake } from "react-icons/si";
+import { PiShareNetworkFill } from "react-icons/pi";
import { usePermissions } from "~/hooks";
import type { Route } from "~/types";
@@ -33,7 +33,7 @@ export default function useNewMenu(): Route[] {
links.push({
name: "Supplier",
to: path.to.newSupplier,
- icon: <SiHandshake />,
+ icon: <PiShareNetworkFill />,
});
}
diff --git a/apps/carbon/app/components/Modals/Confirm/Confirm.tsx b/apps/carbon/app/components/Modals/Confirm/Confirm.tsx
index 269a2a9ab6..a0d88c9a41 100644
--- a/apps/carbon/app/components/Modals/Confirm/Confirm.tsx
+++ b/apps/carbon/app/components/Modals/Confirm/Confirm.tsx
@@ -1,5 +1,5 @@
+import { Button } from "@carbon/react";
import {
- Button,
Modal,
ModalBody,
ModalCloseButton,
@@ -36,13 +36,11 @@ const Confirm = ({
<ModalBody>{text}</ModalBody>
<ModalFooter>
- <Button colorScheme="gray" mr={3} onClick={onCancel}>
+ <Button variant="secondary" className="mr-3" onClick={onCancel}>
Cancel
</Button>
<Form method="post" action={action} onSubmit={onSubmit}>
- <Button colorScheme="brand" type="submit">
- Confirm
- </Button>
+ <Button type="submit">Confirm</Button>
</Form>
</ModalFooter>
</ModalContent>
diff --git a/apps/carbon/app/components/Modals/ConfirmDelete/ConfirmDelete.tsx b/apps/carbon/app/components/Modals/ConfirmDelete/ConfirmDelete.tsx
index b24e6713cb..2023b6678a 100644
--- a/apps/carbon/app/components/Modals/ConfirmDelete/ConfirmDelete.tsx
+++ b/apps/carbon/app/components/Modals/ConfirmDelete/ConfirmDelete.tsx
@@ -1,5 +1,5 @@
+import { Button } from "@carbon/react";
import {
- Button,
Modal,
ModalBody,
ModalCloseButton,
@@ -36,11 +36,11 @@ const ConfirmDelete = ({
<ModalBody>{text}</ModalBody>
<ModalFooter>
- <Button colorScheme="gray" mr={3} onClick={onCancel}>
+ <Button variant="secondary" className="mr-3" onClick={onCancel}>
Cancel
</Button>
<Form method="post" action={action} onSubmit={onSubmit}>
- <Button colorScheme="red" type="submit">
+ <Button variant="destructive" type="submit">
Delete
</Button>
</Form>
diff --git a/apps/carbon/app/components/Search/Search/Search.tsx b/apps/carbon/app/components/Search/Search/Search.tsx
index 47fcdfb2fc..47571b181d 100644
--- a/apps/carbon/app/components/Search/Search/Search.tsx
+++ b/apps/carbon/app/components/Search/Search/Search.tsx
@@ -1,4 +1,5 @@
import {
+ Button,
VStack,
useColor,
useDebounce,
@@ -6,9 +7,7 @@ import {
useKeyboardShortcuts,
} from "@carbon/react";
import { clip } from "@carbon/utils";
-import type { ButtonProps } from "@chakra-ui/react";
import {
- Button,
HStack,
Icon,
Input,
@@ -30,7 +29,7 @@ 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 { SiHandshake } from "react-icons/si";
+import { PiShareNetworkFill } from "react-icons/pi";
import { useSidebar } from "~/components/Layout/Sidebar/useSidebar";
import { useSupabase } from "~/lib/supabase";
import type { NavItem } from "~/types";
@@ -265,7 +264,7 @@ const resultIconProps = {
function ResultIcon({ entity }: { entity: SearchResult["entity"] | "Module" }) {
switch (entity) {
case "Customer":
- return <Icon as={SiHandshake} {...resultIconProps} />;
+ return <Icon as={PiShareNetworkFill} {...resultIconProps} />;
case "Document":
return <Icon as={HiOutlineDocumentDuplicate} {...resultIconProps} />;
case "Job":
@@ -281,7 +280,7 @@ function ResultIcon({ entity }: { entity: SearchResult["entity"] | "Module" }) {
case "Sales Order":
return <Icon as={BsCartPlus} {...resultIconProps} />;
case "Supplier":
- return <Icon as={SiHandshake} {...resultIconProps} />;
+ return <Icon as={PiShareNetworkFill} {...resultIconProps} />;
default:
return null;
}
@@ -367,7 +366,7 @@ function Module({
);
}
-const SearchButton = (props: ButtonProps) => {
+const SearchButton = () => {
const searchModal = useDisclosure();
useKeyboardShortcuts({
"/": searchModal.onOpen,
@@ -376,15 +375,10 @@ const SearchButton = (props: ButtonProps) => {
return (
<>
<Button
- colorScheme="gray"
leftIcon={<FaSearch />}
- variant="outline"
- boxShadow="sm"
- color="gray.500"
- w={200}
- mt={2}
+ variant="secondary"
+ className="text-muted-foreground w-[200px] mt-2"
onClick={searchModal.onOpen}
- {...props}
>
<HStack w="full">
<div className="flex flex-grow">Search</div>
diff --git a/apps/carbon/app/components/Table/components/Columns/Columns.tsx b/apps/carbon/app/components/Table/components/Columns/Columns.tsx
index 54febbb1b3..732987adc7 100644
--- a/apps/carbon/app/components/Table/components/Columns/Columns.tsx
+++ b/apps/carbon/app/components/Table/components/Columns/Columns.tsx
@@ -1,6 +1,5 @@
-import { HStack } from "@carbon/react";
+import { Button, HStack } from "@carbon/react";
import {
- Button,
IconButton,
Popover,
PopoverArrow,
diff --git a/apps/carbon/app/components/Table/components/Filter/Filter.tsx b/apps/carbon/app/components/Table/components/Filter/Filter.tsx
index df9f06c748..31b856ccac 100644
--- a/apps/carbon/app/components/Table/components/Filter/Filter.tsx
+++ b/apps/carbon/app/components/Table/components/Filter/Filter.tsx
@@ -1,6 +1,5 @@
-import { VStack } from "@carbon/react";
+import { Button, VStack } from "@carbon/react";
import {
- Button,
Popover,
PopoverArrow,
PopoverBody,
@@ -44,8 +43,7 @@ const Filter = ({ columnAccessors }: FilterProps) => {
<Popover placement="bottom" closeOnBlur>
<PopoverTrigger>
<Button
- colorScheme={filters.length === 0 ? undefined : "brand"}
- variant={filters.length === 0 ? "ghost" : "solid"}
+ variant={filters.length === 0 ? "ghost" : "primary"}
leftIcon={<BsFilter />}
>
{filters.length === 0 ? "Filter" : "Filtered"}
@@ -85,12 +83,7 @@ const Filter = ({ columnAccessors }: FilterProps) => {
</PopoverBody>
)}
<PopoverFooter>
- <Button
- size="sm"
- variant="outline"
- leftIcon={<BsPlus />}
- onClick={addFilter}
- >
+ <Button variant="secondary" leftIcon={<BsPlus />} onClick={addFilter}>
Add Filter
</Button>
</PopoverFooter>
diff --git a/apps/carbon/app/components/Table/components/Filter/FilterRow.tsx b/apps/carbon/app/components/Table/components/Filter/FilterRow.tsx
index a5c3f348f0..d2d68a116b 100644
--- a/apps/carbon/app/components/Table/components/Filter/FilterRow.tsx
+++ b/apps/carbon/app/components/Table/components/Filter/FilterRow.tsx
@@ -1,5 +1,5 @@
import { useDebounce } from "@carbon/react";
-import { Grid, IconButton, Input, ListItem, Select } from "@chakra-ui/react";
+import { Grid, IconButton, Input, Select } from "@chakra-ui/react";
import { useEffect, useState } from "react";
import { IoMdClose } from "react-icons/io";
import { filterOperatorLabels } from "~/utils/query";
@@ -41,36 +41,34 @@ const FilterRow = ({
};
return (
- <ListItem>
- <Grid gridColumnGap={2} gridTemplateColumns="1fr 1fr 1fr auto">
- <Select size="sm" defaultValue={column} onChange={onColumnChange}>
- {Object.entries(columnAccessors).map(([accessor, title]) => (
- <option key={accessor} value={accessor}>
- {title}
- </option>
- ))}
- </Select>
- <Select size="sm" defaultValue={operator} onChange={onOperatorChange}>
- {filterOperatorLabels.map(({ operator, label }) => (
- <option key={operator} value={operator}>
- {label}
- </option>
- ))}
- </Select>
- <Input
- defaultValue={searchValue}
- onChange={(e) => setValue(e.target.value)}
- size="sm"
- placeholder="Enter a value"
- />
- <IconButton
- aria-label="Remove filter"
- icon={<IoMdClose />}
- onClick={onRemove}
- variant="ghost"
- />
- </Grid>
- </ListItem>
+ <Grid gridColumnGap={2} gridTemplateColumns="1fr 1fr 1fr auto">
+ <Select size="sm" defaultValue={column} onChange={onColumnChange}>
+ {Object.entries(columnAccessors).map(([accessor, title]) => (
+ <option key={accessor} value={accessor}>
+ {title}
+ </option>
+ ))}
+ </Select>
+ <Select size="sm" defaultValue={operator} onChange={onOperatorChange}>
+ {filterOperatorLabels.map(({ operator, label }) => (
+ <option key={operator} value={operator}>
+ {label}
+ </option>
+ ))}
+ </Select>
+ <Input
+ defaultValue={searchValue}
+ onChange={(e) => setValue(e.target.value)}
+ size="sm"
+ placeholder="Enter a value"
+ />
+ <IconButton
+ aria-label="Remove filter"
+ icon={<IoMdClose />}
+ onClick={onRemove}
+ variant="ghost"
+ />
+ </Grid>
);
};
diff --git a/apps/carbon/app/components/Table/components/Pagination/Pagination.tsx b/apps/carbon/app/components/Table/components/Pagination/Pagination.tsx
index a2ce37d15c..9702907482 100644
--- a/apps/carbon/app/components/Table/components/Pagination/Pagination.tsx
+++ b/apps/carbon/app/components/Table/components/Pagination/Pagination.tsx
@@ -1,7 +1,6 @@
-import { HStack } from "@carbon/react";
+import { Button, HStack } from "@carbon/react";
import type { ThemeTypings } from "@chakra-ui/react";
import {
- Button,
IconButton,
Menu,
MenuButton,
@@ -98,6 +97,7 @@ export const PaginationButtons = ({
of {count}
</div>
<Button
+ variant="secondary"
isDisabled={!canPreviousPage}
onClick={previousPage}
leftIcon={<BsChevronLeft />}
@@ -105,6 +105,7 @@ export const PaginationButtons = ({
Previous
</Button>
<Button
+ variant="secondary"
isDisabled={!canNextPage}
onClick={nextPage}
rightIcon={<BsChevronRight />}
diff --git a/apps/carbon/app/components/Table/components/Sort/Sort.tsx b/apps/carbon/app/components/Table/components/Sort/Sort.tsx
index f350926230..5067c5a8b4 100644
--- a/apps/carbon/app/components/Table/components/Sort/Sort.tsx
+++ b/apps/carbon/app/components/Table/components/Sort/Sort.tsx
@@ -1,6 +1,5 @@
-import { HStack } from "@carbon/react";
+import { Button, HStack } from "@carbon/react";
import {
- Button,
IconButton,
Menu,
MenuButton,
@@ -39,8 +38,7 @@ const Sort = ({ columnAccessors }: SortProps) => {
<Popover placement="bottom" closeOnBlur>
<PopoverTrigger>
<Button
- colorScheme={hasNoSorts ? undefined : "brand"}
- variant={hasNoSorts ? "ghost" : "solid"}
+ variant={hasNoSorts ? "ghost" : "primary"}
leftIcon={<BsListUl />}
>
{hasNoSorts ? "Sort" : "Sorted"}
@@ -103,8 +101,7 @@ const Sort = ({ columnAccessors }: SortProps) => {
<MenuButton
as={Button}
rightIcon={<BsChevronDown />}
- colorScheme="gray"
- variant="outline"
+ variant="secondary"
>
Pick a column to sort by
</MenuButton>
diff --git a/apps/carbon/app/components/Table/components/TableHeader/TableHeader.tsx b/apps/carbon/app/components/Table/components/TableHeader/TableHeader.tsx
index ad8a045f50..5459f64b6e 100644
--- a/apps/carbon/app/components/Table/components/TableHeader/TableHeader.tsx
+++ b/apps/carbon/app/components/Table/components/TableHeader/TableHeader.tsx
@@ -1,5 +1,4 @@
-import { HStack } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack } from "@carbon/react";
import type { Column, ColumnOrderState } from "@tanstack/react-table";
import { BsFillCheckCircleFill } from "react-icons/bs";
import { MdOutlineEditNote } from "react-icons/md";
@@ -53,9 +52,7 @@ const TableHeader = <T extends object>({
{withInlineEditing &&
(editMode ? (
<Button
- colorScheme="brand"
leftIcon={<BsFillCheckCircleFill />}
- variant="solid"
onClick={() => setEditMode(false)}
>
Finish Editing
diff --git a/apps/carbon/app/modules/account/ui/Profile/ProfileForm/ProfileForm.tsx b/apps/carbon/app/modules/account/ui/Profile/ProfileForm/ProfileForm.tsx
index 26fd7c4162..12580441b2 100644
--- a/apps/carbon/app/modules/account/ui/Profile/ProfileForm/ProfileForm.tsx
+++ b/apps/carbon/app/modules/account/ui/Profile/ProfileForm/ProfileForm.tsx
@@ -32,7 +32,7 @@ const ProfileForm = ({ user }: ProfileFormProps) => {
</Grid>
<TextArea name="about" label="About" characterLimit={160} my={2} />
<Hidden name="intent" value="about" />
- <Submit size="sm">Save</Submit>
+ <Submit>Save</Submit>
</VStack>
</ValidatedForm>
</div>
diff --git a/apps/carbon/app/modules/account/ui/Profile/ProfilePhotoForm/ProfilePhotoForm.tsx b/apps/carbon/app/modules/account/ui/Profile/ProfilePhotoForm/ProfilePhotoForm.tsx
index 89f7477876..9b0910a8c6 100644
--- a/apps/carbon/app/modules/account/ui/Profile/ProfilePhotoForm/ProfilePhotoForm.tsx
+++ b/apps/carbon/app/modules/account/ui/Profile/ProfilePhotoForm/ProfilePhotoForm.tsx
@@ -1,5 +1,4 @@
-import { File, VStack, useNotification } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, File, VStack, useNotification } from "@carbon/react";
import { useSubmit } from "@remix-run/react";
import type { ChangeEvent } from "react";
import { Avatar } from "~/components";
@@ -73,7 +72,7 @@ const ProfilePhotoForm = ({ user }: ProfilePhotoFormProps) => {
</File>
{user.avatarUrl && (
- <Button variant="outline" onClick={deleteImage}>
+ <Button variant="secondary" onClick={deleteImage}>
Remove
</Button>
)}
diff --git a/apps/carbon/app/modules/account/ui/UserAttributes/UserAttributesForm.tsx b/apps/carbon/app/modules/account/ui/UserAttributes/UserAttributesForm.tsx
index a8b0e16ac9..4eceba0ffe 100644
--- a/apps/carbon/app/modules/account/ui/UserAttributes/UserAttributesForm.tsx
+++ b/apps/carbon/app/modules/account/ui/UserAttributes/UserAttributesForm.tsx
@@ -1,5 +1,5 @@
-import { HStack, VStack, useColor, useDisclosure } from "@carbon/react";
-import { Button, Grid, Switch } from "@chakra-ui/react";
+import { Button, HStack, VStack, useColor, useDisclosure } from "@carbon/react";
+import { Grid, Switch } from "@chakra-ui/react";
import { parseDate } from "@internationalized/date";
import { useFetcher, useParams } from "@remix-run/react";
import { useState } from "react";
@@ -172,10 +172,8 @@ function renderTypedForm({
<BooleanInput name="value" />
</div>
<HStack className="justify-end w-full self-center">
- <Submit size="sm" type="submit">
- Save
- </Submit>
- <Button size="md" variant="ghost" onClick={onClose}>
+ <Submit type="submit">Save</Submit>
+ <Button variant="ghost" onClick={onClose}>
Cancel
</Button>
</HStack>
@@ -214,9 +212,7 @@ function renderTypedForm({
<DatePicker name="value" />
</div>
<HStack className="justify-end w-full self-center">
- <Submit size="sm" type="submit">
- Save
- </Submit>
+ <Submit type="submit">Save</Submit>
<Button variant="ghost" onClick={onClose}>
Cancel
</Button>
@@ -264,9 +260,7 @@ function renderTypedForm({
/>
</div>
<HStack className="justify-between w-full self-center">
- <Submit size="sm" type="submit">
- Save
- </Submit>
+ <Submit type="submit">Save</Submit>
<Button variant="ghost" onClick={onClose}>
Cancel
</Button>
@@ -306,9 +300,7 @@ function renderTypedForm({
<NumberInput name="value" />
</div>
<HStack className="justify-between w-full self-center">
- <Submit size="sm" type="submit">
- Save
- </Submit>
+ <Submit type="submit">Save</Submit>
<Button variant="ghost" onClick={onClose}>
Cancel
</Button>
@@ -348,9 +340,7 @@ function renderTypedForm({
<Input name="value" />
</div>
<HStack className="justify-between w-full self-center">
- <Submit size="sm" type="submit">
- Save
- </Submit>
+ <Submit type="submit">Save</Submit>
<Button variant="ghost" onClick={onClose}>
Cancel
</Button>
@@ -390,9 +380,7 @@ function renderTypedForm({
<Employee name="value" />
</div>
<HStack className="justify-between w-full self-center">
- <Submit size="sm" type="submit">
- Save
- </Submit>
+ <Submit type="submit">Save</Submit>
<Button variant="ghost" onClick={onClose}>
Cancel
</Button>
diff --git a/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountCategoriesTable/AccountCategoriesTable.tsx b/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountCategoriesTable/AccountCategoriesTable.tsx
index 04c0285e46..1a884b1cf5 100644
--- a/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountCategoriesTable/AccountCategoriesTable.tsx
+++ b/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountCategoriesTable/AccountCategoriesTable.tsx
@@ -1,16 +1,10 @@
-import {
- Button,
- ButtonGroup,
- IconButton,
- Link,
- MenuItem,
- useDisclosure,
-} from "@chakra-ui/react";
+import { Button } from "@carbon/react";
+import { Link, MenuItem, useDisclosure } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo, useState } from "react";
import { BiAddToQueue } from "react-icons/bi";
-import { BsListUl, BsPencilSquare, BsPlus } from "react-icons/bs";
+import { BsListUl, BsPencilSquare } from "react-icons/bs";
import { IoMdTrash } from "react-icons/io";
import { Table } from "~/components";
import { ConfirmDelete } from "~/components/Modals";
@@ -68,30 +62,18 @@ const AccountCategoriesTable = memo(
{
header: "Subcategories",
cell: ({ row }) => (
- <ButtonGroup size="sm" isAttached variant="outline">
- <Button
- onClick={() => {
- navigate(
- `${path.to.accountingCategoryList(
- row.original.id!
- )}?${params?.toString()}`
- );
- }}
- >
- {row.original.subCategoriesCount ?? 0} Subcategories
- </Button>
- <IconButton
- aria-label="Add subcategory"
- icon={<BsPlus />}
- onClick={() => {
- navigate(
- `${path.to.newAccountingSubcategory(
- row.original.id!
- )}?${params?.toString()}`
- );
- }}
- />
- </ButtonGroup>
+ <Button
+ variant="secondary"
+ onClick={() => {
+ navigate(
+ `${path.to.accountingCategoryList(
+ row.original.id!
+ )}?${params?.toString()}`
+ );
+ }}
+ >
+ {row.original.subCategoriesCount ?? 0} Subcategories
+ </Button>
),
},
];
diff --git a/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountCategoriesTableFilters/AccountCategoriesTableFilters.tsx b/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountCategoriesTableFilters/AccountCategoriesTableFilters.tsx
index 15b5cb8063..654abf3924 100644
--- a/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountCategoriesTableFilters/AccountCategoriesTableFilters.tsx
+++ b/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountCategoriesTableFilters/AccountCategoriesTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack, Select } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack, Select } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -61,13 +60,8 @@ const AttributeCategoriesTableFilters = () => {
</HStack>
<HStack>
{permissions.can("update", "resources") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Account Category
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Account Category</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountCategoryDetail/AccountCategoryDetail.tsx b/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountCategoryDetail/AccountCategoryDetail.tsx
index a103b8b4dc..bd6a3bd6a1 100644
--- a/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountCategoryDetail/AccountCategoryDetail.tsx
+++ b/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountCategoryDetail/AccountCategoryDetail.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack, useDisclosure } from "@carbon/react";
+import { Button, HStack, VStack, useDisclosure } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -15,7 +14,7 @@ import {
import { Link } from "@remix-run/react";
import { useState } from "react";
import { BsPencilSquare } from "react-icons/bs";
-import { IoMdTrash } from "react-icons/io";
+import { IoMdAdd, IoMdTrash } from "react-icons/io";
import { ConfirmDelete } from "~/components/Modals";
import { useUrlParams } from "~/hooks";
@@ -104,13 +103,8 @@ const AccountCategoryDetail = ({
</VStack>
</DrawerBody>
<DrawerFooter>
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- size="md"
- >
- New Subcategory
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Subcategory</Link>
</Button>
</DrawerFooter>
</DrawerContent>
diff --git a/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountCategoryForm/AccountCategoryForm.tsx b/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountCategoryForm/AccountCategoryForm.tsx
index 670f49f4fe..c86428f4ef 100644
--- a/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountCategoryForm/AccountCategoryForm.tsx
+++ b/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountCategoryForm/AccountCategoryForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -79,12 +78,7 @@ const AccountCategoryForm = ({
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountSubcategoryForm/AccountSubcategoryForm.tsx b/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountSubcategoryForm/AccountSubcategoryForm.tsx
index 4410303a87..e4975bd117 100644
--- a/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountSubcategoryForm/AccountSubcategoryForm.tsx
+++ b/apps/carbon/app/modules/accounting/ui/AccountCategories/AccountSubcategoryForm/AccountSubcategoryForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -79,12 +78,7 @@ const AccountSubcategoryForm = ({
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/accounting/ui/AccountDefaults/AccountDefaultsForm.tsx b/apps/carbon/app/modules/accounting/ui/AccountDefaults/AccountDefaultsForm.tsx
index 9cdfac2b03..b97fef5c61 100644
--- a/apps/carbon/app/modules/accounting/ui/AccountDefaults/AccountDefaultsForm.tsx
+++ b/apps/carbon/app/modules/accounting/ui/AccountDefaults/AccountDefaultsForm.tsx
@@ -1,6 +1,5 @@
-import { Heading, HStack, VStack } from "@carbon/react";
+import { Button, Heading, HStack, VStack } from "@carbon/react";
import {
- Button,
Grid,
Tab,
TabList,
@@ -399,12 +398,7 @@ const AccountDefaultsForm = ({
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountForm/ChartOfAccountForm.tsx b/apps/carbon/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountForm/ChartOfAccountForm.tsx
index feb5a13b1b..191c1db86d 100644
--- a/apps/carbon/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountForm/ChartOfAccountForm.tsx
+++ b/apps/carbon/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountForm/ChartOfAccountForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -166,12 +165,7 @@ const ChartOfAccountForm = ({ initialValues }: ChartOfAccountFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountsTableFilters/ChartOfAccountsTableFilters.tsx b/apps/carbon/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountsTableFilters/ChartOfAccountsTableFilters.tsx
index 785084d5df..1bac8ff31b 100644
--- a/apps/carbon/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountsTableFilters/ChartOfAccountsTableFilters.tsx
+++ b/apps/carbon/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountsTableFilters/ChartOfAccountsTableFilters.tsx
@@ -1,6 +1,5 @@
-import { DatePicker, HStack, Select } from "@carbon/react";
+import { Button, DatePicker, HStack, Select } from "@carbon/react";
import {
- Button,
Grid,
Popover,
PopoverArrow,
@@ -81,7 +80,7 @@ const ChartOfAccountsTableFilters = () => {
</Popover>
{[...params.entries()].length > 0 && (
<Button
- size="sm"
+ variant="solid"
rightIcon={<MdClose />}
onClick={() =>
setParams({
@@ -97,13 +96,8 @@ const ChartOfAccountsTableFilters = () => {
</HStack>
<HStack>
{permissions.can("create", "accounting") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Account
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Account</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/accounting/ui/Currencies/CurrenciesTableFilters/CurrenciesTableFilters.tsx b/apps/carbon/app/modules/accounting/ui/Currencies/CurrenciesTableFilters/CurrenciesTableFilters.tsx
index 19bdf8e485..bcbcb7be0d 100644
--- a/apps/carbon/app/modules/accounting/ui/Currencies/CurrenciesTableFilters/CurrenciesTableFilters.tsx
+++ b/apps/carbon/app/modules/accounting/ui/Currencies/CurrenciesTableFilters/CurrenciesTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -24,13 +23,8 @@ const CurrenciesTableFilters = () => {
</HStack>
<HStack>
{permissions.can("create", "accounting") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Currency
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Currency</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/accounting/ui/Currencies/CurrencyForm/CurrencyForm.tsx b/apps/carbon/app/modules/accounting/ui/Currencies/CurrencyForm/CurrencyForm.tsx
index 2ad36dba24..67b04bd85b 100644
--- a/apps/carbon/app/modules/accounting/ui/Currencies/CurrencyForm/CurrencyForm.tsx
+++ b/apps/carbon/app/modules/accounting/ui/Currencies/CurrencyForm/CurrencyForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -80,12 +79,7 @@ const CurrencyForm = ({ initialValues }: CurrencyFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/accounting/ui/PaymentTerms/PaymentTermForm/PaymentTermForm.tsx b/apps/carbon/app/modules/accounting/ui/PaymentTerms/PaymentTermForm/PaymentTermForm.tsx
index 0839bf7bd3..f6bd723405 100644
--- a/apps/carbon/app/modules/accounting/ui/PaymentTerms/PaymentTermForm/PaymentTermForm.tsx
+++ b/apps/carbon/app/modules/accounting/ui/PaymentTerms/PaymentTermForm/PaymentTermForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -98,12 +97,7 @@ const PaymentTermForm = ({ initialValues }: PaymentTermFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/accounting/ui/PaymentTerms/PaymentTermsTableFilters/PaymentTermsTableFilters.tsx b/apps/carbon/app/modules/accounting/ui/PaymentTerms/PaymentTermsTableFilters/PaymentTermsTableFilters.tsx
index daba614209..ae9057da33 100644
--- a/apps/carbon/app/modules/accounting/ui/PaymentTerms/PaymentTermsTableFilters/PaymentTermsTableFilters.tsx
+++ b/apps/carbon/app/modules/accounting/ui/PaymentTerms/PaymentTermsTableFilters/PaymentTermsTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -24,13 +23,8 @@ const PaymentTermsTableFilters = () => {
</HStack>
<HStack>
{permissions.can("create", "accounting") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Payment Term
+ <Button leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Payment Term</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/documents/ui/Documents/DocumentForm/DocumentForm.tsx b/apps/carbon/app/modules/documents/ui/Documents/DocumentForm/DocumentForm.tsx
index 372afc9afe..117bce66b7 100644
--- a/apps/carbon/app/modules/documents/ui/Documents/DocumentForm/DocumentForm.tsx
+++ b/apps/carbon/app/modules/documents/ui/Documents/DocumentForm/DocumentForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -67,12 +66,7 @@ const DocumentForm = ({ initialValues, ownerId }: DocumentFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptForm/ReceiptForm.tsx b/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptForm/ReceiptForm.tsx
index 5094357718..8405d3af03 100644
--- a/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptForm/ReceiptForm.tsx
+++ b/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptForm/ReceiptForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, Menubar, MenubarItem, VStack } from "@carbon/react";
+import { Button, HStack, Menubar, MenubarItem, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -78,7 +77,7 @@ const ReceiptForm = ({
<DrawerHeader>{initialValues.receiptId}</DrawerHeader>
<DrawerBody pb={8}>
<VStack spacing={4}>
- <Menubar mb={2} mt={-2}>
+ <Menubar className="mb-2 mt--2">
<MenubarItem isDisabled={!canPost || isPosted} onClick={onPost}>
Post
</MenubarItem>
@@ -182,12 +181,7 @@ const ReceiptForm = ({
<Submit formId={formId} isDisabled={isDisabled}>
Save
</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptPostModal/ReceiptPostModal.tsx b/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptPostModal/ReceiptPostModal.tsx
index 6998f60cf1..62642066ec 100644
--- a/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptPostModal/ReceiptPostModal.tsx
+++ b/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptPostModal/ReceiptPostModal.tsx
@@ -1,6 +1,5 @@
-import { HStack } from "@carbon/react";
+import { Button, HStack } from "@carbon/react";
import {
- Button,
Modal,
ModalBody,
ModalCloseButton,
@@ -28,13 +27,11 @@ const ReceiptPostModal = (props: ReceiptPostModalProps) => {
<ModalFooter>
<HStack>
- <Button colorScheme="gray" onClick={onCancel}>
+ <Button variant="solid" onClick={onCancel}>
Cancel
</Button>
<Form method="post">
- <Button colorScheme="brand" type="submit">
- Post Receipt
- </Button>
+ <Button type="submit">Post Receipt</Button>
</Form>
</HStack>
</ModalFooter>
diff --git a/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptsTableFilters/ReceiptsTableFilters.tsx b/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptsTableFilters/ReceiptsTableFilters.tsx
index 4667267fb0..1cc9f4dcdf 100644
--- a/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptsTableFilters/ReceiptsTableFilters.tsx
+++ b/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptsTableFilters/ReceiptsTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack, Select } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack, Select } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -74,13 +73,8 @@ const ReceiptsTableFilters = ({ locations }: ReceiptsTableFiltersProps) => {
</HStack>
<HStack>
{permissions.can("create", "inventory") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Receipt
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Receipt</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/inventory/ui/ShippingMethods/ShippingMethodForm/ShippingMethodForm.tsx b/apps/carbon/app/modules/inventory/ui/ShippingMethods/ShippingMethodForm/ShippingMethodForm.tsx
index f7ea344c62..acaad70dbc 100644
--- a/apps/carbon/app/modules/inventory/ui/ShippingMethods/ShippingMethodForm/ShippingMethodForm.tsx
+++ b/apps/carbon/app/modules/inventory/ui/ShippingMethods/ShippingMethodForm/ShippingMethodForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -80,12 +79,7 @@ const ShippingMethodForm = ({ initialValues }: ShippingMethodFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/inventory/ui/ShippingMethods/ShippingMethodsTableFilters/ShippingMethodsTableFilters.tsx b/apps/carbon/app/modules/inventory/ui/ShippingMethods/ShippingMethodsTableFilters/ShippingMethodsTableFilters.tsx
index 5436ab3d26..1f18b1eeb7 100644
--- a/apps/carbon/app/modules/inventory/ui/ShippingMethods/ShippingMethodsTableFilters/ShippingMethodsTableFilters.tsx
+++ b/apps/carbon/app/modules/inventory/ui/ShippingMethods/ShippingMethodsTableFilters/ShippingMethodsTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -24,13 +23,8 @@ const ShippingMethodsTableFilters = () => {
</HStack>
<HStack>
{permissions.can("create", "inventory") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Shipping Method
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Shipping Method</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceForm/PurchaseInvoiceForm.tsx b/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceForm/PurchaseInvoiceForm.tsx
index 35a86990ed..9443ae000c 100644
--- a/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceForm/PurchaseInvoiceForm.tsx
+++ b/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceForm/PurchaseInvoiceForm.tsx
@@ -66,7 +66,7 @@ const PurchaseInvoiceForm = ({
validator={purchaseInvoiceValidator}
defaultValues={initialValues}
>
- <Card className="w-full">
+ <Card>
<CardHeader>
<CardTitle>
{isEditing ? "Purchase Invoice" : "New Purchase Invoice"}
diff --git a/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceHeader/PurchaseInvoiceHeader.tsx b/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceHeader/PurchaseInvoiceHeader.tsx
index 2d11414d54..fa4300be53 100644
--- a/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceHeader/PurchaseInvoiceHeader.tsx
+++ b/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceHeader/PurchaseInvoiceHeader.tsx
@@ -84,7 +84,7 @@ const PurchaseInvoiceHeader = () => {
</Menubar>
)}
- <Card className="w-full">
+ <Card>
<CardHeader>
<CardTitle>{purchaseInvoice.invoiceId}</CardTitle>
<CardDescription>{purchaseInvoice.supplierName}</CardDescription>
diff --git a/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceLineForm/PurchaseInvoiceLineForm.tsx b/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceLineForm/PurchaseInvoiceLineForm.tsx
index 8e69e44182..0d9008ec9f 100644
--- a/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceLineForm/PurchaseInvoiceLineForm.tsx
+++ b/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceLineForm/PurchaseInvoiceLineForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -342,7 +341,7 @@ const PurchaseInvoiceLineForm = ({
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button size="md" variant="ghost" onClick={onClose}>
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceLines/PurchaseInvoiceLines.tsx b/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceLines/PurchaseInvoiceLines.tsx
index 0130bcd62c..9e46f47bc5 100644
--- a/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceLines/PurchaseInvoiceLines.tsx
+++ b/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceLines/PurchaseInvoiceLines.tsx
@@ -1,4 +1,5 @@
import {
+ Button,
Card,
CardAction,
CardContent,
@@ -7,7 +8,6 @@ import {
HStack,
} from "@carbon/react";
import {
- Button,
IconButton,
Menu,
MenuButton,
@@ -202,8 +202,8 @@ const PurchaseInvoiceLines = () => {
</CardHeader>
<CardAction>
{canEdit && isEditable && (
- <Button colorScheme="brand" as={Link} to="new">
- New
+ <Button asChild>
+ <Link to="new">New</Link>
</Button>
)}
</CardAction>
diff --git a/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoicePostModal/PurchaseInvoicePostModal.tsx b/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoicePostModal/PurchaseInvoicePostModal.tsx
index faee9d22e3..808924ec50 100644
--- a/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoicePostModal/PurchaseInvoicePostModal.tsx
+++ b/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoicePostModal/PurchaseInvoicePostModal.tsx
@@ -1,6 +1,5 @@
-import { HStack } from "@carbon/react";
+import { Button, HStack } from "@carbon/react";
import {
- Button,
ListItem,
Modal,
ModalBody,
@@ -57,11 +56,11 @@ const PurchaseInvoicePostModal = ({
<ModalFooter>
<HStack>
- <Button colorScheme="gray" onClick={onClose}>
+ <Button variant="solid" onClick={onClose}>
Cancel
</Button>
<Form method="post" action={path.to.purchaseInvoicePost(invoiceId)}>
- <Button colorScheme="brand" type="submit">
+ <Button type="submit">
{hasLinesToReceive
? "Post and Receive Invoice"
: "Post Invoice"}
diff --git a/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceSidebar/usePurchaseInvoiceSidebar.tsx b/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceSidebar/usePurchaseInvoiceSidebar.tsx
index f4d928c0e5..ce9f087b32 100644
--- a/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceSidebar/usePurchaseInvoiceSidebar.tsx
+++ b/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceSidebar/usePurchaseInvoiceSidebar.tsx
@@ -1,3 +1,4 @@
+import { BsBank, BsCreditCard, BsListCheck } from "react-icons/bs";
import { usePermissions } from "~/hooks";
import type { Role } from "~/types";
@@ -11,16 +12,19 @@ export function usePurchaseInvoiceSidebar({ lines = 0 }: Props) {
{
name: "Summary",
to: "details",
+ icon: BsBank,
},
{
name: "Lines",
to: "lines",
count: lines,
+ icon: BsListCheck,
},
{
name: "Payment",
to: "payment",
role: ["employee"],
+ icon: BsCreditCard,
},
].filter(
(item) =>
diff --git a/apps/carbon/app/modules/invoicing/ui/PurchaseInvoices/PurchaseInvoicesTableFilters/PurchaseInvoicesTableFilters.tsx b/apps/carbon/app/modules/invoicing/ui/PurchaseInvoices/PurchaseInvoicesTableFilters/PurchaseInvoicesTableFilters.tsx
index efb6d9523a..aae435ef11 100644
--- a/apps/carbon/app/modules/invoicing/ui/PurchaseInvoices/PurchaseInvoicesTableFilters/PurchaseInvoicesTableFilters.tsx
+++ b/apps/carbon/app/modules/invoicing/ui/PurchaseInvoices/PurchaseInvoicesTableFilters/PurchaseInvoicesTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack, Select } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack, Select } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -68,13 +67,8 @@ const PurchaseInvoicesTableFilters = () => {
</HStack>
<HStack>
{permissions.can("create", "invoicing") && (
- <Button
- as={Link}
- to={path.to.newPurchaseInvoice}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Purchase Invoice
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={path.to.newPurchaseInvoice}>New Purchase Invoice</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/parts/ui/Part/PartCostingForm/PartCostingForm.tsx b/apps/carbon/app/modules/parts/ui/Part/PartCostingForm/PartCostingForm.tsx
index 95ccb3c4b1..46cb24c60e 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartCostingForm/PartCostingForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartCostingForm/PartCostingForm.tsx
@@ -33,7 +33,7 @@ const PartCostingForm = ({ initialValues }: PartCostingFormProps) => {
validator={partCostValidator}
defaultValues={initialValues}
>
- <Card className="w-full">
+ <Card>
<CardHeader>
<CardTitle>Costing & Posting</CardTitle>
</CardHeader>
diff --git a/apps/carbon/app/modules/parts/ui/Part/PartForm/PartForm.tsx b/apps/carbon/app/modules/parts/ui/Part/PartForm/PartForm.tsx
index 87dac6ff3f..2dab6c952f 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartForm/PartForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartForm/PartForm.tsx
@@ -118,7 +118,7 @@ const PartForm = ({ initialValues }: PartFormProps) => {
validator={partValidator}
defaultValues={initialValues}
>
- <Card className="w-full">
+ <Card>
<CardHeader>
<CardTitle>{isEditing ? "Part Details" : "New Part"}</CardTitle>
{!isEditing && (
diff --git a/apps/carbon/app/modules/parts/ui/Part/PartInventoryForm/PartInventoryForm.tsx b/apps/carbon/app/modules/parts/ui/Part/PartInventoryForm/PartInventoryForm.tsx
index 4a750df37f..d858c796ec 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartInventoryForm/PartInventoryForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartInventoryForm/PartInventoryForm.tsx
@@ -50,7 +50,7 @@ const PartInventoryForm = ({
validator={partInventoryValidator}
defaultValues={{ ...quantities, ...initialValues }}
>
- <Card className="w-full">
+ <Card>
<HStack className="w-full justify-between items-start">
<CardHeader>
<CardTitle>Inventory</CardTitle>
diff --git a/apps/carbon/app/modules/parts/ui/Part/PartManufacturingForm/PartManufacturingForm.tsx b/apps/carbon/app/modules/parts/ui/Part/PartManufacturingForm/PartManufacturingForm.tsx
index c406368216..8914f23bc5 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartManufacturingForm/PartManufacturingForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartManufacturingForm/PartManufacturingForm.tsx
@@ -37,7 +37,7 @@ const PartManufacturingForm = ({
validator={partManufacturingValidator}
defaultValues={initialValues}
>
- <Card className="w-full">
+ <Card>
<CardHeader>
<CardTitle>Manufacturing</CardTitle>
</CardHeader>
diff --git a/apps/carbon/app/modules/parts/ui/Part/PartPlanningForm/PartPlanningForm.tsx b/apps/carbon/app/modules/parts/ui/Part/PartPlanningForm/PartPlanningForm.tsx
index c2db68831a..abe109c0a9 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartPlanningForm/PartPlanningForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartPlanningForm/PartPlanningForm.tsx
@@ -46,7 +46,7 @@ const PartPlanningForm = ({
validator={partPlanningValidator}
defaultValues={initialValues}
>
- <Card className="w-full">
+ <Card>
<HStack className="w-full justify-between items-start">
<CardHeader>
<CardTitle>Planning</CardTitle>
diff --git a/apps/carbon/app/modules/parts/ui/Part/PartPreview/PartPreview.tsx b/apps/carbon/app/modules/parts/ui/Part/PartPreview/PartPreview.tsx
index d2b1ed1a61..c3b9527646 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartPreview/PartPreview.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartPreview/PartPreview.tsx
@@ -1,4 +1,5 @@
import {
+ Button,
Card,
CardAction,
CardContent,
@@ -7,7 +8,7 @@ import {
CardTitle,
HStack,
} from "@carbon/react";
-import { Button, Stack } from "@chakra-ui/react";
+import { Stack } from "@chakra-ui/react";
import { useParams } from "@remix-run/react";
import { FaHistory } from "react-icons/fa";
import { useRouteData } from "~/hooks";
@@ -23,14 +24,18 @@ const PartPreview = () => {
);
return (
- <Card className="w-full">
+ <Card>
<HStack className="justify-between items-start">
<CardHeader>
<CardTitle>{routeData?.partSummary?.id}</CardTitle>
<CardDescription>{routeData?.partSummary?.name}</CardDescription>
</CardHeader>
<CardAction>
- <Button onClick={() => alert("TODO")} leftIcon={<FaHistory />}>
+ <Button
+ variant="secondary"
+ onClick={() => alert("TODO")}
+ leftIcon={<FaHistory />}
+ >
View History
</Button>
</CardAction>
diff --git a/apps/carbon/app/modules/parts/ui/Part/PartPurchasingForm/PartPurchasingForm.tsx b/apps/carbon/app/modules/parts/ui/Part/PartPurchasingForm/PartPurchasingForm.tsx
index 388ca4d0cc..215a8c882f 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartPurchasingForm/PartPurchasingForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartPurchasingForm/PartPurchasingForm.tsx
@@ -43,7 +43,7 @@ const PartPurchasingForm = ({
validator={partPurchasingValidator}
defaultValues={initialValues}
>
- <Card className="w-full">
+ <Card>
<CardHeader>
<CardTitle>Purchasing</CardTitle>
</CardHeader>
diff --git a/apps/carbon/app/modules/parts/ui/Part/PartSalePriceForm/PartSalePriceForm.tsx b/apps/carbon/app/modules/parts/ui/Part/PartSalePriceForm/PartSalePriceForm.tsx
index 5145b1f614..3906e6e846 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartSalePriceForm/PartSalePriceForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartSalePriceForm/PartSalePriceForm.tsx
@@ -43,7 +43,7 @@ const PartSalePriceForm = ({
validator={partUnitSalePriceValidator}
defaultValues={initialValues}
>
- <Card className="w-full">
+ <Card>
<CardHeader>
<CardTitle>Sale Price</CardTitle>
</CardHeader>
diff --git a/apps/carbon/app/modules/parts/ui/Part/PartSidebar/usePartSidebar.tsx b/apps/carbon/app/modules/parts/ui/Part/PartSidebar/usePartSidebar.tsx
index e149f41440..33ad1fb34d 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartSidebar/usePartSidebar.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartSidebar/usePartSidebar.tsx
@@ -1,3 +1,8 @@
+import { BiListCheck } from "react-icons/bi";
+import { BsBank, BsBarChartLineFill, BsCartDash } from "react-icons/bs";
+import { HiOutlineCube } from "react-icons/hi";
+import { IoPricetagsOutline } from "react-icons/io5";
+import { PiMoneyFill, PiShareNetworkFill } from "react-icons/pi";
import { usePermissions } from "~/hooks";
import type { PartReplenishmentSystem } from "~/modules/parts/types";
import type { Role } from "~/types";
@@ -8,44 +13,52 @@ export function usePartSidebar(replenishment: PartReplenishmentSystem) {
{
name: "Details",
to: "",
+ icon: BsBank,
},
{
name: "Purchasing",
to: "purchasing",
isDisabled: replenishment === "Make",
role: ["employee", "supplier"],
+ icon: BsCartDash,
},
{
name: "Suppliers",
to: "suppliers",
isDisabled: replenishment === "Make",
role: ["employee", "supplier"],
+ icon: PiShareNetworkFill,
},
{
name: "Manufacturing",
to: "manufacturing",
isDisabled: replenishment === "Buy",
role: ["employee"],
+ icon: BiListCheck,
},
{
name: "Costing",
to: "costing",
role: ["employee", "supplier"],
+ icon: IoPricetagsOutline,
},
{
name: "Planning",
to: "planning",
role: ["employee"],
+ icon: BsBarChartLineFill,
},
{
name: "Inventory",
to: "inventory",
role: ["employee", "supplier"],
+ icon: HiOutlineCube,
},
{
name: "Sale Price",
to: "sale-price",
role: ["employee", "customer"],
+ icon: PiMoneyFill,
},
].filter(
(item) =>
diff --git a/apps/carbon/app/modules/parts/ui/Part/PartSupplierForm/PartSupplierForm.tsx b/apps/carbon/app/modules/parts/ui/Part/PartSupplierForm/PartSupplierForm.tsx
index 3d9556644d..de136f883e 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartSupplierForm/PartSupplierForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartSupplierForm/PartSupplierForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -97,7 +96,7 @@ const PartSupplierForm = ({ initialValues }: PartSupplierFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button size="md" variant="ghost" onClick={onClose}>
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/parts/ui/Part/PartSuppliers/PartSuppliers.tsx b/apps/carbon/app/modules/parts/ui/Part/PartSuppliers/PartSuppliers.tsx
index 3d1ff345a4..25ee75717d 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartSuppliers/PartSuppliers.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartSuppliers/PartSuppliers.tsx
@@ -1,4 +1,5 @@
import {
+ Button,
Card,
CardAction,
CardContent,
@@ -6,7 +7,7 @@ import {
CardTitle,
HStack,
} from "@carbon/react";
-import { Button, IconButton } from "@chakra-ui/react";
+import { IconButton } from "@chakra-ui/react";
import { Link, Outlet, useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { useMemo } from "react";
@@ -105,15 +106,15 @@ const PartSuppliers = ({ partSuppliers }: PartSuppliersProps) => {
return (
<>
- <Card className="w-full">
+ <Card>
<HStack className="justify-between items-start">
<CardHeader>
<CardTitle>Suppliers</CardTitle>
</CardHeader>
<CardAction>
{canEdit && (
- <Button colorScheme="brand" as={Link} to="new">
- New
+ <Button asChild>
+ <Link to="new">New</Link>
</Button>
)}
</CardAction>
diff --git a/apps/carbon/app/modules/parts/ui/PartGroups/PartGroupForm/PartGroupForm.tsx b/apps/carbon/app/modules/parts/ui/PartGroups/PartGroupForm/PartGroupForm.tsx
index 35490e35a1..7f10b6d912 100644
--- a/apps/carbon/app/modules/parts/ui/PartGroups/PartGroupForm/PartGroupForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/PartGroups/PartGroupForm/PartGroupForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -57,12 +56,7 @@ const PartGroupForm = ({ initialValues }: PartGroupFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/parts/ui/PartGroups/PartGroupsTableFilters/PartGroupsTableFilters.tsx b/apps/carbon/app/modules/parts/ui/PartGroups/PartGroupsTableFilters/PartGroupsTableFilters.tsx
index a22ed4031d..a941db4776 100644
--- a/apps/carbon/app/modules/parts/ui/PartGroups/PartGroupsTableFilters/PartGroupsTableFilters.tsx
+++ b/apps/carbon/app/modules/parts/ui/PartGroups/PartGroupsTableFilters/PartGroupsTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -24,13 +23,8 @@ const PartGroupsTableFilters = () => {
</HStack>
<HStack>
{permissions.can("create", "parts") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Part Group
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Part Group</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/parts/ui/Parts/PartsTableFilters/PartsTableFilters.tsx b/apps/carbon/app/modules/parts/ui/Parts/PartsTableFilters/PartsTableFilters.tsx
index de50e0d62b..3c2487de92 100644
--- a/apps/carbon/app/modules/parts/ui/Parts/PartsTableFilters/PartsTableFilters.tsx
+++ b/apps/carbon/app/modules/parts/ui/Parts/PartsTableFilters/PartsTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack, Select } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack, Select } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -70,13 +69,8 @@ const PartsTableFilters = ({ partGroups }: PartsTableFiltersProps) => {
</HStack>
<HStack>
{permissions.can("create", "parts") && (
- <Button
- as={Link}
- to={path.to.newPart}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Part
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={path.to.newPart}>New Part</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/parts/ui/Routing/PartsTree/PartsTree.tsx b/apps/carbon/app/modules/parts/ui/Routing/PartsTree/PartsTree.tsx
index 37c5444b8d..554bf93d11 100644
--- a/apps/carbon/app/modules/parts/ui/Routing/PartsTree/PartsTree.tsx
+++ b/apps/carbon/app/modules/parts/ui/Routing/PartsTree/PartsTree.tsx
@@ -1,5 +1,5 @@
-import { HStack, useMount } from "@carbon/react";
-import { Button, Icon } from "@chakra-ui/react";
+import { Button, HStack, useMount } from "@carbon/react";
+import { Icon } from "@chakra-ui/react";
import { useState } from "react";
import { AiOutlineCodeSandbox } from "react-icons/ai";
import { BsCaretDownFill } from "react-icons/bs";
@@ -67,8 +67,7 @@ const PartsTreeExplorer = () => {
<Button
variant="ghost"
aria-label="Expand"
- borderRadius={0}
- size="sm"
+ className="rounded-none"
onClick={() => toggleNode(node.id)}
isDisabled={!node.children}
>
@@ -85,12 +84,9 @@ const PartsTreeExplorer = () => {
/>
</Button>
<Button
- size="sm"
variant="ghost"
leftIcon={<AiOutlineCodeSandbox />}
- borderRadius={0}
- justifyContent="start"
- flex="1 1 0%"
+ className="rounded-none flex-1 justify-start"
>
{node.id}
</Button>
diff --git a/apps/carbon/app/modules/parts/ui/Service/ServiceForm/ServiceForm.tsx b/apps/carbon/app/modules/parts/ui/Service/ServiceForm/ServiceForm.tsx
index b79f373066..c488c9e537 100644
--- a/apps/carbon/app/modules/parts/ui/Service/ServiceForm/ServiceForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Service/ServiceForm/ServiceForm.tsx
@@ -101,7 +101,7 @@ const ServiceForm = ({ initialValues }: ServiceFormProps) => {
validator={serviceValidator}
defaultValues={initialValues}
>
- <Card className="w-full">
+ <Card>
<CardHeader>
<CardTitle>{isEditing ? "Service Details" : "New Service"}</CardTitle>
{!isEditing && (
diff --git a/apps/carbon/app/modules/parts/ui/Service/ServicePreview/ServicePreview.tsx b/apps/carbon/app/modules/parts/ui/Service/ServicePreview/ServicePreview.tsx
index 8928e029eb..101c607da6 100644
--- a/apps/carbon/app/modules/parts/ui/Service/ServicePreview/ServicePreview.tsx
+++ b/apps/carbon/app/modules/parts/ui/Service/ServicePreview/ServicePreview.tsx
@@ -1,4 +1,5 @@
import {
+ Button,
Card,
CardAction,
CardContent,
@@ -7,7 +8,7 @@ import {
CardTitle,
HStack,
} from "@carbon/react";
-import { Button, Stack } from "@chakra-ui/react";
+import { Stack } from "@chakra-ui/react";
import { useParams } from "@remix-run/react";
import { FaHistory } from "react-icons/fa";
import { useRouteData } from "~/hooks";
@@ -23,14 +24,18 @@ const ServicePreview = () => {
);
return (
- <Card className="w-full">
+ <Card>
<HStack className="justify-between items-start">
<CardHeader>
<CardTitle>{routeData?.service?.name}</CardTitle>
<CardDescription>{routeData?.service?.description}</CardDescription>
</CardHeader>
<CardAction>
- <Button onClick={() => alert("TODO")} leftIcon={<FaHistory />}>
+ <Button
+ variant="secondary"
+ onClick={() => alert("TODO")}
+ leftIcon={<FaHistory />}
+ >
View History
</Button>
</CardAction>
diff --git a/apps/carbon/app/modules/parts/ui/Service/ServiceSidebar/useServiceSidebar.tsx b/apps/carbon/app/modules/parts/ui/Service/ServiceSidebar/useServiceSidebar.tsx
index c25b9adf31..4152814f73 100644
--- a/apps/carbon/app/modules/parts/ui/Service/ServiceSidebar/useServiceSidebar.tsx
+++ b/apps/carbon/app/modules/parts/ui/Service/ServiceSidebar/useServiceSidebar.tsx
@@ -1,3 +1,5 @@
+import { BsBank } from "react-icons/bs";
+import { PiShareNetworkFill } from "react-icons/pi";
import { usePermissions } from "~/hooks";
import type { ServiceType } from "~/modules/parts/types";
import type { Role } from "~/types";
@@ -8,12 +10,14 @@ export function useServiceSidebar(type: ServiceType) {
{
name: "Details",
to: "",
+ icon: BsBank,
},
{
name: "Suppliers",
to: "suppliers",
isDisabled: type === "Internal",
role: ["employee", "supplier"],
+ icon: PiShareNetworkFill,
},
].filter(
(item) =>
diff --git a/apps/carbon/app/modules/parts/ui/Service/ServiceSupplierForm/ServiceSupplierForm.tsx b/apps/carbon/app/modules/parts/ui/Service/ServiceSupplierForm/ServiceSupplierForm.tsx
index 70200651b8..f1788df1d8 100644
--- a/apps/carbon/app/modules/parts/ui/Service/ServiceSupplierForm/ServiceSupplierForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Service/ServiceSupplierForm/ServiceSupplierForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -65,7 +64,7 @@ const ServiceSupplierForm = ({ initialValues }: ServiceSupplierFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button size="md" variant="ghost" onClick={onClose}>
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/parts/ui/Service/ServiceSuppliers/ServiceSuppliers.tsx b/apps/carbon/app/modules/parts/ui/Service/ServiceSuppliers/ServiceSuppliers.tsx
index 6ef4a20c1f..89f50b5c6f 100644
--- a/apps/carbon/app/modules/parts/ui/Service/ServiceSuppliers/ServiceSuppliers.tsx
+++ b/apps/carbon/app/modules/parts/ui/Service/ServiceSuppliers/ServiceSuppliers.tsx
@@ -1,4 +1,5 @@
import {
+ Button,
Card,
CardAction,
CardContent,
@@ -6,7 +7,7 @@ import {
CardTitle,
HStack,
} from "@carbon/react";
-import { Button, IconButton } from "@chakra-ui/react";
+import { IconButton } from "@chakra-ui/react";
import { Link, Outlet, useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { useMemo } from "react";
@@ -69,15 +70,15 @@ const ServiceSuppliers = ({ serviceSuppliers }: ServiceSuppliersProps) => {
return (
<>
- <Card className="w-full">
+ <Card>
<HStack className="justify-between items-start">
<CardHeader>
<CardTitle>Suppliers</CardTitle>
</CardHeader>
<CardAction>
{canEdit && (
- <Button colorScheme="brand" as={Link} to="new">
- New
+ <Button asChild>
+ <Link to="new">New</Link>
</Button>
)}
</CardAction>
diff --git a/apps/carbon/app/modules/parts/ui/Services/ServicesTableFilters/ServicesTableFilters.tsx b/apps/carbon/app/modules/parts/ui/Services/ServicesTableFilters/ServicesTableFilters.tsx
index 6597283353..4bdde1e05a 100644
--- a/apps/carbon/app/modules/parts/ui/Services/ServicesTableFilters/ServicesTableFilters.tsx
+++ b/apps/carbon/app/modules/parts/ui/Services/ServicesTableFilters/ServicesTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack, Select } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack, Select } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -70,13 +69,8 @@ const ServicesTableFilters = ({ partGroups }: ServicesTableFiltersProps) => {
</HStack>
<HStack>
{permissions.can("create", "parts") && (
- <Button
- as={Link}
- to={path.to.newService}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Service
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={path.to.newService}>New Service</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/parts/ui/UnitOfMeasure/UnitOfMeasureForm/UnitOfMeasureForm.tsx b/apps/carbon/app/modules/parts/ui/UnitOfMeasure/UnitOfMeasureForm/UnitOfMeasureForm.tsx
index 600cc5f41a..acc6730e82 100644
--- a/apps/carbon/app/modules/parts/ui/UnitOfMeasure/UnitOfMeasureForm/UnitOfMeasureForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/UnitOfMeasure/UnitOfMeasureForm/UnitOfMeasureForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -59,12 +58,7 @@ const UnitOfMeasureForm = ({ initialValues }: UnitOfMeasureFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/parts/ui/UnitOfMeasure/UnitOfMeasuresTableFilters/UnitOfMeasuresTableFilters.tsx b/apps/carbon/app/modules/parts/ui/UnitOfMeasure/UnitOfMeasuresTableFilters/UnitOfMeasuresTableFilters.tsx
index 9da5e5ac10..d0a188e115 100644
--- a/apps/carbon/app/modules/parts/ui/UnitOfMeasure/UnitOfMeasuresTableFilters/UnitOfMeasuresTableFilters.tsx
+++ b/apps/carbon/app/modules/parts/ui/UnitOfMeasure/UnitOfMeasuresTableFilters/UnitOfMeasuresTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -23,13 +22,8 @@ const UnitOfMeasuresTableFilters = () => {
</HStack>
<HStack>
{permissions.can("create", "parts") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Unit of Measure
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Unit of Measure</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderDeliveryForm/PurchaseOrderDeliveryForm.tsx b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderDeliveryForm/PurchaseOrderDeliveryForm.tsx
index 33c97c9e0a..8c2bca8a0d 100644
--- a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderDeliveryForm/PurchaseOrderDeliveryForm.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderDeliveryForm/PurchaseOrderDeliveryForm.tsx
@@ -62,7 +62,7 @@ const PurchaseOrderDeliveryForm = ({
validator={purchaseOrderDeliveryValidator}
defaultValues={initialValues}
>
- <Card className="w-full">
+ <Card>
<CardHeader>
<CardTitle>Delivery</CardTitle>
</CardHeader>
diff --git a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderForm/PurchaseOrderForm.tsx b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderForm/PurchaseOrderForm.tsx
index 921824e579..ad91823612 100644
--- a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderForm/PurchaseOrderForm.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderForm/PurchaseOrderForm.tsx
@@ -60,7 +60,7 @@ const PurchaseOrderForm = ({ initialValues }: PurchaseOrderFormProps) => {
validator={purchaseOrderValidator}
defaultValues={initialValues}
>
- <Card className="w-full">
+ <Card>
<CardHeader>
<CardTitle>
{isEditing ? "Purchase Order" : "New Purchase Order"}
diff --git a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderHeader/PurchaseOrderHeader.tsx b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderHeader/PurchaseOrderHeader.tsx
index 1d83c6e7c9..a40af9e129 100644
--- a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderHeader/PurchaseOrderHeader.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderHeader/PurchaseOrderHeader.tsx
@@ -1,4 +1,5 @@
import {
+ Button,
Card,
CardAction,
CardContent,
@@ -10,7 +11,7 @@ import {
MenubarItem,
VStack,
} from "@carbon/react";
-import { Button, Stack } from "@chakra-ui/react";
+import { Stack } from "@chakra-ui/react";
import { useParams } from "@remix-run/react";
import { useMemo } from "react";
import { FaHistory } from "react-icons/fa";
@@ -87,7 +88,7 @@ const PurchaseOrderHeader = () => {
</Menubar>
)}
- <Card className="w-full">
+ <Card>
<HStack className="justify-between items-start">
<CardHeader>
<CardTitle>{routeData?.purchaseOrder?.purchaseOrderId}</CardTitle>
@@ -96,7 +97,11 @@ const PurchaseOrderHeader = () => {
</CardDescription>
</CardHeader>
<CardAction>
- <Button onClick={() => alert("TODO")} leftIcon={<FaHistory />}>
+ <Button
+ variant="secondary"
+ onClick={() => alert("TODO")}
+ leftIcon={<FaHistory />}
+ >
Supplier Details
</Button>
</CardAction>
diff --git a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderInternalDocuments/PurchaseOrderDocuments.tsx b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderInternalDocuments/PurchaseOrderDocuments.tsx
index 7f8519e3bd..6d0d866950 100644
--- a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderInternalDocuments/PurchaseOrderDocuments.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderInternalDocuments/PurchaseOrderDocuments.tsx
@@ -47,7 +47,7 @@ const PurchaseOrderDocuments = ({
return (
<>
- <Card className="w-full">
+ <Card>
<HStack className="justify-between items-start">
<CardHeader>
<CardTitle>
diff --git a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderLineForm/PurchaseOrderLineForm.tsx b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderLineForm/PurchaseOrderLineForm.tsx
index 0388a81ae2..8ae11d4ee8 100644
--- a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderLineForm/PurchaseOrderLineForm.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderLineForm/PurchaseOrderLineForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -340,7 +339,7 @@ const PurchaseOrderLineForm = ({
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button size="md" variant="ghost" onClick={onClose}>
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderLines/PurchaseOrderLines.tsx b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderLines/PurchaseOrderLines.tsx
index ff5ed768ad..998875bef2 100644
--- a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderLines/PurchaseOrderLines.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderLines/PurchaseOrderLines.tsx
@@ -1,14 +1,13 @@
import {
+ Button,
Card,
CardAction,
CardContent,
- CardDescription,
CardHeader,
CardTitle,
HStack,
} from "@carbon/react";
import {
- Button,
Checkbox,
IconButton,
Menu,
@@ -287,14 +286,11 @@ const PurchaseOrderLines = () => {
<HStack className="justify-between items-start">
<CardHeader>
<CardTitle>Purchase Order Lines</CardTitle>
- <CardDescription>
- {routeData?.purchaseOrder?.purchaseOrderNumber}
- </CardDescription>
</CardHeader>
<CardAction>
{canEdit && isEditable && (
- <Button colorScheme="brand" as={Link} to="new">
- New
+ <Button asChild>
+ <Link to="new">New</Link>
</Button>
)}
</CardAction>
diff --git a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderPaymentForm/PurchaseOrderPaymentForm.tsx b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderPaymentForm/PurchaseOrderPaymentForm.tsx
index 3108c43ab4..e6fc9557a9 100644
--- a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderPaymentForm/PurchaseOrderPaymentForm.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderPaymentForm/PurchaseOrderPaymentForm.tsx
@@ -50,7 +50,7 @@ const PurchaseOrderPaymentForm = ({
validator={purchaseOrderPaymentValidator}
defaultValues={initialValues}
>
- <Card className="w-full">
+ <Card>
<CardHeader>
<CardTitle>Payment</CardTitle>
</CardHeader>
diff --git a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderSidebar/usePurchaseOrderSidebar.tsx b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderSidebar/usePurchaseOrderSidebar.tsx
index 6ab0455e0b..9aaa485529 100644
--- a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderSidebar/usePurchaseOrderSidebar.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderSidebar/usePurchaseOrderSidebar.tsx
@@ -1,3 +1,8 @@
+import { BsBank, BsCreditCard, BsListCheck, BsTruck } from "react-icons/bs";
+import {
+ HiOutlineDocumentArrowDown,
+ HiOutlineDocumentArrowUp,
+} from "react-icons/hi2";
import { usePermissions } from "~/hooks";
import type { Role } from "~/types";
@@ -17,33 +22,39 @@ export function usePurchaseOrderSidebar({
{
name: "Summary",
to: "details",
+ icon: BsBank,
},
{
name: "Lines",
to: "lines",
count: lines,
+ icon: BsListCheck,
},
{
name: "Delivery",
to: "delivery",
role: ["employee", "supplier"],
+ icon: BsTruck,
},
{
name: "Payment",
to: "payment",
role: ["employee"],
+ icon: BsCreditCard,
},
{
name: "Internal Attachments",
to: "internal",
role: ["employee"],
count: internalDocuments,
+ icon: HiOutlineDocumentArrowDown,
},
{
name: "External Attachments",
to: "external",
role: ["employee", "supplier"],
count: externalDocuments,
+ icon: HiOutlineDocumentArrowUp,
},
].filter(
(item) =>
diff --git a/apps/carbon/app/modules/purchasing/ui/PurchaseOrders/PurchaseOrdersTableFilters/PurchaseOrdersTableFilters.tsx b/apps/carbon/app/modules/purchasing/ui/PurchaseOrders/PurchaseOrdersTableFilters/PurchaseOrdersTableFilters.tsx
index 98c17d3e56..32f7fbef09 100644
--- a/apps/carbon/app/modules/purchasing/ui/PurchaseOrders/PurchaseOrdersTableFilters/PurchaseOrdersTableFilters.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/PurchaseOrders/PurchaseOrdersTableFilters/PurchaseOrdersTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack, Select } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack, Select } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -66,13 +65,8 @@ const PurchaseOrdersTableFilters = () => {
</HStack>
<HStack>
{permissions.can("create", "purchasing") && (
- <Button
- as={Link}
- to={path.to.newPurchaseOrder}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Purchase Order
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={path.to.newPurchaseOrder}>New Purchase Order</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierContactForm/SupplierContactForm.tsx b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierContactForm/SupplierContactForm.tsx
index ccca4651ed..0599fdb1e6 100644
--- a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierContactForm/SupplierContactForm.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierContactForm/SupplierContactForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -84,12 +83,7 @@ const SupplierContactForm = ({ initialValues }: SupplierContactFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierContacts/SupplierContacts.tsx b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierContacts/SupplierContacts.tsx
index 2fee0775f8..a1d338db8b 100644
--- a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierContacts/SupplierContacts.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierContacts/SupplierContacts.tsx
@@ -1,4 +1,5 @@
import {
+ Button,
Card,
CardAction,
CardContent,
@@ -7,7 +8,7 @@ import {
HStack,
useDisclosure,
} from "@carbon/react";
-import { Button, List, ListItem } from "@chakra-ui/react";
+import { List, ListItem } from "@chakra-ui/react";
import { Link, Outlet, useNavigate, useParams } from "@remix-run/react";
import { useCallback, useState } from "react";
import { BsPencilSquare } from "react-icons/bs";
@@ -88,15 +89,15 @@ const SupplierContacts = ({ contacts }: SupplierContactsProps) => {
return (
<>
- <Card className="w-full">
+ <Card>
<HStack className="justify-between items-start">
<CardHeader>
<CardTitle>Contacts</CardTitle>
</CardHeader>
<CardAction>
{canEdit && (
- <Button colorScheme="brand" as={Link} to="new">
- New
+ <Button asChild>
+ <Link to="new">New</Link>
</Button>
)}
</CardAction>
diff --git a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierForm/SupplierForm.tsx b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierForm/SupplierForm.tsx
index 21fa2289a2..2dac047f46 100644
--- a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierForm/SupplierForm.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierForm/SupplierForm.tsx
@@ -52,7 +52,7 @@ const SupplierForm = ({ initialValues }: SupplierFormProps) => {
validator={supplierValidator}
defaultValues={initialValues}
>
- <Card className="w-full">
+ <Card>
<CardHeader>
<CardTitle>
{isEditing ? "Supplier Overview" : "New Supplier"}
diff --git a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierHeader/SupplierHeader.tsx b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierHeader/SupplierHeader.tsx
index 71842375f0..91d380f657 100644
--- a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierHeader/SupplierHeader.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierHeader/SupplierHeader.tsx
@@ -1,4 +1,5 @@
import {
+ Button,
Card,
CardAction,
CardContent,
@@ -7,7 +8,7 @@ import {
HStack,
VStack,
} from "@carbon/react";
-import { Button, Stack } from "@chakra-ui/react";
+import { Stack } from "@chakra-ui/react";
import { useParams } from "@remix-run/react";
import { FaHistory } from "react-icons/fa";
import { useRouteData } from "~/hooks";
@@ -34,13 +35,17 @@ const SupplierHeader = () => {
return (
<VStack>
- <Card className="w-full">
+ <Card>
<HStack className="justify-between items-start">
<CardHeader>
<CardTitle>{routeData?.supplier?.name}</CardTitle>
</CardHeader>
<CardAction>
- <Button onClick={() => alert("TODO")} leftIcon={<FaHistory />}>
+ <Button
+ variant="secondary"
+ onClick={() => alert("TODO")}
+ leftIcon={<FaHistory />}
+ >
Supplier Details
</Button>
</CardAction>
diff --git a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierLocationForm/SupplierLocationForm.tsx b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierLocationForm/SupplierLocationForm.tsx
index 5338cc9c23..dcadb86136 100644
--- a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierLocationForm/SupplierLocationForm.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierLocationForm/SupplierLocationForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -67,12 +66,7 @@ const SupplierLocationForm = ({ initialValues }: SupplierLocationFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierLocations/SupplierLocations.tsx b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierLocations/SupplierLocations.tsx
index ac52ff6c07..c326cb18a0 100644
--- a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierLocations/SupplierLocations.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierLocations/SupplierLocations.tsx
@@ -1,4 +1,5 @@
import {
+ Button,
Card,
CardAction,
CardContent,
@@ -7,7 +8,7 @@ import {
HStack,
useDisclosure,
} from "@carbon/react";
-import { Button, List, ListItem } from "@chakra-ui/react";
+import { List, ListItem } from "@chakra-ui/react";
import { Link, Outlet, useNavigate, useParams } from "@remix-run/react";
import { useCallback, useState } from "react";
import { BsPencilSquare } from "react-icons/bs";
@@ -75,15 +76,15 @@ const SupplierLocations = ({ locations }: SupplierLocationsProps) => {
return (
<>
- <Card className="w-full">
+ <Card>
<HStack className="justify-between items-start">
<CardHeader>
<CardTitle>Locations</CardTitle>
</CardHeader>
<CardAction>
{canEdit && (
- <Button colorScheme="brand" as={Link} to="new">
- New
+ <Button asChild>
+ <Link to="new">New</Link>
</Button>
)}
</CardAction>
diff --git a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierPaymentForm/SupplierPaymentForm.tsx b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierPaymentForm/SupplierPaymentForm.tsx
index 5296f79226..000f1bc73b 100644
--- a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierPaymentForm/SupplierPaymentForm.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierPaymentForm/SupplierPaymentForm.tsx
@@ -53,7 +53,7 @@ const SupplierPaymentForm = ({ initialValues }: SupplierPaymentFormProps) => {
validator={supplierPaymentValidator}
defaultValues={initialValues}
>
- <Card className="w-full">
+ <Card>
<CardHeader>
<CardTitle>Supplier Payment</CardTitle>
</CardHeader>
diff --git a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierShippingForm/SupplierShippingForm.tsx b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierShippingForm/SupplierShippingForm.tsx
index 3e74e40afe..35cadb34e6 100644
--- a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierShippingForm/SupplierShippingForm.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierShippingForm/SupplierShippingForm.tsx
@@ -59,7 +59,7 @@ const SupplierShippingForm = ({ initialValues }: SupplierShippingFormProps) => {
validator={supplierShippingValidator}
defaultValues={initialValues}
>
- <Card className="w-full">
+ <Card>
<CardHeader>
<CardTitle>Supplier Shipping</CardTitle>
</CardHeader>
diff --git a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierSidebar/useSupplierSidebar.tsx b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierSidebar/useSupplierSidebar.tsx
index 1a80c2e45a..8899c15c45 100644
--- a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierSidebar/useSupplierSidebar.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierSidebar/useSupplierSidebar.tsx
@@ -1,3 +1,10 @@
+import {
+ BsBank,
+ BsCreditCard,
+ BsFillPersonLinesFill,
+ BsFillPinMapFill,
+ BsTruck,
+} from "react-icons/bs";
import { usePermissions } from "~/hooks";
import type { Role } from "~/types";
@@ -12,28 +19,33 @@ export function useSupplierSidebar({ contacts, locations }: Props) {
{
name: "Overview",
to: "",
+ icon: BsBank,
},
{
name: "Contacts",
to: "contacts",
role: ["employee"],
count: contacts,
+ icon: BsFillPersonLinesFill,
},
{
name: "Locations",
to: "locations",
role: ["employee", "supplier"],
count: locations,
+ icon: BsFillPinMapFill,
},
{
name: "Payments",
to: "payments",
role: ["employee"],
+ icon: BsCreditCard,
},
{
name: "Shipping",
to: "shipping",
role: ["employee"],
+ icon: BsTruck,
},
].filter(
(item) =>
diff --git a/apps/carbon/app/modules/purchasing/ui/SupplierTypes/SupplierTypeForm/SupplierTypeForm.tsx b/apps/carbon/app/modules/purchasing/ui/SupplierTypes/SupplierTypeForm/SupplierTypeForm.tsx
index 5fa3ba1622..e453e51bab 100644
--- a/apps/carbon/app/modules/purchasing/ui/SupplierTypes/SupplierTypeForm/SupplierTypeForm.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/SupplierTypes/SupplierTypeForm/SupplierTypeForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -59,12 +58,7 @@ const SupplierTypeForm = ({ initialValues }: SupplierTypeFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/purchasing/ui/SupplierTypes/SupplierTypesTableFilters/SupplierTypesTableFilters.tsx b/apps/carbon/app/modules/purchasing/ui/SupplierTypes/SupplierTypesTableFilters/SupplierTypesTableFilters.tsx
index 6e0d798430..6266077ab3 100644
--- a/apps/carbon/app/modules/purchasing/ui/SupplierTypes/SupplierTypesTableFilters/SupplierTypesTableFilters.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/SupplierTypes/SupplierTypesTableFilters/SupplierTypesTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -24,13 +23,8 @@ const SupplierTypesTableFilters = () => {
</HStack>
<HStack>
{permissions.can("create", "purchasing") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Supplier Type
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Supplier Type</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/purchasing/ui/Suppliers/SuppliersTable/SuppliersTable.tsx b/apps/carbon/app/modules/purchasing/ui/Suppliers/SuppliersTable/SuppliersTable.tsx
index 5e5957db6c..3b3b423600 100644
--- a/apps/carbon/app/modules/purchasing/ui/Suppliers/SuppliersTable/SuppliersTable.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/Suppliers/SuppliersTable/SuppliersTable.tsx
@@ -1,14 +1,9 @@
-import {
- Button,
- ButtonGroup,
- IconButton,
- Link,
- MenuItem,
-} from "@chakra-ui/react";
+import { Button } from "@carbon/react";
+import { Link, MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useMemo } from "react";
-import { BsPencilSquare, BsPlus } from "react-icons/bs";
+import { BsPencilSquare } from "react-icons/bs";
import { Table } from "~/components";
import type { Supplier } from "~/modules/purchasing";
import { path } from "~/utils/path";
@@ -46,48 +41,30 @@ const SuppliersTable = memo(({ data, count }: SuppliersTableProps) => {
id: "orders",
header: "Orders",
cell: ({ row }) => (
- <ButtonGroup size="sm" isAttached variant="outline">
- <Button
- onClick={() =>
- navigate(
- `${path.to.purchaseOrders}?supplierId=${row.original.id}`
- )
- }
- >
- {row.original.orderCount ?? 0} Orders
- </Button>
- <IconButton
- aria-label="New Order"
- icon={<BsPlus />}
- onClick={() =>
- navigate(
- `${path.to.newPurchaseOrder}?supplierId=${row.original.id}`
- )
- }
- />
- </ButtonGroup>
+ <Button
+ variant="secondary"
+ onClick={() =>
+ navigate(
+ `${path.to.purchaseOrders}?supplierId=${row.original.id}`
+ )
+ }
+ >
+ {row.original.orderCount ?? 0} Orders
+ </Button>
),
},
{
id: "parts",
header: "Parts",
cell: ({ row }) => (
- <ButtonGroup size="sm" isAttached variant="outline">
- <Button
- onClick={() =>
- navigate(`${path.to.partsSearch}?supplierId=${row.original.id}`)
- }
- >
- {row.original.partCount ?? 0} Parts
- </Button>
- <IconButton
- aria-label="New Part"
- icon={<BsPlus />}
- onClick={() =>
- navigate(`${path.to.newPart}?supplierId=${row.original.id}`)
- }
- />
- </ButtonGroup>
+ <Button
+ variant="secondary"
+ onClick={() =>
+ navigate(`${path.to.partsSearch}?supplierId=${row.original.id}`)
+ }
+ >
+ {row.original.partCount ?? 0} Parts
+ </Button>
),
},
];
diff --git a/apps/carbon/app/modules/purchasing/ui/Suppliers/SuppliersTableFilters/SuppliersTableFilters.tsx b/apps/carbon/app/modules/purchasing/ui/Suppliers/SuppliersTableFilters/SuppliersTableFilters.tsx
index 4da255673c..2a27ead58f 100644
--- a/apps/carbon/app/modules/purchasing/ui/Suppliers/SuppliersTableFilters/SuppliersTableFilters.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/Suppliers/SuppliersTableFilters/SuppliersTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack, Select } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack, Select } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -76,13 +75,8 @@ const SuppliersTableFilters = ({
</HStack>
<HStack>
{permissions.can("create", "purchasing") && (
- <Button
- as={Link}
- to={path.to.newSupplier}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Supplier
+ <Button leftIcon={<IoMdAdd />} asChild>
+ <Link to={path.to.newSupplier}>New Supplier</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Abilities/AbilitiesTableFilters/AbilitiesTableFilters.tsx b/apps/carbon/app/modules/resources/ui/Abilities/AbilitiesTableFilters/AbilitiesTableFilters.tsx
index 90be58c756..2b0bb6892d 100644
--- a/apps/carbon/app/modules/resources/ui/Abilities/AbilitiesTableFilters/AbilitiesTableFilters.tsx
+++ b/apps/carbon/app/modules/resources/ui/Abilities/AbilitiesTableFilters/AbilitiesTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -24,13 +23,8 @@ const AbilitiesTableFilters = () => {
</HStack>
<HStack>
{permissions.can("create", "resources") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Ability
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Ability</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Abilities/AbilityForm/AbilityForm.tsx b/apps/carbon/app/modules/resources/ui/Abilities/AbilityForm/AbilityForm.tsx
index 3f55241311..848f7849ee 100644
--- a/apps/carbon/app/modules/resources/ui/Abilities/AbilityForm/AbilityForm.tsx
+++ b/apps/carbon/app/modules/resources/ui/Abilities/AbilityForm/AbilityForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -98,12 +97,7 @@ const AbilityForm = ({ initialValues }: AbilityFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Abilities/EmployeeAbilityForm/EmployeeAbilityForm.tsx b/apps/carbon/app/modules/resources/ui/Abilities/EmployeeAbilityForm/EmployeeAbilityForm.tsx
index ace079e56b..cfd92898c0 100644
--- a/apps/carbon/app/modules/resources/ui/Abilities/EmployeeAbilityForm/EmployeeAbilityForm.tsx
+++ b/apps/carbon/app/modules/resources/ui/Abilities/EmployeeAbilityForm/EmployeeAbilityForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -121,12 +120,7 @@ const EmployeeAbilityForm = ({
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Attributes/AttributeCategoriesTable/AttributesCategoriesTable.tsx b/apps/carbon/app/modules/resources/ui/Attributes/AttributeCategoriesTable/AttributesCategoriesTable.tsx
index 953ae5c9f0..5e6e4e07d5 100644
--- a/apps/carbon/app/modules/resources/ui/Attributes/AttributeCategoriesTable/AttributesCategoriesTable.tsx
+++ b/apps/carbon/app/modules/resources/ui/Attributes/AttributeCategoriesTable/AttributesCategoriesTable.tsx
@@ -1,17 +1,10 @@
-import {
- Badge,
- Button,
- ButtonGroup,
- IconButton,
- Link,
- MenuItem,
- useDisclosure,
-} from "@chakra-ui/react";
+import { Button, useDisclosure } from "@carbon/react";
+import { Badge, Link, MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo, useState } from "react";
import { BiAddToQueue } from "react-icons/bi";
-import { BsListUl, BsPencilSquare, BsPlus } from "react-icons/bs";
+import { BsListUl, BsPencilSquare } from "react-icons/bs";
import { IoMdTrash } from "react-icons/io";
import { Table } from "~/components";
import { ConfirmDelete } from "~/components/Modals";
@@ -58,33 +51,21 @@ const AttributeCategoriesTable = memo(
{
header: "Attributes",
cell: ({ row }) => (
- <ButtonGroup size="sm" isAttached variant="outline">
- <Button
- onClick={() => {
- navigate(
- `${path.to.attributeCategoryList(
- row.original.id
- )}?${params?.toString()}`
- );
- }}
- >
- {Array.isArray(row.original.userAttribute)
- ? row.original.userAttribute?.length ?? 0
- : 0}{" "}
- Attributes
- </Button>
- <IconButton
- aria-label="Add attribute"
- icon={<BsPlus />}
- onClick={() => {
- navigate(
- `${path.to.newAttributeForCategory(
- row.original.id
- )}?${params?.toString()}`
- );
- }}
- />
- </ButtonGroup>
+ <Button
+ variant="secondary"
+ onClick={() => {
+ navigate(
+ `${path.to.attributeCategoryList(
+ row.original.id
+ )}?${params?.toString()}`
+ );
+ }}
+ >
+ {Array.isArray(row.original.userAttribute)
+ ? row.original.userAttribute?.length ?? 0
+ : 0}{" "}
+ Attributes
+ </Button>
),
},
{
diff --git a/apps/carbon/app/modules/resources/ui/Attributes/AttributeCategoriesTableFilters/AttributeCategoriesTableFilters.tsx b/apps/carbon/app/modules/resources/ui/Attributes/AttributeCategoriesTableFilters/AttributeCategoriesTableFilters.tsx
index 2e3a2488b6..70a8ba7d2b 100644
--- a/apps/carbon/app/modules/resources/ui/Attributes/AttributeCategoriesTableFilters/AttributeCategoriesTableFilters.tsx
+++ b/apps/carbon/app/modules/resources/ui/Attributes/AttributeCategoriesTableFilters/AttributeCategoriesTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -24,13 +23,8 @@ const AttributeCategoriesTableFilters = () => {
</HStack>
<HStack>
{permissions.can("update", "resources") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Attribute Category
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Attribute Category</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Attributes/AttributeCategoryDetail/AttributeCategoryDetail.tsx b/apps/carbon/app/modules/resources/ui/Attributes/AttributeCategoryDetail/AttributeCategoryDetail.tsx
index 732ab27913..02691d1521 100644
--- a/apps/carbon/app/modules/resources/ui/Attributes/AttributeCategoryDetail/AttributeCategoryDetail.tsx
+++ b/apps/carbon/app/modules/resources/ui/Attributes/AttributeCategoryDetail/AttributeCategoryDetail.tsx
@@ -1,6 +1,5 @@
-import { HStack, useDisclosure } from "@carbon/react";
+import { Button, HStack, useDisclosure } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -186,13 +185,8 @@ const AttributeCategoryDetail = ({
)}
</DrawerBody>
<DrawerFooter>
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- size="md"
- >
- New Attribute
+ <Button asChild size="md">
+ <Link to={`new?${params.toString()}`}>New Attribute</Link>
</Button>
</DrawerFooter>
</DrawerContent>
diff --git a/apps/carbon/app/modules/resources/ui/Attributes/AttributeCategoryForm/AttributeCategoryForm.tsx b/apps/carbon/app/modules/resources/ui/Attributes/AttributeCategoryForm/AttributeCategoryForm.tsx
index 1c36ce0aae..52767d9e27 100644
--- a/apps/carbon/app/modules/resources/ui/Attributes/AttributeCategoryForm/AttributeCategoryForm.tsx
+++ b/apps/carbon/app/modules/resources/ui/Attributes/AttributeCategoryForm/AttributeCategoryForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -63,12 +62,7 @@ const AttributeCategoryForm = ({
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Attributes/AttributeForm/AttributeForm.tsx b/apps/carbon/app/modules/resources/ui/Attributes/AttributeForm/AttributeForm.tsx
index b2c646b91e..39e08b4cc2 100644
--- a/apps/carbon/app/modules/resources/ui/Attributes/AttributeForm/AttributeForm.tsx
+++ b/apps/carbon/app/modules/resources/ui/Attributes/AttributeForm/AttributeForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -111,12 +110,7 @@ const AttributeForm = ({
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Contractors/ContractorForm/ContractorForm.tsx b/apps/carbon/app/modules/resources/ui/Contractors/ContractorForm/ContractorForm.tsx
index 2942871eeb..71ab4af5a7 100644
--- a/apps/carbon/app/modules/resources/ui/Contractors/ContractorForm/ContractorForm.tsx
+++ b/apps/carbon/app/modules/resources/ui/Contractors/ContractorForm/ContractorForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -85,12 +84,7 @@ const ContractorForm = ({ initialValues }: ContractorFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Contractors/ContractorsTableFilters/ContractorsTableFilters.tsx b/apps/carbon/app/modules/resources/ui/Contractors/ContractorsTableFilters/ContractorsTableFilters.tsx
index 9e06097fd7..73983e5cbd 100644
--- a/apps/carbon/app/modules/resources/ui/Contractors/ContractorsTableFilters/ContractorsTableFilters.tsx
+++ b/apps/carbon/app/modules/resources/ui/Contractors/ContractorsTableFilters/ContractorsTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack, Select } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack, Select } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -50,13 +49,8 @@ const ContractorsTableFilters = ({
</HStack>
<HStack>
{permissions.can("create", "resources") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Contractor
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Contractor</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Departments/DepartmentForm/DepartmentForm.tsx b/apps/carbon/app/modules/resources/ui/Departments/DepartmentForm/DepartmentForm.tsx
index 8c017a88c9..65d43f2c40 100644
--- a/apps/carbon/app/modules/resources/ui/Departments/DepartmentForm/DepartmentForm.tsx
+++ b/apps/carbon/app/modules/resources/ui/Departments/DepartmentForm/DepartmentForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -58,12 +57,7 @@ const DepartmentForm = ({ initialValues }: DepartmentFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Departments/DepartmentsTableFilters/DepartmentsTableFilters.tsx b/apps/carbon/app/modules/resources/ui/Departments/DepartmentsTableFilters/DepartmentsTableFilters.tsx
index ded1ef1caa..b9901705c5 100644
--- a/apps/carbon/app/modules/resources/ui/Departments/DepartmentsTableFilters/DepartmentsTableFilters.tsx
+++ b/apps/carbon/app/modules/resources/ui/Departments/DepartmentsTableFilters/DepartmentsTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -24,13 +23,8 @@ const DepartmentsTableFilters = () => {
</HStack>
<HStack>
{permissions.can("create", "resources") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Department
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Department</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Equipment/EquipmentForm/EquipmentForm.tsx b/apps/carbon/app/modules/resources/ui/Equipment/EquipmentForm/EquipmentForm.tsx
index d12a72b1c4..1cfad1b76e 100644
--- a/apps/carbon/app/modules/resources/ui/Equipment/EquipmentForm/EquipmentForm.tsx
+++ b/apps/carbon/app/modules/resources/ui/Equipment/EquipmentForm/EquipmentForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -135,12 +134,7 @@ const EquipmentForm = ({
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Equipment/EquipmentTypeDetail/EquipmentTypeDetail.tsx b/apps/carbon/app/modules/resources/ui/Equipment/EquipmentTypeDetail/EquipmentTypeDetail.tsx
index e1ecc4f539..60690135dd 100644
--- a/apps/carbon/app/modules/resources/ui/Equipment/EquipmentTypeDetail/EquipmentTypeDetail.tsx
+++ b/apps/carbon/app/modules/resources/ui/Equipment/EquipmentTypeDetail/EquipmentTypeDetail.tsx
@@ -1,6 +1,11 @@
-import { ActionMenu, HStack, VStack, useDisclosure } from "@carbon/react";
import {
+ ActionMenu,
Button,
+ HStack,
+ VStack,
+ useDisclosure,
+} from "@carbon/react";
+import {
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -13,7 +18,7 @@ import {
import { Link } from "@remix-run/react";
import { useState } from "react";
import { BsPencilSquare } from "react-icons/bs";
-import { IoMdTrash } from "react-icons/io";
+import { IoMdAdd, IoMdTrash } from "react-icons/io";
import { ConfirmDelete } from "~/components/Modals";
import { useUrlParams } from "~/hooks";
import type { EquipmentTypeDetailType } from "~/modules/resources";
@@ -91,13 +96,8 @@ const EquipmentTypeDetail = ({
)}
</DrawerBody>
<DrawerFooter>
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- size="md"
- >
- New Equipment
+ <Button asChild leftIcon={<IoMdAdd />} size="md">
+ <Link to={`new?${params.toString()}`}>New Equipment</Link>
</Button>
</DrawerFooter>
</DrawerContent>
diff --git a/apps/carbon/app/modules/resources/ui/Equipment/EquipmentTypeForm/EquipmentTypeForm.tsx b/apps/carbon/app/modules/resources/ui/Equipment/EquipmentTypeForm/EquipmentTypeForm.tsx
index 4932eef6ac..5810201419 100644
--- a/apps/carbon/app/modules/resources/ui/Equipment/EquipmentTypeForm/EquipmentTypeForm.tsx
+++ b/apps/carbon/app/modules/resources/ui/Equipment/EquipmentTypeForm/EquipmentTypeForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -68,12 +67,7 @@ const EquipmentTypeForm = ({
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Equipment/EquipmentTypesTable/EquipmentTypesTable.tsx b/apps/carbon/app/modules/resources/ui/Equipment/EquipmentTypesTable/EquipmentTypesTable.tsx
index b0c3a50100..47cd453c2f 100644
--- a/apps/carbon/app/modules/resources/ui/Equipment/EquipmentTypesTable/EquipmentTypesTable.tsx
+++ b/apps/carbon/app/modules/resources/ui/Equipment/EquipmentTypesTable/EquipmentTypesTable.tsx
@@ -1,12 +1,5 @@
-import { HStack, useDisclosure } from "@carbon/react";
-import {
- Button,
- ButtonGroup,
- Icon,
- IconButton,
- Link,
- MenuItem,
-} from "@chakra-ui/react";
+import { Button, HStack, useDisclosure } from "@carbon/react";
+import { Icon, Link, MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo, useState } from "react";
@@ -15,7 +8,6 @@ import {
BsFillCheckCircleFill,
BsListUl,
BsPencilSquare,
- BsPlus,
} from "react-icons/bs";
import { IoMdTrash } from "react-icons/io";
import { Table } from "~/components";
@@ -81,33 +73,21 @@ const EquipmentTypesTable = memo(
{
header: "Equipment",
cell: ({ row }) => (
- <ButtonGroup size="sm" isAttached variant="outline">
- <Button
- onClick={() => {
- navigate(
- `${path.to.equipmentTypeList(
- row.original.id
- )}?${params?.toString()}`
- );
- }}
- >
- {Array.isArray(row.original.equipment)
- ? row.original.equipment?.length ?? 0
- : 0}{" "}
- Units
- </Button>
- <IconButton
- aria-label="Add unit"
- icon={<BsPlus />}
- onClick={() => {
- navigate(
- `${path.to.newEquipment(
- row.original.id
- )}?${params?.toString()}`
- );
- }}
- />
- </ButtonGroup>
+ <Button
+ variant="secondary"
+ onClick={() => {
+ navigate(
+ `${path.to.equipmentTypeList(
+ row.original.id
+ )}?${params?.toString()}`
+ );
+ }}
+ >
+ {Array.isArray(row.original.equipment)
+ ? row.original.equipment?.length ?? 0
+ : 0}{" "}
+ Units
+ </Button>
),
},
{
diff --git a/apps/carbon/app/modules/resources/ui/Equipment/EquipmentTypesTableFilters/EquipmentTypesTableFilters.tsx b/apps/carbon/app/modules/resources/ui/Equipment/EquipmentTypesTableFilters/EquipmentTypesTableFilters.tsx
index 8e8e6d658d..eeb4b5bd39 100644
--- a/apps/carbon/app/modules/resources/ui/Equipment/EquipmentTypesTableFilters/EquipmentTypesTableFilters.tsx
+++ b/apps/carbon/app/modules/resources/ui/Equipment/EquipmentTypesTableFilters/EquipmentTypesTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -24,13 +23,8 @@ const EquipmentTypesTableFilters = () => {
</HStack>
<HStack>
{permissions.can("update", "resources") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Equipment Type
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Equipment Type</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Holidays/HolidayForm/HolidayForm.tsx b/apps/carbon/app/modules/resources/ui/Holidays/HolidayForm/HolidayForm.tsx
index d38f64ba1b..7b047042b8 100644
--- a/apps/carbon/app/modules/resources/ui/Holidays/HolidayForm/HolidayForm.tsx
+++ b/apps/carbon/app/modules/resources/ui/Holidays/HolidayForm/HolidayForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -55,12 +54,7 @@ const HolidayForm = ({ initialValues }: HolidayFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Holidays/HolidaysTableFilters/HolidaysTableFilters.tsx b/apps/carbon/app/modules/resources/ui/Holidays/HolidaysTableFilters/HolidaysTableFilters.tsx
index 64a9479f0a..3cfa66f923 100644
--- a/apps/carbon/app/modules/resources/ui/Holidays/HolidaysTableFilters/HolidaysTableFilters.tsx
+++ b/apps/carbon/app/modules/resources/ui/Holidays/HolidaysTableFilters/HolidaysTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack, Select } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack, Select } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -52,13 +51,8 @@ const HolidaysTableFilters = ({ years }: HolidaysTableFiltersProps) => {
</HStack>
<HStack>
{permissions.can("create", "resources") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Holiday
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Holiday</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Locations/LocationForm/LocationForm.tsx b/apps/carbon/app/modules/resources/ui/Locations/LocationForm/LocationForm.tsx
index 2f0460426e..31a1fbef86 100644
--- a/apps/carbon/app/modules/resources/ui/Locations/LocationForm/LocationForm.tsx
+++ b/apps/carbon/app/modules/resources/ui/Locations/LocationForm/LocationForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -63,12 +62,7 @@ const LocationForm = ({ initialValues }: LocationFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Locations/LocationsTableFilters/LocationsTableFilters.tsx b/apps/carbon/app/modules/resources/ui/Locations/LocationsTableFilters/LocationsTableFilters.tsx
index 2d5fb46731..3b4a0776c6 100644
--- a/apps/carbon/app/modules/resources/ui/Locations/LocationsTableFilters/LocationsTableFilters.tsx
+++ b/apps/carbon/app/modules/resources/ui/Locations/LocationsTableFilters/LocationsTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -24,13 +23,8 @@ const LocationsTableFilters = () => {
</HStack>
<HStack>
{permissions.can("create", "resources") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Location
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Location</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Partners/PartnerForm/PartnerForm.tsx b/apps/carbon/app/modules/resources/ui/Partners/PartnerForm/PartnerForm.tsx
index de97da6359..64c8610690 100644
--- a/apps/carbon/app/modules/resources/ui/Partners/PartnerForm/PartnerForm.tsx
+++ b/apps/carbon/app/modules/resources/ui/Partners/PartnerForm/PartnerForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, Select, VStack, useMount } from "@carbon/react";
+import { Button, HStack, Select, VStack, useMount } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -100,12 +99,7 @@ const PartnerForm = ({ initialValues }: PartnerFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Partners/PartnersTableFilters/PartnersTableFilters.tsx b/apps/carbon/app/modules/resources/ui/Partners/PartnersTableFilters/PartnersTableFilters.tsx
index f2383666b2..6f6602ba98 100644
--- a/apps/carbon/app/modules/resources/ui/Partners/PartnersTableFilters/PartnersTableFilters.tsx
+++ b/apps/carbon/app/modules/resources/ui/Partners/PartnersTableFilters/PartnersTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack, Select } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack, Select } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -48,13 +47,8 @@ const PartnersTableFilters = ({ abilities }: PartnersTableFiltersProps) => {
</HStack>
<HStack>
{permissions.can("create", "resources") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Partner
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Partner</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/People/PeopleTableFilters/PeopleTableFilters.tsx b/apps/carbon/app/modules/resources/ui/People/PeopleTableFilters/PeopleTableFilters.tsx
index 498b9752ec..32cd8c63e2 100644
--- a/apps/carbon/app/modules/resources/ui/People/PeopleTableFilters/PeopleTableFilters.tsx
+++ b/apps/carbon/app/modules/resources/ui/People/PeopleTableFilters/PeopleTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack, Select } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack, Select } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -70,13 +69,10 @@ const PeopleTableFilters = ({ employeeTypes }: PeopleTableFiltersProps) => {
</HStack>
<HStack>
{permissions.can("create", "users") && (
- <Button
- as={Link}
- to={`${path.to.newEmployee}?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Employee
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`${path.to.newEmployee}?${params.toString()}`}>
+ New Employee
+ </Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Person/PersonAbilities/PersonAbilities.tsx b/apps/carbon/app/modules/resources/ui/Person/PersonAbilities/PersonAbilities.tsx
index a348a72be1..1856ef6e24 100644
--- a/apps/carbon/app/modules/resources/ui/Person/PersonAbilities/PersonAbilities.tsx
+++ b/apps/carbon/app/modules/resources/ui/Person/PersonAbilities/PersonAbilities.tsx
@@ -38,7 +38,7 @@ const AbilityIcons: Record<
const PersonAbilities = ({ abilities }: PersonAbilitiesProps) => {
return (
- <Card className="w-full">
+ <Card>
<CardHeader>
<CardTitle>Abilities</CardTitle>
</CardHeader>
diff --git a/apps/carbon/app/modules/resources/ui/Person/PersonDaysOff/PersonDaysOff.tsx b/apps/carbon/app/modules/resources/ui/Person/PersonDaysOff/PersonDaysOff.tsx
index b23c27cf02..bd620b4f95 100644
--- a/apps/carbon/app/modules/resources/ui/Person/PersonDaysOff/PersonDaysOff.tsx
+++ b/apps/carbon/app/modules/resources/ui/Person/PersonDaysOff/PersonDaysOff.tsx
@@ -4,7 +4,7 @@ type PersonDaysOffProps = {};
const PersonDaysOff = (props: PersonDaysOffProps) => {
return (
- <Card className="w-full">
+ <Card>
<CardHeader>
<CardTitle>Days Off</CardTitle>
</CardHeader>
diff --git a/apps/carbon/app/modules/resources/ui/Person/PersonHeader/PersonHeader.tsx b/apps/carbon/app/modules/resources/ui/Person/PersonHeader/PersonHeader.tsx
index f4caef7709..b2061aaf3c 100644
--- a/apps/carbon/app/modules/resources/ui/Person/PersonHeader/PersonHeader.tsx
+++ b/apps/carbon/app/modules/resources/ui/Person/PersonHeader/PersonHeader.tsx
@@ -1,5 +1,4 @@
-import { CardTitle, HStack, VStack } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, CardTitle, HStack, VStack } from "@carbon/react";
import { BsEnvelopeFill } from "react-icons/bs";
import { Avatar } from "~/components";
import { usePermissions } from "~/hooks";
@@ -19,7 +18,7 @@ const PersonHeader = ({ user }: { user: Account }) => {
<HStack>
{permissions.can("create", "messaging") && (
<Button
- size="md"
+ variant="secondary"
leftIcon={<BsEnvelopeFill />}
onClick={() => alert("TODO")}
>
diff --git a/apps/carbon/app/modules/resources/ui/Person/PersonOvertime/PersonOvertime.tsx b/apps/carbon/app/modules/resources/ui/Person/PersonOvertime/PersonOvertime.tsx
index c1f494fcf1..690e980220 100644
--- a/apps/carbon/app/modules/resources/ui/Person/PersonOvertime/PersonOvertime.tsx
+++ b/apps/carbon/app/modules/resources/ui/Person/PersonOvertime/PersonOvertime.tsx
@@ -4,7 +4,7 @@ type PersonOvertimeProps = {};
const PersonOvertime = (props: PersonOvertimeProps) => {
return (
- <Card className="w-full">
+ <Card>
<CardHeader>
<CardTitle>Overtime</CardTitle>
</CardHeader>
diff --git a/apps/carbon/app/modules/resources/ui/Person/PersonTabs/PersonTabs.tsx b/apps/carbon/app/modules/resources/ui/Person/PersonTabs/PersonTabs.tsx
index 2c417bc6d6..56c7908222 100644
--- a/apps/carbon/app/modules/resources/ui/Person/PersonTabs/PersonTabs.tsx
+++ b/apps/carbon/app/modules/resources/ui/Person/PersonTabs/PersonTabs.tsx
@@ -37,7 +37,7 @@ const PersonsTabs = ({
if (!personId) throw new Error("Missing personId");
return (
- <Card className="w-full">
+ <Card>
<CardContent>
<Tabs colorScheme="gray">
<TabList>
diff --git a/apps/carbon/app/modules/resources/ui/Shifts/ShiftForm/ShiftForm.tsx b/apps/carbon/app/modules/resources/ui/Shifts/ShiftForm/ShiftForm.tsx
index a3a79c09dc..c9bd7664f6 100644
--- a/apps/carbon/app/modules/resources/ui/Shifts/ShiftForm/ShiftForm.tsx
+++ b/apps/carbon/app/modules/resources/ui/Shifts/ShiftForm/ShiftForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -77,12 +76,7 @@ const ShiftForm = ({ initialValues }: ShiftFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Shifts/ShiftsTableFilters/ShiftsTableFilters.tsx b/apps/carbon/app/modules/resources/ui/Shifts/ShiftsTableFilters/ShiftsTableFilters.tsx
index aa63eefa7f..03e127e062 100644
--- a/apps/carbon/app/modules/resources/ui/Shifts/ShiftsTableFilters/ShiftsTableFilters.tsx
+++ b/apps/carbon/app/modules/resources/ui/Shifts/ShiftsTableFilters/ShiftsTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack, Select } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack, Select } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -48,13 +47,8 @@ const ShiftsTableFilters = ({ locations }: ShiftsTableFiltersProps) => {
</HStack>
<HStack>
{permissions.can("create", "resources") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Shift
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Shift</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellForm/WorkCellForm.tsx b/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellForm/WorkCellForm.tsx
index 7880002845..c6d45aa955 100644
--- a/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellForm/WorkCellForm.tsx
+++ b/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellForm/WorkCellForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -84,12 +83,7 @@ const WorkCellForm = ({
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellTypeDetail/WorkCellTypeDetail.tsx b/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellTypeDetail/WorkCellTypeDetail.tsx
index da909a47ad..d2eff92690 100644
--- a/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellTypeDetail/WorkCellTypeDetail.tsx
+++ b/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellTypeDetail/WorkCellTypeDetail.tsx
@@ -1,6 +1,11 @@
-import { ActionMenu, HStack, VStack, useDisclosure } from "@carbon/react";
import {
+ ActionMenu,
Button,
+ HStack,
+ VStack,
+ useDisclosure,
+} from "@carbon/react";
+import {
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -98,13 +103,8 @@ const WorkCellTypeDetail = ({
)}
</DrawerBody>
<DrawerFooter>
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- size="md"
- >
- New Work Cell
+ <Button asChild size="md">
+ <Link to={`new?${params.toString()}`}>New Work Cell</Link>
</Button>
</DrawerFooter>
</DrawerContent>
diff --git a/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellTypeForm/WorkCellTypeForm.tsx b/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellTypeForm/WorkCellTypeForm.tsx
index c31641e3e0..d8851c6b50 100644
--- a/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellTypeForm/WorkCellTypeForm.tsx
+++ b/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellTypeForm/WorkCellTypeForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -68,12 +67,7 @@ const WorkCellTypeForm = ({
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellTypesTable/WorkCellTypesTable.tsx b/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellTypesTable/WorkCellTypesTable.tsx
index a23d91d4c8..2f2916a6a3 100644
--- a/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellTypesTable/WorkCellTypesTable.tsx
+++ b/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellTypesTable/WorkCellTypesTable.tsx
@@ -1,12 +1,5 @@
-import { HStack, useDisclosure } from "@carbon/react";
-import {
- Button,
- ButtonGroup,
- Icon,
- IconButton,
- Link,
- MenuItem,
-} from "@chakra-ui/react";
+import { Button, HStack, useDisclosure } from "@carbon/react";
+import { Icon, Link, MenuItem } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo, useState } from "react";
@@ -15,7 +8,6 @@ import {
BsFillCheckCircleFill,
BsListUl,
BsPencilSquare,
- BsPlus,
} from "react-icons/bs";
import { IoMdTrash } from "react-icons/io";
import { Table } from "~/components";
@@ -78,33 +70,21 @@ const WorkCellTypesTable = memo(({ data, count }: WorkCellTypesTableProps) => {
{
header: "Work Cells",
cell: ({ row }) => (
- <ButtonGroup size="sm" isAttached variant="outline">
- <Button
- onClick={() => {
- navigate(
- `${path.to.workCellTypeList(
- row.original.id
- )}?${params?.toString()}`
- );
- }}
- >
- {Array.isArray(row.original.workCell)
- ? row.original.workCell.length
- : 0}{" "}
- Work Cells
- </Button>
- <IconButton
- aria-label="Add unit"
- icon={<BsPlus />}
- onClick={() => {
- navigate(
- `${path.to.newWorkCellUnit(
- row.original.id
- )}?${params?.toString()}`
- );
- }}
- />
- </ButtonGroup>
+ <Button
+ variant="secondary"
+ onClick={() => {
+ navigate(
+ `${path.to.workCellTypeList(
+ row.original.id
+ )}?${params?.toString()}`
+ );
+ }}
+ >
+ {Array.isArray(row.original.workCell)
+ ? row.original.workCell.length
+ : 0}{" "}
+ Work Cells
+ </Button>
),
},
{
diff --git a/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellTypesTableFilters/WorkCellTypesTableFilters.tsx b/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellTypesTableFilters/WorkCellTypesTableFilters.tsx
index 65cb71c1d3..e0860debbb 100644
--- a/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellTypesTableFilters/WorkCellTypesTableFilters.tsx
+++ b/apps/carbon/app/modules/resources/ui/WorkCells/WorkCellTypesTableFilters/WorkCellTypesTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -24,13 +23,8 @@ const WorkCellTypesTableFilters = () => {
</HStack>
<HStack>
{permissions.can("update", "resources") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Work Cell Type
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Work Cell Type</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/sales/ui/Customer/CustomerContactForm/CustomerContactForm.tsx b/apps/carbon/app/modules/sales/ui/Customer/CustomerContactForm/CustomerContactForm.tsx
index 7b49758879..5ebdef316e 100644
--- a/apps/carbon/app/modules/sales/ui/Customer/CustomerContactForm/CustomerContactForm.tsx
+++ b/apps/carbon/app/modules/sales/ui/Customer/CustomerContactForm/CustomerContactForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -84,12 +83,7 @@ const CustomerContactForm = ({ initialValues }: CustomerContactFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/sales/ui/Customer/CustomerContacts/CustomerContacts.tsx b/apps/carbon/app/modules/sales/ui/Customer/CustomerContacts/CustomerContacts.tsx
index 272142c28d..081a774608 100644
--- a/apps/carbon/app/modules/sales/ui/Customer/CustomerContacts/CustomerContacts.tsx
+++ b/apps/carbon/app/modules/sales/ui/Customer/CustomerContacts/CustomerContacts.tsx
@@ -76,7 +76,7 @@ const CustomerContacts = ({ contacts }: CustomerContactsProps) => {
return (
<>
- <Card className="w-full">
+ <Card>
<HStack className="justify-between items-start">
<CardHeader>
<CardTitle>Contacts</CardTitle>
diff --git a/apps/carbon/app/modules/sales/ui/Customer/CustomerForm/CustomerForm.tsx b/apps/carbon/app/modules/sales/ui/Customer/CustomerForm/CustomerForm.tsx
index 40ae0cca8b..9bd001184f 100644
--- a/apps/carbon/app/modules/sales/ui/Customer/CustomerForm/CustomerForm.tsx
+++ b/apps/carbon/app/modules/sales/ui/Customer/CustomerForm/CustomerForm.tsx
@@ -52,7 +52,7 @@ const CustomerForm = ({ initialValues }: CustomerFormProps) => {
validator={customerValidator}
defaultValues={initialValues}
>
- <Card className="w-full">
+ <Card>
<CardHeader>
<CardTitle>
{isEditing ? "Customer Overview" : "New Customer"}
diff --git a/apps/carbon/app/modules/sales/ui/Customer/CustomerHeader/CustomerHeader.tsx b/apps/carbon/app/modules/sales/ui/Customer/CustomerHeader/CustomerHeader.tsx
index 0f81316554..a15bee04ce 100644
--- a/apps/carbon/app/modules/sales/ui/Customer/CustomerHeader/CustomerHeader.tsx
+++ b/apps/carbon/app/modules/sales/ui/Customer/CustomerHeader/CustomerHeader.tsx
@@ -33,7 +33,7 @@ const CustomerHeader = () => {
return (
<VStack>
- <Card className="w-full">
+ <Card>
<HStack className="justify-between items-start">
<CardHeader>
<CardTitle>{routeData?.customer?.name}</CardTitle>
diff --git a/apps/carbon/app/modules/sales/ui/Customer/CustomerLocations/CustomerLocations.tsx b/apps/carbon/app/modules/sales/ui/Customer/CustomerLocations/CustomerLocations.tsx
index 99298516e1..f1fff9c55b 100644
--- a/apps/carbon/app/modules/sales/ui/Customer/CustomerLocations/CustomerLocations.tsx
+++ b/apps/carbon/app/modules/sales/ui/Customer/CustomerLocations/CustomerLocations.tsx
@@ -63,7 +63,7 @@ const CustomerLocations = ({ locations }: CustomerLocationsProps) => {
return (
<>
- <Card className="w-full">
+ <Card>
<HStack className="justify-between items-start">
<CardHeader>
<CardTitle>Locations</CardTitle>
diff --git a/apps/carbon/app/modules/sales/ui/Customer/CustomerPaymentForm/CustomerPaymentForm.tsx b/apps/carbon/app/modules/sales/ui/Customer/CustomerPaymentForm/CustomerPaymentForm.tsx
index 5c5e852679..34a254e8e6 100644
--- a/apps/carbon/app/modules/sales/ui/Customer/CustomerPaymentForm/CustomerPaymentForm.tsx
+++ b/apps/carbon/app/modules/sales/ui/Customer/CustomerPaymentForm/CustomerPaymentForm.tsx
@@ -53,7 +53,7 @@ const CustomerPaymentForm = ({ initialValues }: CustomerPaymentFormProps) => {
validator={customerPaymentValidator}
defaultValues={initialValues}
>
- <Card className="w-full">
+ <Card>
<CardHeader>
<CardTitle>Customer Payment</CardTitle>
</CardHeader>
diff --git a/apps/carbon/app/modules/sales/ui/Customer/CustomerShippingForm/CustomerShippingForm.tsx b/apps/carbon/app/modules/sales/ui/Customer/CustomerShippingForm/CustomerShippingForm.tsx
index f9104b8851..953d80343f 100644
--- a/apps/carbon/app/modules/sales/ui/Customer/CustomerShippingForm/CustomerShippingForm.tsx
+++ b/apps/carbon/app/modules/sales/ui/Customer/CustomerShippingForm/CustomerShippingForm.tsx
@@ -59,7 +59,7 @@ const CustomerShippingForm = ({ initialValues }: CustomerShippingFormProps) => {
validator={customerShippingValidator}
defaultValues={initialValues}
>
- <Card className="w-full">
+ <Card>
<CardHeader>
<CardTitle>Customer Shipping</CardTitle>
</CardHeader>
diff --git a/apps/carbon/app/modules/sales/ui/Customer/CustomerSidebar/useCustomerSidebar.tsx b/apps/carbon/app/modules/sales/ui/Customer/CustomerSidebar/useCustomerSidebar.tsx
index 48c78db187..e3eb705d8f 100644
--- a/apps/carbon/app/modules/sales/ui/Customer/CustomerSidebar/useCustomerSidebar.tsx
+++ b/apps/carbon/app/modules/sales/ui/Customer/CustomerSidebar/useCustomerSidebar.tsx
@@ -1,3 +1,10 @@
+import {
+ BsBank,
+ BsCreditCard,
+ BsFillPersonLinesFill,
+ BsFillPinMapFill,
+ BsTruck,
+} from "react-icons/bs";
import { usePermissions } from "~/hooks";
import type { Role } from "~/types";
@@ -12,28 +19,33 @@ export function useCustomerSidebar({ contacts, locations }: Props) {
{
name: "Overview",
to: "",
+ icon: BsBank,
},
{
name: "Contacts",
to: "contacts",
role: ["employee"],
count: contacts,
+ icon: BsFillPersonLinesFill,
},
{
name: "Locations",
to: "locations",
role: ["employee", "customer"],
count: locations,
+ icon: BsFillPinMapFill,
},
{
name: "Payments",
to: "payments",
role: ["employee"],
+ icon: BsCreditCard,
},
{
name: "Shipping",
to: "shipping",
role: ["employee"],
+ icon: BsTruck,
},
].filter(
(item) =>
diff --git a/apps/carbon/app/modules/sales/ui/CustomerTypes/CustomerTypeForm/CustomerTypeForm.tsx b/apps/carbon/app/modules/sales/ui/CustomerTypes/CustomerTypeForm/CustomerTypeForm.tsx
index 3aca960f52..111d9b9b50 100644
--- a/apps/carbon/app/modules/sales/ui/CustomerTypes/CustomerTypeForm/CustomerTypeForm.tsx
+++ b/apps/carbon/app/modules/sales/ui/CustomerTypes/CustomerTypeForm/CustomerTypeForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -59,12 +58,7 @@ const CustomerTypeForm = ({ initialValues }: CustomerTypeFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/sales/ui/CustomerTypes/CustomerTypesTableFilters/CustomerTypesTableFilters.tsx b/apps/carbon/app/modules/sales/ui/CustomerTypes/CustomerTypesTableFilters/CustomerTypesTableFilters.tsx
index f675158f8e..aa4e2d76c4 100644
--- a/apps/carbon/app/modules/sales/ui/CustomerTypes/CustomerTypesTableFilters/CustomerTypesTableFilters.tsx
+++ b/apps/carbon/app/modules/sales/ui/CustomerTypes/CustomerTypesTableFilters/CustomerTypesTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -24,13 +23,8 @@ const CustomerTypesTableFilters = () => {
</HStack>
<HStack>
{permissions.can("create", "sales") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Customer Type
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Customer Type</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/sales/ui/Customers/CustomersTable/CustomersTable.tsx b/apps/carbon/app/modules/sales/ui/Customers/CustomersTable/CustomersTable.tsx
index 91b0c46366..c9a42a0df0 100644
--- a/apps/carbon/app/modules/sales/ui/Customers/CustomersTable/CustomersTable.tsx
+++ b/apps/carbon/app/modules/sales/ui/Customers/CustomersTable/CustomersTable.tsx
@@ -40,22 +40,15 @@ const CustomersTable = memo(({ data, count }: CustomersTableProps) => {
// id: "orders",
// header: "Orders",
// cell: ({ row }) => (
- // <ButtonGroup size="sm" isAttached variant="outline">
+ //
// <Button
+ // variant="secondary"
// onClick={() =>
// navigate(`${path.to.salesOrders}?customerId=${row.original.id}`)
// }
// >
// {row.original.orderCount ?? 0} Orders
// </Button>
- // <IconButton
- // aria-label="New Order"
- // icon={<BsPlus />}
- // onClick={() =>
- // navigate(`${path.to.newPurchaseOrder}?customerId=${row.original.id}`)
- // }
- // />
- // </ButtonGroup>
// ),
// },
];
diff --git a/apps/carbon/app/modules/sales/ui/Customers/CustomersTableFilters/CustomersTableFilters.tsx b/apps/carbon/app/modules/sales/ui/Customers/CustomersTableFilters/CustomersTableFilters.tsx
index 6dbf97492b..f0048f44c3 100644
--- a/apps/carbon/app/modules/sales/ui/Customers/CustomersTableFilters/CustomersTableFilters.tsx
+++ b/apps/carbon/app/modules/sales/ui/Customers/CustomersTableFilters/CustomersTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack, Select } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack, Select } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -75,13 +74,10 @@ const CustomersTableFilters = ({
</HStack>
<HStack>
{permissions.can("create", "sales") && (
- <Button
- as={Link}
- to={`${path.to.newCustomer}?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Customer
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`${path.to.newCustomer}?${params.toString()}`}>
+ New Customer
+ </Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/settings/ui/Company/CompanyForm/CompanyForm.tsx b/apps/carbon/app/modules/settings/ui/Company/CompanyForm/CompanyForm.tsx
index dff4d36140..81b836e951 100644
--- a/apps/carbon/app/modules/settings/ui/Company/CompanyForm/CompanyForm.tsx
+++ b/apps/carbon/app/modules/settings/ui/Company/CompanyForm/CompanyForm.tsx
@@ -38,7 +38,7 @@ const CompanyForm = ({ company }: CompanyFormProps) => {
</Grid>
<Hidden name="intent" value="about" />
- <Submit size="sm">Save</Submit>
+ <Submit>Save</Submit>
</VStack>
</ValidatedForm>
</div>
diff --git a/apps/carbon/app/modules/settings/ui/Company/CompanyLogoForm/CompanyLogoForm.tsx b/apps/carbon/app/modules/settings/ui/Company/CompanyLogoForm/CompanyLogoForm.tsx
index eee59fe60e..7fd4a12a94 100644
--- a/apps/carbon/app/modules/settings/ui/Company/CompanyLogoForm/CompanyLogoForm.tsx
+++ b/apps/carbon/app/modules/settings/ui/Company/CompanyLogoForm/CompanyLogoForm.tsx
@@ -1,5 +1,5 @@
-import { File, VStack, useNotification } from "@carbon/react";
-import { Avatar, Button } from "@chakra-ui/react";
+import { Button, File, VStack, useNotification } from "@carbon/react";
+import { Avatar } from "@chakra-ui/react";
import { useSubmit } from "@remix-run/react";
import type { ChangeEvent } from "react";
import { useSupabase } from "~/lib/supabase";
@@ -77,7 +77,7 @@ const CompanyLogoForm = ({ company }: CompanyLogoFormProps) => {
</File>
{company.logo && (
- <Button variant="outline" onClick={deleteImage}>
+ <Button variant="secondary" onClick={deleteImage}>
Remove
</Button>
)}
diff --git a/apps/carbon/app/modules/settings/ui/Sequences/SequenceForm/SequenceForm.tsx b/apps/carbon/app/modules/settings/ui/Sequences/SequenceForm/SequenceForm.tsx
index 7f1ecdac91..ea4d767b9c 100644
--- a/apps/carbon/app/modules/settings/ui/Sequences/SequenceForm/SequenceForm.tsx
+++ b/apps/carbon/app/modules/settings/ui/Sequences/SequenceForm/SequenceForm.tsx
@@ -1,6 +1,5 @@
-import { Heading, HStack, VStack } from "@carbon/react";
+import { Button, Heading, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -99,12 +98,7 @@ const SequenceForm = ({ initialValues }: SequenceFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/shared/ui/Notes/Notes.tsx b/apps/carbon/app/modules/shared/ui/Notes/Notes.tsx
index 34dbe69692..10a16a91c2 100644
--- a/apps/carbon/app/modules/shared/ui/Notes/Notes.tsx
+++ b/apps/carbon/app/modules/shared/ui/Notes/Notes.tsx
@@ -1,6 +1,6 @@
-import { HStack, HTML, VStack } from "@carbon/react";
+import { Button, HStack, HTML, VStack } from "@carbon/react";
import { formatTimeAgo } from "@carbon/utils";
-import { Button, Grid } from "@chakra-ui/react";
+import { Grid } from "@chakra-ui/react";
import { Form } from "@remix-run/react";
import { Fragment } from "react";
import { ValidatedForm } from "remix-validated-form";
@@ -53,12 +53,7 @@ const Notes = ({ documentId, notes }: NotesProps) => {
{/* @ts-ignore */}
{user.id === note.user.id && (
<Form method="post" action={path.to.deleteNote(note.id)}>
- <Button
- type="submit"
- variant="link"
- fontWeight="normal"
- size="md"
- >
+ <Button type="submit" variant="link" size="md">
Delete
</Button>
</Form>
diff --git a/apps/carbon/app/modules/users/ui/Customers/CustomerAccountsTableFilters/CustomerAccountsTableFilters.tsx b/apps/carbon/app/modules/users/ui/Customers/CustomerAccountsTableFilters/CustomerAccountsTableFilters.tsx
index 12917a9b13..aedf9055b1 100644
--- a/apps/carbon/app/modules/users/ui/Customers/CustomerAccountsTableFilters/CustomerAccountsTableFilters.tsx
+++ b/apps/carbon/app/modules/users/ui/Customers/CustomerAccountsTableFilters/CustomerAccountsTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack, Select } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack, Select } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -72,13 +71,8 @@ const CustomerAccountsTableFilters = ({
</HStack>
<HStack>
{permissions.can("create", "users") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Customer
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Customer</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/users/ui/DeactivateUsersModal/DeactivateUsersModal.tsx b/apps/carbon/app/modules/users/ui/DeactivateUsersModal/DeactivateUsersModal.tsx
index 9ad24dcc3e..3fb56b0392 100644
--- a/apps/carbon/app/modules/users/ui/DeactivateUsersModal/DeactivateUsersModal.tsx
+++ b/apps/carbon/app/modules/users/ui/DeactivateUsersModal/DeactivateUsersModal.tsx
@@ -1,6 +1,5 @@
-import { HStack } from "@carbon/react";
+import { Button, HStack } from "@carbon/react";
import {
- Button,
Modal,
ModalBody,
ModalCloseButton,
@@ -64,7 +63,7 @@ const DeactivateUsersModal = ({
/>
))}
<input type="hidden" name="redirectTo" value={redirectTo} />
- <Button colorScheme="red" type="submit">
+ <Button variant="destructive" type="submit">
Deactivate
</Button>
</ValidatedForm>
diff --git a/apps/carbon/app/modules/users/ui/EmployeeTypes/EmployeeTypeForm/EmployeeTypeForm.tsx b/apps/carbon/app/modules/users/ui/EmployeeTypes/EmployeeTypeForm/EmployeeTypeForm.tsx
index 6a4bde668b..7e90dd6973 100644
--- a/apps/carbon/app/modules/users/ui/EmployeeTypes/EmployeeTypeForm/EmployeeTypeForm.tsx
+++ b/apps/carbon/app/modules/users/ui/EmployeeTypes/EmployeeTypeForm/EmployeeTypeForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -100,12 +99,7 @@ const EmployeeTypeForm = ({ initialValues }: EmployeeTypeFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/users/ui/EmployeeTypes/EmployeeTypesTableFilters/EmployeeTypesTableFilters.tsx b/apps/carbon/app/modules/users/ui/EmployeeTypes/EmployeeTypesTableFilters/EmployeeTypesTableFilters.tsx
index 2a389655d8..ee8a10b775 100644
--- a/apps/carbon/app/modules/users/ui/EmployeeTypes/EmployeeTypesTableFilters/EmployeeTypesTableFilters.tsx
+++ b/apps/carbon/app/modules/users/ui/EmployeeTypes/EmployeeTypesTableFilters/EmployeeTypesTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -24,13 +23,8 @@ const EmployeeTypesTableFilters = () => {
</HStack>
<HStack>
{permissions.can("create", "users") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Employee Type
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Employee Type</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/users/ui/Employees/BulkEditPermissionsForm/BulkEditPermissionsForm.tsx b/apps/carbon/app/modules/users/ui/Employees/BulkEditPermissionsForm/BulkEditPermissionsForm.tsx
index 3766fd1b5c..31945a7a5b 100644
--- a/apps/carbon/app/modules/users/ui/Employees/BulkEditPermissionsForm/BulkEditPermissionsForm.tsx
+++ b/apps/carbon/app/modules/users/ui/Employees/BulkEditPermissionsForm/BulkEditPermissionsForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack, useMount } from "@carbon/react";
+import { Button, HStack, VStack, useMount } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -119,12 +118,7 @@ const BulkEditPermissions = ({
<Hidden name="data" value={JSON.stringify(permissions)} />
<HStack className="my-4">
<Submit>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/users/ui/Employees/EmployeePermissionsForm/EmployeePermissionsForm.tsx b/apps/carbon/app/modules/users/ui/Employees/EmployeePermissionsForm/EmployeePermissionsForm.tsx
index 846c4b796e..29fae5d1e5 100644
--- a/apps/carbon/app/modules/users/ui/Employees/EmployeePermissionsForm/EmployeePermissionsForm.tsx
+++ b/apps/carbon/app/modules/users/ui/Employees/EmployeePermissionsForm/EmployeePermissionsForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -90,12 +89,7 @@ const EmployeePermissionsForm = ({
<DrawerFooter>
<HStack>
<Submit>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/users/ui/Employees/EmployeesTableFilters/EmployeesTableFilters.tsx b/apps/carbon/app/modules/users/ui/Employees/EmployeesTableFilters/EmployeesTableFilters.tsx
index 32107da18b..545cb26fae 100644
--- a/apps/carbon/app/modules/users/ui/Employees/EmployeesTableFilters/EmployeesTableFilters.tsx
+++ b/apps/carbon/app/modules/users/ui/Employees/EmployeesTableFilters/EmployeesTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack, Select } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack, Select } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -72,13 +71,8 @@ const EmployeesTableFilters = ({
</HStack>
<HStack>
{permissions.can("create", "users") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Employee
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Employee</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/users/ui/Groups/GroupsForm/GroupsForm.tsx b/apps/carbon/app/modules/users/ui/Groups/GroupsForm/GroupsForm.tsx
index 4b820a6936..76124ca455 100644
--- a/apps/carbon/app/modules/users/ui/Groups/GroupsForm/GroupsForm.tsx
+++ b/apps/carbon/app/modules/users/ui/Groups/GroupsForm/GroupsForm.tsx
@@ -1,6 +1,5 @@
-import { HStack, VStack } from "@carbon/react";
+import { Button, HStack, VStack } from "@carbon/react";
import {
- Button,
Drawer,
DrawerBody,
DrawerCloseButton,
@@ -59,12 +58,7 @@ const GroupForm = ({ initialValues }: GroupFormProps) => {
<DrawerFooter>
<HStack>
<Submit isDisabled={isDisabled}>Save</Submit>
- <Button
- size="md"
- colorScheme="gray"
- variant="solid"
- onClick={onClose}
- >
+ <Button size="md" variant="solid" onClick={onClose}>
Cancel
</Button>
</HStack>
diff --git a/apps/carbon/app/modules/users/ui/Groups/GroupsTableFilters/GroupsTableFilters.tsx b/apps/carbon/app/modules/users/ui/Groups/GroupsTableFilters/GroupsTableFilters.tsx
index 6aad53da36..1750eb5514 100644
--- a/apps/carbon/app/modules/users/ui/Groups/GroupsTableFilters/GroupsTableFilters.tsx
+++ b/apps/carbon/app/modules/users/ui/Groups/GroupsTableFilters/GroupsTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -24,13 +23,8 @@ const GroupsTableFilters = () => {
</HStack>
<HStack>
{permissions.can("create", "users") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Group
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Group</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/modules/users/ui/ResendInviteModal/ResendInviteModal.tsx b/apps/carbon/app/modules/users/ui/ResendInviteModal/ResendInviteModal.tsx
index 01ba7bc1de..e7cb303812 100644
--- a/apps/carbon/app/modules/users/ui/ResendInviteModal/ResendInviteModal.tsx
+++ b/apps/carbon/app/modules/users/ui/ResendInviteModal/ResendInviteModal.tsx
@@ -1,6 +1,5 @@
-import { HStack } from "@carbon/react";
+import { Button, HStack } from "@carbon/react";
import {
- Button,
Modal,
ModalBody,
ModalCloseButton,
@@ -64,9 +63,7 @@ const ResendInviteModal = ({
value={id}
/>
))}
- <Button colorScheme="brand" type="submit">
- Send
- </Button>
+ <Button type="submit">Send</Button>
</ValidatedForm>
</HStack>
</ModalFooter>
diff --git a/apps/carbon/app/modules/users/ui/Suppliers/SupplierAccountsTableFilters/SupplierAccountsTableFilters.tsx b/apps/carbon/app/modules/users/ui/Suppliers/SupplierAccountsTableFilters/SupplierAccountsTableFilters.tsx
index bb23561498..55bffef506 100644
--- a/apps/carbon/app/modules/users/ui/Suppliers/SupplierAccountsTableFilters/SupplierAccountsTableFilters.tsx
+++ b/apps/carbon/app/modules/users/ui/Suppliers/SupplierAccountsTableFilters/SupplierAccountsTableFilters.tsx
@@ -1,5 +1,4 @@
-import { HStack, Select } from "@carbon/react";
-import { Button } from "@chakra-ui/react";
+import { Button, HStack, Select } from "@carbon/react";
import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
@@ -72,13 +71,8 @@ const SupplierAccountsTableFilters = ({
</HStack>
<HStack>
{permissions.can("create", "users") && (
- <Button
- as={Link}
- to={`new?${params.toString()}`}
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Supplier
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to={`new?${params.toString()}`}>New Supplier</Link>
</Button>
)}
</HStack>
diff --git a/apps/carbon/app/root.tsx b/apps/carbon/app/root.tsx
index 02e858b372..6cfc90d1c1 100644
--- a/apps/carbon/app/root.tsx
+++ b/apps/carbon/app/root.tsx
@@ -66,7 +66,7 @@ function Document({
<title>{title}</title>
<Links />
</head>
- <body>
+ <body className="bg-background">
{children}
<ScrollRestoration />
<Scripts />
diff --git a/apps/carbon/app/routes/_public+/forgot-password.tsx b/apps/carbon/app/routes/_public+/forgot-password.tsx
index 4426d87737..f28265262d 100644
--- a/apps/carbon/app/routes/_public+/forgot-password.tsx
+++ b/apps/carbon/app/routes/_public+/forgot-password.tsx
@@ -114,7 +114,7 @@ export default function ForgotPasswordRoute() {
</Alert>
)}
<Input name="email" label="Email" />
- <Submit w="full">Search</Submit>
+ <Submit className="w-full">Search</Submit>
</VStack>
</ValidatedForm>
</div>
diff --git a/apps/carbon/app/routes/_public+/login.tsx b/apps/carbon/app/routes/_public+/login.tsx
index c5a86a34d1..7ef12ccfe8 100644
--- a/apps/carbon/app/routes/_public+/login.tsx
+++ b/apps/carbon/app/routes/_public+/login.tsx
@@ -100,7 +100,7 @@ export default function LoginRoute() {
<Input name="email" label="Email" />
<Password name="password" label="Password" type="password" />
<Input name="redirectTo" value={redirectTo} type="hidden" />
- <Submit w="full">Sign in</Submit>
+ <Submit className="w-full">Sign in</Submit>
<Link to={path.to.forgotPassword} color={useColor("black")}>
Forgot password?
</Link>
diff --git a/apps/carbon/app/routes/_public+/reset-password.tsx b/apps/carbon/app/routes/_public+/reset-password.tsx
index 33c1448d71..99c4f995ed 100644
--- a/apps/carbon/app/routes/_public+/reset-password.tsx
+++ b/apps/carbon/app/routes/_public+/reset-password.tsx
@@ -74,9 +74,10 @@ export default function ResetPasswordRoute() {
<Password name="password" label="New Password" />
<HStack spacing={4}>
- <Submit w="full">Reset Password</Submit>
+ <Submit>Reset Password</Submit>
<Button
size="md"
+ variant="solid"
onClick={() => navigate(path.to.authenticatedRoot)}
>
Skip
diff --git a/apps/carbon/app/routes/onboarding+/company.tsx b/apps/carbon/app/routes/onboarding+/company.tsx
index edfe74fee1..1ea7ce8541 100644
--- a/apps/carbon/app/routes/onboarding+/company.tsx
+++ b/apps/carbon/app/routes/onboarding+/company.tsx
@@ -155,6 +155,7 @@ export default function OnboardingUser() {
<ModalFooter>
<HStack>
<Button
+ variant="solid"
isDisabled={!previous}
size="md"
disabled
diff --git a/apps/carbon/app/routes/onboarding+/user.tsx b/apps/carbon/app/routes/onboarding+/user.tsx
index 2113483183..c91bac62e1 100644
--- a/apps/carbon/app/routes/onboarding+/user.tsx
+++ b/apps/carbon/app/routes/onboarding+/user.tsx
@@ -124,6 +124,7 @@ export default function OnboardingUser() {
<ModalFooter>
<HStack>
<Button
+ variant="solid"
isDisabled={!previous}
size="md"
disabled
diff --git a/apps/carbon/app/routes/x+/resources+/ability.$abilityId.tsx b/apps/carbon/app/routes/x+/resources+/ability.$abilityId.tsx
index 8262539ea7..112af65784 100644
--- a/apps/carbon/app/routes/x+/resources+/ability.$abilityId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/ability.$abilityId.tsx
@@ -1,6 +1,5 @@
-import { HStack, Heading, useDisclosure } from "@carbon/react";
+import { Button, HStack, Heading, useDisclosure } from "@carbon/react";
import {
- Button,
IconButton,
NumberDecrementStepper,
NumberIncrementStepper,
@@ -180,7 +179,7 @@ export default function AbilitiesRoute() {
fontWeight="bold"
fontSize="xl"
/>
- <Submit size="sm">Save</Submit>
+ <Submit>Save</Submit>
<IconButton
aria-label="Cancel"
variant="ghost"
@@ -245,7 +244,7 @@ export default function AbilitiesRoute() {
<Hidden name="intent" value="curve" />
<Hidden name="data" value={JSON.stringify(data)} />
<Hidden name="shadowWeeks" value={controlledShadowWeeks} />
- <Submit size="sm">Save</Submit>
+ <Submit>Save</Submit>
</ValidatedForm>
</HStack>
</HStack>
@@ -263,13 +262,8 @@ export default function AbilitiesRoute() {
</ParentSize>
</div>
<div className="absolute bottom--4 right-4 z-[3]">
- <Button
- as={Link}
- to="employee/new"
- colorScheme="brand"
- leftIcon={<IoMdAdd />}
- >
- New Employee
+ <Button asChild leftIcon={<IoMdAdd />}>
+ <Link to="employee/new">New Employee</Link>
</Button>
</div>
</div>
diff --git a/apps/carbon/app/styles/tailwind.css b/apps/carbon/app/styles/tailwind.css
index ee13b2d3a9..4c2e23b753 100644
--- a/apps/carbon/app/styles/tailwind.css
+++ b/apps/carbon/app/styles/tailwind.css
@@ -16,7 +16,7 @@
--secondary-foreground: 240 5.9% 10%;
--muted: 240 4.8% 95.9%;
--muted-foreground: 240 3.8% 46.1%;
- --accent: 240 4.8% 95.9%;
+ --accent: 240 4.8% 89.9%;
--accent-foreground: 240 5.9% 10%;
--destructive: 0 72.22% 50.59%;
--destructive-foreground: 0 0% 98%;
diff --git a/apps/carbon/app/types/index.ts b/apps/carbon/app/types/index.ts
index 108a28776a..a3488c173e 100644
--- a/apps/carbon/app/types/index.ts
+++ b/apps/carbon/app/types/index.ts
@@ -1,6 +1,7 @@
import type { OptionBase } from "@carbon/react";
import type { TypedResponse } from "@remix-run/node";
import type { ReactElement } from "react";
+import type { IconType } from "react-icons";
import type { ValidationErrorResponseData } from "remix-validated-form";
export type Action = {
@@ -30,7 +31,7 @@ export type ListItem = {
};
export type NavItem = Omit<Route, "icon"> & {
- icon: ReactElement;
+ icon: IconType;
color?: string;
};
diff --git a/packages/react/src/Button.tsx b/packages/react/src/Button.tsx
new file mode 100644
index 0000000000..bedbe26ae2
--- /dev/null
+++ b/packages/react/src/Button.tsx
@@ -0,0 +1,157 @@
+import { Slot, Slottable } from "@radix-ui/react-slot";
+import type { VariantProps } from "class-variance-authority";
+import { cva } from "class-variance-authority";
+import type { ButtonHTMLAttributes, ReactElement } from "react";
+import { cloneElement, forwardRef } from "react";
+
+import { cn } from "~/utils/cn";
+
+const base = [
+ "inline-flex items-center justify-center whitespace-nowrap",
+ "rounded-md font-medium ring-offset-background transition-colors",
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
+ "focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
+].join(" ");
+
+const buttonVariants = cva(base, {
+ variants: {
+ variant: {
+ primary:
+ "bg-primary text-primary-foreground hover:bg-primary/90 shadow-sm",
+ secondary:
+ "border border-input text-primary bg-background hover:bg-foreground/[0.05] shadow-sm",
+ solid: "bg-accent text-accent-foreground hover:bg-accent/80",
+ destructive:
+ "bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm",
+ ghost:
+ "bg-transparent hover:bg-accent text-accent-foreground hover:text-accent-foreground/90",
+ link: "text-primary hover:text-primary underline-offset-4 hover:underline",
+ },
+ size: {
+ md: "h-8 px-4 rounded-md text-sm",
+ lg: "h-11 px-6 rounded-lg text-base",
+ },
+ isDisabled: {
+ true: "opacity-50 disabled:cursor-not-allowed",
+ },
+ isLoading: {
+ true: "opacity-50 pointer-events-none",
+ },
+ isIcon: {
+ false: "px-4",
+ },
+ isRound: {
+ true: "rounded-full",
+ false: "rounded-md",
+ },
+ },
+ compoundVariants: [
+ {
+ size: "md",
+ isIcon: true,
+ class: "w-8",
+ },
+ {
+ size: "lg",
+ isIcon: true,
+ class: "w-11",
+ },
+ ],
+ defaultVariants: {
+ variant: "primary",
+ size: "md",
+ isRound: false,
+ },
+});
+
+export interface ButtonProps
+ extends ButtonHTMLAttributes<HTMLButtonElement>,
+ VariantProps<typeof buttonVariants> {
+ asChild?: boolean;
+ isDisabled?: boolean;
+ isIcon?: boolean;
+ isLoading?: boolean;
+ leftIcon?: ReactElement;
+ rightIcon?: ReactElement;
+ isRound?: boolean;
+}
+
+const Button = forwardRef<HTMLButtonElement, ButtonProps>(
+ (
+ {
+ asChild = false,
+ className,
+ variant,
+ size,
+ isDisabled,
+ isIcon = false,
+ isLoading,
+ isRound = false,
+ leftIcon,
+ rightIcon,
+ children,
+ ...props
+ },
+ ref
+ ) => {
+ const Comp = asChild ? Slot : "button";
+ return (
+ <Comp
+ {...props}
+ className={cn(
+ buttonVariants({
+ variant,
+ size,
+ isDisabled,
+ isIcon,
+ isLoading,
+ isRound,
+ className,
+ })
+ )}
+ type={undefined}
+ disabled={isDisabled || props.disabled}
+ role={asChild ? undefined : "button"}
+ ref={ref}
+ >
+ {isLoading && <Loader />}
+ {!isLoading &&
+ leftIcon &&
+ cloneElement(leftIcon, {
+ className: !leftIcon.props?.size
+ ? cn("mr-2 h-4 w-4", leftIcon.props.className)
+ : cn("mr-2", leftIcon.props.className),
+ })}
+ <Slottable>{children}</Slottable>
+ {rightIcon &&
+ cloneElement(rightIcon, {
+ className: !rightIcon.props?.size
+ ? cn("ml-2 h-4 w-4", rightIcon.props.className)
+ : cn("ml-2", rightIcon.props.className),
+ })}
+ </Comp>
+ );
+ }
+);
+Button.displayName = "Button";
+
+export { Button };
+
+function Loader() {
+ return (
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="24"
+ height="24"
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth="2"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ className="mr-2 h-4 w-4 animate-spin"
+ >
+ <path d="M21 12a9 9 0 1 1-6.219-8.56"></path>
+ </svg>
+ );
+}
diff --git a/packages/react/src/Button/index.ts b/packages/react/src/Button/index.ts
deleted file mode 100644
index 150e111716..0000000000
--- a/packages/react/src/Button/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import Button from "./Button";
-
-export default Button;
diff --git a/packages/react/src/Card.tsx b/packages/react/src/Card.tsx
index 27b7d93ca0..f8ddd6b9a2 100644
--- a/packages/react/src/Card.tsx
+++ b/packages/react/src/Card.tsx
@@ -7,7 +7,7 @@ const Card = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(
<div
ref={ref}
className={cn(
- "flex flex-col rounded-lg border border-border bg-card text-card-foreground shadow-sm",
+ "flex flex-col rounded-lg border border-border bg-card text-card-foreground shadow-sm w-full",
className
)}
{...props}
diff --git a/packages/react/src/DataTable/DataTablePagination.tsx b/packages/react/src/DataTable/DataTablePagination.tsx
index 3b7dafdb0e..2c51232d97 100644
--- a/packages/react/src/DataTable/DataTablePagination.tsx
+++ b/packages/react/src/DataTable/DataTablePagination.tsx
@@ -1,6 +1,7 @@
-import { Button, Menu, MenuButton, MenuItem, MenuList } from "@chakra-ui/react";
+import { Menu, MenuButton, MenuItem, MenuList } from "@chakra-ui/react";
import type { Table } from "@tanstack/react-table";
import { BsChevronLeft, BsChevronRight } from "react-icons/bs";
+import { Button } from "~/Button";
import { HStack } from "~/HStack";
interface DataTablePaginationProps<TData> {
@@ -45,6 +46,7 @@ export function DataTablePagination<TData>({
{table.getPageCount()}
</div>
<Button
+ variant="secondary"
isDisabled={!table.getCanPreviousPage()}
onClick={() => {
table.previousPage();
@@ -55,6 +57,7 @@ export function DataTablePagination<TData>({
Previous
</Button>
<Button
+ variant="secondary"
isDisabled={!table.getCanNextPage()}
onClick={() => {
table.nextPage();
diff --git a/packages/react/src/File.tsx b/packages/react/src/File.tsx
index b8bfb1f1f1..604827df3f 100644
--- a/packages/react/src/File.tsx
+++ b/packages/react/src/File.tsx
@@ -1,16 +1,14 @@
-import type { ButtonProps } from "@chakra-ui/react";
-import { Button, Input, InputGroup } from "@chakra-ui/react";
-import type { ChangeEvent, PropsWithChildren } from "react";
+import { Button } from "@carbon/react";
+import { Input, InputGroup } from "@chakra-ui/react";
+import type { ChangeEvent, ComponentPropsWithoutRef } from "react";
import { useRef } from "react";
-type FileProps = PropsWithChildren<
- Omit<ButtonProps, "onChange"> & {
- accept?: string;
- onChange: (e: ChangeEvent<HTMLInputElement>) => Promise<void>;
- }
->;
+type FileProps = ComponentPropsWithoutRef<"div"> & {
+ accept?: string;
+ onChange: (e: ChangeEvent<HTMLInputElement>) => Promise<void>;
+};
-const File = ({ accept, children, onChange, ...props }: FileProps) => {
+const File = ({ accept, className, children, onChange }: FileProps) => {
const fileInputRef = useRef<HTMLInputElement>(null);
return (
@@ -23,9 +21,7 @@ const File = ({ accept, children, onChange, ...props }: FileProps) => {
onChange={onChange}
/>
<Button
- variant="solid"
- colorScheme="brand"
- {...props}
+ className={className}
onClick={() => {
if (fileInputRef.current) fileInputRef.current.click();
}}
diff --git a/packages/react/src/Menubar.tsx b/packages/react/src/Menubar.tsx
index fdb6a79a0c..30528bcac4 100644
--- a/packages/react/src/Menubar.tsx
+++ b/packages/react/src/Menubar.tsx
@@ -1,8 +1,10 @@
-import type { ButtonProps, MenuButtonProps } from "@chakra-ui/react";
-import { Button, MenuButton } from "@chakra-ui/react";
+import type { MenuButtonProps } from "@chakra-ui/react";
+import { MenuButton } from "@chakra-ui/react";
import type { ComponentProps } from "react";
import { forwardRef } from "react";
import { MdExpandMore } from "react-icons/md";
+import type { ButtonProps } from "~/Button";
+import { Button } from "~/Button";
const Menubar = forwardRef<HTMLDivElement, ComponentProps<"div">>(
({ children, ...props }, ref) => {
@@ -24,7 +26,6 @@ const MenubarTrigger = forwardRef<HTMLButtonElement, MenuButtonProps>(
<MenuButton
ref={ref}
as={Button}
- size="sm"
variant="ghost"
rightIcon={<MdExpandMore />}
{...props}
@@ -39,7 +40,7 @@ MenubarTrigger.displayName = "MenubarTrigger";
const MenubarItem = forwardRef<HTMLButtonElement, ButtonProps>(
({ children, ...props }, ref) => {
return (
- <Button ref={ref} size="sm" variant="ghost" {...props}>
+ <Button ref={ref} variant="ghost" {...props}>
{children}
</Button>
);
diff --git a/packages/react/src/Button/BorderFollower.tsx b/packages/react/src/Submit/BorderFollower.tsx
similarity index 100%
rename from packages/react/src/Button/BorderFollower.tsx
rename to packages/react/src/Submit/BorderFollower.tsx
diff --git a/packages/react/src/Button/BorderMask.tsx b/packages/react/src/Submit/BorderMask.tsx
similarity index 100%
rename from packages/react/src/Button/BorderMask.tsx
rename to packages/react/src/Submit/BorderMask.tsx
diff --git a/packages/react/src/Button/Button.tsx b/packages/react/src/Submit/Submit.tsx
similarity index 100%
rename from packages/react/src/Button/Button.tsx
rename to packages/react/src/Submit/Submit.tsx
index 1c32fa0302..bd77485d37 100644
--- a/packages/react/src/Button/Button.tsx
+++ b/packages/react/src/Submit/Submit.tsx
@@ -1,8 +1,8 @@
import type { ButtonProps as ChakraButtonProps } from "@chakra-ui/react";
import { Box, Button as ChakraButton } from "@chakra-ui/react";
-import BorderMask from "./BorderMask";
-import BorderFollower from "./BorderFollower";
import { AnimatePresence, motion } from "framer-motion";
+import BorderFollower from "./BorderFollower";
+import BorderMask from "./BorderMask";
const MotionBox = motion(Box);
diff --git a/packages/react/src/Submit/index.ts b/packages/react/src/Submit/index.ts
new file mode 100644
index 0000000000..eb0ba2d0c6
--- /dev/null
+++ b/packages/react/src/Submit/index.ts
@@ -0,0 +1,3 @@
+import Submit from "./Submit";
+
+export default Submit;
diff --git a/packages/react/src/index.tsx b/packages/react/src/index.tsx
index 739c3005f6..a4aff4c807 100644
--- a/packages/react/src/index.tsx
+++ b/packages/react/src/index.tsx
@@ -1,5 +1,6 @@
import { ActionMenu } from "./ActionMenu";
-import Button from "./Button";
+import type { ButtonProps } from "./Button";
+import { Button } from "./Button";
import {
Card,
CardAction,
@@ -36,6 +37,7 @@ import type {
} from "./Select";
import { CreatableSelect, Select, createFilter } from "./Select";
import { Status } from "./Status";
+import Submit from "./Submit";
import ThemeProvider, { theme } from "./Theme";
import {
Tooltip,
@@ -89,6 +91,7 @@ export {
MenubarTrigger,
Select,
Status,
+ Submit,
ThemeProvider,
TimePicker,
Tooltip,
@@ -111,4 +114,11 @@ export {
useNotification,
useOutsideClick,
};
-export type { GroupBase, MultiValue, OptionBase, OptionProps, SingleValue };
+export type {
+ ButtonProps,
+ GroupBase,
+ MultiValue,
+ OptionBase,
+ OptionProps,
+ SingleValue,
+};