@myrjfa/ui 1.1.1 → 2.0.0

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.
Files changed (155) hide show
  1. package/dist/chat/ChatMain.d.ts +1 -1
  2. package/dist/chat/ChatMain.d.ts.map +1 -1
  3. package/dist/chat/ChatMain.js +3 -3
  4. package/dist/chat/ChatSidebar.d.ts +1 -1
  5. package/dist/chat/ChatSidebar.d.ts.map +1 -1
  6. package/dist/chat/ConversationList.d.ts +1 -1
  7. package/dist/chat/ConversationList.d.ts.map +1 -1
  8. package/dist/chat/ConversationList.js +1 -1
  9. package/dist/chat/ExpensePanel.js +1 -1
  10. package/dist/chat/MessageBubble.d.ts +1 -1
  11. package/dist/chat/MessageBubble.d.ts.map +1 -1
  12. package/dist/chat/MessageInput.js +1 -1
  13. package/dist/chat/MilestonePanel.js +1 -1
  14. package/dist/chat/components/SplitInputs.d.ts +1 -1
  15. package/dist/chat/components/SplitInputs.d.ts.map +1 -1
  16. package/dist/chat/components/SplitTypeSelector.d.ts +1 -1
  17. package/dist/chat/components/SplitTypeSelector.d.ts.map +1 -1
  18. package/dist/chat/dialogs/AddMemberDialog.d.ts +1 -1
  19. package/dist/chat/dialogs/AddMemberDialog.d.ts.map +1 -1
  20. package/dist/chat/dialogs/AddMemberDialog.js +1 -1
  21. package/dist/chat/dialogs/ExpenseAnalyticsDialog.js +1 -1
  22. package/dist/chat/dialogs/GroupInfoDialog.d.ts +1 -1
  23. package/dist/chat/dialogs/GroupInfoDialog.d.ts.map +1 -1
  24. package/dist/chat/dialogs/GroupInfoDialog.js +1 -1
  25. package/dist/chat/dialogs/GroupInfoViewDialog.d.ts +1 -1
  26. package/dist/chat/dialogs/GroupInfoViewDialog.d.ts.map +1 -1
  27. package/dist/chat/dialogs/NewChatDialog.js +2 -2
  28. package/dist/chat/dialogs/NewGroupDialog.js +2 -2
  29. package/dist/chat/dialogs/ParticipantsDialog.d.ts +1 -1
  30. package/dist/chat/dialogs/ParticipantsDialog.d.ts.map +1 -1
  31. package/dist/chat/dialogs/ParticipantsDialog.js +1 -1
  32. package/dist/dashboard/action-buttons.d.ts.map +1 -1
  33. package/dist/dashboard/action-buttons.js +7 -1
  34. package/dist/dashboard/app-sidebar.d.ts.map +1 -1
  35. package/dist/dashboard/app-sidebar.js +9 -4
  36. package/dist/dashboard/card-header.d.ts +1 -1
  37. package/dist/dashboard/card-header.d.ts.map +1 -1
  38. package/dist/dashboard/card-header.js +1 -1
  39. package/dist/dashboard/dashboard-components.js +1 -1
  40. package/dist/dashboard/data-table.d.ts.map +1 -1
  41. package/dist/dashboard/data-table.js +8 -8
  42. package/dist/dashboard/table.js +1 -1
  43. package/dist/header/mobile-nav-item.js +1 -1
  44. package/dist/header/nav-item.js +1 -1
  45. package/dist/index.d.ts +3 -2
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +4 -2
  48. package/dist/main/footer.d.ts +1 -0
  49. package/dist/main/footer.d.ts.map +1 -1
  50. package/dist/main/footer.js +35 -16
  51. package/dist/main/navbar.d.ts +2 -2
  52. package/dist/main/navbar.d.ts.map +1 -1
  53. package/dist/main/navbar.js +24 -18
  54. package/dist/main/paginationBar.d.ts +1 -1
  55. package/dist/main/paginationBar.d.ts.map +1 -1
  56. package/dist/main/paginationBar.js +1 -1
  57. package/dist/main/portfolio/portfolioItem.d.ts +1 -1
  58. package/dist/main/portfolio/portfolioItem.d.ts.map +1 -1
  59. package/dist/main/portfolio/portfolioPopup.d.ts +1 -1
  60. package/dist/main/portfolio/portfolioPopup.d.ts.map +1 -1
  61. package/dist/main/portfolio/portfolioPopup.js +1 -1
  62. package/dist/main/review-page.d.ts +2 -2
  63. package/dist/main/review-page.d.ts.map +1 -1
  64. package/dist/main/review-page.js +10 -50
  65. package/dist/misc/accordion.js +1 -1
  66. package/dist/misc/alert-dialog.js +1 -1
  67. package/dist/misc/alert.js +1 -1
  68. package/dist/misc/alertdialogclaude.js +1 -1
  69. package/dist/misc/avatar.js +1 -1
  70. package/dist/misc/badge.js +1 -1
  71. package/dist/misc/button.d.ts +9 -9
  72. package/dist/misc/button.js +1 -1
  73. package/dist/misc/card.js +1 -1
  74. package/dist/misc/carousel.js +1 -1
  75. package/dist/misc/checkbox.js +1 -1
  76. package/dist/misc/command.js +2 -2
  77. package/dist/misc/datepicker.d.ts.map +1 -1
  78. package/dist/misc/datepicker.js +22 -4
  79. package/dist/misc/dialog.js +1 -1
  80. package/dist/misc/dropdown-menu.js +1 -1
  81. package/dist/misc/faq.d.ts +2 -2
  82. package/dist/misc/faq.d.ts.map +1 -1
  83. package/dist/misc/faq.js +1 -1
  84. package/dist/misc/file-preview.d.ts +1 -1
  85. package/dist/misc/file-preview.d.ts.map +1 -1
  86. package/dist/misc/file-preview.js +1 -1
  87. package/dist/misc/filter.d.ts +1 -1
  88. package/dist/misc/filter.d.ts.map +1 -1
  89. package/dist/misc/filter.js +3 -3
  90. package/dist/misc/filterBar.d.ts +2 -2
  91. package/dist/misc/filterBar.d.ts.map +1 -1
  92. package/dist/misc/filterBar.js +3 -3
  93. package/dist/misc/form.js +1 -1
  94. package/dist/misc/input.js +1 -1
  95. package/dist/misc/label.js +1 -1
  96. package/dist/misc/line-carousel.d.ts +1 -1
  97. package/dist/misc/line-carousel.d.ts.map +1 -1
  98. package/dist/misc/line-carousel.js +1 -1
  99. package/dist/misc/location/leafletMap.d.ts +8 -0
  100. package/dist/misc/location/leafletMap.d.ts.map +1 -0
  101. package/dist/misc/location/leafletMap.js +62 -0
  102. package/dist/misc/location/locationPicker.d.ts +5 -0
  103. package/dist/misc/location/locationPicker.d.ts.map +1 -0
  104. package/dist/misc/location/locationPicker.js +94 -0
  105. package/dist/misc/newsLetter.d.ts +1 -1
  106. package/dist/misc/newsLetter.d.ts.map +1 -1
  107. package/dist/misc/newsLetter.js +2 -2
  108. package/dist/misc/notification.js +2 -2
  109. package/dist/misc/pagination.js +1 -1
  110. package/dist/misc/password-eye.d.ts +2 -1
  111. package/dist/misc/password-eye.d.ts.map +1 -1
  112. package/dist/misc/password-eye.js +2 -1
  113. package/dist/misc/popover.d.ts.map +1 -1
  114. package/dist/misc/popover.js +2 -2
  115. package/dist/misc/progress.js +1 -1
  116. package/dist/misc/rental-tile.d.ts +6 -0
  117. package/dist/misc/rental-tile.d.ts.map +1 -0
  118. package/dist/misc/rental-tile.js +23 -0
  119. package/dist/misc/scroll-area.js +1 -1
  120. package/dist/misc/searchBar.d.ts +1 -1
  121. package/dist/misc/searchBar.d.ts.map +1 -1
  122. package/dist/misc/searchBar.js +1 -1
  123. package/dist/misc/select.d.ts.map +1 -1
  124. package/dist/misc/select.js +4 -4
  125. package/dist/misc/separator.js +1 -1
  126. package/dist/misc/share.d.ts +1 -1
  127. package/dist/misc/share.d.ts.map +1 -1
  128. package/dist/misc/share.js +1 -1
  129. package/dist/misc/sheet.js +1 -1
  130. package/dist/misc/sidebar.js +2 -2
  131. package/dist/misc/skeleton.js +1 -1
  132. package/dist/misc/slider.js +1 -1
  133. package/dist/misc/stateCard.d.ts +2 -2
  134. package/dist/misc/stateCard.d.ts.map +1 -1
  135. package/dist/misc/stateCard.js +2 -2
  136. package/dist/misc/switch.js +1 -1
  137. package/dist/misc/tabs.js +1 -1
  138. package/dist/misc/textarea.js +1 -1
  139. package/dist/misc/tile.d.ts +2 -1
  140. package/dist/misc/tile.d.ts.map +1 -1
  141. package/dist/misc/tile.js +12 -8
  142. package/dist/misc/tooltip.js +1 -1
  143. package/dist/profile/socialLink.d.ts +1 -1
  144. package/dist/profile/socialLink.d.ts.map +1 -1
  145. package/dist/profile/socialLink.js +19 -49
  146. package/package.json +10 -3
  147. package/dist/chat/dialogs/UserProfileDialog.d.ts +0 -10
  148. package/dist/chat/dialogs/UserProfileDialog.d.ts.map +0 -1
  149. package/dist/chat/dialogs/UserProfileDialog.js +0 -100
  150. package/dist/main/portfolio/temp-page.d.ts +0 -2
  151. package/dist/main/portfolio/temp-page.d.ts.map +0 -1
  152. package/dist/main/portfolio/temp-page.js +0 -102
  153. package/dist/misc/image-cropper.d.ts +0 -10
  154. package/dist/misc/image-cropper.d.ts.map +0 -1
  155. package/dist/misc/image-cropper.js +0 -44
