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

Brad Barbinad6d5b638370
diff --git a/apps/carbon/app/components/Address.tsx b/apps/carbon/app/components/Address.tsx
index aced734861..0143e42571 100644
--- a/apps/carbon/app/components/Address.tsx
+++ b/apps/carbon/app/components/Address.tsx
@@ -1,5 +1,5 @@
import { ActionMenu, VStack } from "@carbon/react";
-import { Grid, MenuItem } from "@chakra-ui/react";
+import { MenuItem } from "@chakra-ui/react";
import { BsPinMapFill } from "react-icons/bs";
import type { Action } from "~/types";
@@ -19,7 +19,7 @@ const Address = ({ address, actions }: AddressProps) => {
address.postalCode ?? ""
}`;
return (
- <Grid w="full" gridColumnGap={4} gridTemplateColumns="auto 1fr auto">
+ <div className="grid w-full gap-4 grid-cols-[auto_1fr_auto]">
<BsPinMapFill className="w-8 h-8" />
<VStack spacing={0}>
<p className="font-bold line-clamp-1">{location}</p>
@@ -40,7 +40,7 @@ const Address = ({ address, actions }: AddressProps) => {
))}
</ActionMenu>
)}
- </Grid>
+ </div>
);
};
diff --git a/apps/carbon/app/components/Contact.tsx b/apps/carbon/app/components/Contact.tsx
index ac1a319ca6..8d523423f9 100644
--- a/apps/carbon/app/components/Contact.tsx
+++ b/apps/carbon/app/components/Contact.tsx
@@ -1,5 +1,5 @@
import { ActionMenu, Dot, HStack, VStack } from "@carbon/react";
-import { Avatar, Grid, MenuItem } from "@chakra-ui/react";
+import { Avatar, MenuItem } from "@chakra-ui/react";
import { Link } from "@remix-run/react";
import type { Action } from "~/types";
@@ -32,7 +32,7 @@ const Contact = ({ contact, url, user, actions }: ContactProps) => {
: UserStatus.None;
return (
- <Grid w="full" gridColumnGap={4} gridTemplateColumns="auto 1fr auto">
+ <div className="grid w-full gap-4 grid-cols-[auto_1fr_auto]">
<Avatar size="sm" name={`${name}`} />
<VStack spacing={0}>
<HStack>
@@ -69,7 +69,7 @@ const Contact = ({ contact, url, user, actions }: ContactProps) => {
))}
</ActionMenu>
)}
- </Grid>
+ </div>
);
};
diff --git a/apps/carbon/app/components/Layout/Topbar/Topbar.tsx b/apps/carbon/app/components/Layout/Topbar/Topbar.tsx
index e1406b320b..43cae32c79 100644
--- a/apps/carbon/app/components/Layout/Topbar/Topbar.tsx
+++ b/apps/carbon/app/components/Layout/Topbar/Topbar.tsx
@@ -1,5 +1,4 @@
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";
@@ -9,10 +8,7 @@ import Create from "./Create";
const Topbar = () => {
return (
- <GridItem
- className="grid bg-background text-foreground border-b border-border px-4 top-0 sticky z-10 space-x-4"
- gridTemplateColumns="1fr auto 1fr"
- >
+ <div className="grid bg-background text-foreground border-b border-border px-4 top-0 sticky z-10 space-x-4 grid-cols-[1fr_auto_1fr] items-center">
<Breadcrumbs />
<Search />
<HStack spacing={1} className="justify-end py-2">
@@ -37,7 +33,7 @@ const Topbar = () => {
</Button>
<AvatarMenu />
</HStack>
- </GridItem>
+ </div>
);
};
diff --git a/apps/carbon/app/components/Table/Table.tsx b/apps/carbon/app/components/Table/Table.tsx
index ff11d83fa1..ada5b5c07e 100644
--- a/apps/carbon/app/components/Table/Table.tsx
+++ b/apps/carbon/app/components/Table/Table.tsx
@@ -2,6 +2,7 @@ import {
ActionMenu,
ContextMenu,
VStack,
+ cn,
useColor,
useEscape,
useMount,
@@ -10,7 +11,6 @@ import { clip } from "@carbon/utils";
import type { ThemeTypings } from "@chakra-ui/react";
import {
Table as ChakraTable,
- Grid,
MenuList,
Tbody,
Th,
@@ -452,9 +452,11 @@ const Table = <T extends object>({
ref={tableContainerRef}
onKeyDown={editMode ? onKeyDown : undefined}
>
- <Grid
- w="full"
- gridTemplateColumns={withColumnOrdering ? "auto 1fr" : "1fr"}
+ <div
+ className={cn(
+ "grid w-full",
+ withColumnOrdering ? "grid-cols-[auto_1fr]" : "grid-cols-1"
+ )}
>
{/* Pinned left columns */}
{withColumnOrdering ? (
@@ -733,7 +735,7 @@ const Table = <T extends object>({
})}
</Tbody>
</ChakraTable>
- </Grid>
+ </div>
</div>
{withPagination && (
<Pagination {...pagination} colorScheme={colorScheme} />
diff --git a/apps/carbon/app/components/Table/components/Filter/FilterRow.tsx b/apps/carbon/app/components/Table/components/Filter/FilterRow.tsx
index 13fdc640c6..e6608ff1be 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 { IconButton, Input, useDebounce } from "@carbon/react";
-import { Grid, Select } from "@chakra-ui/react";
+import { Select } from "@chakra-ui/react";
import { useEffect, useState } from "react";
import { IoMdClose } from "react-icons/io";
import { filterOperatorLabels } from "~/utils/query";
@@ -41,7 +41,7 @@ const FilterRow = ({
};
return (
- <Grid gridColumnGap={2} gridTemplateColumns="1fr 1fr 1fr auto">
+ <div className="grid gap-x-2 grid-cols-[1fr_1fr_1fr_auto]">
<Select size="sm" defaultValue={column} onChange={onColumnChange}>
{Object.entries(columnAccessors).map(([accessor, title]) => (
<option key={accessor} value={accessor}>
@@ -68,7 +68,7 @@ const FilterRow = ({
onClick={onRemove}
variant="ghost"
/>
- </Grid>
+ </div>
);
};
diff --git a/apps/carbon/app/modules/account/ui/Personal/PersonalDataForm/PersonalDataForm.tsx b/apps/carbon/app/modules/account/ui/Personal/PersonalDataForm/PersonalDataForm.tsx
index 6747b0ad15..f4691b6168 100644
--- a/apps/carbon/app/modules/account/ui/Personal/PersonalDataForm/PersonalDataForm.tsx
+++ b/apps/carbon/app/modules/account/ui/Personal/PersonalDataForm/PersonalDataForm.tsx
@@ -1,5 +1,4 @@
import { VStack } from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { ValidatedForm } from "remix-validated-form";
import { Submit } from "~/components/Form";
import type { PersonalData } from "~/modules/account";
@@ -20,7 +19,6 @@ const PersonalDataForm = ({ personalData }: PersonalDataFormProps) => {
defaultValues={personalData}
>
<VStack spacing={4} className="mt-4">
- <Grid gridTemplateColumns="1fr 1fr" gridColumnGap={4} w="full"></Grid>
<Submit>Save</Submit>
</VStack>
</ValidatedForm>
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 f75a160520..dc71bdfe83 100644
--- a/apps/carbon/app/modules/account/ui/Profile/ProfileForm/ProfileForm.tsx
+++ b/apps/carbon/app/modules/account/ui/Profile/ProfileForm/ProfileForm.tsx
@@ -6,7 +6,6 @@ import {
CardTitle,
VStack,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { useParams } from "@remix-run/react";
import { ValidatedForm } from "remix-validated-form";
import { Hidden, Input, Submit, TextArea } from "~/components/Form";
@@ -36,10 +35,10 @@ const ProfileForm = ({ user }: ProfileFormProps) => {
</CardHeader>
<CardContent>
<VStack spacing={4} className="my-4">
- <Grid gridTemplateColumns="1fr 1fr" gridColumnGap={4} w="full">
+ <div className="grid grid-cols-2 gap-4 w-full">
<Input name="firstName" label="First Name" />
<Input name="lastName" label="Last Name" />
- </Grid>
+ </div>
<TextArea name="about" label="About" characterLimit={160} my={2} />
<Hidden name="intent" value="about" />
</VStack>
diff --git a/apps/carbon/app/modules/account/ui/UserAttributes/UserAttributesForm.tsx b/apps/carbon/app/modules/account/ui/UserAttributes/UserAttributesForm.tsx
index 3bb3995b54..0feaacfd91 100644
--- a/apps/carbon/app/modules/account/ui/UserAttributes/UserAttributesForm.tsx
+++ b/apps/carbon/app/modules/account/ui/UserAttributes/UserAttributesForm.tsx
@@ -6,7 +6,6 @@ import {
useColor,
useDisclosure,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { parseDate } from "@internationalized/date";
import { useFetcher, useParams } from "@remix-run/react";
import { useState } from "react";
@@ -161,15 +160,7 @@ function renderTypedForm({
fetcher={updateFetcher}
onSubmit={(data) => onSubmit(data.value)}
>
- <Grid
- gridTemplateColumns="1fr 2fr 1fr"
- borderTopColor={borderColor}
- borderTopStyle="solid"
- borderTopWidth={1}
- columnGap={2}
- pt={3}
- w="full"
- >
+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">
<p className="text-muted-foreground self-center">
{attribute.name}
</p>
@@ -185,7 +176,7 @@ function renderTypedForm({
Cancel
</Button>
</HStack>
- </Grid>
+ </div>
</ValidatedForm>
);
case DataType.Date:
@@ -202,15 +193,7 @@ function renderTypedForm({
fetcher={updateFetcher}
onSubmit={(data) => onSubmit(data.value)}
>
- <Grid
- gridTemplateColumns="1fr 2fr 1fr"
- borderTopColor={borderColor}
- borderTopStyle="solid"
- borderTopWidth={1}
- columnGap={2}
- pt={3}
- w="full"
- >
+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">
<p className="text-muted-foreground self-center">
{attribute.name}
</p>
@@ -226,7 +209,7 @@ function renderTypedForm({
Cancel
</Button>
</HStack>
- </Grid>
+ </div>
</ValidatedForm>
);
case DataType.List:
@@ -243,15 +226,7 @@ function renderTypedForm({
fetcher={updateFetcher}
onSubmit={(data) => onSubmit(data.value)}
>
- <Grid
- gridTemplateColumns="1fr 2fr 1fr"
- borderTopColor={borderColor}
- borderTopStyle="solid"
- borderTopWidth={1}
- columnGap={2}
- pt={3}
- w="full"
- >
+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">
<p className="text-muted-foreground self-center">
{attribute.name}
</p>
@@ -269,13 +244,13 @@ function renderTypedForm({
}
/>
</div>
- <HStack className="justify-between w-full self-center">
+ <HStack className="justify-end w-full self-center">
<Submit type="submit">Save</Submit>
<Button variant="ghost" onClick={onClose}>
Cancel
</Button>
</HStack>
- </Grid>
+ </div>
</ValidatedForm>
);
case DataType.Numeric:
@@ -292,15 +267,7 @@ function renderTypedForm({
fetcher={updateFetcher}
onSubmit={(data) => onSubmit(data.value)}
>
- <Grid
- gridTemplateColumns="1fr 2fr 1fr"
- borderTopColor={borderColor}
- borderTopStyle="solid"
- borderTopWidth={1}
- columnGap={2}
- pt={3}
- w="full"
- >
+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">
<p className="text-muted-foreground self-center">
{attribute.name}
</p>
@@ -310,13 +277,13 @@ function renderTypedForm({
<Hidden name="userAttributeValueId" />
<NumberInput name="value" />
</div>
- <HStack className="justify-between w-full self-center">
+ <HStack className="justify-end w-full self-center">
<Submit type="submit">Save</Submit>
<Button variant="ghost" onClick={onClose}>
Cancel
</Button>
</HStack>
- </Grid>
+ </div>
</ValidatedForm>
);
case DataType.Text:
@@ -333,15 +300,7 @@ function renderTypedForm({
fetcher={updateFetcher}
onSubmit={(data) => onSubmit(data.value)}
>
- <Grid
- gridTemplateColumns="1fr 2fr 1fr"
- borderTopColor={borderColor}
- borderTopStyle="solid"
- borderTopWidth={1}
- columnGap={2}
- pt={3}
- w="full"
- >
+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">
<p className="text-muted-foreground self-center">
{attribute.name}
</p>
@@ -351,13 +310,13 @@ function renderTypedForm({
<Hidden name="userAttributeValueId" />
<Input name="value" />
</div>
- <HStack className="justify-between w-full self-center">
+ <HStack className="justify-end w-full self-center">
<Submit type="submit">Save</Submit>
<Button variant="ghost" onClick={onClose}>
Cancel
</Button>
</HStack>
- </Grid>
+ </div>
</ValidatedForm>
);
case DataType.User:
@@ -374,15 +333,7 @@ function renderTypedForm({
fetcher={updateFetcher}
onSubmit={(data) => onSubmit(data.value)}
>
- <Grid
- gridTemplateColumns="1fr 2fr 1fr"
- borderTopColor={borderColor}
- borderTopStyle="solid"
- borderTopWidth={1}
- columnGap={2}
- pt={3}
- w="full"
- >
+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">
<p className="text-muted-foreground self-center">
{attribute.name}
</p>
@@ -392,13 +343,13 @@ function renderTypedForm({
<Hidden name="userAttributeValueId" />
<Employee name="value" />
</div>
- <HStack className="justify-between w-full self-center">
+ <HStack className="justify-end w-full self-center">
<Submit type="submit">Save</Submit>
<Button variant="ghost" onClick={onClose}>
Cancel
</Button>
</HStack>
- </Grid>
+ </div>
</ValidatedForm>
);
default:
@@ -437,21 +388,14 @@ function renderTypedDisplay({
switch (type) {
case DataType.Boolean:
return (
- <Grid
- gridTemplateColumns="1fr 2fr 1fr"
- borderTopColor={borderColor}
- borderTopStyle="solid"
- borderTopWidth={1}
- pt={3}
- w="full"
- >
+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">
<p className="text-muted-foreground items-center">{attribute.name}</p>
{displayValue === "N/A" ? (
<p className="self-center">{displayValue}</p>
) : (
<Switch disabled checked={displayValue === true} />
)}
- <HStack className="justify-between w-full self-center">
+ <HStack className="justify-end w-full self-center">
<Button
isDisabled={!isAuthorized && (!attribute.canSelfManage ?? true)}
variant="ghost"
@@ -460,20 +404,13 @@ function renderTypedDisplay({
Update
</Button>
</HStack>
- </Grid>
+ </div>
);
case DataType.Date:
case DataType.List:
case DataType.Text:
return (
- <Grid
- gridTemplateColumns="1fr 2fr 1fr"
- borderTopColor={borderColor}
- borderTopStyle="solid"
- borderTopWidth={1}
- pt={3}
- w="full"
- >
+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">
<p className="text-muted-foreground self-center">{attribute.name}</p>
<p className="self-center">{displayValue}</p>
<UpdateRemoveButtons
@@ -487,18 +424,11 @@ function renderTypedDisplay({
{...props}
onSubmit={setOptimisticUpdate}
/>
- </Grid>
+ </div>
);
case DataType.Numeric:
return (
- <Grid
- gridTemplateColumns="1fr 2fr 1fr"
- borderTopColor={borderColor}
- borderTopStyle="solid"
- borderTopWidth={1}
- pt={3}
- w="full"
- >
+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">
<p className="text-muted-foreground self-center">{attribute.name}</p>
<p className="self-center">{displayValue.toLocaleString("en-US")}</p>
<UpdateRemoveButtons
@@ -509,18 +439,11 @@ function renderTypedDisplay({
{...props}
onSubmit={setOptimisticUpdate}
/>
- </Grid>
+ </div>
);
case DataType.User:
return (
- <Grid
- gridTemplateColumns="1fr 2fr 1fr"
- borderTopColor={borderColor}
- borderTopStyle="solid"
- borderTopWidth={1}
- pt={3}
- w="full"
- >
+ <div className="grid grid-cols-[1fr_2fr_1fr] border-t border-border gap-x-2 pt-3 w-full items-center">
<p className="text-muted-foreground self-center">{attribute.name}</p>
{value ? (
<UserSelect disabled value={value.toString()} />
@@ -536,7 +459,7 @@ function renderTypedDisplay({
{...props}
onSubmit={setOptimisticUpdate}
/>
- </Grid>
+ </div>
);
}
}
diff --git a/apps/carbon/app/modules/accounting/ui/AccountDefaults/AccountDefaultsForm.tsx b/apps/carbon/app/modules/accounting/ui/AccountDefaults/AccountDefaultsForm.tsx
index 1f330bd4dd..3cb723f37b 100644
--- a/apps/carbon/app/modules/accounting/ui/AccountDefaults/AccountDefaultsForm.tsx
+++ b/apps/carbon/app/modules/accounting/ui/AccountDefaults/AccountDefaultsForm.tsx
@@ -11,7 +11,6 @@ import {
TabsTrigger,
VStack,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import { ValidatedForm } from "remix-validated-form";
import { Select, Submit } from "~/components/Form";
@@ -72,13 +71,7 @@ const AccountDefaultsForm = ({
<CardTitle>Revenue</CardTitle>
</CardHeader>
<CardContent>
- <Grid
- gridTemplateColumns={["1fr", "1fr 1fr", "1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={4}
- mb={4}
- w="full"
- >
+ <div className="grid gap-y-4 gap-x-8 grid-cols-1 md:grid-cols-2">
<Select
name="salesAccount"
label="Sales"
@@ -89,7 +82,7 @@ const AccountDefaultsForm = ({
label="Sales Discounts"
options={incomeStatementAccountOptions}
/>
- </Grid>
+ </div>
</CardContent>
</Card>
<Card>
@@ -97,13 +90,7 @@ const AccountDefaultsForm = ({
<CardTitle>Expenses</CardTitle>
</CardHeader>
<CardContent>
- <Grid
- gridTemplateColumns={["1fr", "1fr 1fr", "1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={4}
- mb={4}
- w="full"
- >
+ <div className="grid gap-y-4 gap-x-8 grid-cols-1 md:grid-cols-2">
<Select
name="costOfGoodsSoldAccount"
label="Cost of Goods Sold"
@@ -155,7 +142,7 @@ const AccountDefaultsForm = ({
label="Maintenance Expense"
options={incomeStatementAccountOptions}
/>
- </Grid>
+ </div>
</CardContent>
</Card>
<Card>
@@ -163,13 +150,7 @@ const AccountDefaultsForm = ({
<CardTitle>Fixed Assets</CardTitle>
</CardHeader>
<CardContent>
- <Grid
- gridTemplateColumns={["1fr", "1fr 1fr", "1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={4}
- mb={4}
- w="full"
- >
+ <div className="grid gap-y-4 gap-x-8 grid-cols-1 md:grid-cols-2">
<Select
name="assetDepreciationExpenseAccount"
label="Depreciation Expense"
@@ -185,7 +166,7 @@ const AccountDefaultsForm = ({
label="Service Charges"
options={incomeStatementAccountOptions}
/>
- </Grid>
+ </div>
</CardContent>
</Card>
<Card>
@@ -193,13 +174,7 @@ const AccountDefaultsForm = ({
<CardTitle>Interest</CardTitle>
</CardHeader>
<CardContent>
- <Grid
- gridTemplateColumns={["1fr", "1fr 1fr", "1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={4}
- mb={4}
- w="full"
- >
+ <div className="grid gap-y-4 gap-x-8 grid-cols-1 md:grid-cols-2">
<Select
name="interestAccount"
label="Interest"
@@ -220,7 +195,7 @@ const AccountDefaultsForm = ({
label="Rounding Account"
options={incomeStatementAccountOptions}
/>
- </Grid>
+ </div>
</CardContent>
</Card>
</VStack>
@@ -232,13 +207,7 @@ const AccountDefaultsForm = ({
<CardTitle>Current Assets</CardTitle>
</CardHeader>
<CardContent>
- <Grid
- gridTemplateColumns={["1fr", "1fr 1fr", "1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={4}
- mb={4}
- w="full"
- >
+ <div className="grid gap-y-4 gap-x-8 grid-cols-1 md:grid-cols-2">
<Select
name="inventoryAccount"
label="Inventory"
@@ -280,7 +249,7 @@ const AccountDefaultsForm = ({
label="Bank - Foreign Currency"
options={balanceSheetAccountOptions}
/>
- </Grid>
+ </div>
</CardContent>
</Card>
<Card>
@@ -288,13 +257,7 @@ const AccountDefaultsForm = ({
<CardTitle>Fixed Assets</CardTitle>
</CardHeader>
<CardContent>
- <Grid
- gridTemplateColumns={["1fr", "1fr 1fr", "1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={4}
- mb={4}
- w="full"
- >
+ <div className="grid gap-y-4 gap-x-8 grid-cols-1 md:grid-cols-2">
<Select
name="assetAquisitionCostAccount"
label="Asset Aquisition Cost"
@@ -315,7 +278,7 @@ const AccountDefaultsForm = ({
label="Accumulated Depreciation on Disposal"
options={balanceSheetAccountOptions}
/>
- </Grid>
+ </div>
</CardContent>
</Card>
<Card>
@@ -323,13 +286,7 @@ const AccountDefaultsForm = ({
<CardTitle>Liabilities</CardTitle>
</CardHeader>
<CardContent>
- <Grid
- gridTemplateColumns={["1fr", "1fr 1fr", "1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={4}
- mb={4}
- w="full"
- >
+ <div className="grid gap-y-4 gap-x-8 grid-cols-1 md:grid-cols-2">
<Select
name="prepaymentAccount"
label="Prepayments"
@@ -365,7 +322,7 @@ const AccountDefaultsForm = ({
label="Reverse Charge Sales Tax"
options={balanceSheetAccountOptions}
/>
- </Grid>
+ </div>
</CardContent>
</Card>
<Card>
@@ -373,18 +330,13 @@ const AccountDefaultsForm = ({
<CardTitle>Equity</CardTitle>
</CardHeader>
<CardContent>
- <Grid
- gridTemplateColumns={["1fr", "1fr 1fr", "1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={4}
- w="full"
- >
+ <div className="grid gap-y-4 gap-x-8 grid-cols-1 md:grid-cols-2">
<Select
name="retainedEarningsAccount"
label="Retained Earnings"
options={balanceSheetAccountOptions}
/>
- </Grid>
+ </div>
</CardContent>
</Card>
</VStack>
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 bbe470e893..185ca3f0d6 100644
--- a/apps/carbon/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountForm/ChartOfAccountForm.tsx
+++ b/apps/carbon/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountForm/ChartOfAccountForm.tsx
@@ -10,7 +10,6 @@ import {
HStack,
VStack,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { useNavigate } from "@remix-run/react";
import { useState } from "react";
@@ -103,12 +102,7 @@ const ChartOfAccountForm = ({ initialValues }: ChartOfAccountFormProps) => {
<DrawerBody>
<Hidden name="id" />
- <Grid
- gridTemplateColumns={["1fr", "1fr", "1fr 1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={2}
- w="full"
- >
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-x-8 gap-y-2 w-full">
<VStack spacing={4}>
<Input name="number" label="Account Number" />
<Input name="name" label="Name" />
@@ -170,7 +164,7 @@ const ChartOfAccountForm = ({ initialValues }: ChartOfAccountFormProps) => {
/>
<Boolean name="directPosting" label="Direct Posting" />
</VStack>
- </Grid>
+ </div>
</DrawerBody>
<DrawerFooter>
<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 874eebffae..2c363eeb02 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 { Button, DatePicker, HStack } from "@carbon/react";
import {
- Grid,
Popover,
PopoverArrow,
PopoverBody,
@@ -55,11 +54,7 @@ const ChartOfAccountsTableFilters = () => {
</PopoverHeader>
<PopoverArrow />
<PopoverBody maxH="50vh">
- <Grid
- gridTemplateColumns={"1fr 3fr"}
- gridRowGap={2}
- alignItems="center"
- >
+ <div className="grid grid-cols-[1fr_3fr] gap-y-2 items-center">
<p className="text-sm text-muted-foreground">Start Date</p>
<DatePicker
value={startDate ? parseDate(startDate) : null}
@@ -72,7 +67,7 @@ const ChartOfAccountsTableFilters = () => {
value={endDate ? parseDate(endDate) : null}
onChange={(value) => setParams({ endDate: value.toString() })}
/>
- </Grid>
+ </div>
</PopoverBody>
</PopoverContent>
</Popover>
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 21d63bd030..e26e804d83 100644
--- a/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptForm/ReceiptForm.tsx
+++ b/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptForm/ReceiptForm.tsx
@@ -12,7 +12,6 @@ import {
MenubarItem,
VStack,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { Outlet } from "@remix-run/react";
import { ValidatedForm } from "remix-validated-form";
import {
@@ -121,12 +120,7 @@ const ReceiptForm = ({
/>
<Hidden name="supplierId" value={supplierId ?? ""} />
<VStack spacing={4} className="min-h-full">
- <Grid
- gridTemplateColumns={["1fr", "1fr", "1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={4}
- w="full"
- >
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-x-8 gap-y-4 w-full">
<Input name="receiptId" label="Receipt ID" isReadOnly />
<SelectControlled
name="locationId"
@@ -179,7 +173,7 @@ const ReceiptForm = ({
name="externalDocumentId"
label="External Reference"
/>
- </Grid>
+ </div>
</VStack>
</ValidatedForm>
</div>
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 8cf9642e7a..79dbd00439 100644
--- a/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceForm/PurchaseInvoiceForm.tsx
+++ b/apps/carbon/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceForm/PurchaseInvoiceForm.tsx
@@ -6,8 +6,8 @@ import {
CardHeader,
CardTitle,
VStack,
+ cn,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { useState } from "react";
import { ValidatedForm } from "remix-validated-form";
import {
@@ -81,13 +81,11 @@ const PurchaseInvoiceForm = ({
<Hidden name="id" />
<Hidden name="invoiceId" />
<VStack>
- <Grid
- gridTemplateColumns={
- isEditing ? ["1fr", "1fr", "1fr 1fr 1fr"] : "1fr"
- }
- gridColumnGap={8}
- gridRowGap={2}
- w="full"
+ <div
+ className={cn(
+ "grid w-full gap-x-8 gap-y-2",
+ isEditing ? "grid-cols-1 md:grid-cols-3" : "grid-cols-1"
+ )}
>
<VStack>
<Supplier
@@ -146,7 +144,7 @@ const PurchaseInvoiceForm = ({
</>
)}
</VStack>
- </Grid>
+ </div>
</VStack>
</CardContent>
<CardFooter>
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 46cb24c60e..b03ce8beb6 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartCostingForm/PartCostingForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartCostingForm/PartCostingForm.tsx
@@ -6,7 +6,6 @@ import {
CardTitle,
VStack,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { ValidatedForm } from "remix-validated-form";
import { Boolean, Hidden, Number, Select, Submit } from "~/components/Form";
import { usePermissions } from "~/hooks";
@@ -39,12 +38,7 @@ const PartCostingForm = ({ initialValues }: PartCostingFormProps) => {
</CardHeader>
<CardContent>
<Hidden name="partId" />
- <Grid
- gridTemplateColumns={["1fr", "1fr", "1fr 1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={2}
- w="full"
- >
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-x-8 gap-y-2 w-full">
<VStack>
<Select
name="costingMethod"
@@ -69,7 +63,7 @@ const PartCostingForm = ({ initialValues }: PartCostingFormProps) => {
/>
<Boolean name="costIsAdjusted" label="Cost Is Adjusted" />
</VStack>
- </Grid>
+ </div>
</CardContent>
<CardFooter>
<Submit isDisabled={!permissions.can("update", "parts")}>Save</Submit>
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 9507dc59ad..11ebab8149 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartForm/PartForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartForm/PartForm.tsx
@@ -6,8 +6,8 @@ import {
CardHeader,
CardTitle,
VStack,
+ cn,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { useState } from "react";
import { ValidatedForm } from "remix-validated-form";
import {
@@ -130,13 +130,11 @@ const PartForm = ({ initialValues }: PartFormProps) => {
)}
</CardHeader>
<CardContent>
- <Grid
- gridTemplateColumns={
- isEditing ? ["1fr", "1fr", "1fr 1fr 1fr"] : "1fr"
- }
- gridColumnGap={8}
- gridRowGap={2}
- w="full"
+ <div
+ className={cn(
+ "grid w-full gap-x-8 gap-y-2",
+ isEditing ? "grid-cols-1 md:grid-cols-3" : "grid-cols-1"
+ )}
>
<VStack>
{isEditing ? (
@@ -181,7 +179,7 @@ const PartForm = ({ initialValues }: PartFormProps) => {
<Boolean name="blocked" label="Blocked" />
{isEditing && <Boolean name="active" label="Active" />}
</VStack>
- </Grid>
+ </div>
</CardContent>
<CardFooter>
<Submit
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 ad958b64f5..710f204092 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartInventoryForm/PartInventoryForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartInventoryForm/PartInventoryForm.tsx
@@ -8,7 +8,6 @@ import {
HStack,
VStack,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { useRevalidator } from "@remix-run/react";
import { ValidatedForm } from "remix-validated-form";
import { Combobox } from "~/components";
@@ -75,13 +74,7 @@ const PartInventoryForm = ({
<CardContent>
<Hidden name="partId" />
<Hidden name="locationId" />
-
- <Grid
- gridTemplateColumns={["1fr", "1fr", "1fr 1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={2}
- w="full"
- >
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-x-8 gap-y-2 w-full">
<VStack>
<CreatableCombobox
name="defaultShelfId"
@@ -129,7 +122,7 @@ const PartInventoryForm = ({
isReadOnly
/>
</VStack>
- </Grid>
+ </div>
</CardContent>
<CardFooter>
<Submit isDisabled={!permissions.can("update", "parts")}>Save</Submit>
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 d3dd42e6cc..41f3778dc3 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartManufacturingForm/PartManufacturingForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartManufacturingForm/PartManufacturingForm.tsx
@@ -6,7 +6,6 @@ import {
CardTitle,
VStack,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { ValidatedForm } from "remix-validated-form";
import { Boolean, Hidden, Number, Select, Submit } from "~/components/Form";
import { usePermissions } from "~/hooks";
@@ -43,12 +42,7 @@ const PartManufacturingForm = ({
</CardHeader>
<CardContent>
<Hidden name="partId" />
- <Grid
- gridTemplateColumns={["1fr", "1fr", "1fr 1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={2}
- w="full"
- >
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-x-8 gap-y-2 w-full">
<VStack>
<Select
name="manufacturingPolicy"
@@ -76,7 +70,7 @@ const PartManufacturingForm = ({
label="Requires Configuration"
/>
</VStack>
- </Grid>
+ </div>
</CardContent>
<CardFooter>
<Submit isDisabled={!permissions.can("update", "parts")}>Save</Submit>
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 a61d7c5811..087ef95b0d 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartPlanningForm/PartPlanningForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartPlanningForm/PartPlanningForm.tsx
@@ -8,7 +8,6 @@ import {
HStack,
VStack,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { ValidatedForm } from "remix-validated-form";
import { Combobox } from "~/components";
import {
@@ -68,12 +67,7 @@ const PartPlanningForm = ({
<CardContent>
<Hidden name="partId" />
<Hidden name="locationId" />
- <Grid
- gridTemplateColumns={["1fr", "1fr", "1fr 1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={2}
- w="full"
- >
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-x-8 gap-y-2 w-full">
<VStack>
<SelectForm
name="reorderingPolicy"
@@ -124,7 +118,7 @@ const PartPlanningForm = ({
label="Reorder Maximum Inventory"
/>
</VStack>
- </Grid>
+ </div>
</CardContent>
<CardFooter>
<Submit isDisabled={!permissions.can("update", "parts")}>Save</Submit>
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 318304eca7..bd1cbc9c6e 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartPurchasingForm/PartPurchasingForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartPurchasingForm/PartPurchasingForm.tsx
@@ -6,7 +6,6 @@ import {
CardTitle,
VStack,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { ValidatedForm } from "remix-validated-form";
import {
Boolean,
@@ -49,12 +48,7 @@ const PartPurchasingForm = ({
</CardHeader>
<CardContent>
<Hidden name="partId" />
- <Grid
- gridTemplateColumns={["1fr", "1fr", "1fr 1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={2}
- w="full"
- >
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-x-8 gap-y-2 w-full">
<VStack>
<Supplier name="preferredSupplierId" label="Preferred Supplier" />
<Number name="purchasingLeadTime" label="Lead Time (Days)" />
@@ -74,7 +68,7 @@ const PartPurchasingForm = ({
<VStack>
<Boolean name="purchasingBlocked" label="Purchasing Blocked" />
</VStack>
- </Grid>
+ </div>
</CardContent>
<CardFooter>
<Submit isDisabled={!permissions.can("update", "parts")}>Save</Submit>
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 1252b99c09..7d11f902fd 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartSalePriceForm/PartSalePriceForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartSalePriceForm/PartSalePriceForm.tsx
@@ -6,7 +6,6 @@ import {
CardTitle,
VStack,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { ValidatedForm } from "remix-validated-form";
import {
Boolean,
@@ -49,12 +48,7 @@ const PartSalePriceForm = ({
</CardHeader>
<CardContent>
<Hidden name="partId" />
- <Grid
- gridTemplateColumns={["1fr", "1fr", "1fr 1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={2}
- w="full"
- >
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-x-8 gap-y-2 w-full">
<VStack>
<Number name="unitSalePrice" label="Unit Sale Price" />
<Currency name="currencyCode" label="Currency" />
@@ -74,7 +68,7 @@ const PartSalePriceForm = ({
label="Allow Invoice Discount"
/>
</VStack>
- </Grid>
+ </div>
</CardContent>
<CardFooter>
<Submit isDisabled={!permissions.can("update", "parts")}>Save</Submit>
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 e13010a5c3..318e4ba0db 100644
--- a/apps/carbon/app/modules/parts/ui/Service/ServiceForm/ServiceForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Service/ServiceForm/ServiceForm.tsx
@@ -6,8 +6,8 @@ import {
CardHeader,
CardTitle,
VStack,
+ cn,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { useState } from "react";
import { ValidatedForm } from "remix-validated-form";
import {
@@ -113,13 +113,11 @@ const ServiceForm = ({ initialValues }: ServiceFormProps) => {
)}
</CardHeader>
<CardContent>
- <Grid
- gridTemplateColumns={
- isEditing ? ["1fr", "1fr", "1fr 1fr 1fr"] : "1fr"
- }
- gridColumnGap={8}
- gridRowGap={2}
- w="full"
+ <div
+ className={cn(
+ "grid w-full gap-x-8 gap-y-2",
+ isEditing ? "grid-cols-1 md:grid-cols-3" : "grid-cols-1"
+ )}
>
<VStack>
{isEditing ? (
@@ -153,7 +151,7 @@ const ServiceForm = ({ initialValues }: ServiceFormProps) => {
<Boolean name="blocked" label="Blocked" />
{isEditing && <Boolean name="active" label="Active" />}
</VStack>
- </Grid>
+ </div>
</CardContent>
<CardFooter>
<Submit
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 3fc0d4ce36..a9f90d44dd 100644
--- a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderDeliveryForm/PurchaseOrderDeliveryForm.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderDeliveryForm/PurchaseOrderDeliveryForm.tsx
@@ -6,7 +6,6 @@ import {
CardTitle,
VStack,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { useState } from "react";
import { ValidatedForm } from "remix-validated-form";
import {
@@ -68,12 +67,7 @@ const PurchaseOrderDeliveryForm = ({
</CardHeader>
<CardContent>
<Hidden name="id" />
- <Grid
- gridTemplateColumns={["1fr", "1fr", "1fr 1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={2}
- w="full"
- >
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-x-8 gap-y-2 w-full">
<VStack>
<Location
name="locationId"
@@ -121,7 +115,7 @@ const PurchaseOrderDeliveryForm = ({
</>
)}
</VStack>
- </Grid>
+ </div>
</CardContent>
<CardFooter>
<Submit isDisabled={!permissions.can("update", "purchasing")}>
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 d142aa8b02..1e37058f15 100644
--- a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderForm/PurchaseOrderForm.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderForm/PurchaseOrderForm.tsx
@@ -6,8 +6,8 @@ import {
CardHeader,
CardTitle,
VStack,
+ cn,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { useState } from "react";
import { ValidatedForm } from "remix-validated-form";
import {
@@ -74,13 +74,11 @@ const PurchaseOrderForm = ({ initialValues }: PurchaseOrderFormProps) => {
<CardContent>
<Hidden name="purchaseOrderId" />
<VStack>
- <Grid
- gridTemplateColumns={
- isEditing ? ["1fr", "1fr", "1fr 1fr 1fr"] : "1fr"
- }
- gridColumnGap={8}
- gridRowGap={2}
- w="full"
+ <div
+ className={cn(
+ "grid w-full gap-x-8 gap-y-2",
+ isEditing ? "grid-cols-1 md:grid-cols-3" : "grid-cols-1"
+ )}
>
<VStack>
<Supplier
@@ -139,7 +137,7 @@ const PurchaseOrderForm = ({ initialValues }: PurchaseOrderFormProps) => {
</>
)}
</VStack>
- </Grid>
+ </div>
</VStack>
</CardContent>
<CardFooter>
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 c79efe8313..433dcf381d 100644
--- a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderPaymentForm/PurchaseOrderPaymentForm.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderPaymentForm/PurchaseOrderPaymentForm.tsx
@@ -6,7 +6,6 @@ import {
CardTitle,
VStack,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { useState } from "react";
import { ValidatedForm } from "remix-validated-form";
import {
@@ -56,12 +55,7 @@ const PurchaseOrderPaymentForm = ({
</CardHeader>
<CardContent>
<Hidden name="id" />
- <Grid
- gridTemplateColumns={["1fr", "1fr", "1fr 1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={2}
- w="full"
- >
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-x-8 gap-y-2 w-full">
<VStack>
<Supplier
name="invoiceSupplierId"
@@ -90,7 +84,7 @@ const PurchaseOrderPaymentForm = ({
<VStack>
<Boolean name="paymentComplete" label="Payment Complete" />
</VStack>
- </Grid>
+ </div>
</CardContent>
<CardFooter>
<Submit isDisabled={!permissions.can("update", "purchasing")}>
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 2dac047f46..71010bc6c4 100644
--- a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierForm/SupplierForm.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierForm/SupplierForm.tsx
@@ -7,8 +7,8 @@ import {
CardTitle,
HStack,
VStack,
+ cn,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { ValidatedForm } from "remix-validated-form";
import { Employee, Hidden, Input, Select, Submit } from "~/components/Form";
import { usePermissions, useRouteData } from "~/hooks";
@@ -66,13 +66,11 @@ const SupplierForm = ({ initialValues }: SupplierFormProps) => {
</CardHeader>
<CardContent>
<Hidden name="id" />
- <Grid
- gridTemplateColumns={
- isEditing ? ["1fr", "1fr", "1fr 1fr 1fr"] : "1fr"
- }
- gridColumnGap={8}
- gridRowGap={2}
- w="full"
+ <div
+ className={cn(
+ "grid w-full gap-x-8 gap-y-2",
+ isEditing ? "grid-cols-1 md:grid-cols-3" : "grid-cols-1"
+ )}
>
<VStack>
<Input name="name" label="Name" />
@@ -99,7 +97,7 @@ const SupplierForm = ({ initialValues }: SupplierFormProps) => {
</VStack>
</>
)}
- </Grid>
+ </div>
</CardContent>
<CardFooter>
<HStack>
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 c23386a61d..78d7102ce2 100644
--- a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierPaymentForm/SupplierPaymentForm.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierPaymentForm/SupplierPaymentForm.tsx
@@ -7,7 +7,6 @@ import {
HStack,
VStack,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { useState } from "react";
import { ValidatedForm } from "remix-validated-form";
import {
@@ -59,12 +58,7 @@ const SupplierPaymentForm = ({ initialValues }: SupplierPaymentFormProps) => {
</CardHeader>
<CardContent>
<Hidden name="supplierId" />
- <Grid
- gridTemplateColumns={["1fr", "1fr", "1fr 1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={2}
- w="full"
- >
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-x-8 gap-y-2 w-full">
<VStack>
<Supplier
name="invoiceSupplierId"
@@ -90,7 +84,7 @@ const SupplierPaymentForm = ({ initialValues }: SupplierPaymentFormProps) => {
/>
<Currency name="currencyCode" label="Currency" />
</VStack>
- </Grid>
+ </div>
</CardContent>
<CardFooter>
<HStack>
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 b13aec0e3f..1254f4e1bf 100644
--- a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierShippingForm/SupplierShippingForm.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierShippingForm/SupplierShippingForm.tsx
@@ -7,7 +7,6 @@ import {
HStack,
VStack,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { useState } from "react";
import { ValidatedForm } from "remix-validated-form";
import {
@@ -65,12 +64,7 @@ const SupplierShippingForm = ({ initialValues }: SupplierShippingFormProps) => {
</CardHeader>
<CardContent>
<Hidden name="supplierId" />
- <Grid
- gridTemplateColumns={["1fr", "1fr", "1fr 1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={2}
- w="full"
- >
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-x-8 gap-y-2 w-full">
<VStack>
<Supplier
name="shippingSupplierId"
@@ -100,7 +94,7 @@ const SupplierShippingForm = ({ initialValues }: SupplierShippingFormProps) => {
options={shippingTermOptions}
/>
</VStack>
- </Grid>
+ </div>
</CardContent>
<CardFooter>
<HStack>
diff --git a/apps/carbon/app/modules/resources/ui/Abilities/AbilityChart/AbilityChart.tsx b/apps/carbon/app/modules/resources/ui/Abilities/AbilityChart/AbilityChart.tsx
index 4a50d8d926..4216f2ed6a 100644
--- a/apps/carbon/app/modules/resources/ui/Abilities/AbilityChart/AbilityChart.tsx
+++ b/apps/carbon/app/modules/resources/ui/Abilities/AbilityChart/AbilityChart.tsx
@@ -1,8 +1,8 @@
-import { AxisLeft, AxisBottom } from "@visx/axis";
+import { AxisBottom, AxisLeft } from "@visx/axis";
import { curveNatural } from "@visx/curve";
import { Drag } from "@visx/drag";
import { LinearGradient } from "@visx/gradient";
-import { GridRows, GridColumns } from "@visx/grid";
+import { GridColumns, GridRows } from "@visx/grid";
import { Group } from "@visx/group";
import { PatternLines } from "@visx/pattern";
import { scaleLinear } from "@visx/scale";
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 1856ef6e24..6a249f4981 100644
--- a/apps/carbon/app/modules/resources/ui/Person/PersonAbilities/PersonAbilities.tsx
+++ b/apps/carbon/app/modules/resources/ui/Person/PersonAbilities/PersonAbilities.tsx
@@ -1,6 +1,6 @@
import { Card, CardContent, CardHeader, CardTitle } from "@carbon/react";
import { formatDate } from "@carbon/utils";
-import { Grid, Icon, List, ListItem } from "@chakra-ui/react";
+import { Icon, List, ListItem } from "@chakra-ui/react";
import { Link } from "@remix-run/react";
import clsx from "clsx";
import type { IconType } from "react-icons";
@@ -61,11 +61,7 @@ const PersonAbilities = ({ abilities }: PersonAbilitiesProps) => {
return (
<ListItem key={employeeAbility.id}>
- <Grid
- key={employeeAbility.id}
- gridTemplateColumns="auto 1fr auto"
- gridColumnGap={4}
- >
+ <div className="grid-cols-[auto_1fr_auto] space-x-4">
<div
className={clsx(
"flex h-10 w-10 rounded-full items-center justify-center",
@@ -103,7 +99,7 @@ const PersonAbilities = ({ abilities }: PersonAbilitiesProps) => {
})}
</p>
</div>
- </Grid>
+ </div>
</ListItem>
);
})}
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 fc5f52f0c0..5e0daefb81 100644
--- a/apps/carbon/app/modules/sales/ui/Customer/CustomerForm/CustomerForm.tsx
+++ b/apps/carbon/app/modules/sales/ui/Customer/CustomerForm/CustomerForm.tsx
@@ -7,8 +7,8 @@ import {
CardTitle,
HStack,
VStack,
+ cn,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { ValidatedForm } from "remix-validated-form";
import {
Combobox,
@@ -73,13 +73,11 @@ const CustomerForm = ({ initialValues }: CustomerFormProps) => {
</CardHeader>
<CardContent>
<Hidden name="id" />
- <Grid
- gridTemplateColumns={
- isEditing ? ["1fr", "1fr", "1fr 1fr 1fr"] : "1fr"
- }
- gridColumnGap={8}
- gridRowGap={2}
- w="full"
+ <div
+ className={cn(
+ "grid w-full gap-x-8 gap-y-2",
+ isEditing ? "grid-cols-1 md:grid-cols-3" : "grid-cols-1"
+ )}
>
<VStack>
<Input name="name" label="Name" />
@@ -106,7 +104,7 @@ const CustomerForm = ({ initialValues }: CustomerFormProps) => {
</VStack>
</>
)}
- </Grid>
+ </div>
</CardContent>
<CardFooter>
<HStack>
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 b2277c42ac..c61e4ad3a9 100644
--- a/apps/carbon/app/modules/sales/ui/Customer/CustomerPaymentForm/CustomerPaymentForm.tsx
+++ b/apps/carbon/app/modules/sales/ui/Customer/CustomerPaymentForm/CustomerPaymentForm.tsx
@@ -7,7 +7,6 @@ import {
HStack,
VStack,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { useState } from "react";
import { ValidatedForm } from "remix-validated-form";
import {
@@ -59,12 +58,7 @@ const CustomerPaymentForm = ({ initialValues }: CustomerPaymentFormProps) => {
</CardHeader>
<CardContent>
<Hidden name="customerId" />
- <Grid
- gridTemplateColumns={["1fr", "1fr", "1fr 1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={2}
- w="full"
- >
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-x-8 gap-y-2 w-full">
<VStack>
<Customer
name="invoiceCustomerId"
@@ -90,7 +84,7 @@ const CustomerPaymentForm = ({ initialValues }: CustomerPaymentFormProps) => {
/>
<Currency name="currencyCode" label="Currency" />
</VStack>
- </Grid>
+ </div>
</CardContent>
<CardFooter>
<HStack>
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 e045848002..818e23bafa 100644
--- a/apps/carbon/app/modules/sales/ui/Customer/CustomerShippingForm/CustomerShippingForm.tsx
+++ b/apps/carbon/app/modules/sales/ui/Customer/CustomerShippingForm/CustomerShippingForm.tsx
@@ -7,7 +7,6 @@ import {
HStack,
VStack,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { useState } from "react";
import { ValidatedForm } from "remix-validated-form";
import {
@@ -65,12 +64,7 @@ const CustomerShippingForm = ({ initialValues }: CustomerShippingFormProps) => {
</CardHeader>
<CardContent>
<Hidden name="customerId" />
- <Grid
- gridTemplateColumns={["1fr", "1fr", "1fr 1fr 1fr"]}
- gridColumnGap={8}
- gridRowGap={2}
- w="full"
- >
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-x-8 gap-y-2 w-full">
<VStack>
<Customer
name="shippingCustomerId"
@@ -100,7 +94,7 @@ const CustomerShippingForm = ({ initialValues }: CustomerShippingFormProps) => {
options={shippingTermOptions}
/>
</VStack>
- </Grid>
+ </div>
</CardContent>
<CardFooter>
<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 81b836e951..0f2190e3e0 100644
--- a/apps/carbon/app/modules/settings/ui/Company/CompanyForm/CompanyForm.tsx
+++ b/apps/carbon/app/modules/settings/ui/Company/CompanyForm/CompanyForm.tsx
@@ -1,5 +1,4 @@
import { VStack } from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { ValidatedForm } from "remix-validated-form";
import { Hidden, Input, Submit } from "~/components/Form";
import { SectionTitle } from "~/components/Layout";
@@ -22,7 +21,7 @@ const CompanyForm = ({ company }: CompanyFormProps) => {
defaultValues={company}
>
<VStack spacing={4} className="my-4">
- <Grid gridTemplateColumns="1fr 1fr" gridGap={4} w="full">
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-4 w-full">
<Input name="name" label="Company Name" />
<Input name="taxId" label="Tax ID" />
<Input name="addressLine1" label="Address Line 1" />
@@ -35,7 +34,7 @@ const CompanyForm = ({ company }: CompanyFormProps) => {
<Input name="fax" label="Fax Number" />
<Input name="email" label="Email" />
<Input name="website" label="Website" />
- </Grid>
+ </div>
<Hidden name="intent" value="about" />
<Submit>Save</Submit>
diff --git a/apps/carbon/app/modules/shared/ui/Notes/Notes.tsx b/apps/carbon/app/modules/shared/ui/Notes/Notes.tsx
index 85b37c5afd..96e6470c3c 100644
--- a/apps/carbon/app/modules/shared/ui/Notes/Notes.tsx
+++ b/apps/carbon/app/modules/shared/ui/Notes/Notes.tsx
@@ -1,6 +1,5 @@
import { Button, HStack, HTML, VStack } from "@carbon/react";
import { formatTimeAgo } from "@carbon/utils";
-import { Grid } from "@chakra-ui/react";
import { Form } from "@remix-run/react";
import { Fragment } from "react";
import { ValidatedForm } from "remix-validated-form";
@@ -26,12 +25,7 @@ const Notes = ({ documentId, notes }: NotesProps) => {
return (
<>
{notes.length > 0 ? (
- <Grid
- gridTemplateColumns="auto 1fr"
- gridColumnGap={4}
- gridRowGap={8}
- w="full"
- >
+ <div className="grid grid-cols-[auto_1fr] gap-x-4 gap-y-8 w-full">
{notes.map((note) => {
if (!note.user || Array.isArray(note.user))
throw new Error("Invalid user");
@@ -60,7 +54,7 @@ const Notes = ({ documentId, notes }: NotesProps) => {
</Fragment>
);
})}
- </Grid>
+ </div>
) : (
<div className="text-muted-foreground p-4 w-full text-center">
No notes
diff --git a/apps/carbon/app/modules/users/ui/Customers/CreateCustomerModal/CreateCustomerModal.tsx b/apps/carbon/app/modules/users/ui/Customers/CreateCustomerModal/CreateCustomerModal.tsx
index a6927eb036..066cb7e110 100644
--- a/apps/carbon/app/modules/users/ui/Customers/CreateCustomerModal/CreateCustomerModal.tsx
+++ b/apps/carbon/app/modules/users/ui/Customers/CreateCustomerModal/CreateCustomerModal.tsx
@@ -13,7 +13,6 @@ import {
ModalTitle,
VStack,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { useFetcher, useNavigate } from "@remix-run/react";
import { useEffect, useMemo, useRef, useState } from "react";
import { ValidatedForm, useControlField, useField } from "remix-validated-form";
@@ -87,7 +86,7 @@ const CreateCustomerModal = () => {
<FormLabel>Email</FormLabel>
<Input isReadOnly value={contact?.email ?? ""} />
</FormControl>
- <Grid templateColumns="1fr 1fr" gap={4}>
+ <div className="grid grid-cols-2 gap-4 w-full">
<FormControl>
<FormLabel>First Name</FormLabel>
<Input isReadOnly value={contact?.firstName ?? ""} />
@@ -96,7 +95,7 @@ const CreateCustomerModal = () => {
<FormLabel>Last Name</FormLabel>
<Input isReadOnly value={contact?.lastName ?? ""} />
</FormControl>
- </Grid>
+ </div>
</>
)}
</VStack>
diff --git a/apps/carbon/app/modules/users/ui/Employees/CreateEmployeeModal/CreateEmployeeModal.tsx b/apps/carbon/app/modules/users/ui/Employees/CreateEmployeeModal/CreateEmployeeModal.tsx
index ffa706e1b4..44927e6f4c 100644
--- a/apps/carbon/app/modules/users/ui/Employees/CreateEmployeeModal/CreateEmployeeModal.tsx
+++ b/apps/carbon/app/modules/users/ui/Employees/CreateEmployeeModal/CreateEmployeeModal.tsx
@@ -10,7 +10,6 @@ import {
VStack,
useMount,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { useFetcher, useNavigate } from "@remix-run/react";
import { ValidatedForm } from "remix-validated-form";
import { Input, Select, Submit } from "~/components/Form";
@@ -59,14 +58,13 @@ const CreateEmployeeModal = () => {
<ModalBody>
<VStack spacing={4}>
<Input name="email" label="Email" />
- <Grid templateColumns="1fr 1fr" gap={4}>
+ <div className="grid grid-cols-2 gap-4 w-full">
<Input name="firstName" label="First Name" />
<Input name="lastName" label="Last Name" />
- </Grid>
+ </div>
<Select
name="employeeType"
label="Employee Type"
- isLoading={employeeTypeFetcher.state === "loading"}
options={employeeTypeOptions}
placeholder="Select Employee Type"
/>
diff --git a/apps/carbon/app/modules/users/ui/Suppliers/CreateSupplierModal/CreateSupplierModal.tsx b/apps/carbon/app/modules/users/ui/Suppliers/CreateSupplierModal/CreateSupplierModal.tsx
index 5ec8593c14..8891d15ab2 100644
--- a/apps/carbon/app/modules/users/ui/Suppliers/CreateSupplierModal/CreateSupplierModal.tsx
+++ b/apps/carbon/app/modules/users/ui/Suppliers/CreateSupplierModal/CreateSupplierModal.tsx
@@ -12,7 +12,6 @@ import {
ModalTitle,
VStack,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { useFetcher, useNavigate } from "@remix-run/react";
import { useEffect, useMemo, useRef, useState } from "react";
import { ValidatedForm, useControlField, useField } from "remix-validated-form";
@@ -84,7 +83,7 @@ const CreateSupplierModal = () => {
<FormLabel>Email</FormLabel>
<Input isReadOnly value={contact?.email ?? ""} />
</FormControl>
- <Grid templateColumns="1fr 1fr" gap={4}>
+ <div className="grid grid-cols-2 gap-4 w-full">
<FormControl>
<FormLabel>First Name</FormLabel>
<Input isReadOnly value={contact?.firstName ?? ""} />
@@ -93,7 +92,7 @@ const CreateSupplierModal = () => {
<FormLabel>Last Name</FormLabel>
<Input isReadOnly value={contact?.lastName ?? ""} />
</FormControl>
- </Grid>
+ </div>
</>
)}
</VStack>
diff --git a/apps/carbon/app/routes/onboarding+/_layout.tsx b/apps/carbon/app/routes/onboarding+/_layout.tsx
index 61b285105d..ecd5a3cc0f 100644
--- a/apps/carbon/app/routes/onboarding+/_layout.tsx
+++ b/apps/carbon/app/routes/onboarding+/_layout.tsx
@@ -1,5 +1,5 @@
-import { ClientOnly, HStack, IconButton, useColor } from "@carbon/react";
-import { Avatar, Grid, GridItem } from "@chakra-ui/react";
+import { ClientOnly, HStack, IconButton } from "@carbon/react";
+import { Avatar } from "@chakra-ui/react";
import { redirect, type LoaderFunctionArgs } from "@remix-run/node";
import { Outlet } from "@remix-run/react";
import { BsFillHexagonFill } from "react-icons/bs";
@@ -50,15 +50,15 @@ export default function OnboardingLayout() {
// not sure why we need this ClientOnly, but things break without it
<ClientOnly fallback={null}>
{() => (
- <Grid h="100vh" w="100vw" templateColumns="auto 1fr">
+ <div className="grid grid-cols-[auto_1fr] h-screen w-screen">
<SidebarPlaceholder />
- <Grid templateRows="auto 1fr" h="full" w="full">
+ <div className="gri grid-rows-[auto_1fr] h-full w-full">
<TopbarPlaceholder />
<div>
<Outlet />
</div>
- </Grid>
- </Grid>
+ </div>
+ </div>
)}
</ClientOnly>
);
@@ -66,23 +66,11 @@ export default function OnboardingLayout() {
function TopbarPlaceholder() {
return (
- <GridItem
- bg={useColor("white")}
- borderBottom={1}
- borderBottomColor={useColor("gray.200")}
- borderBottomStyle="solid"
- display="grid"
- gap={4}
- gridTemplateColumns="1fr"
- position="sticky"
- px={4}
- top={0}
- zIndex={1}
- >
+ <div className="grid bg-background border-b border-border gap-4 grid-cols-1 sticky px-4 top-0 z-1">
<HStack className="justify-end py-2" spacing={1}>
<Avatar size="sm" />
</HStack>
- </GridItem>
+ </div>
);
}
diff --git a/apps/carbon/app/routes/x+/_layout.tsx b/apps/carbon/app/routes/x+/_layout.tsx
index fbb3ef3b60..0220ac2ed5 100644
--- a/apps/carbon/app/routes/x+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/_layout.tsx
@@ -1,5 +1,4 @@
import { VStack, useNotification } from "@carbon/react";
-import { Grid, GridItem } from "@chakra-ui/react";
import type { LoaderFunctionArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { Outlet, useLoaderData, useNavigation } from "@remix-run/react";
@@ -96,19 +95,19 @@ export default function AuthenticatedRoute() {
return (
<SupabaseProvider session={session}>
<RealtimeDataProvider>
- <Grid h="100vh" w="100vw" templateColumns="auto 1fr">
+ <div className="grid grid-cols-[auto_1fr] h-screen w-screen">
<IconSidebar />
- <GridItem w="full" h="full">
- <Grid templateRows="auto 1fr" h="full" w="full">
+ <div className="w-full h-full">
+ <div className="grid grid-rows-[auto_1fr] h-full w-full">
<Topbar />
<div className="flex w-full h-full">
<VStack spacing={0} className="bg-muted">
<Outlet />
</VStack>
</div>
- </Grid>
- </GridItem>
- </Grid>
+ </div>
+ </div>
+ </div>
</RealtimeDataProvider>
</SupabaseProvider>
);
diff --git a/apps/carbon/app/routes/x+/account+/_layout.tsx b/apps/carbon/app/routes/x+/account+/_layout.tsx
index e9ee3817b4..fdab73597b 100644
--- a/apps/carbon/app/routes/x+/account+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/account+/_layout.tsx
@@ -1,5 +1,4 @@
import { VStack } from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import type { MetaFunction } from "@remix-run/node";
import { Outlet } from "@remix-run/react";
import { ContentSidebar } from "~/components/Layout/Sidebar";
@@ -21,11 +20,11 @@ export default function AccountRoute() {
const { links } = useAccountSidebar();
return (
- <Grid w="full" h="full" templateColumns="auto 1fr">
+ <div className="grid w-full h-full grid-cols-[auto_1fr]">
<ContentSidebar links={links} />
<VStack spacing={0} className="h-full p-8 bg-background">
<Outlet />
</VStack>
- </Grid>
+ </div>
);
}
diff --git a/apps/carbon/app/routes/x+/account+/profile.tsx b/apps/carbon/app/routes/x+/account+/profile.tsx
index cd545b5e09..d75bbd4825 100644
--- a/apps/carbon/app/routes/x+/account+/profile.tsx
+++ b/apps/carbon/app/routes/x+/account+/profile.tsx
@@ -5,7 +5,6 @@ import {
CardTitle,
VStack,
} from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";
@@ -140,11 +139,7 @@ export default function AccountProfile() {
subtitle="This information will be displayed publicly so be careful what you
share."
/>
- <Grid
- gridTemplateColumns={["1fr", "1fr auto"]}
- w="full"
- gridColumnGap={8}
- >
+ <div className="grid grid-cols-1 md:grid-cols-[1fr_auto] gap-8 w-full">
<VStack spacing={8}>
<ProfileForm user={user} />
{attributes.length ? (
@@ -167,7 +162,7 @@ export default function AccountProfile() {
)}
</VStack>
<ProfilePhotoForm user={user} />
- </Grid>
+ </div>
</>
);
}
diff --git a/apps/carbon/app/routes/x+/accounting+/_layout.tsx b/apps/carbon/app/routes/x+/accounting+/_layout.tsx
index 7043404e71..0964fdde79 100644
--- a/apps/carbon/app/routes/x+/accounting+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/accounting+/_layout.tsx
@@ -1,5 +1,4 @@
import { VStack } from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import type { LoaderFunctionArgs, MetaFunction } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { Outlet } from "@remix-run/react";
@@ -80,11 +79,11 @@ export default function AccountingRoute() {
const { groups } = useAccountingSidebar();
return (
- <Grid w="full" h="full" templateColumns="auto 1fr">
+ <div className="grid grid-cols-[auto_1fr] w-full h-full">
<GroupedContentSidebar groups={groups} />
<VStack spacing={0} className="h-full">
<Outlet />
</VStack>
- </Grid>
+ </div>
);
}
diff --git a/apps/carbon/app/routes/x+/customer+/$customerId.tsx b/apps/carbon/app/routes/x+/customer+/$customerId.tsx
index d1c0c75a89..8c691df131 100644
--- a/apps/carbon/app/routes/x+/customer+/$customerId.tsx
+++ b/apps/carbon/app/routes/x+/customer+/$customerId.tsx
@@ -1,4 +1,3 @@
-import { Grid } from "@chakra-ui/react";
import type { LoaderFunctionArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { Outlet } from "@remix-run/react";
@@ -55,15 +54,10 @@ export default function CustomerRoute() {
return (
<>
<CustomerHeader />
- <Grid
- gridTemplateColumns={["1fr", "1fr", "1fr 4fr"]}
- gridColumnGap={4}
- w="full"
- h="full"
- >
+ <div className="grid grid-cols-1 md:grid-cols-[1fr_4fr] h-full w-full gap-x-4">
<CustomerSidebar />
<Outlet />
- </Grid>
+ </div>
</>
);
}
diff --git a/apps/carbon/app/routes/x+/documents+/_layout.tsx b/apps/carbon/app/routes/x+/documents+/_layout.tsx
index 539f9ad871..a6f7933e5c 100644
--- a/apps/carbon/app/routes/x+/documents+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/documents+/_layout.tsx
@@ -1,5 +1,4 @@
import { VStack } from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import type { MetaFunction } from "@remix-run/node";
import { Outlet } from "@remix-run/react";
import { ContentSidebar } from "~/components/Layout/Sidebar";
@@ -21,11 +20,11 @@ export default function DocumentsRoute() {
const { links } = useDocumentsSidebar();
return (
- <Grid w="full" h="full" templateColumns="auto 1fr">
+ <div className="grid grid-cols-[auto_1fr] w-full h-full">
<ContentSidebar links={links} />
<VStack spacing={0} className="h-full">
<Outlet />
</VStack>
- </Grid>
+ </div>
);
}
diff --git a/apps/carbon/app/routes/x+/inventory+/_layout.tsx b/apps/carbon/app/routes/x+/inventory+/_layout.tsx
index 76a22e5d26..ddc65cfdde 100644
--- a/apps/carbon/app/routes/x+/inventory+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/inventory+/_layout.tsx
@@ -1,5 +1,4 @@
import { VStack } from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import type { MetaFunction } from "@remix-run/node";
import { Outlet } from "@remix-run/react";
import { GroupedContentSidebar } from "~/components/Layout";
@@ -21,11 +20,11 @@ export default function UsersRoute() {
const { groups } = useInventorySidebar();
return (
- <Grid w="full" h="full" templateColumns="auto 1fr">
+ <div className="grid grid-cols-[auto_1fr] w-full h-full">
<GroupedContentSidebar groups={groups} />
<VStack spacing={0} className="h-full">
<Outlet />
</VStack>
- </Grid>
+ </div>
);
}
diff --git a/apps/carbon/app/routes/x+/invoicing+/_layout.tsx b/apps/carbon/app/routes/x+/invoicing+/_layout.tsx
index 02447c210b..f7ae4b1d6f 100644
--- a/apps/carbon/app/routes/x+/invoicing+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/invoicing+/_layout.tsx
@@ -1,5 +1,4 @@
import { VStack } from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import { Outlet } from "@remix-run/react";
import { GroupedContentSidebar } from "~/components/Layout";
import { useInvoicingSidebar } from "~/modules/invoicing";
@@ -16,11 +15,11 @@ export default function InvoicingRoute() {
const { groups } = useInvoicingSidebar();
return (
- <Grid w="full" h="full" templateColumns="auto 1fr">
+ <div className="grid grid-cols-[auto_1fr] w-full h-full">
<GroupedContentSidebar groups={groups} />
<VStack spacing={0} className="h-full">
<Outlet />
</VStack>
- </Grid>
+ </div>
);
}
diff --git a/apps/carbon/app/routes/x+/part+/$partId.tsx b/apps/carbon/app/routes/x+/part+/$partId.tsx
index d665885ecc..14ddc55026 100644
--- a/apps/carbon/app/routes/x+/part+/$partId.tsx
+++ b/apps/carbon/app/routes/x+/part+/$partId.tsx
@@ -1,4 +1,3 @@
-import { Grid } from "@chakra-ui/react";
import type { LoaderFunctionArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { Outlet } from "@remix-run/react";
@@ -37,15 +36,10 @@ export default function PartRoute() {
return (
<>
<PartPreview />
- <Grid
- gridTemplateColumns={["1fr", "1fr", "1fr 4fr"]}
- gridColumnGap={4}
- w="full"
- h="full"
- >
+ <div className="grid grid-cols-1 md:grid-cols-[1fr_4fr] h-full w-full gap-x-4">
<PartSidebar />
<Outlet />
- </Grid>
+ </div>
</>
);
}
diff --git a/apps/carbon/app/routes/x+/parts+/_layout.tsx b/apps/carbon/app/routes/x+/parts+/_layout.tsx
index 9cdaeb902e..f210b39b3d 100644
--- a/apps/carbon/app/routes/x+/parts+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/parts+/_layout.tsx
@@ -1,5 +1,4 @@
import { VStack } from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import type { MetaFunction } from "@remix-run/node";
import { Outlet } from "@remix-run/react";
import { GroupedContentSidebar } from "~/components/Layout";
@@ -21,11 +20,11 @@ export default function PartsRoute() {
const { groups } = usePartsSidebar();
return (
- <Grid w="full" h="full" templateColumns="auto 1fr">
+ <div className="grid grid-cols-[auto_1fr] w-full h-full">
<GroupedContentSidebar groups={groups} />
<VStack spacing={0} className="h-full">
<Outlet />
</VStack>
- </Grid>
+ </div>
);
}
diff --git a/apps/carbon/app/routes/x+/person+/$personId.tsx b/apps/carbon/app/routes/x+/person+/$personId.tsx
index 54e3258209..2f707cd888 100644
--- a/apps/carbon/app/routes/x+/person+/$personId.tsx
+++ b/apps/carbon/app/routes/x+/person+/$personId.tsx
@@ -1,4 +1,3 @@
-import { Grid } from "@chakra-ui/react";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { Outlet } from "@remix-run/react";
@@ -91,15 +90,10 @@ export default function PersonRoute() {
return (
<>
<PersonPreview />
- <Grid
- gridTemplateColumns={["1fr", "1fr", "1fr 4fr"]}
- gridColumnGap={4}
- w="full"
- h="full"
- >
+ <div className="grid grid-cols-1 md:grid-cols-[1fr_4fr] h-full w-full gap-x-4">
<PersonSidebar />
<Outlet />
- </Grid>
+ </div>
</>
);
}
diff --git a/apps/carbon/app/routes/x+/purchase-invoice+/$invoiceId.tsx b/apps/carbon/app/routes/x+/purchase-invoice+/$invoiceId.tsx
index f9402fc8fe..a82631d9f9 100644
--- a/apps/carbon/app/routes/x+/purchase-invoice+/$invoiceId.tsx
+++ b/apps/carbon/app/routes/x+/purchase-invoice+/$invoiceId.tsx
@@ -1,4 +1,3 @@
-import { Grid } from "@chakra-ui/react";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { Outlet, useLoaderData } from "@remix-run/react";
@@ -75,15 +74,10 @@ export default function PurchaseInvoiceRoute() {
return (
<>
<PurchaseInvoiceHeader />
- <Grid
- gridTemplateColumns={["1fr", "1fr", "1fr 4fr"]}
- gridGap={4}
- w="full"
- h="full"
- >
+ <div className="grid grid-cols-1 md:grid-cols-[1fr_4fr] h-full w-full gap-x-4">
<PurchaseInvoiceSidebar />
<Outlet />
- </Grid>
+ </div>
</>
);
}
diff --git a/apps/carbon/app/routes/x+/purchase-order+/$orderId.tsx b/apps/carbon/app/routes/x+/purchase-order+/$orderId.tsx
index 884c75520a..9627f9204b 100644
--- a/apps/carbon/app/routes/x+/purchase-order+/$orderId.tsx
+++ b/apps/carbon/app/routes/x+/purchase-order+/$orderId.tsx
@@ -1,4 +1,3 @@
-import { Grid } from "@chakra-ui/react";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { Outlet, useLoaderData } from "@remix-run/react";
@@ -88,15 +87,10 @@ export default function PurchaseOrderRoute() {
return (
<>
<PurchaseOrderHeader />
- <Grid
- gridTemplateColumns={["1fr", "1fr", "1fr 4fr"]}
- gridGap={4}
- w="full"
- h="full"
- >
+ <div className="grid grid-cols-1 md:grid-cols-[1fr_4fr] h-full w-full gap-x-4">
<PurchaseOrderSidebar />
<Outlet />
- </Grid>
+ </div>
</>
);
}
diff --git a/apps/carbon/app/routes/x+/purchasing+/_layout.tsx b/apps/carbon/app/routes/x+/purchasing+/_layout.tsx
index 2510c06a8c..b95ba1d94b 100644
--- a/apps/carbon/app/routes/x+/purchasing+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/purchasing+/_layout.tsx
@@ -1,5 +1,4 @@
import { VStack } from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import type { MetaFunction } from "@remix-run/node";
import { Outlet } from "@remix-run/react";
import { GroupedContentSidebar } from "~/components/Layout";
@@ -21,11 +20,11 @@ export default function UsersRoute() {
const { groups } = usePurchasingSidebar();
return (
- <Grid w="full" h="full" templateColumns="auto 1fr">
+ <div className="grid grid-cols-[auto_1fr] w-full h-full">
<GroupedContentSidebar groups={groups} />
<VStack spacing={0} className="h-full">
<Outlet />
</VStack>
- </Grid>
+ </div>
);
}
diff --git a/apps/carbon/app/routes/x+/resources+/_layout.tsx b/apps/carbon/app/routes/x+/resources+/_layout.tsx
index f6a018b814..5693e86200 100644
--- a/apps/carbon/app/routes/x+/resources+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/resources+/_layout.tsx
@@ -1,5 +1,4 @@
import { VStack } from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import type { MetaFunction } from "@remix-run/node";
import { Outlet } from "@remix-run/react";
import { GroupedContentSidebar } from "~/components/Layout";
@@ -21,11 +20,11 @@ export default function ResourcesRoute() {
const { groups } = useResourcesSidebar();
return (
- <Grid w="full" h="full" templateColumns="auto 1fr">
+ <div className="grid grid-cols-[auto_1fr] w-full h-full">
<GroupedContentSidebar groups={groups} />
<VStack spacing={0} className="h-full">
<Outlet />
</VStack>
- </Grid>
+ </div>
);
}
diff --git a/apps/carbon/app/routes/x+/sales+/_layout.tsx b/apps/carbon/app/routes/x+/sales+/_layout.tsx
index c0e04b76bc..23be5e5bb4 100644
--- a/apps/carbon/app/routes/x+/sales+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/sales+/_layout.tsx
@@ -1,5 +1,4 @@
import { VStack } from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import type { MetaFunction } from "@remix-run/node";
import { Outlet } from "@remix-run/react";
import { GroupedContentSidebar } from "~/components/Layout";
@@ -21,11 +20,11 @@ export default function SalesRoute() {
const { groups } = useSalesSidebar();
return (
- <Grid w="full" h="full" templateColumns="auto 1fr">
+ <div className="grid grid-cols-[auto_1fr] w-full h-full">
<GroupedContentSidebar groups={groups} />
<VStack spacing={0} className="h-full">
<Outlet />
</VStack>
- </Grid>
+ </div>
);
}
diff --git a/apps/carbon/app/routes/x+/service+/$serviceId.tsx b/apps/carbon/app/routes/x+/service+/$serviceId.tsx
index ba60fad614..35b922bd00 100644
--- a/apps/carbon/app/routes/x+/service+/$serviceId.tsx
+++ b/apps/carbon/app/routes/x+/service+/$serviceId.tsx
@@ -1,4 +1,3 @@
-import { Grid } from "@chakra-ui/react";
import type { LoaderFunctionArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { Outlet } from "@remix-run/react";
@@ -40,15 +39,10 @@ export default function ServiceRoute() {
return (
<>
<ServicePreview />
- <Grid
- gridTemplateColumns={["1fr", "1fr", "1fr 4fr"]}
- gridColumnGap={4}
- w="full"
- h="full"
- >
+ <div className="grid grid-cols-1 md:grid-cols-[1fr_4fr] h-full w-full gap-x-4">
<ServiceSidebar />
<Outlet />
- </Grid>
+ </div>
</>
);
}
diff --git a/apps/carbon/app/routes/x+/settings+/_layout.tsx b/apps/carbon/app/routes/x+/settings+/_layout.tsx
index f23ec49c72..b7321cc18a 100644
--- a/apps/carbon/app/routes/x+/settings+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/settings+/_layout.tsx
@@ -1,5 +1,4 @@
import { VStack } from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import type { MetaFunction } from "@remix-run/node";
import { Outlet } from "@remix-run/react";
import { GroupedContentSidebar } from "~/components/Layout";
@@ -21,11 +20,11 @@ export default function SettingsRoute() {
const { groups } = useSettingsSidebar();
return (
- <Grid w="full" h="full" templateColumns="auto 1fr">
+ <div className="grid grid-cols-[auto_1fr] w-full h-full">
<GroupedContentSidebar groups={groups} />
<VStack spacing={0} className="h-full">
<Outlet />
</VStack>
- </Grid>
+ </div>
);
}
diff --git a/apps/carbon/app/routes/x+/settings+/company.tsx b/apps/carbon/app/routes/x+/settings+/company.tsx
index 4a1490c1c2..cd4f2d10ce 100644
--- a/apps/carbon/app/routes/x+/settings+/company.tsx
+++ b/apps/carbon/app/routes/x+/settings+/company.tsx
@@ -1,5 +1,4 @@
import { VStack } from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";
@@ -121,10 +120,10 @@ export default function Company() {
title="Company"
subtitle="This information will be displayed on document headers."
/>
- <Grid gridTemplateColumns={["1fr", "1fr auto"]} w="full" gridGap={8}>
+ <div className="grid grid-cols-1 md:grid-cols-[1fr_auto] gap-8 w-full">
<CompanyForm company={initialValues} />
<CompanyLogoForm company={company} />
- </Grid>
+ </div>
</VStack>
);
}
diff --git a/apps/carbon/app/routes/x+/supplier+/$supplierId.tsx b/apps/carbon/app/routes/x+/supplier+/$supplierId.tsx
index f802c90c79..b2ec238925 100644
--- a/apps/carbon/app/routes/x+/supplier+/$supplierId.tsx
+++ b/apps/carbon/app/routes/x+/supplier+/$supplierId.tsx
@@ -1,4 +1,3 @@
-import { Grid } from "@chakra-ui/react";
import type { LoaderFunctionArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { Outlet } from "@remix-run/react";
@@ -55,15 +54,10 @@ export default function SupplierRoute() {
return (
<>
<SupplierHeader />
- <Grid
- gridTemplateColumns={["1fr", "1fr", "1fr 4fr"]}
- gridColumnGap={4}
- w="full"
- h="full"
- >
+ <div className="grid grid-cols-1 md:grid-cols-[1fr_4fr] h-full w-full gap-x-4">
<SupplierSidebar />
<Outlet />
- </Grid>
+ </div>
</>
);
}
diff --git a/apps/carbon/app/routes/x+/users+/_layout.tsx b/apps/carbon/app/routes/x+/users+/_layout.tsx
index cb63c7a0bd..24a9d2d2c8 100644
--- a/apps/carbon/app/routes/x+/users+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/users+/_layout.tsx
@@ -1,5 +1,4 @@
import { VStack } from "@carbon/react";
-import { Grid } from "@chakra-ui/react";
import type { MetaFunction } from "@remix-run/node";
import { Outlet } from "@remix-run/react";
import { GroupedContentSidebar } from "~/components/Layout";
@@ -21,11 +20,11 @@ export default function UsersRoute() {
const { groups } = useUsersSidebar();
return (
- <Grid w="full" h="full" templateColumns="auto 1fr">
+ <div className="grid grid-cols-[auto_1fr] w-full h-full">
<GroupedContentSidebar groups={groups} />
<VStack spacing={0} className="h-full">
<Outlet />
</VStack>
- </Grid>
+ </div>
);
}
diff --git a/packages/react/src/DataTable/DataTable.tsx b/packages/react/src/DataTable/DataTable.tsx
index ca418d8c05..178d53c632 100644
--- a/packages/react/src/DataTable/DataTable.tsx
+++ b/packages/react/src/DataTable/DataTable.tsx
@@ -1,4 +1,4 @@
-import { Grid, Table, Tbody, Td, Th, Thead, Tr } from "@chakra-ui/react";
+import { Table, Tbody, Td, Th, Thead, Tr } from "@chakra-ui/react";
import type {
ColumnDef,
ColumnFiltersState,
@@ -66,7 +66,7 @@ const DataTable = <TData, TValue>({
return (
<VStack spacing={0} className="h-full">
<div className="h-full bg-background overflow-scroll">
- <Grid w="full" gridTemplateColumns="1fr">
+ <div className="grid w-full grid-cols-1">
<Table>
<Thead>
{table.getHeaderGroups().map((headerGroup) => (
@@ -125,7 +125,7 @@ const DataTable = <TData, TValue>({
)}
</Tbody>
</Table>
- </Grid>
+ </div>
</div>
<DataTablePagination table={table} />
</VStack>