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
docs: add configured quote example
Brad Barbinac4dfdd182d9
diff --git a/examples/quote-configurator/.env b/examples/quote-configurator/.envnew file mode 100644index 0000000000..698f188a07--- /dev/null+++ b/examples/quote-configurator/.env@@ -0,0 +1,9 @@+# get your api key at <app>/x/settings/api-keys+CARBON_API_KEY = "<your-api-key>"+# get these values at <app>/x/api/js/intro+CARBON_APP_URL = "http://localhost:3000"+CARBON_PUBLIC_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0"+CARBON_API_URL = "http://localhost:54321"+CARBON_COMPANY_ID = "<your-company-id>"++CONFIGURED_ITEM_ID = "item_<your-item-id>"\ No newline at end of filediff --git a/examples/quote-configurator/.eslintrc.mjs b/examples/quote-configurator/.eslintrc.mjsnew file mode 100644index 0000000000..d6be4cb1c8--- /dev/null+++ b/examples/quote-configurator/.eslintrc.mjs@@ -0,0 +1,3 @@+module.exports = {+ extends: ["carbon"],+};diff --git a/examples/quote-configurator/.gitignore b/examples/quote-configurator/.gitignorenew file mode 100644index 0000000000..b1437f185e--- /dev/null+++ b/examples/quote-configurator/.gitignore@@ -0,0 +1,12 @@+node_modules++.cache+.vercel+.output++build+public/build+api/index.js*+api/_assets*+!.env+.env.local\ No newline at end of filediff --git a/examples/quote-configurator/README.md b/examples/quote-configurator/README.mdnew file mode 100644index 0000000000..f3eb32a80d--- /dev/null+++ b/examples/quote-configurator/README.md@@ -0,0 +1,25 @@+# Quote Configurator++This example demonstrates how to create a quote with a configurator. It requires a bit of setup in the app.++### Setup++First run Carbon locally, and make sure your company ID and API key are set in your `.env` or `.env.local` file.++```bash+npm run dev+```++1. Setup configured item with material, height, width, and length params.+2. In addition to the standard variables, we'll need to include the item id of the configured part as `CONFIGURED_ITEM_ID` in the environment.+3. You'll also have to create a customer and a contact that matches the email address you use. This example does not include upserting a customer/contact. Instead we fetch the customer by the contact email address.++```bash+cd examples/quote-configurator+npm run start+```++### Relevant Files++- `./lib/carbon.server.ts`+- `./routes/_index.tsx`diff --git a/examples/quote-configurator/app/components/ModelUpload.tsx b/examples/quote-configurator/app/components/ModelUpload.tsxnew file mode 100644index 0000000000..bf7c0c7318--- /dev/null+++ b/examples/quote-configurator/app/components/ModelUpload.tsx@@ -0,0 +1,116 @@+import { cn, Spinner, toast } from "@carbon/react";+import { convertKbToString } from "@carbon/utils";+import { useDropzone } from "react-dropzone";+import { LuCloudUpload } from "react-icons/lu";++type ModelUploadProps = {+ url?: string;+ file: File | null;+ className?: string;+ onFileChange: (file: File | null) => void;+};++const fileSizeLimitMb = 50;+const supportedModelTypes = ["stp", "step"];++export const ModelUpload = ({+ url,+ file,+ onFileChange,+ className,+}: ModelUploadProps) => {+ const hasFile = !!file || !!url;++ const { isDragActive, getRootProps, getInputProps } = useDropzone({+ accept: {+ "application/step": [".stp", ".step"],+ },+ disabled: hasFile,+ multiple: false,+ maxSize: fileSizeLimitMb * 1024 * 1024, // 50 MB+ onDropAccepted: (acceptedFiles) => {+ const file = acceptedFiles[0];+ const fileSizeLimit = fileSizeLimitMb * 1024 * 1024;++ const fileExtension = file.name.split(".").pop()?.toLowerCase();+ if (!fileExtension || !supportedModelTypes.includes(fileExtension)) {+ toast.error("File type not supported");++ return;+ }++ if (file.size > fileSizeLimit) {+ toast.error(`File size too big (max. ${fileSizeLimitMb} MB)`);+ return;+ }++ onFileChange(file);+ },+ onDropRejected: (fileRejections) => {+ const { errors } = fileRejections[0];+ let message;+ if (errors[0].code === "file-too-large") {+ message = `File size too big (max. ${fileSizeLimitMb} MB)`;+ } else if (errors[0].code === "file-invalid-type") {+ message = "File type not supported";+ } else {+ message = errors[0].message;+ }+ toast.error(message);+ },+ });++ return (+ <div+ {...getRootProps()}+ className={cn(+ "group flex flex-col flex-grow rounded-lg border border-border bg-gradient-to-tr from-background to-card text-card-foreground shadow-sm w-full",+ !hasFile &&+ "cursor-pointer hover:border-primary/30 hover:border-dashed hover:to-primary/10 hover:via-card border-2 border-dashed",+ className+ )}+ >+ <input {...getInputProps()} name="file" className="sr-only" />+ <div className="flex flex-col h-full w-full p-4">+ <div className="flex flex-col flex-grow items-center justify-center gap-2 p-6">+ {file && (+ <>+ <p className="text-base font-medium text-card-foreground">+ {file.name}+ </p>+ <p className="text-muted-foreground text-xs group-hover:text-foreground">+ {convertKbToString(Math.ceil(file.size / 1024))}+ </p>+ <Spinner className="size-12" />+ </>+ )}+ {!file && (+ <>+ <div+ className={cn(+ "p-4 bg-accent rounded-full group-hover:bg-primary"+ )}+ >+ <LuCloudUpload className="mx-auto size-12 text-muted-foreground group-hover:text-primary-foreground" />+ </div>+ {isDragActive ? (+ <p className="text-lg text-muted-foreground group-hover:text-foreground mt-8">+ Drop file here+ </p>+ ) : (+ <>+ <p className="text-base font-medium text-muted-foreground group-hover:text-foreground mt-8">+ Choose file to upload or drag and drop+ </p>+ <p className="text-xs text-muted-foreground group-hover:text-foreground">+ Supports {supportedModelTypes.join(", ")} files+ </p>+ </>+ )}+ </>+ )}+ </div>+ </div>+ </div>+ );+};diff --git a/examples/quote-configurator/app/config.ts b/examples/quote-configurator/app/config.tsnew file mode 100644index 0000000000..0ff23091c0--- /dev/null+++ b/examples/quote-configurator/app/config.ts@@ -0,0 +1,36 @@+const CARBON_API_KEY = process.env.CARBON_API_KEY!;+const CARBON_API_URL = process.env.CARBON_API_URL!;+const CARBON_APP_URL = process.env.CARBON_APP_URL!;+const CARBON_COMPANY_ID = process.env.CARBON_COMPANY_ID!;+const CARBON_PUBLIC_KEY = process.env.CARBON_PUBLIC_KEY!;++const CONFIGURED_ITEM_ID = process.env.CONFIGURED_ITEM_ID!;++if (!CARBON_API_KEY) {+ throw new Error("CARBON_API_KEY must be set");+}++if (!CARBON_API_URL) {+ throw new Error("CARBON_API_URL must be set");+}++if (!CARBON_APP_URL) {+ throw new Error("CARBON_APP_URL must be set");+}++if (!CARBON_COMPANY_ID) {+ throw new Error("CARBON_COMPANY_ID must be set");+}++if (!CARBON_PUBLIC_KEY) {+ throw new Error("CARBON_PUBLIC_KEY must be set");+}++export {+ CARBON_API_KEY,+ CARBON_API_URL,+ CARBON_APP_URL,+ CARBON_COMPANY_ID,+ CARBON_PUBLIC_KEY,+ CONFIGURED_ITEM_ID,+};diff --git a/examples/quote-configurator/app/entry.client.tsx b/examples/quote-configurator/app/entry.client.tsxnew file mode 100644index 0000000000..74a69e2d9e--- /dev/null+++ b/examples/quote-configurator/app/entry.client.tsx@@ -0,0 +1,7 @@+import { RemixBrowser } from "@remix-run/react";+import { startTransition } from "react";+import { hydrateRoot } from "react-dom/client";++startTransition(() => {+ hydrateRoot(document, <RemixBrowser />);+});diff --git a/examples/quote-configurator/app/entry.server.tsx b/examples/quote-configurator/app/entry.server.tsxnew file mode 100644index 0000000000..7c5b94e28e--- /dev/null+++ b/examples/quote-configurator/app/entry.server.tsx@@ -0,0 +1,21 @@+import { RemixServer } from "@remix-run/react";+import type { EntryContext } from "@vercel/remix";+import { handleRequest } from "@vercel/remix";++++export default async function (+ request: Request,+ responseStatusCode: number,+ responseHeaders: Headers,+ remixContext: EntryContext+) {+++ return handleRequest(+ request,+ responseStatusCode,+ responseHeaders,+ <RemixServer context={remixContext} url={request.url} />+ );+}diff --git a/examples/quote-configurator/app/lib/carbon.server.ts b/examples/quote-configurator/app/lib/carbon.server.tsnew file mode 100644index 0000000000..b36e89ced2--- /dev/null+++ b/examples/quote-configurator/app/lib/carbon.server.ts@@ -0,0 +1,311 @@+import type { SupabaseClient } from "@supabase/supabase-js";+import { createClient } from "@supabase/supabase-js";+import {+ CARBON_API_KEY,+ CARBON_API_URL,+ CARBON_APP_URL,+ CARBON_COMPANY_ID,+ CARBON_PUBLIC_KEY,+} from "~/config";++export const quoteLineStatusType = [+ "Not Started",+ "In Progress",+ "Complete",+ "No Quote",+] as const;++export const quoteStatusType = [+ "Draft",+ "Sent",+ "Ordered",+ "Partial",+ "Lost",+ "Cancelled",+ "Expired",+] as const;++class CarbonClient {+ private readonly appUrl: string = CARBON_APP_URL;+ private readonly client: SupabaseClient;+ private readonly companyId: string = CARBON_COMPANY_ID;+ constructor() {+ this.client = createClient(CARBON_API_URL, CARBON_PUBLIC_KEY, {+ global: {+ headers: {+ "carbon-key": CARBON_API_KEY,+ },+ },+ });+ }++ async getCustomer(id: string) {+ return this.client.from("customer").select("*").eq("id", id).single();+ }++ async getCustomerByEmail(email: string) {+ const result = await this.client+ .from("customerContact")+ .select("customerId, contact(email, companyId)")+ .eq("contact.email", email)+ .eq("contact.companyId", this.companyId)+ .maybeSingle();++ if (result.error) {+ return result;+ }++ if (!result.data) {+ return {+ data: null,+ error: "Customer not found",+ };+ }++ return {+ data: result.data.customerId,+ error: null,+ };+ }++ async getCustomerPayment(customerId: string) {+ return this.client+ .from("customerPayment")+ .select("*")+ .eq("customerId", customerId)+ .single();+ }++ async getCustomerShipping(customerId: string) {+ return this.client+ .from("customerShipping")+ .select("*")+ .eq("customerId", customerId)+ .single();+ }++ async getNextSequence(table: string) {+ return this.client.rpc("get_next_sequence", {+ sequence_name: table,+ company_id: this.companyId,+ });+ }++ async deleteQuote(id: string) {+ return this.client.from("quote").delete().eq("id", id);+ }++ async getQuote(id: string) {+ return this.client.from("quote").select("*").eq("id", id).single();+ }++ async upsertQuote(+ quote:+ | {+ quoteId: string;+ customerId: string;+ currencyCode: string;+ expirationDate?: string;+ createdBy: string;+ }+ | {+ id: string;+ quoteId: string;+ customerId: string;+ currencyCode: string;+ expirationDate?: string;+ updatedBy: string;+ }+ ) {+ if (!("id" in quote)) {+ const [customerPayment, customerShipping] = await Promise.all([+ this.getCustomerPayment(quote.customerId),+ this.getCustomerShipping(quote.customerId),+ ]);++ if (customerPayment.error) return customerPayment;+ if (customerShipping.error) return customerShipping;++ const {+ paymentTermId,+ invoiceCustomerId,+ invoiceCustomerContactId,+ invoiceCustomerLocationId,+ } = customerPayment.data;++ const { shippingMethodId, shippingTermId } = customerShipping.data;++ const insert = await this.client+ .from("quote")+ .insert([{ ...quote, companyId: this.companyId }])+ .select("id, quoteId")+ .single();+ if (insert.error) {+ console.error(insert.error);+ return insert;+ }++ const quoteId = insert.data?.id;+ if (!quoteId) return insert;++ const [shipment, payment, opportunity, externalLink] = await Promise.all([+ this.client.from("quoteShipment").insert([+ {+ id: quoteId,+ shippingMethodId: shippingMethodId,+ shippingTermId: shippingTermId,+ companyId: this.companyId,+ },+ ]),+ this.client.from("quotePayment").insert([+ {+ id: quoteId,+ invoiceCustomerId: invoiceCustomerId,+ invoiceCustomerContactId: invoiceCustomerContactId,+ invoiceCustomerLocationId: invoiceCustomerLocationId,+ paymentTermId: paymentTermId,+ companyId: this.companyId,+ },+ ]),+ this.client+ .from("opportunity")+ .insert([{ quoteId, companyId: this.companyId }]),+ this.upsertExternalLink({+ documentType: "Quote",+ documentId: quoteId,+ customerId: quote.customerId,+ expiresAt: quote.expirationDate,+ companyId: this.companyId,+ }),+ ]);++ if (shipment.error) {+ await this.deleteQuote(quoteId);+ return payment;+ }+ if (payment.error) {+ await this.deleteQuote(quoteId);+ return payment;+ }+ if (opportunity.error) {+ await this.deleteQuote(quoteId);+ return opportunity;+ }+ if (externalLink.data) {+ await this.client+ .from("quote")+ .update({ externalLinkId: externalLink.data.id })+ .eq("id", quoteId);+ }++ return insert;+ } else {+ return this.client+ .from("quote")+ .update({+ ...this.sanitize(quote),+ updatedAt: new Date().toISOString(),+ })+ .eq("id", quote.id)+ .select("id, quoteId")+ .single();+ }+ }++ async upsertExternalLink(externalLink: {+ documentType: string;+ documentId: string;+ customerId: string;+ expiresAt?: string;+ companyId: string;+ }) {+ return this.client+ .from("externalLink")+ .insert(externalLink)+ .select("id")+ .single();+ }++ async upsertQuoteLine(+ quotationLine:+ | {+ quoteId: string;+ quantity: number[];+ itemId: string;+ description: string;+ methodType: "Buy" | "Make" | "Pick";+ unitOfMeasureCode: string;+ configuration?: Record<string, unknown>;+ }+ | {+ id: string;+ quoteId: string;+ quantity: number[];+ itemId: string;+ description: string;+ methodType: "Buy" | "Make" | "Pick";+ unitOfMeasureCode: string;+ configuration?: Record<string, unknown>;+ }+ ) {+ if ("id" in quotationLine) {+ return this.client+ .from("quoteLine")+ .update(+ this.sanitize({+ ...quotationLine,+ companyId: this.companyId,+ updatedBy: "system",+ })+ )+ .eq("id", quotationLine.id)+ .select("id")+ .single();+ }+ return this.client+ .from("quoteLine")+ .insert([+ { ...quotationLine, companyId: this.companyId, createdBy: "system" },+ ])+ .select("*")+ .single();+ }++ async upsertQuoteLineMethod(lineMethod: {+ itemId: string;+ quoteId: string;+ quoteLineId: string;+ configuration?: Record<string, unknown>;+ }) {+ return this.client.functions.invoke("get-method", {+ body: {+ type: "itemToQuoteLine",+ sourceId: lineMethod.itemId,+ targetId: `${lineMethod.quoteId}:${lineMethod.quoteLineId}`,+ companyId: this.companyId,+ configuration: lineMethod.configuration,+ userId: "system",+ },+ });+ }++ sanitize<T extends Record<string, any>>(+ input: T+ ): {+ [K in keyof T]: T[K] extends undefined ? null : T[K];+ } {+ const output = { ...input } as {+ [K in keyof T]: T[K] extends undefined ? null : T[K];+ };+ Object.keys(output).forEach((key) => {+ if (output[key as keyof T] === undefined && key !== "id") {+ output[key as keyof T] = null as any;+ }+ });+ return output;+ }+}++const carbon = new CarbonClient();++export { carbon };diff --git a/examples/quote-configurator/app/root.tsx b/examples/quote-configurator/app/root.tsxnew file mode 100644index 0000000000..67cf008b05--- /dev/null+++ b/examples/quote-configurator/app/root.tsx@@ -0,0 +1,96 @@+import { Toaster } from "@carbon/react";+import {+ isRouteErrorResponse,+ Links,+ Meta,+ Outlet,+ Scripts,+ ScrollRestoration,+ useLoaderData,+ useRouteError,+} from "@remix-run/react";+import type { ActionFunctionArgs, LoaderFunctionArgs } from "@vercel/remix";+import { json } from "@vercel/remix";+import React from "react";+import Tailwind from "~/styles/tailwind.css?url";++export function links() {+ return [{ rel: "stylesheet", href: Tailwind }];+}++export async function loader({ request }: LoaderFunctionArgs) {+ return json({+ env: {},+ });+}++export async function action({ request }: ActionFunctionArgs) {+ return json({});+}++function Document({+ children,+ title = "Configurator Example",+}: {+ children: React.ReactNode;+ title?: string;+}) {+ return (+ <html lang="en" className="h-full overflow-x-hidden">+ <head>+ <meta charSet="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <Meta />+ <title>{title}</title>+ <Links />+ </head>+ <body className="h-full bg-background antialiased selection:bg-primary/10 selection:text-primary">+ {children}+ <Toaster />+ <ScrollRestoration />+ <Scripts />+ </body>+ </html>+ );+}++export default function App() {+ const { env } = useLoaderData<typeof loader>();++ return (+ <Document>+ <Outlet />+ <script+ dangerouslySetInnerHTML={{+ __html: `window.env = ${JSON.stringify(env)}`,+ }}+ />+ </Document>+ );+}++export function ErrorBoundary() {+ const error = useRouteError();++ const message = isRouteErrorResponse(error)+ ? error.data.message ?? error.data+ : error instanceof Error+ ? error.message+ : String(error);++ return (+ <Document title="Error!">+ <div className="light">+ <div className="flex flex-col w-full h-screen items-center justify-center space-y-4 ">+ <img+ src="/carbon-logo-mark.svg"+ alt="Carbon Logo"+ className="block max-w-[60px]"+ />+ <h1 className="text-2xl font-bold">Something went wrong</h1>+ <p className="text-muted-foreground max-w-2xl">{message}</p>+ </div>+ </div>+ </Document>+ );+}diff --git a/examples/quote-configurator/app/routes/_index.tsx b/examples/quote-configurator/app/routes/_index.tsxnew file mode 100644index 0000000000..b3a1e1d22e--- /dev/null+++ b/examples/quote-configurator/app/routes/_index.tsx@@ -0,0 +1,204 @@+import { Input, Number, Select, ValidatedForm, validator } from "@carbon/form";+import { Button, Heading, toast, TooltipProvider } from "@carbon/react";+import { useFetcher } from "@remix-run/react";+import type { ActionFunctionArgs } from "@vercel/remix";+import { json } from "@vercel/remix";+import { useEffect } from "react";+import z from "zod";+import { zfd } from "zod-form-data";+import { CONFIGURED_ITEM_ID } from "~/config";+import { carbon } from "~/lib/carbon.server";++const formValidator = z.object({+ email: z.string().email(),+ material: z.string().min(1),+ height: zfd.numeric(z.number().min(0)),+ width: zfd.numeric(z.number().min(0)),+ length: zfd.numeric(z.number().min(0)),+});++export async function action({ request }: ActionFunctionArgs) {+ const validation = await validator(formValidator).validate(+ await request.formData()+ );++ if (validation.error) {+ return json(+ {+ success: false,+ message: "Invalid form data",+ data: null,+ },+ { status: 500 }+ );+ }++ const { email, material, height, width, length } = validation.data;++ // Get customer by email (you'll need to add email to the form)+ const [customer, sequence] = await Promise.all([+ carbon.getCustomerByEmail(email),+ carbon.getNextSequence("quote"),+ ]); // Replace with actual email from form++ if (customer.error) {+ return json(+ {+ success: false,+ message: "Failed to get customer from email",+ data: null,+ },+ { status: 500 }+ );+ }++ if (sequence.error) {+ return json(+ {+ success: false,+ message: "Failed to get next sequence",+ data: null,+ },+ { status: 500 }+ );+ }++ const quoteId = sequence.data;++ const quoteInsert = await carbon.upsertQuote({+ quoteId,+ customerId: customer.data.id,+ currencyCode: "USD",+ createdBy: "system",+ });++ if (quoteInsert.error || !quoteInsert.data) {+ console.error(quoteInsert.error);+ return json(+ {+ success: false,+ message: "Failed to create quote",+ data: null,+ },+ { status: 500 }+ );+ }++ const configuration = {+ width,+ height,+ length,+ material,+ };++ const quoteLineInsert = await carbon.upsertQuoteLine({+ quoteId: quoteInsert.data.id,+ itemId: CONFIGURED_ITEM_ID,+ description: `${material} Custom Item - ${width}x${height}x${length}`,+ methodType: "Make",+ unitOfMeasureCode: "EA",+ quantity: [1, 25, 50, 100],+ configuration,+ });++ if (quoteLineInsert.error || !quoteLineInsert.data) {+ console.error(quoteLineInsert.error);+ return json(+ {+ success: false,+ message: "Failed to create quote line",+ data: null,+ },+ { status: 500 }+ );+ }++ const upsertMethod = await carbon.upsertQuoteLineMethod({+ quoteId: quoteInsert.data.id,+ quoteLineId: quoteLineInsert.data.id,+ itemId: CONFIGURED_ITEM_ID,+ configuration,+ });++ if (upsertMethod.error) {+ console.error(upsertMethod.error);+ return json(+ {+ success: false,+ message: "Failed to create quote line method",+ data: null,+ },+ { status: 500 }+ );+ }++ return json({+ success: true,+ message: `Quote created: ${quoteInsert.data.quoteId}`,+ data: {+ quoteId: quoteInsert.data.quoteId,+ id: quoteInsert.data.id,+ },+ });+}++export default function Route() {+ const fetcher = useFetcher<typeof action>();++ useEffect(() => {+ if (fetcher.data?.success === true) {+ toast.success(fetcher.data.message);+ }++ if (fetcher.data?.success === false) {+ toast.error(fetcher.data.message);+ }+ }, [fetcher.data]);++ return (+ <TooltipProvider>+ <div className="flex h-screen w-screen flex-col items-center justify-center p-4">+ <div className="max-w-xl text-center flex flex-col gap-8">+ <Heading size="h1">Quote Configurator</Heading>++ <ValidatedForm+ method="post"+ fetcher={fetcher}+ validator={formValidator}+ className="flex flex-col gap-4"+ >+ <div className="grid grid-cols-1 gap-4">+ <Input+ name="email"+ label="Email"+ type="email"+ placeholder="Enter your email"+ />+ <Select+ name="material"+ label="Material"+ options={["Steel", "Aluminum", "Copper"].map((material) => ({+ label: material,+ value: material,+ }))}+ />+ <Number name="height" label="Height" />+ <Number name="width" label="Width" />+ <Number name="length" label="Length" />+ </div>++ <Button+ type="submit"+ variant="primary"+ size="lg"+ isLoading={fetcher.state !== "idle"}+ isDisabled={fetcher.state !== "idle"}+ >+ Generate Quote+ </Button>+ </ValidatedForm>+ </div>+ </div>+ </TooltipProvider>+ );+}diff --git a/examples/quote-configurator/app/styles/tailwind.css b/examples/quote-configurator/app/styles/tailwind.cssnew file mode 100644index 0000000000..bd859702d9--- /dev/null+++ b/examples/quote-configurator/app/styles/tailwind.css@@ -0,0 +1,63 @@+@import url("non.geist");+@import url("non.geist/mono");++@tailwind base;+@tailwind components;+@tailwind utilities;++@layer base {+ :root {+ --background: 0 0% 100%;+ --foreground: 240 10% 3.9%;+ --card: 0 0% 100%;+ --card-foreground: 240 10% 3.9%;+ --primary: 0 0 0;+ --primary-foreground: 0 0% 100%;+ --popover: 0 0% 100%;+ --popover-foreground: 240 10% 3.9%;+ --muted: 240 4.8% 95.9%;+ --muted-foreground: 240 3.8% 37.1%;+ --accent: 240 4.8% 95.9%;+ --accent-foreground: 240 5.9% 10%;+ --destructive: 0 84.2% 60.2%;+ --destructive-foreground: 0 0% 98%;+ --border: 240 5.9% 90%;+ --input: 240 5.9% 90%;+ --ring: 240 10% 3.9%;+ --radius: 0.5rem;++ --header-height: 70px;+ }++ .dark {+ --background: 220 14.3% 6.1%;+ --foreground: 0 0% 98%;+ --card: 220 10% 3.9%;+ --card-foreground: 0 0% 98%;+ --popover: 220 10% 3.9%;+ --popover-foreground: 0 0% 98%;+ --primary: 0 0 100%;+ --primary-foreground: 0 0% 0%;+ --muted: 0 0% 13.6%;+ --muted-foreground: 0 0% 65%;+ --accent: 0 0% 7.6%;+ --accent-foreground: 0 0% 98%;+ --destructive: 0 62.8% 30.6%;+ --destructive-foreground: 0 0% 98%;+ --border: 220 3.7% 15.9%;+ --input: 220 3.7% 15.9%;+ --ring: 220 4.9% 83.9%;+ }+}++@layer base {+ * {+ @apply border-border;+ }+ body {+ @apply bg-background text-foreground;+ font-feature-settings: "rlig" 1, "calt" 1;+ font-synthesis-weight: none;+ text-rendering: optimizeLegibility;+ }+}diff --git a/examples/quote-configurator/env.d.ts b/examples/quote-configurator/env.d.tsnew file mode 100644index 0000000000..4a1bdb51fe--- /dev/null+++ b/examples/quote-configurator/env.d.ts@@ -0,0 +1,3 @@+/// <reference types="vite/client" />+/// <reference types="@vercel/remix/globals" />+/// <reference types="@vercel/remix" />diff --git a/examples/quote-configurator/package.json b/examples/quote-configurator/package.jsonnew file mode 100644index 0000000000..cb7fecfccf--- /dev/null+++ b/examples/quote-configurator/package.json@@ -0,0 +1,43 @@+{+ "name": "quote-configurator",+ "type": "module",+ "dependencies": {+ "@carbon/react": "*",+ "@carbon/form": "*",+ "@carbon/utils": "*",+ "@remix-run/dev": "~2.11.2",+ "@remix-run/eslint-config": "~2.11.2",+ "@remix-run/react": "~2.11.2",+ "@remix-run/serve": "~2.11.2",+ "@supabase/functions-js": "2.1.5",+ "@supabase/supabase-js": "^2.40.0",+ "@vercel/remix": "~2.11.2",+ "non.geist": "~1.0.3",+ "react": "^18.2.0",+ "react-dom": "^18.2.0",+ "react-dropzone": "^14.2.3",+ "react-icons": "^5.4.0",+ "zod": "^3.24.1",+ "zod-form-data": "*"+ },+ "devDependencies": {+ "@types/react": "^18.2.0",+ "@types/react-dom": "^18.2.0",+ "autoprefixer": "10.4.14",+ "cross-env": "7.0.3",+ "nodemon": "^3.0.1",+ "postcss": "^8.4.33",+ "tailwindcss": "3.4.6",+ "typescript": "^5.2.2",+ "vite": "^5.3.3",+ "vite-tsconfig-paths": "^4.3.2"+ },+ "private": true,+ "scripts": {+ "clean": "rimraf .cache .turbo node_modules dist build",+ "start": "remix vite:dev",+ "lint": "TIMING=1 eslint \"app/**/*.ts*\"",+ "types": "tsc"+ },+ "sideEffects": false+}diff --git a/examples/quote-configurator/postcss.config.cjs b/examples/quote-configurator/postcss.config.cjsnew file mode 100644index 0000000000..4182e2b578--- /dev/null+++ b/examples/quote-configurator/postcss.config.cjs@@ -0,0 +1 @@+module.exports = require("@carbon/tailwind/postcss.config");diff --git a/examples/quote-configurator/public/apple-touch-icon.png b/examples/quote-configurator/public/apple-touch-icon.pngnew file mode 100644index 0000000000..7d10fd7748Binary files /dev/null and b/examples/quote-configurator/public/apple-touch-icon.png differdiff --git a/examples/quote-configurator/public/carbon-logo-mark.svg b/examples/quote-configurator/public/carbon-logo-mark.svgnew file mode 100644index 0000000000..048049e1e5--- /dev/null+++ b/examples/quote-configurator/public/carbon-logo-mark.svg@@ -0,0 +1,20 @@+<svg width="362" height="349" viewBox="0 0 362 349" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M181.165 139.643V69.8213L241.346 35.0564L241.054 104.878L181.165 139.643Z" fill="#60FFD2"/>+<path d="M181.165 69.8213V139.643L120.4 104.878V35.0564L181.165 69.8213Z" fill="#36B5B4"/>+<path d="M120.4 35.0565L181.165 69.8214L241.347 35.0565L181.165 -0.000610352L120.4 35.0565Z" fill="#5FE4D2"/>+<path d="M240.818 244.172V174.35L300.999 139.585L300.707 209.407L240.818 244.172Z" fill="#71DEFF"/>+<path d="M240.818 174.35V244.172L180.052 209.407V139.585L240.818 174.35Z" fill="#3877C5"/>+<path d="M180.052 139.586L240.818 174.35L300.999 139.586L240.818 104.528L180.052 139.586Z" fill="#4EAADE"/>+<path d="M121.512 244.172V174.35L181.693 139.585L181.401 209.407L121.512 244.172Z" fill="#71DEFF"/>+<path d="M121.512 174.35V244.172L60.7466 209.407V139.585L121.512 174.35Z" fill="#3877C5"/>+<path d="M60.7466 139.586L121.512 174.35L181.694 139.586L121.512 104.528L60.7466 139.586Z" fill="#4EAADE"/>+<path d="M181.165 348.701V278.879L241.346 244.114L241.054 313.936L181.165 348.701Z" fill="#7D7FE5"/>+<path d="M181.165 278.879V348.701L120.4 313.936V244.114L181.165 278.879Z" fill="#2F31AE"/>+<path d="M120.4 244.114L181.165 278.879L241.347 244.114L181.165 209.057L120.4 244.114Z" fill="#6041D0"/>+<path d="M60.7651 348.701V278.879L120.946 244.114L120.654 313.936L60.7651 348.701Z" fill="#7D7FE5"/>+<path d="M60.7656 278.879V348.701L0 313.936V244.114L60.7656 278.879Z" fill="#2F31AE"/>+<path d="M0 244.114L60.7656 278.879L120.947 244.114L60.7656 209.057L0 244.114Z" fill="#6041D0"/>+<path d="M301.017 348.701V278.879L361.198 244.114L360.906 313.936L301.017 348.701Z" fill="#7D7FE5"/>+<path d="M301.018 278.879V348.701L240.252 313.936V244.114L301.018 278.879Z" fill="#2F31AE"/>+<path d="M240.252 244.114L301.018 278.879L361.199 244.114L301.018 209.057L240.252 244.114Z" fill="#6041D0"/>+</svg>diff --git a/examples/quote-configurator/public/carbon-word-dark.png b/examples/quote-configurator/public/carbon-word-dark.pngnew file mode 100644index 0000000000..3606059a75Binary files /dev/null and b/examples/quote-configurator/public/carbon-word-dark.png differdiff --git a/examples/quote-configurator/public/carbon-word-dark.svg b/examples/quote-configurator/public/carbon-word-dark.svgnew file mode 100644index 0000000000..b555c4b360--- /dev/null+++ b/examples/quote-configurator/public/carbon-word-dark.svg@@ -0,0 +1,26 @@+<svg width="1307" height="349" viewBox="0 0 1307 349" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M412.646 193.426C412.646 178.405 415.703 165.305 421.816 154.126C427.929 142.773 436.401 134.039 447.23 127.926C458.059 121.638 470.461 118.494 484.434 118.494C502.425 118.494 517.271 123.035 528.974 132.118C540.851 141.026 548.799 153.602 552.816 169.846H513.254C511.158 163.558 507.577 158.667 502.512 155.174C497.621 151.506 491.508 149.672 484.172 149.672C473.692 149.672 465.395 153.515 459.282 161.2C453.169 168.711 450.112 179.453 450.112 193.426C450.112 207.225 453.169 217.967 459.282 225.652C465.395 233.163 473.692 236.918 484.172 236.918C499.019 236.918 508.713 230.281 513.254 217.006H552.816C548.799 232.726 540.851 245.215 528.974 254.472C517.097 263.729 502.25 268.358 484.434 268.358C470.461 268.358 458.059 265.301 447.23 259.188C436.401 252.9 427.929 244.167 421.816 232.988C415.703 221.635 412.646 208.447 412.646 193.426Z" fill="white"/>+<path d="M562.395 192.902C562.395 178.23 565.277 165.217 571.041 153.864C576.98 142.511 584.927 133.777 594.883 127.664C605.014 121.551 616.28 118.494 628.681 118.494C639.511 118.494 648.943 120.677 656.977 125.044C665.187 129.411 671.737 134.913 676.627 141.55V120.852H713.569V266H676.627V244.778C671.911 251.59 665.361 257.267 656.977 261.808C648.768 266.175 639.249 268.358 628.419 268.358C616.193 268.358 605.014 265.214 594.883 258.926C584.927 252.638 576.98 243.817 571.041 232.464C565.277 220.936 562.395 207.749 562.395 192.902ZM676.627 193.426C676.627 184.518 674.881 176.92 671.387 170.632C667.894 164.169 663.178 159.279 657.239 155.96C651.301 152.467 644.925 150.72 638.113 150.72C631.301 150.72 625.013 152.379 619.249 155.698C613.485 159.017 608.769 163.907 605.101 170.37C601.608 176.658 599.861 184.169 599.861 192.902C599.861 201.635 601.608 209.321 605.101 215.958C608.769 222.421 613.485 227.399 619.249 230.892C625.188 234.385 631.476 236.132 638.113 236.132C644.925 236.132 651.301 234.473 657.239 231.154C663.178 227.661 667.894 222.77 671.387 216.482C674.881 210.019 676.627 202.334 676.627 193.426Z" fill="white"/>+<path d="M778.214 143.384C782.93 135.699 789.043 129.673 796.554 125.306C804.239 120.939 812.972 118.756 822.754 118.756V157.27H813.06C801.532 157.27 792.798 159.977 786.86 165.392C781.096 170.807 778.214 180.239 778.214 193.688V266H741.534V120.852H778.214V143.384Z" fill="white"/>+<path d="M876.28 142.074C880.996 135.087 887.458 129.411 895.668 125.044C904.052 120.677 913.571 118.494 924.226 118.494C936.627 118.494 947.806 121.551 957.762 127.664C967.892 133.777 975.84 142.511 981.604 153.864C987.542 165.043 990.512 178.055 990.512 192.902C990.512 207.749 987.542 220.936 981.604 232.464C975.84 243.817 967.892 252.638 957.762 258.926C947.806 265.214 936.627 268.358 924.226 268.358C913.396 268.358 903.877 266.262 895.668 262.07C887.633 257.703 881.17 252.114 876.28 245.302V266H839.6V72.12H876.28V142.074ZM953.046 192.902C953.046 184.169 951.212 176.658 947.544 170.37C944.05 163.907 939.334 159.017 933.396 155.698C927.632 152.379 921.344 150.72 914.532 150.72C907.894 150.72 901.606 152.467 895.668 155.96C889.904 159.279 885.188 164.169 881.52 170.632C878.026 177.095 876.28 184.693 876.28 193.426C876.28 202.159 878.026 209.757 881.52 216.22C885.188 222.683 889.904 227.661 895.668 231.154C901.606 234.473 907.894 236.132 914.532 236.132C921.344 236.132 927.632 234.385 933.396 230.892C939.334 227.399 944.05 222.421 947.544 215.958C951.212 209.495 953.046 201.81 953.046 192.902Z" fill="white"/>+<path d="M1073.76 268.358C1059.78 268.358 1047.21 265.301 1036.03 259.188C1024.85 252.9 1016.03 244.079 1009.57 232.726C1003.28 221.373 1000.14 208.273 1000.14 193.426C1000.14 178.579 1003.37 165.479 1009.83 154.126C1016.47 142.773 1025.46 134.039 1036.82 127.926C1048.17 121.638 1060.83 118.494 1074.81 118.494C1088.78 118.494 1101.44 121.638 1112.8 127.926C1124.15 134.039 1133.06 142.773 1139.52 154.126C1146.16 165.479 1149.48 178.579 1149.48 193.426C1149.48 208.273 1146.07 221.373 1139.26 232.726C1132.62 244.079 1123.54 252.9 1112.01 259.188C1100.66 265.301 1087.91 268.358 1073.76 268.358ZM1073.76 236.394C1080.4 236.394 1086.6 234.822 1092.36 231.678C1098.3 228.359 1103.01 223.469 1106.51 217.006C1110 210.543 1111.75 202.683 1111.75 193.426C1111.75 179.627 1108.08 169.06 1100.74 161.724C1093.58 154.213 1084.76 150.458 1074.28 150.458C1063.8 150.458 1054.98 154.213 1047.82 161.724C1040.83 169.06 1037.34 179.627 1037.34 193.426C1037.34 207.225 1040.75 217.879 1047.56 225.39C1054.54 232.726 1063.28 236.394 1073.76 236.394Z" fill="white"/>+<path d="M1248.96 118.756C1266.25 118.756 1280.22 124.258 1290.88 135.262C1301.53 146.091 1306.86 161.287 1306.86 180.85V266H1270.18V185.828C1270.18 174.3 1267.3 165.479 1261.53 159.366C1255.77 153.078 1247.91 149.934 1237.95 149.934C1227.82 149.934 1219.79 153.078 1213.85 159.366C1208.08 165.479 1205.2 174.3 1205.2 185.828V266H1168.52V120.852H1205.2V138.93C1210.09 132.642 1216.29 127.751 1223.8 124.258C1231.49 120.59 1239.87 118.756 1248.96 118.756Z" fill="white"/>+<path d="M181.165 139.644V69.822L241.346 35.0571L241.054 104.879L181.165 139.644Z" fill="#60FFD2"/>+<path d="M181.165 69.822V139.644L120.4 104.879V35.0571L181.165 69.822Z" fill="#36B5B4"/>+<path d="M120.4 35.0571L181.165 69.822L241.346 35.0571L181.165 0L120.4 35.0571Z" fill="#5FE4D2"/>+<path d="M240.818 244.173V174.351L300.999 139.586L300.707 209.408L240.818 244.173Z" fill="#71DEFF"/>+<path d="M240.818 174.351V244.173L180.052 209.408V139.586L240.818 174.351Z" fill="#3877C5"/>+<path d="M180.052 139.586L240.818 174.351L300.999 139.586L240.818 104.529L180.052 139.586Z" fill="#4EAADE"/>+<path d="M121.512 244.173V174.351L181.693 139.586L181.401 209.408L121.512 244.173Z" fill="#71DEFF"/>+<path d="M121.512 174.351V244.173L60.7466 209.408V139.586L121.512 174.351Z" fill="#3877C5"/>+<path d="M60.7466 139.586L121.512 174.351L181.693 139.586L121.512 104.529L60.7466 139.586Z" fill="#4EAADE"/>+<path d="M181.165 348.702V278.88L241.346 244.115L241.054 313.937L181.165 348.702Z" fill="#7D7FE5"/>+<path d="M181.165 278.88V348.702L120.4 313.937V244.115L181.165 278.88Z" fill="#2F31AE"/>+<path d="M120.4 244.115L181.165 278.88L241.346 244.115L181.165 209.057L120.4 244.115Z" fill="#6041D0"/>+<path d="M60.7652 348.702V278.88L120.947 244.115L120.654 313.937L60.7652 348.702Z" fill="#7D7FE5"/>+<path d="M60.7652 278.88V348.702L0 313.937V244.115L60.7652 278.88Z" fill="#2F31AE"/>+<path d="M0 244.115L60.7652 278.88L120.947 244.115L60.7656 209.057L0 244.115Z" fill="#6041D0"/>+<path d="M301.017 348.702V278.88L361.198 244.115L360.906 313.937L301.017 348.702Z" fill="#7D7FE5"/>+<path d="M301.017 278.88V348.702L240.252 313.937V244.115L301.017 278.88Z" fill="#2F31AE"/>+<path d="M240.252 244.115L301.017 278.88L361.198 244.115L301.018 209.057L240.252 244.115Z" fill="#6041D0"/>+</svg>diff --git a/examples/quote-configurator/public/carbon-word-light.png b/examples/quote-configurator/public/carbon-word-light.pngnew file mode 100644index 0000000000..becd8f13bbBinary files /dev/null and b/examples/quote-configurator/public/carbon-word-light.png differdiff --git a/examples/quote-configurator/public/carbon-word-light.svg b/examples/quote-configurator/public/carbon-word-light.svgnew file mode 100644index 0000000000..3e899a2d1b--- /dev/null+++ b/examples/quote-configurator/public/carbon-word-light.svg@@ -0,0 +1,26 @@+<svg width="1307" height="349" viewBox="0 0 1307 349" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M412.646 193.426C412.646 178.405 415.703 165.305 421.816 154.126C427.929 142.773 436.401 134.039 447.23 127.926C458.059 121.638 470.461 118.494 484.434 118.494C502.425 118.494 517.271 123.035 528.974 132.118C540.851 141.026 548.799 153.602 552.816 169.846H513.254C511.158 163.558 507.577 158.667 502.512 155.174C497.621 151.506 491.508 149.672 484.172 149.672C473.692 149.672 465.395 153.515 459.282 161.2C453.169 168.711 450.112 179.453 450.112 193.426C450.112 207.225 453.169 217.967 459.282 225.652C465.395 233.163 473.692 236.918 484.172 236.918C499.019 236.918 508.713 230.281 513.254 217.006H552.816C548.799 232.726 540.851 245.215 528.974 254.472C517.097 263.729 502.25 268.358 484.434 268.358C470.461 268.358 458.059 265.301 447.23 259.188C436.401 252.9 427.929 244.167 421.816 232.988C415.703 221.635 412.646 208.447 412.646 193.426Z" fill="#212278"/>+<path d="M562.395 192.902C562.395 178.23 565.277 165.217 571.041 153.864C576.98 142.511 584.927 133.777 594.883 127.664C605.014 121.551 616.28 118.494 628.681 118.494C639.511 118.494 648.943 120.677 656.977 125.044C665.187 129.411 671.737 134.913 676.627 141.55V120.852H713.569V266H676.627V244.778C671.911 251.59 665.361 257.267 656.977 261.808C648.768 266.175 639.249 268.358 628.419 268.358C616.193 268.358 605.014 265.214 594.883 258.926C584.927 252.638 576.98 243.817 571.041 232.464C565.277 220.936 562.395 207.749 562.395 192.902ZM676.627 193.426C676.627 184.518 674.881 176.92 671.387 170.632C667.894 164.169 663.178 159.279 657.239 155.96C651.301 152.467 644.925 150.72 638.113 150.72C631.301 150.72 625.013 152.379 619.249 155.698C613.485 159.017 608.769 163.907 605.101 170.37C601.608 176.658 599.861 184.169 599.861 192.902C599.861 201.635 601.608 209.321 605.101 215.958C608.769 222.421 613.485 227.399 619.249 230.892C625.188 234.385 631.476 236.132 638.113 236.132C644.925 236.132 651.301 234.473 657.239 231.154C663.178 227.661 667.894 222.77 671.387 216.482C674.881 210.019 676.627 202.334 676.627 193.426Z" fill="#212278"/>+<path d="M778.214 143.384C782.93 135.699 789.043 129.673 796.554 125.306C804.239 120.939 812.972 118.756 822.754 118.756V157.27H813.06C801.532 157.27 792.798 159.977 786.86 165.392C781.096 170.807 778.214 180.239 778.214 193.688V266H741.534V120.852H778.214V143.384Z" fill="#212278"/>+<path d="M876.28 142.074C880.996 135.087 887.458 129.411 895.668 125.044C904.052 120.677 913.571 118.494 924.226 118.494C936.627 118.494 947.806 121.551 957.762 127.664C967.892 133.777 975.84 142.511 981.604 153.864C987.542 165.043 990.512 178.055 990.512 192.902C990.512 207.749 987.542 220.936 981.604 232.464C975.84 243.817 967.892 252.638 957.762 258.926C947.806 265.214 936.627 268.358 924.226 268.358C913.396 268.358 903.877 266.262 895.668 262.07C887.633 257.703 881.17 252.114 876.28 245.302V266H839.6V72.12H876.28V142.074ZM953.046 192.902C953.046 184.169 951.212 176.658 947.544 170.37C944.05 163.907 939.334 159.017 933.396 155.698C927.632 152.379 921.344 150.72 914.532 150.72C907.894 150.72 901.606 152.467 895.668 155.96C889.904 159.279 885.188 164.169 881.52 170.632C878.026 177.095 876.28 184.693 876.28 193.426C876.28 202.159 878.026 209.757 881.52 216.22C885.188 222.683 889.904 227.661 895.668 231.154C901.606 234.473 907.894 236.132 914.532 236.132C921.344 236.132 927.632 234.385 933.396 230.892C939.334 227.399 944.05 222.421 947.544 215.958C951.212 209.495 953.046 201.81 953.046 192.902Z" fill="#212278"/>+<path d="M1073.76 268.358C1059.78 268.358 1047.21 265.301 1036.03 259.188C1024.85 252.9 1016.03 244.079 1009.57 232.726C1003.28 221.373 1000.14 208.273 1000.14 193.426C1000.14 178.579 1003.37 165.479 1009.83 154.126C1016.47 142.773 1025.46 134.039 1036.82 127.926C1048.17 121.638 1060.83 118.494 1074.81 118.494C1088.78 118.494 1101.44 121.638 1112.8 127.926C1124.15 134.039 1133.06 142.773 1139.52 154.126C1146.16 165.479 1149.48 178.579 1149.48 193.426C1149.48 208.273 1146.07 221.373 1139.26 232.726C1132.62 244.079 1123.54 252.9 1112.01 259.188C1100.66 265.301 1087.91 268.358 1073.76 268.358ZM1073.76 236.394C1080.4 236.394 1086.6 234.822 1092.36 231.678C1098.3 228.359 1103.01 223.469 1106.51 217.006C1110 210.543 1111.75 202.683 1111.75 193.426C1111.75 179.627 1108.08 169.06 1100.74 161.724C1093.58 154.213 1084.76 150.458 1074.28 150.458C1063.8 150.458 1054.98 154.213 1047.82 161.724C1040.83 169.06 1037.34 179.627 1037.34 193.426C1037.34 207.225 1040.75 217.879 1047.56 225.39C1054.54 232.726 1063.28 236.394 1073.76 236.394Z" fill="#212278"/>+<path d="M1248.96 118.756C1266.25 118.756 1280.22 124.258 1290.88 135.262C1301.53 146.091 1306.86 161.287 1306.86 180.85V266H1270.18V185.828C1270.18 174.3 1267.3 165.479 1261.53 159.366C1255.77 153.078 1247.91 149.934 1237.95 149.934C1227.82 149.934 1219.79 153.078 1213.85 159.366C1208.08 165.479 1205.2 174.3 1205.2 185.828V266H1168.52V120.852H1205.2V138.93C1210.09 132.642 1216.29 127.751 1223.8 124.258C1231.49 120.59 1239.87 118.756 1248.96 118.756Z" fill="#212278"/>+<path d="M181.165 139.644V69.822L241.346 35.0571L241.054 104.879L181.165 139.644Z" fill="#60FFD2"/>+<path d="M181.165 69.822V139.644L120.4 104.879V35.0571L181.165 69.822Z" fill="#36B5B4"/>+<path d="M120.4 35.0571L181.165 69.822L241.346 35.0571L181.165 0L120.4 35.0571Z" fill="#5FE4D2"/>+<path d="M240.818 244.173V174.351L300.999 139.586L300.707 209.408L240.818 244.173Z" fill="#71DEFF"/>+<path d="M240.818 174.351V244.173L180.052 209.408V139.586L240.818 174.351Z" fill="#3877C5"/>+<path d="M180.052 139.586L240.818 174.351L300.999 139.586L240.818 104.529L180.052 139.586Z" fill="#4EAADE"/>+<path d="M121.512 244.173V174.351L181.693 139.586L181.401 209.408L121.512 244.173Z" fill="#71DEFF"/>+<path d="M121.512 174.351V244.173L60.7466 209.408V139.586L121.512 174.351Z" fill="#3877C5"/>+<path d="M60.7466 139.586L121.512 174.351L181.693 139.586L121.512 104.529L60.7466 139.586Z" fill="#4EAADE"/>+<path d="M181.165 348.702V278.88L241.346 244.115L241.054 313.937L181.165 348.702Z" fill="#7D7FE5"/>+<path d="M181.165 278.88V348.702L120.4 313.937V244.115L181.165 278.88Z" fill="#2F31AE"/>+<path d="M120.4 244.115L181.165 278.88L241.346 244.115L181.165 209.057L120.4 244.115Z" fill="#6041D0"/>+<path d="M60.7652 348.702V278.88L120.947 244.115L120.654 313.937L60.7652 348.702Z" fill="#7D7FE5"/>+<path d="M60.7652 278.88V348.702L-1.52588e-05 313.937V244.115L60.7652 278.88Z" fill="#2F31AE"/>+<path d="M-1.52588e-05 244.115L60.7652 278.88L120.947 244.115L60.7656 209.057L-1.52588e-05 244.115Z" fill="#6041D0"/>+<path d="M301.017 348.702V278.88L361.198 244.115L360.906 313.937L301.017 348.702Z" fill="#7D7FE5"/>+<path d="M301.017 278.88V348.702L240.252 313.937V244.115L301.017 278.88Z" fill="#2F31AE"/>+<path d="M240.252 244.115L301.017 278.88L361.198 244.115L301.018 209.057L240.252 244.115Z" fill="#6041D0"/>+</svg>diff --git a/examples/quote-configurator/public/favicon-16x16.png b/examples/quote-configurator/public/favicon-16x16.pngnew file mode 100644index 0000000000..eb216e453fBinary files /dev/null and b/examples/quote-configurator/public/favicon-16x16.png differdiff --git a/examples/quote-configurator/public/favicon-32x32.png b/examples/quote-configurator/public/favicon-32x32.pngnew file mode 100644index 0000000000..a7064d2122Binary files /dev/null and b/examples/quote-configurator/public/favicon-32x32.png differdiff --git a/examples/quote-configurator/public/favicon-96x96.png b/examples/quote-configurator/public/favicon-96x96.pngnew file mode 100644index 0000000000..c36c27be04Binary files /dev/null and b/examples/quote-configurator/public/favicon-96x96.png differdiff --git a/examples/quote-configurator/public/favicon.ico b/examples/quote-configurator/public/favicon.iconew file mode 100644index 0000000000..a87e92b575Binary files /dev/null and b/examples/quote-configurator/public/favicon.ico differdiff --git a/examples/quote-configurator/public/favicon.svg b/examples/quote-configurator/public/favicon.svgnew file mode 100644index 0000000000..1f953c23a1--- /dev/null+++ b/examples/quote-configurator/public/favicon.svg@@ -0,0 +1,22 @@+<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="362" height="349"><svg width="362" height="349" viewBox="0 0 362 349" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M181.165 139.643V69.8213L241.346 35.0564L241.054 104.878L181.165 139.643Z" fill="#60FFD2"></path>+<path d="M181.165 69.8213V139.643L120.4 104.878V35.0564L181.165 69.8213Z" fill="#36B5B4"></path>+<path d="M120.4 35.0565L181.165 69.8214L241.347 35.0565L181.165 -0.000610352L120.4 35.0565Z" fill="#5FE4D2"></path>+<path d="M240.818 244.172V174.35L300.999 139.585L300.707 209.407L240.818 244.172Z" fill="#71DEFF"></path>+<path d="M240.818 174.35V244.172L180.052 209.407V139.585L240.818 174.35Z" fill="#3877C5"></path>+<path d="M180.052 139.586L240.818 174.35L300.999 139.586L240.818 104.528L180.052 139.586Z" fill="#4EAADE"></path>+<path d="M121.512 244.172V174.35L181.693 139.585L181.401 209.407L121.512 244.172Z" fill="#71DEFF"></path>+<path d="M121.512 174.35V244.172L60.7466 209.407V139.585L121.512 174.35Z" fill="#3877C5"></path>+<path d="M60.7466 139.586L121.512 174.35L181.694 139.586L121.512 104.528L60.7466 139.586Z" fill="#4EAADE"></path>+<path d="M181.165 348.701V278.879L241.346 244.114L241.054 313.936L181.165 348.701Z" fill="#7D7FE5"></path>+<path d="M181.165 278.879V348.701L120.4 313.936V244.114L181.165 278.879Z" fill="#2F31AE"></path>+<path d="M120.4 244.114L181.165 278.879L241.347 244.114L181.165 209.057L120.4 244.114Z" fill="#6041D0"></path>+<path d="M60.7651 348.701V278.879L120.946 244.114L120.654 313.936L60.7651 348.701Z" fill="#7D7FE5"></path>+<path d="M60.7656 278.879V348.701L0 313.936V244.114L60.7656 278.879Z" fill="#2F31AE"></path>+<path d="M0 244.114L60.7656 278.879L120.947 244.114L60.7656 209.057L0 244.114Z" fill="#6041D0"></path>+<path d="M301.017 348.701V278.879L361.198 244.114L360.906 313.936L301.017 348.701Z" fill="#7D7FE5"></path>+<path d="M301.018 278.879V348.701L240.252 313.936V244.114L301.018 278.879Z" fill="#2F31AE"></path>+<path d="M240.252 244.114L301.018 278.879L361.199 244.114L301.018 209.057L240.252 244.114Z" fill="#6041D0"></path>+</svg><style>@media (prefers-color-scheme: light) { :root { filter: none; } }+@media (prefers-color-scheme: dark) { :root { filter: none; } }+</style></svg>\ No newline at end of filediff --git a/examples/quote-configurator/public/grid.svg b/examples/quote-configurator/public/grid.svgnew file mode 100644index 0000000000..76e3b29f0d--- /dev/null+++ b/examples/quote-configurator/public/grid.svg@@ -0,0 +1,5 @@++<svg id="download" xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">+ <path id="Path_3" data-name="Path 3" d="M96,95h4v1H96v4H95V96H86v4H85V96H76v4H75V96H66v4H65V96H56v4H55V96H46v4H45V96H36v4H35V96H26v4H25V96H16v4H15V96H0V95H15V86H0V85H15V76H0V75H15V66H0V65H15V56H0V55H15V46H0V45H15V36H0V35H15V26H0V25H15V16H0V15H15V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h4v1H96v9h4v1H96v9h4v1H96v9h4v1H96v9h4v1H96v9h4v1H96v9h4v1H96v9h4v1H96Zm-1,0V86H86v9ZM85,95V86H76v9ZM75,95V86H66v9ZM65,95V86H56v9ZM55,95V86H46v9ZM45,95V86H36v9ZM35,95V86H26v9ZM25,95V86H16v9ZM16,85h9V76H16Zm10,0h9V76H26Zm10,0h9V76H36Zm10,0h9V76H46Zm10,0h9V76H56Zm10,0h9V76H66Zm10,0h9V76H76Zm10,0h9V76H86Zm9-10V66H86v9ZM85,75V66H76v9ZM75,75V66H66v9ZM65,75V66H56v9ZM55,75V66H46v9ZM45,75V66H36v9ZM35,75V66H26v9ZM25,75V66H16v9ZM16,65h9V56H16Zm10,0h9V56H26Zm10,0h9V56H36Zm10,0h9V56H46Zm10,0h9V56H56Zm10,0h9V56H66Zm10,0h9V56H76Zm10,0h9V56H86Zm9-10V46H86v9ZM85,55V46H76v9ZM75,55V46H66v9ZM65,55V46H56v9ZM55,55V46H46v9ZM45,55V46H36v9ZM35,55V46H26v9ZM25,55V46H16v9ZM16,45h9V36H16Zm10,0h9V36H26Zm10,0h9V36H36Zm10,0h9V36H46Zm10,0h9V36H56Zm10,0h9V36H66Zm10,0h9V36H76Zm10,0h9V36H86Zm9-10V26H86v9ZM85,35V26H76v9ZM75,35V26H66v9ZM65,35V26H56v9ZM55,35V26H46v9ZM45,35V26H36v9ZM35,35V26H26v9ZM25,35V26H16v9ZM16,25h9V16H16Zm10,0h9V16H26Zm10,0h9V16H36Zm10,0h9V16H46Zm10,0h9V16H56Zm10,0h9V16H66Zm10,0h9V16H76Zm10,0h9V16H86Z" fill="rgba(255,255,255,0.1)" fill-rule="evenodd" opacity="0.5"/>+ <path id="Path_4" data-name="Path 4" d="M6,5V0H5V5H0V6H5v94H6V6h94V5Z" fill="rgba(255,255,255,0.1)" fill-rule="evenodd"/>+</svg>diff --git a/examples/quote-configurator/public/serviceWorker.js b/examples/quote-configurator/public/serviceWorker.jsnew file mode 100644index 0000000000..790bcf811a--- /dev/null+++ b/examples/quote-configurator/public/serviceWorker.js@@ -0,0 +1,31 @@+self.addEventListener("fetch", (event) => {+ let url = new URL(event.request.url);+ let method = event.request.method;++ // any non GET request is ignored+ if (method.toLowerCase() !== "get") return;++ // If the request is for the favicons, fonts, or the built files (which are hashed in the name)+ if (+ url.pathname.includes("logo") ||+ url.pathname.includes("storage/v1/object/public/avatars")+ ) {+ event.respondWith(+ // we will open the assets cache+ caches.open("assets").then(async (cache) => {+ // if the request is cached we will use the cache+ let cacheResponse = await cache.match(event.request);+ if (cacheResponse) return cacheResponse;++ // if it's not cached we will run the fetch, cache it and return it+ // this way the next time this asset it's needed it will load from the cache+ let fetchResponse = await fetch(event.request);+ cache.put(event.request, fetchResponse.clone());++ return fetchResponse;+ })+ );+ }++ return;+});diff --git a/examples/quote-configurator/public/site.webmanifest b/examples/quote-configurator/public/site.webmanifestnew file mode 100644index 0000000000..344837476f--- /dev/null+++ b/examples/quote-configurator/public/site.webmanifest@@ -0,0 +1,21 @@+{+ "name": "Carbon",+ "short_name": "Carbon",+ "icons": [+ {+ "src": "/web-app-manifest-192x192.png",+ "sizes": "192x192",+ "type": "image/png",+ "purpose": "maskable"+ },+ {+ "src": "/web-app-manifest-512x512.png",+ "sizes": "512x512",+ "type": "image/png",+ "purpose": "maskable"+ }+ ],+ "theme_color": "#000000",+ "background_color": "#000000",+ "display": "standalone"+}\ No newline at end of filediff --git a/examples/quote-configurator/public/web-app-manifest-192x192.png b/examples/quote-configurator/public/web-app-manifest-192x192.pngnew file mode 100644index 0000000000..cda38d5ed4Binary files /dev/null and b/examples/quote-configurator/public/web-app-manifest-192x192.png differdiff --git a/examples/quote-configurator/public/web-app-manifest-512x512.png b/examples/quote-configurator/public/web-app-manifest-512x512.pngnew file mode 100644index 0000000000..88c30a090eBinary files /dev/null and b/examples/quote-configurator/public/web-app-manifest-512x512.png differdiff --git a/examples/quote-configurator/tailwind.config.js b/examples/quote-configurator/tailwind.config.jsnew file mode 100644index 0000000000..5856bc01d7--- /dev/null+++ b/examples/quote-configurator/tailwind.config.js@@ -0,0 +1,4 @@+module.exports = {+ "tailwindcss/nesting": {},+ ...require("@carbon/tailwind/tailwind.config"),+};diff --git a/examples/quote-configurator/tsconfig.json b/examples/quote-configurator/tsconfig.jsonnew file mode 100644index 0000000000..ac163dacdb--- /dev/null+++ b/examples/quote-configurator/tsconfig.json@@ -0,0 +1,30 @@+{+ "include": [+ "env.d.ts",+ "**/*.ts",+ "**/*.tsx",+ "app/modules/documents/documents.service.ts",+ "../carbon/app/components/Breadcrumb.tsx"+ ],+ "compilerOptions": {+ "lib": ["dom", "dom.iterable", "ESNext"],+ "esModuleInterop": true,+ "jsx": "react-jsx",+ "module": "ESNext",+ "moduleResolution": "Bundler",+ "resolveJsonModule": true,+ "target": "ES2019",+ "strict": true,+ "forceConsistentCasingInFileNames": true,+ "allowJs": true,+ "baseUrl": ".",+ "paths": {+ "~/*": ["./app/*"]+ },+ "types": ["@remix-run/react/future/single-fetch.d.ts"],+ "noEmit": true,+ "isolatedModules": true,+ "skipLibCheck": true,+ "noErrorTruncation": true+ }+}diff --git a/examples/quote-configurator/vite.config.ts b/examples/quote-configurator/vite.config.tsnew file mode 100644index 0000000000..dd0753776c--- /dev/null+++ b/examples/quote-configurator/vite.config.ts@@ -0,0 +1,47 @@+import { vitePlugin as remix } from "@remix-run/dev";+import { vercelPreset } from "@vercel/remix/vite";+import path from "node:path";+import { flatRoutes } from "remix-flat-routes";+import { defineConfig } from "vite";+import tsconfigPaths from "vite-tsconfig-paths";++export default defineConfig({+ build: {+ sourcemap: false,+ rollupOptions: {+ onwarn(warning, defaultHandler) {+ if (warning.code === "SOURCEMAP_ERROR") {+ return;+ }++ defaultHandler(warning);+ },+ },+ },+ define: {+ global: "globalThis",+ },+ ssr: {+ noExternal: ["react-dropzone", "react-icons", "tailwind-merge"],+ },+ server: {+ port: 5001,+ },+ plugins: [+ remix({+ presets: [vercelPreset()],+ future: {+ unstable_singleFetch: false,+ },+ ignoredRouteFiles: ["**/.*"],+ serverModuleFormat: "esm",+ routes: async (defineRoutes) => {+ return flatRoutes("routes", defineRoutes, {+ // eslint-disable-next-line no-undef+ appDir: path.resolve(__dirname, "app"),+ });+ },+ }),+ tsconfigPaths(),+ ],+});