@@ -3,33 +3,51 @@ import { Icon } from "@iconify/react";
3
3
  import { Mail } from "lucide-react";
4
4
  import Link from "next/link";
5
5
  import { Card } from "../misc/card";
6
- import NewsletterSubscribe from "../misc/newsLetter";
6
+ import { NewsletterSubscribe } from "../misc/newsLetter";
7
7
  import { Separator } from "../misc/separator";
8
8
  const footerItems = [
9
9
  {
10
- "title": "Company",
11
- "fields": {
10
+ title: "Company",
11
+ fields: {
12
12
  "About Us": "/about",
13
13
  "Contact": "/contact",
14
- "FAQs": "/#faq"
15
- }
14
+ "FAQs": "/#faq",
15
+ "Become a Partner": "/contact",
16
+ },
16
17
  },
17
18
  {
18
- "title": "Services",
19
- "fields": {
20
- "Opportunities": "/opportunities",
19
+ title: "Explore",
20
+ fields: {
21
+ "Stays": "/stays",
22
+ "Adventures": "/adventures",
23
+ "Rentals": "/rentals",
24
+ "Events": "/events",
25
+ // "Local Guides": "/guides",
21
26
  "Packages": "/packages",
22
- "Blogs": "/blogs"
23
- }
27
+ // "Store": "/store",
28
+ },
24
29
  },
25
30
  {
26
- "title": "Legal",
27
- "fields": {
31
+ title: "Opportunities",
32
+ fields: {
33
+ "Volunteering": "/opportunities?type=volunteer",
34
+ "Internships": "/opportunities?type=internship",
35
+ "Jobs": "/opportunities?type=job",
36
+ "Freelancing": "/opportunities?type=freelance",
37
+ "Find Companions": "/find-companion",
38
+ "Plan a Trip ✨": "/plan",
39
+ "Blogs": "/blogs",
40
+ },
41
+ },
42
+ {
43
+ title: "Legal",
44
+ fields: {
28
45
  "Privacy Policy": "/privacy",
29
46
  "Terms of Service": "/terms",
30
- "Security": "/security"
31
- }
32
- }
47
+ "Security": "/security",
48
+ "Refund Policy": "/refund",
49
+ },
50
+ },
33
51
  ];
34
52
  const Footer = ({ dark = false }) => {
35
53
  const theme = dark
@@ -38,6 +56,7 @@ const Footer = ({ dark = false }) => {
38
56
  const iconColor = dark
39
57
  ? "text-muted hover:text-white"
40
58
  : "text-muted-foreground hover:text-foreground";
41
- return (_jsxs("footer", { className: "h-full md:-mt-20", children: [_jsx("div", { className: "w-full px-6 my-5 md:translate-y-5/8 md:px-12 md:mb-5", children: _jsx(Card, { className: "relative bg-muted p-6 rounded-lg shadow-md mx-auto w-4/5 flex flex-col md:flex-row items-center justify-between gap-6 md:p-10", children: _jsxs("div", { className: "flex-1 text-center md:text-left", children: [_jsx("h3", { className: "text-2xl font-bold text-foreground", children: "Subscribe Newsletter" }), _jsx("p", { className: "text-sm text-muted-foreground mt-1", children: "Get inspired! Receive travel discounts, tips, and behind-the-scenes stories." }), _jsx(NewsletterSubscribe, {})] }) }) }), _jsxs("div", { className: `w-full border-t ${theme} pb-10 pt-10 sm:pt-30 md:pt-30`, children: [_jsxs("div", { className: "container mx-auto px-6 md:px-12 grid grid-cols-2 gap-10 md:grid-cols-5", children: [_jsxs("div", { className: "col-span-2", children: [_jsx("div", { className: `text-2xl font-semibold mb-4`, children: "TrippEaze" }), _jsx("p", { className: "text-sm mb-4", children: "Your trusted travel partner for seamless adventures." }), _jsxs("div", { className: "flex gap-4", children: [_jsx("a", { href: "https://www.instagram.com/trippeaze/", target: "_blank", rel: "noopener noreferrer", className: `transition-colors ${iconColor}`, children: _jsx(Icon, { icon: "mdi:instagram", className: "w-5 h-5" }) }), _jsx("a", { href: "https://wa.me/918482944029", target: "_blank", rel: "noopener noreferrer", className: `transition-colors ${iconColor}`, children: _jsx(Icon, { icon: "mdi:whatsapp", className: "w-5 h-5" }) }), _jsx("a", { href: "https://www.youtube.com/@TrippEaze", target: "_blank", rel: "noopener noreferrer", className: `transition-colors ${iconColor}`, children: _jsx(Icon, { icon: "mdi:youtube", className: "w-5 h-5" }) }), _jsx("a", { href: "https://www.facebook.com/profile.php?id=61576541488437", target: "_blank", rel: "noopener noreferrer", className: `transition-colors ${iconColor}`, children: _jsx(Icon, { icon: "mdi:facebook", className: "w-5 h-5" }) }), _jsx("a", { href: "mailto:contact@trippeaze.com", className: `transition-colors ${iconColor}`, children: _jsx(Mail, { className: "w-5 h-5" }) })] })] }), footerItems.map((section) => (_jsxs("div", { children: [_jsx("h4", { className: `text-lg font-medium ${iconColor} mb-3`, children: section.title }), _jsx("nav", { className: "flex flex-col gap-2 text-sm", children: Object.entries(section.fields).map(([label, href]) => (_jsx(Link, { href: href, className: "hover:text-foreground transition-colors", children: label }, label))) })] }, section.title)))] }), _jsxs("div", { className: "w-full mt-10", children: [_jsx(Separator, {}), _jsxs("p", { className: "text-xs text-muted-foreground text-center mt-4", children: ["\u00A9 ", new Date().getFullYear(), " TrippEaze. All rights reserved."] })] })] })] }));
59
+ return (_jsxs("footer", { className: "h-full md:-mt-20", children: [_jsx("div", { className: "w-full px-6 my-5 md:translate-y-5/8 md:px-12 md:mb-5", children: _jsx(Card, { className: "relative bg-muted p-6 rounded-lg shadow-md mx-auto w-4/5 flex flex-col md:flex-row items-center justify-between gap-6 md:p-10", children: _jsxs("div", { className: "flex-1 text-center md:text-left", children: [_jsx("h3", { className: "text-2xl font-bold text-foreground", children: "Subscribe Newsletter" }), _jsx("p", { className: "text-sm text-muted-foreground mt-1", children: "Get inspired! Receive travel discounts, tips, and behind-the-scenes stories." }), _jsx(NewsletterSubscribe, {})] }) }) }), _jsxs("div", { className: `w-full border-t ${theme} pb-10 pt-10 sm:pt-30 md:pt-30`, children: [_jsxs("div", { className: "container mx-auto px-6 md:px-12 grid grid-cols-2 gap-10 md:grid-cols-6", children: [_jsxs("div", { className: "col-span-2", children: [_jsx("div", { className: "text-2xl font-semibold mb-2", children: "TrippEaze" }), _jsx("p", { className: "text-sm mb-4 leading-relaxed", children: "Your trusted travel partner for seamless adventures, stays, experiences, and opportunities across India." }), _jsxs("div", { className: "flex gap-4 flex-wrap", children: [_jsx("a", { href: "https://www.instagram.com/trippeaze/", target: "_blank", rel: "noopener noreferrer", className: `transition-colors ${iconColor}`, children: _jsx(Icon, { icon: "mdi:instagram", className: "w-5 h-5" }) }), _jsx("a", { href: "https://wa.me/918482944029", target: "_blank", rel: "noopener noreferrer", className: `transition-colors ${iconColor}`, children: _jsx(Icon, { icon: "mdi:whatsapp", className: "w-5 h-5" }) }), _jsx("a", { href: "https://www.youtube.com/@TrippEaze", target: "_blank", rel: "noopener noreferrer", className: `transition-colors ${iconColor}`, children: _jsx(Icon, { icon: "mdi:youtube", className: "w-5 h-5" }) }), _jsx("a", { href: "https://www.facebook.com/profile.php?id=61576541488437", target: "_blank", rel: "noopener noreferrer", className: `transition-colors ${iconColor}`, children: _jsx(Icon, { icon: "mdi:facebook", className: "w-5 h-5" }) }), _jsx("a", { href: "https://www.linkedin.com/company/trippeaze", target: "_blank", rel: "noopener noreferrer", className: `transition-colors ${iconColor}`, children: _jsx(Icon, { icon: "mdi:linkedin", className: "w-5 h-5" }) }), _jsx("a", { href: "mailto:contact@trippeaze.com", className: `transition-colors ${iconColor}`, children: _jsx(Mail, { className: "w-5 h-5" }) })] })] }), footerItems.map((section) => (_jsxs("div", { children: [_jsx("h4", { className: `text-sm font-bold uppercase tracking-widest ${iconColor} mb-3`, children: section.title }), _jsx("nav", { className: "flex flex-col gap-2 text-sm", children: Object.entries(section.fields).map(([label, href]) => (_jsx(Link, { href: href, className: "hover:text-foreground transition-colors", children: label }, label))) })] }, section.title)))] }), _jsxs("div", { className: "w-full mt-10", children: [_jsx(Separator, {}), _jsxs("p", { className: "text-xs text-muted-foreground text-center mt-4", children: ["\u00A9 ", new Date().getFullYear(), " TrippEaze. All rights reserved. Made with \u2764\uFE0F in India."] })] })] })] }));
42
60
  };
61
+ export { Footer };
43
62
  export default Footer;
@@ -1,6 +1,6 @@
1
1
  interface NavbarProps {
2
2
  dark?: boolean;
3
3
  }
4
- export default function Navbar({ dark }: NavbarProps): import("react/jsx-runtime").JSX.Element;
5
- export {};
4
+ export declare function Navbar({ dark }: NavbarProps): import("react/jsx-runtime").JSX.Element;
5
+ export default Navbar;
6
6
  //# sourceMappingURL=navbar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"navbar.d.ts","sourceRoot":"","sources":["../../src/main/navbar.tsx"],"names":[],"mappings":"AAoBA,UAAU,WAAW;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,IAAY,EAAE,EAAE,WAAW,2CA6P3D"}
1
+ {"version":3,"file":"navbar.d.ts","sourceRoot":"","sources":["../../src/main/navbar.tsx"],"names":[],"mappings":"AAoBA,UAAU,WAAW;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAgB,MAAM,CAAC,EAAE,IAAY,EAAE,EAAE,WAAW,2CA8VnD;AAED,eAAe,MAAM,CAAC"}
@@ -2,13 +2,13 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Popover, PopoverContent, PopoverTrigger } from "@radix-ui/react-popover";
4
4
  import { Separator } from "@radix-ui/react-separator";
