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.

feat: phone navigation sheets drag and spring on react-spring-bottom-sheet (ERP menu, section switcher, MES More)

aashu3a8df41082ce
diff --git a/apps/erp/app/components/Layout/Mobile/MobileDock.tsx b/apps/erp/app/components/Layout/Mobile/MobileDock.tsx
index 81920872cd..df8cc9f09c 100644
--- a/apps/erp/app/components/Layout/Mobile/MobileDock.tsx
+++ b/apps/erp/app/components/Layout/Mobile/MobileDock.tsx
@@ -2,11 +2,10 @@
// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,
// including ports, remain AGPLv3; serving them over a network requires releasing their source.
-import { cn, Dock, DockBar, DockItem, DockSeparator } from "@carbon/react";
+import { cn, Dock, DockItem, DockSeparator } from "@carbon/react";
import { useLingui } from "@lingui/react/macro";
-import type { ReactNode } from "react";
import { useEffect, useState } from "react";
-import { LuMenu, LuPlus, LuSearch, LuX } from "react-icons/lu";
+import { LuMenu, LuPlus, LuSearch } from "react-icons/lu";
import { useLocation } from "react-router";
import { useUser } from "~/hooks";
import { useAppBadge } from "~/hooks/useAppBadge";
@@ -58,53 +57,36 @@ export function MobileDock() {
setSheet(null);
}, [pathname]);
- const menuOpen = sheet === "menu";
-
- // The pill's controls. The menu draws them again over its overlay, where
- // the menu button reads ✕ and Create hands over to the Create menu.
- const items = (inMenu: boolean): ReactNode => (
+ return (
<>
- <DockItem
- icon={<LuSearch />}
- label={t`Search`}
- onClick={() => {
- setSheet(null);
- openSearchModal();
- }}
- />
- <DockSeparator />
- {!canCreate ? null : inMenu ? (
+ <Dock aria-label={t`Main`} className={cn(bottomBarActive && "hidden")}>
<DockItem
- icon={<LuPlus />}
- aria-label={t`Create`}
- onClick={() => setSheet("create")}
+ icon={<LuSearch />}
+ label={t`Search`}
+ onClick={() => {
+ setSheet(null);
+ openSearchModal();
+ }}
/>
- ) : (
- <CreateMenu
- open={sheet === "create"}
- onOpenChange={setOpen("create")}
- trigger={<DockItem icon={<LuPlus />} aria-label={t`Create`} />}
+ <DockSeparator />
+ {canCreate ? (
+ <CreateMenu
+ open={sheet === "create"}
+ onOpenChange={setOpen("create")}
+ trigger={<DockItem icon={<LuPlus />} aria-label={t`Create`} />}
+ />
+ ) : null}
+ <DockItem
+ icon={<LuMenu />}
+ aria-label={t`Open menu`}
+ aria-haspopup="dialog"
+ aria-expanded={sheet === "menu"}
+ onClick={() => setSheet("menu")}
/>
- )}
- <DockItem
- icon={inMenu ? <LuX /> : <LuMenu />}
- aria-label={inMenu ? t`Close menu` : t`Open menu`}
- aria-haspopup="dialog"
- aria-expanded={inMenu}
- onClick={() => setSheet(inMenu ? null : "menu")}
- />
- </>
- );
-
- return (
- <>
- <Dock aria-label={t`Main`} className={cn(bottomBarActive && "hidden")}>
- {items(false)}
</Dock>
<MobileMenu
- open={menuOpen}
+ open={sheet === "menu"}
onOpenChange={setOpen("menu")}
- dock={<DockBar aria-label={t`Main`}>{items(true)}</DockBar>}
unread={unread}
onOpenProfile={() => setSheet("profile")}
onOpenNotifications={() => setSheet("notifications")}
diff --git a/apps/erp/app/components/Layout/Mobile/MobileMenu.tsx b/apps/erp/app/components/Layout/Mobile/MobileMenu.tsx
index ed870ee294..a05543303a 100644
--- a/apps/erp/app/components/Layout/Mobile/MobileMenu.tsx
+++ b/apps/erp/app/components/Layout/Mobile/MobileMenu.tsx
@@ -9,12 +9,10 @@ import {
DockFinderGroup,
DockFinderItem,
DockFinderSeparator,
- DockMenu,
- DockMenuContent,
- DockMenuPanel,
DockMenuSection,
DockSwitcher,
dockMenuRowClassName,
+ NavSheet,
PrefetchLink,
useMode
} from "@carbon/react";
@@ -298,24 +296,22 @@ function ModuleFinder({
}
/**
- * The dock's menu: the company and module switchers over one panel. The
- * panel lists the modules on Home and the current module's sections inside
- * a module — the same sidebar the desktop shows — then the account and
- * notifications. Picking a row navigates; any navigation closes the menu.
- * A tap on a switcher opens its full-screen finder; Esc returns from the
- * finder to the menu.
+ * The dock's menu, a bottom sheet: the company and module switchers in its
+ * header over one list. The list holds the modules on Home and the current
+ * module's sections inside a module — the same sidebar the desktop shows —
+ * then the account and notifications. Picking a row navigates; any
+ * navigation closes the menu. A tap on a switcher opens its full-screen
+ * finder over the sheet; Esc returns from the finder to the menu.
*/
export function MobileMenu({
open,
onOpenChange,
- dock,
unread,
onOpenProfile,
onOpenNotifications
}: {
open: boolean;
onOpenChange: (open: boolean) => void;
- dock: ReactNode;
unread: number;
onOpenProfile: () => void;
onOpenNotifications: () => void;
@@ -348,43 +344,34 @@ export function MobileMenu({
return (
<>
- <DockMenu open={open} onOpenChange={onOpenChange}>
- <DockMenuContent
- label={t`Menu`}
- dock={dock}
- // A tap on a link closes the menu even when it leads to the page
- // already open, where the path (and so the menu) would not change.
- onClick={(event) => {
- if ((event.target as HTMLElement).closest("a")) onOpenChange(false);
- }}
- onEscapeKeyDown={(event) => {
- if (finder) {
- event.preventDefault();
- closeFinder();
- }
- }}
- finder={
- finder === "companies" ? (
- <CompanyFinder
- onClose={closeFinder}
- onAddCompany={() => {
- onOpenChange(false);
- setAddingCompany(true);
- }}
- />
- ) : finder === "modules" ? (
- <ModuleFinder
- currentKey={current?.key ?? null}
- onClose={closeFinder}
- onPick={(to) => {
- onOpenChange(false);
- navigate(to);
- }}
- />
- ) : undefined
- }
- >
- <div className="flex min-w-0 shrink-0 gap-2">
+ <NavSheet
+ open={open}
+ onOpenChange={onOpenChange}
+ // The finder's list scrolls on its own; the sheet's lock would hold it.
+ scrollLocking={!finder}
+ sibling={
+ finder === "companies" ? (
+ <CompanyFinder
+ onClose={closeFinder}
+ onAddCompany={() => {
+ onOpenChange(false);
+ setAddingCompany(true);
+ }}
+ />
+ ) : finder === "modules" ? (
+ <ModuleFinder
+ currentKey={current?.key ?? null}
+ onClose={closeFinder}
+ onPick={(to) => {
+ onOpenChange(false);
+ navigate(to);
+ }}
+ />
+ ) : undefined
+ }
+ header={
+ <div className="flex min-w-0 gap-2 text-left">
+ <h2 className="sr-only">{t`Menu`}</h2>
<DockSwitcher
icon={
<AvatarBase
@@ -408,62 +395,71 @@ export function MobileMenu({
className="shrink-0"
/>
</div>
- <DockMenuPanel>
- {Sidebar ? (
- <SidebarPresentationProvider value="sheet">
- <SheetNavStyleProvider value="menu">
- <Sidebar />
- </SheetNavStyleProvider>
- </SidebarPresentationProvider>
- ) : (
- <ModuleRows currentKey={current?.key ?? null} />
- )}
- <DockMenuSection>
- <button
- type="button"
- onClick={onOpenProfile}
- className={dockMenuRowClassName}
- >
- <Avatar path={user.avatarUrl} name={name} size="xs" />
- <span className="flex min-w-0 flex-1 flex-col py-1.5">
- <span className="truncate text-foreground">{name}</span>
- <span className="truncate text-sm">{user.email}</span>
- </span>
- <LuChevronRight className="size-5" />
- </button>
- </DockMenuSection>
- <DockMenuSection>
- <button
- type="button"
- onClick={onOpenNotifications}
- className={dockMenuRowClassName}
- >
- <MenuRowContent
- label={
- <>
- <Trans>Notifications</Trans>
- {unread > 0 ? (
- <span className="sr-only">
- {" "}
- <Trans>{unread} unread</Trans>
- </span>
- ) : null}
- </>
- }
- trailing={
- <span className="relative flex size-5 items-center justify-center">
- <LuBell className="size-[18px]" />
- {unread > 0 ? (
- <span className="absolute -top-0.5 -right-0.5 size-2 rounded-full bg-primary ring-2 ring-popover" />
- ) : null}
- </span>
- }
- />
- </button>
- </DockMenuSection>
- </DockMenuPanel>
- </DockMenuContent>
- </DockMenu>
+ }
+ >
+ {/* A tap on a link closes the menu even when it leads to the page
+ already open, where the path (and so the menu) would not change. */}
+ <div
+ role="presentation"
+ className="px-1.5 pb-1.5"
+ onClick={(event) => {
+ if ((event.target as HTMLElement).closest("a")) onOpenChange(false);
+ }}
+ >
+ {Sidebar ? (
+ <SidebarPresentationProvider value="sheet">
+ <SheetNavStyleProvider value="menu">
+ <Sidebar />
+ </SheetNavStyleProvider>
+ </SidebarPresentationProvider>
+ ) : (
+ <ModuleRows currentKey={current?.key ?? null} />
+ )}
+ <DockMenuSection>
+ <button
+ type="button"
+ onClick={onOpenProfile}
+ className={dockMenuRowClassName}
+ >
+ <Avatar path={user.avatarUrl} name={name} size="xs" />
+ <span className="flex min-w-0 flex-1 flex-col py-1.5">
+ <span className="truncate text-foreground">{name}</span>
+ <span className="truncate text-sm">{user.email}</span>
+ </span>
+ <LuChevronRight className="size-5" />
+ </button>
+ </DockMenuSection>
+ <DockMenuSection>
+ <button
+ type="button"
+ onClick={onOpenNotifications}
+ className={dockMenuRowClassName}
+ >
+ <MenuRowContent
+ label={
+ <>
+ <Trans>Notifications</Trans>
+ {unread > 0 ? (
+ <span className="sr-only">
+ {" "}
+ <Trans>{unread} unread</Trans>
+ </span>
+ ) : null}
+ </>
+ }
+ trailing={
+ <span className="relative flex size-5 items-center justify-center">
+ <LuBell className="size-[18px]" />
+ {unread > 0 ? (
+ <span className="absolute -top-0.5 -right-0.5 size-2 rounded-full bg-primary ring-2 ring-popover" />
+ ) : null}
+ </span>
+ }
+ />
+ </button>
+ </DockMenuSection>
+ </div>
+ </NavSheet>
{user.admin ? (
<AddCompanyModal
open={addingCompany}
diff --git a/apps/erp/app/components/Layout/Mobile/SectionSwitcherSheet.tsx b/apps/erp/app/components/Layout/Mobile/SectionSwitcherSheet.tsx
index 92d84d0c98..69c9420481 100644
--- a/apps/erp/app/components/Layout/Mobile/SectionSwitcherSheet.tsx
+++ b/apps/erp/app/components/Layout/Mobile/SectionSwitcherSheet.tsx
@@ -2,13 +2,7 @@
// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,
// including ports, remain AGPLv3; serving them over a network requires releasing their source.
-import {
- BottomSheet,
- BottomSheetBody,
- BottomSheetContent,
- BottomSheetHeader,
- BottomSheetTitle
-} from "@carbon/react";
+import { NavSheet } from "@carbon/react";
import type { ComponentType, ReactNode } from "react";
import { SidebarPresentationProvider } from "../Navigation/SidebarPresentation";
@@ -29,17 +23,20 @@ export function SectionSwitcherSheet({
Sidebar: ComponentType;
}) {
return (
- <BottomSheet open={open} onOpenChange={onOpenChange}>
- <BottomSheetContent>
- <BottomSheetHeader>
- <BottomSheetTitle>{title}</BottomSheetTitle>
- </BottomSheetHeader>
- <BottomSheetBody className="px-2">
- <SidebarPresentationProvider value="sheet">
- <Sidebar />
- </SidebarPresentationProvider>
- </BottomSheetBody>
- </BottomSheetContent>
- </BottomSheet>
+ <NavSheet
+ open={open}
+ onOpenChange={onOpenChange}
+ header={
+ <h2 className="truncate text-[17px] font-semibold text-foreground">
+ {title}
+ </h2>
+ }
+ >
+ <div className="px-2 pb-4">
+ <SidebarPresentationProvider value="sheet">
+ <Sidebar />
+ </SidebarPresentationProvider>
+ </div>
+ </NavSheet>
);
}
diff --git a/apps/mes/app/components/MoreSheet.tsx b/apps/mes/app/components/MoreSheet.tsx
index 3ff520a58c..87d3756a23 100644
--- a/apps/mes/app/components/MoreSheet.tsx
+++ b/apps/mes/app/components/MoreSheet.tsx
@@ -7,12 +7,7 @@ import type { Company } from "@carbon/auth";
import { CONTROLLED_ENVIRONMENT } from "@carbon/auth";
import {
Avatar,
- BottomSheet,
BottomSheetBack,
- BottomSheetBody,
- BottomSheetContent,
- BottomSheetHeader,
- BottomSheetTitle,
cn,
ItarDisclosure,
Modal,
@@ -23,6 +18,7 @@ import {
ModalHeader,
ModalTitle,
NavRailItem,
+ NavSheet,
Switch,
useDisclosure
} from "@carbon/react";
@@ -245,206 +241,215 @@ export function MoreSheet({
return (
<>
- <BottomSheet open={open} onOpenChange={onOpenChange}>
- <BottomSheetContent>
- <BottomSheetHeader>
+ <NavSheet
+ open={open}
+ onOpenChange={onOpenChange}
+ // A tool's form has comboboxes whose options are portaled outside
+ // the sheet, where its focus trap and scroll lock would block them.
+ trapFocus={screen.id !== "tool"}
+ scrollLocking={screen.id !== "tool"}
+ header={
+ <div className="relative flex min-h-11 items-center justify-center px-12">
{screen.id !== "root" && <BottomSheetBack onClick={toRoot} />}
- <BottomSheetTitle>{title}</BottomSheetTitle>
- </BottomSheetHeader>
- <BottomSheetBody className="max-md:px-2">
- {/* Rail items read their expanded layout from this group. */}
- <MorePageContext.Provider value={page}>
+ <h2 className="truncate text-[17px] font-semibold text-foreground">
+ {title}
+ </h2>
+ </div>
+ }
+ >
+ <div className="px-2 pb-4">
+ {/* Rail items read their expanded layout from this group. */}
+ <MorePageContext.Provider value={page}>
+ <div
+ data-state="expanded"
+ onClick={closeOnLink}
+ className="group flex flex-col gap-1"
+ >
+ {/* Kept mounted under a page, so a tool's form keeps its state
+ and its fetcher while its page shows. */}
<div
- data-state="expanded"
- onClick={closeOnLink}
- className="group flex flex-col gap-1"
+ className={cn(
+ "flex flex-col gap-1",
+ screen.id !== "root" && "hidden"
+ )}
>
- {/* Kept mounted under a page, so a tool's form keeps its state
- and its fetcher while its page shows. */}
- <div
- className={cn(
- "flex flex-col gap-1",
- screen.id !== "root" && "hidden"
- )}
- >
- <div className="flex items-center gap-3 px-2 pb-2">
- <Avatar
- size="sm"
- src={user.displayAvatar ?? undefined}
- name={user.displayName}
- />
- <span className="min-w-0 truncate text-sm text-muted-foreground">
- {user.showingOperator ? (
- <Trans>Station: {stationName}</Trans>
- ) : (
- <Trans>Signed in as {stationName}</Trans>
- )}
- </span>
- </div>
- {header}
- {children}
- <Divider />
- {user.showingOperator ? (
+ <div className="flex items-center gap-3 px-2 pb-2">
+ <Avatar
+ size="sm"
+ src={user.displayAvatar ?? undefined}
+ name={user.displayName}
+ />
+ <span className="min-w-0 truncate text-sm text-muted-foreground">
+ {user.showingOperator ? (
+ <Trans>Station: {stationName}</Trans>
+ ) : (
+ <Trans>Signed in as {stationName}</Trans>
+ )}
+ </span>
+ </div>
+ {header}
+ {children}
+ <Divider />
+ {user.showingOperator ? (
+ <NavRailItem
+ icon={<LuUsers />}
+ label={t`Switch Operator`}
+ onClick={() => {
+ user.switchOperator();
+ onOpenChange(false);
+ }}
+ />
+ ) : (
+ <>
<NavRailItem
- icon={<LuUsers />}
- label={t`Switch Operator`}
+ icon={<LuUser />}
+ label={t`Account Settings`}
onClick={() => {
- user.switchOperator();
onOpenChange(false);
+ openAccountSettings();
}}
/>
- ) : (
- <>
+ {companies.length > 1 && (
<NavRailItem
- icon={<LuUser />}
- label={t`Account Settings`}
- onClick={() => {
- onOpenChange(false);
- openAccountSettings();
- }}
+ icon={<LuBuilding />}
+ label={t`Company`}
+ onClick={() => setScreen({ id: "company" })}
+ trailing={<Drill detail={company.name} />}
/>
- {companies.length > 1 && (
- <NavRailItem
- icon={<LuBuilding />}
- label={t`Company`}
- onClick={() => setScreen({ id: "company" })}
- trailing={<Drill detail={company.name} />}
- />
- )}
- {locations.length > 1 && (
- <NavRailItem
- icon={<LuMapPin />}
- label={t`Location`}
- onClick={() => setScreen({ id: "location" })}
- trailing={
- <Drill
- detail={
- locations.find(
- (l) => l.id === user.optimisticLocation
- )?.name
- }
- />
- }
- />
- )}
- </>
- )}
- <div className="flex h-10 items-center gap-4 px-2 text-sm text-foreground/70">
- <span className="flex size-6 shrink-0 items-center justify-center [&>svg]:size-4">
- {user.mode === "dark" ? <LuMoon /> : <LuSun />}
- </span>
- <span className="min-w-0 flex-1 truncate font-medium">
- <Trans>Appearance</Trans>
- </span>
- <div
- role="radiogroup"
- aria-label={t`Appearance`}
- className="flex shrink-0 rounded-lg bg-muted p-0.5"
- >
- {modeOptions.map((option) => {
- const selected = user.modePreference === option.value;
- return (
- <button
- key={option.value}
- type="button"
- role="radio"
- aria-checked={selected}
- onClick={() => user.onModeChange(option.value)}
- className={cn(
- "hit-area flex h-8 min-w-11 items-center justify-center rounded-md px-2 text-sm text-muted-foreground",
- selected &&
- "bg-background text-foreground shadow-button-base"
- )}
- >
- {option.label}
- </button>
- );
- })}
- </div>
- </div>
- {!user.isOperatorPinnedIn && (
- <>
- {consoleEnabled && (
- <label className="flex h-10 items-center gap-4 px-2 text-sm text-foreground/70">
- <span className="flex size-6 shrink-0 items-center justify-center [&>svg]:size-4">
- <LuMonitor />
- </span>
- <span className="min-w-0 flex-1 truncate font-medium">
- <Trans>Console Mode</Trans>
- </span>
- <Switch
- checked={consoleMode}
- onCheckedChange={user.toggleConsoleMode}
- />
- </label>
- )}
- {CONTROLLED_ENVIRONMENT && (
- <NavRailItem
- icon={<LuShieldCheck />}
- label={t`About`}
- onClick={user.itarDisclosure.onOpen}
- />
- )}
- <Form method="post" action={path.to.logout}>
- <NavRailItem
- type="submit"
- icon={<LuLogOut />}
- label={t`Sign Out`}
- />
- </Form>
- </>
- )}
- </div>
- {screen.id === "tool" && (
- <div ref={setSlot} className="flex flex-col gap-4 px-2" />
- )}
- {screen.id === "company" &&
- companies.map((c) => {
- const logo =
- user.mode === "dark" ? c.logoDarkIcon : c.logoLightIcon;
- const isCurrent = c.companyId === company.companyId;
- return (
+ )}
+ {locations.length > 1 && (
<NavRailItem
- key={c.companyId}
- icon={
- <Avatar
- size="xs"
- name={c.name ?? undefined}
- src={logo ?? undefined}
+ icon={<LuMapPin />}
+ label={t`Location`}
+ onClick={() => setScreen({ id: "location" })}
+ trailing={
+ <Drill
+ detail={
+ locations.find(
+ (l) => l.id === user.optimisticLocation
+ )?.name
+ }
/>
}
- label={c.name ?? ""}
- isActive={isCurrent}
- onClick={() => {
- if (!isCurrent) user.switchCompany(c.companyId!);
- onOpenChange(false);
- }}
- trailing={isCurrent ? <Check /> : undefined}
/>
- );
- })}
- {screen.id === "location" &&
- locations.map((l) => {
- const isCurrent = l.id === user.optimisticLocation;
- return (
+ )}
+ </>
+ )}
+ <div className="flex h-10 items-center gap-4 px-2 text-sm text-foreground/70">
+ <span className="flex size-6 shrink-0 items-center justify-center [&>svg]:size-4">
+ {user.mode === "dark" ? <LuMoon /> : <LuSun />}
+ </span>
+ <span className="min-w-0 flex-1 truncate font-medium">
+ <Trans>Appearance</Trans>
+ </span>
+ <div
+ role="radiogroup"
+ aria-label={t`Appearance`}
+ className="flex shrink-0 rounded-lg bg-muted p-0.5"
+ >
+ {modeOptions.map((option) => {
+ const selected = user.modePreference === option.value;
+ return (
+ <button
+ key={option.value}
+ type="button"
+ role="radio"
+ aria-checked={selected}
+ onClick={() => user.onModeChange(option.value)}
+ className={cn(
+ "hit-area flex h-8 min-w-11 items-center justify-center rounded-md px-2 text-sm text-muted-foreground",
+ selected &&
+ "bg-background text-foreground shadow-button-base"
+ )}
+ >
+ {option.label}
+ </button>
+ );
+ })}
+ </div>
+ </div>
+ {!user.isOperatorPinnedIn && (
+ <>
+ {consoleEnabled && (
+ <label className="flex h-10 items-center gap-4 px-2 text-sm text-foreground/70">
+ <span className="flex size-6 shrink-0 items-center justify-center [&>svg]:size-4">
+ <LuMonitor />
+ </span>
+ <span className="min-w-0 flex-1 truncate font-medium">
+ <Trans>Console Mode</Trans>
+ </span>
+ <Switch
+ checked={consoleMode}
+ onCheckedChange={user.toggleConsoleMode}
+ />
+ </label>
+ )}
+ {CONTROLLED_ENVIRONMENT && (
<NavRailItem
- key={l.id}
- icon={<LuMapPin />}
- label={l.name}
- isActive={isCurrent}
- onClick={() => {
- if (!isCurrent) user.updateLocation(l.id);
- onOpenChange(false);
- }}
- trailing={isCurrent ? <Check /> : undefined}
+ icon={<LuShieldCheck />}
+ label={t`About`}
+ onClick={user.itarDisclosure.onOpen}
+ />
+ )}
+ <Form method="post" action={path.to.logout}>
+ <NavRailItem
+ type="submit"
+ icon={<LuLogOut />}
+ label={t`Sign Out`}
/>
- );
- })}
+ </Form>
+ </>
+ )}
</div>
- </MorePageContext.Provider>
- </BottomSheetBody>
- </BottomSheetContent>
- </BottomSheet>
+ {screen.id === "tool" && (
+ <div ref={setSlot} className="flex flex-col gap-4 px-2" />
+ )}
+ {screen.id === "company" &&
+ companies.map((c) => {
+ const logo =
+ user.mode === "dark" ? c.logoDarkIcon : c.logoLightIcon;
+ const isCurrent = c.companyId === company.companyId;
+ return (
+ <NavRailItem
+ key={c.companyId}
+ icon={
+ <Avatar
+ size="xs"
+ name={c.name ?? undefined}
+ src={logo ?? undefined}
+ />
+ }
+ label={c.name ?? ""}
+ isActive={isCurrent}
+ onClick={() => {
+ if (!isCurrent) user.switchCompany(c.companyId!);
+ onOpenChange(false);
+ }}
+ trailing={isCurrent ? <Check /> : undefined}
+ />
+ );
+ })}
+ {screen.id === "location" &&
+ locations.map((l) => {
+ const isCurrent = l.id === user.optimisticLocation;
+ return (
+ <NavRailItem
+ key={l.id}
+ icon={<LuMapPin />}
+ label={l.name}
+ isActive={isCurrent}
+ onClick={() => {
+ if (!isCurrent) user.updateLocation(l.id);
+ onOpenChange(false);
+ }}
+ trailing={isCurrent ? <Check /> : undefined}
+ />
+ );
+ })}
+ </div>
+ </MorePageContext.Provider>
+ </div>
+ </NavSheet>
{CONTROLLED_ENVIRONMENT && (
<ItarDisclosure disclosure={user.itarDisclosure} />
)}
diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.po
index 681288601e..861220ebe7 100644
--- a/packages/locale/locales/de/erp.po
+++ b/packages/locale/locales/de/erp.po
@@ -5159,9 +5159,6 @@ msgstr "Schließungsdatum"
msgid "Close Date"
msgstr "Schließungsdatum"
-msgid "Close menu"
-msgstr "Menü schließen"
-
msgid "Close Period"
msgstr "Zeitraum schließen"
diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.po
index 7b664909bc..1c5c3eb21f 100644
--- a/packages/locale/locales/en/erp.po
+++ b/packages/locale/locales/en/erp.po
@@ -5159,9 +5159,6 @@ msgstr "Close date"
msgid "Close Date"
msgstr "Close Date"
-msgid "Close menu"
-msgstr "Close menu"
-
msgid "Close Period"
msgstr "Close Period"
diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.po
index 0c84972530..fb54f148ca 100644
--- a/packages/locale/locales/es/erp.po
+++ b/packages/locale/locales/es/erp.po
@@ -5159,9 +5159,6 @@ msgstr "Fecha de cierre"
msgid "Close Date"
msgstr "Fecha de Cierre"
-msgid "Close menu"
-msgstr "Cerrar menú"
-
msgid "Close Period"
msgstr "Cerrar Período"
diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.po
index 65bd3b1145..0a276e987c 100644
--- a/packages/locale/locales/fr/erp.po
+++ b/packages/locale/locales/fr/erp.po
@@ -5159,9 +5159,6 @@ msgstr "Date de fermeture"
msgid "Close Date"
msgstr "Date de fermeture"
-msgid "Close menu"
-msgstr "Fermer le menu"
-
msgid "Close Period"
msgstr "Fermer la période"
diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.po
index 2ad7dc71dc..d90c28afbc 100644
--- a/packages/locale/locales/hi/erp.po
+++ b/packages/locale/locales/hi/erp.po
@@ -5159,9 +5159,6 @@ msgstr "समापन तारीख"
msgid "Close Date"
msgstr "बंद करने की तारीख"
-msgid "Close menu"
-msgstr "मेनू बंद करें"
-
msgid "Close Period"
msgstr "अवधि बंद करें"
diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.po
index fcce0747ae..cf23b4d6bc 100644
--- a/packages/locale/locales/it/erp.po
+++ b/packages/locale/locales/it/erp.po
@@ -5159,9 +5159,6 @@ msgstr "Data di chiusura"
msgid "Close Date"
msgstr "Data di chiusura"
-msgid "Close menu"
-msgstr "Chiudi menu"
-
msgid "Close Period"
msgstr "Chiudi Periodo"
diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.po
index 18878f0d7d..693fdc9870 100644
--- a/packages/locale/locales/ja/erp.po
+++ b/packages/locale/locales/ja/erp.po
@@ -5159,9 +5159,6 @@ msgstr "完了日"
msgid "Close Date"
msgstr "終了日"
-msgid "Close menu"
-msgstr "メニューを閉じる"
-
msgid "Close Period"
msgstr "期間を閉じる"
diff --git a/packages/locale/locales/ko/erp.po b/packages/locale/locales/ko/erp.po
index 5a3a17852a..37343a5003 100644
--- a/packages/locale/locales/ko/erp.po
+++ b/packages/locale/locales/ko/erp.po
@@ -5159,9 +5159,6 @@ msgstr "마감일"
msgid "Close Date"
msgstr "마감일"
-msgid "Close menu"
-msgstr "메뉴 닫기"
-
msgid "Close Period"
msgstr "기간 종료"
diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.po
index 1abdf19bc1..59b4db5def 100644
--- a/packages/locale/locales/pl/erp.po
+++ b/packages/locale/locales/pl/erp.po
@@ -5159,9 +5159,6 @@ msgstr "Data zamknięcia"
msgid "Close Date"
msgstr "Data zamknięcia"
-msgid "Close menu"
-msgstr "Zamknij menu"
-
msgid "Close Period"
msgstr "Zamknij Okres"
diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.po
index 11814201e4..a8c30462ed 100644
--- a/packages/locale/locales/pt/erp.po
+++ b/packages/locale/locales/pt/erp.po
@@ -5159,9 +5159,6 @@ msgstr "Data de fechamento"
msgid "Close Date"
msgstr "Data de Encerramento"
-msgid "Close menu"
-msgstr "Fechar menu"
-
msgid "Close Period"
msgstr "Fechar Período"
diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.po
index 4ba92738d6..928ce5f680 100644
--- a/packages/locale/locales/ru/erp.po
+++ b/packages/locale/locales/ru/erp.po
@@ -5159,9 +5159,6 @@ msgstr "Дата закрытия"
msgid "Close Date"
msgstr "Дата закрытия"
-msgid "Close menu"
-msgstr "Закрыть меню"
-
msgid "Close Period"
msgstr "Закрыть период"
diff --git a/packages/locale/locales/tr/erp.po b/packages/locale/locales/tr/erp.po
index 38b2c06278..c6ca0adbc0 100644
--- a/packages/locale/locales/tr/erp.po
+++ b/packages/locale/locales/tr/erp.po
@@ -5159,9 +5159,6 @@ msgstr "Kapanış tarihi"
msgid "Close Date"
msgstr "Kapatma Tarihi"
-msgid "Close menu"
-msgstr "Menüyü kapat"
-
msgid "Close Period"
msgstr "Dönemi Kapat"
diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.po
index 5bf68077eb..9f5dc83a62 100644
--- a/packages/locale/locales/zh/erp.po
+++ b/packages/locale/locales/zh/erp.po
@@ -5159,9 +5159,6 @@ msgstr "关闭日期"
msgid "Close Date"
msgstr "关闭日期"
-msgid "Close menu"
-msgstr "关闭菜单"
-
msgid "Close Period"
msgstr "关闭期间"
diff --git a/packages/react/package.json b/packages/react/package.json
index 8326ab5ca0..fb2b9c619e 100644
--- a/packages/react/package.json
+++ b/packages/react/package.json
@@ -67,6 +67,7 @@
"react-colorful": "5.6.1",
"react-hotkeys-hook": "catalog:",
"react-shiki": "0.9.2",
+ "react-spring-bottom-sheet": "3.4.1",
"recharts": "2.15.4",
"sonner": "2.0.7",
"tailwind-merge": "catalog:"
diff --git a/packages/react/src/Dock.tsx b/packages/react/src/Dock.tsx
index 65ea508a59..7e3df8b1f7 100644
--- a/packages/react/src/Dock.tsx
+++ b/packages/react/src/Dock.tsx
@@ -4,19 +4,11 @@
"use client";
-import * as DialogPrimitive from "@radix-ui/react-dialog";
import { Command as CommandPrimitive } from "cmdk";
-import type {
- ButtonHTMLAttributes,
- ComponentPropsWithoutRef,
- ElementRef,
- HTMLAttributes,
- ReactNode
-} from "react";
+import type { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from "react";
import { forwardRef } from "react";
import { LuCheck, LuChevronsUpDown } from "react-icons/lu";
-import { ClientOnly } from "./ClientOnly";
import {
Command,
CommandEmpty,
@@ -25,21 +17,17 @@ import {
CommandList,
CommandSeparator
} from "./Command";
-import { DialogRoot } from "./Modal";
import { cn } from "./utils/cn";
-import { usePhoneOpenAutoFocus } from "./Viewport";
/**
- * The phone's floating navigation pill and the menu it opens. The pill sits
- * centred in a borderless band at the bottom of the screen; the menu rises
- * above it as an inset card and draws the pill again over its overlay, so the
- * pill stays lit and its menu button turns into the close button. Hidden at
- * md and up.
+ * The phone's floating navigation pill and the parts of the menu it opens
+ * (a `NavSheet`). The pill sits centred in a borderless band at the bottom of
+ * the screen. Hidden at md and up.
*/
const dockPositionClassName =
"flex shrink-0 justify-center px-4 pt-2 pb-[calc(env(safe-area-inset-bottom)+0.75rem)]";
-/** The pill itself. `Dock` places it; `DockMenuContent` redraws it. */
+/** The pill itself; `Dock` places it. */
function DockBar({
className,
children,
@@ -108,98 +96,6 @@ function DockSeparator() {
return <span aria-hidden className="mx-0.5 h-6 w-px shrink-0 bg-border" />;
}
-/** Opens and closes the dock menu; controlled by the shell. */
-const DockMenu = DialogRoot;
-
-type DockMenuContentProps = ComponentPropsWithoutRef<
- typeof DialogPrimitive.Content
-> & {
- /** Names the menu for screen readers. */
- label: string;
- /** The pill, drawn over the overlay in the same place as the shell's. */
- dock: ReactNode;
- /**
- * A `DockFinder` that takes the whole screen in place of the menu while a
- * switcher's ⇕ is open. Escape should close it, not the menu
- * (`onEscapeKeyDown`).
- */
- finder?: ReactNode;
-};
-
-/**
- * The menu above the pill. Children stack bottom-up against the pill —
- * typically a row of switchers over a `DockMenuPanel`. A tap on the dimmed
- * space around them closes the menu.
- */
-const DockMenuContent = forwardRef<
- ElementRef<typeof DialogPrimitive.Content>,
- DockMenuContentProps
->(({ className, children, label, dock, finder, ...props }, ref) => {
- const onOpenAutoFocus = usePhoneOpenAutoFocus(props.onOpenAutoFocus);
- return (
- <ClientOnly fallback={null}>
- {() => (
- <DialogPrimitive.Portal>
- <DialogPrimitive.Overlay
- data-backdrop=""
- className="fixed inset-0 z-[70] bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
- />
- {/* The content spans the screen's width, but only its parts take
- touches: a tap in the gaps between them lands on the overlay,
- which closes the menu like any tap outside. */}
- <DialogPrimitive.Content
- ref={ref}
- aria-describedby={undefined}
- className={cn(
- "group pointer-events-none fixed inset-x-0 bottom-0 z-[70] flex max-h-[100dvh] flex-col pt-[calc(env(safe-area-inset-top)+2.5rem)] outline-none md:hidden",
- "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:duration-150",
- className
- )}
- {...props}
- onOpenAutoFocus={onOpenAutoFocus}
- >
- <DialogPrimitive.Title className="sr-only">
- {label}
- </DialogPrimitive.Title>
- {finder ?? (
- <>
- <div className="flex min-h-0 flex-col gap-2 px-3 [&>*]:pointer-events-auto group-data-[state=open]:animate-in group-data-[state=open]:fade-in-0 group-data-[state=open]:slide-in-from-bottom-4 group-data-[state=open]:duration-300 group-data-[state=open]:ease-[cubic-bezier(0.32,0.72,0,1)]">
- {children}
- </div>
- <div
- className={cn(
- dockPositionClassName,
- "[&>*]:pointer-events-auto"
- )}
- >
- {dock}
- </div>
- </>
- )}
- </DialogPrimitive.Content>
- </DialogPrimitive.Portal>
- )}
- </ClientOnly>
- );
-});
-DockMenuContent.displayName = "DockMenuContent";
-
-/** The menu's card: one scrolling surface of rows and sections. */
-function DockMenuPanel({
- className,
- ...props
-}: HTMLAttributes<HTMLDivElement>) {
- return (
- <div
- className={cn(
- "flex min-h-0 flex-col overflow-y-auto overscroll-contain rounded-2xl border border-border bg-popover shadow-xl",
- className
- )}
- {...props}
- />
- );
-}
-
/** A section of the panel; every section but the first opens with a hairline. */
function DockMenuSection({
className,
@@ -294,7 +190,14 @@ function DockFinder({
return (
<Command
loop
- className="pointer-events-auto fixed inset-0 rounded-none bg-background pt-safe animate-in fade-in-0 duration-150"
+ // Over the menu sheet, which sits at z-[70].
+ className="pointer-events-auto fixed inset-0 z-[71] rounded-none bg-background pt-safe animate-in fade-in-0 duration-150"
+ onKeyDown={(event) => {
+ if (event.key === "Escape") {
+ event.stopPropagation();
+ onClose();
+ }
+ }}
>
<div className="flex h-14 shrink-0 items-center gap-3 border-b border-border pr-3 pl-4">
<CommandPrimitive.Input
@@ -388,9 +291,6 @@ export {
DockFinderItem,
DockFinderSeparator,
DockItem,
- DockMenu,
- DockMenuContent,
- DockMenuPanel,
DockMenuSection,
DockSeparator,
DockSwitcher,
diff --git a/packages/react/src/NavSheet.tsx b/packages/react/src/NavSheet.tsx
new file mode 100644
index 0000000000..bd6f50bece
--- /dev/null
+++ b/packages/react/src/NavSheet.tsx
@@ -0,0 +1,104 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,
+// including ports, remain AGPLv3; serving them over a network requires releasing their source.
+
+"use client";
+
+import type { ReactNode } from "react";
+import { useEffect, useRef } from "react";
+import { BottomSheet as SpringSheet } from "react-spring-bottom-sheet";
+import libraryCss from "react-spring-bottom-sheet/dist/style.css?inline";
+
+import { ClientOnly } from "./ClientOnly";
+import navSheetCss from "./nav-sheet.css?inline";
+import { cn } from "./utils/cn";
+
+/**
+ * The sheet's styles, rendered by React next to the sheet. A plain CSS import
+ * becomes a <style> the bundler adds to <head> outside React; when hydration
+ * fails React re-renders the whole document and drops it, leaving an open
+ * sheet with no styles: drawn off-screen while its focus trap blocks every
+ * tap on the page. The library's rules come first so Carbon's win.
+ */
+const sheetCss = `${libraryCss}\n${navSheetCss}`;
+
+/**
+ * The phone's navigation sheet, on react-spring-bottom-sheet: it follows the
+ * finger, springs between heights and is dismissed by a drag down, a tap on
+ * the backdrop or Escape. It fits its content up to 90% of the screen; a
+ * longer list scrolls inside it.
+ */
+function NavSheet({
+ open,
+ onOpenChange,
+ header,
+ sibling,
+ scrollLocking = true,
+ trapFocus = true,
+ className,
+ children
+}: {
+ open: boolean;
+ onOpenChange: (open: boolean) => void;
+ /** Sticky above the scrolling content, under the drag handle. */
+ header?: ReactNode;
+ /**
+ * Drawn beside the sheet, over its backdrop, inside its focus trap: a
+ * full-screen layer such as a finder.
+ */
+ sibling?: ReactNode;
+ /**
+ * Locks touch scrolling to the sheet's content. Turn it off while a
+ * `sibling` has its own scrolling list, or that list cannot scroll on iOS.
+ */
+ scrollLocking?: boolean;
+ /**
+ * Keeps focus and taps inside the sheet. The trap swallows taps on
+ * anything portaled outside it (a combobox's options, a select's list),
+ * so turn it off while the sheet shows a form with one; it comes back on
+ * the next opening.
+ */
+ trapFocus?: boolean;
+ className?: string;
+ children: ReactNode;
+}) {
+ // Opening focuses this rather than the first button, as phone sheets do,
+ // so no focus ring lights up a row the user has not touched.
+ const focusAnchor = useRef<HTMLSpanElement>(null);
+ // Closing a sibling layer unmounts what had focus; bring it back into the
+ // sheet, where Escape and the focus trap expect it.
+ const hasSibling = Boolean(sibling);
+ useEffect(() => {
+ if (open && !hasSibling) focusAnchor.current?.focus();
+ }, [open, hasSibling]);
+ return (
+ <ClientOnly fallback={null}>
+ {() => (
+ <>
+ <style>{sheetCss}</style>
+ <SpringSheet
+ open={open}
+ onDismiss={() => onOpenChange(false)}
+ header={
+ <>
+ <span ref={focusAnchor} tabIndex={-1} className="sr-only" />
+ {header}
+ </>
+ }
+ sibling={sibling}
+ scrollLocking={scrollLocking}
+ initialFocusRef={trapFocus ? focusAnchor : false}
+ snapPoints={({ minHeight, maxHeight }) =>
+ Math.min(minHeight, maxHeight * 0.9)
+ }
+ className={cn("nav-sheet", className)}
+ >
+ {children}
+ </SpringSheet>
+ </>
+ )}
+ </ClientOnly>
+ );
+}
+
+export { NavSheet };
diff --git a/packages/react/src/css.d.ts b/packages/react/src/css.d.ts
index 3f09735968..8a972f3dad 100644
--- a/packages/react/src/css.d.ts
+++ b/packages/react/src/css.d.ts
@@ -4,3 +4,9 @@
// Side-effect CSS imports are resolved by the consuming app's bundler, not by tsc.
declare module "*.css";
+
+// `?inline` imports give the stylesheet's text, for a <style> React renders.
+declare module "*.css?inline" {
+ const css: string;
+ export default css;
+}
diff --git a/packages/react/src/index.tsx b/packages/react/src/index.tsx
index 851aed9b84..64a4bb10a5 100644
--- a/packages/react/src/index.tsx
+++ b/packages/react/src/index.tsx
@@ -135,9 +135,6 @@ import {
DockFinderItem,
DockFinderSeparator,
DockItem,
- DockMenu,
- DockMenuContent,
- DockMenuPanel,
DockMenuSection,
DockSeparator,
DockSwitcher,
@@ -281,6 +278,7 @@ import {
NavRailSwitcher,
navRailItemClasses
} from "./NavRail";
+import { NavSheet } from "./NavSheet";
import type { NumberFieldProps } from "./Number";
import {
NumberDecrementStepper,
@@ -546,9 +544,6 @@ export {
DockFinderItem,
DockFinderSeparator,
DockItem,
- DockMenu,
- DockMenuContent,
- DockMenuPanel,
DockMenuSection,
DockSeparator,
DockSwitcher,
@@ -669,6 +664,7 @@ export {
NavRailItem,
NavRailLink,
NavRailSwitcher,
+ NavSheet,
NumberDecrementStepper,
NumberField,
NumberIncrementStepper,
diff --git a/packages/react/src/nav-sheet.css b/packages/react/src/nav-sheet.css
new file mode 100644
index 0000000000..4a67dfbba7
--- /dev/null
+++ b/packages/react/src/nav-sheet.css
@@ -0,0 +1,31 @@
+/* react-spring-bottom-sheet's stylesheet is unlayered, so it beats every
+ Tailwind utility (those live in @layer utilities). Carbon's look for the
+ sheet is therefore plain, unlayered CSS too, loaded after the library's. */
+.nav-sheet {
+ --rsbs-bg: hsl(var(--popover));
+ --rsbs-handle-bg: hsl(var(--muted-foreground) / 0.3);
+ --rsbs-backdrop-bg: rgb(0 0 0 / 0.4);
+ --rsbs-overlay-rounded: 14px;
+}
+
+/* The library stacks at z-index 3, under the app shell; sheets sit at 70. */
+.nav-sheet [data-rsbs-overlay],
+.nav-sheet [data-rsbs-backdrop],
+.nav-sheet[data-rsbs-root]::after {
+ z-index: 70;
+}
+
+.nav-sheet [data-rsbs-overlay] {
+ color: hsl(var(--popover-foreground));
+}
+
+.nav-sheet [data-rsbs-header] {
+ box-shadow: none;
+}
+
+/* Phones only. */
+@media (min-width: 48rem) {
+ .nav-sheet {
+ display: none;
+ }
+}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 05c34e9dd5..f829a146a2 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -803,7 +803,7 @@ importers:
'@lingui/vite-plugin':
specifier: 'catalog:'
'@monaco-editor/react':
specifier: 4.7.0
@@ -1157,7 +1157,7 @@ importers:
version: 1.1.3([email protected])
vite:
specifier: 'catalog:'
vitest:
specifier: 'catalog:'
@@ -1175,7 +1175,7 @@ importers:
version: 3.25.2([email protected])
zustand:
specifier: 'catalog:'
apps/mes:
dependencies:
@@ -1281,7 +1281,7 @@ importers:
'@lingui/vite-plugin':
specifier: 'catalog:'
'@react-aria/i18n':
specifier: 'catalog:'
@@ -1488,7 +1488,7 @@ importers:
version: 7.1.0-beta
vite:
specifier: 'catalog:'
vitest:
specifier: 'catalog:'
@@ -2019,7 +2019,7 @@ importers:
version: 3.0.3([email protected])
zustand:
specifier: 'catalog:'
devDependencies:
'@carbon/config':
specifier: workspace:*
@@ -2187,7 +2187,7 @@ importers:
zustand:
specifier: 'catalog:'
packages/checks:
devDependencies:
@@ -2803,7 +2803,7 @@ importers:
version: 4.5.4
zustand:
specifier: 'catalog:'
devDependencies:
'@carbon/config':
specifier: workspace:*
@@ -3292,7 +3292,7 @@ importers:
version: 4.5.4
zustand:
specifier: 'catalog:'
devDependencies:
'@carbon/config':
specifier: workspace:*
@@ -3672,6 +3672,9 @@ importers:
react-shiki:
specifier: 0.9.2
+ react-spring-bottom-sheet:
+ specifier: 3.4.1
recharts:
specifier: 2.15.4
@@ -3783,7 +3786,7 @@ importers:
zustand:
specifier: 'catalog:'
packages/serve:
dependencies:
@@ -3977,7 +3980,7 @@ importers:
zustand:
specifier: 'catalog:'
devDependencies:
'@carbon/config':
specifier: workspace:*
@@ -4114,7 +4117,7 @@ importers:
version: link:../utils
'@react-three/drei':
specifier: 9.122.0
'@react-three/fiber':
specifier: 8.18.0
@@ -7954,6 +7957,18 @@ packages:
'@radix-ui/[email protected]':
resolution: {integrity: sha512-JtyZR+mqgBibTo8xea3B6ZRmzZiM/YeVBtUkas6zMuXjAlfIFIW2FgqeM9eLyvEaYX66vr6DJMK+4U6LV0KhNw==}
+ '@reach/[email protected]':
+ resolution: {integrity: sha512-g74BnCdtuTGthzzHn2cWW+bcyIYb0iIE/yRsm89i8oNzNgpopbkh9UY8TPbhNlys52h7U60s4kpRTmcq+JqsTA==}
+ peerDependencies:
+ react: 18.3.1
+ react-dom: 18.3.1
+
+ '@reach/[email protected]':
+ resolution: {integrity: sha512-3ir6cN60zvUrwjOJu7C6jec/samqAeyAB12ZADK+qjnmQPdzSYldrFWwDVV5H0WkhbYXR3uh+eImu13hCetNPQ==}
+ peerDependencies:
+ react: 18.3.1
+ react-dom: 18.3.1
+
'@react-aria/[email protected]':
resolution: {integrity: sha512-S61vh5DJ2PXiXUwD7gk+pvS/b4VPrc3ZJOUZ0yVRLHkVESr5LhIZH+SAVgZkm1lzKyMRG+BH+fiRH/DZRSs7SA==}
peerDependencies:
@@ -10269,6 +10284,9 @@ packages:
resolution: {integrity: sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==}
+ '@types/[email protected]':
+ resolution: {integrity: sha512-CqN8MnISMwQbLJXO3doBAV4Yw9hx9/Pyr2rZ78+NfaCnhyRA/nKrpyk6E7mKw17ZOaQdLpK9GiUjrqLzBlN3sg==}
+
resolution: {integrity: sha512-GnJmSr40H3RAnj0s34FNTcJi1hmWFV5KXugE0mYWnYhgTAHLJ/dJKAwDmvPJYMke0RplY2XE9LnM4hqSqKIjhQ==}
@@ -10595,6 +10613,18 @@ packages:
'@workflow/[email protected]':
resolution: {integrity: sha512-pav4F2BoirECWR7Nf1TKt+2eETcBj7jj4cBefQ8VXQCA6NPkaKeLfj/zMgi+3zYV5ZIBT4GuUiphsj0/b9hPQQ==}
+ '@xstate/[email protected]':
+ resolution: {integrity: sha512-NCUReRHPGvvCvj2yLZUTfR0qVp6+apc8G83oXSjN4rl89ZjyujiKrTff55bze/HrsvCsP/sUJASf2n0nzMF1KQ==}
+ peerDependencies:
+ '@xstate/fsm': ^1.0.0
+ react: 18.3.1
+ xstate: ^4.11.0
+ peerDependenciesMeta:
+ '@xstate/fsm':
+ optional: true
+ xstate:
+ optional: true
+
'@xyflow/[email protected]':
resolution: {integrity: sha512-CgIi6HwlcHXwlkTpr0fxLv/0sRVNZ8IdwKLzzeCscaYBwpvfcH1QFOCeaTCuEn1FQEs/B8CjnTSjhs8udgmBgQ==}
peerDependencies:
@@ -11013,6 +11043,9 @@ packages:
resolution: {integrity: sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==}
engines: {node: '>=18'}
+ resolution: {integrity: sha512-Yi1Xaml0EvNA0OYWxXiYNqY24AfWkbA6w5vxE7GWxtKfzIbZM+Qw+aSmkgsbWzbHiy/RCSkUZBplVxTA+E4jJg==}
+
resolution: {integrity: sha512-KOO1A3+/vFVJk5aFoG3sNwiogKFPVR+x4aw4gQ1b2e0XoE+i5xp48/EZn+WqR07jRHeDGwHWQUOtV5WVm7xiww==}
peerDependencies:
@@ -12202,6 +12235,9 @@ packages:
resolution: {integrity: sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==}
+ resolution: {integrity: sha512-v2NTsZe2FF59Y+sDykKY+XjqZ0cPfhq/hikWVL88BqLivnNiEffAsac6rP6H45ff9wG9LL5ToiDqrLEP9GX9mw==}
+
resolution: {integrity: sha512-FNvFGzoMLWmE6Yj9spb/zjd7yiNCHiAW9/Tg9CXrQ8wuu32HtlJOwWO11OJafl5FfY3DxTdQ0vj42zU1kvv5jg==}
engines: {node: '>=4.0'}
@@ -15099,6 +15135,17 @@ packages:
react: 18.3.1
react-dom: 18.3.1
+ resolution: {integrity: sha512-yDFqiPMm/fjefjnOe6Q9zxccbCl6HMUKsK5bWgfGHJIj4zmXVKio5d4icQvmOLuwpuCA2pwv4J6nGWS6fUZidQ==}
+ peerDependencies:
+ react: 18.3.1
+
+ resolution: {integrity: sha512-nDpWBe3ZVezukNRandTeLSPcwwTMjNVu1IDq9qA/AMiUqHuRN4BeSWvKr3eIxxg1vtiYiOLy4FqdfCP5IoP77g==}
+ peerDependencies:
+ react: 18.3.1
+ react-dom: 18.3.1
+
resolution: {integrity: sha512-G3bYr0BIiookpt4H05VeZUuVS/FslQAj2TeT8vDfCiL314Y+LtPXIPe/a3eamCA0wljy7z1EDYKV50Qbz7pcJg==}
peerDependencies:
@@ -15120,6 +15167,12 @@ packages:
react: 18.3.1
react-dom: 18.3.1
+ resolution: {integrity: sha512-CXzUNkulUdgouaAlvAsC5ZVo0fi9KGSBSk81WrE4kOIcJccpANe9zZkAYr5YZZhqpicIFxitsrGVS4wmoMun9A==}
+ deprecated: This package is no longer maintained. Please use @use-gesture/react instead
+ peerDependencies:
+ react: 18.3.1
+
resolution: {integrity: sha512-KrvcAo13I/60HpwGO5jpW7E9DfusKyLPLvuHlUyP5zqnmAPhNc6qTRjUQrdTADl0lpPpDVU2/Gg51UlOGHXbdg==}
peerDependencies:
@@ -15936,6 +15989,9 @@ packages:
os: [darwin, linux, win32, freebsd, openbsd, netbsd, sunos, android]
hasBin: true
+ resolution: {integrity: sha512-QD9qKY3StfbZqWOPLp0++pOrAVb/HbUi5xCc8cUo4XjP19808oaMiDzn0leBY5mCespIBM0CIZePzZjgzR83kA==}
+
resolution: {integrity: sha512-wieBHXygIm7OyQOu5hQlkk62/WyCFYGlWg7L6/ZCUZwx0o398Zkn4pVmMyfYhfMG8kGrj/Krt8eIk6UKC6VzwA==}
@@ -16382,6 +16438,15 @@ packages:
'@types/react':
optional: true
+ resolution: {integrity: sha512-tpZZ+EX0gaghDAiFR37hj5MgY6ZN55kLiPkJsKxBMZ6GZdOSPJXiOzPM984oPYZ5AnehYx5WQp1+ME8I/P/pRA==}
+ peerDependencies:
+ '@types/react': '*'
+ react: 18.3.1
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
resolution: {integrity: sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==}
engines: {node: '>=10'}
@@ -16397,11 +16462,21 @@ packages:
peerDependencies:
react: 18.3.1
+ resolution: {integrity: sha512-Jb2vVrY4SuzlCjlT7m20o92iDMpUDwWMlaSFBxD7/DdrSLF1oZKXp2SqokWDYUi8EKmx4qlK612aGN743ejQtQ==}
+ peerDependencies:
+ react: 18.3.1
+
resolution: {integrity: sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==}
peerDependencies:
react: 18.3.1
+ resolution: {integrity: sha512-6L+EeigHMQhdaIPNIFUKwfWJSwWFQ8gJbJ2DLOs5sDIegTwR9fRxvnM3uciHKjIZhFz+KAv2emhWMRvDmMcY8A==}
+ peerDependencies:
+ react: 18.3.1
+
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
@@ -16749,6 +16824,9 @@ packages:
resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==}
+ resolution: {integrity: sha512-SH7nAaaPQx57dx6qvfcIgqKRXIh4L0A1iYEqim4s1u7c9VoCgzZc+63FY90AKU4ZzOC2cfJzTnpO4zK7fCUzzw==}
+
resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==}
engines: {node: '>=0.4'}
@@ -17551,8 +17629,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@babel/[email protected]':
- optional: true
+ '@babel/[email protected]': {}
'@babel/[email protected]': {}
@@ -21110,6 +21187,21 @@ snapshots:
'@radix-ui/[email protected]': {}
+ dependencies:
+ react: 18.3.1
+ react-dom: 18.3.1([email protected])
+ tslib: 2.8.1
+
+ dependencies:
+ '@types/warning': 3.0.4
+ react: 18.3.1
+ react-dom: 18.3.1([email protected])
+ tslib: 2.8.1
+ warning: 4.0.3
+
dependencies:
@@ -22317,7 +22409,7 @@ snapshots:
'@swc/helpers': 0.5.23
react: 18.3.1
dependencies:
'@babel/runtime': 7.29.2
'@mediapipe/tasks-vision': 0.10.17
@@ -22343,7 +22435,7 @@ snapshots:
troika-three-text: 0.52.4([email protected])
utility-types: 3.11.0
optionalDependencies:
react-dom: 18.3.1([email protected])
transitivePeerDependencies:
@@ -24161,6 +24253,8 @@ snapshots:
'@types/[email protected]': {}
+ '@types/[email protected]': {}
+
dependencies:
'@types/node': 22.19.7
@@ -24493,6 +24587,16 @@ snapshots:
'@workflow/[email protected]': {}
+ dependencies:
+ react: 18.3.1
+ use-isomorphic-layout-effect: 1.2.1(@types/[email protected])([email protected])
+ use-subscription: 1.13.0([email protected])
+ optionalDependencies:
+ xstate: 4.38.3
+ transitivePeerDependencies:
+ - '@types/react'
+
dependencies:
'@xyflow/system': 0.0.76
@@ -24879,6 +24983,8 @@ snapshots:
transitivePeerDependencies:
- supports-color
+
optionalDependencies:
@@ -26297,6 +26403,10 @@ snapshots:
mlly: 1.8.2
rollup: 4.60.1
+ dependencies:
+ tabbable: 5.3.3
+
@@ -29641,6 +29751,29 @@ snapshots:
react-dom: 18.3.1([email protected])
react-transition-group: 4.4.5([email protected]([email protected]))([email protected])
+ dependencies:
+ '@juggle/resize-observer': 3.4.0
+ '@xstate/react': 1.6.3(@types/[email protected])([email protected])([email protected])
+ body-scroll-lock: 3.1.5
+ focus-trap: 6.9.4
+ react: 18.3.1
+ react-use-gesture: 8.0.1([email protected])
+ xstate: 4.38.3
+ transitivePeerDependencies:
+ - '@types/react'
+ - '@xstate/fsm'
+ - react-dom
+
+ dependencies:
+ '@babel/runtime': 7.29.10
+ prop-types: 15.8.1
+ react: 18.3.1
+ react-dom: 18.3.1([email protected])
+
dependencies:
'@react-stately/calendar': 3.9.3([email protected])
@@ -29688,6 +29821,10 @@ snapshots:
react: 18.3.1
react-dom: 18.3.1([email protected])
+ dependencies:
+ react: 18.3.1
+
dependencies:
react: 18.3.1
@@ -30790,6 +30927,8 @@ snapshots:
+
@@ -31373,6 +31512,12 @@ snapshots:
optionalDependencies:
'@types/react': 18.3.28
+ dependencies:
+ react: 18.3.1
+ optionalDependencies:
+ '@types/react': 18.3.28
+
dependencies:
detect-node-es: 1.1.0
@@ -31385,10 +31530,19 @@ snapshots:
dependencies:
react: 18.3.1
+ dependencies:
+ react: 18.3.1
+ use-sync-external-store: 1.7.0([email protected])
+
dependencies:
react: 18.3.1
+ dependencies:
+ react: 18.3.1
+
@@ -31904,6 +32058,8 @@ snapshots:
+
@@ -32002,11 +32158,11 @@ snapshots:
immer: 9.0.21
react: 18.3.1
optionalDependencies:
'@types/react': 18.3.28
immer: 9.0.21
react: 18.3.1
- use-sync-external-store: 1.6.0([email protected])
+ use-sync-external-store: 1.7.0([email protected])