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.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
style: spacing on creatable combobox
Brad Barbin74082bb259e3
diff --git a/apps/carbon/app/components/Layout/Navigation/PrimaryNavigation.tsx b/apps/carbon/app/components/Layout/Navigation/PrimaryNavigation.tsxindex 0fdea6bfc1..9befc2b3ec 100644--- a/apps/carbon/app/components/Layout/Navigation/PrimaryNavigation.tsx+++ b/apps/carbon/app/components/Layout/Navigation/PrimaryNavigation.tsx@@ -1,6 +1,5 @@import { Button, VStack, cn, useDisclosure } from "@carbon/react";import { Link, useMatches } from "@remix-run/react";-import { noop } from "@tanstack/react-table";import { forwardRef, type AnchorHTMLAttributes } from "react";import { BsFillHexagonFill } from "react-icons/bs";import { z } from "zod";@@ -92,58 +91,53 @@ interface NavigationIconButtonPropsconst NavigationIconLink = forwardRef<HTMLAnchorElement,NavigationIconButtonProps->(- (- { link, isActive = false, isOpen = false, onClick = noop, ...props },- ref- ) => {- const iconClasses = [- "absolute left-3 top-3 flex rounded-md items-center items-center justify-center", // Layout- ];+>(({ link, isActive = false, isOpen = false, onClick, ...props }, ref) => {+ const iconClasses = [+ "absolute left-3 top-3 flex rounded-md items-center items-center justify-center", // Layout+ ];- const classes = [- "relative",- "h-10 w-10 group-data-[state=expanded]:w-full",- "transition-all duration-200",- "flex items-center rounded-md",- "group-data-[state=collapsed]:justify-center",- "group-data-[state=expanded]:-space-x-2",- "hover:bg-active/80 hover:text-active-foreground",- `${- isActive- ? "bg-active text-active-foreground shadow-sm hover:text-active-foreground hover:bg-active/90"- : "hover:text-active-foreground"- }`,- "group/item",- ];+ const classes = [+ "relative",+ "h-10 w-10 group-data-[state=expanded]:w-full",+ "transition-all duration-200",+ "flex items-center rounded-md",+ "group-data-[state=collapsed]:justify-center",+ "group-data-[state=expanded]:-space-x-2",+ "hover:bg-active/80 hover:text-active-foreground",+ `${+ isActive+ ? "bg-active text-active-foreground shadow-sm hover:text-active-foreground hover:bg-active/90"+ : "hover:text-active-foreground"+ }`,+ "group/item",+ ];- return (- <Link- role="button"- aria-current={isActive}- ref={ref}- to={link.to}- {...props}- onClick={onClick}- className={cn(classes, props.className)}- prefetch="intent"- >- <link.icon className={cn(...iconClasses)} />+ return (+ <Link+ role="button"+ aria-current={isActive}+ ref={ref}+ to={link.to}+ {...props}+ onClick={onClick}+ className={cn(classes, props.className)}+ prefetch="intent"+ >+ <link.icon className={cn(...iconClasses)} />- <span- aria-hidden={isOpen || undefined}- className={cn(- "min-w-[128px] text-sm",- "absolute left-7 group-data-[state=expanded]:left-12",- "opacity-0 group-data-[state=expanded]:opacity-100"- )}- >- {link.name}- </span>- </Link>- );- }-);+ <span+ aria-hidden={isOpen || undefined}+ className={cn(+ "min-w-[128px] text-sm",+ "absolute left-7 group-data-[state=expanded]:left-12",+ "opacity-0 group-data-[state=expanded]:opacity-100"+ )}+ >+ {link.name}+ </span>+ </Link>+ );+});NavigationIconLink.displayName = "NavigationIconLink";export default PrimaryNavigation;diff --git a/apps/carbon/app/routes/x+/job+/$jobId.tsx b/apps/carbon/app/routes/x+/job+/$jobId.tsxindex 70df290082..5068510677 100644--- a/apps/carbon/app/routes/x+/job+/$jobId.tsx+++ b/apps/carbon/app/routes/x+/job+/$jobId.tsx@@ -84,7 +84,7 @@ export default function JobRoute() {order={1}minSize={10}defaultSize={20}- className="bg-card h-full"+ className="bg-card h-full shadow-lg"><ScrollArea className="h-[calc(100vh-99px)]"><div className="grid w-full h-full overflow-hidden p-2">diff --git a/apps/carbon/app/routes/x+/quote+/$quoteId.tsx b/apps/carbon/app/routes/x+/quote+/$quoteId.tsxindex 3e3494337a..ee0218c17e 100644--- a/apps/carbon/app/routes/x+/quote+/$quoteId.tsx+++ b/apps/carbon/app/routes/x+/quote+/$quoteId.tsx@@ -116,7 +116,7 @@ export default function QuoteRoute() {order={1}minSize={10}defaultSize={20}- className="bg-card h-full"+ className="bg-card h-full shadow-lg"><ScrollArea className="h-[calc(100vh-99px)]"><div className="grid w-full h-full overflow-hidden">diff --git a/apps/carbon/app/routes/x+/sales-order+/$orderId.tsx b/apps/carbon/app/routes/x+/sales-order+/$orderId.tsxindex 7da2d758ca..33ebbe5982 100644--- a/apps/carbon/app/routes/x+/sales-order+/$orderId.tsx+++ b/apps/carbon/app/routes/x+/sales-order+/$orderId.tsx@@ -84,7 +84,7 @@ export default function SalesOrderRoute() {order={1}minSize={10}defaultSize={20}- className="bg-card h-full"+ className="bg-card h-full shadow-lg"><ScrollArea className="h-[calc(100vh-99px)]"><div className="grid w-full h-full overflow-hidden">diff --git a/apps/carbon/app/routes/x+/sales-rfq+/$rfqId.tsx b/apps/carbon/app/routes/x+/sales-rfq+/$rfqId.tsxindex e48097b06f..7706d4131a 100644--- a/apps/carbon/app/routes/x+/sales-rfq+/$rfqId.tsx+++ b/apps/carbon/app/routes/x+/sales-rfq+/$rfqId.tsx@@ -163,7 +163,7 @@ export default function SalesRFQRoute() {order={1}minSize={10}defaultSize={20}- className="bg-card h-full z-0"+ className="bg-card h-full z-0 shadow-lg"><ScrollArea className="h-[calc(100vh-99px)]"><div className="grid w-full h-full overflow-hidden">diff --git a/packages/database/supabase/functions/recalculate/index.ts b/packages/database/supabase/functions/recalculate/index.tsindex 7aa5eaf22e..efbfc51fa2 100644--- a/packages/database/supabase/functions/recalculate/index.ts+++ b/packages/database/supabase/functions/recalculate/index.ts@@ -123,7 +123,7 @@ serve(async (req: Request) => {}await db.transaction().execute(async (trx) => {- await updateQuantities(trx, jobMethodTree, parentQuantity);+ await updateJobQuantities(trx, jobMethodTree, parentQuantity);});break;@@ -162,7 +162,7 @@ serve(async (req: Request) => {}await db.transaction().execute(async (trx) => {- await updateQuantities(trx, jobMethodTree, job.data?.quantity);+ await updateJobQuantities(trx, jobMethodTree, job.data?.quantity);});break;@@ -190,7 +190,7 @@ serve(async (req: Request) => {}});-const updateQuantities = async (+const updateJobQuantities = async (trx: Transaction<DB>,tree: JobMethodTreeItem,parentQuantity: number = 1@@ -214,7 +214,7 @@ const updateQuantities = async (// Recursively update childrenif (tree.children) {for (const child of tree.children) {- await updateQuantities(trx, child, currentQuantity);+ await updateJobQuantities(trx, child, currentQuantity);}}};diff --git a/packages/react/src/Combobox.tsx b/packages/react/src/Combobox.tsxindex e5c1e160e5..c42d281838 100644--- a/packages/react/src/Combobox.tsx+++ b/packages/react/src/Combobox.tsx@@ -73,7 +73,7 @@ const Combobox = forwardRef<HTMLButtonElement, ComboboxProps>(</PopoverTrigger><PopoverContentalign="start"- className="min-w-[260px] w-[--radix-popover-trigger-width] p-0"+ className="min-w-[260px] w-[--radix-popover-trigger-width] p-1"><VirtualizedCommandoptions={options}@@ -148,9 +148,9 @@ function VirtualizedCommand({/><divref={parentRef}- className="overflow-auto"+ className="overflow-auto pt-1"style={{- height: `${Math.min(filteredOptions.length, 6) * itemHeight}px`,+ height: `${Math.min(filteredOptions.length, 6) * itemHeight + 4}px`,}}><CommandGroupdiff --git a/packages/react/src/CreateableCombobox.tsx b/packages/react/src/CreateableCombobox.tsxindex 3e4647623a..0ecbd78165 100644--- a/packages/react/src/CreateableCombobox.tsx+++ b/packages/react/src/CreateableCombobox.tsx@@ -79,7 +79,7 @@ const CreatableCombobox = forwardRef<HTMLButtonElement, CreatableComboboxProps>(</PopoverTrigger><PopoverContentalign="start"- className="min-w-[260px] w-[--radix-popover-trigger-width] p-0"+ className="min-w-[260px] w-[--radix-popover-trigger-width] p-1"><VirtualizedCommandoptions={options}@@ -176,9 +176,9 @@ function VirtualizedCommand({/><divref={parentRef}- className="overflow-auto"+ className="overflow-auto pt-1"style={{- height: `${Math.min(filteredOptions.length, 6) * itemHeight}px`,+ height: `${Math.min(filteredOptions.length, 6) * itemHeight + 4}px`,}}><CommandGroupdiff --git a/packages/react/src/CreateableMultiSelect.tsx b/packages/react/src/CreateableMultiSelect.tsxindex 5232756536..26d00c9a96 100644--- a/packages/react/src/CreateableMultiSelect.tsx+++ b/packages/react/src/CreateableMultiSelect.tsx@@ -121,7 +121,7 @@ const CreatableMultiSelect = forwardRef<</PopoverTrigger><PopoverContentalign="start"- className="min-w-[260px] w-[--radix-popover-trigger-width] p-0"+ className="min-w-[260px] w-[--radix-popover-trigger-width] p-1"><VirtualizedCommandoptions={options}@@ -215,9 +215,9 @@ function VirtualizedCommand({/><divref={parentRef}- className="overflow-auto"+ className="overflow-auto pt-1"style={{- height: `${Math.min(filteredOptions.length, 6) * itemHeight}px`,+ height: `${Math.min(filteredOptions.length, 6) * itemHeight + 4}px`,}}><CommandEmpty>No option found.</CommandEmpty>diff --git a/packages/react/src/MultiSelect.tsx b/packages/react/src/MultiSelect.tsxindex f24acb2651..1118d0fd49 100644--- a/packages/react/src/MultiSelect.tsx+++ b/packages/react/src/MultiSelect.tsx@@ -115,7 +115,7 @@ const MultiSelect = forwardRef<HTMLButtonElement, MultiSelectProps>(</PopoverTrigger><PopoverContentalign="start"- className="min-w-[260px] w-[--radix-popover-trigger-width] p-0"+ className="min-w-[260px] w-[--radix-popover-trigger-width] p-1"><VirtualizedCommandoptions={options}@@ -179,12 +179,13 @@ function VirtualizedCommand({<CommandEmpty>No option found.</CommandEmpty><divref={parentRef}- className="overflow-auto"+ className="overflow-auto pt-1"style={{- height: `${Math.min(filteredOptions.length, 6) * itemHeight}px`,+ height: `${Math.min(filteredOptions.length, 6) * itemHeight + 4}px`,}}><CommandGroup+ className="pt-1"style={{height: `${virtualizer.getTotalSize()}px`,width: "100%",