5
- import { logoutUser } from "@myrjfa/state/dist/lib/auth";
6
- import { isLoggedInAtom, userAtom, userLoadingAtom } from "@myrjfa/state/dist/lib/userAtom";
7
- import { opportunityTypeOptions } from "@myrjfa/state/dist/lib/models/opportunities/opportunity";
5
+ import { logoutUser } from "@myrjfa/state";
6
+ import { isLoggedInAtom, userAtom, userLoadingAtom } from "@myrjfa/state";
7
+ import { opportunityTypeOptions } from "@myrjfa/state";
8
8
  import { useAtom, useAtomValue } from "jotai";
9
- import { ChevronDown, Globe, Heart, LayoutDashboardIcon, Store, Target, Luggage, MessageCircle } from "lucide-react";
9
+ import { ChevronDown, Globe, Heart, LayoutDashboardIcon, Store, Target, Luggage, MessageCircle, Compass, Mountain, Users, Sparkles, BedDouble, Ticket, Car } from "lucide-react";
10
10
  import Link from "next/link";
11
- import { useRouter } from "next/navigation";
11
+ import { useRouter, usePathname } from "next/navigation";
12
12
  import { useEffect, useState } from "react";
13
13
  import { MobileNavItem } from "../header/mobile-nav-item";
14
14
  import { MobileNavbar } from "../header/mobile-navbar";
@@ -18,9 +18,10 @@ import { Avatar, AvatarFallback, AvatarImage } from "../misc/avatar";
18
18
  import { Button } from "../misc/button";
19
19
  import { Label } from "../misc/label";
20
20
  import { MobileNotificationBell, NotificationBell } from "../misc/notification";
