@algenium/blocks 1.2.0-rc.2 → 1.2.0-rc.3
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 +8 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -573,9 +573,11 @@ interface ChatSidebarProps {
|
|
|
573
573
|
labels?: ChatSidebarLabels;
|
|
574
574
|
roleLabel?: (role: string) => string;
|
|
575
575
|
roomTypeLabel?: (type: string) => string;
|
|
576
|
+
/** Top offset on mobile so the navbar stays visible (e.g. "3.5rem", "4rem"). */
|
|
577
|
+
mobileTopOffset?: string;
|
|
576
578
|
className?: string;
|
|
577
579
|
}
|
|
578
|
-
declare function ChatSidebar({ currentUserId, config, labels, roleLabel, roomTypeLabel, className, }: ChatSidebarProps): react_jsx_runtime.JSX.Element | null;
|
|
580
|
+
declare function ChatSidebar({ currentUserId, config, labels, roleLabel, roomTypeLabel, mobileTopOffset, className, }: ChatSidebarProps): react_jsx_runtime.JSX.Element | null;
|
|
579
581
|
|
|
580
582
|
declare const buttonVariants: (props?: ({
|
|
581
583
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -573,9 +573,11 @@ interface ChatSidebarProps {
|
|
|
573
573
|
labels?: ChatSidebarLabels;
|
|
574
574
|
roleLabel?: (role: string) => string;
|
|
575
575
|
roomTypeLabel?: (type: string) => string;
|
|
576
|
+
/** Top offset on mobile so the navbar stays visible (e.g. "3.5rem", "4rem"). */
|
|
577
|
+
mobileTopOffset?: string;
|
|
576
578
|
className?: string;
|
|
577
579
|
}
|
|
578
|
-
declare function ChatSidebar({ currentUserId, config, labels, roleLabel, roomTypeLabel, className, }: ChatSidebarProps): react_jsx_runtime.JSX.Element | null;
|
|
580
|
+
declare function ChatSidebar({ currentUserId, config, labels, roleLabel, roomTypeLabel, mobileTopOffset, className, }: ChatSidebarProps): react_jsx_runtime.JSX.Element | null;
|
|
579
581
|
|
|
580
582
|
declare const buttonVariants: (props?: ({
|
|
581
583
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
package/dist/index.js
CHANGED
|
@@ -6780,6 +6780,7 @@ function ChatSidebar({
|
|
|
6780
6780
|
labels = {},
|
|
6781
6781
|
roleLabel,
|
|
6782
6782
|
roomTypeLabel,
|
|
6783
|
+
mobileTopOffset,
|
|
6783
6784
|
className
|
|
6784
6785
|
}) {
|
|
6785
6786
|
const {
|
|
@@ -6813,14 +6814,16 @@ function ChatSidebar({
|
|
|
6813
6814
|
return roomTypeLabels[type] ?? type;
|
|
6814
6815
|
};
|
|
6815
6816
|
const activeConversation = activeCaseId ? conversations.find((c) => c.caseId === activeCaseId) : null;
|
|
6817
|
+
const cssVars = {
|
|
6818
|
+
"--sidebar-top": mobileTopOffset ?? "0px"
|
|
6819
|
+
};
|
|
6816
6820
|
const panel = /* @__PURE__ */ jsx(
|
|
6817
6821
|
"div",
|
|
6818
6822
|
{
|
|
6823
|
+
style: cssVars,
|
|
6819
6824
|
className: cn(
|
|
6820
6825
|
"flex min-h-0 flex-col bg-background",
|
|
6821
|
-
|
|
6822
|
-
"fixed inset-0 z-[100] w-full max-w-none border-0 shadow-none",
|
|
6823
|
-
// sm+: docked right sidebar in the app shell flex row
|
|
6826
|
+
"fixed top-[var(--sidebar-top)] right-0 bottom-0 left-0 z-[100] w-full max-w-none border-0 shadow-none",
|
|
6824
6827
|
"sm:relative sm:inset-auto sm:z-auto sm:h-full sm:w-[360px] sm:max-w-[360px] sm:shrink-0 sm:border-l sm:shadow-none xl:w-[400px] xl:max-w-[400px]",
|
|
6825
6828
|
className
|
|
6826
6829
|
),
|
|
@@ -6920,7 +6923,8 @@ function ChatSidebar({
|
|
|
6920
6923
|
/* @__PURE__ */ jsx(
|
|
6921
6924
|
"div",
|
|
6922
6925
|
{
|
|
6923
|
-
|
|
6926
|
+
style: cssVars,
|
|
6927
|
+
className: "fixed top-[var(--sidebar-top)] right-0 bottom-0 left-0 z-[90] bg-black/50 sm:hidden",
|
|
6924
6928
|
"aria-hidden": true,
|
|
6925
6929
|
onClick: close
|
|
6926
6930
|
}
|