@fluid-app/portal-sdk 0.1.443 → 0.1.444

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.mjs CHANGED
@@ -88,6 +88,7 @@ import { twMerge } from "tailwind-merge";
88
88
  import { Slot } from "@radix-ui/react-slot";
89
89
  import { cva } from "class-variance-authority";
90
90
  import { createRoot } from "react-dom/client";
91
+ import { MobileBottomSheet } from "@fluid-app/ui-components/components/MobileBottomSheet";
91
92
  //#region src/types/page-template.ts
92
93
  /**
93
94
  * Built-in page category IDs
@@ -956,7 +957,7 @@ function AppShellLayout({ sidebarContent, headerContent, children, sidebarHeader
956
957
  ref: screenContentRef,
957
958
  "data-fluid-portal-screen-area": "",
958
959
  tabIndex: -1,
959
- className: "ring-foreground/5 scrollbar-none bg-background text-foreground h-full overflow-auto rounded-xl shadow-sm ring-1",
960
+ 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",
960
961
  children
961
962
  })
962
963
  })]
@@ -1270,41 +1271,22 @@ function SdkBottomNav({ navItems, currentSlug, onNavigate, appDefinitionId = 0,
1270
1271
  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"}`,
1271
1272
  children: [/* @__PURE__ */ jsx(Ellipsis, { className: "size-5" }), /* @__PURE__ */ jsx("span", { children: t("nav_more") })]
1272
1273
  })]
1273
- }), moreOpen && /* @__PURE__ */ jsxs("div", {
1274
- className: "fixed inset-0 z-50 flex flex-col",
1275
- children: [/* @__PURE__ */ jsx("div", {
1276
- className: "flex-1 bg-black/50",
1277
- onClick: () => setMoreOpen(false),
1278
- "aria-hidden": "true"
1279
- }), /* @__PURE__ */ jsxs("div", {
1280
- className: "bg-sidebar rounded-t-2xl pb-[env(safe-area-inset-bottom)]",
1281
- children: [/* @__PURE__ */ jsxs("div", {
1282
- className: "flex items-center justify-between px-4 pt-4 pb-2",
1283
- children: [/* @__PURE__ */ jsx("span", {
1284
- className: "text-foreground text-sm font-semibold",
1285
- children: t("nav_more")
1286
- }), /* @__PURE__ */ jsx("button", {
1287
- type: "button",
1288
- onClick: () => setMoreOpen(false),
1289
- className: "text-muted-foreground hover:bg-sidebar-accent flex items-center justify-center rounded-full p-1",
1290
- "aria-label": t("nav_close"),
1291
- children: /* @__PURE__ */ jsx(X, { className: "size-5" })
1292
- })]
1293
- }), /* @__PURE__ */ jsx("div", {
1294
- className: "px-2 pb-4",
1295
- children: overflowItems.map((item) => {
1296
- return /* @__PURE__ */ jsxs("button", {
1297
- type: "button",
1298
- onClick: () => handleItemClick(item),
1299
- 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"}`,
1300
- children: [/* @__PURE__ */ jsx(RepIcon, {
1301
- name: item.icon || "file",
1302
- className: "size-5"
1303
- }), /* @__PURE__ */ jsx("span", { children: translateNavLabel(shellApi, item.slug, item.label) })]
1304
- }, item.id ?? item.slug ?? item.label);
1305
- })
1306
- })]
1307
- })]
1274
+ }), /* @__PURE__ */ jsx(MobileBottomSheet, {
1275
+ open: moreOpen,
1276
+ onOpenChange: setMoreOpen,
1277
+ title: t("nav_more"),
1278
+ surface: "sidebar",
1279
+ children: overflowItems.map((item) => {
1280
+ return /* @__PURE__ */ jsxs("button", {
1281
+ type: "button",
1282
+ onClick: () => handleItemClick(item),
1283
+ 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"}`,
1284
+ children: [/* @__PURE__ */ jsx(RepIcon, {
1285
+ name: item.icon || "file",
1286
+ className: "size-5"
1287
+ }), /* @__PURE__ */ jsx("span", { children: translateNavLabel(shellApi, item.slug, item.label) })]
1288
+ }, item.id ?? item.slug ?? item.label);
1289
+ })
1308
1290
  })] });
1309
1291
  }
1310
1292
  //#endregion