@eintrek/erp-shell 0.1.48 → 0.1.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +19 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +19 -3
- package/dist/index.js.map +1 -1
- package/dist/navigation/app-layout-shell.d.ts +7 -2
- package/dist/navigation/chrome.d.ts +10 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1211,7 +1211,7 @@ function OrgMark({ logoUrl, size = "md", }) {
|
|
|
1211
1211
|
const box = size === "sm"
|
|
1212
1212
|
? "flex size-6 items-center justify-center rounded-md border overflow-hidden bg-background"
|
|
1213
1213
|
: size === "header"
|
|
1214
|
-
? "flex aspect-square size-8 shrink-0 items-center justify-center rounded-[9px] border border-[color:color-mix(in_oklab,var(--header-fg,currentColor)_28%,transparent)] bg-[color-mix(in_oklab,var(--header-fg,currentColor)_10%,transparent)] text-[var(--header-fg,currentColor)] overflow-hidden max-sm:size-7"
|
|
1214
|
+
? "flex aspect-square size-8 shrink-0 items-center justify-center rounded-[9px] border border-[color:var(--header-mark-border,color-mix(in_oklab,var(--header-fg,currentColor)_28%,transparent))] bg-[var(--header-mark-bg,color-mix(in_oklab,var(--header-fg,currentColor)_10%,transparent))] text-[var(--header-mark-fg,var(--header-fg,currentColor))] overflow-hidden max-sm:size-7"
|
|
1215
1215
|
: "flex aspect-square size-8 shrink-0 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground overflow-hidden";
|
|
1216
1216
|
const icon = size === "sm" ? "size-3.5 shrink-0" : "size-4";
|
|
1217
1217
|
if (logoUrl && !failed) {
|
|
@@ -1310,6 +1310,16 @@ const WORKSPACE_HEADER_VARS = {
|
|
|
1310
1310
|
"--header-title-px": "0px",
|
|
1311
1311
|
"--header-title-py": "0px",
|
|
1312
1312
|
};
|
|
1313
|
+
const WORKSPACE_LIGHT_HEADER_VARS = {
|
|
1314
|
+
"--header-fg": "var(--foreground)",
|
|
1315
|
+
"--header-fg-muted": "var(--muted-foreground)",
|
|
1316
|
+
"--header-hover": "var(--accent)",
|
|
1317
|
+
"--header-mark-bg": "var(--accent)",
|
|
1318
|
+
"--header-mark-fg": "var(--primary)",
|
|
1319
|
+
"--header-mark-border": "transparent",
|
|
1320
|
+
"--header-title-px": "0px",
|
|
1321
|
+
"--header-title-py": "0px",
|
|
1322
|
+
};
|
|
1313
1323
|
|
|
1314
1324
|
/**
|
|
1315
1325
|
* Top-level app chrome: sticky header, sidebar slot, content gutter and the
|
|
@@ -1323,7 +1333,7 @@ const WORKSPACE_HEADER_VARS = {
|
|
|
1323
1333
|
* an erp-shell bump — domain components must NOT add their own root padding
|
|
1324
1334
|
* or content gets indented twice.
|
|
1325
1335
|
*/
|
|
1326
|
-
function AppLayoutShell({ children, sidebar, loadingComponent, breadcrumb, permissionProvider, organizationId, setOrganizationId, organizations, signInUrl, selectOrganizationUrl, chrome = "brand", headerEnd, mobileBrand, }) {
|
|
1336
|
+
function AppLayoutShell({ children, sidebar, loadingComponent, breadcrumb, permissionProvider, organizationId, setOrganizationId, organizations, signInUrl, selectOrganizationUrl, chrome = "brand", workspaceHeader = "brand", headerEnd, mobileBrand, }) {
|
|
1327
1337
|
const { data: session, status } = react.useSession();
|
|
1328
1338
|
const { open, setOpen } = useSidebar();
|
|
1329
1339
|
const router = navigation.useRouter();
|
|
@@ -1454,7 +1464,12 @@ function AppLayoutShell({ children, sidebar, loadingComponent, breadcrumb, permi
|
|
|
1454
1464
|
: "";
|
|
1455
1465
|
const needsLeftGutter = workspace || !(open && !isSidebarModalLayout);
|
|
1456
1466
|
const wrap = permissionProvider ?? ((c) => c);
|
|
1457
|
-
return (jsxRuntime.jsxs("div", { className: "flex min-h-screen w-full bg-background", children: [open && (jsxRuntime.jsx("div", { className: "fixed left-0 top-0 z-50 h-screen", children: sidebar })), open && isSidebarModalLayout && (jsxRuntime.jsx("button", { type: "button", "aria-label": "\u0E1B\u0E34\u0E14\u0E40\u0E21\u0E19\u0E39", className: "fixed inset-0 z-40 bg-black/50", onClick: () => setOpen(false) })), jsxRuntime.jsx("div", { className: cx("relative flex min-w-0 flex-1 flex-col transition-all", contentMargin), children: jsxRuntime.jsxs("main", { className: cx("flex flex-1 flex-col min-h-screen", workspace ? "gap-0" : "gap-4"), children: [workspace ? (jsxRuntime.jsxs("div", { className: "sticky top-0 z-30 shrink-0 w-full",
|
|
1467
|
+
return (jsxRuntime.jsxs("div", { className: "flex min-h-screen w-full bg-background", children: [open && (jsxRuntime.jsx("div", { className: "fixed left-0 top-0 z-50 h-screen", children: sidebar })), open && isSidebarModalLayout && (jsxRuntime.jsx("button", { type: "button", "aria-label": "\u0E1B\u0E34\u0E14\u0E40\u0E21\u0E19\u0E39", className: "fixed inset-0 z-40 bg-black/50", onClick: () => setOpen(false) })), jsxRuntime.jsx("div", { className: cx("relative flex min-w-0 flex-1 flex-col transition-all", contentMargin), children: jsxRuntime.jsxs("main", { className: cx("flex flex-1 flex-col min-h-screen", workspace ? "gap-0" : "gap-4"), children: [workspace ? (jsxRuntime.jsxs("div", { className: cx("sticky top-0 z-30 shrink-0 w-full", workspaceHeader === "light" &&
|
|
1468
|
+
"border-b border-border bg-card/85 backdrop-blur-sm"), style: workspaceHeader === "light"
|
|
1469
|
+
? WORKSPACE_LIGHT_HEADER_VARS
|
|
1470
|
+
: WORKSPACE_HEADER_VARS, children: [workspaceHeader === "light" ? null : (jsxRuntime.jsx(HeaderBackground, { className: "rounded-none" })), jsxRuntime.jsxs("header", { className: cx("relative z-10 flex w-full items-center gap-3 text-[var(--header-fg)]", workspaceHeader === "light"
|
|
1471
|
+
? "min-h-[66px] px-3 py-2 sm:min-h-[72px] sm:px-[22px] lg:min-h-[82px] lg:px-8"
|
|
1472
|
+
: "min-h-[72px] px-[18px] py-3 sm:px-6 lg:min-h-[88px] lg:px-10"), children: [isSidebarModalLayout ? (
|
|
1458
1473
|
// As in the design: the mark, then a menu button, and the
|
|
1459
1474
|
// organisation on the right — no trail, no title, so the
|
|
1460
1475
|
// organisation's name has the room it needs on a phone.
|
|
@@ -2345,6 +2360,7 @@ exports.SidebarTrigger = SidebarTrigger;
|
|
|
2345
2360
|
exports.TapMenu = TapMenu;
|
|
2346
2361
|
exports.ThemeProvider = ThemeProvider;
|
|
2347
2362
|
exports.WORKSPACE_HEADER_VARS = WORKSPACE_HEADER_VARS;
|
|
2363
|
+
exports.WORKSPACE_LIGHT_HEADER_VARS = WORKSPACE_LIGHT_HEADER_VARS;
|
|
2348
2364
|
exports.WorkspaceBrand = WorkspaceBrand;
|
|
2349
2365
|
exports.axiosInstance = instance;
|
|
2350
2366
|
exports.buildSystemLinks = buildSystemLinks;
|