21
- export default function Navbar({ dark = false }) {
21
+ export function Navbar({ dark = false }) {
22
22
  var _a, _b;
23
23
  const router = useRouter();
24
+ const pathname = usePathname();
24
25
  const [currentUser, setCurrentUser] = useAtom(userAtom);
25
26
  const loading = useAtomValue(userLoadingAtom);
26
27
  const [isLoggedIn, setIsLoggedIn] = useAtom(isLoggedInAtom);
@@ -51,20 +52,24 @@ export default function Navbar({ dark = false }) {
51
52
  else
52
53
  await showAlert((_a = response.message) !== null && _a !== void 0 ? _a : "Logged out successfully");
53
54
  };
54
- const navbarBg = scrolled || window.scrollY > 10
55
- ? dark
55
+ const darkHeroPaths = ['/stays', '/events', '/adventures', '/rentals'];
56
+ const isDarkHeroPage = darkHeroPaths.includes(pathname || '');
57
+ const isScrolled = scrolled || (typeof window !== 'undefined' && window.scrollY > 10);
58
+ const effectiveDark = (isDarkHeroPage && !isScrolled) ? true : dark;
59
+ const navbarBg = isScrolled
60
+ ? effectiveDark
56
61
  ? "bg-foreground/50 backdrop-blur-md"
57
- : "bg-background/50 backdrop-blur-md"
62
+ : "bg-background/90 backdrop-blur-md"
58
63
  : "bg-transparent";
59
- const navbarBorder = scrolled || window.scrollY > 10 ? "border-b border-border/30 shadow-lg" : "";
60
- const textColor = dark ? "text-gray-200" : "text-foreground";
61
- const navItemColor = dark
62
- ? "hover:text-white text-gray-250"
63
- : "hover:text-foreground text-gray-750";
64
- return (_jsx("header", { className: `fixed top-0 left-0 z-[100] mx-auto transition-all duration-300 w-full ${navbarBg} ${textColor} ${navbarBorder}`, children: _jsxs("div", { className: "mx-auto flex items-center justify-between gap-10 py-4 px-4 lg:px-8", children: [_jsxs(Link, { href: "/", className: "flex items-center gap-3", children: [_jsxs(Avatar, { className: "ml-2 -mr-4.5", children: [_jsx(AvatarImage, { src: "/images/logoicon.webp" }), _jsxs(AvatarFallback, { children: [(currentUser === null || currentUser === void 0 ? void 0 : currentUser.firstName.charAt(0)) || "D", (currentUser === null || currentUser === void 0 ? void 0 : currentUser.lastName.charAt(0)) || "P"] })] }), _jsx("span", { className: "font-heading text-xl font-bold", children: "rippeaze" })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("nav", { className: "hidden md:flex items-center gap-10 justify-end", children: [_jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { className: `flex items-center gap-1 text-sm font-medium cursor-pointer ${navItemColor}`, children: [_jsx(Target, { className: "h-5 w-5" }), _jsx("span", { children: "Opportunities" }), _jsx(ChevronDown, { className: "h-4 w-4" })] }) }), _jsx(PopoverContent, { className: "w-56 p-2 mt-3 bg-white rounded-lg shadow-lg border", align: "start", sideOffset: 5, children: _jsx("div", { className: "flex flex-col", children: opportunityTypeOptions.map((opt) => (_jsxs(Link, { href: `/opportunities?type=${opt.value}`, className: "px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-md flex flex-col", children: [_jsx("span", { className: "font-medium", children: opt.label }), _jsx("span", { className: "text-xs text-gray-500", children: opt.description })] }, opt.value))) }) })] }), _jsx(NavItem, { icon: _jsx(Luggage, { className: "h-5 w-5" }), label: "Packages", href: "/packages", className: navItemColor }), _jsx(NavItem, { icon: _jsx(Globe, { className: "h-5 w-5" }), label: "Blogs", href: "/blogs", className: navItemColor }), isLoggedIn && _jsx(NavItem, { icon: _jsx(MessageCircle, { className: "h-5 w-5" }), label: "Chat", href: "/chat", className: navItemColor, external: true }), currentUser ? _jsx(NavItem, { icon: _jsx(Store, { className: "h-5 w-5" }), label: "Become a Partner", href: "/contact", className: navItemColor })
64
+ const navbarBorder = isScrolled ? "border-b border-border/30 shadow-lg" : "";
65
+ const textColor = effectiveDark ? "text-white" : "text-foreground";
66
+ const navItemColor = effectiveDark
67
+ ? "text-white/90 hover:text-white"
68
+ : "text-muted-foreground hover:text-foreground";
69
+ return (_jsx("header", { className: `fixed top-0 left-0 z-[100] mx-auto transition-all duration-300 w-full ${navbarBg} ${textColor} ${navbarBorder}`, children: _jsxs("div", { className: "mx-auto flex items-center justify-between gap-10 py-4 px-4 lg:px-8", children: [_jsxs(Link, { href: "/", className: "flex items-center gap-3", children: [_jsxs(Avatar, { className: "ml-2 -mr-4.5", children: [_jsx(AvatarImage, { src: "/images/logoicon.webp" }), _jsxs(AvatarFallback, { children: [(currentUser === null || currentUser === void 0 ? void 0 : currentUser.firstName.charAt(0)) || "D", (currentUser === null || currentUser === void 0 ? void 0 : currentUser.lastName.charAt(0)) || "P"] })] }), _jsx("span", { className: "font-heading text-xl font-bold", children: "rippeaze" })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("nav", { className: "hidden md:flex items-center gap-10 justify-end", children: [_jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { className: `flex items-center gap-1 text-sm font-medium cursor-pointer ${navItemColor}`, children: [_jsx(Target, { className: "h-5 w-5" }), _jsx("span", { children: "Opportunities" }), _jsx(ChevronDown, { className: "h-4 w-4" })] }) }), _jsx(PopoverContent, { className: "w-56 p-2 mt-3 bg-white rounded-lg shadow-lg border", align: "start", sideOffset: 5, children: _jsx("div", { className: "flex flex-col", children: opportunityTypeOptions.map((opt) => (_jsxs(Link, { href: `/opportunities?type=${opt.value}`, className: "px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-md flex flex-col", children: [_jsx("span", { className: "font-medium", children: opt.label }), _jsx("span", { className: "text-xs text-gray-500", children: opt.description })] }, opt.value))) }) })] }), _jsx(NavItem, { icon: _jsx(Luggage, { className: "h-5 w-5" }), label: "Packages", href: "/packages", className: navItemColor }), _jsx(NavItem, { icon: _jsx(Globe, { className: "h-5 w-5" }), label: "Blogs", href: "/blogs", className: navItemColor }), _jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { className: `flex items-center gap-1 text-sm font-medium cursor-pointer ${navItemColor}`, children: [_jsx(Compass, { className: "h-5 w-5" }), _jsx("span", { children: "Explore" }), _jsx(ChevronDown, { className: "h-4 w-4" })] }) }), _jsx(PopoverContent, { className: "w-64 p-2 mt-3 bg-white rounded-xl shadow-xl border", align: "start", sideOffset: 5, children: _jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("p", { className: "text-[10px] font-black uppercase tracking-widest text-gray-400 px-3 pt-1 pb-0.5", children: "Travel" }), _jsxs(Link, { href: "/stays", className: "px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-lg flex items-center gap-3", children: [_jsx(BedDouble, { className: "h-4 w-4 text-primary flex-shrink-0" }), _jsxs("div", { children: [_jsx("p", { className: "font-semibold", children: "Stays" }), _jsx("p", { className: "text-xs text-gray-400", children: "Hotels, hostels & homestays" })] })] }), _jsxs(Link, { href: "/events", className: "px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-lg flex items-center gap-3", children: [_jsx(Ticket, { className: "h-4 w-4 text-primary flex-shrink-0" }), _jsxs("div", { children: [_jsx("p", { className: "font-semibold", children: "Events" }), _jsx("p", { className: "text-xs text-gray-400", children: "Concerts, workshops & more" })] })] }), _jsxs(Link, { href: "/adventures", className: "px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-lg flex items-center gap-3", children: [_jsx(Mountain, { className: "h-4 w-4 text-primary flex-shrink-0" }), _jsxs("div", { children: [_jsx("p", { className: "font-semibold", children: "Adventures" }), _jsx("p", { className: "text-xs text-gray-400", children: "Tours & thrilling activities" })] })] }), _jsxs(Link, { href: "/rentals", className: "px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-lg flex items-center gap-3", children: [_jsx(Car, { className: "h-4 w-4 text-primary flex-shrink-0" }), _jsxs("div", { children: [_jsx("p", { className: "font-semibold", children: "Rentals" }), _jsx("p", { className: "text-xs text-gray-400", children: "Bikes, cars & vehicles" })] })] }), _jsx("p", { className: "text-[10px] font-black uppercase tracking-widest text-gray-400 px-3 pt-2 pb-0.5", children: "For You" }), _jsxs(Link, { href: "/find-companion", className: "px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-lg flex items-center gap-3", children: [_jsx(Users, { className: "h-4 w-4 text-primary flex-shrink-0" }), _jsxs("div", { children: [_jsx("p", { className: "font-semibold", children: "Find Companions" }), _jsx("p", { className: "text-xs text-gray-400", children: "Connect with travel buddies" })] })] }), _jsxs(Link, { href: "/plan", className: "px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-lg flex items-center gap-3", children: [_jsx(Sparkles, { className: "h-4 w-4 text-primary flex-shrink-0" }), _jsxs("div", { children: [_jsx("p", { className: "font-semibold", children: "Plan a Trip" }), _jsx("p", { className: "text-xs text-gray-400", children: "AI-powered itinerary builder" })] })] })] }) })] }), isLoggedIn && _jsx(NavItem, { icon: _jsx(MessageCircle, { className: "h-5 w-5" }), label: "Chat", href: "/chat", className: navItemColor, external: true }), currentUser ? _jsx(NavItem, { icon: _jsx(Store, { className: "h-5 w-5" }), label: "Become a Partner", href: "/contact", className: navItemColor })
65
70
  : _jsx(NavItem, { icon: _jsx(Store, { className: "h-5 w-5" }), label: "Register as Business", href: "/auth/register?role=host", className: navItemColor }), isLoggedIn && _jsx(NotificationBell, { navItemColor: navItemColor })] }), _jsx("div", { className: "hidden md:flex items-center gap-2", children: _jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx(Button, { variant: "link", className: "flex w-full gap-1 cursor-pointer", children: _jsxs(Avatar, { className: "ml-5 mr-4.5", children: [_jsx(AvatarImage, { src: (_a = currentUser === null || currentUser === void 0 ? void 0 : currentUser.profilePic) !== null && _a !== void 0 ? _a : "/images/profile_placeholder.webp" }), _jsxs(AvatarFallback, { children: [(currentUser === null || currentUser === void 0 ? void 0 : currentUser.firstName.charAt(0)) || "D", (currentUser === null || currentUser === void 0 ? void 0 : currentUser.lastName.charAt(0)) || "P"] })] }) }) }), _jsx(PopoverContent, { className: `w-full p-0 mt-3 bg-${dark ? "primary" : "white"} rounded-lg shadow-lg`, align: "end", sideOffset: 5, children: _jsxs("div", { className: "py-2 w-full", children: [_jsxs("div", { className: "px-4 py-3 border-b w-full", children: [_jsx("p", { className: "text-sm font-medium", children: (currentUser === null || currentUser === void 0 ? void 0 : currentUser.username) || "Guest" }), _jsx("p", { className: "text-xs text-gray-500", children: (currentUser === null || currentUser === void 0 ? void 0 : currentUser.email) || "user@example.com" })] }), _jsxs("div", { className: "flex flex-col", children: [isLoggedIn ?
66
71
  _jsxs(Link, { href: `/profile/${(currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) || "user"}/${(currentUser === null || currentUser === void 0 ? void 0 : currentUser.username) || "Guest"}`, className: "w-full py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 flex items-center gap-2", children: [_jsxs(Avatar, { className: "w-4 h-4", children: [_jsx(AvatarImage, { src: (_b = currentUser === null || currentUser === void 0 ? void 0 : currentUser.profilePic) !== null && _b !== void 0 ? _b : "/images/profile_placeholder.webp" }), _jsx(AvatarFallback, { children: "U" })] }), "Profile"] }) :
67
- _jsxs(Button, { variant: "ghost", onClick: () => router.push('/auth/login?role=user'), className: "w-full py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 flex items-center gap-2 justify-start", children: [_jsxs(Avatar, { className: "w-4 h-4", children: [_jsx(AvatarImage, { src: "/images/profile_placeholder.webp" }), _jsx(AvatarFallback, { children: "U" })] }), "Login As Volunteer"] }), isLoggedIn && _jsxs(Link, { href: `/overview/${(currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) || 'user'}`, className: "w-full py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 flex items-center gap-2", children: [_jsx(LayoutDashboardIcon, { className: "h-4 w-4" }), "Dashboard"] }), isLoggedIn && ((currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) === "user" || (currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) == null) &&
72
+ _jsxs(Button, { variant: "ghost", onClick: () => router.push('/auth/login?role=user'), className: "w-full py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 flex items-center gap-2 justify-start", children: [_jsxs(Avatar, { className: "w-4 h-4", children: [_jsx(AvatarImage, { src: "/images/profile_placeholder.webp" }), _jsx(AvatarFallback, { children: "U" })] }), "Login As Volunteer"] }), isLoggedIn && _jsxs(Link, { href: (currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) === 'host' || (currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) === 'admin' ? `/dashboard/host/overview` : `/overview/${(currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) || 'user'}`, className: "w-full py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 flex items-center gap-2", children: [_jsx(LayoutDashboardIcon, { className: "h-4 w-4" }), "Dashboard"] }), isLoggedIn && ((currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) === "user" || (currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) == null) &&
68
73
  _jsxs(Link, { href: "/opportunities/favourites", className: "w-full py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 flex items-center gap-2", children: [_jsx(Heart, { className: "h-4 w-4" }), "Favourites"] }), (currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) === "host" ?
69
74
  _jsxs(Button, { variant: "ghost", onClick: async () => {
70
75
  await logout();
@@ -78,8 +83,8 @@ export default function Navbar({ dark = false }) {
78
83
  router.push('/auth/login?role=host');
79
84
  }, className: "w-full py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 flex items-center gap-2 justify-start", children: [_jsxs(Avatar, { className: "w-4 h-4", children: [_jsx(AvatarImage, { src: "/images/profile_placeholder.webp" }), _jsx(AvatarFallback, { children: "H" })] }), "Login As Business"] }), _jsx(Separator, { className: "my-1" }), isLoggedIn && _jsx(Button, { variant: "outline", className: "py-2 mx-2 text-sm text-gray-700 hover:bg-gray-100 justify-center cursor-pointer", onClick: () => {
80
85
  logout();
81
- }, children: "Sign out" })] })] }) })] }) })] }), _jsx(MobileNavbar, { children: _jsx("div", { className: `rounded-b-lg py-4 px-4 shadow-xl ${"bg-background"} ${textColor}`, children: _jsxs("nav", { className: "flex flex-col gap-1 pt-2", children: [_jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center gap-2 py-2 px-2 text-muted-foreground", children: [_jsx(Target, { className: "h-5 w-5" }), _jsx("span", { className: "text-sm font-medium", children: "Opportunities" })] }), _jsx("div", { className: "pl-8 flex flex-col gap-1", children: opportunityTypeOptions.map((opt) => (_jsx(Link, { href: `/opportunities?type=${opt.value}`, className: "py-1.5 px-2 text-sm text-gray-600 hover:text-foreground hover:bg-gray-100 rounded", children: opt.label }, opt.value))) })] }), _jsx(MobileNavItem, { icon: _jsx(Luggage, { className: "h-5 w-5" }), label: "Packages", href: "/packages" }), _jsx(MobileNavItem, { icon: _jsx(Globe, { className: "h-5 w-5" }), label: "Blogs", href: "/blogs" }), currentUser ? _jsx(MobileNavItem, { icon: _jsx(Store, { className: "h-5 w-5" }), label: "Become a Partner", href: "/contact" }) :
82
- _jsx(MobileNavItem, { icon: _jsx(Store, { className: "h-5 w-5" }), label: "Register as Business", href: "/auth/register?role=host" }), isLoggedIn && _jsx(MobileNotificationBell, {}), isLoggedIn && _jsx(MobileNavItem, { icon: _jsx(LayoutDashboardIcon, { className: "h-5 w-5" }), label: "Dashboard", href: `/overview/${(currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) || 'user'}`, className: "md:hidden" }), isLoggedIn && ((currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) === "user" || (currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) == null) &&
86
+ }, children: "Sign out" })] })] }) })] }) })] }), _jsx(MobileNavbar, { children: _jsx("div", { className: `rounded-b-lg py-4 px-4 shadow-xl ${"bg-background"} ${textColor}`, children: _jsxs("nav", { className: "flex flex-col gap-1 pt-2", children: [_jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center gap-2 py-2 px-2 text-muted-foreground", children: [_jsx(Target, { className: "h-5 w-5" }), _jsx("span", { className: "text-sm font-medium", children: "Opportunities" })] }), _jsx("div", { className: "pl-8 flex flex-col gap-1", children: opportunityTypeOptions.map((opt) => (_jsx(Link, { href: `/opportunities?type=${opt.value}`, className: "py-1.5 px-2 text-sm text-gray-600 hover:text-foreground hover:bg-gray-100 rounded", children: opt.label }, opt.value))) })] }), _jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center gap-2 py-2 px-2 text-muted-foreground", children: [_jsx(Compass, { className: "h-5 w-5" }), _jsx("span", { className: "text-sm font-medium", children: "Explore" })] }), _jsxs("div", { className: "pl-8 flex flex-col gap-1", children: [_jsx(Link, { href: "/stays", className: "py-1.5 px-2 text-sm text-gray-600 hover:text-foreground hover:bg-gray-100 rounded", children: "Stays" }), _jsx(Link, { href: "/events", className: "py-1.5 px-2 text-sm text-gray-600 hover:text-foreground hover:bg-gray-100 rounded", children: "Events" }), _jsx(Link, { href: "/adventures", className: "py-1.5 px-2 text-sm text-gray-600 hover:text-foreground hover:bg-gray-100 rounded", children: "Adventures" }), _jsx(Link, { href: "/rentals", className: "py-1.5 px-2 text-sm text-gray-600 hover:text-foreground hover:bg-gray-100 rounded", children: "Rentals" }), _jsx(Link, { href: "/find-companion", className: "py-1.5 px-2 text-sm text-gray-600 hover:text-foreground hover:bg-gray-100 rounded", children: "Find Companions" }), _jsx(Link, { href: "/plan", className: "py-1.5 px-2 text-sm text-gray-600 hover:text-foreground hover:bg-gray-100 rounded", children: "Plan a Trip \u2728" })] })] }), _jsx(MobileNavItem, { icon: _jsx(Luggage, { className: "h-5 w-5" }), label: "Packages", href: "/packages" }), _jsx(MobileNavItem, { icon: _jsx(Globe, { className: "h-5 w-5" }), label: "Blogs", href: "/blogs" }), currentUser ? _jsx(MobileNavItem, { icon: _jsx(Store, { className: "h-5 w-5" }), label: "Become a Partner", href: "/contact" }) :
87
+ _jsx(MobileNavItem, { icon: _jsx(Store, { className: "h-5 w-5" }), label: "Register as Business", href: "/auth/register?role=host" }), isLoggedIn && _jsx(MobileNotificationBell, {}), isLoggedIn && _jsx(MobileNavItem, { icon: _jsx(LayoutDashboardIcon, { className: "h-5 w-5" }), label: "Dashboard", href: (currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) === 'host' || (currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) === 'admin' ? `/dashboard/host/overview` : `/overview/${(currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) || 'user'}`, className: "md:hidden" }), isLoggedIn && ((currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) === "user" || (currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) == null) &&
83
88
  _jsx(MobileNavItem, { icon: _jsx(Heart, { className: "h-5 w-5" }), label: "Favourites", href: "/opportunities/favourites", className: "md:hidden" }), isLoggedIn ? _jsxs(Link, { href: `/profile/${(currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) || "user"}/${(currentUser === null || currentUser === void 0 ? void 0 : currentUser.username) || "Guest"}`, className: "flex w-full gap-1 cursor-pointer my-2", children: [_jsxs(Avatar, { className: "w-5 h-5 ml-2", children: [_jsx(AvatarImage, { src: (currentUser === null || currentUser === void 0 ? void 0 : currentUser.profilePic) || "/images/profile_placeholder.webp" }), _jsx(AvatarFallback, { children: "DP" })] }), _jsx(Label, { htmlFor: "username", className: "cursor-pointer text-muted-foreground hover:text-foreground", children: (currentUser === null || currentUser === void 0 ? void 0 : currentUser.username) || "Guest" })] }) :
84
89
  _jsxs(Link, { href: "/auth/login", className: "flex w-full gap-1 cursor-pointer my-2", children: [_jsxs(Avatar, { className: "w-5 h-5 ml-2", children: [_jsx(AvatarImage, { src: "/images/profile_placeholder.webp" }), _jsx(AvatarFallback, { children: "U" })] }), _jsx(Label, { htmlFor: "username", className: "cursor-pointer text-muted-foreground hover:text-foreground", children: "Login As Volunteer" })] }), (currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) === "host" ?
85
90
  _jsxs(Button, { variant: "ghost", onClick: async () => {
@@ -96,3 +101,4 @@ export default function Navbar({ dark = false }) {
96
101
  logout();
97
102
  }, children: "Sign out" })] }) }) })] }) }));
