@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
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
var __assign = (this && this.__assign) || function () {
|
|
4
|
-
__assign = Object.assign || function(t) {
|
|
5
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
-
s = arguments[i];
|
|
7
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
8
|
-
t[p] = s[p];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
return __assign.apply(this, arguments);
|
|
13
|
-
};
|
|
14
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
-
if (k2 === undefined) k2 = k;
|
|
16
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
17
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
18
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
19
|
-
}
|
|
20
|
-
Object.defineProperty(o, k2, desc);
|
|
21
|
-
}) : (function(o, m, k, k2) {
|
|
22
|
-
if (k2 === undefined) k2 = k;
|
|
23
|
-
o[k2] = m[k];
|
|
24
|
-
}));
|
|
25
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
26
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
27
|
-
}) : function(o, v) {
|
|
28
|
-
o["default"] = v;
|
|
29
|
-
});
|
|
30
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
31
|
-
var ownKeys = function(o) {
|
|
32
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
33
|
-
var ar = [];
|
|
34
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
35
|
-
return ar;
|
|
36
|
-
};
|
|
37
|
-
return ownKeys(o);
|
|
38
|
-
};
|
|
39
|
-
return function (mod) {
|
|
40
|
-
if (mod && mod.__esModule) return mod;
|
|
41
|
-
var result = {};
|
|
42
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
43
|
-
__setModuleDefault(result, mod);
|
|
44
|
-
return result;
|
|
45
|
-
};
|
|
46
|
-
})();
|
|
47
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
48
|
-
var t = {};
|
|
49
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
50
|
-
t[p] = s[p];
|
|
51
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
52
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
53
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
54
|
-
t[p[i]] = s[p[i]];
|
|
55
|
-
}
|
|
56
|
-
return t;
|
|
57
|
-
};
|
|
58
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59
|
-
exports.buttonVariants = void 0;
|
|
60
|
-
exports.CopyButton = CopyButton;
|
|
61
|
-
var React = __importStar(require("react"));
|
|
62
|
-
var react_1 = require("motion/react");
|
|
63
|
-
var lucide_react_1 = require("lucide-react");
|
|
64
|
-
var class_variance_authority_1 = require("class-variance-authority");
|
|
65
|
-
var utils_1 = require("../../../lib/utils");
|
|
66
|
-
var buttonVariants = (0, class_variance_authority_1.cva)("inline-flex items-center justify-center cursor-pointer rounded-md transition-colors disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none 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", {
|
|
67
|
-
variants: {
|
|
68
|
-
variant: {
|
|
69
|
-
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
70
|
-
muted: "bg-muted text-muted-foreground",
|
|
71
|
-
destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
72
|
-
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
73
|
-
secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
|
|
74
|
-
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
75
|
-
},
|
|
76
|
-
size: {
|
|
77
|
-
default: "size-8 rounded-lg [&_svg]:size-4",
|
|
78
|
-
sm: "size-6 [&_svg]:size-3",
|
|
79
|
-
md: "size-10 rounded-lg [&_svg]:size-5",
|
|
80
|
-
lg: "size-12 rounded-xl [&_svg]:size-6",
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
defaultVariants: {
|
|
84
|
-
variant: "default",
|
|
85
|
-
size: "default",
|
|
86
|
-
},
|
|
87
|
-
});
|
|
88
|
-
exports.buttonVariants = buttonVariants;
|
|
89
|
-
function CopyButton(_a) {
|
|
90
|
-
var content = _a.content, className = _a.className, size = _a.size, variant = _a.variant, _b = _a.delay, delay = _b === void 0 ? 3000 : _b, onClick = _a.onClick, onCopy = _a.onCopy, isCopied = _a.isCopied, onCopyChange = _a.onCopyChange, props = __rest(_a, ["content", "className", "size", "variant", "delay", "onClick", "onCopy", "isCopied", "onCopyChange"]);
|
|
91
|
-
var _c = React.useState(isCopied !== null && isCopied !== void 0 ? isCopied : false), localIsCopied = _c[0], setLocalIsCopied = _c[1];
|
|
92
|
-
var Icon = localIsCopied ? lucide_react_1.CheckIcon : lucide_react_1.CopyIcon;
|
|
93
|
-
React.useEffect(function () {
|
|
94
|
-
setLocalIsCopied(isCopied !== null && isCopied !== void 0 ? isCopied : false);
|
|
95
|
-
}, [isCopied]);
|
|
96
|
-
var handleIsCopied = React.useCallback(function (isCopied) {
|
|
97
|
-
setLocalIsCopied(isCopied);
|
|
98
|
-
onCopyChange === null || onCopyChange === void 0 ? void 0 : onCopyChange(isCopied);
|
|
99
|
-
}, [onCopyChange]);
|
|
100
|
-
var handleCopy = React.useCallback(function (e) {
|
|
101
|
-
if (isCopied)
|
|
102
|
-
return;
|
|
103
|
-
if (content) {
|
|
104
|
-
navigator.clipboard
|
|
105
|
-
.writeText(content)
|
|
106
|
-
.then(function () {
|
|
107
|
-
handleIsCopied(true);
|
|
108
|
-
setTimeout(function () { return handleIsCopied(false); }, delay);
|
|
109
|
-
onCopy === null || onCopy === void 0 ? void 0 : onCopy(content);
|
|
110
|
-
})
|
|
111
|
-
.catch(function (error) {
|
|
112
|
-
console.error("Error copying command", error);
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
116
|
-
}, [isCopied, content, delay, onClick, onCopy, handleIsCopied]);
|
|
117
|
-
return (React.createElement(react_1.motion.button, __assign({ "data-slot": "copy-button", whileHover: { scale: 1.05 }, whileTap: { scale: 0.95 }, className: (0, utils_1.cn)(buttonVariants({ variant: variant, size: size }), className), onClick: handleCopy }, props),
|
|
118
|
-
React.createElement(react_1.AnimatePresence, { mode: "wait" },
|
|
119
|
-
React.createElement(react_1.motion.span, { key: localIsCopied ? "check" : "copy", "data-slot": "copy-button-icon", initial: { scale: 0 }, animate: { scale: 1 }, exit: { scale: 0 }, transition: { duration: 0.15 } },
|
|
120
|
-
React.createElement(Icon, null)))));
|
|
121
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from "react";
|
|
2
|
-
import type { DropEvent, DropzoneOptions, FileRejection } from "react-dropzone";
|
|
3
|
-
export type DropzoneProps = Omit<DropzoneOptions, "onDrop"> & {
|
|
4
|
-
src?: File[];
|
|
5
|
-
className?: string;
|
|
6
|
-
onDrop?: (acceptedFiles: File[], fileRejections: FileRejection[], event: DropEvent) => void;
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
};
|
|
9
|
-
export declare const Dropzone: ({ accept, maxFiles, maxSize, minSize, onDrop, onError, disabled, src, className, children, ...props }: DropzoneProps) => React.JSX.Element;
|
|
10
|
-
export type DropzoneContentProps = {
|
|
11
|
-
children?: ReactNode;
|
|
12
|
-
className?: string;
|
|
13
|
-
};
|
|
14
|
-
export declare const DropzoneContent: ({ children, className, }: DropzoneContentProps) => string | number | bigint | true | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null;
|
|
15
|
-
export type DropzoneEmptyStateProps = {
|
|
16
|
-
children?: ReactNode;
|
|
17
|
-
className?: string;
|
|
18
|
-
};
|
|
19
|
-
export declare const DropzoneEmptyState: ({ children, className, }: DropzoneEmptyStateProps) => string | number | bigint | true | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null;
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
var __assign = (this && this.__assign) || function () {
|
|
4
|
-
__assign = Object.assign || function(t) {
|
|
5
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
-
s = arguments[i];
|
|
7
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
8
|
-
t[p] = s[p];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
return __assign.apply(this, arguments);
|
|
13
|
-
};
|
|
14
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
15
|
-
var t = {};
|
|
16
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
17
|
-
t[p] = s[p];
|
|
18
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
19
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
20
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
21
|
-
t[p[i]] = s[p[i]];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.DropzoneEmptyState = exports.DropzoneContent = exports.Dropzone = void 0;
|
|
30
|
-
var lucide_react_1 = require("lucide-react");
|
|
31
|
-
var react_1 = __importDefault(require("react"));
|
|
32
|
-
var react_2 = require("react");
|
|
33
|
-
var react_dropzone_1 = require("react-dropzone");
|
|
34
|
-
var button_1 = require("../../ui/button");
|
|
35
|
-
var utils_1 = require("../../../lib/utils");
|
|
36
|
-
var renderBytes = function (bytes) {
|
|
37
|
-
var units = ["B", "KB", "MB", "GB", "TB", "PB"];
|
|
38
|
-
var size = bytes;
|
|
39
|
-
var unitIndex = 0;
|
|
40
|
-
while (size >= 1024 && unitIndex < units.length - 1) {
|
|
41
|
-
size /= 1024;
|
|
42
|
-
unitIndex++;
|
|
43
|
-
}
|
|
44
|
-
return "".concat(size.toFixed(2)).concat(units[unitIndex]);
|
|
45
|
-
};
|
|
46
|
-
var DropzoneContext = (0, react_2.createContext)(undefined);
|
|
47
|
-
var Dropzone = function (_a) {
|
|
48
|
-
var accept = _a.accept, _b = _a.maxFiles, maxFiles = _b === void 0 ? 1 : _b, maxSize = _a.maxSize, minSize = _a.minSize, onDrop = _a.onDrop, onError = _a.onError, disabled = _a.disabled, src = _a.src, className = _a.className, children = _a.children, props = __rest(_a, ["accept", "maxFiles", "maxSize", "minSize", "onDrop", "onError", "disabled", "src", "className", "children"]);
|
|
49
|
-
var _c = (0, react_dropzone_1.useDropzone)(__assign({ accept: accept, maxFiles: maxFiles, maxSize: maxSize, minSize: minSize, onError: onError, disabled: disabled, onDrop: function (acceptedFiles, fileRejections, event) {
|
|
50
|
-
var _a, _b;
|
|
51
|
-
if (fileRejections.length > 0) {
|
|
52
|
-
var message = (_b = (_a = fileRejections.at(0)) === null || _a === void 0 ? void 0 : _a.errors.at(0)) === null || _b === void 0 ? void 0 : _b.message;
|
|
53
|
-
onError === null || onError === void 0 ? void 0 : onError(new Error(message));
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
onDrop === null || onDrop === void 0 ? void 0 : onDrop(acceptedFiles, fileRejections, event);
|
|
57
|
-
} }, props)), getRootProps = _c.getRootProps, getInputProps = _c.getInputProps, isDragActive = _c.isDragActive;
|
|
58
|
-
return (react_1.default.createElement(DropzoneContext.Provider, { key: JSON.stringify(src), value: { src: src, accept: accept, maxSize: maxSize, minSize: minSize, maxFiles: maxFiles } },
|
|
59
|
-
react_1.default.createElement(button_1.Button, __assign({ className: (0, utils_1.cn)("relative h-auto w-full flex-col overflow-hidden p-8", isDragActive && "outline-none ring-1 ring-ring", className), disabled: disabled, type: "button", variant: "outline" }, getRootProps()),
|
|
60
|
-
react_1.default.createElement("input", __assign({}, getInputProps(), { disabled: disabled })),
|
|
61
|
-
children)));
|
|
62
|
-
};
|
|
63
|
-
exports.Dropzone = Dropzone;
|
|
64
|
-
var maxLabelItems = 3;
|
|
65
|
-
var DropzoneContent = function (_a) {
|
|
66
|
-
var children = _a.children, className = _a.className;
|
|
67
|
-
// Use useContext directly here so the component is safe to render even when
|
|
68
|
-
// there is no surrounding <Dropzone /> provider (avoids an exception during
|
|
69
|
-
// SSR or when a consumer imports DropzoneContent standalone).
|
|
70
|
-
var context = (0, react_2.useContext)(DropzoneContext);
|
|
71
|
-
if (!context) {
|
|
72
|
-
return null;
|
|
73
|
-
}
|
|
74
|
-
var src = context.src;
|
|
75
|
-
if (!src) {
|
|
76
|
-
return null;
|
|
77
|
-
}
|
|
78
|
-
if (children) {
|
|
79
|
-
return children;
|
|
80
|
-
}
|
|
81
|
-
return (react_1.default.createElement("div", { className: (0, utils_1.cn)("flex flex-col items-center justify-center", className) },
|
|
82
|
-
react_1.default.createElement("div", { className: "flex size-8 items-center justify-center rounded-md bg-muted text-muted-foreground" },
|
|
83
|
-
react_1.default.createElement(lucide_react_1.UploadIcon, { size: 16 })),
|
|
84
|
-
react_1.default.createElement("p", { className: "my-2 w-full truncate font-medium text-sm" }, src.length > maxLabelItems
|
|
85
|
-
? "".concat(new Intl.ListFormat("en").format(src.slice(0, maxLabelItems).map(function (file) { return file.name; })), " and ").concat(src.length - maxLabelItems, " more")
|
|
86
|
-
: new Intl.ListFormat("en").format(src.map(function (file) { return file.name; }))),
|
|
87
|
-
react_1.default.createElement("p", { className: "w-full text-wrap text-muted-foreground text-xs" }, "Drag and drop or click to replace")));
|
|
88
|
-
};
|
|
89
|
-
exports.DropzoneContent = DropzoneContent;
|
|
90
|
-
var DropzoneEmptyState = function (_a) {
|
|
91
|
-
var children = _a.children, className = _a.className;
|
|
92
|
-
// Read context directly and return null when a Dropzone provider isn't
|
|
93
|
-
// present. This keeps the empty state component safe to import and render
|
|
94
|
-
// without requiring the wrapping Dropzone component.
|
|
95
|
-
var context = (0, react_2.useContext)(DropzoneContext);
|
|
96
|
-
if (!context) {
|
|
97
|
-
return null;
|
|
98
|
-
}
|
|
99
|
-
var src = context.src, accept = context.accept, maxSize = context.maxSize, minSize = context.minSize, maxFiles = context.maxFiles;
|
|
100
|
-
if (src) {
|
|
101
|
-
return null;
|
|
102
|
-
}
|
|
103
|
-
if (children) {
|
|
104
|
-
return children;
|
|
105
|
-
}
|
|
106
|
-
var caption = "";
|
|
107
|
-
if (accept) {
|
|
108
|
-
caption += "Accepts ";
|
|
109
|
-
caption += new Intl.ListFormat("en").format(Object.keys(accept));
|
|
110
|
-
}
|
|
111
|
-
if (minSize && maxSize) {
|
|
112
|
-
caption += " between ".concat(renderBytes(minSize), " and ").concat(renderBytes(maxSize));
|
|
113
|
-
}
|
|
114
|
-
else if (minSize) {
|
|
115
|
-
caption += " at least ".concat(renderBytes(minSize));
|
|
116
|
-
}
|
|
117
|
-
else if (maxSize) {
|
|
118
|
-
caption += " less than ".concat(renderBytes(maxSize));
|
|
119
|
-
}
|
|
120
|
-
return (react_1.default.createElement("div", { className: (0, utils_1.cn)("flex flex-col items-center justify-center", className) },
|
|
121
|
-
react_1.default.createElement("div", { className: "flex size-8 items-center justify-center rounded-md bg-muted text-muted-foreground" },
|
|
122
|
-
react_1.default.createElement(lucide_react_1.UploadIcon, { size: 16 })),
|
|
123
|
-
react_1.default.createElement("p", { className: "my-2 w-full truncate text-wrap font-medium text-sm" },
|
|
124
|
-
"Upload ",
|
|
125
|
-
maxFiles === 1 ? "a file" : "files"),
|
|
126
|
-
react_1.default.createElement("p", { className: "w-full truncate text-wrap text-muted-foreground text-xs" }, "Drag and drop or click to upload"),
|
|
127
|
-
caption && (react_1.default.createElement("p", { className: "text-wrap text-muted-foreground text-xs" },
|
|
128
|
-
caption,
|
|
129
|
-
"."))));
|
|
130
|
-
};
|
|
131
|
-
exports.DropzoneEmptyState = DropzoneEmptyState;
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import type { FC, ReactNode, RefObject } from "react";
|
|
2
|
-
export declare const useGanttDragging: () => [boolean, (args_0: boolean | ((prev: boolean) => boolean)) => void];
|
|
3
|
-
export declare const useGanttScrollX: () => [number, (args_0: number | ((prev: number) => number)) => void];
|
|
4
|
-
export type GanttStatus = {
|
|
5
|
-
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
color: string;
|
|
8
|
-
};
|
|
9
|
-
export type GanttFeature = {
|
|
10
|
-
id: string;
|
|
11
|
-
name: string;
|
|
12
|
-
startAt: Date;
|
|
13
|
-
endAt: Date;
|
|
14
|
-
status: GanttStatus;
|
|
15
|
-
lane?: string;
|
|
16
|
-
};
|
|
17
|
-
export type GanttMarkerProps = {
|
|
18
|
-
id: string;
|
|
19
|
-
date: Date;
|
|
20
|
-
label: string;
|
|
21
|
-
};
|
|
22
|
-
export type Range = "daily" | "monthly" | "quarterly";
|
|
23
|
-
export type TimelineData = {
|
|
24
|
-
year: number;
|
|
25
|
-
quarters: {
|
|
26
|
-
months: {
|
|
27
|
-
days: number;
|
|
28
|
-
}[];
|
|
29
|
-
}[];
|
|
30
|
-
}[];
|
|
31
|
-
export type GanttContextProps = {
|
|
32
|
-
zoom: number;
|
|
33
|
-
range: Range;
|
|
34
|
-
columnWidth: number;
|
|
35
|
-
sidebarWidth: number;
|
|
36
|
-
headerHeight: number;
|
|
37
|
-
rowHeight: number;
|
|
38
|
-
onAddItem: ((date: Date) => void) | undefined;
|
|
39
|
-
placeholderLength: number;
|
|
40
|
-
timelineData: TimelineData;
|
|
41
|
-
ref: RefObject<HTMLDivElement | null> | null;
|
|
42
|
-
scrollToFeature?: (feature: GanttFeature) => void;
|
|
43
|
-
};
|
|
44
|
-
export type GanttContentHeaderProps = {
|
|
45
|
-
renderHeaderItem: (index: number) => ReactNode;
|
|
46
|
-
title: string;
|
|
47
|
-
columns: number;
|
|
48
|
-
};
|
|
49
|
-
export declare const GanttContentHeader: FC<GanttContentHeaderProps>;
|
|
50
|
-
export type GanttHeaderProps = {
|
|
51
|
-
className?: string;
|
|
52
|
-
};
|
|
53
|
-
export declare const GanttHeader: FC<GanttHeaderProps>;
|
|
54
|
-
export type GanttSidebarItemProps = {
|
|
55
|
-
feature: GanttFeature;
|
|
56
|
-
onSelectItem?: (id: string) => void;
|
|
57
|
-
className?: string;
|
|
58
|
-
};
|
|
59
|
-
export declare const GanttSidebarItem: FC<GanttSidebarItemProps>;
|
|
60
|
-
export declare const GanttSidebarHeader: FC;
|
|
61
|
-
export type GanttSidebarGroupProps = {
|
|
62
|
-
children: ReactNode;
|
|
63
|
-
name: string;
|
|
64
|
-
className?: string;
|
|
65
|
-
};
|
|
66
|
-
export declare const GanttSidebarGroup: FC<GanttSidebarGroupProps>;
|
|
67
|
-
export type GanttSidebarProps = {
|
|
68
|
-
children: ReactNode;
|
|
69
|
-
className?: string;
|
|
70
|
-
};
|
|
71
|
-
export declare const GanttSidebar: FC<GanttSidebarProps>;
|
|
72
|
-
export type GanttAddFeatureHelperProps = {
|
|
73
|
-
top: number;
|
|
74
|
-
className?: string;
|
|
75
|
-
};
|
|
76
|
-
export declare const GanttAddFeatureHelper: FC<GanttAddFeatureHelperProps>;
|
|
77
|
-
export type GanttColumnProps = {
|
|
78
|
-
index: number;
|
|
79
|
-
isColumnSecondary?: (item: number) => boolean;
|
|
80
|
-
};
|
|
81
|
-
export declare const GanttColumn: FC<GanttColumnProps>;
|
|
82
|
-
export type GanttColumnsProps = {
|
|
83
|
-
columns: number;
|
|
84
|
-
isColumnSecondary?: (item: number) => boolean;
|
|
85
|
-
};
|
|
86
|
-
export declare const GanttColumns: FC<GanttColumnsProps>;
|
|
87
|
-
export type GanttCreateMarkerTriggerProps = {
|
|
88
|
-
onCreateMarker: (date: Date) => void;
|
|
89
|
-
className?: string;
|
|
90
|
-
};
|
|
91
|
-
export declare const GanttCreateMarkerTrigger: FC<GanttCreateMarkerTriggerProps>;
|
|
92
|
-
export type GanttFeatureDragHelperProps = {
|
|
93
|
-
featureId: GanttFeature["id"];
|
|
94
|
-
direction: "left" | "right";
|
|
95
|
-
date: Date | null;
|
|
96
|
-
};
|
|
97
|
-
export declare const GanttFeatureDragHelper: FC<GanttFeatureDragHelperProps>;
|
|
98
|
-
export type GanttFeatureItemCardProps = Pick<GanttFeature, "id"> & {
|
|
99
|
-
children?: ReactNode;
|
|
100
|
-
};
|
|
101
|
-
export declare const GanttFeatureItemCard: FC<GanttFeatureItemCardProps>;
|
|
102
|
-
export type GanttFeatureItemProps = GanttFeature & {
|
|
103
|
-
onMove?: (id: string, startDate: Date, endDate: Date | null) => void;
|
|
104
|
-
children?: ReactNode;
|
|
105
|
-
className?: string;
|
|
106
|
-
};
|
|
107
|
-
export declare const GanttFeatureItem: FC<GanttFeatureItemProps>;
|
|
108
|
-
export type GanttFeatureListGroupProps = {
|
|
109
|
-
children: ReactNode;
|
|
110
|
-
className?: string;
|
|
111
|
-
};
|
|
112
|
-
export declare const GanttFeatureListGroup: FC<GanttFeatureListGroupProps>;
|
|
113
|
-
export type GanttFeatureRowProps = {
|
|
114
|
-
features: GanttFeature[];
|
|
115
|
-
onMove?: (id: string, startAt: Date, endAt: Date | null) => void;
|
|
116
|
-
children?: (feature: GanttFeature) => ReactNode;
|
|
117
|
-
className?: string;
|
|
118
|
-
};
|
|
119
|
-
export declare const GanttFeatureRow: FC<GanttFeatureRowProps>;
|
|
120
|
-
export type GanttFeatureListProps = {
|
|
121
|
-
className?: string;
|
|
122
|
-
children: ReactNode;
|
|
123
|
-
};
|
|
124
|
-
export declare const GanttFeatureList: FC<GanttFeatureListProps>;
|
|
125
|
-
export declare const GanttMarker: FC<GanttMarkerProps & {
|
|
126
|
-
onRemove?: (id: string) => void;
|
|
127
|
-
className?: string;
|
|
128
|
-
}>;
|
|
129
|
-
export type GanttProviderProps = {
|
|
130
|
-
range?: Range;
|
|
131
|
-
zoom?: number;
|
|
132
|
-
onAddItem?: (date: Date) => void;
|
|
133
|
-
children: ReactNode;
|
|
134
|
-
className?: string;
|
|
135
|
-
};
|
|
136
|
-
export declare const GanttProvider: FC<GanttProviderProps>;
|
|
137
|
-
export type GanttTimelineProps = {
|
|
138
|
-
children: ReactNode;
|
|
139
|
-
className?: string;
|
|
140
|
-
};
|
|
141
|
-
export declare const GanttTimeline: FC<GanttTimelineProps>;
|
|
142
|
-
export type GanttTodayProps = {
|
|
143
|
-
className?: string;
|
|
144
|
-
};
|
|
145
|
-
export declare const GanttToday: FC<GanttTodayProps>;
|