@betterinternship/components 2.4.2 → 2.4.4

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.
@@ -1,3 +1,4 @@
1
+ import type { ReactNode } from 'react';
1
2
  import type { LucideIcon } from 'lucide-react';
2
3
  export interface NavItem {
3
4
  href: string;
@@ -16,6 +17,12 @@ interface AppHeaderProps {
16
17
  profileHref?: string;
17
18
  userAvatarUrl?: string | null;
18
19
  accountNav?: NavItem[];
20
+ /** Overrides the hardcoded "Partners" brand text. */
21
+ brand?: string;
22
+ /** Overrides the hardcoded "/betterinternship-logo.png" logo path. */
23
+ logoPath?: string;
24
+ /** Extra controls rendered next to the nav (desktop) and inside the drawer (mobile). */
25
+ actions?: ReactNode;
19
26
  }
20
- export declare function AppHeader({ portal, homeHref, nav, userPrimary, logout: logoutFn, postLogoutPath, profileHref, userAvatarUrl, accountNav, }: AppHeaderProps): import("react/jsx-runtime").JSX.Element;
27
+ export declare function AppHeader({ portal, homeHref, nav, userPrimary, userSecondary, logout: logoutFn, postLogoutPath, profileHref, userAvatarUrl, accountNav, brand, logoPath, actions, }: AppHeaderProps): import("react/jsx-runtime").JSX.Element;
21
28
  export {};
@@ -26,7 +26,7 @@ function labelIcon(label) {
26
26
  };
27
27
  return map[label] ?? Handshake;
28
28
  }