98
103
  }
104
+ export default Navbar;
@@ -1,4 +1,4 @@
1
- export default function PaginationBar({ currentPage, totalPages }: {
1
+ export declare function PaginationBar({ currentPage, totalPages }: {
2
2
  currentPage: number;
3
3
  totalPages: number;
4
4
  }): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"paginationBar.d.ts","sourceRoot":"","sources":["../../src/main/paginationBar.tsx"],"names":[],"mappings":"AAkEA,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAClC,WAAW,EACX,UAAU,EACb,EAAE;IACC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACtB,2CASA"}
1
+ {"version":3,"file":"paginationBar.d.ts","sourceRoot":"","sources":["../../src/main/paginationBar.tsx"],"names":[],"mappings":"AAkEA,wBAAgB,aAAa,CAAC,EAC1B,WAAW,EACX,UAAU,EACb,EAAE;IACC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACtB,2CASA"}
@@ -23,6 +23,6 @@ function PaginationBarComponent({ currentPage, totalPages }) {
23
23
  return (_jsx(PaginationItem, { children: _jsx(PaginationLink, { href: createPageURL(page), isActive: page === currentPage, children: page }) }, page));
24
24
  }), currentPage < totalPages && (_jsx(PaginationItem, { children: _jsx(PaginationNext, { href: createPageURL(currentPage + 1) }) }))] }) }));
