@appcorp/shadcn 1.0.37 → 1.1.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/audio.js +3 -3
- package/components/dashboard.js +2 -2
- package/components/enhanced-checkbox.d.ts +9 -0
- package/components/{checkbox.js → enhanced-checkbox.js} +10 -11
- package/components/{combobox.d.ts → enhanced-combobox.d.ts} +2 -2
- package/components/{combobox.js → enhanced-combobox.js} +11 -11
- package/components/enhanced-dropzone.js +2 -2
- package/components/enhanced-input.d.ts +8 -0
- package/components/{input.js → enhanced-input.js} +8 -7
- package/components/enhanced-label.d.ts +7 -0
- package/components/{label.js → enhanced-label.js} +4 -4
- package/components/enhanced-select.d.ts +25 -0
- package/components/enhanced-select.js +81 -0
- package/components/enhanced-switch.d.ts +10 -0
- package/components/{switch.js → enhanced-switch.js} +9 -11
- package/components/enhanced-table-footer-action.js +1 -1
- package/components/enhanced-table-footer-pagination.js +1 -1
- package/components/enhanced-table-header-action.js +2 -2
- package/components/enhanced-table-header-search.js +1 -1
- package/components/enhanced-table.js +6 -5
- package/components/enhanced-textarea.d.ts +8 -0
- package/components/{textarea.js → enhanced-textarea.js} +10 -7
- package/components/field.d.ts +1 -1
- package/components/field.js +2 -2
- package/components/nav-main.js +1 -1
- package/components/nav-projects.js +1 -1
- package/components/nav-user.js +2 -2
- package/components/shadcn-example/coming-soon/index.js +2 -2
- package/components/shadcn-io/color-picker/index.d.ts +2 -2
- package/components/shadcn-io/color-picker/index.js +5 -5
- package/components/shadcn-io/dropzone/index.js +1 -1
- package/components/shadcn-io/gantt/index.js +2 -2
- package/components/shadcn-io/table/index.js +3 -3
- package/components/sidebar.d.ts +3 -3
- package/components/sidebar.js +5 -5
- package/components/team-switcher.js +2 -2
- package/components/{accordion.js → ui/accordion.js} +1 -1
- package/components/ui/alert-dialog.d.ts +20 -0
- package/components/ui/alert-dialog.js +120 -0
- package/components/ui/alert.d.ts +8 -0
- package/components/ui/alert.js +90 -0
- package/components/ui/aspect-ratio.d.ts +3 -0
- package/components/ui/aspect-ratio.js +40 -0
- package/components/ui/avatar.d.ts +6 -0
- package/components/{avatar.js → ui/avatar.js} +17 -17
- package/components/{badge.d.ts → ui/badge.d.ts} +3 -3
- package/components/{badge.js → ui/badge.js} +8 -10
- package/components/ui/breadcrumb.d.ts +19 -0
- package/components/{breadcrumb.js → ui/breadcrumb.js} +39 -31
- package/components/{button.d.ts → ui/button.d.ts} +3 -2
- package/components/{button.js → ui/button.js} +17 -16
- package/components/ui/calendar.d.ts +8 -0
- package/components/ui/calendar.js +109 -0
- package/components/ui/card.d.ts +8 -0
- package/components/{card.js → ui/card.js} +32 -30
- package/components/ui/carousel.d.ts +18 -0
- package/components/{carousel.js → ui/carousel.js} +42 -39
- package/components/ui/checkbox.d.ts +4 -0
- package/components/ui/checkbox.js +71 -0
- package/components/ui/collapsible.d.ts +5 -0
- package/components/ui/collapsible.js +44 -0
- package/components/ui/combobox.d.ts +2 -0
- package/components/ui/combobox.js +88 -0
- package/components/ui/command.d.ts +80 -0
- package/components/{command.js → ui/command.js} +50 -47
- package/components/ui/context-menu.d.ts +27 -0
- package/components/ui/context-menu.js +141 -0
- package/components/ui/dialog.d.ts +19 -0
- package/components/{dialog.js → ui/dialog.js} +46 -51
- package/components/ui/drawer.d.ts +22 -0
- package/components/{drawer.js → ui/drawer.js} +45 -46
- package/components/ui/dropdown-menu.d.ts +27 -0
- package/components/ui/dropdown-menu.js +143 -0
- package/components/{form.d.ts → ui/form.d.ts} +5 -6
- package/components/{form.js → ui/form.js} +37 -30
- package/components/ui/hover-card.d.ts +6 -0
- package/components/ui/hover-card.js +72 -0
- package/components/ui/input-otp.d.ts +34 -0
- package/components/ui/input-otp.js +93 -0
- package/components/ui/input.d.ts +3 -0
- package/components/ui/input.js +66 -0
- package/components/ui/label.d.ts +5 -0
- package/components/{collapsible.js → ui/label.js} +12 -20
- package/components/ui/menubar.d.ts +28 -0
- package/components/ui/menubar.js +165 -0
- package/components/ui/navigation-menu.d.ts +12 -0
- package/components/ui/navigation-menu.js +114 -0
- package/components/ui/pagination.d.ts +28 -0
- package/components/ui/pagination.js +113 -0
- package/components/ui/popover.d.ts +7 -0
- package/components/{popover.js → ui/popover.js} +12 -19
- package/components/ui/progress.d.ts +4 -0
- package/components/ui/progress.js +69 -0
- package/components/ui/radio-group.d.ts +5 -0
- package/components/ui/radio-group.js +77 -0
- package/components/ui/resizable.d.ts +24 -0
- package/components/ui/resizable.js +79 -0
- package/components/ui/scroll-area.d.ts +5 -0
- package/components/ui/scroll-area.js +80 -0
- package/components/ui/select.d.ts +13 -0
- package/components/{select.js → ui/select.js} +53 -53
- package/components/ui/separator.d.ts +4 -0
- package/components/{separator.js → ui/separator.js} +7 -5
- package/components/ui/sheet.d.ts +25 -0
- package/components/ui/sheet.js +127 -0
- package/components/ui/skeleton.d.ts +3 -0
- package/components/{skeleton.js → ui/skeleton.js} +2 -2
- package/components/ui/slider.d.ts +4 -0
- package/components/ui/slider.js +71 -0
- package/components/{sonner.d.ts → ui/sonner.d.ts} +2 -1
- package/components/{sonner.js → ui/sonner.js} +5 -14
- package/components/ui/switch.d.ts +4 -0
- package/components/ui/switch.js +69 -0
- package/components/ui/table.d.ts +10 -0
- package/components/{table.js → ui/table.js} +43 -35
- package/components/ui/tabs.d.ts +7 -0
- package/components/ui/tabs.js +82 -0
- package/components/ui/textarea.d.ts +3 -0
- package/components/ui/textarea.js +66 -0
- package/components/ui/toggle.d.ts +12 -0
- package/components/ui/toggle.js +87 -0
- package/package.json +26 -7
- package/components/avatar.d.ts +0 -6
- package/components/breadcrumb.d.ts +0 -11
- package/components/card.d.ts +0 -9
- package/components/carousel.d.ts +0 -19
- package/components/checkbox.d.ts +0 -9
- package/components/collapsible.d.ts +0 -6
- package/components/command.d.ts +0 -18
- package/components/context-menu.d.ts +0 -25
- package/components/context-menu.js +0 -148
- package/components/dialog.d.ts +0 -15
- package/components/drawer.d.ts +0 -13
- package/components/dropdown-menu.d.ts +0 -25
- package/components/dropdown-menu.js +0 -148
- package/components/input.d.ts +0 -8
- package/components/label.d.ts +0 -7
- package/components/popover.d.ts +0 -7
- package/components/select.d.ts +0 -15
- package/components/separator.d.ts +0 -4
- package/components/sheet.d.ts +0 -13
- package/components/sheet.js +0 -120
- package/components/skeleton.d.ts +0 -3
- package/components/switch.d.ts +0 -10
- package/components/table.d.ts +0 -10
- package/components/textarea.d.ts +0 -8
- /package/components/{accordion.d.ts → ui/accordion.d.ts} +0 -0
|
@@ -55,45 +55,53 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
55
55
|
return t;
|
|
56
56
|
};
|
|
57
57
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58
|
-
exports.Breadcrumb =
|
|
59
|
-
exports.BreadcrumbList = BreadcrumbList;
|
|
60
|
-
exports.BreadcrumbItem = BreadcrumbItem;
|
|
61
|
-
exports.BreadcrumbLink = BreadcrumbLink;
|
|
62
|
-
exports.BreadcrumbPage = BreadcrumbPage;
|
|
63
|
-
exports.BreadcrumbSeparator = BreadcrumbSeparator;
|
|
64
|
-
exports.BreadcrumbEllipsis = BreadcrumbEllipsis;
|
|
58
|
+
exports.BreadcrumbEllipsis = exports.BreadcrumbSeparator = exports.BreadcrumbPage = exports.BreadcrumbLink = exports.BreadcrumbItem = exports.BreadcrumbList = exports.Breadcrumb = void 0;
|
|
65
59
|
var React = __importStar(require("react"));
|
|
66
60
|
var react_slot_1 = require("@radix-ui/react-slot");
|
|
67
|
-
var
|
|
68
|
-
var
|
|
69
|
-
|
|
61
|
+
var utils_1 = require("../../lib/utils");
|
|
62
|
+
var react_icons_1 = require("@radix-ui/react-icons");
|
|
63
|
+
var Breadcrumb = React.forwardRef(function (_a, ref) {
|
|
70
64
|
var props = __rest(_a, []);
|
|
71
|
-
return React.createElement("nav", __assign({
|
|
72
|
-
}
|
|
73
|
-
|
|
65
|
+
return React.createElement("nav", __assign({ ref: ref, "aria-label": "breadcrumb" }, props));
|
|
66
|
+
});
|
|
67
|
+
exports.Breadcrumb = Breadcrumb;
|
|
68
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
69
|
+
var BreadcrumbList = React.forwardRef(function (_a, ref) {
|
|
74
70
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
75
|
-
return (React.createElement("ol", __assign({
|
|
76
|
-
}
|
|
77
|
-
|
|
71
|
+
return (React.createElement("ol", __assign({ ref: ref, className: (0, utils_1.cn)("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5", className) }, props)));
|
|
72
|
+
});
|
|
73
|
+
exports.BreadcrumbList = BreadcrumbList;
|
|
74
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
75
|
+
var BreadcrumbItem = React.forwardRef(function (_a, ref) {
|
|
78
76
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
79
|
-
return (React.createElement("li", __assign({
|
|
80
|
-
}
|
|
81
|
-
|
|
77
|
+
return (React.createElement("li", __assign({ ref: ref, className: (0, utils_1.cn)("inline-flex items-center gap-1.5", className) }, props)));
|
|
78
|
+
});
|
|
79
|
+
exports.BreadcrumbItem = BreadcrumbItem;
|
|
80
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
81
|
+
var BreadcrumbLink = React.forwardRef(function (_a, ref) {
|
|
82
82
|
var asChild = _a.asChild, className = _a.className, props = __rest(_a, ["asChild", "className"]);
|
|
83
83
|
var Comp = asChild ? react_slot_1.Slot : "a";
|
|
84
|
-
return (React.createElement(Comp, __assign({
|
|
85
|
-
}
|
|
86
|
-
|
|
84
|
+
return (React.createElement(Comp, __assign({ ref: ref, className: (0, utils_1.cn)("transition-colors hover:text-foreground", className) }, props)));
|
|
85
|
+
});
|
|
86
|
+
exports.BreadcrumbLink = BreadcrumbLink;
|
|
87
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
88
|
+
var BreadcrumbPage = React.forwardRef(function (_a, ref) {
|
|
87
89
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
88
|
-
return (React.createElement("span", __assign({
|
|
89
|
-
}
|
|
90
|
-
|
|
90
|
+
return (React.createElement("span", __assign({ ref: ref, role: "link", "aria-disabled": "true", "aria-current": "page", className: (0, utils_1.cn)("font-normal text-foreground", className) }, props)));
|
|
91
|
+
});
|
|
92
|
+
exports.BreadcrumbPage = BreadcrumbPage;
|
|
93
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
94
|
+
var BreadcrumbSeparator = function (_a) {
|
|
91
95
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
92
|
-
return (React.createElement("li", __assign({
|
|
93
|
-
}
|
|
94
|
-
|
|
96
|
+
return (React.createElement("li", __assign({ role: "presentation", "aria-hidden": "true", className: (0, utils_1.cn)("[&>svg]:w-3.5 [&>svg]:h-3.5", className) }, props), children !== null && children !== void 0 ? children : React.createElement(react_icons_1.ChevronRightIcon, null)));
|
|
97
|
+
};
|
|
98
|
+
exports.BreadcrumbSeparator = BreadcrumbSeparator;
|
|
99
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
100
|
+
var BreadcrumbEllipsis = function (_a) {
|
|
95
101
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
96
|
-
return (React.createElement("span", __assign({
|
|
97
|
-
React.createElement(
|
|
102
|
+
return (React.createElement("span", __assign({ role: "presentation", "aria-hidden": "true", className: (0, utils_1.cn)("flex h-9 w-9 items-center justify-center", className) }, props),
|
|
103
|
+
React.createElement(react_icons_1.DotsHorizontalIcon, { className: "h-4 w-4" }),
|
|
98
104
|
React.createElement("span", { className: "sr-only" }, "More")));
|
|
99
|
-
}
|
|
105
|
+
};
|
|
106
|
+
exports.BreadcrumbEllipsis = BreadcrumbEllipsis;
|
|
107
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
@@ -4,7 +4,8 @@ declare const buttonVariants: (props?: ({
|
|
|
4
4
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
5
|
size?: "icon" | "default" | "sm" | "lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
-
|
|
7
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
8
|
asChild?: boolean;
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
11
|
export { Button, buttonVariants };
|
|
@@ -55,27 +55,26 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
55
55
|
return t;
|
|
56
56
|
};
|
|
57
57
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58
|
-
exports.buttonVariants = void 0;
|
|
59
|
-
exports.Button = Button;
|
|
58
|
+
exports.buttonVariants = exports.Button = void 0;
|
|
60
59
|
var React = __importStar(require("react"));
|
|
61
60
|
var react_slot_1 = require("@radix-ui/react-slot");
|
|
62
61
|
var class_variance_authority_1 = require("class-variance-authority");
|
|
63
|
-
var utils_1 = require("
|
|
64
|
-
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-
|
|
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", {
|
|
65
64
|
variants: {
|
|
66
65
|
variant: {
|
|
67
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
68
|
-
destructive: "bg-destructive text-
|
|
69
|
-
outline: "border bg-background shadow-
|
|
70
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
71
|
-
ghost: "hover:bg-accent hover:text-accent-foreground
|
|
66
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
67
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
68
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
69
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
70
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
72
71
|
link: "text-primary underline-offset-4 hover:underline",
|
|
73
72
|
},
|
|
74
73
|
size: {
|
|
75
|
-
default: "h-9 px-4 py-2
|
|
76
|
-
sm: "h-8 rounded-md
|
|
77
|
-
lg: "h-10 rounded-md px-
|
|
78
|
-
icon: "
|
|
74
|
+
default: "h-9 px-4 py-2",
|
|
75
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
76
|
+
lg: "h-10 rounded-md px-8",
|
|
77
|
+
icon: "h-9 w-9",
|
|
79
78
|
},
|
|
80
79
|
},
|
|
81
80
|
defaultVariants: {
|
|
@@ -84,8 +83,10 @@ var buttonVariants = (0, class_variance_authority_1.cva)("inline-flex items-cent
|
|
|
84
83
|
},
|
|
85
84
|
});
|
|
86
85
|
exports.buttonVariants = buttonVariants;
|
|
87
|
-
|
|
86
|
+
var Button = React.forwardRef(function (_a, ref) {
|
|
88
87
|
var className = _a.className, variant = _a.variant, size = _a.size, _b = _a.asChild, asChild = _b === void 0 ? false : _b, props = __rest(_a, ["className", "variant", "size", "asChild"]);
|
|
89
88
|
var Comp = asChild ? react_slot_1.Slot : "button";
|
|
90
|
-
return (React.createElement(Comp, __assign({
|
|
91
|
-
}
|
|
89
|
+
return (React.createElement(Comp, __assign({ className: (0, utils_1.cn)(buttonVariants({ variant: variant, size: size, className: className })), ref: ref }, props)));
|
|
90
|
+
});
|
|
91
|
+
exports.Button = Button;
|
|
92
|
+
Button.displayName = "Button";
|
|
@@ -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,109 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
4
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
5
|
+
return cooked;
|
|
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;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, };
|
|
@@ -55,40 +55,42 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
55
55
|
return t;
|
|
56
56
|
};
|
|
57
57
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58
|
-
exports.Card =
|
|
59
|
-
exports.CardHeader = CardHeader;
|
|
60
|
-
exports.CardFooter = CardFooter;
|
|
61
|
-
exports.CardTitle = CardTitle;
|
|
62
|
-
exports.CardAction = CardAction;
|
|
63
|
-
exports.CardDescription = CardDescription;
|
|
64
|
-
exports.CardContent = CardContent;
|
|
58
|
+
exports.CardContent = exports.CardDescription = exports.CardTitle = exports.CardFooter = exports.CardHeader = exports.Card = void 0;
|
|
65
59
|
var React = __importStar(require("react"));
|
|
66
|
-
var utils_1 = require("
|
|
67
|
-
|
|
68
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
69
|
-
return (React.createElement("div", __assign({ "data-slot": "card", className: (0, utils_1.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", className) }, props)));
|
|
70
|
-
}
|
|
71
|
-
function CardHeader(_a) {
|
|
60
|
+
var utils_1 = require("../../lib/utils");
|
|
61
|
+
var Card = React.forwardRef(function (_a, ref) {
|
|
72
62
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
73
|
-
return (React.createElement("div", __assign({
|
|
74
|
-
}
|
|
75
|
-
|
|
63
|
+
return (React.createElement("div", __assign({ ref: ref, className: (0, utils_1.cn)("rounded-xl border bg-card text-card-foreground shadow", className) }, props)));
|
|
64
|
+
});
|
|
65
|
+
exports.Card = Card;
|
|
66
|
+
Card.displayName = "Card";
|
|
67
|
+
var CardHeader = React.forwardRef(function (_a, ref) {
|
|
76
68
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
77
|
-
return (React.createElement("div", __assign({
|
|
78
|
-
}
|
|
79
|
-
|
|
69
|
+
return (React.createElement("div", __assign({ ref: ref, className: (0, utils_1.cn)("flex flex-col space-y-1.5 p-6", className) }, props)));
|
|
70
|
+
});
|
|
71
|
+
exports.CardHeader = CardHeader;
|
|
72
|
+
CardHeader.displayName = "CardHeader";
|
|
73
|
+
var CardTitle = React.forwardRef(function (_a, ref) {
|
|
80
74
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
81
|
-
return (React.createElement("div", __assign({
|
|
82
|
-
}
|
|
83
|
-
|
|
75
|
+
return (React.createElement("div", __assign({ ref: ref, className: (0, utils_1.cn)("font-semibold leading-none tracking-tight", className) }, props)));
|
|
76
|
+
});
|
|
77
|
+
exports.CardTitle = CardTitle;
|
|
78
|
+
CardTitle.displayName = "CardTitle";
|
|
79
|
+
var CardDescription = React.forwardRef(function (_a, ref) {
|
|
84
80
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
85
|
-
return (React.createElement("div", __assign({
|
|
86
|
-
}
|
|
87
|
-
|
|
81
|
+
return (React.createElement("div", __assign({ ref: ref, className: (0, utils_1.cn)("text-sm text-muted-foreground", className) }, props)));
|
|
82
|
+
});
|
|
83
|
+
exports.CardDescription = CardDescription;
|
|
84
|
+
CardDescription.displayName = "CardDescription";
|
|
85
|
+
var CardContent = React.forwardRef(function (_a, ref) {
|
|
88
86
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
89
|
-
return (React.createElement("div", __assign({
|
|
90
|
-
}
|
|
91
|
-
|
|
87
|
+
return (React.createElement("div", __assign({ ref: ref, className: (0, utils_1.cn)("p-6 pt-0", className) }, props)));
|
|
88
|
+
});
|
|
89
|
+
exports.CardContent = CardContent;
|
|
90
|
+
CardContent.displayName = "CardContent";
|
|
91
|
+
var CardFooter = React.forwardRef(function (_a, ref) {
|
|
92
92
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
93
|
-
return (React.createElement("div", __assign({
|
|
94
|
-
}
|
|
93
|
+
return (React.createElement("div", __assign({ ref: ref, className: (0, utils_1.cn)("flex items-center p-6 pt-0", className) }, props)));
|
|
94
|
+
});
|
|
95
|
+
exports.CardFooter = CardFooter;
|
|
96
|
+
CardFooter.displayName = "CardFooter";
|
|
@@ -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, };
|
|
@@ -59,16 +59,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
59
59
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
60
60
|
};
|
|
61
61
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
|
-
exports.Carousel =
|
|
63
|
-
exports.CarouselContent = CarouselContent;
|
|
64
|
-
exports.CarouselItem = CarouselItem;
|
|
65
|
-
exports.CarouselPrevious = CarouselPrevious;
|
|
66
|
-
exports.CarouselNext = CarouselNext;
|
|
62
|
+
exports.CarouselNext = exports.CarouselPrevious = exports.CarouselItem = exports.CarouselContent = exports.Carousel = void 0;
|
|
67
63
|
var React = __importStar(require("react"));
|
|
68
64
|
var embla_carousel_react_1 = __importDefault(require("embla-carousel-react"));
|
|
69
|
-
var
|
|
70
|
-
var
|
|
71
|
-
var
|
|
65
|
+
var utils_1 = require("../../lib/utils");
|
|
66
|
+
var button_1 = require("../ui/button");
|
|
67
|
+
var react_icons_1 = require("@radix-ui/react-icons");
|
|
72
68
|
var CarouselContext = React.createContext(null);
|
|
73
69
|
function useCarousel() {
|
|
74
70
|
var context = React.useContext(CarouselContext);
|
|
@@ -77,14 +73,15 @@ function useCarousel() {
|
|
|
77
73
|
}
|
|
78
74
|
return context;
|
|
79
75
|
}
|
|
80
|
-
|
|
76
|
+
var Carousel = React.forwardRef(function (_a, ref) {
|
|
81
77
|
var _b = _a.orientation, orientation = _b === void 0 ? "horizontal" : _b, opts = _a.opts, setApi = _a.setApi, plugins = _a.plugins, className = _a.className, children = _a.children, props = __rest(_a, ["orientation", "opts", "setApi", "plugins", "className", "children"]);
|
|
82
78
|
var _c = (0, embla_carousel_react_1.default)(__assign(__assign({}, opts), { axis: orientation === "horizontal" ? "x" : "y" }), plugins), carouselRef = _c[0], api = _c[1];
|
|
83
79
|
var _d = React.useState(false), canScrollPrev = _d[0], setCanScrollPrev = _d[1];
|
|
84
80
|
var _e = React.useState(false), canScrollNext = _e[0], setCanScrollNext = _e[1];
|
|
85
81
|
var onSelect = React.useCallback(function (api) {
|
|
86
|
-
if (!api)
|
|
82
|
+
if (!api) {
|
|
87
83
|
return;
|
|
84
|
+
}
|
|
88
85
|
setCanScrollPrev(api.canScrollPrev());
|
|
89
86
|
setCanScrollNext(api.canScrollNext());
|
|
90
87
|
}, []);
|
|
@@ -105,13 +102,15 @@ function Carousel(_a) {
|
|
|
105
102
|
}
|
|
106
103
|
}, [scrollPrev, scrollNext]);
|
|
107
104
|
React.useEffect(function () {
|
|
108
|
-
if (!api || !setApi)
|
|
105
|
+
if (!api || !setApi) {
|
|
109
106
|
return;
|
|
107
|
+
}
|
|
110
108
|
setApi(api);
|
|
111
109
|
}, [api, setApi]);
|
|
112
110
|
React.useEffect(function () {
|
|
113
|
-
if (!api)
|
|
111
|
+
if (!api) {
|
|
114
112
|
return;
|
|
113
|
+
}
|
|
115
114
|
onSelect(api);
|
|
116
115
|
api.on("reInit", onSelect);
|
|
117
116
|
api.on("select", onSelect);
|
|
@@ -129,40 +128,44 @@ function Carousel(_a) {
|
|
|
129
128
|
canScrollPrev: canScrollPrev,
|
|
130
129
|
canScrollNext: canScrollNext,
|
|
131
130
|
} },
|
|
132
|
-
React.createElement("div", __assign({ onKeyDownCapture: handleKeyDown, className: (0, utils_1.cn)("relative", className), role: "region", "aria-roledescription": "carousel"
|
|
133
|
-
}
|
|
134
|
-
|
|
131
|
+
React.createElement("div", __assign({ ref: ref, onKeyDownCapture: handleKeyDown, className: (0, utils_1.cn)("relative", className), role: "region", "aria-roledescription": "carousel" }, props), children)));
|
|
132
|
+
});
|
|
133
|
+
exports.Carousel = Carousel;
|
|
134
|
+
Carousel.displayName = "Carousel";
|
|
135
|
+
var CarouselContent = React.forwardRef(function (_a, ref) {
|
|
135
136
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
136
137
|
var _b = useCarousel(), carouselRef = _b.carouselRef, orientation = _b.orientation;
|
|
137
|
-
return (React.createElement("div", { ref: carouselRef, className: "overflow-hidden"
|
|
138
|
-
React.createElement("div", __assign({ className: (0, utils_1.cn)("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className) }, props))));
|
|
139
|
-
}
|
|
140
|
-
|
|
138
|
+
return (React.createElement("div", { ref: carouselRef, className: "overflow-hidden" },
|
|
139
|
+
React.createElement("div", __assign({ ref: ref, className: (0, utils_1.cn)("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className) }, props))));
|
|
140
|
+
});
|
|
141
|
+
exports.CarouselContent = CarouselContent;
|
|
142
|
+
CarouselContent.displayName = "CarouselContent";
|
|
143
|
+
var CarouselItem = React.forwardRef(function (_a, ref) {
|
|
141
144
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
142
145
|
var orientation = useCarousel().orientation;
|
|
143
|
-
return (React.createElement("div", __assign({ role: "group", "aria-roledescription": "slide",
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
+
return (React.createElement("div", __assign({ ref: ref, role: "group", "aria-roledescription": "slide", className: (0, utils_1.cn)("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className) }, props)));
|
|
147
|
+
});
|
|
148
|
+
exports.CarouselItem = CarouselItem;
|
|
149
|
+
CarouselItem.displayName = "CarouselItem";
|
|
150
|
+
var CarouselPrevious = React.forwardRef(function (_a, ref) {
|
|
146
151
|
var className = _a.className, _b = _a.variant, variant = _b === void 0 ? "outline" : _b, _c = _a.size, size = _c === void 0 ? "icon" : _c, props = __rest(_a, ["className", "variant", "size"]);
|
|
147
152
|
var _d = useCarousel(), orientation = _d.orientation, scrollPrev = _d.scrollPrev, canScrollPrev = _d.canScrollPrev;
|
|
148
|
-
return (React.createElement(button_1.Button, __assign({
|
|
149
|
-
? "top-1/2 -
|
|
150
|
-
: "-top-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollPrev, onClick:
|
|
151
|
-
|
|
152
|
-
scrollPrev();
|
|
153
|
-
} }),
|
|
154
|
-
React.createElement(lucide_react_1.ArrowLeft, null),
|
|
153
|
+
return (React.createElement(button_1.Button, __assign({ ref: ref, variant: variant, size: size, className: (0, utils_1.cn)("absolute h-8 w-8 rounded-full", orientation === "horizontal"
|
|
154
|
+
? "-left-12 top-1/2 -translate-y-1/2"
|
|
155
|
+
: "-top-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollPrev, onClick: scrollPrev }, props),
|
|
156
|
+
React.createElement(react_icons_1.ArrowLeftIcon, { className: "h-4 w-4" }),
|
|
155
157
|
React.createElement("span", { className: "sr-only" }, "Previous slide")));
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
+
});
|
|
159
|
+
exports.CarouselPrevious = CarouselPrevious;
|
|
160
|
+
CarouselPrevious.displayName = "CarouselPrevious";
|
|
161
|
+
var CarouselNext = React.forwardRef(function (_a, ref) {
|
|
158
162
|
var className = _a.className, _b = _a.variant, variant = _b === void 0 ? "outline" : _b, _c = _a.size, size = _c === void 0 ? "icon" : _c, props = __rest(_a, ["className", "variant", "size"]);
|
|
159
163
|
var _d = useCarousel(), orientation = _d.orientation, scrollNext = _d.scrollNext, canScrollNext = _d.canScrollNext;
|
|
160
|
-
return (React.createElement(button_1.Button, __assign({
|
|
161
|
-
? "top-1/2 -
|
|
162
|
-
: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollNext, onClick:
|
|
163
|
-
|
|
164
|
-
scrollNext();
|
|
165
|
-
} }),
|
|
166
|
-
React.createElement(lucide_react_1.ArrowRight, null),
|
|
164
|
+
return (React.createElement(button_1.Button, __assign({ ref: ref, variant: variant, size: size, className: (0, utils_1.cn)("absolute h-8 w-8 rounded-full", orientation === "horizontal"
|
|
165
|
+
? "-right-12 top-1/2 -translate-y-1/2"
|
|
166
|
+
: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollNext, onClick: scrollNext }, props),
|
|
167
|
+
React.createElement(react_icons_1.ArrowRightIcon, { className: "h-4 w-4" }),
|
|
167
168
|
React.createElement("span", { className: "sr-only" }, "Next slide")));
|
|
168
|
-
}
|
|
169
|
+
});
|
|
170
|
+
exports.CarouselNext = CarouselNext;
|
|
171
|
+
CarouselNext.displayName = "CarouselNext";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
3
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export { Checkbox };
|
|
@@ -0,0 +1,71 @@
|
|
|
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.Checkbox = void 0;
|
|
60
|
+
var React = __importStar(require("react"));
|
|
61
|
+
var CheckboxPrimitive = __importStar(require("@radix-ui/react-checkbox"));
|
|
62
|
+
var utils_1 = require("../../lib/utils");
|
|
63
|
+
var react_icons_1 = require("@radix-ui/react-icons");
|
|
64
|
+
var Checkbox = React.forwardRef(function (_a, ref) {
|
|
65
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
66
|
+
return (React.createElement(CheckboxPrimitive.Root, __assign({ ref: ref, className: (0, utils_1.cn)("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", className) }, props),
|
|
67
|
+
React.createElement(CheckboxPrimitive.Indicator, { className: (0, utils_1.cn)("grid place-content-center text-current") },
|
|
68
|
+
React.createElement(react_icons_1.CheckIcon, { className: "h-4 w-4" }))));
|
|
69
|
+
});
|
|
70
|
+
exports.Checkbox = Checkbox;
|
|
71
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
2
|
+
declare const Collapsible: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
declare const CollapsibleTrigger: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
declare const CollapsibleContent: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|