@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,48 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
-
var ownKeys = function(o) {
|
|
31
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
-
var ar = [];
|
|
33
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
-
return ar;
|
|
35
|
-
};
|
|
36
|
-
return ownKeys(o);
|
|
37
|
-
};
|
|
38
|
-
return function (mod) {
|
|
39
|
-
if (mod && mod.__esModule) return mod;
|
|
40
|
-
var result = {};
|
|
41
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
-
__setModuleDefault(result, mod);
|
|
43
|
-
return result;
|
|
44
|
-
};
|
|
45
|
-
})();
|
|
46
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
47
2
|
var t = {};
|
|
48
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -54,54 +9,46 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
54
9
|
}
|
|
55
10
|
return t;
|
|
56
11
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
var react_icons_1 = require("@radix-ui/react-icons");
|
|
63
|
-
var Breadcrumb = React.forwardRef(function (_a, ref) {
|
|
12
|
+
import * as React from "react";
|
|
13
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
14
|
+
import { cn } from "../../lib/utils";
|
|
15
|
+
import { ChevronRightIcon, DotsHorizontalIcon } from "@radix-ui/react-icons";
|
|
16
|
+
const Breadcrumb = React.forwardRef((_a, ref) => {
|
|
64
17
|
var props = __rest(_a, []);
|
|
65
|
-
return React.createElement("nav",
|
|
18
|
+
return React.createElement("nav", Object.assign({ ref: ref, "aria-label": "breadcrumb" }, props));
|
|
66
19
|
});
|
|
67
|
-
exports.Breadcrumb = Breadcrumb;
|
|
68
20
|
Breadcrumb.displayName = "Breadcrumb";
|
|
69
|
-
|
|
70
|
-
var className = _a
|
|
71
|
-
return (React.createElement("ol",
|
|
21
|
+
const BreadcrumbList = React.forwardRef((_a, ref) => {
|
|
22
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
23
|
+
return (React.createElement("ol", Object.assign({ ref: ref, className: cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5", className) }, props)));
|
|
72
24
|
});
|
|
73
|
-
exports.BreadcrumbList = BreadcrumbList;
|
|
74
25
|
BreadcrumbList.displayName = "BreadcrumbList";
|
|
75
|
-
|
|
76
|
-
var className = _a
|
|
77
|
-
return (React.createElement("li",
|
|
26
|
+
const BreadcrumbItem = React.forwardRef((_a, ref) => {
|
|
27
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
28
|
+
return (React.createElement("li", Object.assign({ ref: ref, className: cn("inline-flex items-center gap-1.5", className) }, props)));
|
|
78
29
|
});
|
|
79
|
-
exports.BreadcrumbItem = BreadcrumbItem;
|
|
80
30
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
81
|
-
|
|
82
|
-
var
|
|
83
|
-
|
|
84
|
-
return (React.createElement(Comp,
|
|
31
|
+
const BreadcrumbLink = React.forwardRef((_a, ref) => {
|
|
32
|
+
var { asChild, className } = _a, props = __rest(_a, ["asChild", "className"]);
|
|
33
|
+
const Comp = asChild ? Slot : "a";
|
|
34
|
+
return (React.createElement(Comp, Object.assign({ ref: ref, className: cn("transition-colors hover:text-foreground", className) }, props)));
|
|
85
35
|
});
|
|
86
|
-
exports.BreadcrumbLink = BreadcrumbLink;
|
|
87
36
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
88
|
-
|
|
89
|
-
var className = _a
|
|
90
|
-
return (React.createElement("span",
|
|
37
|
+
const BreadcrumbPage = React.forwardRef((_a, ref) => {
|
|
38
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
39
|
+
return (React.createElement("span", Object.assign({ ref: ref, role: "link", "aria-disabled": "true", "aria-current": "page", className: cn("font-normal text-foreground", className) }, props)));
|
|
91
40
|
});
|
|
92
|
-
exports.BreadcrumbPage = BreadcrumbPage;
|
|
93
41
|
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
94
|
-
|
|
95
|
-
var
|
|
96
|
-
return (React.createElement("li",
|
|
42
|
+
const BreadcrumbSeparator = (_a) => {
|
|
43
|
+
var { children, className } = _a, props = __rest(_a, ["children", "className"]);
|
|
44
|
+
return (React.createElement("li", Object.assign({ role: "presentation", "aria-hidden": "true", className: cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className) }, props), children !== null && children !== void 0 ? children : React.createElement(ChevronRightIcon, null)));
|
|
97
45
|
};
|
|
98
|
-
exports.BreadcrumbSeparator = BreadcrumbSeparator;
|
|
99
46
|
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
100
|
-
|
|
101
|
-
var className = _a
|
|
102
|
-
return (React.createElement("span",
|
|
103
|
-
React.createElement(
|
|
47
|
+
const BreadcrumbEllipsis = (_a) => {
|
|
48
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
49
|
+
return (React.createElement("span", Object.assign({ role: "presentation", "aria-hidden": "true", className: cn("flex h-9 w-9 items-center justify-center", className) }, props),
|
|
50
|
+
React.createElement(DotsHorizontalIcon, { className: "h-4 w-4" }),
|
|
104
51
|
React.createElement("span", { className: "sr-only" }, "More")));
|
|
105
52
|
};
|
|
106
|
-
exports.BreadcrumbEllipsis = BreadcrumbEllipsis;
|
|
107
53
|
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
54
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "link" | "
|
|
4
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
5
|
size?: "icon" | "default" | "sm" | "lg" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
8
|
asChild?: boolean;
|
|
9
9
|
}
|
package/components/ui/button.js
CHANGED
|
@@ -1,48 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
-
var ownKeys = function(o) {
|
|
31
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
-
var ar = [];
|
|
33
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
-
return ar;
|
|
35
|
-
};
|
|
36
|
-
return ownKeys(o);
|
|
37
|
-
};
|
|
38
|
-
return function (mod) {
|
|
39
|
-
if (mod && mod.__esModule) return mod;
|
|
40
|
-
var result = {};
|
|
41
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
-
__setModuleDefault(result, mod);
|
|
43
|
-
return result;
|
|
44
|
-
};
|
|
45
|
-
})();
|
|
46
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
47
2
|
var t = {};
|
|
48
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -54,13 +9,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
54
9
|
}
|
|
55
10
|
return t;
|
|
56
11
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
var utils_1 = require("../../lib/utils");
|
|
63
|
-
var buttonVariants = (0, class_variance_authority_1.cva)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
|
|
12
|
+
import * as React from "react";
|
|
13
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
14
|
+
import { cva } from "class-variance-authority";
|
|
15
|
+
import { cn } from "../../lib/utils";
|
|
16
|
+
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
|
|
64
17
|
variants: {
|
|
65
18
|
variant: {
|
|
66
19
|
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
@@ -82,11 +35,10 @@ var buttonVariants = (0, class_variance_authority_1.cva)("inline-flex items-cent
|
|
|
82
35
|
size: "default",
|
|
83
36
|
},
|
|
84
37
|
});
|
|
85
|
-
|
|
86
|
-
var
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
return (React.createElement(Comp, __assign({ className: (0, utils_1.cn)(buttonVariants({ variant: variant, size: size, className: className })), ref: ref }, props)));
|
|
38
|
+
const Button = React.forwardRef((_a, ref) => {
|
|
39
|
+
var { className, variant, size, asChild = false } = _a, props = __rest(_a, ["className", "variant", "size", "asChild"]);
|
|
40
|
+
const Comp = asChild ? Slot : "button";
|
|
41
|
+
return (React.createElement(Comp, Object.assign({ className: cn(buttonVariants({ variant, size, className })), ref: ref }, props)));
|
|
90
42
|
});
|
|
91
|
-
exports.Button = Button;
|
|
92
43
|
Button.displayName = "Button";
|
|
44
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { DayButton, DayPicker } from "react-day-picker";
|
|
3
|
+
import { Button } from "../ui/button";
|
|
4
|
+
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
|
|
5
|
+
buttonVariant?: React.ComponentProps<typeof Button>["variant"];
|
|
6
|
+
}): React.JSX.Element;
|
|
7
|
+
declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): React.JSX.Element;
|
|
8
|
+
export { Calendar, CalendarDayButton };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import * as React from "react";
|
|
14
|
+
import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, } from "lucide-react";
|
|
15
|
+
import { DayPicker, getDefaultClassNames } from "react-day-picker";
|
|
16
|
+
import { cn } from "../../lib/utils";
|
|
17
|
+
import { Button, buttonVariants } from "../ui/button";
|
|
18
|
+
function Calendar(_a) {
|
|
19
|
+
var { className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", formatters, components } = _a, props = __rest(_a, ["className", "classNames", "showOutsideDays", "captionLayout", "buttonVariant", "formatters", "components"]);
|
|
20
|
+
const defaultClassNames = getDefaultClassNames();
|
|
21
|
+
return (React.createElement(DayPicker, Object.assign({ showOutsideDays: showOutsideDays, className: cn("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent", String.raw `rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw `rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className), captionLayout: captionLayout, formatters: Object.assign({ formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }) }, formatters), classNames: Object.assign({ root: cn("w-fit", defaultClassNames.root), months: cn("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months), month: cn("flex w-full flex-col gap-4", defaultClassNames.month), nav: cn("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", defaultClassNames.nav), button_previous: cn(buttonVariants({ variant: buttonVariant }), "h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50", defaultClassNames.button_previous), button_next: cn(buttonVariants({ variant: buttonVariant }), "h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50", defaultClassNames.button_next), month_caption: cn("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]", defaultClassNames.month_caption), dropdowns: cn("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium", defaultClassNames.dropdowns), dropdown_root: cn("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border", defaultClassNames.dropdown_root), dropdown: cn("bg-popover absolute inset-0 opacity-0", defaultClassNames.dropdown), caption_label: cn("select-none font-medium", captionLayout === "label"
|
|
22
|
+
? "text-sm"
|
|
23
|
+
: "[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5", defaultClassNames.caption_label), table: "w-full border-collapse", weekdays: cn("flex", defaultClassNames.weekdays), weekday: cn("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal", defaultClassNames.weekday), week: cn("mt-2 flex w-full", defaultClassNames.week), week_number_header: cn("w-[--cell-size] select-none", defaultClassNames.week_number_header), week_number: cn("text-muted-foreground select-none text-[0.8rem]", defaultClassNames.week_number), day: cn("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md", defaultClassNames.day), range_start: cn("bg-accent rounded-l-md", defaultClassNames.range_start), range_middle: cn("rounded-none", defaultClassNames.range_middle), range_end: cn("bg-accent rounded-r-md", defaultClassNames.range_end), today: cn("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none", defaultClassNames.today), outside: cn("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside), disabled: cn("text-muted-foreground opacity-50", defaultClassNames.disabled), hidden: cn("invisible", defaultClassNames.hidden) }, classNames), components: Object.assign({ Root: (_a) => {
|
|
24
|
+
var { className, rootRef } = _a, props = __rest(_a, ["className", "rootRef"]);
|
|
25
|
+
return (React.createElement("div", Object.assign({ "data-slot": "calendar", ref: rootRef, className: cn(className) }, props)));
|
|
26
|
+
}, Chevron: (_a) => {
|
|
27
|
+
var { className, orientation } = _a, props = __rest(_a, ["className", "orientation"]);
|
|
28
|
+
if (orientation === "left") {
|
|
29
|
+
return (React.createElement(ChevronLeftIcon, Object.assign({ className: cn("size-4", className) }, props)));
|
|
30
|
+
}
|
|
31
|
+
if (orientation === "right") {
|
|
32
|
+
return (React.createElement(ChevronRightIcon, Object.assign({ className: cn("size-4", className) }, props)));
|
|
33
|
+
}
|
|
34
|
+
return (React.createElement(ChevronDownIcon, Object.assign({ className: cn("size-4", className) }, props)));
|
|
35
|
+
}, DayButton: CalendarDayButton, WeekNumber: (_a) => {
|
|
36
|
+
var { children } = _a, props = __rest(_a, ["children"]);
|
|
37
|
+
return (React.createElement("td", Object.assign({}, props),
|
|
38
|
+
React.createElement("div", { className: "flex size-[--cell-size] items-center justify-center text-center" }, children)));
|
|
39
|
+
} }, components) }, props)));
|
|
40
|
+
}
|
|
41
|
+
function CalendarDayButton(_a) {
|
|
42
|
+
var { className, day, modifiers } = _a, props = __rest(_a, ["className", "day", "modifiers"]);
|
|
43
|
+
const defaultClassNames = getDefaultClassNames();
|
|
44
|
+
const ref = React.useRef(null);
|
|
45
|
+
React.useEffect(() => {
|
|
46
|
+
var _a;
|
|
47
|
+
if (modifiers.focused)
|
|
48
|
+
(_a = ref.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
49
|
+
}, [modifiers.focused]);
|
|
50
|
+
return (React.createElement(Button, Object.assign({ ref: ref, variant: "ghost", size: "icon", "data-day": day.date.toLocaleDateString(), "data-selected-single": modifiers.selected &&
|
|
51
|
+
!modifiers.range_start &&
|
|
52
|
+
!modifiers.range_end &&
|
|
53
|
+
!modifiers.range_middle, "data-range-start": modifiers.range_start, "data-range-end": modifiers.range_end, "data-range-middle": modifiers.range_middle, className: cn("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className) }, props)));
|
|
54
|
+
}
|
|
55
|
+
export { Calendar, CalendarDayButton };
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { Button } from "../ui/button";
|
|
4
|
-
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
|
|
5
|
-
buttonVariant?: React.ComponentProps<typeof Button>["variant"];
|
|
6
|
-
}): React.JSX.Element;
|
|
7
|
-
declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): React.JSX.Element;
|
|
8
|
-
export { Calendar, CalendarDayButton };
|
|
1
|
+
export declare const Calendar: typeof import("./calendar-impl")["Calendar"];
|
|
2
|
+
export declare const CalendarDayButton: typeof import("./calendar-impl")["CalendarDayButton"];
|
|
@@ -1,109 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var __assign = (this && this.__assign) || function () {
|
|
8
|
-
__assign = Object.assign || function(t) {
|
|
9
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
10
|
-
s = arguments[i];
|
|
11
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
12
|
-
t[p] = s[p];
|
|
13
|
-
}
|
|
14
|
-
return t;
|
|
15
|
-
};
|
|
16
|
-
return __assign.apply(this, arguments);
|
|
17
|
-
};
|
|
18
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
19
|
-
if (k2 === undefined) k2 = k;
|
|
20
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
21
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
22
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
23
|
-
}
|
|
24
|
-
Object.defineProperty(o, k2, desc);
|
|
25
|
-
}) : (function(o, m, k, k2) {
|
|
26
|
-
if (k2 === undefined) k2 = k;
|
|
27
|
-
o[k2] = m[k];
|
|
28
|
-
}));
|
|
29
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
30
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
31
|
-
}) : function(o, v) {
|
|
32
|
-
o["default"] = v;
|
|
33
|
-
});
|
|
34
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
35
|
-
var ownKeys = function(o) {
|
|
36
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
37
|
-
var ar = [];
|
|
38
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
39
|
-
return ar;
|
|
40
|
-
};
|
|
41
|
-
return ownKeys(o);
|
|
42
|
-
};
|
|
43
|
-
return function (mod) {
|
|
44
|
-
if (mod && mod.__esModule) return mod;
|
|
45
|
-
var result = {};
|
|
46
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
47
|
-
__setModuleDefault(result, mod);
|
|
48
|
-
return result;
|
|
49
|
-
};
|
|
50
|
-
})();
|
|
51
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
52
|
-
var t = {};
|
|
53
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
54
|
-
t[p] = s[p];
|
|
55
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
56
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
57
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
58
|
-
t[p[i]] = s[p[i]];
|
|
59
|
-
}
|
|
60
|
-
return t;
|
|
61
|
-
};
|
|
62
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
63
|
-
exports.Calendar = Calendar;
|
|
64
|
-
exports.CalendarDayButton = CalendarDayButton;
|
|
65
|
-
var React = __importStar(require("react"));
|
|
66
|
-
var lucide_react_1 = require("lucide-react");
|
|
67
|
-
var react_day_picker_1 = require("react-day-picker");
|
|
68
|
-
var utils_1 = require("../../lib/utils");
|
|
69
|
-
var button_1 = require("../ui/button");
|
|
70
|
-
function Calendar(_a) {
|
|
71
|
-
var className = _a.className, classNames = _a.classNames, _b = _a.showOutsideDays, showOutsideDays = _b === void 0 ? true : _b, _c = _a.captionLayout, captionLayout = _c === void 0 ? "label" : _c, _d = _a.buttonVariant, buttonVariant = _d === void 0 ? "ghost" : _d, formatters = _a.formatters, components = _a.components, props = __rest(_a, ["className", "classNames", "showOutsideDays", "captionLayout", "buttonVariant", "formatters", "components"]);
|
|
72
|
-
var defaultClassNames = (0, react_day_picker_1.getDefaultClassNames)();
|
|
73
|
-
return (React.createElement(react_day_picker_1.DayPicker, __assign({ showOutsideDays: showOutsideDays, className: (0, utils_1.cn)("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent", String.raw(templateObject_1 || (templateObject_1 = __makeTemplateObject(["rtl:**:[.rdp-button_next>svg]:rotate-180"], ["rtl:**:[.rdp-button\\_next>svg]:rotate-180"]))), String.raw(templateObject_2 || (templateObject_2 = __makeTemplateObject(["rtl:**:[.rdp-button_previous>svg]:rotate-180"], ["rtl:**:[.rdp-button\\_previous>svg]:rotate-180"]))), className), captionLayout: captionLayout, formatters: __assign({ formatMonthDropdown: function (date) {
|
|
74
|
-
return date.toLocaleString("default", { month: "short" });
|
|
75
|
-
} }, formatters), classNames: __assign({ root: (0, utils_1.cn)("w-fit", defaultClassNames.root), months: (0, utils_1.cn)("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months), month: (0, utils_1.cn)("flex w-full flex-col gap-4", defaultClassNames.month), nav: (0, utils_1.cn)("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", defaultClassNames.nav), button_previous: (0, utils_1.cn)((0, button_1.buttonVariants)({ variant: buttonVariant }), "h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50", defaultClassNames.button_previous), button_next: (0, utils_1.cn)((0, button_1.buttonVariants)({ variant: buttonVariant }), "h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50", defaultClassNames.button_next), month_caption: (0, utils_1.cn)("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]", defaultClassNames.month_caption), dropdowns: (0, utils_1.cn)("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium", defaultClassNames.dropdowns), dropdown_root: (0, utils_1.cn)("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border", defaultClassNames.dropdown_root), dropdown: (0, utils_1.cn)("bg-popover absolute inset-0 opacity-0", defaultClassNames.dropdown), caption_label: (0, utils_1.cn)("select-none font-medium", captionLayout === "label"
|
|
76
|
-
? "text-sm"
|
|
77
|
-
: "[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5", defaultClassNames.caption_label), table: "w-full border-collapse", weekdays: (0, utils_1.cn)("flex", defaultClassNames.weekdays), weekday: (0, utils_1.cn)("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal", defaultClassNames.weekday), week: (0, utils_1.cn)("mt-2 flex w-full", defaultClassNames.week), week_number_header: (0, utils_1.cn)("w-[--cell-size] select-none", defaultClassNames.week_number_header), week_number: (0, utils_1.cn)("text-muted-foreground select-none text-[0.8rem]", defaultClassNames.week_number), day: (0, utils_1.cn)("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md", defaultClassNames.day), range_start: (0, utils_1.cn)("bg-accent rounded-l-md", defaultClassNames.range_start), range_middle: (0, utils_1.cn)("rounded-none", defaultClassNames.range_middle), range_end: (0, utils_1.cn)("bg-accent rounded-r-md", defaultClassNames.range_end), today: (0, utils_1.cn)("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none", defaultClassNames.today), outside: (0, utils_1.cn)("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside), disabled: (0, utils_1.cn)("text-muted-foreground opacity-50", defaultClassNames.disabled), hidden: (0, utils_1.cn)("invisible", defaultClassNames.hidden) }, classNames), components: __assign({ Root: function (_a) {
|
|
78
|
-
var className = _a.className, rootRef = _a.rootRef, props = __rest(_a, ["className", "rootRef"]);
|
|
79
|
-
return (React.createElement("div", __assign({ "data-slot": "calendar", ref: rootRef, className: (0, utils_1.cn)(className) }, props)));
|
|
80
|
-
}, Chevron: function (_a) {
|
|
81
|
-
var className = _a.className, orientation = _a.orientation, props = __rest(_a, ["className", "orientation"]);
|
|
82
|
-
if (orientation === "left") {
|
|
83
|
-
return (React.createElement(lucide_react_1.ChevronLeftIcon, __assign({ className: (0, utils_1.cn)("size-4", className) }, props)));
|
|
84
|
-
}
|
|
85
|
-
if (orientation === "right") {
|
|
86
|
-
return (React.createElement(lucide_react_1.ChevronRightIcon, __assign({ className: (0, utils_1.cn)("size-4", className) }, props)));
|
|
87
|
-
}
|
|
88
|
-
return (React.createElement(lucide_react_1.ChevronDownIcon, __assign({ className: (0, utils_1.cn)("size-4", className) }, props)));
|
|
89
|
-
}, DayButton: CalendarDayButton, WeekNumber: function (_a) {
|
|
90
|
-
var children = _a.children, props = __rest(_a, ["children"]);
|
|
91
|
-
return (React.createElement("td", __assign({}, props),
|
|
92
|
-
React.createElement("div", { className: "flex size-[--cell-size] items-center justify-center text-center" }, children)));
|
|
93
|
-
} }, components) }, props)));
|
|
94
|
-
}
|
|
95
|
-
function CalendarDayButton(_a) {
|
|
96
|
-
var className = _a.className, day = _a.day, modifiers = _a.modifiers, props = __rest(_a, ["className", "day", "modifiers"]);
|
|
97
|
-
var defaultClassNames = (0, react_day_picker_1.getDefaultClassNames)();
|
|
98
|
-
var ref = React.useRef(null);
|
|
99
|
-
React.useEffect(function () {
|
|
100
|
-
var _a;
|
|
101
|
-
if (modifiers.focused)
|
|
102
|
-
(_a = ref.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
103
|
-
}, [modifiers.focused]);
|
|
104
|
-
return (React.createElement(button_1.Button, __assign({ ref: ref, variant: "ghost", size: "icon", "data-day": day.date.toLocaleDateString(), "data-selected-single": modifiers.selected &&
|
|
105
|
-
!modifiers.range_start &&
|
|
106
|
-
!modifiers.range_end &&
|
|
107
|
-
!modifiers.range_middle, "data-range-start": modifiers.range_start, "data-range-end": modifiers.range_end, "data-range-middle": modifiers.range_middle, className: (0, utils_1.cn)("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className) }, props)));
|
|
108
|
-
}
|
|
109
|
-
var templateObject_1, templateObject_2;
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
const module = import("./calendar-impl");
|
|
4
|
+
const lazy = (name) => React.lazy(() => module.then((m) => ({ default: m[name] })));
|
|
5
|
+
export const Calendar = lazy("Calendar");
|
|
6
|
+
export const CalendarDayButton = lazy("CalendarDayButton");
|
package/components/ui/card.js
CHANGED
|
@@ -1,48 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
-
var ownKeys = function(o) {
|
|
31
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
-
var ar = [];
|
|
33
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
-
return ar;
|
|
35
|
-
};
|
|
36
|
-
return ownKeys(o);
|
|
37
|
-
};
|
|
38
|
-
return function (mod) {
|
|
39
|
-
if (mod && mod.__esModule) return mod;
|
|
40
|
-
var result = {};
|
|
41
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
-
__setModuleDefault(result, mod);
|
|
43
|
-
return result;
|
|
44
|
-
};
|
|
45
|
-
})();
|
|
46
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
47
2
|
var t = {};
|
|
48
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -54,43 +9,36 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
54
9
|
}
|
|
55
10
|
return t;
|
|
56
11
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
var
|
|
61
|
-
|
|
62
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
63
|
-
return (React.createElement("div", __assign({ ref: ref, className: (0, utils_1.cn)("rounded-xl border bg-card text-card-foreground shadow", className) }, props)));
|
|
12
|
+
import * as React from "react";
|
|
13
|
+
import { cn } from "../../lib/utils";
|
|
14
|
+
const Card = React.forwardRef((_a, ref) => {
|
|
15
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
16
|
+
return (React.createElement("div", Object.assign({ ref: ref, className: cn("rounded-xl border bg-card text-card-foreground shadow", className) }, props)));
|
|
64
17
|
});
|
|
65
|
-
exports.Card = Card;
|
|
66
18
|
Card.displayName = "Card";
|
|
67
|
-
|
|
68
|
-
var className = _a
|
|
69
|
-
return (React.createElement("div",
|
|
19
|
+
const CardHeader = React.forwardRef((_a, ref) => {
|
|
20
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
21
|
+
return (React.createElement("div", Object.assign({ ref: ref, className: cn("flex flex-col space-y-1.5 p-6", className) }, props)));
|
|
70
22
|
});
|
|
71
|
-
exports.CardHeader = CardHeader;
|
|
72
23
|
CardHeader.displayName = "CardHeader";
|
|
73
|
-
|
|
74
|
-
var className = _a
|
|
75
|
-
return (React.createElement("div",
|
|
24
|
+
const CardTitle = React.forwardRef((_a, ref) => {
|
|
25
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
26
|
+
return (React.createElement("div", Object.assign({ ref: ref, className: cn("font-semibold leading-none tracking-tight", className) }, props)));
|
|
76
27
|
});
|
|
77
|
-
exports.CardTitle = CardTitle;
|
|
78
28
|
CardTitle.displayName = "CardTitle";
|
|
79
|
-
|
|
80
|
-
var className = _a
|
|
81
|
-
return (React.createElement("div",
|
|
29
|
+
const CardDescription = React.forwardRef((_a, ref) => {
|
|
30
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
31
|
+
return (React.createElement("div", Object.assign({ ref: ref, className: cn("text-sm text-muted-foreground", className) }, props)));
|
|
82
32
|
});
|
|
83
|
-
exports.CardDescription = CardDescription;
|
|
84
33
|
CardDescription.displayName = "CardDescription";
|
|
85
|
-
|
|
86
|
-
var className = _a
|
|
87
|
-
return (React.createElement("div",
|
|
34
|
+
const CardContent = React.forwardRef((_a, ref) => {
|
|
35
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
36
|
+
return (React.createElement("div", Object.assign({ ref: ref, className: cn("p-6 pt-0", className) }, props)));
|
|
88
37
|
});
|
|
89
|
-
exports.CardContent = CardContent;
|
|
90
38
|
CardContent.displayName = "CardContent";
|
|
91
|
-
|
|
92
|
-
var className = _a
|
|
93
|
-
return (React.createElement("div",
|
|
39
|
+
const CardFooter = React.forwardRef((_a, ref) => {
|
|
40
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
41
|
+
return (React.createElement("div", Object.assign({ ref: ref, className: cn("flex items-center p-6 pt-0", className) }, props)));
|
|
94
42
|
});
|
|
95
|
-
exports.CardFooter = CardFooter;
|
|
96
43
|
CardFooter.displayName = "CardFooter";
|
|
44
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import useEmblaCarousel, { type UseEmblaCarouselType } from "embla-carousel-react";
|
|
3
|
+
type CarouselApi = UseEmblaCarouselType[1];
|
|
4
|
+
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
5
|
+
type CarouselOptions = UseCarouselParameters[0];
|
|
6
|
+
type CarouselPlugin = UseCarouselParameters[1];
|
|
7
|
+
type CarouselProps = {
|
|
8
|
+
opts?: CarouselOptions;
|
|
9
|
+
plugins?: CarouselPlugin;
|
|
10
|
+
orientation?: "horizontal" | "vertical";
|
|
11
|
+
setApi?: (api: CarouselApi) => void;
|
|
12
|
+
};
|
|
13
|
+
declare const Carousel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & CarouselProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const CarouselContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const CarouselItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
declare const CarouselPrevious: React.ForwardRefExoticComponent<Omit<import("../ui/button").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
declare const CarouselNext: React.ForwardRefExoticComponent<Omit<import("../ui/button").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
18
|
+
export { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, };
|