25
25
  }
26
- export default function PaginationBar({ currentPage, totalPages }) {
26
+ export function PaginationBar({ currentPage, totalPages }) {
27
27
  return (_jsx(Suspense, { fallback: _jsx("div", { className: "w-full h-screen flex items-center justify-center", children: "Loading..." }), children: _jsx(PaginationBarComponent, { currentPage: currentPage, totalPages: totalPages }) }));
28
28
  }
@@ -1,4 +1,4 @@
1
- import { PortfolioItem } from '@myrjfa/state/dist/lib/models/portfolio';
1
+ import { PortfolioItem } from '@myrjfa/state';
2
2
  import { MouseEventHandler } from 'react';
3
3
  export declare function PortfolioItemComponent({ item, onClick }: {
4
4
  item: PortfolioItem;
@@ -1 +1 @@
1
- {"version":3,"file":"portfolioItem.d.ts","sourceRoot":"","sources":["../../../src/main/portfolio/portfolioItem.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1C,wBAAgB,sBAAsB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IACtD,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,iBAAiB,CAAC,cAAc,CAAC,GAAG,SAAS,CAAA;CACzD,2CA2BA"}
1
+ {"version":3,"file":"portfolioItem.d.ts","sourceRoot":"","sources":["../../../src/main/portfolio/portfolioItem.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1C,wBAAgB,sBAAsB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IACtD,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,iBAAiB,CAAC,cAAc,CAAC,GAAG,SAAS,CAAA;CACzD,2CA2BA"}
@@ -1,4 +1,4 @@
1
- import { PortfolioItem } from '@myrjfa/state/dist/lib/models/portfolio';
1
+ import { PortfolioItem } from '@myrjfa/state';
2
2
  export declare function PortfolioPopUp({ items, currentIndex, firstName, profilePic }: {
3
3
  items: PortfolioItem[];
4
4
  currentIndex: number;
@@ -1 +1 @@
1
- {"version":3,"file":"portfolioPopup.d.ts","sourceRoot":"","sources":["../../../src/main/portfolio/portfolioPopup.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAIxE,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE;IAC3E,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB,2CA0LA"}
1
+ {"version":3,"file":"portfolioPopup.d.ts","sourceRoot":"","sources":["../../../src/main/portfolio/portfolioPopup.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAI9C,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE;IAC3E,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB,2CA0LA"}
@@ -5,7 +5,7 @@ import { useState, useRef } from 'react';
5
5
  import Image from 'next/image';
6
6
  import { Button } from '../../misc/button';
7
7
  import { ExternalLink, ChevronLeft, ChevronRight } from 'lucide-react';
8
- import ShareButton from '../../misc/share';
8
+ import { ShareButton } from '../../misc/share';
9
9
  import { Avatar, AvatarFallback, AvatarImage } from '../../misc/avatar';
10
10
  export function PortfolioPopUp({ items, currentIndex, firstName, profilePic }) {
11
11
  const [currentItem, setCurrentItem] = useState(items.at(currentIndex));
@@ -1,4 +1,4 @@
1
- import { Review, reviewTargetType } from "@myrjfa/state/dist/lib/models/review";
1
+ import { Review, reviewTargetType } from "@myrjfa/state";
2
2
  interface ReviewPageProps {
3
3
  title?: string;
4
4
  subtitle?: string;
@@ -8,6 +8,6 @@ interface ReviewPageProps {
8
8
  initialReviews?: Review[];
9
9
  reviewCategory?: "review" | "comment";
10
10
  }
11
- export default function ReviewPage({ title, subtitle, targetId, targetType, editable, initialReviews, reviewCategory, }: ReviewPageProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function ReviewPage({ title, subtitle, targetId, targetType, editable, initialReviews, reviewCategory, }: ReviewPageProps): import("react/jsx-runtime").JSX.Element;
12
12
  export {};
13
13
  //# sourceMappingURL=review-page.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"review-page.d.ts","sourceRoot":"","sources":["../../src/main/review-page.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAqB,gBAAgB,EAAc,MAAM,sCAAsC,CAAC;AAoD/G,UAAU,eAAe;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CACzC;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAC/B,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,UAA0B,EAC1B,QAAgB,EAChB,cAAmB,EACnB,cAAyB,GAC5B,EAAE,eAAe,2CAwQjB"}
1
+ {"version":3,"file":"review-page.d.ts","sourceRoot":"","sources":["../../src/main/review-page.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAqB,gBAAgB,EAAc,MAAM,eAAe,CAAC;AAoDxF,UAAU,eAAe;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CACzC;AAED,wBAAgB,UAAU,CAAC,EACvB,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,UAA0B,EAC1B,QAAgB,EAChB,cAAmB,EACnB,cAAyB,GAC5B,EAAE,eAAe,2CAsNjB"}
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { zodResolver } from "@hookform/resolvers/zod";
4
- import { addReview, deleteReview, editReview, getReviewsById } from "@myrjfa/state/dist/lib/actions";
5
- import { reviewBasicSchema } from "@myrjfa/state/dist/lib/models/review";
6
- import { userAtom, userLoadingAtom } from "@myrjfa/state/dist/lib/userAtom";
7
- import { formatDate } from "@myrjfa/state/dist/lib/utils";
4
+ import { addReview, deleteReview, editReview, getReviewsById } from "@myrjfa/state";
5
+ import { reviewBasicSchema } from "@myrjfa/state";
6
+ import { userAtom, userLoadingAtom } from "@myrjfa/state";
7
+ import { formatDate } from "@myrjfa/state";
8
8
  import { useAtomValue } from "jotai";
9
9
  import { StarIcon } from "lucide-react";
10
10
  import { useEffect, useState } from "react";
@@ -19,21 +19,17 @@ import { Textarea } from "../misc/textarea";
19
19
  const StarRating = ({ value, onChange, onHover, size = 8, interactive = false }) => {
20
20
  return (_jsx("div", { className: "flex space-x-1", children: [1, 2, 3, 4, 5].map((star) => (_jsx("button", { type: "button", onClick: () => interactive && (onChange === null || onChange === void 0 ? void 0 : onChange(star)), onMouseEnter: () => interactive && (onHover === null || onHover === void 0 ? void 0 : onHover(star)), onMouseLeave: () => interactive && (onHover === null || onHover === void 0 ? void 0 : onHover(null)), className: `focus:outline-none text-${size}xl`, children: _jsx(StarIcon, { className: `h-${size} w-${size} ${star <= value ? 'text-yellow-400 fill-yellow-400' : 'text-gray-300'}` }) }, star))) }));
21
21
  };
22
- export default function ReviewPage({ title, subtitle, targetId, targetType = "opportunity", editable = false, initialReviews = [], reviewCategory = "review", }) {
22
+ export function ReviewPage({ title, subtitle, targetId, targetType = "opportunity", editable = false, initialReviews = [], reviewCategory = "review", }) {
23
23
  var _a;
24
24
  const user = useAtomValue(userAtom);
25
25
  const loading = useAtomValue(userLoadingAtom);
26
- const [review, setReview] = useState(Array.isArray(initialReviews) ? ((_a = initialReviews.find((r) => r.reviewerUsername === (user === null || user === void 0 ? void 0 : user.username))) !== null && _a !== void 0 ? _a : null) : null);
26
+ const [review, setReview] = useState((_a = initialReviews.find((r) => r.reviewerUsername === (user === null || user === void 0 ? void 0 : user.username))) !== null && _a !== void 0 ? _a : null);
27
27
  const [reviews, setReviews] = useState(initialReviews);
28
28
  const [displayReviews, setDisplayReviews] = useState([]);
29
- const [page, setPage] = useState(1);
30
- const [hasMore, setHasMore] = useState(false);
31
- const [totalCount, setTotalCount] = useState(Array.isArray(initialReviews) ? initialReviews.length : 0);
32
29
  const [hoveredRating, setHoveredRating] = useState(null);
33
30
  const [isSubmitting, setIsSubmitting] = useState(false);
34
31
  const [isDeleting, setIsDeleting] = useState(false);
35
32
  const [isFormInitialized, setIsFormInitialized] = useState(false);
36
- const [isLoadingMore, setIsLoadingMore] = useState(false);
37
33
  const form = useForm({
38
34
  resolver: zodResolver(reviewBasicSchema),
39
35
  defaultValues: {
@@ -46,25 +42,17 @@ export default function ReviewPage({ title, subtitle, targetId, targetType = "op
46
42
  if (loading)
47
43
  return;
48
44
  const fetchData = async () => {
49
- // Cast to any to bypass stale type definitions in @myrjfa/state/dist
50
- const response = await getReviewsById(targetId, targetType, { page: 1, limit: 10 });
45
+ const response = await getReviewsById(targetId, targetType);
51
46
  if (response === null || response === void 0 ? void 0 : response.error) {
52
47
  console.error("Error: " + response.error);
53
48
  }
54
- else if (Array.isArray(response.reviews)) {
49
+ else {
55
50
  setReviews(response.reviews);
56
- setTotalCount(response.totalCount);
57
- setHasMore(response.hasMore);
58
- setPage(1);
59
51
  const myReview = response.reviews.find((r) => r.reviewerUsername === (user === null || user === void 0 ? void 0 : user.username));
60
52
  setReview(myReview !== null && myReview !== void 0 ? myReview : null);
61
53
  form.reset({ rating: reviewCategory === "comment" ? 1 : ((myReview === null || myReview === void 0 ? void 0 : myReview.rating) || 0), comment: (myReview === null || myReview === void 0 ? void 0 : myReview.comment) || "" });
62
54
  setIsFormInitialized(true);
63
55
  }
64
- else {
65
- setReviews([]);
66
- setIsFormInitialized(true);
67
- }
68
56
  };
69
57
  if (!initialReviews || initialReviews.length === 0) {
70
58
  fetchData();
@@ -73,27 +61,6 @@ export default function ReviewPage({ title, subtitle, targetId, targetType = "op
73
61
  setIsFormInitialized(true); // Initialize immediately if already present
74
62
  }
75
63
  }, [targetId, targetType, user, loading]);
76
- const handleLoadMore = async () => {
77
- if (isLoadingMore || !hasMore)
78
- return;
79
- setIsLoadingMore(true);
80
- try {
81
- const nextPage = page + 1;
82
- // Cast to any to bypass stale type definitions in @myrjfa/state/dist
83
- const response = await getReviewsById(targetId, targetType, { page: nextPage, limit: 10 });
84
- if (response === null || response === void 0 ? void 0 : response.error) {
85
- console.error("Error: " + response.error);
86
- }
87
- else if (Array.isArray(response.reviews)) {
88
- setReviews([...reviews, ...response.reviews]);
89
- setPage(nextPage);
90
- setHasMore(response.hasMore);
91
- }
92
- }
93
- finally {
94
- setIsLoadingMore(false);
95
- }
96
- };
97
64
  useEffect(() => {
98
65
  if (review) {
99
66
  form.reset({
@@ -104,12 +71,7 @@ export default function ReviewPage({ title, subtitle, targetId, targetType = "op
104
71
  setIsFormInitialized(true);
105
72
  }, [review]);
106
73
  useEffect(() => {
107
- if (Array.isArray(reviews)) {
108
- setDisplayReviews(reviews.filter((r) => r.comment));
109
- }
110
- else {
111
- setDisplayReviews([]);
112
- }
74
+ setDisplayReviews(reviews.filter((r) => r.comment));
113
75
  }, [reviews]);
114
76
  const onSubmit = async (data) => {
115
77
  setIsSubmitting(true);
@@ -129,7 +91,6 @@ export default function ReviewPage({ title, subtitle, targetId, targetType = "op
129
91
  if (newReview) {
130
92
  setReviews([newReview, ...reviews.filter((r) => r._id !== newReview._id)]);
131
93
  setReview(newReview);
132
- setTotalCount(prev => review ? prev : prev + 1);
133
94
  form.reset({ rating: reviewCategory === "comment" ? 1 : newReview.rating, comment: newReview.comment || "" });
134
95
  }
135
96
  }
@@ -160,7 +121,6 @@ export default function ReviewPage({ title, subtitle, targetId, targetType = "op
160
121
  else {
161
122
  setReviews(reviews.filter((r) => r._id !== review._id));
162
123
  setReview(null);
163
- setTotalCount(prev => Math.max(0, prev - 1));
164
124
  form.reset({ rating: reviewCategory === "comment" ? 1 : 0, comment: "" });
165
125
  }
166
126
  }
@@ -175,5 +135,5 @@ export default function ReviewPage({ title, subtitle, targetId, targetType = "op
175
135
  if (loading || !isFormInitialized)
176
136
  return _jsx(Card, { className: "w-full h-50 flex items-center justify-center", children: "Loading Reviews..." });
177
137
  const averageRating = reviews.length ? reviews.reduce((acc, r) => acc + r.rating, 0) / reviews.length : 0;
178
- return (_jsxs(Card, { className: "w-full mb-10", children: [(title || subtitle) && _jsxs(CardHeader, { children: [title && _jsx(CardTitle, { children: title }), subtitle && _jsx(CardDescription, { children: subtitle })] }), _jsxs(CardContent, { children: [editable && _jsx(Form, { ...form, children: _jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-6 pb-4", children: [_jsx(FormField, { control: form.control, name: "rating", render: ({ field }) => (_jsxs(FormItem, { className: reviewCategory === "comment" ? "hidden" : "", children: [_jsx(FormLabel, { children: "Your Rating" }), _jsx(FormControl, { children: _jsx(StarRating, { value: ratingValue, onChange: (val) => field.onChange(val), onHover: setHoveredRating, interactive: true }) }), _jsx(FormMessage, {})] })) }), _jsx(FormField, { control: form.control, name: "comment", render: ({ field }) => (_jsxs(FormItem, { children: [_jsxs(FormLabel, { children: ["Your ", reviewCategory == "review" ? "Review" : "Comment"] }), _jsx(FormControl, { children: _jsx(Textarea, { placeholder: `Share your ${reviewCategory == "review" ? "experience" : "thoughts"}...`, className: "resize-none", rows: 4, ...field }) }), _jsx(FormMessage, {})] })) }), form.formState.errors.root && (_jsx("p", { className: "text-sm font-medium text-destructive", children: form.formState.errors.root.message })), _jsxs("div", { className: "flex flex-wrap gap-2", children: [_jsx(Button, { type: "submit", disabled: isSubmitting, className: "w-full sm:w-auto", children: isSubmitting ? (reviewCategory == "review" ? "Submitting... Review" : "Posting... Comment") : (reviewCategory == "review" ? "Submit Review" : "Post Comment") }), review && _jsx(Button, { type: "button", variant: "destructive", className: "w-full sm:w-auto", disabled: isDeleting, onClick: handleDeleteReview, children: isDeleting ? "Deleting..." : reviewCategory == "review" ? "Delete Review" : "Delete Comment" })] })] }) }), displayReviews.length > 0 ? (_jsxs("div", { className: "mt-4", children: [_jsxs("div", { className: "flex justify-between items-center mb-4", children: [_jsxs("h3", { className: "text-lg font-medium", children: [reviewCategory == "review" ? "Reviews" : "Comments", " (", totalCount || displayReviews.length, ")"] }), reviewCategory == "review" && _jsxs("div", { className: "flex items-center", children: [_jsx("span", { className: "font-medium mr-2", children: averageRating.toFixed(1) }), _jsx(StarRating, { value: Math.round(averageRating), size: 5 })] })] }), _jsx(Separator, { className: "my-4" }), _jsx("div", { className: "space-y-6", children: displayReviews.map((review) => (_jsxs("div", { className: "pb-4", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsxs("div", { className: "flex items-center", children: [_jsxs(Avatar, { className: "h-10 w-10 mr-3", children: [_jsx(AvatarImage, { src: review.reviewerPic || "/images/profile_placeholder.webp", alt: review.reviewerUsername }), _jsx(AvatarFallback, { children: review.reviewerUsername.charAt(0) })] }), _jsxs("div", { children: [_jsx("h4", { className: "font-medium", children: review.reviewerUsername }), _jsx("p", { className: "text-sm text-gray-500", children: formatDate(review.createdAt) })] })] }), reviewCategory == "review" && _jsx(StarRating, { value: review.rating, size: 4 })] }), _jsx("p", { className: "mt-2 text-gray-600 whitespace-pre-line", children: review.comment }), _jsx(Separator, { className: "mt-4" })] }, review._id))) }), hasMore && (_jsx("div", { className: "flex justify-center mt-6", children: _jsx(Button, { variant: "outline", onClick: handleLoadMore, disabled: isLoadingMore, className: "w-full sm:w-auto", children: isLoadingMore ? "Loading more..." : "View More" }) }))] })) : (_jsxs("div", { className: "text-center justify-center p-5", children: ["No ", reviewCategory == "comment" ? "comments" : "reviews", " yet"] }))] }), displayReviews.length > 0 && _jsx(CardFooter, { children: _jsx("p", { className: "text-sm text-gray-500", children: "Thank you for sharing your feedback. All reviews are moderated and typically appear within 24-48 hours." }) })] }));
138
+ return (_jsxs(Card, { className: "w-full mb-10", children: [(title || subtitle) && _jsxs(CardHeader, { children: [title && _jsx(CardTitle, { children: title }), subtitle && _jsx(CardDescription, { children: subtitle })] }), _jsxs(CardContent, { children: [editable && _jsx(Form, { ...form, children: _jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-6 pb-4", children: [_jsx(FormField, { control: form.control, name: "rating", render: ({ field }) => (_jsxs(FormItem, { className: reviewCategory === "comment" ? "hidden" : "", children: [_jsx(FormLabel, { children: "Your Rating" }), _jsx(FormControl, { children: _jsx(StarRating, { value: ratingValue, onChange: (val) => field.onChange(val), onHover: setHoveredRating, interactive: true }) }), _jsx(FormMessage, {})] })) }), _jsx(FormField, { control: form.control, name: "comment", render: ({ field }) => (_jsxs(FormItem, { children: [_jsxs(FormLabel, { children: ["Your ", reviewCategory == "review" ? "Review" : "Comment"] }), _jsx(FormControl, { children: _jsx(Textarea, { placeholder: `Share your ${reviewCategory == "review" ? "experience" : "thoughts"}...`, className: "resize-none", rows: 4, ...field }) }), _jsx(FormMessage, {})] })) }), form.formState.errors.root && (_jsx("p", { className: "text-sm font-medium text-destructive", children: form.formState.errors.root.message })), _jsxs("div", { className: "flex flex-wrap gap-2", children: [_jsx(Button, { type: "submit", disabled: isSubmitting, className: "w-full sm:w-auto", children: isSubmitting ? (reviewCategory == "review" ? "Submitting... Review" : "Posting... Comment") : (reviewCategory == "review" ? "Submit Review" : "Post Comment") }), review && _jsx(Button, { type: "button", variant: "destructive", className: "w-full sm:w-auto", disabled: isDeleting, onClick: handleDeleteReview, children: isDeleting ? "Deleting..." : reviewCategory == "review" ? "Delete Review" : "Delete Comment" })] })] }) }), displayReviews.length > 0 ? (_jsxs("div", { className: "mt-4", children: [_jsxs("div", { className: "flex justify-between items-center mb-4", children: [_jsxs("h3", { className: "text-lg font-medium", children: [reviewCategory == "review" ? "Reviews" : "Comments", " (", displayReviews.length, ")"] }), reviewCategory == "review" && _jsxs("div", { className: "flex items-center", children: [_jsx("span", { className: "font-medium mr-2", children: averageRating.toFixed(1) }), _jsx(StarRating, { value: Math.round(averageRating), size: 5 })] })] }), _jsx(Separator, { className: "my-4" }), _jsx("div", { className: "space-y-6", children: displayReviews.map((review) => (_jsxs("div", { className: "pb-4", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsxs("div", { className: "flex items-center", children: [_jsxs(Avatar, { className: "h-10 w-10 mr-3", children: [_jsx(AvatarImage, { src: review.reviewerPic || "/images/profile_placeholder.webp", alt: review.reviewerUsername }), _jsx(AvatarFallback, { children: review.reviewerUsername.charAt(0) })] }), _jsxs("div", { children: [_jsx("h4", { className: "font-medium", children: review.reviewerUsername }), _jsx("p", { className: "text-sm text-gray-500", children: formatDate(review.createdAt) })] })] }), reviewCategory == "review" && _jsx(StarRating, { value: review.rating, size: 4 })] }), _jsx("p", { className: "mt-2 text-gray-600 whitespace-pre-line", children: review.comment }), _jsx(Separator, { className: "mt-4" })] }, review._id))) })] })) : (_jsxs("div", { className: "text-center justify-center p-5", children: ["No ", reviewCategory == "comment" ? "comments" : "reviews", " yet"] }))] }), displayReviews.length > 0 && _jsx(CardFooter, { children: _jsx("p", { className: "text-sm text-gray-500", children: "Thank you for sharing your feedback. All reviews are moderated and typically appear within 24-48 hours." }) })] }));
179
139
  }
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as AccordionPrimitive from "@radix-ui/react-accordion";
4
- import { cn } from "@myrjfa/state/dist/lib/utils";
4
+ import { cn } from "@myrjfa/state";
5
5
  import { ChevronDownIcon } from "lucide-react";
6
6
  function Accordion({ ...props }) {
7
7
  return _jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
4
- import { cn } from "@myrjfa/state/dist/lib/utils";
4
+ import { cn } from "@myrjfa/state";
5
5
  import { buttonVariants } from "./button";
6
6
  function AlertDialog({ ...props }) {
7
7
  return _jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from "@myrjfa/state/dist/lib/utils";
2
+ import { cn } from "@myrjfa/state";
3
3
  import { cva } from "class-variance-authority";
4
4
  const alertVariants = cva("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", {
5
5
  variants: {
@@ -2,7 +2,7 @@
2
2
  'use client';
3
3
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
4
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
5
- import { cn } from '@myrjfa/state/dist/lib/utils';
5
+ import { cn } from '@myrjfa/state';
6
6
  import { Forward, Save, X } from 'lucide-react';
7
7
  import { useEffect, useState } from 'react';
8
8
  import { createRoot } from 'react-dom/client';
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
4
- import { cn } from "@myrjfa/state/dist/lib/utils";
4
+ import { cn } from "@myrjfa/state";
5
5
  function Avatar({ className, ...props }) {
6
6
  return (_jsx(AvatarPrimitive.Root, { "data-slot": "avatar", className: cn("relative flex size-8 shrink-0 overflow-hidden rounded-full", className), ...props }));
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Slot } from "@radix-ui/react-slot";
3
- import { cn } from "@myrjfa/state/dist/lib/utils";
3
+ import { cn } from "@myrjfa/state";
4
4
  import { cva } from "class-variance-authority";
5
5
  const badgeVariants = cva("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", {
6
6
  variants: {
@@ -1,10 +1,10 @@
1
- import { type VariantProps } from "class-variance-authority";
2
- declare const buttonVariants: (props?: ({
3
- variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
4
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
5
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
6
- declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
7
- asChild?: boolean;
8
- }): import("react/jsx-runtime").JSX.Element;
9
- export { Button, buttonVariants };
1
+ import { type VariantProps } from "class-variance-authority";
2
+ declare const buttonVariants: (props?: ({
3
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
4
+ size?: "icon" | "default" | "sm" | "lg" | null | undefined;
5
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
6
+ declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
7
+ asChild?: boolean;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export { Button, buttonVariants };
10
10
  //# sourceMappingURL=button.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Slot } from "@radix-ui/react-slot";
3
- import { cn } from "@myrjfa/state/dist/lib/utils";
3
+ import { cn } from "@myrjfa/state";
4
4
  import { cva } from "class-variance-authority";
5
5
  const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
6
6
  variants: {
package/dist/misc/card.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from "@myrjfa/state/dist/lib/utils";
2
+ import { cn } from "@myrjfa/state";
3
3
  function Card({ className, ...props }) {
4
4
  return (_jsx("div", { className: cn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", className), ...props }, "card"));
5
5
  }
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { cn } from "@myrjfa/state/dist/lib/utils";
3
+ import { cn } from "@myrjfa/state";
4
4
  import useEmblaCarousel from "embla-carousel-react";
5
5
  import { ArrowLeft, ArrowRight } from "lucide-react";
6
6
  import React from "react";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
4
- import { cn } from "@myrjfa/state/dist/lib/utils";
4
+ import { cn } from "@myrjfa/state";
5
5
  import { CheckIcon } from "lucide-react";
6
6
  function Checkbox({ className, ...props }) {
7
7
  return (_jsx(CheckboxPrimitive.Root, { className: cn("peer border-input data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current transition-none", children: _jsx(CheckIcon, { className: "size-3.5" }) }, "checkbox-indicator") }, "checkbox"));
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { cn } from "@myrjfa/state/dist/lib/utils";
3
+ import { cn } from "@myrjfa/state";
4
4
  import { Command as CommandPrimitive } from "cmdk";
5
5
  import { SearchIcon } from "lucide-react";
6
6
  import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "./dialog";
@@ -14,7 +14,7 @@ function CommandInput({ className, ...props }) {
14
14
  return (_jsxs("div", { "data-slot": "command-input-wrapper", className: "flex h-9 items-center gap-2 border-b px-3", children: [_jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }), _jsx(CommandPrimitive.Input, { "data-slot": "command-input", className: cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className), ...props })] }));
15
15
  }
16
16
  function CommandList({ className, ...props }) {
17
- return (_jsx(CommandPrimitive.List, { "data-slot": "command-list", className: cn("max-h-[350px] scroll-py-1 overflow-x-hidden overflow-y-auto touch-pan-y z-[300]", className), ...props }));
17
+ return (_jsx(CommandPrimitive.List, { "data-slot": "command-list", className: cn("max-h-[250px] scroll-py-1 overflow-x-hidden overflow-y-auto", className), ...props }));
18
18
  }
19
19
  function CommandEmpty({ ...props }) {
20
20
  return (_jsx(CommandPrimitive.Empty, { "data-slot": "command-empty", className: "py-6 text-center text-sm", ...props }));