@protobase/ui 0.15.0 → 0.15.1

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/app/app.js CHANGED
@@ -191,7 +191,7 @@ const Routes = ({ workspace, sidebarMode, assistant, runtime }) => {
191
191
  others: organizations.organizations.filter((organization) => organization.id !== current?.organization?.id),
192
192
  onSwitch: (id) => void session.organizations.switchTo(id).then(() => reopenIn(basePath))
193
193
  },
194
- theme: user && {
194
+ theme: {
195
195
  preference: theme.preference,
196
196
  onChange: theme.choose
197
197
  },
@@ -1,12 +1,13 @@
1
1
  import { cn } from "../lib/cn.js";
2
2
  import { Logo } from "./logo.js";
3
3
  import { navGroups } from "./nav.js";
4
+ import { ThemeSwitch } from "./theme-switch.js";
4
5
  import { ProfileMenu } from "./profile-menu.js";
5
6
  import { isTextMode, sidebarWidth } from "./sidebar-mode.js";
6
7
  import { SidebarItem } from "./sidebar-item.js";
7
8
  import { SidebarGroup } from "./sidebar-group.js";
8
9
  import { LogIn } from "lucide-react";
9
- import { jsx, jsxs } from "react/jsx-runtime";
10
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
10
11
  //#region src/app-shell/sidebar.tsx
11
12
  const Sidebar = ({ mode, activeItem, user, workspace, forceExpanded, profileMenuOpen, groups = navGroups, userMenu, onNavigate, onSignOut, onSignIn, organizations, roles, theme, sticky }) => {
12
13
  const expanding = mode === "icon-expand";
@@ -58,7 +59,10 @@ const Sidebar = ({ mode, activeItem, user, workspace, forceExpanded, profileMenu
58
59
  organizations,
59
60
  roles,
60
61
  theme
61
- }) : onSignIn && /* @__PURE__ */ jsxs("button", {
62
+ }) : /* @__PURE__ */ jsxs(Fragment, { children: [theme && inline && /* @__PURE__ */ jsx(ThemeSwitch, {
63
+ theme,
64
+ className: "flex min-h-11 w-full items-center gap-2.5 whitespace-nowrap p-1.5 text-[13px] text-muted-foreground md:min-h-0"
65
+ }), onSignIn && /* @__PURE__ */ jsxs("button", {
62
66
  type: "button",
63
67
  onClick: onSignIn,
64
68
  "aria-label": "Sign in",
@@ -67,7 +71,7 @@ const Sidebar = ({ mode, activeItem, user, workspace, forceExpanded, profileMenu
67
71
  className: "whitespace-nowrap",
68
72
  children: "Sign in"
69
73
  })]
70
- })
74
+ })] })
71
75
  })
72
76
  ]
73
77
  })
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "0.15.0";
2
+ var version = "0.15.1";
3
3
  var protobase = { "pluginApi": 1 };
4
4
  //#endregion
5
5
  export { protobase, version };