@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.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export { OrganizationSwitcher, type OrganizationSwitcherProps, type Organization
|
|
|
21
21
|
export { SidebarHeader } from "./navigation/sidebar-header";
|
|
22
22
|
export { AppSidebar, type AppSidebarProps } from "./navigation/app-sidebar";
|
|
23
23
|
export { AppLayoutShell, type AppLayoutShellProps, type AppLayoutShellOrganization, } from "./navigation/app-layout-shell";
|
|
24
|
-
export { type ShellChrome, WORKSPACE_HEADER_VARS } from "./navigation/chrome";
|
|
24
|
+
export { type ShellChrome, type WorkspaceHeaderTone, WORKSPACE_HEADER_VARS, WORKSPACE_LIGHT_HEADER_VARS, } from "./navigation/chrome";
|
|
25
25
|
export { WorkspaceBrand, type WorkspaceBrandProps } from "./navigation/workspace-brand";
|
|
26
26
|
export { SidebarHelpCard, SidebarHelpLink, type SidebarHelpCardProps, type SidebarHelpLinkProps, } from "./navigation/sidebar-help-card";
|
|
27
27
|
export { AccessDenied, type AccessDeniedProps } from "./auth/access-denied";
|
package/dist/index.esm.js
CHANGED
|
@@ -1192,7 +1192,7 @@ function OrgMark({ logoUrl, size = "md", }) {
|
|
|
1192
1192
|
const box = size === "sm"
|
|
1193
1193
|
? "flex size-6 items-center justify-center rounded-md border overflow-hidden bg-background"
|
|
1194
1194
|
: size === "header"
|
|
1195
|
-
? "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"
|
|
1195
|
+
? "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"
|
|
1196
1196
|
: "flex aspect-square size-8 shrink-0 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground overflow-hidden";
|
|
1197
1197
|
const icon = size === "sm" ? "size-3.5 shrink-0" : "size-4";
|
|
1198
1198
|
if (logoUrl && !failed) {
|
|
@@ -1291,6 +1291,16 @@ const WORKSPACE_HEADER_VARS = {
|
|
|
1291
1291
|
"--header-title-px": "0px",
|
|
1292
1292
|
"--header-title-py": "0px",
|
|
1293
1293
|
};
|
|
1294
|
+
const WORKSPACE_LIGHT_HEADER_VARS = {
|
|
1295
|
+
"--header-fg": "var(--foreground)",
|
|
1296
|
+
"--header-fg-muted": "var(--muted-foreground)",
|
|
1297
|
+
"--header-hover": "var(--accent)",
|
|
1298
|
+
"--header-mark-bg": "var(--accent)",
|
|
1299
|
+
"--header-mark-fg": "var(--primary)",
|
|
1300
|
+
"--header-mark-border": "transparent",
|
|
1301
|
+
"--header-title-px": "0px",
|
|
1302
|
+
"--header-title-py": "0px",
|
|
1303
|
+
};
|
|
1294
1304
|
|
|
1295
1305
|
/**
|
|
1296
1306
|
* Top-level app chrome: sticky header, sidebar slot, content gutter and the
|
|
@@ -1304,7 +1314,7 @@ const WORKSPACE_HEADER_VARS = {
|
|
|
1304
1314
|
* an erp-shell bump — domain components must NOT add their own root padding
|
|
1305
1315
|
* or content gets indented twice.
|
|
1306
1316
|
*/
|
|
1307
|
-
function AppLayoutShell({ children, sidebar, loadingComponent, breadcrumb, permissionProvider, organizationId, setOrganizationId, organizations, signInUrl, selectOrganizationUrl, chrome = "brand", headerEnd, mobileBrand, }) {
|
|
1317
|
+
function AppLayoutShell({ children, sidebar, loadingComponent, breadcrumb, permissionProvider, organizationId, setOrganizationId, organizations, signInUrl, selectOrganizationUrl, chrome = "brand", workspaceHeader = "brand", headerEnd, mobileBrand, }) {
|
|
1308
1318
|
const { data: session, status } = useSession();
|
|
1309
1319
|
const { open, setOpen } = useSidebar();
|
|
1310
1320
|
const router = useRouter();
|
|
@@ -1435,7 +1445,12 @@ function AppLayoutShell({ children, sidebar, loadingComponent, breadcrumb, permi
|
|
|
1435
1445
|
: "";
|
|
1436
1446
|
const needsLeftGutter = workspace || !(open && !isSidebarModalLayout);
|
|
1437
1447
|
const wrap = permissionProvider ?? ((c) => c);
|
|
1438
|
-
return (jsxs("div", { className: "flex min-h-screen w-full bg-background", children: [open && (jsx("div", { className: "fixed left-0 top-0 z-50 h-screen", children: sidebar })), open && isSidebarModalLayout && (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) })), jsx("div", { className: cx("relative flex min-w-0 flex-1 flex-col transition-all", contentMargin), children: jsxs("main", { className: cx("flex flex-1 flex-col min-h-screen", workspace ? "gap-0" : "gap-4"), children: [workspace ? (jsxs("div", { className: "sticky top-0 z-30 shrink-0 w-full",
|
|
1448
|
+
return (jsxs("div", { className: "flex min-h-screen w-full bg-background", children: [open && (jsx("div", { className: "fixed left-0 top-0 z-50 h-screen", children: sidebar })), open && isSidebarModalLayout && (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) })), jsx("div", { className: cx("relative flex min-w-0 flex-1 flex-col transition-all", contentMargin), children: jsxs("main", { className: cx("flex flex-1 flex-col min-h-screen", workspace ? "gap-0" : "gap-4"), children: [workspace ? (jsxs("div", { className: cx("sticky top-0 z-30 shrink-0 w-full", workspaceHeader === "light" &&
|
|
1449
|
+
"border-b border-border bg-card/85 backdrop-blur-sm"), style: workspaceHeader === "light"
|
|
1450
|
+
? WORKSPACE_LIGHT_HEADER_VARS
|
|
1451
|
+
: WORKSPACE_HEADER_VARS, children: [workspaceHeader === "light" ? null : (jsx(HeaderBackground, { className: "rounded-none" })), jsxs("header", { className: cx("relative z-10 flex w-full items-center gap-3 text-[var(--header-fg)]", workspaceHeader === "light"
|
|
1452
|
+
? "min-h-[66px] px-3 py-2 sm:min-h-[72px] sm:px-[22px] lg:min-h-[82px] lg:px-8"
|
|
1453
|
+
: "min-h-[72px] px-[18px] py-3 sm:px-6 lg:min-h-[88px] lg:px-10"), children: [isSidebarModalLayout ? (
|
|
1439
1454
|
// As in the design: the mark, then a menu button, and the
|
|
1440
1455
|
// organisation on the right — no trail, no title, so the
|
|
1441
1456
|
// organisation's name has the room it needs on a phone.
|
|
@@ -2290,5 +2305,5 @@ const getAxiosErrorMessage = (error) => {
|
|
|
2290
2305
|
return String(error);
|
|
2291
2306
|
};
|
|
2292
2307
|
|
|
2293
|
-
export { AccessDenied, ApiError, AppBreadcrumb, AppLayoutShell, AppSidebar, EMPLOYEE_RECORD_OK_EVENT, EMPLOYEE_RECORD_REQUIRED, EMPLOYEE_RECORD_REQUIRED_EVENT, EmployeeRequiredGate, FeatureFlagsProvider, HeaderBackground, NavMain, NavTools, NavUser, OrganizationSwitcher, PLAN_FEATURES, PermissionGateShell, PermissionProvider, PermissionRulesProvider, ReactQueryProvider, SessionBackedProfileCacheSeeder, SessionRefreshTrigger, SidebarContent, SidebarFooter, SidebarHeader, SidebarHelpCard, SidebarHelpLink, SidebarProvider, SidebarTrigger, TapMenu, ThemeProvider, WORKSPACE_HEADER_VARS, WorkspaceBrand, instance as axiosInstance, buildSystemLinks, buildUrlWithCode, canAccessNavPermissionRoute, clearAccessTokenCache, clearOrganizationId, decodeJWT, filterNavigationModulesByPermission, filterNavigationToolsByPermission, getAccessToken, getActiveModule, getActiveSubModule, getAxiosErrorMessage, getOrganizationId, getQueryClientConfig, getRequiredChildGroups, hasPlanFeature, isLikelyTransientNetworkError, isPathActive, normalizePathnameForPermissionRules, resolveUiRoutePermission, runGlobalRequestPrecheck, runWithTransientRetry, setOrganizationId, toApiError, unwrapApiResponse, updateOrganizationId, useClearOrgOnUserChange, useFeatureFlag, useFeatureFlags, useInvalidateQueriesOnOrgChange, useKeycloakRoles, useOrganizationIdState, usePermissionRules, useSessionRefresh, useSidebar, useSidebarToggle };
|
|
2308
|
+
export { AccessDenied, ApiError, AppBreadcrumb, AppLayoutShell, AppSidebar, EMPLOYEE_RECORD_OK_EVENT, EMPLOYEE_RECORD_REQUIRED, EMPLOYEE_RECORD_REQUIRED_EVENT, EmployeeRequiredGate, FeatureFlagsProvider, HeaderBackground, NavMain, NavTools, NavUser, OrganizationSwitcher, PLAN_FEATURES, PermissionGateShell, PermissionProvider, PermissionRulesProvider, ReactQueryProvider, SessionBackedProfileCacheSeeder, SessionRefreshTrigger, SidebarContent, SidebarFooter, SidebarHeader, SidebarHelpCard, SidebarHelpLink, SidebarProvider, SidebarTrigger, TapMenu, ThemeProvider, WORKSPACE_HEADER_VARS, WORKSPACE_LIGHT_HEADER_VARS, WorkspaceBrand, instance as axiosInstance, buildSystemLinks, buildUrlWithCode, canAccessNavPermissionRoute, clearAccessTokenCache, clearOrganizationId, decodeJWT, filterNavigationModulesByPermission, filterNavigationToolsByPermission, getAccessToken, getActiveModule, getActiveSubModule, getAxiosErrorMessage, getOrganizationId, getQueryClientConfig, getRequiredChildGroups, hasPlanFeature, isLikelyTransientNetworkError, isPathActive, normalizePathnameForPermissionRules, resolveUiRoutePermission, runGlobalRequestPrecheck, runWithTransientRetry, setOrganizationId, toApiError, unwrapApiResponse, updateOrganizationId, useClearOrgOnUserChange, useFeatureFlag, useFeatureFlags, useInvalidateQueriesOnOrgChange, useKeycloakRoles, useOrganizationIdState, usePermissionRules, useSessionRefresh, useSidebar, useSidebarToggle };
|
|
2294
2309
|
//# sourceMappingURL=index.esm.js.map
|