@appcorp/shadcn 1.2.0 → 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.
- package/components/app-sidebar.js +16 -23
- package/components/audio.js +11 -19
- package/components/dashboard.js +27 -65
- package/components/drawer-generic.js +20 -28
- package/components/enhanced-checkbox.js +10 -57
- package/components/enhanced-combobox.js +99 -143
- package/components/enhanced-drawer-footer.js +22 -31
- package/components/enhanced-drawer-header.js +6 -14
- package/components/enhanced-dropzone-impl.d.ts +32 -0
- package/components/enhanced-dropzone-impl.js +218 -0
- package/components/enhanced-dropzone.d.ts +2 -63
- package/components/enhanced-dropzone.js +6 -294
- package/components/enhanced-input.js +10 -57
- package/components/enhanced-label.js +6 -52
- package/components/enhanced-radio.js +12 -20
- package/components/enhanced-select.js +13 -61
- package/components/enhanced-slider.js +11 -58
- package/components/enhanced-switch.js +11 -58
- package/components/enhanced-table-footer-action.js +11 -19
- package/components/enhanced-table-footer-page.js +16 -24
- package/components/enhanced-table-footer-pagination.js +11 -21
- package/components/enhanced-table-header-action.js +22 -30
- package/components/enhanced-table-header-search.js +9 -17
- package/components/enhanced-table.js +125 -153
- package/components/enhanced-textarea.js +10 -57
- package/components/field.d.ts +1 -1
- package/components/field.js +31 -88
- package/components/image-resize-dialog.js +61 -159
- package/components/nav-main.js +32 -78
- package/components/nav-projects.js +37 -48
- package/components/nav-user.js +41 -51
- package/components/show-toast.js +5 -9
- package/components/sidebar.d.ts +1 -1
- package/components/sidebar.js +115 -184
- package/components/team-switcher.js +36 -47
- package/components/theme-provider.js +36 -84
- package/components/timeline.js +12 -20
- package/components/tooltip.js +10 -59
- package/components/ui/accordion.js +17 -67
- package/components/ui/alert-dialog.js +32 -89
- package/components/ui/alert.d.ts +1 -1
- package/components/ui/alert.js +14 -63
- package/components/ui/area-chart-v1-impl.d.ts +19 -0
- package/components/ui/area-chart-v1-impl.js +75 -0
- package/components/ui/area-chart-v1.d.ts +2 -19
- package/components/ui/area-chart-v1.js +4 -113
- package/components/ui/aspect-ratio.js +3 -39
- package/components/ui/avatar.js +13 -62
- package/components/ui/badge.d.ts +2 -2
- package/components/ui/badge.js +7 -55
- package/components/ui/breadcrumb.js +27 -80
- package/components/ui/button.d.ts +2 -2
- package/components/ui/button.js +10 -58
- package/components/ui/calendar-impl.d.ts +8 -0
- package/components/ui/calendar-impl.js +55 -0
- package/components/ui/calendar.d.ts +2 -8
- package/components/ui/calendar.js +5 -108
- package/components/ui/card.js +21 -73
- package/components/ui/carousel-impl.d.ts +18 -0
- package/components/ui/carousel-impl.js +117 -0
- package/components/ui/carousel.d.ts +6 -18
- package/components/ui/carousel.js +8 -170
- package/components/ui/chart-impl.d.ts +62 -0
- package/components/ui/chart-impl.js +162 -0
- package/components/ui/chart.d.ts +7 -62
- package/components/ui/chart.js +9 -219
- package/components/ui/checkbox.js +10 -57
- package/components/ui/collapsible.js +5 -43
- package/components/ui/combobox.js +22 -58
- package/components/ui/command-impl.d.ts +80 -0
- package/components/ui/command-impl.js +63 -0
- package/components/ui/command.d.ts +9 -80
- package/components/ui/command.js +12 -117
- package/components/ui/context-menu.js +41 -102
- package/components/ui/dialog.js +28 -84
- package/components/ui/drawer-impl.d.ts +22 -0
- package/components/ui/drawer-impl.js +56 -0
- package/components/ui/drawer.d.ts +10 -22
- package/components/ui/drawer.js +13 -111
- package/components/ui/dropdown-menu.js +41 -102
- package/components/ui/form.d.ts +4 -2
- package/components/ui/form.js +41 -95
- package/components/ui/hover-card.js +9 -58
- package/components/ui/input-otp-impl.d.ts +34 -0
- package/components/ui/input-otp-impl.js +43 -0
- package/components/ui/input-otp.d.ts +4 -34
- package/components/ui/input-otp.js +7 -92
- package/components/ui/input.js +6 -53
- package/components/ui/label.d.ts +1 -1
- package/components/ui/label.js +9 -56
- package/components/ui/language-selector.js +17 -55
- package/components/ui/menubar.js +46 -108
- package/components/ui/navigation-menu.d.ts +1 -1
- package/components/ui/navigation-menu.js +29 -84
- package/components/ui/pagination.js +30 -83
- package/components/ui/popover.js +10 -60
- package/components/ui/progress.js +8 -55
- package/components/ui/radio-group.js +12 -60
- package/components/ui/resizable-impl.d.ts +24 -0
- package/components/ui/resizable-impl.js +27 -0
- package/components/ui/resizable.d.ts +3 -24
- package/components/ui/resizable.js +6 -78
- package/components/ui/scroll-area.js +10 -58
- package/components/ui/select.js +34 -90
- package/components/ui/separator.js +7 -54
- package/components/ui/sheet.d.ts +1 -1
- package/components/ui/sheet.js +30 -86
- package/components/ui/skeleton.js +5 -21
- package/components/ui/slider.js +10 -57
- package/components/ui/sonner.js +7 -24
- package/components/ui/switch.js +8 -55
- package/components/ui/table.js +27 -81
- package/components/ui/tabs.js +14 -64
- package/components/ui/textarea.js +6 -53
- package/components/ui/theme-switcher.js +41 -91
- package/components/ui/toggle.d.ts +2 -2
- package/components/ui/toggle.js +9 -57
- package/data/admin-dashboard.js +16 -19
- package/hooks/use-enhanced-combobox.js +47 -124
- package/hooks/use-mobile.js +8 -44
- package/hooks/use-outside-click.js +6 -10
- package/lib/themes.js +1 -4
- package/lib/toast-utils.js +78 -120
- package/lib/utils.js +4 -11
- package/package.json +9 -90
- package/utils/transform-breadcrumbs.js +4 -8
- package/utils/transform-navitems.js +7 -22
- package/components/aceternity-ui/apple-cards-carousel.d.ts +0 -35
- package/components/aceternity-ui/apple-cards-carousel.js +0 -263
- package/components/shadcn-example/ai-chat/chat-interface.d.ts +0 -11
- package/components/shadcn-example/ai-chat/chat-interface.js +0 -70
- package/components/shadcn-example/ai-chat/index.d.ts +0 -38
- package/components/shadcn-example/ai-chat/index.js +0 -66
- package/components/shadcn-example/ai-chat/sidebar.d.ts +0 -15
- package/components/shadcn-example/ai-chat/sidebar.js +0 -68
- package/components/shadcn-example/ai-chat/welcome-section.d.ts +0 -12
- package/components/shadcn-example/ai-chat/welcome-section.js +0 -26
- package/components/shadcn-example/authentication/index.d.ts +0 -24
- package/components/shadcn-example/authentication/index.js +0 -59
- package/components/shadcn-example/authentication/user-auth-form.d.ts +0 -11
- package/components/shadcn-example/authentication/user-auth-form.js +0 -54
- package/components/shadcn-example/blog-detail-page/comment-section.d.ts +0 -15
- package/components/shadcn-example/blog-detail-page/comment-section.js +0 -83
- package/components/shadcn-example/blog-detail-page/content.d.ts +0 -7
- package/components/shadcn-example/blog-detail-page/content.js +0 -15
- package/components/shadcn-example/blog-detail-page/header.d.ts +0 -11
- package/components/shadcn-example/blog-detail-page/header.js +0 -36
- package/components/shadcn-example/blog-detail-page/index.d.ts +0 -25
- package/components/shadcn-example/blog-detail-page/index.js +0 -74
- package/components/shadcn-example/blog-page/blog-post-card.d.ts +0 -13
- package/components/shadcn-example/blog-page/blog-post-card.js +0 -30
- package/components/shadcn-example/blog-page/featured-post-sidebar-item.d.ts +0 -10
- package/components/shadcn-example/blog-page/featured-post-sidebar-item.js +0 -19
- package/components/shadcn-example/blog-page/index.d.ts +0 -20
- package/components/shadcn-example/blog-page/index.js +0 -36
- package/components/shadcn-example/coming-soon/countdown.d.ts +0 -2
- package/components/shadcn-example/coming-soon/countdown.js +0 -82
- package/components/shadcn-example/coming-soon/index.d.ts +0 -10
- package/components/shadcn-example/coming-soon/index.js +0 -41
- package/components/shadcn-io/color-picker/index.d.ts +0 -43
- package/components/shadcn-io/color-picker/index.js +0 -304
- package/components/shadcn-io/copy-button/index.d.ts +0 -16
- package/components/shadcn-io/copy-button/index.js +0 -121
- package/components/shadcn-io/dropzone/index.d.ts +0 -19
- package/components/shadcn-io/dropzone/index.js +0 -131
- package/components/shadcn-io/gantt/index.d.ts +0 -145
- package/components/shadcn-io/gantt/index.js +0 -766
- package/components/shadcn-io/table/index.d.ts +0 -60
- package/components/shadcn-io/table/index.js +0 -138
- package/templates/appcorp-v1/footer/bottom-bar.d.ts +0 -6
- package/templates/appcorp-v1/footer/bottom-bar.js +0 -25
- package/templates/appcorp-v1/footer/cta.d.ts +0 -6
- package/templates/appcorp-v1/footer/cta.js +0 -21
- package/templates/appcorp-v1/footer/footer-grid.d.ts +0 -14
- package/templates/appcorp-v1/footer/footer-grid.js +0 -52
- package/templates/appcorp-v1/footer/index.d.ts +0 -3
- package/templates/appcorp-v1/footer/index.js +0 -28
- package/templates/appcorp-v1/footer/newsletter.d.ts +0 -11
- package/templates/appcorp-v1/footer/newsletter.js +0 -28
- package/templates/appcorp-v1/footer/stats.d.ts +0 -6
- package/templates/appcorp-v1/footer/stats.js +0 -15
- package/templates/appcorp-v1/header/announcement-bar.d.ts +0 -3
- package/templates/appcorp-v1/header/announcement-bar.js +0 -15
- package/templates/appcorp-v1/header/dropdown-panel.d.ts +0 -8
- package/templates/appcorp-v1/header/dropdown-panel.js +0 -72
- package/templates/appcorp-v1/header/index.d.ts +0 -12
- package/templates/appcorp-v1/header/index.js +0 -16
- package/templates/appcorp-v1/header/mobile-menu.d.ts +0 -14
- package/templates/appcorp-v1/header/mobile-menu.js +0 -101
- package/templates/appcorp-v1/header/navigation-bar.d.ts +0 -3
- package/templates/appcorp-v1/header/navigation-bar.js +0 -117
- package/templates/appcorp-v1/header/social-button.d.ts +0 -7
- package/templates/appcorp-v1/header/social-button.js +0 -48
- package/templates/appcorp-v1/home.d.ts +0 -3
- package/templates/appcorp-v1/home.js +0 -27
- package/templates/data/appcorp-v1.d.ts +0 -93
- package/templates/data/appcorp-v1.js +0 -348
- package/templates/data/edupilotpro-v1.d.ts +0 -33
- package/templates/data/edupilotpro-v1.js +0 -116
- package/templates/data/school-v1.d.ts +0 -328
- package/templates/data/school-v1.js +0 -1563
- package/templates/edupilotpro-v1/feature-card.d.ts +0 -13
- package/templates/edupilotpro-v1/feature-card.js +0 -28
- package/templates/edupilotpro-v1/mockups/dashboard-mockup.d.ts +0 -3
- package/templates/edupilotpro-v1/mockups/dashboard-mockup.js +0 -55
- package/templates/school-v1/footer.d.ts +0 -3
- package/templates/school-v1/footer.js +0 -75
- package/templates/school-v1/index.d.ts +0 -18
- package/templates/school-v1/index.js +0 -60
- package/templates/school-v1/navigation.d.ts +0 -3
- package/templates/school-v1/navigation.js +0 -123
- package/templates/school-v1/sections/about.d.ts +0 -3
- package/templates/school-v1/sections/about.js +0 -49
- package/templates/school-v1/sections/admissions.d.ts +0 -3
- package/templates/school-v1/sections/admissions.js +0 -77
- package/templates/school-v1/sections/contact.d.ts +0 -3
- package/templates/school-v1/sections/contact.js +0 -67
- package/templates/school-v1/sections/faqs.d.ts +0 -3
- package/templates/school-v1/sections/faqs.js +0 -50
- package/templates/school-v1/sections/hero.d.ts +0 -3
- package/templates/school-v1/sections/hero.js +0 -132
- package/templates/school-v1/sections/management.d.ts +0 -3
- package/templates/school-v1/sections/management.js +0 -34
- package/templates/school-v1/sections/policies.d.ts +0 -3
- package/templates/school-v1/sections/policies.js +0 -127
- package/templates/school-v1/sections/programs.d.ts +0 -3
- package/templates/school-v1/sections/programs.js +0 -107
- package/templates/school-v1/sections/testimonials.d.ts +0 -3
- package/templates/school-v1/sections/testimonials.js +0 -46
- package/templates/school-v1/sections/why-choose-us.d.ts +0 -3
- package/templates/school-v1/sections/why-choose-us.js +0 -57
package/components/nav-main.js
CHANGED
|
@@ -1,86 +1,40 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.NavMain = void 0;
|
|
41
|
-
var react_1 = __importStar(require("react"));
|
|
42
|
-
var lucide_react_1 = require("lucide-react");
|
|
43
|
-
var collapsible_1 = require("./ui/collapsible");
|
|
44
|
-
var sidebar_1 = require("./sidebar");
|
|
45
|
-
var link_1 = __importDefault(require("next/link"));
|
|
46
|
-
exports.NavMain = react_1.default.memo(function (_a) {
|
|
47
|
-
var items = _a.items;
|
|
48
|
-
var processedItems = (0, react_1.useMemo)(function () {
|
|
2
|
+
import React, { useMemo } from "react";
|
|
3
|
+
import { ChevronRight } from "lucide-react";
|
|
4
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from "./ui/collapsible";
|
|
5
|
+
import { SidebarGroup, SidebarGroupLabel, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, } from "./sidebar";
|
|
6
|
+
import Link from "next/link";
|
|
7
|
+
export const NavMain = React.memo(({ items }) => {
|
|
8
|
+
const processedItems = useMemo(() => {
|
|
49
9
|
return items
|
|
50
|
-
.filter(
|
|
51
|
-
|
|
52
|
-
return enabled;
|
|
53
|
-
})
|
|
54
|
-
.sort(function (a, b) { return a.order - b.order; });
|
|
10
|
+
.filter(({ enabled }) => enabled)
|
|
11
|
+
.sort((a, b) => a.order - b.order);
|
|
55
12
|
}, [items]);
|
|
56
|
-
return (
|
|
57
|
-
|
|
58
|
-
|
|
13
|
+
return (React.createElement(SidebarGroup, null,
|
|
14
|
+
React.createElement(SidebarGroupLabel, null, "Current App"),
|
|
15
|
+
React.createElement(SidebarMenu, null, processedItems.map((item) => {
|
|
59
16
|
var _a, _b;
|
|
60
17
|
if (!((_a = item.subItems) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
61
|
-
return (
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
item.icon &&
|
|
65
|
-
|
|
18
|
+
return (React.createElement(SidebarMenuItem, { key: item.title },
|
|
19
|
+
React.createElement(Link, { href: item.url },
|
|
20
|
+
React.createElement(SidebarMenuButton, { className: "cursor-pointer" },
|
|
21
|
+
item.icon && React.createElement(item.icon, null),
|
|
22
|
+
React.createElement("span", null, item.title)))));
|
|
66
23
|
}
|
|
67
|
-
return (
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
item.icon &&
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
((_b = item.subItems) === null || _b === void 0 ? void 0 : _b.length) > 0 && (
|
|
75
|
-
|
|
76
|
-
.filter(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
react_1.default.createElement(sidebar_1.SidebarMenuSubButton, { asChild: true },
|
|
83
|
-
react_1.default.createElement(link_1.default, { href: subItem.url },
|
|
84
|
-
react_1.default.createElement("span", null, subItem.title))))); })))))));
|
|
24
|
+
return (React.createElement(Collapsible, { key: item.title, asChild: true, defaultOpen: item.isActive, className: "group/collapsible" },
|
|
25
|
+
React.createElement(SidebarMenuItem, null,
|
|
26
|
+
React.createElement(CollapsibleTrigger, { asChild: true },
|
|
27
|
+
React.createElement(SidebarMenuButton, { tooltip: item.title, className: item.isActive ? "bg-gray-300" : "" },
|
|
28
|
+
item.icon && React.createElement(item.icon, null),
|
|
29
|
+
React.createElement("span", null, item.title),
|
|
30
|
+
React.createElement(ChevronRight, { className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" }))),
|
|
31
|
+
((_b = item.subItems) === null || _b === void 0 ? void 0 : _b.length) > 0 && (React.createElement(CollapsibleContent, null,
|
|
32
|
+
React.createElement(SidebarMenuSub, null, item.subItems
|
|
33
|
+
.filter(({ enabled }) => enabled)
|
|
34
|
+
.sort((a, b) => a.order - b.order)
|
|
35
|
+
.map((subItem) => (React.createElement(SidebarMenuSubItem, { key: subItem.title, className: `rounded-md ${subItem.isActive ? "bg-gray-200" : ""}` },
|
|
36
|
+
React.createElement(SidebarMenuSubButton, { asChild: true },
|
|
37
|
+
React.createElement(Link, { href: subItem.url },
|
|
38
|
+
React.createElement("span", null, subItem.title))))))))))));
|
|
85
39
|
}))));
|
|
86
40
|
});
|
|
@@ -1,50 +1,39 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { Folder, Forward, MoreHorizontal, Trash2 } from "lucide-react";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, } from "./ui/dropdown-menu";
|
|
5
|
+
import { SidebarGroup, SidebarGroupLabel, SidebarMenu, SidebarMenuAction, SidebarMenuButton, SidebarMenuItem, useSidebar, } from "./sidebar";
|
|
6
|
+
import React from "react";
|
|
7
|
+
export const NavProjects = ({ apps, offerUrl }) => {
|
|
8
|
+
var _a, _b;
|
|
9
|
+
const { isMobile } = useSidebar();
|
|
10
|
+
return (React.createElement(SidebarGroup, { className: "group-data-[collapsible=icon]:hidden" },
|
|
11
|
+
React.createElement(SidebarGroupLabel, null, "More Apps"),
|
|
12
|
+
React.createElement(SidebarMenu, null, (_b = (_a = apps === null || apps === void 0 ? void 0 : apps.filter(({ enabled }) => enabled)) === null || _a === void 0 ? void 0 : _a.sort((a, b) => a.order - b.order)) === null || _b === void 0 ? void 0 :
|
|
13
|
+
_b.map((item) => (React.createElement(SidebarMenuItem, { key: item.name },
|
|
14
|
+
React.createElement(SidebarMenuButton, { asChild: true },
|
|
15
|
+
React.createElement(Link, { href: item.url },
|
|
16
|
+
React.createElement(item.icon, null),
|
|
17
|
+
React.createElement("span", null, item.name))),
|
|
18
|
+
React.createElement(DropdownMenu, null,
|
|
19
|
+
React.createElement(DropdownMenuTrigger, { asChild: true },
|
|
20
|
+
React.createElement(SidebarMenuAction, { showOnHover: true },
|
|
21
|
+
React.createElement(MoreHorizontal, null),
|
|
22
|
+
React.createElement("span", { className: "sr-only" }, "More"))),
|
|
23
|
+
React.createElement(DropdownMenuContent, { className: "w-48 rounded-lg", side: isMobile ? "bottom" : "right", align: isMobile ? "end" : "start" },
|
|
24
|
+
React.createElement(DropdownMenuItem, null,
|
|
25
|
+
React.createElement(Folder, { className: "text-muted-foreground" }),
|
|
26
|
+
React.createElement("span", null, "View Project")),
|
|
27
|
+
React.createElement(DropdownMenuItem, null,
|
|
28
|
+
React.createElement(Forward, { className: "text-muted-foreground" }),
|
|
29
|
+
React.createElement("span", null, "Share Project")),
|
|
30
|
+
React.createElement(DropdownMenuSeparator, null),
|
|
31
|
+
React.createElement(DropdownMenuItem, null,
|
|
32
|
+
React.createElement(Trash2, { className: "text-muted-foreground" }),
|
|
33
|
+
React.createElement("span", null, "Delete Project"))))))),
|
|
34
|
+
offerUrl && (React.createElement(SidebarMenuItem, null,
|
|
35
|
+
React.createElement(Link, { href: offerUrl },
|
|
36
|
+
React.createElement(SidebarMenuButton, { className: "text-sidebar-foreground/70" },
|
|
37
|
+
React.createElement(MoreHorizontal, { className: "text-sidebar-foreground/70" }),
|
|
38
|
+
React.createElement("span", null, "Offers"))))))));
|
|
5
39
|
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.NavProjects = void 0;
|
|
8
|
-
var lucide_react_1 = require("lucide-react");
|
|
9
|
-
var link_1 = __importDefault(require("next/link"));
|
|
10
|
-
var dropdown_menu_1 = require("./ui/dropdown-menu");
|
|
11
|
-
var sidebar_1 = require("./sidebar");
|
|
12
|
-
var react_1 = __importDefault(require("react"));
|
|
13
|
-
var NavProjects = function (_a) {
|
|
14
|
-
var _b, _c;
|
|
15
|
-
var apps = _a.apps, offerUrl = _a.offerUrl;
|
|
16
|
-
var isMobile = (0, sidebar_1.useSidebar)().isMobile;
|
|
17
|
-
return (react_1.default.createElement(sidebar_1.SidebarGroup, { className: "group-data-[collapsible=icon]:hidden" },
|
|
18
|
-
react_1.default.createElement(sidebar_1.SidebarGroupLabel, null, "More Apps"),
|
|
19
|
-
react_1.default.createElement(sidebar_1.SidebarMenu, null, (_c = (_b = apps === null || apps === void 0 ? void 0 : apps.filter(function (_a) {
|
|
20
|
-
var enabled = _a.enabled;
|
|
21
|
-
return enabled;
|
|
22
|
-
})) === null || _b === void 0 ? void 0 : _b.sort(function (a, b) { return a.order - b.order; })) === null || _c === void 0 ? void 0 :
|
|
23
|
-
_c.map(function (item) { return (react_1.default.createElement(sidebar_1.SidebarMenuItem, { key: item.name },
|
|
24
|
-
react_1.default.createElement(sidebar_1.SidebarMenuButton, { asChild: true },
|
|
25
|
-
react_1.default.createElement(link_1.default, { href: item.url },
|
|
26
|
-
react_1.default.createElement(item.icon, null),
|
|
27
|
-
react_1.default.createElement("span", null, item.name))),
|
|
28
|
-
react_1.default.createElement(dropdown_menu_1.DropdownMenu, null,
|
|
29
|
-
react_1.default.createElement(dropdown_menu_1.DropdownMenuTrigger, { asChild: true },
|
|
30
|
-
react_1.default.createElement(sidebar_1.SidebarMenuAction, { showOnHover: true },
|
|
31
|
-
react_1.default.createElement(lucide_react_1.MoreHorizontal, null),
|
|
32
|
-
react_1.default.createElement("span", { className: "sr-only" }, "More"))),
|
|
33
|
-
react_1.default.createElement(dropdown_menu_1.DropdownMenuContent, { className: "w-48 rounded-lg", side: isMobile ? "bottom" : "right", align: isMobile ? "end" : "start" },
|
|
34
|
-
react_1.default.createElement(dropdown_menu_1.DropdownMenuItem, null,
|
|
35
|
-
react_1.default.createElement(lucide_react_1.Folder, { className: "text-muted-foreground" }),
|
|
36
|
-
react_1.default.createElement("span", null, "View Project")),
|
|
37
|
-
react_1.default.createElement(dropdown_menu_1.DropdownMenuItem, null,
|
|
38
|
-
react_1.default.createElement(lucide_react_1.Forward, { className: "text-muted-foreground" }),
|
|
39
|
-
react_1.default.createElement("span", null, "Share Project")),
|
|
40
|
-
react_1.default.createElement(dropdown_menu_1.DropdownMenuSeparator, null),
|
|
41
|
-
react_1.default.createElement(dropdown_menu_1.DropdownMenuItem, null,
|
|
42
|
-
react_1.default.createElement(lucide_react_1.Trash2, { className: "text-muted-foreground" }),
|
|
43
|
-
react_1.default.createElement("span", null, "Delete Project")))))); }),
|
|
44
|
-
offerUrl && (react_1.default.createElement(sidebar_1.SidebarMenuItem, null,
|
|
45
|
-
react_1.default.createElement(link_1.default, { href: offerUrl },
|
|
46
|
-
react_1.default.createElement(sidebar_1.SidebarMenuButton, { className: "text-sidebar-foreground/70" },
|
|
47
|
-
react_1.default.createElement(lucide_react_1.MoreHorizontal, { className: "text-sidebar-foreground/70" }),
|
|
48
|
-
react_1.default.createElement("span", null, "Offers"))))))));
|
|
49
|
-
};
|
|
50
|
-
exports.NavProjects = NavProjects;
|
package/components/nav-user.js
CHANGED
|
@@ -1,62 +1,52 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
react_1.default.createElement(sidebar_1.SidebarMenuItem, null,
|
|
19
|
-
react_1.default.createElement(dropdown_menu_1.DropdownMenu, null,
|
|
20
|
-
react_1.default.createElement(dropdown_menu_1.DropdownMenuTrigger, { asChild: true },
|
|
21
|
-
react_1.default.createElement(sidebar_1.SidebarMenuButton, { size: "lg", className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground" },
|
|
22
|
-
react_1.default.createElement(avatar_1.Avatar, { className: "h-8 w-8 rounded-lg" },
|
|
23
|
-
react_1.default.createElement(avatar_1.AvatarImage, { src: user.avatar, alt: user.name }),
|
|
24
|
-
react_1.default.createElement(avatar_1.AvatarFallback, { className: "rounded-lg" }, user.name
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ChevronsUpDown, LogOut } from "lucide-react";
|
|
4
|
+
import { Avatar, AvatarFallback, AvatarImage } from "./ui/avatar";
|
|
5
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "./ui/dropdown-menu";
|
|
6
|
+
import { SidebarMenu, SidebarMenuButton, SidebarMenuItem, useSidebar, } from "./sidebar";
|
|
7
|
+
import Link from "next/link";
|
|
8
|
+
export function NavUser({ user, footerNavItems, handleSignOut, }) {
|
|
9
|
+
const { isMobile } = useSidebar();
|
|
10
|
+
return (React.createElement(SidebarMenu, null,
|
|
11
|
+
React.createElement(SidebarMenuItem, null,
|
|
12
|
+
React.createElement(DropdownMenu, null,
|
|
13
|
+
React.createElement(DropdownMenuTrigger, { asChild: true },
|
|
14
|
+
React.createElement(SidebarMenuButton, { size: "lg", className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground" },
|
|
15
|
+
React.createElement(Avatar, { className: "h-8 w-8 rounded-lg" },
|
|
16
|
+
React.createElement(AvatarImage, { src: user.avatar, alt: user.name }),
|
|
17
|
+
React.createElement(AvatarFallback, { className: "rounded-lg" }, user.name
|
|
25
18
|
.split(" ")
|
|
26
|
-
.map(
|
|
19
|
+
.map((n) => n[0])
|
|
27
20
|
.join("")
|
|
28
21
|
.toUpperCase())),
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
22
|
+
React.createElement("div", { className: "grid flex-1 text-left text-sm leading-tight" },
|
|
23
|
+
React.createElement("span", { className: "truncate font-medium" }, user.name),
|
|
24
|
+
React.createElement("span", { className: "truncate text-xs" }, user.email)),
|
|
25
|
+
React.createElement(ChevronsUpDown, { className: "ml-auto size-4" }))),
|
|
26
|
+
React.createElement(DropdownMenuContent, { className: "w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg", side: isMobile ? "bottom" : "right", align: "end", sideOffset: 4 },
|
|
27
|
+
React.createElement(DropdownMenuLabel, { className: "p-0 font-normal" },
|
|
28
|
+
React.createElement("div", { className: "flex items-center gap-2 px-1 py-1.5 text-left text-sm" },
|
|
29
|
+
React.createElement(Avatar, { className: "h-8 w-8 rounded-lg" },
|
|
30
|
+
React.createElement(AvatarImage, { src: user.avatar, alt: user.name }),
|
|
31
|
+
React.createElement(AvatarFallback, { className: "rounded-lg" }, "CN")),
|
|
32
|
+
React.createElement("div", { className: "grid flex-1 text-left text-sm leading-tight" },
|
|
33
|
+
React.createElement("span", { className: "truncate font-medium" }, user.name),
|
|
34
|
+
React.createElement("span", { className: "truncate text-xs" }, user.email)))),
|
|
35
|
+
React.createElement(DropdownMenuSeparator, null),
|
|
43
36
|
footerNavItems
|
|
44
|
-
.filter(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
})
|
|
48
|
-
.sort(function (a, b) { return a.order - b.order; })
|
|
49
|
-
.map(function (item) {
|
|
37
|
+
.filter(({ enabled }) => enabled)
|
|
38
|
+
.sort((a, b) => a.order - b.order)
|
|
39
|
+
.map((item) => {
|
|
50
40
|
if (item.title === "Divider") {
|
|
51
|
-
return
|
|
41
|
+
return React.createElement(DropdownMenuSeparator, { key: item.title });
|
|
52
42
|
}
|
|
53
|
-
return (
|
|
54
|
-
|
|
55
|
-
item.icon &&
|
|
43
|
+
return (React.createElement(Link, { href: item.url, key: item.title },
|
|
44
|
+
React.createElement(DropdownMenuItem, null,
|
|
45
|
+
item.icon && React.createElement(item.icon, null),
|
|
56
46
|
item.title)));
|
|
57
47
|
}),
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
48
|
+
React.createElement(DropdownMenuSeparator, null),
|
|
49
|
+
React.createElement(DropdownMenuItem, { onClick: handleSignOut },
|
|
50
|
+
React.createElement(LogOut, null),
|
|
61
51
|
"Sign Out"))))));
|
|
62
52
|
}
|
package/components/show-toast.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
(0, toast_utils_1.generateThemeToast)({
|
|
7
|
-
description: description,
|
|
8
|
-
variant: variant,
|
|
1
|
+
import { generateThemeToast } from "../lib/toast-utils";
|
|
2
|
+
export const showToast = (description, variant) => {
|
|
3
|
+
generateThemeToast({
|
|
4
|
+
description,
|
|
5
|
+
variant,
|
|
9
6
|
});
|
|
10
7
|
};
|
|
11
|
-
exports.showToast = showToast;
|
package/components/sidebar.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ declare function SidebarMenuItem({ className, ...props }: React.ComponentProps<"
|
|
|
45
45
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
46
46
|
variant?: "default" | "outline" | null | undefined;
|
|
47
47
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
48
|
-
} & import("class-variance-authority/
|
|
48
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
49
49
|
declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, ...props }: React.ComponentProps<"button"> & {
|
|
50
50
|
asChild?: boolean;
|
|
51
51
|
isActive?: boolean;
|