@myrjfa/ui 1.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/LICENSE +201 -0
- package/README.md +2 -0
- package/dist/dashboard/action-buttons.d.ts +16 -0
- package/dist/dashboard/action-buttons.d.ts.map +1 -0
- package/dist/dashboard/action-buttons.js +10 -0
- package/dist/dashboard/app-sidebar.d.ts +3 -0
- package/dist/dashboard/app-sidebar.d.ts.map +1 -0
- package/dist/dashboard/app-sidebar.js +145 -0
- package/dist/dashboard/card-header.d.ts +11 -0
- package/dist/dashboard/card-header.d.ts.map +1 -0
- package/dist/dashboard/card-header.js +8 -0
- package/dist/dashboard/dashboard-components.d.ts +13 -0
- package/dist/dashboard/dashboard-components.d.ts.map +1 -0
- package/dist/dashboard/dashboard-components.js +12 -0
- package/dist/dashboard/data-table.d.ts +19 -0
- package/dist/dashboard/data-table.d.ts.map +1 -0
- package/dist/dashboard/data-table.js +59 -0
- package/dist/dashboard/nav-main.d.ts +9 -0
- package/dist/dashboard/nav-main.d.ts.map +1 -0
- package/dist/dashboard/nav-main.js +10 -0
- package/dist/dashboard/nav-secondary.d.ts +10 -0
- package/dist/dashboard/nav-secondary.d.ts.map +1 -0
- package/dist/dashboard/nav-secondary.js +29 -0
- package/dist/dashboard/stats-card.d.ts +6 -0
- package/dist/dashboard/stats-card.d.ts.map +1 -0
- package/dist/dashboard/stats-card.js +6 -0
- package/dist/dashboard/table.d.ts +11 -0
- package/dist/dashboard/table.d.ts.map +1 -0
- package/dist/dashboard/table.js +67 -0
- package/dist/header/mobile-nav-item.d.ts +9 -0
- package/dist/header/mobile-nav-item.d.ts.map +1 -0
- package/dist/header/mobile-nav-item.js +7 -0
- package/dist/header/mobile-navbar.d.ts +5 -0
- package/dist/header/mobile-navbar.d.ts.map +1 -0
- package/dist/header/mobile-navbar.js +22 -0
- package/dist/header/nav-item.d.ts +9 -0
- package/dist/header/nav-item.d.ts.map +1 -0
- package/dist/header/nav-item.js +7 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +57 -0
- package/dist/main/footer.d.ts +6 -0
- package/dist/main/footer.d.ts.map +1 -0
- package/dist/main/footer.js +47 -0
- package/dist/main/navbar.d.ts +6 -0
- package/dist/main/navbar.d.ts.map +1 -0
- package/dist/main/navbar.js +180 -0
- package/dist/main/paginationBar.d.ts +5 -0
- package/dist/main/paginationBar.d.ts.map +1 -0
- package/dist/main/paginationBar.js +30 -0
- package/dist/main/review-page.d.ts +13 -0
- package/dist/main/review-page.d.ts.map +1 -0
- package/dist/main/review-page.js +246 -0
- package/dist/misc/accordion.d.ts +7 -0
- package/dist/misc/accordion.d.ts.map +1 -0
- package/dist/misc/accordion.js +44 -0
- package/dist/misc/alert-dialog.d.ts +14 -0
- package/dist/misc/alert-dialog.d.ts.map +1 -0
- package/dist/misc/alert-dialog.js +72 -0
- package/dist/misc/alert.d.ts +9 -0
- package/dist/misc/alert.d.ts.map +1 -0
- package/dist/misc/alert.js +49 -0
- package/dist/misc/alertdialogclaude.d.ts +15 -0
- package/dist/misc/alertdialogclaude.d.ts.map +1 -0
- package/dist/misc/alertdialogclaude.js +226 -0
- package/dist/misc/avatar.d.ts +6 -0
- package/dist/misc/avatar.d.ts.map +1 -0
- package/dist/misc/avatar.js +39 -0
- package/dist/misc/badge.d.ts +9 -0
- package/dist/misc/badge.d.ts.map +1 -0
- package/dist/misc/badge.js +45 -0
- package/dist/misc/button.d.ts +10 -0
- package/dist/misc/button.d.ts.map +1 -0
- package/dist/misc/button.js +54 -0
- package/dist/misc/card.d.ts +9 -0
- package/dist/misc/card.d.ts.map +1 -0
- package/dist/misc/card.js +49 -0
- package/dist/misc/carousel.d.ts +20 -0
- package/dist/misc/carousel.d.ts.map +1 -0
- package/dist/misc/carousel.js +115 -0
- package/dist/misc/checkbox.d.ts +4 -0
- package/dist/misc/checkbox.d.ts.map +1 -0
- package/dist/misc/checkbox.js +32 -0
- package/dist/misc/command.d.ts +16 -0
- package/dist/misc/command.d.ts.map +1 -0
- package/dist/misc/command.js +65 -0
- package/dist/misc/datepicker.d.ts +12 -0
- package/dist/misc/datepicker.d.ts.map +1 -0
- package/dist/misc/datepicker.js +199 -0
- package/dist/misc/dialog.d.ts +13 -0
- package/dist/misc/dialog.d.ts.map +1 -0
- package/dist/misc/dialog.js +68 -0
- package/dist/misc/dropdown-menu.d.ts +25 -0
- package/dist/misc/dropdown-menu.d.ts.map +1 -0
- package/dist/misc/dropdown-menu.js +88 -0
- package/dist/misc/faq.d.ts +5 -0
- package/dist/misc/faq.d.ts.map +1 -0
- package/dist/misc/faq.js +6 -0
- package/dist/misc/file-preview.d.ts +8 -0
- package/dist/misc/file-preview.d.ts.map +1 -0
- package/dist/misc/file-preview.js +130 -0
- package/dist/misc/filter.d.ts +12 -0
- package/dist/misc/filter.d.ts.map +1 -0
- package/dist/misc/filter.js +47 -0
- package/dist/misc/filterBar.d.ts +5 -0
- package/dist/misc/filterBar.d.ts.map +1 -0
- package/dist/misc/filterBar.js +196 -0
- package/dist/misc/form.d.ts +25 -0
- package/dist/misc/form.d.ts.map +1 -0
- package/dist/misc/form.js +81 -0
- package/dist/misc/input.d.ts +4 -0
- package/dist/misc/input.d.ts.map +1 -0
- package/dist/misc/input.js +29 -0
- package/dist/misc/label.d.ts +4 -0
- package/dist/misc/label.d.ts.map +1 -0
- package/dist/misc/label.js +31 -0
- package/dist/misc/line-carousel.d.ts +9 -0
- package/dist/misc/line-carousel.d.ts.map +1 -0
- package/dist/misc/line-carousel.js +15 -0
- package/dist/misc/multiImageUploader.d.ts +9 -0
- package/dist/misc/multiImageUploader.d.ts.map +1 -0
- package/dist/misc/multiImageUploader.js +11 -0
- package/dist/misc/newsLetter.d.ts +3 -0
- package/dist/misc/newsLetter.d.ts.map +1 -0
- package/dist/misc/newsLetter.js +101 -0
- package/dist/misc/notification.d.ts +6 -0
- package/dist/misc/notification.d.ts.map +1 -0
- package/dist/misc/notification.js +148 -0
- package/dist/misc/pagination.d.ts +15 -0
- package/dist/misc/pagination.d.ts.map +1 -0
- package/dist/misc/pagination.js +59 -0
- package/dist/misc/password-eye.d.ts +6 -0
- package/dist/misc/password-eye.d.ts.map +1 -0
- package/dist/misc/password-eye.js +7 -0
- package/dist/misc/popover.d.ts +7 -0
- package/dist/misc/popover.d.ts.map +1 -0
- package/dist/misc/popover.js +43 -0
- package/dist/misc/progress.d.ts +4 -0
- package/dist/misc/progress.d.ts.map +1 -0
- package/dist/misc/progress.js +31 -0
- package/dist/misc/scroll-area.d.ts +5 -0
- package/dist/misc/scroll-area.d.ts.map +1 -0
- package/dist/misc/scroll-area.js +37 -0
- package/dist/misc/searchBar.d.ts +6 -0
- package/dist/misc/searchBar.d.ts.map +1 -0
- package/dist/misc/searchBar.js +93 -0
- package/dist/misc/searchBox.d.ts +12 -0
- package/dist/misc/searchBox.d.ts.map +1 -0
- package/dist/misc/searchBox.js +66 -0
- package/dist/misc/select.d.ts +13 -0
- package/dist/misc/select.d.ts.map +1 -0
- package/dist/misc/select.js +70 -0
- package/dist/misc/separator.d.ts +4 -0
- package/dist/misc/separator.d.ts.map +1 -0
- package/dist/misc/separator.js +31 -0
- package/dist/misc/share.d.ts +5 -0
- package/dist/misc/share.d.ts.map +1 -0
- package/dist/misc/share.js +213 -0
- package/dist/misc/sheet.d.ts +13 -0
- package/dist/misc/sheet.d.ts.map +1 -0
- package/dist/misc/sheet.js +72 -0
- package/dist/misc/sidebar.d.ts +70 -0
- package/dist/misc/sidebar.d.ts.map +1 -0
- package/dist/misc/sidebar.js +253 -0
- package/dist/misc/skeleton.d.ts +3 -0
- package/dist/misc/skeleton.d.ts.map +1 -0
- package/dist/misc/skeleton.js +29 -0
- package/dist/misc/starRating.d.ts +4 -0
- package/dist/misc/starRating.d.ts.map +1 -0
- package/dist/misc/starRating.js +21 -0
- package/dist/misc/stateCard.d.ts +7 -0
- package/dist/misc/stateCard.d.ts.map +1 -0
- package/dist/misc/stateCard.js +22 -0
- package/dist/misc/tabs.d.ts +8 -0
- package/dist/misc/tabs.d.ts.map +1 -0
- package/dist/misc/tabs.js +43 -0
- package/dist/misc/textarea.d.ts +4 -0
- package/dist/misc/textarea.d.ts.map +1 -0
- package/dist/misc/textarea.js +29 -0
- package/dist/misc/tile.d.ts +3 -0
- package/dist/misc/tile.d.ts.map +1 -0
- package/dist/misc/tile.js +137 -0
- package/dist/misc/tooltip.d.ts +8 -0
- package/dist/misc/tooltip.d.ts.map +1 -0
- package/dist/misc/tooltip.js +43 -0
- package/dist/profile/socialLink.d.ts +10 -0
- package/dist/profile/socialLink.d.ts.map +1 -0
- package/dist/profile/socialLink.js +82 -0
- package/package.json +79 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
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 __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
26
|
+
import { cn } from "@myrjfa/state/dist/lib/utils";
|
|
27
|
+
import { CheckIcon } from "lucide-react";
|
|
28
|
+
function Checkbox(_a) {
|
|
29
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
30
|
+
return (_jsx(CheckboxPrimitive.Root, __assign({ className: cn("peer border-input data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className) }, props, { children: _jsx(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current transition-none", children: _jsx(CheckIcon, { className: "size-3.5" }) }, "checkbox-indicator") }), "checkbox"));
|
|
31
|
+
}
|
|
32
|
+
export { Checkbox };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
2
|
+
import { Dialog } from "./dialog";
|
|
3
|
+
declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function CommandDialog({ title, description, children, ...props }: React.ComponentProps<typeof Dialog> & {
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
|
|
16
|
+
//# sourceMappingURL=command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/misc/command.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,MAAM,CAAA;AAGlD,OAAO,EACL,MAAM,EAKP,MAAM,UAAU,CAAA;AAEjB,iBAAS,OAAO,CAAC,EACf,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,2CAW/C;AAED,iBAAS,aAAa,CAAC,EACrB,KAAyB,EACzB,WAA8C,EAC9C,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,GAAG;IACvC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,2CAcA;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,2CAiBrD;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAWpD;AAED,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,2CAQrD;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,2CAWrD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,SAAS,CAAC,2CAQzD;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAWpD;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,2CAW9B;AAED,OAAO,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,eAAe,EACf,gBAAgB,GACjB,CAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
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 __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
|
+
import { cn } from "@myrjfa/state/dist/lib/utils";
|
|
26
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
27
|
+
import { SearchIcon } from "lucide-react";
|
|
28
|
+
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "./dialog";
|
|
29
|
+
function Command(_a) {
|
|
30
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
31
|
+
return (_jsx(CommandPrimitive, __assign({ "data-slot": "command", className: cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className) }, props)));
|
|
32
|
+
}
|
|
33
|
+
function CommandDialog(_a) {
|
|
34
|
+
var _b = _a.title, title = _b === void 0 ? "Command Palette" : _b, _c = _a.description, description = _c === void 0 ? "Search for a command to run..." : _c, children = _a.children, props = __rest(_a, ["title", "description", "children"]);
|
|
35
|
+
return (_jsxs(Dialog, __assign({}, props, { children: [_jsxs(DialogHeader, { className: "sr-only", children: [_jsx(DialogTitle, { children: title }), _jsx(DialogDescription, { children: description })] }), _jsx(DialogContent, { className: "overflow-hidden p-0", children: _jsx(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: children }) })] })));
|
|
36
|
+
}
|
|
37
|
+
function CommandInput(_a) {
|
|
38
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
39
|
+
return (_jsxs("div", { "data-slot": "command-input-wrapper", className: "flex h-9 items-center gap-2 border-b px-3", children: [_jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }), _jsx(CommandPrimitive.Input, __assign({ "data-slot": "command-input", className: cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className) }, props))] }));
|
|
40
|
+
}
|
|
41
|
+
function CommandList(_a) {
|
|
42
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
43
|
+
return (_jsx(CommandPrimitive.List, __assign({ "data-slot": "command-list", className: cn("max-h-[250px] scroll-py-1 overflow-x-hidden overflow-y-auto", className) }, props)));
|
|
44
|
+
}
|
|
45
|
+
function CommandEmpty(_a) {
|
|
46
|
+
var props = __rest(_a, []);
|
|
47
|
+
return (_jsx(CommandPrimitive.Empty, __assign({ "data-slot": "command-empty", className: "py-6 text-center text-sm" }, props)));
|
|
48
|
+
}
|
|
49
|
+
function CommandGroup(_a) {
|
|
50
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
51
|
+
return (_jsx(CommandPrimitive.Group, __assign({ "data-slot": "command-group", className: cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium", className) }, props)));
|
|
52
|
+
}
|
|
53
|
+
function CommandSeparator(_a) {
|
|
54
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
55
|
+
return (_jsx(CommandPrimitive.Separator, __assign({ "data-slot": "command-separator", className: cn("bg-border -mx-1 h-px", className) }, props)));
|
|
56
|
+
}
|
|
57
|
+
function CommandItem(_a) {
|
|
58
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
59
|
+
return (_jsx(CommandPrimitive.Item, __assign({ "data-slot": "command-item", className: cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className) }, props)));
|
|
60
|
+
}
|
|
61
|
+
function CommandShortcut(_a) {
|
|
62
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
63
|
+
return (_jsx("span", __assign({ "data-slot": "command-shortcut", className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className) }, props)));
|
|
64
|
+
}
|
|
65
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type DatePickerProps = {
|
|
2
|
+
field: {
|
|
3
|
+
value: Date | null;
|
|
4
|
+
onChange: (date: Date) => void;
|
|
5
|
+
};
|
|
6
|
+
minDate?: Date;
|
|
7
|
+
maxDate?: Date;
|
|
8
|
+
label?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function DatePicker({ field, minDate, maxDate, label }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=datepicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datepicker.d.ts","sourceRoot":"","sources":["../../src/misc/datepicker.tsx"],"names":[],"mappings":"AAkBA,KAAK,eAAe,GAAG;IACnB,KAAK,EAAE;QACH,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;QACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;KAClC,CAAC;IACF,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,OAAgC,EAAE,OAAgC,EAAE,KAAuB,EAAE,EAAE,eAAe,2CAuXjJ"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
+
if (ar || !(i in from)) {
|
|
5
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
+
ar[i] = from[i];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
|
+
};
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
12
|
+
import { cn } from "@myrjfa/state/dist/lib/utils";
|
|
13
|
+
import { format } from "date-fns";
|
|
14
|
+
import { CalendarIcon, ChevronLeft, ChevronRight } from "lucide-react";
|
|
15
|
+
import { useEffect, useState } from "react";
|
|
16
|
+
import { Button } from "./button";
|
|
17
|
+
import { FormControl, FormItem, FormLabel, } from "./form";
|
|
18
|
+
import { Popover, PopoverContent, PopoverTrigger, } from "./popover";
|
|
19
|
+
export function DatePicker(_a) {
|
|
20
|
+
var field = _a.field, _b = _a.minDate, minDate = _b === void 0 ? new Date("1900-01-01") : _b, _c = _a.maxDate, maxDate = _c === void 0 ? new Date("2100-01-01") : _c, _d = _a.label, label = _d === void 0 ? "Date of birth" : _d;
|
|
21
|
+
var _e = useState(false), open = _e[0], setOpen = _e[1];
|
|
22
|
+
// Create state for the calendar view
|
|
23
|
+
var _f = useState(field.value || new Date()), calendarDate = _f[0], setCalendarDate = _f[1];
|
|
24
|
+
var _g = useState("days"), view = _g[0], setView = _g[1]; // "days", "months", or "years"
|
|
25
|
+
var _h = useState(function () {
|
|
26
|
+
var year = (field.value || new Date()).getFullYear();
|
|
27
|
+
var startYear = Math.floor(year / 10) * 10;
|
|
28
|
+
return [startYear, startYear + 9];
|
|
29
|
+
}), yearRange = _h[0], setYearRange = _h[1];
|
|
30
|
+
// Update calendar date when field.value changes
|
|
31
|
+
useEffect(function () {
|
|
32
|
+
if (field.value) {
|
|
33
|
+
setCalendarDate(field.value);
|
|
34
|
+
}
|
|
35
|
+
}, [field.value]);
|
|
36
|
+
// Get min and max years constraints
|
|
37
|
+
var minYear = minDate.getFullYear();
|
|
38
|
+
var maxYear = maxDate.getFullYear();
|
|
39
|
+
// Month names
|
|
40
|
+
var months = [
|
|
41
|
+
"January", "February", "March", "April", "May", "June",
|
|
42
|
+
"July", "August", "September", "October", "November", "December"
|
|
43
|
+
];
|
|
44
|
+
// Get days of the current month view
|
|
45
|
+
var getDaysInMonth = function (year, month) {
|
|
46
|
+
var daysInMonth = new Date(year, month + 1, 0).getDate();
|
|
47
|
+
var firstDayOfMonth = new Date(year, month, 1).getDay();
|
|
48
|
+
var prevMonthDays = [];
|
|
49
|
+
var currentMonthDays = [];
|
|
50
|
+
var nextMonthDays = [];
|
|
51
|
+
// Previous month days
|
|
52
|
+
var prevMonth = month === 0 ? 11 : month - 1;
|
|
53
|
+
var prevMonthYear = month === 0 ? year - 1 : year;
|
|
54
|
+
var daysInPrevMonth = new Date(prevMonthYear, prevMonth + 1, 0).getDate();
|
|
55
|
+
for (var i = firstDayOfMonth - 1; i >= 0; i--) {
|
|
56
|
+
prevMonthDays.unshift({
|
|
57
|
+
day: daysInPrevMonth - i,
|
|
58
|
+
month: prevMonth,
|
|
59
|
+
year: prevMonthYear,
|
|
60
|
+
isCurrentMonth: false
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
// Current month days
|
|
64
|
+
for (var i = 1; i <= daysInMonth; i++) {
|
|
65
|
+
currentMonthDays.push({
|
|
66
|
+
day: i,
|
|
67
|
+
month: month,
|
|
68
|
+
year: year,
|
|
69
|
+
isCurrentMonth: true
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
// Next month days
|
|
73
|
+
var nextMonth = month === 11 ? 0 : month + 1;
|
|
74
|
+
var nextMonthYear = month === 11 ? year + 1 : year;
|
|
75
|
+
var remainingDays = 42 - (prevMonthDays.length + currentMonthDays.length);
|
|
76
|
+
for (var i = 1; i <= remainingDays; i++) {
|
|
77
|
+
nextMonthDays.push({
|
|
78
|
+
day: i,
|
|
79
|
+
month: nextMonth,
|
|
80
|
+
year: nextMonthYear,
|
|
81
|
+
isCurrentMonth: false
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
return __spreadArray(__spreadArray(__spreadArray([], prevMonthDays, true), currentMonthDays, true), nextMonthDays, true);
|
|
85
|
+
};
|
|
86
|
+
// Check if a day is selected
|
|
87
|
+
var isSelected = function (day, month, year) {
|
|
88
|
+
if (!field.value)
|
|
89
|
+
return false;
|
|
90
|
+
return field.value.getDate() === day &&
|
|
91
|
+
field.value.getMonth() === month &&
|
|
92
|
+
field.value.getFullYear() === year;
|
|
93
|
+
};
|
|
94
|
+
// Check if a day is disabled
|
|
95
|
+
var isDisabled = function (day, month, year) {
|
|
96
|
+
var date = new Date(year, month, day);
|
|
97
|
+
return date < minDate || date > maxDate;
|
|
98
|
+
};
|
|
99
|
+
// Handler for day selection
|
|
100
|
+
var handleDaySelect = function (day, month, year) {
|
|
101
|
+
var selectedDate = new Date(year, month, day);
|
|
102
|
+
field.onChange(selectedDate);
|
|
103
|
+
setOpen(false);
|
|
104
|
+
};
|
|
105
|
+
// Handle month selection
|
|
106
|
+
var handleMonthSelect = function (monthIndex) {
|
|
107
|
+
var newDate = new Date(calendarDate.getFullYear(), monthIndex, 1);
|
|
108
|
+
if (newDate >= minDate && newDate <= maxDate) {
|
|
109
|
+
setCalendarDate(newDate);
|
|
110
|
+
setView("days");
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
// Handle year selection
|
|
114
|
+
var handleYearSelect = function (year) {
|
|
115
|
+
var newDate = new Date(year, calendarDate.getMonth(), 1);
|
|
116
|
+
if (newDate >= minDate && newDate <= maxDate) {
|
|
117
|
+
setCalendarDate(newDate);
|
|
118
|
+
setView("months");
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
// Navigate to previous month
|
|
122
|
+
var prevMonth = function () {
|
|
123
|
+
var prevMonthDate = new Date(calendarDate);
|
|
124
|
+
prevMonthDate.setMonth(prevMonthDate.getMonth() - 1);
|
|
125
|
+
setCalendarDate(prevMonthDate);
|
|
126
|
+
};
|
|
127
|
+
// Navigate to next month
|
|
128
|
+
var nextMonth = function () {
|
|
129
|
+
var nextMonthDate = new Date(calendarDate);
|
|
130
|
+
nextMonthDate.setMonth(nextMonthDate.getMonth() + 1);
|
|
131
|
+
setCalendarDate(nextMonthDate);
|
|
132
|
+
};
|
|
133
|
+
// Navigate to previous year range
|
|
134
|
+
var prevYearRange = function () {
|
|
135
|
+
setYearRange([yearRange[0] - 10, yearRange[1] - 10]);
|
|
136
|
+
};
|
|
137
|
+
// Navigate to next year range
|
|
138
|
+
var nextYearRange = function () {
|
|
139
|
+
setYearRange([yearRange[0] + 10, yearRange[1] + 10]);
|
|
140
|
+
};
|
|
141
|
+
// Toggle between day, month, and year views
|
|
142
|
+
var toggleView = function () {
|
|
143
|
+
if (view === "days") {
|
|
144
|
+
setView("months");
|
|
145
|
+
}
|
|
146
|
+
else if (view === "months") {
|
|
147
|
+
var year = calendarDate.getFullYear();
|
|
148
|
+
var startYear = Math.floor(year / 10) * 10;
|
|
149
|
+
setYearRange([startYear, startYear + 9]);
|
|
150
|
+
setView("years");
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
// Render the header
|
|
154
|
+
var renderHeader = function () {
|
|
155
|
+
if (view === "days") {
|
|
156
|
+
return (_jsxs("div", { className: "flex justify-between items-center mb-2", children: [_jsx("button", { type: "button", className: "p-1 rounded-full hover:bg-gray-200", onClick: prevMonth, children: _jsx(ChevronLeft, { className: "h-4 w-4" }) }), _jsxs("button", { type: "button", className: "font-semibold hover:bg-muted px-2 py-1 rounded", onClick: toggleView, children: [months[calendarDate.getMonth()], " ", calendarDate.getFullYear()] }), _jsx("button", { type: "button", className: "p-1 rounded-full hover:bg-gray-200", onClick: nextMonth, children: _jsx(ChevronRight, { className: "h-4 w-4" }) })] }));
|
|
157
|
+
}
|
|
158
|
+
else if (view === "months") {
|
|
159
|
+
return (_jsxs("div", { className: "flex justify-between items-center mb-2", children: [_jsx("button", { type: "button", className: "p-1 rounded-full hover:bg-gray-200", onClick: function () {
|
|
160
|
+
var newDate = new Date(calendarDate);
|
|
161
|
+
newDate.setFullYear(newDate.getFullYear() - 1);
|
|
162
|
+
setCalendarDate(newDate);
|
|
163
|
+
}, children: _jsx(ChevronLeft, { className: "h-4 w-4" }) }), _jsx("button", { type: "button", className: "font-semibold hover:bg-muted px-2 py-1 rounded", onClick: toggleView, children: calendarDate.getFullYear() }), _jsx("button", { type: "button", className: "p-1 rounded-full hover:bg-gray-200", onClick: function () {
|
|
164
|
+
var newDate = new Date(calendarDate);
|
|
165
|
+
newDate.setFullYear(newDate.getFullYear() + 1);
|
|
166
|
+
setCalendarDate(newDate);
|
|
167
|
+
}, children: _jsx(ChevronRight, { className: "h-4 w-4" }) })] }));
|
|
168
|
+
}
|
|
169
|
+
else if (view === "years") {
|
|
170
|
+
return (_jsxs("div", { className: "flex justify-between items-center mb-2", children: [_jsx("button", { type: "button", className: "p-1 rounded-full hover:bg-gray-200", onClick: prevYearRange, children: _jsx(ChevronLeft, { className: "h-4 w-4" }) }), _jsxs("button", { type: "button", className: "font-semibold hover:bg-muted px-2 py-1 rounded", children: [yearRange[0], " - ", yearRange[1]] }), _jsx("button", { type: "button", className: "p-1 rounded-full hover:bg-gray-200", onClick: nextYearRange, children: _jsx(ChevronRight, { className: "h-4 w-4" }) })] }));
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
// Render the calendar content based on the current view
|
|
174
|
+
var renderCalendarContent = function () {
|
|
175
|
+
if (view === "days") {
|
|
176
|
+
var daysInMonth = getDaysInMonth(calendarDate.getFullYear(), calendarDate.getMonth());
|
|
177
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "grid grid-cols-7 gap-1 mb-1", children: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(function (day) { return (_jsx("div", { className: "text-center text-xs font-medium text-gray-500", children: day }, day)); }) }), _jsx("div", { className: "grid grid-cols-7 gap-1", children: daysInMonth.map(function (dayInfo, index) {
|
|
178
|
+
var day = dayInfo.day, month = dayInfo.month, year = dayInfo.year, isCurrentMonth = dayInfo.isCurrentMonth;
|
|
179
|
+
var isDateSelected = isSelected(day, month, year);
|
|
180
|
+
var isDateDisabled = isDisabled(day, month, year);
|
|
181
|
+
return (_jsx("button", { type: "button", disabled: isDateDisabled, className: cn("h-8 w-8 text-sm rounded-full flex items-center justify-center", !isCurrentMonth && "text-muted-foreground", isDateSelected && !isDateDisabled && "bg-black text-white", !isDateSelected && !isDateDisabled && "hover:bg-muted", isDateDisabled && "text-gray-300 cursor-not-allowed"), onClick: function () { return handleDaySelect(day, month, year); }, children: day }, index));
|
|
182
|
+
}) })] }));
|
|
183
|
+
}
|
|
184
|
+
else if (view === "months") {
|
|
185
|
+
return (_jsx("div", { className: "grid grid-cols-3 gap-2 p-2", children: months.map(function (month, index) {
|
|
186
|
+
var isMonthDisabled = (calendarDate.getFullYear() === minYear && index < minDate.getMonth()) ||
|
|
187
|
+
(calendarDate.getFullYear() === maxYear && index > maxDate.getMonth());
|
|
188
|
+
return (_jsx("button", { type: "button", disabled: isMonthDisabled, className: cn("py-2 rounded text-sm", calendarDate.getMonth() === index && "bg-black text-white", !isMonthDisabled && calendarDate.getMonth() !== index && "hover:bg-muted", isMonthDisabled && "text-gray-300 cursor-not-allowed"), onClick: function () { return handleMonthSelect(index); }, children: month.substring(0, 3) }, month));
|
|
189
|
+
}) }));
|
|
190
|
+
}
|
|
191
|
+
else if (view === "years") {
|
|
192
|
+
return (_jsx("div", { className: "grid grid-cols-3 gap-2 p-2", children: Array.from({ length: 10 }, function (_, i) { return yearRange[0] + i; }).map(function (year) {
|
|
193
|
+
var isYearDisabled = year < minYear || year > maxYear;
|
|
194
|
+
return (_jsx("button", { type: "button", disabled: isYearDisabled, className: cn("py-2 rounded text-sm", calendarDate.getFullYear() === year && "bg-black text-white", !isYearDisabled && calendarDate.getFullYear() !== year && "hover:bg-muted", isYearDisabled && "text-gray-300 cursor-not-allowed"), onClick: function () { return handleYearSelect(year); }, children: year }, year));
|
|
195
|
+
}) }));
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
return (_jsxs(FormItem, { className: "flex-1 flex flex-col", children: [_jsx(FormLabel, { children: label }), _jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx(FormControl, { children: _jsxs(Button, { variant: "outline", className: cn("w-full pl-3 text-left font-normal cursor-pointer", !field.value && "text-muted-foreground"), children: [field.value ? (format(field.value, "PPP")) : (_jsx("span", { children: "Pick a date" })), _jsx(CalendarIcon, { className: "ml-auto h-4 w-4 opacity-50" })] }) }) }), _jsx(PopoverContent, { className: "w-auto p-3", align: "start", children: _jsxs("div", { className: "w-64", children: [renderHeader(), renderCalendarContent()] }) })] })] }));
|
|
199
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
2
|
+
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function DialogContent({ className, children, ...props }: React.ComponentProps<typeof DialogPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
13
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/misc/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAKzD,iBAAS,MAAM,CAAC,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAEnD;AAED,iBAAS,aAAa,CAAC,EACrB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAEtD;AAED,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,MAAM,CAAC,2CAErD;AAED,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAEpD;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAWtD;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAoBtD;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQzE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWzE;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAQpD;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,2CAQ1D;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAA"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use client";
|
|
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 __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
26
|
+
import { cn } from "@myrjfa/state/dist/lib/utils";
|
|
27
|
+
import { XIcon } from "lucide-react";
|
|
28
|
+
function Dialog(_a) {
|
|
29
|
+
var props = __rest(_a, []);
|
|
30
|
+
return _jsx(DialogPrimitive.Root, __assign({ "data-slot": "dialog" }, props));
|
|
31
|
+
}
|
|
32
|
+
function DialogTrigger(_a) {
|
|
33
|
+
var props = __rest(_a, []);
|
|
34
|
+
return _jsx(DialogPrimitive.Trigger, __assign({ "data-slot": "dialog-trigger" }, props));
|
|
35
|
+
}
|
|
36
|
+
function DialogPortal(_a) {
|
|
37
|
+
var props = __rest(_a, []);
|
|
38
|
+
return _jsx(DialogPrimitive.Portal, __assign({ "data-slot": "dialog-portal" }, props));
|
|
39
|
+
}
|
|
40
|
+
function DialogClose(_a) {
|
|
41
|
+
var props = __rest(_a, []);
|
|
42
|
+
return _jsx(DialogPrimitive.Close, __assign({ "data-slot": "dialog-close" }, props));
|
|
43
|
+
}
|
|
44
|
+
function DialogOverlay(_a) {
|
|
45
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
46
|
+
return (_jsx(DialogPrimitive.Overlay, __assign({ "data-slot": "dialog-overlay", className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80", className) }, props)));
|
|
47
|
+
}
|
|
48
|
+
function DialogContent(_a) {
|
|
49
|
+
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
|
50
|
+
return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, __assign({ "data-slot": "dialog-content", className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className) }, props, { children: [children, _jsxs(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] })] }))] }));
|
|
51
|
+
}
|
|
52
|
+
function DialogHeader(_a) {
|
|
53
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
54
|
+
return (_jsx("div", __assign({ "data-slot": "dialog-header", className: cn("flex flex-col gap-2 text-center sm:text-left", className) }, props)));
|
|
55
|
+
}
|
|
56
|
+
function DialogFooter(_a) {
|
|
57
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
58
|
+
return (_jsx("div", __assign({ "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className) }, props)));
|
|
59
|
+
}
|
|
60
|
+
function DialogTitle(_a) {
|
|
61
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
62
|
+
return (_jsx(DialogPrimitive.Title, __assign({ "data-slot": "dialog-title", className: cn("text-lg leading-none font-semibold", className) }, props)));
|
|
63
|
+
}
|
|
64
|
+
function DialogDescription(_a) {
|
|
65
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
66
|
+
return (_jsx(DialogPrimitive.Description, __assign({ "data-slot": "dialog-description", className: cn("text-muted-foreground text-sm", className) }, props)));
|
|
67
|
+
}
|
|
68
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
2
|
+
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
8
|
+
inset?: boolean;
|
|
9
|
+
variant?: "default" | "destructive";
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
15
|
+
inset?: boolean;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
21
|
+
inset?: boolean;
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
25
|
+
//# sourceMappingURL=dropdown-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../src/misc/dropdown-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAA;AAKtE,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC,2CAEzD;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,MAAM,CAAC,2CAI3D;AAED,iBAAS,mBAAmB,CAAC,EAC3B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,OAAO,CAAC,2CAO5D;AAED,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,UAAc,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,OAAO,CAAC,2CAc5D;AAED,iBAAS,iBAAiB,CAAC,EACzB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,KAAK,CAAC,2CAI1D;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,KAAK,EACL,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC,GAAG;IAC3D,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAA;CACpC,2CAaA;AAED,iBAAS,wBAAwB,CAAC,EAChC,SAAS,EACT,QAAQ,EACR,OAAO,EACP,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,YAAY,CAAC,2CAmBjE;AAED,iBAAS,sBAAsB,CAAC,EAC9B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,UAAU,CAAC,2CAO/D;AAED,iBAAS,qBAAqB,CAAC,EAC7B,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,SAAS,CAAC,2CAkB9D;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,KAAK,CAAC,GAAG;IAC5D,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,2CAYA;AAED,iBAAS,qBAAqB,CAAC,EAC7B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,SAAS,CAAC,2CAQ9D;AAED,iBAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,2CAW9B;AAED,iBAAS,eAAe,CAAC,EACvB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,GAAG,CAAC,2CAExD;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,UAAU,CAAC,GAAG;IACjE,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,2CAeA;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,UAAU,CAAC,2CAW/D;AAED,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,GACvB,CAAA"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use client";
|
|
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 __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
26
|
+
import { cn } from "@myrjfa/state/dist/lib/utils";
|
|
27
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
28
|
+
function DropdownMenu(_a) {
|
|
29
|
+
var props = __rest(_a, []);
|
|
30
|
+
return _jsx(DropdownMenuPrimitive.Root, __assign({ "data-slot": "dropdown-menu" }, props));
|
|
31
|
+
}
|
|
32
|
+
function DropdownMenuPortal(_a) {
|
|
33
|
+
var props = __rest(_a, []);
|
|
34
|
+
return (_jsx(DropdownMenuPrimitive.Portal, __assign({ "data-slot": "dropdown-menu-portal" }, props)));
|
|
35
|
+
}
|
|
36
|
+
function DropdownMenuTrigger(_a) {
|
|
37
|
+
var props = __rest(_a, []);
|
|
38
|
+
return (_jsx(DropdownMenuPrimitive.Trigger, __assign({ "data-slot": "dropdown-menu-trigger" }, props)));
|
|
39
|
+
}
|
|
40
|
+
function DropdownMenuContent(_a) {
|
|
41
|
+
var className = _a.className, _b = _a.sideOffset, sideOffset = _b === void 0 ? 4 : _b, props = __rest(_a, ["className", "sideOffset"]);
|
|
42
|
+
return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, __assign({ "data-slot": "dropdown-menu-content", sideOffset: sideOffset, className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", className) }, props)) }));
|
|
43
|
+
}
|
|
44
|
+
function DropdownMenuGroup(_a) {
|
|
45
|
+
var props = __rest(_a, []);
|
|
46
|
+
return (_jsx(DropdownMenuPrimitive.Group, __assign({ "data-slot": "dropdown-menu-group" }, props)));
|
|
47
|
+
}
|
|
48
|
+
function DropdownMenuItem(_a) {
|
|
49
|
+
var className = _a.className, inset = _a.inset, _b = _a.variant, variant = _b === void 0 ? "default" : _b, props = __rest(_a, ["className", "inset", "variant"]);
|
|
50
|
+
return (_jsx(DropdownMenuPrimitive.Item, __assign({ "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className) }, props)));
|
|
51
|
+
}
|
|
52
|
+
function DropdownMenuCheckboxItem(_a) {
|
|
53
|
+
var className = _a.className, children = _a.children, checked = _a.checked, props = __rest(_a, ["className", "children", "checked"]);
|
|
54
|
+
return (_jsxs(DropdownMenuPrimitive.CheckboxItem, __assign({ "data-slot": "dropdown-menu-checkbox-item", className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), checked: checked }, props, { children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), children] })));
|
|
55
|
+
}
|
|
56
|
+
function DropdownMenuRadioGroup(_a) {
|
|
57
|
+
var props = __rest(_a, []);
|
|
58
|
+
return (_jsx(DropdownMenuPrimitive.RadioGroup, __assign({ "data-slot": "dropdown-menu-radio-group" }, props)));
|
|
59
|
+
}
|
|
60
|
+
function DropdownMenuRadioItem(_a) {
|
|
61
|
+
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
|
62
|
+
return (_jsxs(DropdownMenuPrimitive.RadioItem, __assign({ "data-slot": "dropdown-menu-radio-item", className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className) }, props, { children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CircleIcon, { className: "size-2 fill-current" }) }) }), children] })));
|
|
63
|
+
}
|
|
64
|
+
function DropdownMenuLabel(_a) {
|
|
65
|
+
var className = _a.className, inset = _a.inset, props = __rest(_a, ["className", "inset"]);
|
|
66
|
+
return (_jsx(DropdownMenuPrimitive.Label, __assign({ "data-slot": "dropdown-menu-label", "data-inset": inset, className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className) }, props)));
|
|
67
|
+
}
|
|
68
|
+
function DropdownMenuSeparator(_a) {
|
|
69
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
70
|
+
return (_jsx(DropdownMenuPrimitive.Separator, __assign({ "data-slot": "dropdown-menu-separator", className: cn("bg-border -mx-1 my-1 h-px", className) }, props)));
|
|
71
|
+
}
|
|
72
|
+
function DropdownMenuShortcut(_a) {
|
|
73
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
74
|
+
return (_jsx("span", __assign({ "data-slot": "dropdown-menu-shortcut", className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className) }, props)));
|
|
75
|
+
}
|
|
76
|
+
function DropdownMenuSub(_a) {
|
|
77
|
+
var props = __rest(_a, []);
|
|
78
|
+
return _jsx(DropdownMenuPrimitive.Sub, __assign({ "data-slot": "dropdown-menu-sub" }, props));
|
|
79
|
+
}
|
|
80
|
+
function DropdownMenuSubTrigger(_a) {
|
|
81
|
+
var className = _a.className, inset = _a.inset, children = _a.children, props = __rest(_a, ["className", "inset", "children"]);
|
|
82
|
+
return (_jsxs(DropdownMenuPrimitive.SubTrigger, __assign({ "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8", className) }, props, { children: [children, _jsx(ChevronRightIcon, { className: "ml-auto size-4" })] })));
|
|
83
|
+
}
|
|
84
|
+
function DropdownMenuSubContent(_a) {
|
|
85
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
86
|
+
return (_jsx(DropdownMenuPrimitive.SubContent, __assign({ "data-slot": "dropdown-menu-sub-content", className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg", className) }, props)));
|
|
87
|
+
}
|
|
88
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"faq.d.ts","sourceRoot":"","sources":["../../src/misc/faq.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAA;AAG9D,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,QAAQ,EAAE,CAAA;CAAE,2CAkBzD"}
|
package/dist/misc/faq.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './accordion';
|
|
3
|
+
export default function Faq(_a) {
|
|
4
|
+
var faqs = _a.faqs;
|
|
5
|
+
return (_jsxs("div", { children: [_jsx("h2", { className: "text-2xl font-bold text-center mb-6", children: "Frequently Asked Questions" }), _jsx(Accordion, { type: "multiple", className: "space-y-2", children: faqs.map(function (faq, index) { return (_jsxs(AccordionItem, { value: "item-".concat(index), className: "border border-gray-200 rounded-lg last:border-b", children: [_jsx(AccordionTrigger, { className: "text-left px-4 py-3 font-medium", children: faq.question }), _jsx(AccordionContent, { className: "px-4 pb-4 text-sm text-gray-600", children: faq.answer })] }, index)); }) })] }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const DocumentPreviewButton: ({ filepath, label, icon, size, }: {
|
|
2
|
+
filepath: string | File;
|
|
3
|
+
label?: string;
|
|
4
|
+
icon?: any;
|
|
5
|
+
size?: "icon" | "lg" | "sm" | "default";
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default DocumentPreviewButton;
|
|
8
|
+
//# sourceMappingURL=file-preview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-preview.d.ts","sourceRoot":"","sources":["../../src/misc/file-preview.tsx"],"names":[],"mappings":"AAuBA,QAAA,MAAM,qBAAqB,GAAI,kCAK5B;IACC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;CAC3C,4CA0EA,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|