@fluid-app/portal-sdk 0.1.443 → 0.1.445

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.cjs CHANGED
@@ -90,6 +90,7 @@ let tailwind_merge = require("tailwind-merge");
90
90
  let _radix_ui_react_slot = require("@radix-ui/react-slot");
91
91
  let class_variance_authority = require("class-variance-authority");
92
92
  let react_dom_client = require("react-dom/client");
93
+ let _fluid_app_ui_components_components_MobileBottomSheet = require("@fluid-app/ui-components/components/MobileBottomSheet");
93
94
  //#region src/types/page-template.ts
94
95
  /**
95
96
  * Built-in page category IDs
@@ -953,12 +954,12 @@ function AppShellLayout({ sidebarContent, headerContent, children, sidebarHeader
953
954
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SidebarInset, {
954
955
  className: "flex flex-1 flex-col overflow-hidden",
955
956
  children: [headerContent, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
956
- className: `bg-muted min-h-0 flex-1 md:pt-4 md:pr-4 md:pb-4 md:pl-2 ${useBottomNav ? "max-md:pb-[calc(4rem+env(safe-area-inset-bottom))]" : ""}`,
957
+ className: `bg-muted min-h-0 flex-1 md:pt-4 md:pr-4 md:pb-4 md:pl-2 ${useBottomNav ? "max-md:pb-[calc(3.5rem+env(safe-area-inset-bottom))]" : ""}`,
957
958
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
958
959
  ref: screenContentRef,
959
960
  "data-fluid-portal-screen-area": "",
960
961
  tabIndex: -1,
961
- className: "ring-foreground/5 scrollbar-none bg-background text-foreground h-full overflow-auto rounded-xl shadow-sm ring-1",
962
+ className: "ring-foreground/5 scrollbar-none bg-background text-foreground h-full overflow-auto rounded-xl shadow-sm ring-1 max-md:rounded-none max-md:shadow-none max-md:ring-0",
962
963
  children
963
964
  })
964
965
  })]
@@ -1252,7 +1253,7 @@ function SdkBottomNav({ navItems, currentSlug, onNavigate, appDefinitionId = 0,
1252
1253
  setMoreOpen(false);
1253
1254
  };
1254
1255
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("nav", {
1255
- className: "border-border bg-sidebar fixed right-0 bottom-0 left-0 z-40 flex h-16 items-end justify-around border-t pb-[env(safe-area-inset-bottom)]",
1256
+ className: "border-border bg-sidebar fixed right-0 bottom-0 left-0 z-40 flex h-[calc(3.5rem+env(safe-area-inset-bottom))] items-end justify-around border-t pb-[env(safe-area-inset-bottom)]",
1256
1257
  children: [visibleItems.map((item) => {
1257
1258
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
1258
1259
  type: "button",
@@ -1272,41 +1273,22 @@ function SdkBottomNav({ navItems, currentSlug, onNavigate, appDefinitionId = 0,
1272
1273
  className: `flex flex-1 flex-col items-center justify-center gap-0.5 py-2 text-[10px] font-medium transition-colors ${overflowItems.some((item) => isInSection(item, currentSlug)) ? "text-primary" : "text-muted-foreground"}`,
1273
1274
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Ellipsis, { className: "size-5" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("nav_more") })]
1274
1275
  })]
1275
- }), moreOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1276
- className: "fixed inset-0 z-50 flex flex-col",
1277
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1278
- className: "flex-1 bg-black/50",
1279
- onClick: () => setMoreOpen(false),
1280
- "aria-hidden": "true"
1281
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1282
- className: "bg-sidebar rounded-t-2xl pb-[env(safe-area-inset-bottom)]",
1283
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1284
- className: "flex items-center justify-between px-4 pt-4 pb-2",
1285
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1286
- className: "text-foreground text-sm font-semibold",
1287
- children: t("nav_more")
1288
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1289
- type: "button",
1290
- onClick: () => setMoreOpen(false),
1291
- className: "text-muted-foreground hover:bg-sidebar-accent flex items-center justify-center rounded-full p-1",
1292
- "aria-label": t("nav_close"),
1293
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.X, { className: "size-5" })
1294
- })]
1295
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1296
- className: "px-2 pb-4",
1297
- children: overflowItems.map((item) => {
1298
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
1299
- type: "button",
1300
- onClick: () => handleItemClick(item),
1301
- className: `flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium transition-colors ${isInSection(item, currentSlug) ? "bg-sidebar-primary text-sidebar-primary-foreground" : "text-sidebar-foreground hover:bg-sidebar-accent"}`,
1302
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(RepIcon, {
1303
- name: item.icon || "file",
1304
- className: "size-5"
1305
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: translateNavLabel(shellApi, item.slug, item.label) })]
1306
- }, item.id ?? item.slug ?? item.label);
1307
- })
1308
- })]
1309
- })]
1276
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_fluid_app_ui_components_components_MobileBottomSheet.MobileBottomSheet, {
1277
+ open: moreOpen,
1278
+ onOpenChange: setMoreOpen,
1279
+ title: t("nav_more"),
1280
+ surface: "sidebar",
1281
+ children: overflowItems.map((item) => {
1282
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
1283
+ type: "button",
1284
+ onClick: () => handleItemClick(item),
1285
+ className: `flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium transition-colors ${isInSection(item, currentSlug) ? "bg-sidebar-primary text-sidebar-primary-foreground" : "text-sidebar-foreground hover:bg-sidebar-accent"}`,
1286
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(RepIcon, {
1287
+ name: item.icon || "file",
1288
+ className: "size-5"
1289
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: translateNavLabel(shellApi, item.slug, item.label) })]
1290
+ }, item.id ?? item.slug ?? item.label);
1291
+ })
1310
1292
  })] });
1311
1293
  }
1312
1294
  //#endregion
@@ -1582,7 +1564,7 @@ function SdkHeader({ mobileTabs, currentSlug, title, onBack, onNavigate, onLogou
1582
1564
  icon: lucide_react.ChevronLeft,
1583
1565
  "aria-label": t("nav_back"),
1584
1566
  onClick: onBack,
1585
- className: "-ml-1 flex-none"
1567
+ className: "border-border/60 bg-background/70 -ml-1 flex-none rounded-full border shadow-sm backdrop-blur-md transition-transform active:scale-95 [&_svg]:size-5"
1586
1568
  }) : null,
1587
1569
  resolvedTitle ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h1", {
1588
1570
  className: "text-sidebar-foreground min-w-0 flex-1 truncate text-[17px] leading-tight font-semibold tracking-[-0.01em]",