29
- function AppHeader({ portal, homeHref, nav, userPrimary, logout: logoutFn, postLogoutPath, profileHref, userAvatarUrl, accountNav = [], }) {
29
+ function AppHeader({ portal, homeHref, nav, userPrimary, userSecondary, logout: logoutFn, postLogoutPath, profileHref, userAvatarUrl, accountNav = [], brand = 'Partners', logoPath = '/betterinternship-logo.png', actions, }) {
30
30
  const pathname = usePathname() ?? '';
31
31
  const router = useRouter();
32
32
  const queryClient = useQueryClient();
@@ -48,18 +48,18 @@ function AppHeader({ portal, homeHref, nav, userPrimary, logout: logoutFn, postL
48
48
  },
49
49
  });
50
50
  const isActive = (href) => pathname === href || pathname.startsWith(`${href}/`);
51
- return (jsxs("header", { className: "bg-background/70 sticky top-0 z-40 border-b py-2 backdrop-blur", children: [jsxs("div", { className: "mx-auto flex h-16 items-center justify-between gap-2 px-4 sm:px-6 lg:px-8", children: [jsx(Link, { href: homeHref, className: "block flex-shrink-0 border-none text-black! outline-none focus:outline-none", children: jsxs("div", { className: "flex items-center gap-2", children: [jsx(Image, { src: "/betterinternship-logo.png", alt: "", width: 25, height: 25, className: "flex-none" }), jsxs("div", { className: "flex items-center", children: [jsx("h1", { className: "font-display text-lg font-bold text-gray-900", children: "Partners" }), jsx("span", { className: "mx-2.5 text-gray-300", "aria-hidden": "true", children: "|" }), jsx("span", { className: "font-display text-gray-500", children: portal === 'Platform Admin' ? portal : `${portal} Portal` })] })] }) }), jsxs("div", { className: "hidden flex-1 items-center justify-end gap-2 md:flex", children: [nav.map((item) => {
51
+ return (jsxs("header", { className: "bg-background/70 sticky top-0 z-40 border-b py-2 backdrop-blur", children: [jsxs("div", { className: "mx-auto flex h-16 items-center justify-between gap-2 px-4 sm:px-6 lg:px-8", children: [jsx(Link, { href: homeHref, className: "block flex-shrink-0 border-none text-black! outline-none focus:outline-none", children: jsxs("div", { className: "flex items-center gap-2", children: [jsx(Image, { src: logoPath, alt: "", width: 25, height: 25, className: "flex-none" }), jsxs("div", { className: "flex items-center", children: [jsx("h1", { className: "font-display text-lg font-bold text-gray-900", children: brand }), jsx("span", { className: "mx-2.5 text-gray-300", "aria-hidden": "true", children: "|" }), jsx("span", { className: "font-display text-gray-500", children: portal === 'Platform Admin' ? portal : `${portal} Portal` })] })] }) }), jsxs("div", { className: "hidden flex-1 items-center justify-end gap-2 md:flex", children: [nav.map((item) => {
52
52
  const Icon = item.icon ?? labelIcon(item.label);
53
53
  return (jsxs(Button, { variant: "ghost", className: cn('relative h-auto min-w-0 flex-col items-center justify-center gap-1 rounded-[0.33em] px-3 py-1', isActive(item.href)
54
54
  ? 'text-primary'
55
55
  : 'opacity-80 hover:bg-gray-100 hover:opacity-100'), onClick: () => router.push(item.href), children: [jsx(Icon, { className: "!h-6 !w-6", strokeWidth: 1.7 }), jsx("span", { className: "text-xs", children: item.label }), !!item.badge && (jsx("span", { className: "absolute -top-0.5 right-5.5 inline-flex h-4 w-4 items-center justify-center rounded-full bg-amber-400 text-[10px] font-bold leading-none text-amber-900", children: item.badge }))] }, item.href));
56
- }), jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsxs(Button, { variant: "ghost", className: cn('group h-auto w-20 flex-col items-center justify-center gap-1 rounded-[0.33em] px-2 py-1', (profileHref && isActive(profileHref)) ||
56
+ }), actions, jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsxs(Button, { variant: "ghost", className: cn('group h-auto w-20 flex-col items-center justify-center gap-1 rounded-[0.33em] px-2 py-1', (profileHref && isActive(profileHref)) ||
57
57
  accountNav.some((item) => isActive(item.href))
58
58
  ? 'text-primary'
59
- : 'opacity-80 hover:bg-gray-100 hover:opacity-100'), children: [jsx("div", { className: "flex h-6 w-6 items-center justify-center overflow-hidden rounded-full bg-gray-100", children: userAvatarUrl ? (jsx("img", { src: userAvatarUrl, alt: "", className: "h-full w-full object-contain" })) : (jsx(UserRound, { className: "h-5 w-5 text-gray-500" })) }), jsxs("div", { className: "flex items-center gap-0.5", children: [jsx("span", { className: "text-xs", children: "Account" }), jsx(ChevronDown, { className: "!h-3 !w-3 transition-transform group-data-[state=open]:rotate-180" })] })] }) }), jsxs(DropdownMenuContent, { align: "end", className: "w-max min-w-44", children: [userPrimary && (jsx("div", { className: "px-2 py-1.5", children: jsx("div", { className: "text-center text-sm font-medium", children: userPrimary }) })), jsx(DropdownMenuSeparator, {}), profileHref && (jsx(DropdownMenuItem, { asChild: true, children: jsxs(Link, { href: profileHref, children: [jsx(UserRound, { className: "h-4 w-4" }), "Profile"] }) })), accountNav.map((item) => {
59
+ : 'opacity-80 hover:bg-gray-100 hover:opacity-100'), children: [jsx("div", { className: "flex h-6 w-6 items-center justify-center overflow-hidden rounded-full bg-gray-100", children: userAvatarUrl ? (jsx("img", { src: userAvatarUrl, alt: "", className: "h-full w-full object-contain" })) : (jsx(UserRound, { className: "h-5 w-5 text-gray-500" })) }), jsxs("div", { className: "flex items-center gap-0.5", children: [jsx("span", { className: "text-xs", children: "Account" }), jsx(ChevronDown, { className: "!h-3 !w-3 transition-transform group-data-[state=open]:rotate-180" })] })] }) }), jsxs(DropdownMenuContent, { align: "end", className: "w-max min-w-44", children: [userPrimary && (jsxs("div", { className: "px-2 py-1.5", children: [jsx("div", { className: "text-center text-sm font-medium", children: userPrimary }), userSecondary && (jsx("div", { className: "text-muted-foreground text-center text-xs", children: userSecondary }))] })), jsx(DropdownMenuSeparator, {}), profileHref && (jsx(DropdownMenuItem, { asChild: true, children: jsxs(Link, { href: profileHref, children: [jsx(UserRound, { className: "h-4 w-4" }), "Profile"] }) })), accountNav.map((item) => {
60
60
  const Icon = item.icon ?? labelIcon(item.label);
61
61
  return (jsx(DropdownMenuItem, { asChild: true, children: jsxs(Link, { href: item.href, children: [jsx(Icon, { className: "h-4 w-4" }), item.label] }) }, item.href));
62
- }), (profileHref || accountNav.length > 0) && (jsx(DropdownMenuSeparator, {})), jsxs(DropdownMenuItem, { variant: "destructive", disabled: logout.isPending, onClick: () => logout.mutate(), children: [jsx(LogOut, { className: "h-4 w-4" }), logout.isPending ? 'Logging out...' : 'Sign Out'] })] })] })] }), jsx("button", { type: "button", "aria-label": isDrawerOpen ? 'Close menu' : 'Open menu', className: "inline-flex h-10 w-10 items-center justify-center rounded-md border border-gray-300 hover:bg-gray-50 md:hidden", onClick: () => setIsDrawerOpen(!isDrawerOpen), children: isDrawerOpen ? (jsx(X, { className: "h-5 w-5" })) : (jsx(Menu, { className: "h-5 w-5" })) })] }), isDrawerOpen && (jsx("div", { className: "fixed inset-0 z-[30] duration-200 md:hidden", onClick: () => setIsDrawerOpen(false) })), jsx("div", { className: cn('fixed top-0 right-0 z-[31] h-[100svh] w-full max-w-[92%] border-l border-gray-200 bg-white shadow-xl sm:max-w-[420px] md:hidden', 'transition-transform duration-250 ease-out', isDrawerOpen ? 'translate-x-0' : 'translate-x-full'), role: "dialog", "aria-modal": "true", "aria-label": "Mobile menu", children: jsxs("div", { className: "flex h-full flex-col", children: [jsxs("div", { className: "mt-1 flex items-center justify-between border-b px-4 py-3", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx(Image, { src: "/betterinternship-logo.png", alt: "", width: 25, height: 25, className: "h-6 w-6 rounded object-contain" }), jsx("span", { className: "text-sm font-semibold", children: "Partners" }), jsx("span", { className: "rounded border border-gray-200 bg-gray-50 px-1 py-0 text-[10px] font-medium text-gray-400 leading-none", children: portal })] }), jsx("button", { type: "button", "aria-label": "Close menu", className: "inline-flex h-9 w-9 items-center justify-center rounded-md transition-colors hover:bg-gray-100", onClick: () => setIsDrawerOpen(false), children: jsx(X, { className: "h-5 w-5" }) })] }), jsxs("div", { className: "flex-1 overflow-y-auto p-4", children: [userPrimary && (jsxs("div", { className: "flex items-center gap-2 pb-2", children: [jsx(UserRound, { className: "h-5 w-5 text-gray-500" }), jsx("span", { className: "text-sm font-semibold text-gray-900", children: userPrimary })] })), jsx(Separator, { className: "my-4" }), jsx("nav", { className: "space-y-1", children: nav.map((item) => {
62
+ }), (profileHref || accountNav.length > 0) && (jsx(DropdownMenuSeparator, {})), jsxs(DropdownMenuItem, { variant: "destructive", disabled: logout.isPending, onClick: () => logout.mutate(), children: [jsx(LogOut, { className: "h-4 w-4" }), logout.isPending ? 'Logging out...' : 'Sign Out'] })] })] })] }), jsx("button", { type: "button", "aria-label": isDrawerOpen ? 'Close menu' : 'Open menu', className: "inline-flex h-10 w-10 items-center justify-center rounded-md border border-gray-300 hover:bg-gray-50 md:hidden", onClick: () => setIsDrawerOpen(!isDrawerOpen), children: isDrawerOpen ? (jsx(X, { className: "h-5 w-5" })) : (jsx(Menu, { className: "h-5 w-5" })) })] }), isDrawerOpen && (jsx("div", { className: "fixed inset-0 z-[30] duration-200 md:hidden", onClick: () => setIsDrawerOpen(false) })), jsx("div", { className: cn('fixed top-0 right-0 z-[31] h-[100svh] w-full max-w-[92%] border-l border-gray-200 bg-white shadow-xl sm:max-w-[420px] md:hidden', 'transition-transform duration-250 ease-out', isDrawerOpen ? 'translate-x-0' : 'translate-x-full'), role: "dialog", "aria-modal": "true", "aria-label": "Mobile menu", children: jsxs("div", { className: "flex h-full flex-col", children: [jsxs("div", { className: "mt-1 flex items-center justify-between border-b px-4 py-3", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx(Image, { src: logoPath, alt: "", width: 25, height: 25, className: "h-6 w-6 rounded object-contain" }), jsx("span", { className: "text-sm font-semibold", children: brand }), jsx("span", { className: "rounded border border-gray-200 bg-gray-50 px-1 py-0 text-[10px] font-medium text-gray-400 leading-none", children: portal })] }), jsx("button", { type: "button", "aria-label": "Close menu", className: "inline-flex h-9 w-9 items-center justify-center rounded-md transition-colors hover:bg-gray-100", onClick: () => setIsDrawerOpen(false), children: jsx(X, { className: "h-5 w-5" }) })] }), jsxs("div", { className: "flex-1 overflow-y-auto p-4", children: [userPrimary && (jsxs("div", { className: "flex items-center gap-2 pb-2", children: [jsx(UserRound, { className: "h-5 w-5 text-gray-500" }), jsx("span", { className: "text-sm font-semibold text-gray-900", children: userPrimary })] })), jsx(Separator, { className: "my-4" }), actions && jsx("div", { className: "mb-2", children: actions }), jsx("nav", { className: "space-y-1", children: nav.map((item) => {
63
63
  const Icon = item.icon ?? labelIcon(item.label);
64
64
  return (jsx(Link, { href: item.href, className: "block w-full", children: jsxs("button", { className: "flex w-full items-center justify-between rounded-md border border-transparent px-3 py-2 text-sm transition-colors hover:border-gray-200 hover:bg-gray-50", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx(Icon, { className: "h-4 w-4 text-gray-500" }), jsx("span", { children: item.label }), !!item.badge && (jsx("span", { className: "inline-flex h-4 w-4 items-center justify-center rounded-full bg-amber-400 text-[10px] font-bold leading-none text-amber-900", children: "!" }))] }), jsx(ChevronRight, { className: "h-4 w-4 text-gray-300" })] }) }, item.href));
65
65
  }) })] }), jsxs("div", { className: "mt-auto border-t px-4 py-3 space-y-1", children: [profileHref && (jsx(Link, { href: profileHref, className: "block w-full", children: jsxs("button", { className: "flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors hover:bg-gray-50", children: [jsx(UserRound, { className: "h-4 w-4" }), "Profile"] }) })), accountNav.map((item) => {
@@ -1 +1 @@
1
- {"version":3,"file":"app-header.js","sources":["../../../src/components/ui/app-header.tsx"],"sourcesContent":["import Link from 'next/link';\nimport Image from 'next/image';\nimport { usePathname, useRouter } from 'next/navigation';\nimport { useMutation, useQueryClient } from '@tanstack/react-query';\nimport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n} from '@/components/ui/dropdown-menu';\nimport { Button } from '@/components/ui/button';\nimport { Separator } from '@/components/ui/separator';\nimport { cn } from '@/utils';\nimport {\n LogOut,\n Menu,\n X,\n UserRound,\n ChevronDown,\n ChevronRight,\n Handshake,\n Mail,\n History,\n FileText,\n Users,\n LayoutDashboard,\n FileSignature,\n GraduationCap,\n Building2,\n SearchCheck,\n} from 'lucide-react';\nimport { useState, useEffect } from 'react';\nimport type { LucideIcon } from 'lucide-react';\n\nexport interface NavItem {\n href: string;\n label: string;\n badge?: number;\n icon?: LucideIcon;\n}\n\ninterface AppHeaderProps {\n portal: string;\n homeHref: string;\n nav: NavItem[];\n userPrimary?: string;\n userSecondary?: string;\n logout: () => Promise<unknown>;\n postLogoutPath: string;\n profileHref?: string;\n userAvatarUrl?: string | null;\n accountNav?: NavItem[];\n}\n\nfunction labelIcon(label: string): LucideIcon {\n const map: Record<string, LucideIcon> = {\n Partners: Handshake,\n Invites: Mail,\n Invitations: Mail,\n Accounts: Users,\n 'Activity Log': History,\n 'MOA Templates': FileText,\n Universities: GraduationCap,\n Companies: Building2,\n 'Company Reviews': SearchCheck,\n 'Request MOA': FileSignature,\n Dashboard: LayoutDashboard,\n };\n return map[label] ?? Handshake;\n}\n\nexport function AppHeader({\n portal,\n homeHref,\n nav,\n userPrimary,\n logout: logoutFn,\n postLogoutPath,\n profileHref,\n userAvatarUrl,\n accountNav = [],\n}: AppHeaderProps) {\n const pathname = usePathname() ?? '';\n const router = useRouter();\n const queryClient = useQueryClient();\n const [isDrawerOpen, setIsDrawerOpen] = useState(false);\n\n useEffect(() => {\n setIsDrawerOpen(false);\n }, [pathname]);\n\n useEffect(() => {\n document.body.style.overflow = isDrawerOpen ? 'hidden' : '';\n return () => {\n document.body.style.overflow = '';\n };\n }, [isDrawerOpen]);\n\n const logout = useMutation({\n mutationFn: logoutFn,\n onSettled: () => {\n queryClient.clear();\n router.replace(postLogoutPath);\n },\n });\n\n const isActive = (href: string) =>\n pathname === href || pathname.startsWith(`${href}/`);\n\n return (\n <header className=\"bg-background/70 sticky top-0 z-40 border-b py-2 backdrop-blur\">\n <div className=\"mx-auto flex h-16 items-center justify-between gap-2 px-4 sm:px-6 lg:px-8\">\n {/* Brand */}\n <Link\n href={homeHref}\n className=\"block flex-shrink-0 border-none text-black! outline-none focus:outline-none\"\n >\n <div className=\"flex items-center gap-2\">\n <Image\n src=\"/betterinternship-logo.png\"\n alt=\"\"\n width={25}\n height={25}\n className=\"flex-none\"\n />\n <div className=\"flex items-center\">\n <h1 className=\"font-display text-lg font-bold text-gray-900\">\n Partners\n </h1>\n <span className=\"mx-2.5 text-gray-300\" aria-hidden=\"true\">\n |\n </span>\n <span className=\"font-display text-gray-500\">\n {portal === 'Platform Admin' ? portal : `${portal} Portal`}\n </span>\n </div>\n </div>\n </Link>\n\n {/* Desktop right side: nav buttons + user */}\n <div className=\"hidden flex-1 items-center justify-end gap-2 md:flex\">\n {nav.map((item) => {\n const Icon = item.icon ?? labelIcon(item.label);\n return (\n <Button\n key={item.href}\n variant=\"ghost\"\n className={cn(\n 'relative h-auto min-w-0 flex-col items-center justify-center gap-1 rounded-[0.33em] px-3 py-1',\n isActive(item.href)\n ? 'text-primary'\n : 'opacity-80 hover:bg-gray-100 hover:opacity-100',\n )}\n onClick={() => router.push(item.href)}\n >\n <Icon className=\"!h-6 !w-6\" strokeWidth={1.7} />\n <span className=\"text-xs\">{item.label}</span>\n {!!item.badge && (\n <span className=\"absolute -top-0.5 right-5.5 inline-flex h-4 w-4 items-center justify-center rounded-full bg-amber-400 text-[10px] font-bold leading-none text-amber-900\">\n {item.badge}\n </span>\n )}\n </Button>\n );\n })}\n\n {/* User dropdown */}\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"ghost\"\n className={cn(\n 'group h-auto w-20 flex-col items-center justify-center gap-1 rounded-[0.33em] px-2 py-1',\n (profileHref && isActive(profileHref)) ||\n accountNav.some((item) => isActive(item.href))\n ? 'text-primary'\n : 'opacity-80 hover:bg-gray-100 hover:opacity-100',\n )}\n >\n <div className=\"flex h-6 w-6 items-center justify-center overflow-hidden rounded-full bg-gray-100\">\n {userAvatarUrl ? (\n <img\n src={userAvatarUrl}\n alt=\"\"\n className=\"h-full w-full object-contain\"\n />\n ) : (\n <UserRound className=\"h-5 w-5 text-gray-500\" />\n )}\n </div>\n <div className=\"flex items-center gap-0.5\">\n <span className=\"text-xs\">Account</span>\n <ChevronDown className=\"!h-3 !w-3 transition-transform group-data-[state=open]:rotate-180\" />\n </div>\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-max min-w-44\">\n {userPrimary && (\n <div className=\"px-2 py-1.5\">\n <div className=\"text-center text-sm font-medium\">\n {userPrimary}\n </div>\n </div>\n )}\n <DropdownMenuSeparator />\n {profileHref && (\n <DropdownMenuItem asChild>\n <Link href={profileHref}>\n <UserRound className=\"h-4 w-4\" />\n Profile\n </Link>\n </DropdownMenuItem>\n )}\n {accountNav.map((item) => {\n const Icon = item.icon ?? labelIcon(item.label);\n return (\n <DropdownMenuItem key={item.href} asChild>\n <Link href={item.href}>\n <Icon className=\"h-4 w-4\" />\n {item.label}\n </Link>\n </DropdownMenuItem>\n );\n })}\n {(profileHref || accountNav.length > 0) && (\n <DropdownMenuSeparator />\n )}\n <DropdownMenuItem\n variant=\"destructive\"\n disabled={logout.isPending}\n onClick={() => logout.mutate()}\n >\n <LogOut className=\"h-4 w-4\" />\n {logout.isPending ? 'Logging out...' : 'Sign Out'}\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n\n {/* Mobile hamburger */}\n <button\n type=\"button\"\n aria-label={isDrawerOpen ? 'Close menu' : 'Open menu'}\n className=\"inline-flex h-10 w-10 items-center justify-center rounded-md border border-gray-300 hover:bg-gray-50 md:hidden\"\n onClick={() => setIsDrawerOpen(!isDrawerOpen)}\n >\n {isDrawerOpen ? (\n <X className=\"h-5 w-5\" />\n ) : (\n <Menu className=\"h-5 w-5\" />\n )}\n </button>\n </div>\n\n {/* Mobile right drawer */}\n {isDrawerOpen && (\n <div\n className=\"fixed inset-0 z-[30] duration-200 md:hidden\"\n onClick={() => setIsDrawerOpen(false)}\n />\n )}\n\n <div\n className={cn(\n 'fixed top-0 right-0 z-[31] h-[100svh] w-full max-w-[92%] border-l border-gray-200 bg-white shadow-xl sm:max-w-[420px] md:hidden',\n 'transition-transform duration-250 ease-out',\n isDrawerOpen ? 'translate-x-0' : 'translate-x-full',\n )}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Mobile menu\"\n >\n <div className=\"flex h-full flex-col\">\n <div className=\"mt-1 flex items-center justify-between border-b px-4 py-3\">\n <div className=\"flex items-center gap-2\">\n <Image\n src=\"/betterinternship-logo.png\"\n alt=\"\"\n width={25}\n height={25}\n className=\"h-6 w-6 rounded object-contain\"\n />\n <span className=\"text-sm font-semibold\">Partners</span>\n <span className=\"rounded border border-gray-200 bg-gray-50 px-1 py-0 text-[10px] font-medium text-gray-400 leading-none\">\n {portal}\n </span>\n </div>\n <button\n type=\"button\"\n aria-label=\"Close menu\"\n className=\"inline-flex h-9 w-9 items-center justify-center rounded-md transition-colors hover:bg-gray-100\"\n onClick={() => setIsDrawerOpen(false)}\n >\n <X className=\"h-5 w-5\" />\n </button>\n </div>\n\n <div className=\"flex-1 overflow-y-auto p-4\">\n {userPrimary && (\n <div className=\"flex items-center gap-2 pb-2\">\n <UserRound className=\"h-5 w-5 text-gray-500\" />\n <span className=\"text-sm font-semibold text-gray-900\">\n {userPrimary}\n </span>\n </div>\n )}\n\n <Separator className=\"my-4\" />\n\n <nav className=\"space-y-1\">\n {nav.map((item) => {\n const Icon = item.icon ?? labelIcon(item.label);\n return (\n <Link\n key={item.href}\n href={item.href}\n className=\"block w-full\"\n >\n <button className=\"flex w-full items-center justify-between rounded-md border border-transparent px-3 py-2 text-sm transition-colors hover:border-gray-200 hover:bg-gray-50\">\n <div className=\"flex items-center gap-2\">\n <Icon className=\"h-4 w-4 text-gray-500\" />\n <span>{item.label}</span>\n {!!item.badge && (\n <span className=\"inline-flex h-4 w-4 items-center justify-center rounded-full bg-amber-400 text-[10px] font-bold leading-none text-amber-900\">\n !\n </span>\n )}\n </div>\n <ChevronRight className=\"h-4 w-4 text-gray-300\" />\n </button>\n </Link>\n );\n })}\n </nav>\n </div>\n\n <div className=\"mt-auto border-t px-4 py-3 space-y-1\">\n {profileHref && (\n <Link href={profileHref} className=\"block w-full\">\n <button className=\"flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors hover:bg-gray-50\">\n <UserRound className=\"h-4 w-4\" />\n Profile\n </button>\n </Link>\n )}\n {accountNav.map((item) => {\n const Icon = item.icon ?? labelIcon(item.label);\n return (\n <Link key={item.href} href={item.href} className=\"block w-full\">\n <button className=\"flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors hover:bg-gray-50\">\n <Icon className=\"h-4 w-4\" />\n {item.label}\n </button>\n </Link>\n );\n })}\n <button\n onClick={() => logout.mutate()}\n disabled={logout.isPending}\n className=\"flex w-full items-center justify-center gap-2 rounded-md py-2 font-medium text-red-600 transition-colors hover:bg-red-50\"\n >\n <Log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,CAAC,SAAS,GAAG,gBAAgB,GAAG,UAAU,CAAA,EAAA,CAC1C,IACL,CAAA,EAAA,CACF,EAAA,CACF,CAAA,EAAA,CACC;AAEb;;;;"}
1
+ {"version":3,"file":"app-header.js","sources":["../../../src/components/ui/app-header.tsx"],"sourcesContent":["import Link from 'next/link';\nimport Image from 'next/image';\nimport { usePathname, useRouter } from 'next/navigation';\nimport { useMutation, useQueryClient } from '@tanstack/react-query';\nimport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n} from '@/components/ui/dropdown-menu';\nimport { Button } from '@/components/ui/button';\nimport { Separator } from '@/components/ui/separator';\nimport { cn } from '@/utils';\nimport {\n LogOut,\n Menu,\n X,\n UserRound,\n ChevronDown,\n ChevronRight,\n Handshake,\n Mail,\n History,\n FileText,\n Users,\n LayoutDashboard,\n FileSignature,\n GraduationCap,\n Building2,\n SearchCheck,\n} from 'lucide-react';\nimport { useState, useEffect } from 'react';\nimport type { ReactNode } from 'react';\nimport type { LucideIcon } from 'lucide-react';\n\nexport interface NavItem {\n href: string;\n label: string;\n badge?: number;\n icon?: LucideIcon;\n}\n\ninterface AppHeaderProps {\n portal: string;\n homeHref: string;\n nav: NavItem[];\n userPrimary?: string;\n userSecondary?: string;\n logout: () => Promise<unknown>;\n postLogoutPath: string;\n profileHref?: string;\n userAvatarUrl?: string | null;\n accountNav?: NavItem[];\n /** Overrides the hardcoded \"Partners\" brand text. */\n brand?: string;\n /** Overrides the hardcoded \"/betterinternship-logo.png\" logo path. */\n logoPath?: string;\n /** Extra controls rendered next to the nav (desktop) and inside the drawer (mobile). */\n actions?: ReactNode;\n}\n\nfunction labelIcon(label: string): LucideIcon {\n const map: Record<string, LucideIcon> = {\n Partners: Handshake,\n Invites: Mail,\n Invitations: Mail,\n Accounts: Users,\n 'Activity Log': History,\n 'MOA Templates': FileText,\n Universities: GraduationCap,\n Companies: Building2,\n 'Company Reviews': SearchCheck,\n 'Request MOA': FileSignature,\n Dashboard: LayoutDashboard,\n };\n return map[label] ?? Handshake;\n}\n\nexport function AppHeader({\n portal,\n homeHref,\n nav,\n userPrimary,\n userSecondary,\n logout: logoutFn,\n postLogoutPath,\n profileHref,\n userAvatarUrl,\n accountNav = [],\n brand = 'Partners',\n logoPath = '/betterinternship-logo.png',\n actions,\n}: AppHeaderProps) {\n const pathname = usePathname() ?? '';\n const router = useRouter();\n const queryClient = useQueryClient();\n const [isDrawerOpen, setIsDrawerOpen] = useState(false);\n\n useEffect(() => {\n setIsDrawerOpen(false);\n }, [pathname]);\n\n useEffect(() => {\n document.body.style.overflow = isDrawerOpen ? 'hidden' : '';\n return () => {\n document.body.style.overflow = '';\n };\n }, [isDrawerOpen]);\n\n const logout = useMutation({\n mutationFn: logoutFn,\n onSettled: () => {\n queryClient.clear();\n router.replace(postLogoutPath);\n },\n });\n\n const isActive = (href: string) =>\n pathname === href || pathname.startsWith(`${href}/`);\n\n return (\n <header className=\"bg-background/70 sticky top-0 z-40 border-b py-2 backdrop-blur\">\n <div className=\"mx-auto flex h-16 items-center justify-between gap-2 px-4 sm:px-6 lg:px-8\">\n {/* Brand */}\n <Link\n href={homeHref}\n className=\"block flex-shrink-0 border-none text-black! outline-none focus:outline-none\"\n >\n <div className=\"flex items-center gap-2\">\n <Image\n src={logoPath}\n alt=\"\"\n width={25}\n height={25}\n className=\"flex-none\"\n />\n <div className=\"flex items-center\">\n <h1 className=\"font-display text-lg font-bold text-gray-900\">\n {brand}\n </h1>\n <span className=\"mx-2.5 text-gray-300\" aria-hidden=\"true\">\n |\n </span>\n <span className=\"font-display text-gray-500\">\n {portal === 'Platform Admin' ? portal : `${portal} Portal`}\n </span>\n </div>\n </div>\n </Link>\n\n {/* Desktop right side: nav buttons + user */}\n <div className=\"hidden flex-1 items-center justify-end gap-2 md:flex\">\n {nav.map((item) => {\n const Icon = item.icon ?? labelIcon(item.label);\n return (\n <Button\n key={item.href}\n variant=\"ghost\"\n className={cn(\n 'relative h-auto min-w-0 flex-col items-center justify-center gap-1 rounded-[0.33em] px-3 py-1',\n isActive(item.href)\n ? 'text-primary'\n : 'opacity-80 hover:bg-gray-100 hover:opacity-100',\n )}\n onClick={() => router.push(item.href)}\n >\n <Icon className=\"!h-6 !w-6\" strokeWidth={1.7} />\n <span className=\"text-xs\">{item.label}</span>\n {!!item.badge && (\n <span className=\"absolute -top-0.5 right-5.5 inline-flex h-4 w-4 items-center justify-center rounded-full bg-amber-400 text-[10px] font-bold leading-none text-amber-900\">\n {item.badge}\n </span>\n )}\n </Button>\n );\n })}\n\n {actions}\n\n {/* User dropdown */}\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"ghost\"\n className={cn(\n 'group h-auto w-20 flex-col items-center justify-center gap-1 rounded-[0.33em] px-2 py-1',\n (profileHref && isActive(profileHref)) ||\n accountNav.some((item) => isActive(item.href))\n ? 'text-primary'\n : 'opacity-80 hover:bg-gray-100 hover:opacity-100',\n )}\n >\n <div className=\"flex h-6 w-6 items-center justify-center overflow-hidden rounded-full bg-gray-100\">\n {userAvatarUrl ? (\n <img\n src={userAvatarUrl}\n alt=\"\"\n className=\"h-full w-full object-contain\"\n />\n ) : (\n <UserRound className=\"h-5 w-5 text-gray-500\" />\n )}\n </div>\n <div className=\"flex items-center gap-0.5\">\n <span className=\"text-xs\">Account</span>\n <ChevronDown className=\"!h-3 !w-3 transition-transform group-data-[state=open]:rotate-180\" />\n </div>\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-max min-w-44\">\n {userPrimary && (\n <div className=\"px-2 py-1.5\">\n <div className=\"text-center text-sm font-medium\">\n {userPrimary}\n </div>\n {userSecondary && (\n <div className=\"text-muted-foreground text-center text-xs\">\n {userSecondary}\n </div>\n )}\n </div>\n )}\n <DropdownMenuSeparator />\n {profileHref && (\n <DropdownMenuItem asChild>\n <Link href={profileHref}>\n <UserRound className=\"h-4 w-4\" />\n Profile\n </Link>\n </DropdownMenuItem>\n )}\n {accountNav.map((item) => {\n const Icon = item.icon ?? labelIcon(item.label);\n return (\n <DropdownMenuItem key={item.href} asChild>\n <Link href={item.href}>\n <Icon className=\"h-4 w-4\" />\n {item.label}\n </Link>\n </DropdownMenuItem>\n );\n })}\n {(profileHref || accountNav.length > 0) && (\n <DropdownMenuSeparator />\n )}\n <DropdownMenuItem\n variant=\"destructive\"\n disabled={logout.isPending}\n onClick={() => logout.mutate()}\n >\n <LogOut className=\"h-4 w-4\" />\n {logout.isPending ? 'Logging out...' : 'Sign Out'}\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n\n {/* Mobile hamburger */}\n <button\n type=\"button\"\n aria-label={isDrawerOpen ? 'Close menu' : 'Open menu'}\n className=\"inline-flex h-10 w-10 items-center justify-center rounded-md border border-gray-300 hover:bg-gray-50 md:hidden\"\n onClick={() => setIsDrawerOpen(!isDrawerOpen)}\n >\n {isDrawerOpen ? (\n <X className=\"h-5 w-5\" />\n ) : (\n <Menu className=\"h-5 w-5\" />\n )}\n </button>\n </div>\n\n {/* Mobile right drawer */}\n {isDrawerOpen && (\n <div\n className=\"fixed inset-0 z-[30] duration-200 md:hidden\"\n onClick={() => setIsDrawerOpen(false)}\n />\n )}\n\n <div\n className={cn(\n 'fixed top-0 right-0 z-[31] h-[100svh] w-full max-w-[92%] border-l border-gray-200 bg-white shadow-xl sm:max-w-[420px] md:hidden',\n 'transition-transform duration-250 ease-out',\n isDrawerOpen ? 'translate-x-0' : 'translate-x-full',\n )}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Mobile menu\"\n >\n <div className=\"flex h-full flex-col\">\n <div className=\"mt-1 flex items-center justify-between border-b px-4 py-3\">\n <div className=\"flex items-center gap-2\">\n <Image\n src={logoPath}\n alt=\"\"\n width={25}\n height={25}\n className=\"h-6 w-6 rounded object-contain\"\n />\n <span className=\"text-sm font-semibold\">{brand}</span>\n <span className=\"rounded border border-gray-200 bg-gray-50 px-1 py-0 text-[10px] font-medium text-gray-400 leading-none\">\n {portal}\n </span>\n </div>\n <button\n type=\"button\"\n aria-label=\"Close menu\"\n className=\"inline-flex h-9 w-9 items-center justify-center rounded-md transition-colors hover:bg-gray-100\"\n onClick={() => setIsDrawerOpen(false)}\n >\n <X className=\"h-5 w-5\" />\n </button>\n </div>\n\n <div className=\"flex-1 overflow-y-auto p-4\">\n {userPrimary && (\n <div className=\"flex items-center gap-2 pb-2\">\n <UserRound className=\"h-5 w-5 text-gray-500\" />\n <span className=\"text-sm font-semibold text-gray-900\">\n {userPrimary}\n </span>\n </div>\n )}\n\n <Separator className=\"my-4\" />\n\n {actions && <div className=\"mb-2\">{actions}</div>}\n\n <nav className=\"space-y-1\">\n {nav.map((item) => {\n const Icon = item.icon ?? labelIcon(item.label);\n return (\n <Link\n key={item.href}\n href={item.href}\n className=\"block w-full\"\n >\n <button className=\"flex w-full items-center justify-between rounded-md border border-transparent px-3 py-2 text-sm transition-colors hover:border-gray-200 hover:bg-gray-50\">\n <div className=\"flex items-center gap-2\">\n <Icon className=\"h-4 w-4 text-gray-500\" />\n <span>{item.label}</span>\n {!!item.badge && (\n <span className=\"inline-flex h-4 w-4 items-center justify-center rounded-full bg-amber-400 text-[10px] font-bold leading-none text-amber-900\">\n !\n </span>\n )}\n </div>\n <ChevronRight className=\"h-4 w-4 text-gray-300\" />\n </button>\n </Link>\n );\n })}\n </nav>\n </div>\n\n <div className=\"mt-auto border-t px-4 py-3 space-y-1\">\n {profileHref && (\n <Link href={profileHref} className=\"block w-full\">\n <button className=\"flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors hover:bg-gray-50\">\n <UserRound className=\"h-4 w-4\" />\n Profile\n </button>\n </Link>\n )}\n {accountNav.map((item) => {\n const Icon = item.icon ?? labelIcon(item.label);\n return (\n <Link key={item.href} href={item.href} className=\"block w-full\">\n <button className=\"flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors hover:bg-gray-50\">\n <Icon className=\"h-4 w-4\" />\n {item.label}\n </button>\n </Link>\n );\n })}\n <button\n onClick={() => logout.mutate()}\n disabled={logout.isPending}\n className=\"flex w-full items-center justify-center gap-2 rounded-md py-2 font-medium text-red-600 transition-colors hover:bg-red-50\"\n >\n <LogOut className=\"h-4 w-4\" />\n {logout.isPending ? 'Logging out...' : 'Sign Out'}\n </button>\n </div>\n </div>\n </div>\n </header>\n );\n}\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;AA8DA,SAAS,SAAS,CAAC,KAAa,EAAA;AAC9B,IAAA,MAAM,GAAG,GAA+B;AACtC,QAAA,QAAQ,EAAE,SAAS;AACnB,QAAA,OAAO,EAAE,IAAI;AACb,QAAA,WAAW,EAAE,IAAI;AACjB,QAAA,QAAQ,EAAE,KAAK;AACf,QAAA,cAAc,EAAE,OAAO;AACvB,QAAA,eAAe,EAAE,QAAQ;AACzB,QAAA,YAAY,EAAE,aAAa;AAC3B,QAAA,SAAS,EAAE,SAAS;AACpB,QAAA,iBAAiB,EAAE,WAAW;AAC9B,QAAA,aAAa,EAAE,aAAa;AAC5B,QAAA,SAAS,EAAE,eAAe;KAC3B;AACD,IAAA,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,SAAS;AAChC;SAEgB,SAAS,CAAC,EACxB,MAAM,EACN,QAAQ,EACR,GAAG,EACH,WAAW,EACX,aAAa,EACb,MAAM,EAAE,QAAQ,EAChB,cAAc,EACd,WAAW,EACX,aAAa,EACb,UAAU,GAAG,EAAE,EACf,KAAK,GAAG,UAAU,EAClB,QAAQ,GAAG,4BAA4B,EACvC,OAAO,GACQ,EAAA;AACf,IAAA,MAAM,QAAQ,GAAG,WAAW,EAAE,IAAI,EAAE;AACpC,IAAA,MAAM,MAAM,GAAG,SAAS,EAAE;AAC1B,IAAA,MAAM,WAAW,GAAG,cAAc,EAAE;IACpC,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEvD,SAAS,CAAC,MAA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AC,EACFD,IAAA,CAAA,QAAA,EAAA,EACE,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,EAC9B,QAAQ,EAAE,MAAM,CAAC,SAAS,EAC1B,SAAS,EAAC,0HAA0H,EAAA,QAAA,EAAA,CAEpIC,GAAA,CAAC,MAAM,EAAA,EAAC,SAAS,EAAC,SAAS,EAAA,CAAG,EAC7B,MAAM,CAAC,SAAS,GAAG,gBAAgB,GAAG,UAAU,CAAA,EAAA,CAC1C,IACL,CAAA,EAAA,CACF,EAAA,CACF,CAAA,EAAA,CACC;AAEb;;;;"}
@@ -0,0 +1,5 @@
1
+ declare const FloatingActionButton: ({ onClick, children }: {
2
+ onClick: () => void;
3
+ children: React.ReactNode;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export { FloatingActionButton };
@@ -4,10 +4,11 @@ export declare function PageContainer({ className, children, }: {
4
4
  className?: string;
5
5
  children: React.ReactNode;
6
6
  }): import("react/jsx-runtime").JSX.Element;
7
- export declare function PageHeader({ title, description, children, }: {
7
+ export declare function PageHeader({ title, description, children, actionsClassName, }: {
8
8
  title: string;
9
9
  description?: React.ReactNode;
10
10
  children?: React.ReactNode;
11
+ actionsClassName?: string;
11
12
  }): import("react/jsx-runtime").JSX.Element;
12
13
  /** Centered empty/placeholder state inside a dashed card. */
13
14
  export declare function EmptyState({ title, description, children, }: {
@@ -5,8 +5,8 @@ import { cn } from '../../utils.js';
5
5
  function PageContainer({ className, children, }) {
6
6
  return (jsx("div", { className: cn('mx-auto w-full max-w-7xl px-4 py-8 sm:px-6', className), children: children }));
7
7
  }
8
- function PageHeader({ title, description, children, }) {
9
- return (jsxs("div", { className: "flex flex-wrap items-end justify-between gap-3", children: [jsxs("div", { className: "space-y-1", children: [jsx("h1", { className: "text-2xl font-semibold tracking-tight text-gray-900", children: title }), description && (jsx("p", { className: "text-muted-foreground text-sm", children: description }))] }), children && jsx("div", { className: "flex items-center gap-2", children: children })] }));
8
+ function PageHeader({ title, description, children, actionsClassName, }) {
9
+ return (jsxs("div", { className: "flex flex-wrap items-end justify-between gap-3", children: [jsxs("div", { className: "space-y-1", children: [jsx("h1", { className: "text-2xl font-semibold tracking-tight text-gray-900", children: title }), description && (jsx("p", { className: "text-muted-foreground text-sm", children: description }))] }), children && (jsx("div", { className: cn('flex items-center gap-2', actionsClassName), children: children }))] }));
10
10
  }
11
11
  /** Centered empty/placeholder state inside a dashed card. */
12
12
  function EmptyState({ title, description, children, }) {
@@ -1 +1 @@
1
- {"version":3,"file":"page-header.js","sources":["../../../src/components/ui/page-header.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '@/utils';\n\n/** Consistent page container width for authenticated pages. */\nexport function PageContainer({\n className,\n children,\n}: {\n className?: string;\n children: React.ReactNode;\n}) {\n return (\n <div\n className={cn('mx-auto w-full max-w-7xl px-4 py-8 sm:px-6', className)}\n >\n {children}\n </div>\n );\n}\n\nexport function PageHeader({\n title,\n description,\n children,\n}: {\n title: string;\n description?: React.ReactNode;\n children?: React.ReactNode;\n}) {\n return (\n <div className=\"flex flex-wrap items-end justify-between gap-3\">\n <div className=\"space-y-1\">\n <h1 className=\"text-2xl font-semibold tracking-tight text-gray-900\">\n {title}\n </h1>\n {description && (\n <p className=\"text-muted-foreground text-sm\">{description}</p>\n )}\n </div>\n {children && <div className=\"flex items-center gap-2\">{children}</div>}\n </div>\n );\n}\n\n/** Centered empty/placeholder state inside a dashed card. */\nexport function EmptyState({\n title,\n description,\n children,\n}: {\n title: string;\n description?: React.ReactNode;\n children?: React.ReactNode;\n}) {\n return (\n <div className=\"flex flex-col items-center justify-center gap-2 rounded-[0.33em] border border-dashed border-gray-300 bg-white px-6 py-14 text-center\">\n <p className=\"text-sm font-medium text-gray-700\">{title}</p>\n {description && (\n <p className=\"text-muted-foreground max-w-sm text-sm\">{description}</p>\n )}\n {children && <div className=\"mt-2\">{children}</div>}\n </div>\n );\n}\n"],"names":["_jsx","_jsxs"],"mappings":";;;AAGA;SACgB,aAAa,CAA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.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '@/utils';\n\n/** Consistent page container width for authenticated pages. */\nexport function PageContainer({\n className,\n children,\n}: {\n className?: string;\n children: React.ReactNode;\n}) {\n return (\n <div\n className={cn('mx-auto w-full max-w-7xl px-4 py-8 sm:px-6', className)}\n >\n {children}\n </div>\n );\n}\n\nexport function PageHeader({\n title,\n description,\n children,\n actionsClassName,\n}: {\n title: string;\n description?: React.ReactNode;\n children?: React.ReactNode;\n actionsClassName?: string;\n}) {\n return (\n <div className=\"flex flex-wrap items-end justify-between gap-3\">\n <div className=\"space-y-1\">\n <h1 className=\"text-2xl font-semibold tracking-tight text-gray-900\">\n {title}\n </h1>\n {description && (\n <p className=\"text-muted-foreground text-sm\">{description}</p>\n )}\n </div>\n {children && (\n <div className={cn('flex items-center gap-2', actionsClassName)}>\n {children}\n </div>\n )}\n </div>\n );\n}\n\n/** Centered empty/placeholder state inside a dashed card. */\nexport function EmptyState({\n title,\n description,\n children,\n}: {\n title: string;\n description?: React.ReactNode;\n children?: React.ReactNode;\n}) {\n return (\n <div className=\"flex flex-col items-center justify-center gap-2 rounded-[0.33em] border border-dashed border-gray-300 bg-white px-6 py-14 text-center\">\n <p className=\"text-sm font-medium text-gray-700\">{title}</p>\n {description && (\n <p className=\"text-muted-foreground max-w-sm text-sm\">{description}</p>\n )}\n {children && <div className=\"mt-2\">{children}</div>}\n </div>\n );\n}\n"],"names":["_jsx","_jsxs"],"mappings":";;;AAGA;SACgB,aAAa,CAAC,EAC5B,SAAS,EACT,QAAQ,GAIT,EAAA;AACC,IAAA,QACEA,GAAA,CAAA,KAAA,EAAA,EACE,SAAS,EAAE,EAAE,CAAC,4CAA4C,EAAE,SAAS,CAAC,EAAA,QAAA,EAErE,QAAQ,EAAA,CACL;AAEV;AAEM,SAAU,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,QAAQ,EACR,gBAAgB,GAMjB,EAAA;IACC,QACEC,cAAK,SAAS,EAAC,gDAAgD,EAAA,QAAA,EAAA,CAC7DA,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,WAAW,EAAA,QAAA,EAAA,CACxBD,YAAI,SAAS,EAAC,qDAAqD,EAAA,QAAA,EAChE,KAAK,EAAA,CACH,EACJ,WAAW,KACVA,GAAA,CAAA,GAAA,EAAA,EAAG,SAAS,EAAC,+BAA+B,EAAA,QAAA,EAAE,WAAW,GAAK,CAC/D,CAAA,EAAA,CACG,EACL,QAAQ,KACPA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,yBAAyB,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAC5D,QAAQ,EAAA,CACL,CACP,CAAA,EAAA,CACG;AAEV;AAEA;AACM,SAAU,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,QAAQ,GAKT,EAAA;AACC,IAAA,QACEC,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,uIAAuI,aACpJD,GAAA,CAAA,GAAA,EAAA,EAAG,SAAS,EAAC,mCAAmC,YAAE,KAAK,EAAA,CAAK,EAC3D,WAAW,KACVA,GAAA,CAAA,GAAA,EAAA,EAAG,SAAS,EAAC,wCAAwC,EAAA,QAAA,EAAE,WAAW,EAAA,CAAK,CACxE,EACA,QAAQ,IAAIA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,MAAM,EAAA,QAAA,EAAE,QAAQ,EAAA,CAAO,CAAA,EAAA,CAC/C;AAEV;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterinternship/components",
3
- "version": "2.4.2",
3
+ "version": "2.4.4",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -27,6 +27,22 @@
27
27
  "import": "./dist/components/ui/accordion.js",
28
28
  "types": "./dist/components/ui/accordion.d.ts"
29
29
  },
30
+ "./app-header": {
31
+ "import": "./dist/components/ui/app-header.js",
32
+ "types": "./dist/components/ui/app-header.d.ts"
33
+ },
34
+ "./dropdown-menu": {
35
+ "import": "./dist/components/ui/dropdown-menu.js",
36
+ "types": "./dist/components/ui/dropdown-menu.d.ts"
37
+ },
38
+ "./page-header": {
39
+ "import": "./dist/components/ui/page-header.js",
40
+ "types": "./dist/components/ui/page-header.d.ts"
41
+ },
42
+ "./status-notice": {
43
+ "import": "./dist/components/ui/status-notice.js",
44
+ "types": "./dist/components/ui/status-notice.d.ts"
45
+ },
30
46
  "./calendar": {
31
47
  "import": "./dist/components/ui/calendar.js",
32
48
  "types": "./dist/components/ui/calendar.d.ts"