@wealthx/shadcn 1.5.33 → 1.5.35
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/.turbo/turbo-build.log +72 -72
- package/CHANGELOG.md +12 -0
- package/dist/{chunk-RSEVIQEO.mjs → chunk-E432NK23.mjs} +41 -36
- package/dist/{chunk-EEI4FLEE.mjs → chunk-WLELT6L7.mjs} +345 -272
- package/dist/components/ui/ai-conversations/index.js +417 -350
- package/dist/components/ui/ai-conversations/index.mjs +1 -1
- package/dist/components/ui/sidebar-nav.js +39 -34
- package/dist/components/ui/sidebar-nav.mjs +1 -1
- package/dist/index.js +4435 -4363
- package/dist/index.mjs +2 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/ui/ai-conversations/bubble.tsx +240 -0
- package/src/components/ui/ai-conversations/index.tsx +9 -8
- package/src/components/ui/ai-conversations/thread.tsx +11 -163
- package/src/components/ui/sidebar-nav.tsx +96 -75
- package/src/styles/styles-css.ts +1 -1
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
ConversationStatusChip,
|
|
10
10
|
ConversationsPage,
|
|
11
11
|
LeadInfoPanel
|
|
12
|
-
} from "../../../chunk-
|
|
12
|
+
} from "../../../chunk-WLELT6L7.mjs";
|
|
13
13
|
import "../../../chunk-3S6KVFF5.mjs";
|
|
14
14
|
import "../../../chunk-WE4YKBDE.mjs";
|
|
15
15
|
import "../../../chunk-T5FRVEJQ.mjs";
|
|
@@ -559,42 +559,53 @@ function CollapsibleNavItem({
|
|
|
559
559
|
function SidebarNav({
|
|
560
560
|
items,
|
|
561
561
|
userName = "Anonymous User",
|
|
562
|
-
collapsed = false,
|
|
563
562
|
logo,
|
|
564
563
|
logoCollapsed,
|
|
565
564
|
metricsGroups,
|
|
566
565
|
onNavigate,
|
|
567
566
|
onLogout,
|
|
568
|
-
|
|
567
|
+
defaultLocked = false,
|
|
568
|
+
onLockedChange,
|
|
569
569
|
className
|
|
570
570
|
}) {
|
|
571
|
+
const [isLocked, setIsLocked] = React3.useState(defaultLocked);
|
|
572
|
+
const [isHovered, setIsHovered] = React3.useState(false);
|
|
573
|
+
const isExpanded = isLocked || isHovered;
|
|
571
574
|
const [userMenuOpen, setUserMenuOpen] = React3.useState(false);
|
|
572
575
|
const navScrollRef = React3.useRef(null);
|
|
573
576
|
const expandedScrollRef = React3.useRef(0);
|
|
577
|
+
const handleLockToggle = () => {
|
|
578
|
+
const next = !isLocked;
|
|
579
|
+
setIsLocked(next);
|
|
580
|
+
onLockedChange == null ? void 0 : onLockedChange(next);
|
|
581
|
+
};
|
|
574
582
|
React3.useEffect(() => {
|
|
575
|
-
if (
|
|
576
|
-
}, [
|
|
583
|
+
if (!isExpanded) setUserMenuOpen(false);
|
|
584
|
+
}, [isExpanded]);
|
|
577
585
|
React3.useLayoutEffect(() => {
|
|
578
586
|
const nav = navScrollRef.current;
|
|
579
587
|
if (!nav) return;
|
|
580
|
-
if (
|
|
588
|
+
if (isExpanded) {
|
|
581
589
|
nav.scrollTop = expandedScrollRef.current;
|
|
582
590
|
}
|
|
583
591
|
return () => {
|
|
584
|
-
if (
|
|
592
|
+
if (isExpanded && nav) {
|
|
585
593
|
expandedScrollRef.current = nav.scrollTop;
|
|
586
594
|
}
|
|
587
595
|
};
|
|
588
|
-
}, [
|
|
596
|
+
}, [isExpanded]);
|
|
589
597
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
590
598
|
"nav",
|
|
591
599
|
{
|
|
592
600
|
"data-slot": "sidebar-nav",
|
|
593
|
-
"data-
|
|
601
|
+
"data-expanded": isExpanded,
|
|
602
|
+
"data-locked": isLocked,
|
|
603
|
+
onMouseEnter: () => setIsHovered(true),
|
|
604
|
+
onMouseLeave: () => setIsHovered(false),
|
|
594
605
|
className: cn(
|
|
595
606
|
"flex h-full flex-col bg-brand-secondary text-brand-secondary-foreground",
|
|
596
607
|
"transition-all duration-200 ease-in-out",
|
|
597
|
-
|
|
608
|
+
isExpanded ? "w-[279px]" : "w-14",
|
|
598
609
|
className
|
|
599
610
|
),
|
|
600
611
|
children: [
|
|
@@ -606,7 +617,7 @@ function SidebarNav({
|
|
|
606
617
|
alt: "Logo",
|
|
607
618
|
className: cn(
|
|
608
619
|
"h-8 w-auto object-contain object-left px-5 transition-opacity duration-200",
|
|
609
|
-
|
|
620
|
+
!isExpanded ? "opacity-0" : "opacity-100"
|
|
610
621
|
)
|
|
611
622
|
}
|
|
612
623
|
),
|
|
@@ -617,7 +628,7 @@ function SidebarNav({
|
|
|
617
628
|
alt: "Logo",
|
|
618
629
|
className: cn(
|
|
619
630
|
"absolute inset-y-0 left-0 right-0 m-auto h-8 w-8 object-contain transition-opacity duration-200",
|
|
620
|
-
|
|
631
|
+
!isExpanded ? "opacity-100" : "opacity-0"
|
|
621
632
|
)
|
|
622
633
|
}
|
|
623
634
|
)
|
|
@@ -627,7 +638,7 @@ function SidebarNav({
|
|
|
627
638
|
"div",
|
|
628
639
|
{
|
|
629
640
|
className: cn(
|
|
630
|
-
|
|
641
|
+
!isExpanded ? "opacity-0 pointer-events-none" : "opacity-100"
|
|
631
642
|
),
|
|
632
643
|
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
633
644
|
Accordion,
|
|
@@ -684,12 +695,12 @@ function SidebarNav({
|
|
|
684
695
|
)
|
|
685
696
|
}
|
|
686
697
|
),
|
|
687
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(NavTooltip, { label: userName, collapsed, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
698
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(NavTooltip, { label: userName, collapsed: !isExpanded, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
688
699
|
"div",
|
|
689
700
|
{
|
|
690
701
|
className: cn(
|
|
691
702
|
"absolute inset-0 flex items-center justify-center transition-opacity duration-200",
|
|
692
|
-
|
|
703
|
+
!isExpanded ? "opacity-100" : "opacity-0 pointer-events-none"
|
|
693
704
|
),
|
|
694
705
|
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center font-semibold text-xs bg-primary text-primary-foreground", children: getInitials(userName) })
|
|
695
706
|
}
|
|
@@ -698,7 +709,7 @@ function SidebarNav({
|
|
|
698
709
|
!!(metricsGroups == null ? void 0 : metricsGroups.length) && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
699
710
|
Accordion,
|
|
700
711
|
{
|
|
701
|
-
value:
|
|
712
|
+
value: isExpanded ? ["metrics"] : [],
|
|
702
713
|
onValueChange: () => {
|
|
703
714
|
},
|
|
704
715
|
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(AccordionItem, { className: "border-none", value: "metrics", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(AccordionContent, { className: "p-0 text-inherit", children: metricsGroups.map((group, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(MetricsGroup, { group }, i)) }) })
|
|
@@ -709,7 +720,7 @@ function SidebarNav({
|
|
|
709
720
|
CollapsibleNavItem,
|
|
710
721
|
{
|
|
711
722
|
item,
|
|
712
|
-
collapsed,
|
|
723
|
+
collapsed: !isExpanded,
|
|
713
724
|
onNavigate
|
|
714
725
|
},
|
|
715
726
|
item.href
|
|
@@ -717,45 +728,39 @@ function SidebarNav({
|
|
|
717
728
|
SidebarNavItemView,
|
|
718
729
|
{
|
|
719
730
|
item,
|
|
720
|
-
collapsed,
|
|
731
|
+
collapsed: !isExpanded,
|
|
721
732
|
onNavigate
|
|
722
733
|
},
|
|
723
734
|
item.href
|
|
724
735
|
)
|
|
725
736
|
) }),
|
|
726
|
-
|
|
737
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "mt-auto border-t border-white/15 bg-white/10", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
727
738
|
NavTooltip,
|
|
728
739
|
{
|
|
729
|
-
label:
|
|
730
|
-
collapsed,
|
|
740
|
+
label: isLocked ? "Unpin sidebar" : "Pin sidebar open",
|
|
741
|
+
collapsed: !isExpanded,
|
|
731
742
|
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
732
743
|
Button,
|
|
733
744
|
{
|
|
734
745
|
type: "button",
|
|
735
746
|
variant: "ghost",
|
|
736
|
-
onClick:
|
|
747
|
+
onClick: handleLockToggle,
|
|
737
748
|
className: cn(
|
|
738
|
-
"h-12 w-full
|
|
749
|
+
"h-12 w-full items-center gap-3 py-3 transition-colors",
|
|
739
750
|
"text-brand-secondary-foreground/80 hover:bg-white/10 hover:text-brand-secondary-foreground",
|
|
740
|
-
|
|
751
|
+
isExpanded ? "justify-start px-3" : "justify-center px-2",
|
|
752
|
+
isLocked && "text-primary"
|
|
741
753
|
),
|
|
742
754
|
children: [
|
|
743
|
-
|
|
744
|
-
import_lucide_react3.
|
|
745
|
-
{
|
|
746
|
-
size: 24,
|
|
747
|
-
strokeWidth: 1.75,
|
|
748
|
-
className: "shrink-0"
|
|
749
|
-
}
|
|
750
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
751
|
-
import_lucide_react3.PanelLeftClose,
|
|
755
|
+
isLocked ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react3.Pin, { size: 24, strokeWidth: 1.75, className: "shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
756
|
+
import_lucide_react3.PinOff,
|
|
752
757
|
{
|
|
753
758
|
size: 24,
|
|
754
759
|
strokeWidth: 1.75,
|
|
755
|
-
className: "shrink-0"
|
|
760
|
+
className: "shrink-0 opacity-60"
|
|
756
761
|
}
|
|
757
762
|
),
|
|
758
|
-
|
|
763
|
+
isExpanded && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-sm", children: isLocked ? "Pinned" : "Pin sidebar" })
|
|
759
764
|
]
|
|
760
765
|
}
|
|
761
766
|
)
|