@coston/ui 0.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/README.md +87 -0
- package/dist/button-BEd6_-lL.d.ts +16 -0
- package/dist/button-BEd6_-lL.d.ts.map +1 -0
- package/dist/button-CJvoztqg.js +46 -0
- package/dist/button-CJvoztqg.js.map +1 -0
- package/dist/components/accordion.d.ts +11 -0
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +38 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/alert-dialog.d.ts +31 -0
- package/dist/components/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog.js +60 -0
- package/dist/components/alert-dialog.js.map +1 -0
- package/dist/components/alert.d.ts +13 -0
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +36 -0
- package/dist/components/alert.js.map +1 -0
- package/dist/components/aspect-ratio.d.ts +8 -0
- package/dist/components/aspect-ratio.d.ts.map +1 -0
- package/dist/components/aspect-ratio.js +8 -0
- package/dist/components/aspect-ratio.js.map +1 -0
- package/dist/components/avatar.d.ts +10 -0
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +28 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +18 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +25 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/breadcrumb.d.ts +31 -0
- package/dist/components/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb.js +66 -0
- package/dist/components/breadcrumb.js.map +1 -0
- package/dist/components/button.d.ts +2 -0
- package/dist/components/button.js +4 -0
- package/dist/components/calendar.d.ts +17 -0
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/calendar.js +46 -0
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/card.d.ts +12 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +46 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/carousel.d.ts +23 -0
- package/dist/components/carousel.d.ts.map +1 -0
- package/dist/components/carousel.js +139 -0
- package/dist/components/carousel.js.map +1 -0
- package/dist/components/chart.d.ts +32 -0
- package/dist/components/chart.d.ts.map +1 -0
- package/dist/components/chart.js +115 -0
- package/dist/components/chart.js.map +1 -0
- package/dist/components/checkbox.d.ts +8 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +21 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/collapsible.d.ts +10 -0
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +13 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/command.d.ts +26 -0
- package/dist/components/command.d.ts.map +1 -0
- package/dist/components/command.js +77 -0
- package/dist/components/command.js.map +1 -0
- package/dist/components/context-menu.d.ts +35 -0
- package/dist/components/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu.js +82 -0
- package/dist/components/context-menu.js.map +1 -0
- package/dist/components/dialog.d.ts +30 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +4 -0
- package/dist/components/drawer.d.ts +36 -0
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js +53 -0
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +35 -0
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +83 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/hover-card.d.ts +10 -0
- package/dist/components/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card.js +20 -0
- package/dist/components/hover-card.js.map +1 -0
- package/dist/components/input.d.ts +8 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +18 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/label.d.ts +10 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +18 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/menubar.d.ts +42 -0
- package/dist/components/menubar.d.ts.map +1 -0
- package/dist/components/menubar.js +96 -0
- package/dist/components/menubar.js.map +1 -0
- package/dist/components/navigation-menu.d.ts +17 -0
- package/dist/components/navigation-menu.d.ts.map +1 -0
- package/dist/components/navigation-menu.js +64 -0
- package/dist/components/navigation-menu.js.map +1 -0
- package/dist/components/pagination.d.ts +50 -0
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +65 -0
- package/dist/components/pagination.js.map +1 -0
- package/dist/components/popover.d.ts +10 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +20 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/progress.d.ts +8 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +20 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/radio-group.d.ts +9 -0
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +31 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/resizable.d.ts +20 -0
- package/dist/components/resizable.d.ts.map +1 -0
- package/dist/components/resizable.js +24 -0
- package/dist/components/resizable.js.map +1 -0
- package/dist/components/scroll-area.d.ts +9 -0
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js +32 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/select.d.ts +17 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +75 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +8 -0
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +4 -0
- package/dist/components/sheet.d.ts +36 -0
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.js +69 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/sidebar.d.ts +54 -0
- package/dist/components/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar.js +267 -0
- package/dist/components/sidebar.js.map +1 -0
- package/dist/components/skeleton.d.ts +10 -0
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +14 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/slider.d.ts +8 -0
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +20 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/sonner.d.ts +11 -0
- package/dist/components/sonner.d.ts.map +1 -0
- package/dist/components/sonner.js +22 -0
- package/dist/components/sonner.js.map +1 -0
- package/dist/components/switch.d.ts +8 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +17 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.d.ts +14 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +61 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +11 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +29 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/textarea.d.ts +7 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +17 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/toggle-group.d.ts +17 -0
- package/dist/components/toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group.js +41 -0
- package/dist/components/toggle-group.js.map +1 -0
- package/dist/components/toggle.d.ts +17 -0
- package/dist/components/toggle.d.ts.map +1 -0
- package/dist/components/toggle.js +4 -0
- package/dist/components/tooltip.d.ts +2 -0
- package/dist/components/tooltip.js +4 -0
- package/dist/dialog-B_8jhMOs.js +56 -0
- package/dist/dialog-B_8jhMOs.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +7 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +3 -0
- package/dist/lib/utils.d.ts +9 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +3 -0
- package/dist/separator-9lzFsfCC.js +18 -0
- package/dist/separator-9lzFsfCC.js.map +1 -0
- package/dist/toggle-BpKiTVe4.js +38 -0
- package/dist/toggle-BpKiTVe4.js.map +1 -0
- package/dist/tooltip-CXS6wR7g.js +20 -0
- package/dist/tooltip-CXS6wR7g.js.map +1 -0
- package/dist/tooltip-DPcgBDyX.d.ts +11 -0
- package/dist/tooltip-DPcgBDyX.d.ts.map +1 -0
- package/dist/use-mobile-CixTQBWA.js +21 -0
- package/dist/use-mobile-CixTQBWA.js.map +1 -0
- package/dist/utils-C0f9Ma6r.js +11 -0
- package/dist/utils-C0f9Ma6r.js.map +1 -0
- package/package.json +168 -0
- package/src/components/accordion.tsx +51 -0
- package/src/components/alert-dialog.tsx +115 -0
- package/src/components/alert.tsx +49 -0
- package/src/components/aspect-ratio.tsx +5 -0
- package/src/components/avatar.tsx +44 -0
- package/src/components/badge.tsx +32 -0
- package/src/components/breadcrumb.tsx +101 -0
- package/src/components/button.tsx +48 -0
- package/src/components/calendar.tsx +76 -0
- package/src/components/card.tsx +60 -0
- package/src/components/carousel.tsx +240 -0
- package/src/components/chart.tsx +232 -0
- package/src/components/checkbox.tsx +25 -0
- package/src/components/collapsible.tsx +11 -0
- package/src/components/command.tsx +136 -0
- package/src/components/context-menu.tsx +187 -0
- package/src/components/dialog.tsx +105 -0
- package/src/components/drawer.tsx +98 -0
- package/src/components/dropdown-menu.tsx +185 -0
- package/src/components/hover-card.tsx +29 -0
- package/src/components/input.tsx +24 -0
- package/src/components/label.tsx +19 -0
- package/src/components/menubar.tsx +219 -0
- package/src/components/navigation-menu.tsx +120 -0
- package/src/components/pagination.tsx +98 -0
- package/src/components/popover.tsx +27 -0
- package/src/components/progress.tsx +23 -0
- package/src/components/radio-group.tsx +35 -0
- package/src/components/resizable.tsx +38 -0
- package/src/components/scroll-area.tsx +43 -0
- package/src/components/select.tsx +147 -0
- package/src/components/separator.tsx +23 -0
- package/src/components/sheet.tsx +122 -0
- package/src/components/sidebar.tsx +507 -0
- package/src/components/skeleton.tsx +7 -0
- package/src/components/slider.tsx +23 -0
- package/src/components/sonner.tsx +26 -0
- package/src/components/switch.tsx +26 -0
- package/src/components/table.tsx +95 -0
- package/src/components/tabs.tsx +53 -0
- package/src/components/textarea.tsx +20 -0
- package/src/components/toggle-group.tsx +54 -0
- package/src/components/toggle.tsx +40 -0
- package/src/components/tooltip.tsx +27 -0
- package/src/hooks/use-mobile.tsx +19 -0
- package/src/lib/utils.ts +6 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { cn } from "../utils-C0f9Ma6r.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
6
|
+
|
|
7
|
+
//#region src/components/breadcrumb.tsx
|
|
8
|
+
const Breadcrumb = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("nav", {
|
|
9
|
+
ref,
|
|
10
|
+
"aria-label": "breadcrumb",
|
|
11
|
+
...props
|
|
12
|
+
}));
|
|
13
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
14
|
+
const BreadcrumbList = React.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("ol", {
|
|
15
|
+
ref,
|
|
16
|
+
className: cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5", className),
|
|
17
|
+
...props
|
|
18
|
+
}));
|
|
19
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
20
|
+
const BreadcrumbItem = React.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("li", {
|
|
21
|
+
ref,
|
|
22
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
23
|
+
...props
|
|
24
|
+
}));
|
|
25
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
26
|
+
const BreadcrumbLink = React.forwardRef(({ asChild, className,...props }, ref) => {
|
|
27
|
+
const Comp = asChild ? Slot : "a";
|
|
28
|
+
return /* @__PURE__ */ jsx(Comp, {
|
|
29
|
+
ref,
|
|
30
|
+
className: cn("transition-colors hover:text-foreground", className),
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
35
|
+
const BreadcrumbPage = React.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("span", {
|
|
36
|
+
ref,
|
|
37
|
+
role: "link",
|
|
38
|
+
"aria-disabled": "true",
|
|
39
|
+
"aria-current": "page",
|
|
40
|
+
className: cn("font-normal text-foreground", className),
|
|
41
|
+
...props
|
|
42
|
+
}));
|
|
43
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
44
|
+
const BreadcrumbSeparator = ({ children, className,...props }) => /* @__PURE__ */ jsx("li", {
|
|
45
|
+
role: "presentation",
|
|
46
|
+
"aria-hidden": "true",
|
|
47
|
+
className: cn("[&>svg]:h-3.5 [&>svg]:w-3.5", className),
|
|
48
|
+
...props,
|
|
49
|
+
children: children ?? /* @__PURE__ */ jsx(ChevronRight, {})
|
|
50
|
+
});
|
|
51
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
52
|
+
const BreadcrumbEllipsis = ({ className,...props }) => /* @__PURE__ */ jsxs("span", {
|
|
53
|
+
role: "presentation",
|
|
54
|
+
"aria-hidden": "true",
|
|
55
|
+
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
56
|
+
...props,
|
|
57
|
+
children: [/* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
|
|
58
|
+
className: "sr-only",
|
|
59
|
+
children: "More"
|
|
60
|
+
})]
|
|
61
|
+
});
|
|
62
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
|
|
63
|
+
|
|
64
|
+
//#endregion
|
|
65
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
|
66
|
+
//# sourceMappingURL=breadcrumb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumb.js","names":[],"sources":["../../src/components/breadcrumb.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { ChevronRight, MoreHorizontal } from 'lucide-react';\n\nimport { cn } from '../lib/utils';\n\nconst Breadcrumb = React.forwardRef<\n HTMLElement,\n React.ComponentPropsWithoutRef<'nav'> & {\n separator?: React.ReactNode;\n }\n>(({ ...props }, ref) => <nav ref={ref} aria-label=\"breadcrumb\" {...props} />);\nBreadcrumb.displayName = 'Breadcrumb';\n\nconst BreadcrumbList = React.forwardRef<HTMLOListElement, React.ComponentPropsWithoutRef<'ol'>>(\n ({ className, ...props }, ref) => (\n <ol\n ref={ref}\n className={cn(\n 'flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5',\n className\n )}\n {...props}\n />\n )\n);\nBreadcrumbList.displayName = 'BreadcrumbList';\n\nconst BreadcrumbItem = React.forwardRef<HTMLLIElement, React.ComponentPropsWithoutRef<'li'>>(\n ({ className, ...props }, ref) => (\n <li ref={ref} className={cn('inline-flex items-center gap-1.5', className)} {...props} />\n )\n);\nBreadcrumbItem.displayName = 'BreadcrumbItem';\n\nconst BreadcrumbLink = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentPropsWithoutRef<'a'> & {\n asChild?: boolean;\n }\n>(({ asChild, className, ...props }, ref) => {\n const Comp = asChild ? Slot : 'a';\n\n return (\n <Comp\n ref={ref}\n className={cn('transition-colors hover:text-foreground', className)}\n {...props}\n />\n );\n});\nBreadcrumbLink.displayName = 'BreadcrumbLink';\n\nconst BreadcrumbPage = React.forwardRef<HTMLSpanElement, React.ComponentPropsWithoutRef<'span'>>(\n ({ className, ...props }, ref) => (\n <span\n ref={ref}\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n className={cn('font-normal text-foreground', className)}\n {...props}\n />\n )\n);\nBreadcrumbPage.displayName = 'BreadcrumbPage';\n\nconst BreadcrumbSeparator = ({ children, className, ...props }: React.ComponentProps<'li'>) => (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn('[&>svg]:h-3.5 [&>svg]:w-3.5', className)}\n {...props}\n >\n {children ?? <ChevronRight />}\n </li>\n);\nBreadcrumbSeparator.displayName = 'BreadcrumbSeparator';\n\nconst BreadcrumbEllipsis = ({ className, ...props }: React.ComponentProps<'span'>) => (\n <span\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn('flex h-9 w-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">More</span>\n </span>\n);\nBreadcrumbEllipsis.displayName = 'BreadcrumbEllipsis';\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n};\n"],"mappings":";;;;;;;AAMA,MAAM,aAAa,MAAM,WAKvB,CAAC,EAAE,GAAG,OAAO,EAAE,wBAAQ,IAAC;CAAS;CAAK,cAAW;CAAa,GAAI;EAAS,CAAC;AAC9E,WAAW,cAAc;AAEzB,MAAM,iBAAiB,MAAM,WAC3B,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBACxB,IAAC;CACM;CACL,WAAW,GACT,4FACA,UACD;CACD,GAAI;EACJ,CAEL;AACD,eAAe,cAAc;AAE7B,MAAM,iBAAiB,MAAM,WAC3B,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBACxB,IAAC;CAAQ;CAAK,WAAW,GAAG,oCAAoC,UAAU;CAAE,GAAI;EAAS,CAE5F;AACD,eAAe,cAAc;AAE7B,MAAM,iBAAiB,MAAM,WAK3B,CAAC,EAAE,SAAS,UAAW,GAAG,OAAO,EAAE,QAAQ;CAC3C,MAAM,OAAO,UAAU,OAAO;AAE9B,wBACE,IAAC;EACM;EACL,WAAW,GAAG,2CAA2C,UAAU;EACnE,GAAI;GACJ;AAEL,EAAC;AACF,eAAe,cAAc;AAE7B,MAAM,iBAAiB,MAAM,WAC3B,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBACxB,IAAC;CACM;CACL,MAAK;CACL,iBAAc;CACd,gBAAa;CACb,WAAW,GAAG,+BAA+B,UAAU;CACvD,GAAI;EACJ,CAEL;AACD,eAAe,cAAc;AAE7B,MAAM,sBAAsB,CAAC,EAAE,UAAU,UAAW,GAAG,OAAmC,qBACxF,IAAC;CACC,MAAK;CACL,eAAY;CACZ,WAAW,GAAG,+BAA+B,UAAU;CACvD,GAAI;WAEH,4BAAY,IAAC,iBAAe;EAC1B;AAEP,oBAAoB,cAAc;AAElC,MAAM,qBAAqB,CAAC,EAAE,UAAW,GAAG,OAAqC,qBAC/E,KAAC;CACC,MAAK;CACL,eAAY;CACZ,WAAW,GAAG,4CAA4C,UAAU;CACpE,GAAI;4BAEJ,IAAC,kBAAe,WAAU,YAAY,kBACtC,IAAC;EAAK,WAAU;YAAU;GAAW;EAChC;AAET,mBAAmB,cAAc"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
3
|
+
import { DayPicker } from "react-day-picker";
|
|
4
|
+
|
|
5
|
+
//#region src/components/calendar.d.ts
|
|
6
|
+
type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
|
7
|
+
declare function Calendar({
|
|
8
|
+
className,
|
|
9
|
+
classNames,
|
|
10
|
+
...props
|
|
11
|
+
}: CalendarProps): react_jsx_runtime6.JSX.Element;
|
|
12
|
+
declare namespace Calendar {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Calendar, CalendarProps };
|
|
17
|
+
//# sourceMappingURL=calendar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar.d.ts","names":[],"sources":["../../src/components/calendar.tsx"],"sourcesContent":[],"mappings":";;;;;KAMY,aAAA,GAAgB,KAAA,CAAM,sBAAsB;iBAE/C,QAAA;;;;GAA8C,gBAAa,kBAAA,CAAA,GAAA,CAAA;kBAA3D,QAAA;EAFG,IAAA,WAAA,EAAa,MAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { cn } from "../utils-C0f9Ma6r.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { DayPicker, getDefaultClassNames } from "react-day-picker";
|
|
6
|
+
|
|
7
|
+
//#region src/components/calendar.tsx
|
|
8
|
+
function Calendar({ className, classNames,...props }) {
|
|
9
|
+
const defaultClassNames = getDefaultClassNames();
|
|
10
|
+
return /* @__PURE__ */ jsx(DayPicker, {
|
|
11
|
+
className: cn("p-3", className),
|
|
12
|
+
classNames: {
|
|
13
|
+
...defaultClassNames,
|
|
14
|
+
root: cn(defaultClassNames.root, className),
|
|
15
|
+
months: cn(defaultClassNames.months, "relative"),
|
|
16
|
+
month: cn(defaultClassNames.month, "space-y-4"),
|
|
17
|
+
month_caption: cn(defaultClassNames.month_caption, "flex justify-center pt-1 relative items-center mb-2 h-7"),
|
|
18
|
+
caption_label: cn(defaultClassNames.caption_label, "text-sm font-medium"),
|
|
19
|
+
nav: cn(defaultClassNames.nav, "absolute inset-x-1 top-0 flex items-center justify-between h-7"),
|
|
20
|
+
button_previous: cn(defaultClassNames.button_previous, "inline-flex h-7 w-7 items-center justify-center rounded-md border border-input bg-transparent opacity-50 hover:opacity-100"),
|
|
21
|
+
button_next: cn(defaultClassNames.button_next, "inline-flex h-7 w-7 items-center justify-center rounded-md border border-input bg-transparent opacity-50 hover:opacity-100"),
|
|
22
|
+
month_grid: cn(defaultClassNames.month_grid, "w-full border-collapse"),
|
|
23
|
+
weekdays: cn(defaultClassNames.weekdays, "flex"),
|
|
24
|
+
weekday: cn(defaultClassNames.weekday, "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem] text-center"),
|
|
25
|
+
week: cn(defaultClassNames.week, "flex w-full mt-2"),
|
|
26
|
+
day: cn(defaultClassNames.day, "h-9 w-9 text-center text-sm p-0 relative"),
|
|
27
|
+
day_button: cn(defaultClassNames.day_button, "inline-flex h-9 w-9 items-center justify-center rounded-md text-sm font-normal hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),
|
|
28
|
+
selected: cn(defaultClassNames.selected, "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground rounded-md"),
|
|
29
|
+
today: cn(defaultClassNames.today, "bg-accent text-accent-foreground rounded-md"),
|
|
30
|
+
outside: cn(defaultClassNames.outside, "text-muted-foreground opacity-50"),
|
|
31
|
+
disabled: cn(defaultClassNames.disabled, "text-muted-foreground opacity-50"),
|
|
32
|
+
hidden: cn(defaultClassNames.hidden, "invisible"),
|
|
33
|
+
range_start: cn(defaultClassNames.range_start, "rounded-l-md"),
|
|
34
|
+
range_end: cn(defaultClassNames.range_end, "rounded-r-md"),
|
|
35
|
+
range_middle: cn(defaultClassNames.range_middle, "bg-accent text-accent-foreground"),
|
|
36
|
+
...classNames
|
|
37
|
+
},
|
|
38
|
+
components: { Chevron: ({ orientation }) => orientation === "left" ? /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" }) },
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
Calendar.displayName = "Calendar";
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { Calendar };
|
|
46
|
+
//# sourceMappingURL=calendar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar.js","names":[],"sources":["../../src/components/calendar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronLeft, ChevronRight } from 'lucide-react';\nimport { DayPicker, getDefaultClassNames } from 'react-day-picker';\n\nimport { cn } from '../lib/utils';\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker>;\n\nfunction Calendar({ className, classNames, ...props }: CalendarProps) {\n const defaultClassNames = getDefaultClassNames();\n\n return (\n <DayPicker\n className={cn('p-3', className)}\n classNames={{\n ...defaultClassNames,\n root: cn(defaultClassNames.root, className),\n months: cn(defaultClassNames.months, 'relative'),\n month: cn(defaultClassNames.month, 'space-y-4'),\n month_caption: cn(\n defaultClassNames.month_caption,\n 'flex justify-center pt-1 relative items-center mb-2 h-7'\n ),\n caption_label: cn(defaultClassNames.caption_label, 'text-sm font-medium'),\n nav: cn(\n defaultClassNames.nav,\n 'absolute inset-x-1 top-0 flex items-center justify-between h-7'\n ),\n button_previous: cn(\n defaultClassNames.button_previous,\n 'inline-flex h-7 w-7 items-center justify-center rounded-md border border-input bg-transparent opacity-50 hover:opacity-100'\n ),\n button_next: cn(\n defaultClassNames.button_next,\n 'inline-flex h-7 w-7 items-center justify-center rounded-md border border-input bg-transparent opacity-50 hover:opacity-100'\n ),\n month_grid: cn(defaultClassNames.month_grid, 'w-full border-collapse'),\n weekdays: cn(defaultClassNames.weekdays, 'flex'),\n weekday: cn(\n defaultClassNames.weekday,\n 'text-muted-foreground rounded-md w-9 font-normal text-[0.8rem] text-center'\n ),\n week: cn(defaultClassNames.week, 'flex w-full mt-2'),\n day: cn(defaultClassNames.day, 'h-9 w-9 text-center text-sm p-0 relative'),\n day_button: cn(\n defaultClassNames.day_button,\n 'inline-flex h-9 w-9 items-center justify-center rounded-md text-sm font-normal hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring'\n ),\n selected: cn(\n defaultClassNames.selected,\n 'bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground rounded-md'\n ),\n today: cn(defaultClassNames.today, 'bg-accent text-accent-foreground rounded-md'),\n outside: cn(defaultClassNames.outside, 'text-muted-foreground opacity-50'),\n disabled: cn(defaultClassNames.disabled, 'text-muted-foreground opacity-50'),\n hidden: cn(defaultClassNames.hidden, 'invisible'),\n range_start: cn(defaultClassNames.range_start, 'rounded-l-md'),\n range_end: cn(defaultClassNames.range_end, 'rounded-r-md'),\n range_middle: cn(defaultClassNames.range_middle, 'bg-accent text-accent-foreground'),\n ...classNames,\n }}\n components={{\n Chevron: ({ orientation }) =>\n orientation === 'left' ? (\n <ChevronLeft className=\"h-4 w-4\" />\n ) : (\n <ChevronRight className=\"h-4 w-4\" />\n ),\n }}\n {...props}\n />\n );\n}\nCalendar.displayName = 'Calendar';\n\nexport { Calendar };\n"],"mappings":";;;;;;;AAQA,SAAS,SAAS,EAAE,WAAW,WAAY,GAAG,OAAsB,EAAE;CACpE,MAAM,oBAAoB,sBAAsB;AAEhD,wBACE,IAAC;EACC,WAAW,GAAG,OAAO,UAAU;EAC/B,YAAY;GACV,GAAG;GACH,MAAM,GAAG,kBAAkB,MAAM,UAAU;GAC3C,QAAQ,GAAG,kBAAkB,QAAQ,WAAW;GAChD,OAAO,GAAG,kBAAkB,OAAO,YAAY;GAC/C,eAAe,GACb,kBAAkB,eAClB,0DACD;GACD,eAAe,GAAG,kBAAkB,eAAe,sBAAsB;GACzE,KAAK,GACH,kBAAkB,KAClB,iEACD;GACD,iBAAiB,GACf,kBAAkB,iBAClB,6HACD;GACD,aAAa,GACX,kBAAkB,aAClB,6HACD;GACD,YAAY,GAAG,kBAAkB,YAAY,yBAAyB;GACtE,UAAU,GAAG,kBAAkB,UAAU,OAAO;GAChD,SAAS,GACP,kBAAkB,SAClB,6EACD;GACD,MAAM,GAAG,kBAAkB,MAAM,mBAAmB;GACpD,KAAK,GAAG,kBAAkB,KAAK,2CAA2C;GAC1E,YAAY,GACV,kBAAkB,YAClB,sMACD;GACD,UAAU,GACR,kBAAkB,UAClB,+FACD;GACD,OAAO,GAAG,kBAAkB,OAAO,8CAA8C;GACjF,SAAS,GAAG,kBAAkB,SAAS,mCAAmC;GAC1E,UAAU,GAAG,kBAAkB,UAAU,mCAAmC;GAC5E,QAAQ,GAAG,kBAAkB,QAAQ,YAAY;GACjD,aAAa,GAAG,kBAAkB,aAAa,eAAe;GAC9D,WAAW,GAAG,kBAAkB,WAAW,eAAe;GAC1D,cAAc,GAAG,kBAAkB,cAAc,mCAAmC;GACpF,GAAG;EACJ;EACD,YAAY,EACV,SAAS,CAAC,EAAE,aAAa,KACvB,gBAAgB,yBACd,IAAC,eAAY,WAAU,YAAY,mBAEnC,IAAC,gBAAa,WAAU,YAAY,CAEzC;EACD,GAAI;GACJ;AAEL;AACD,SAAS,cAAc"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/card.d.ts
|
|
4
|
+
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
7
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
8
|
+
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
12
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","names":[],"sources":["../../src/components/card.tsx"],"sourcesContent":[],"mappings":";;;cAIM,MAAI,KAAA,CAAA,0BAAA,KAAA,CAAA,eAAA,kBAAA,KAAA,CAAA,cAAA;cAeJ,YAAU,KAAA,CAAA,0BAAA,KAAA,CAAA,eAAA,kBAAA,KAAA,CAAA,cAAA;AAnBe,cA0BzB,SAVL,EAUc,KAAA,CAAA,yBAVd,CAUc,KAAA,CAAA,cAVd,CAUc,kBAVd,CAAA,GAUc,KAAA,CAAA,aAVd,CAUc,oBAVd,CAAA,CAAA;cAqBK,eArBL,EAqBoB,KAAA,CAAA,yBArBpB,CAqBoB,KAAA,CAAA,cArBpB,CAqBoB,oBArBpB,CAAA,GAqBoB,KAAA,CAAA,aArBpB,CAqBoB,oBArBpB,CAAA,CAAA;cA6BK,WAzCI,EAyCO,KAAA,CAAA,yBAzCP,CAyCO,KAAA,CAAA,cAzCP,CAyCO,cAzCP,CAAA,GAyCO,KAAA,CAAA,aAzCP,CAyCO,cAzCP,CAAA,CAAA;cAgDJ,UAhDI,EAgDM,KAAA,CAAA,yBAhDN,CAgDM,KAAA,CAAA,cAhDN,CAgDM,cAhDN,CAAA,GAgDM,KAAA,CAAA,aAhDN,CAgDM,cAhDN,CAAA,CAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { cn } from "../utils-C0f9Ma6r.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/card.tsx
|
|
6
|
+
const Card = React.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
7
|
+
ref,
|
|
8
|
+
"data-slot": "card",
|
|
9
|
+
className: cn("rounded-lg border border-border bg-card text-card-foreground shadow-sm", className),
|
|
10
|
+
...props
|
|
11
|
+
}));
|
|
12
|
+
Card.displayName = "Card";
|
|
13
|
+
const CardHeader = React.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
14
|
+
ref,
|
|
15
|
+
className: cn("flex flex-col space-y-1.5 p-6", className),
|
|
16
|
+
...props
|
|
17
|
+
}));
|
|
18
|
+
CardHeader.displayName = "CardHeader";
|
|
19
|
+
const CardTitle = React.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("h3", {
|
|
20
|
+
ref,
|
|
21
|
+
className: cn("text-2xl font-semibold leading-none tracking-tight", className),
|
|
22
|
+
...props
|
|
23
|
+
}));
|
|
24
|
+
CardTitle.displayName = "CardTitle";
|
|
25
|
+
const CardDescription = React.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("p", {
|
|
26
|
+
ref,
|
|
27
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
28
|
+
...props
|
|
29
|
+
}));
|
|
30
|
+
CardDescription.displayName = "CardDescription";
|
|
31
|
+
const CardContent = React.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
32
|
+
ref,
|
|
33
|
+
className: cn("p-6 pt-0", className),
|
|
34
|
+
...props
|
|
35
|
+
}));
|
|
36
|
+
CardContent.displayName = "CardContent";
|
|
37
|
+
const CardFooter = React.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
38
|
+
ref,
|
|
39
|
+
className: cn("flex items-center p-6 pt-0", className),
|
|
40
|
+
...props
|
|
41
|
+
}));
|
|
42
|
+
CardFooter.displayName = "CardFooter";
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
46
|
+
//# sourceMappingURL=card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.js","names":[],"sources":["../../src/components/card.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nconst Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"card\"\n className={cn(\n 'rounded-lg border border-border bg-card text-card-foreground shadow-sm',\n className\n )}\n {...props}\n />\n )\n);\nCard.displayName = 'Card';\n\nconst CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} />\n )\n);\nCardHeader.displayName = 'CardHeader';\n\nconst CardTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(\n ({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn('text-2xl font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n )\n);\nCardTitle.displayName = 'CardTitle';\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} />\n));\nCardDescription.displayName = 'CardDescription';\n\nconst CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('p-6 pt-0', className)} {...props} />\n )\n);\nCardContent.displayName = 'CardContent';\n\nconst CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex items-center p-6 pt-0', className)} {...props} />\n )\n);\nCardFooter.displayName = 'CardFooter';\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };\n"],"mappings":";;;;;AAIA,MAAM,OAAO,MAAM,WACjB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBACxB,IAAC;CACM;CACL,aAAU;CACV,WAAW,GACT,0EACA,UACD;CACD,GAAI;EACJ,CAEL;AACD,KAAK,cAAc;AAEnB,MAAM,aAAa,MAAM,WACvB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBACxB,IAAC;CAAS;CAAK,WAAW,GAAG,iCAAiC,UAAU;CAAE,GAAI;EAAS,CAE1F;AACD,WAAW,cAAc;AAEzB,MAAM,YAAY,MAAM,WACtB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBACxB,IAAC;CACM;CACL,WAAW,GAAG,sDAAsD,UAAU;CAC9E,GAAI;EACJ,CAEL;AACD,UAAU,cAAc;AAExB,MAAM,kBAAkB,MAAM,WAG5B,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBAC1B,IAAC;CAAO;CAAK,WAAW,GAAG,iCAAiC,UAAU;CAAE,GAAI;EAAS,CACrF;AACF,gBAAgB,cAAc;AAE9B,MAAM,cAAc,MAAM,WACxB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBACxB,IAAC;CAAS;CAAK,WAAW,GAAG,YAAY,UAAU;CAAE,GAAI;EAAS,CAErE;AACD,YAAY,cAAc;AAE1B,MAAM,aAAa,MAAM,WACvB,CAAC,EAAE,UAAW,GAAG,OAAO,EAAE,wBACxB,IAAC;CAAS;CAAK,WAAW,GAAG,8BAA8B,UAAU;CAAE,GAAI;EAAS,CAEvF;AACD,WAAW,cAAc"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ButtonProps } from "../button-BEd6_-lL.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import useEmblaCarousel, { UseEmblaCarouselType } from "embla-carousel-react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/carousel.d.ts
|
|
6
|
+
type CarouselApi = UseEmblaCarouselType[1];
|
|
7
|
+
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
8
|
+
type CarouselOptions = UseCarouselParameters[0];
|
|
9
|
+
type CarouselPlugin = UseCarouselParameters[1];
|
|
10
|
+
type CarouselProps = {
|
|
11
|
+
opts?: CarouselOptions;
|
|
12
|
+
plugins?: CarouselPlugin;
|
|
13
|
+
orientation?: 'horizontal' | 'vertical';
|
|
14
|
+
setApi?: (api: CarouselApi) => void;
|
|
15
|
+
};
|
|
16
|
+
declare const Carousel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & CarouselProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const CarouselContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const CarouselItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const CarouselPrevious: React.ForwardRefExoticComponent<Omit<ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
declare const CarouselNext: React.ForwardRefExoticComponent<Omit<ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious };
|
|
23
|
+
//# sourceMappingURL=carousel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carousel.d.ts","names":[],"sources":["../../src/components/carousel.tsx"],"sourcesContent":[],"mappings":";;;;;KAOK,WAAA,GAAc;KACd,qBAAA,GAAwB,kBAAkB;KAC1C,eAAA,GAAkB;AAR4D,KAS9E,cAAA,GAAiB,qBAHH,CAAA,CAAA,CAAA;AAAoB,KAKlC,aAAA,GAJA;EAAqB,IAAA,CAAA,EAKjB,eALiB;EAAA,OAAqB,CAAA,EAMnC,cANmC;EAAgB,WAAlC,CAAA,EAAA,YAAA,GAAA,UAAA;EAAU,MAAA,CAAA,EAAA,CAAA,GAAA,EAQtB,WARsB,EAAA,GAAA,IAAA;AAAA,CAAA;AACK,cA+BtC,QA9Ba,EA8BL,KAAA,CAAA,yBA9B6B,CA8B7B,KAAA,CAAA,cA9B6B,CA8B7B,cA9B6B,CAAA,GA8B7B,aA9B6B,GA8B7B,KAAA,CAAA,aA9B6B,CA8B7B,cA9B6B,CAAA,CAAA;AAAA,cA4HrC,eA1HY,EA0HG,KAAA,CAAA,yBA1HH,CA0HG,KAAA,CAAA,cA1HH,CA0HG,cA1HH,CAAA,GA0HG,KAAA,CAAA,aA1HH,CA0HG,cA1HH,CAAA,CAAA;cA+IZ,YA/IY,EA+IA,KAAA,CAAA,yBA/IA,CA+IA,KAAA,CAAA,cA/IA,CA+IA,cA/IA,CAAA,GA+IA,KAAA,CAAA,aA/IA,CA+IA,cA/IA,CAAA,CAAA;cAoKZ,gBAnKG,EAmKa,KAAA,CAAA,yBAnKb,CAmKa,IAnKb,CA4LR,WAAA,GAzBqB,KAAA,CAAA,aAnKb,CAmKa,iBAnKb,CAAA,EAAA,KAAA,CAAA,GAmKa,KAAA,CAAA,aAnKb,CAmKa,iBAnKb,CAAA,CAAA;cA+LH,YA9LM,EA8LM,KAAA,CAAA,yBA9LN,CA8LM,IA9LN,CAuNX,WAAA,GAzBiB,KAAA,CAAA,aA9LN,CA8LM,iBA9LN,CAAA,EAAA,KAAA,CAAA,GA8LM,KAAA,CAAA,aA9LN,CA8LM,iBA9LN,CAAA,CAAA"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { cn } from "../utils-C0f9Ma6r.js";
|
|
2
|
+
import { Button } from "../button-CJvoztqg.js";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { ArrowLeft, ArrowRight } from "lucide-react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import useEmblaCarousel from "embla-carousel-react";
|
|
7
|
+
|
|
8
|
+
//#region src/components/carousel.tsx
|
|
9
|
+
const CarouselContext = React.createContext(null);
|
|
10
|
+
function useCarousel() {
|
|
11
|
+
const context = React.useContext(CarouselContext);
|
|
12
|
+
if (!context) throw new Error("useCarousel must be used within a <Carousel />");
|
|
13
|
+
return context;
|
|
14
|
+
}
|
|
15
|
+
const Carousel = React.forwardRef(({ orientation = "horizontal", opts, setApi, plugins, className, children,...props }, ref) => {
|
|
16
|
+
const [carouselRef, api] = useEmblaCarousel({
|
|
17
|
+
...opts,
|
|
18
|
+
axis: orientation === "horizontal" ? "x" : "y"
|
|
19
|
+
}, plugins);
|
|
20
|
+
const [canScrollPrev, setCanScrollPrev] = React.useState(false);
|
|
21
|
+
const [canScrollNext, setCanScrollNext] = React.useState(false);
|
|
22
|
+
const onSelect = React.useCallback((api$1) => {
|
|
23
|
+
if (!api$1) return;
|
|
24
|
+
setCanScrollPrev(api$1.canScrollPrev());
|
|
25
|
+
setCanScrollNext(api$1.canScrollNext());
|
|
26
|
+
}, []);
|
|
27
|
+
const scrollPrev = React.useCallback(() => {
|
|
28
|
+
api?.scrollPrev();
|
|
29
|
+
}, [api]);
|
|
30
|
+
const scrollNext = React.useCallback(() => {
|
|
31
|
+
api?.scrollNext();
|
|
32
|
+
}, [api]);
|
|
33
|
+
const handleKeyDown = React.useCallback((event) => {
|
|
34
|
+
if (event.key === "ArrowLeft") {
|
|
35
|
+
event.preventDefault();
|
|
36
|
+
scrollPrev();
|
|
37
|
+
} else if (event.key === "ArrowRight") {
|
|
38
|
+
event.preventDefault();
|
|
39
|
+
scrollNext();
|
|
40
|
+
}
|
|
41
|
+
}, [scrollPrev, scrollNext]);
|
|
42
|
+
React.useEffect(() => {
|
|
43
|
+
if (!api || !setApi) return;
|
|
44
|
+
setApi(api);
|
|
45
|
+
}, [api, setApi]);
|
|
46
|
+
React.useEffect(() => {
|
|
47
|
+
if (!api) return;
|
|
48
|
+
onSelect(api);
|
|
49
|
+
api.on("reInit", onSelect);
|
|
50
|
+
api.on("select", onSelect);
|
|
51
|
+
return () => {
|
|
52
|
+
api?.off("select", onSelect);
|
|
53
|
+
};
|
|
54
|
+
}, [api, onSelect]);
|
|
55
|
+
return /* @__PURE__ */ jsx(CarouselContext.Provider, {
|
|
56
|
+
value: {
|
|
57
|
+
carouselRef,
|
|
58
|
+
api,
|
|
59
|
+
opts,
|
|
60
|
+
orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
|
|
61
|
+
scrollPrev,
|
|
62
|
+
scrollNext,
|
|
63
|
+
canScrollPrev,
|
|
64
|
+
canScrollNext
|
|
65
|
+
},
|
|
66
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
67
|
+
ref,
|
|
68
|
+
onKeyDownCapture: handleKeyDown,
|
|
69
|
+
className: cn("relative", className),
|
|
70
|
+
role: "region",
|
|
71
|
+
"aria-roledescription": "carousel",
|
|
72
|
+
...props,
|
|
73
|
+
children
|
|
74
|
+
})
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
Carousel.displayName = "Carousel";
|
|
78
|
+
const CarouselContent = React.forwardRef(({ className,...props }, ref) => {
|
|
79
|
+
const { carouselRef, orientation } = useCarousel();
|
|
80
|
+
return /* @__PURE__ */ jsx("div", {
|
|
81
|
+
ref: carouselRef,
|
|
82
|
+
className: "overflow-hidden",
|
|
83
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
84
|
+
ref,
|
|
85
|
+
className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className),
|
|
86
|
+
...props
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
CarouselContent.displayName = "CarouselContent";
|
|
91
|
+
const CarouselItem = React.forwardRef(({ className,...props }, ref) => {
|
|
92
|
+
const { orientation } = useCarousel();
|
|
93
|
+
return /* @__PURE__ */ jsx("div", {
|
|
94
|
+
ref,
|
|
95
|
+
role: "group",
|
|
96
|
+
"aria-roledescription": "slide",
|
|
97
|
+
className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className),
|
|
98
|
+
...props
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
CarouselItem.displayName = "CarouselItem";
|
|
102
|
+
const CarouselPrevious = React.forwardRef(({ className, variant = "outline", size = "icon",...props }, ref) => {
|
|
103
|
+
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
104
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
105
|
+
ref,
|
|
106
|
+
variant,
|
|
107
|
+
size,
|
|
108
|
+
className: cn("absolute h-8 w-8 rounded-full", orientation === "horizontal" ? "left-2 top-1/2 -translate-y-1/2" : "top-2 left-1/2 -translate-x-1/2 rotate-90", className),
|
|
109
|
+
disabled: !canScrollPrev,
|
|
110
|
+
onClick: scrollPrev,
|
|
111
|
+
...props,
|
|
112
|
+
children: [/* @__PURE__ */ jsx(ArrowLeft, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
|
|
113
|
+
className: "sr-only",
|
|
114
|
+
children: "Previous slide"
|
|
115
|
+
})]
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
CarouselPrevious.displayName = "CarouselPrevious";
|
|
119
|
+
const CarouselNext = React.forwardRef(({ className, variant = "outline", size = "icon",...props }, ref) => {
|
|
120
|
+
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
121
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
122
|
+
ref,
|
|
123
|
+
variant,
|
|
124
|
+
size,
|
|
125
|
+
className: cn("absolute h-8 w-8 rounded-full", orientation === "horizontal" ? "right-2 top-1/2 -translate-y-1/2" : "bottom-2 left-1/2 -translate-x-1/2 rotate-90", className),
|
|
126
|
+
disabled: !canScrollNext,
|
|
127
|
+
onClick: scrollNext,
|
|
128
|
+
...props,
|
|
129
|
+
children: [/* @__PURE__ */ jsx(ArrowRight, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
|
|
130
|
+
className: "sr-only",
|
|
131
|
+
children: "Next slide"
|
|
132
|
+
})]
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
CarouselNext.displayName = "CarouselNext";
|
|
136
|
+
|
|
137
|
+
//#endregion
|
|
138
|
+
export { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious };
|
|
139
|
+
//# sourceMappingURL=carousel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carousel.js","names":["api: CarouselApi","api","event: React.KeyboardEvent<HTMLDivElement>"],"sources":["../../src/components/carousel.tsx"],"sourcesContent":["import * as React from 'react';\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';\nimport { ArrowLeft, ArrowRight } from 'lucide-react';\n\nimport { cn } from '../lib/utils';\nimport { Button } from './button';\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\n orientation?: 'horizontal' | 'vertical';\n setApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n api: ReturnType<typeof useEmblaCarousel>[1];\n scrollPrev: () => void;\n scrollNext: () => void;\n canScrollPrev: boolean;\n canScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext);\n\n if (!context) {\n throw new Error('useCarousel must be used within a <Carousel />');\n }\n\n return context;\n}\n\nconst Carousel = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & CarouselProps\n>(({ orientation = 'horizontal', opts, setApi, plugins, className, children, ...props }, ref) => {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'horizontal' ? 'x' : 'y',\n },\n plugins\n );\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) {\n return;\n }\n\n setCanScrollPrev(api.canScrollPrev());\n setCanScrollNext(api.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === 'ArrowRight') {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext]\n );\n\n React.useEffect(() => {\n if (!api || !setApi) {\n return;\n }\n\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) {\n return;\n }\n\n onSelect(api);\n api.on('reInit', onSelect);\n api.on('select', onSelect);\n\n return () => {\n api?.off('select', onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation: orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n ref={ref}\n onKeyDownCapture={handleKeyDown}\n className={cn('relative', className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n});\nCarousel.displayName = 'Carousel';\n\nconst CarouselContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\">\n <div\n ref={ref}\n className={cn(\n 'flex',\n orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col',\n className\n )}\n {...props}\n />\n </div>\n );\n }\n);\nCarouselContent.displayName = 'CarouselContent';\n\nconst CarouselItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const { orientation } = useCarousel();\n\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-roledescription=\"slide\"\n className={cn(\n 'min-w-0 shrink-0 grow-0 basis-full',\n orientation === 'horizontal' ? 'pl-4' : 'pt-4',\n className\n )}\n {...props}\n />\n );\n }\n);\nCarouselItem.displayName = 'CarouselItem';\n\nconst CarouselPrevious = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>(\n ({ className, variant = 'outline', size = 'icon', ...props }, ref) => {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n 'absolute h-8 w-8 rounded-full',\n orientation === 'horizontal'\n ? 'left-2 top-1/2 -translate-y-1/2'\n : 'top-2 left-1/2 -translate-x-1/2 rotate-90',\n className\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ArrowLeft className=\"h-4 w-4\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n }\n);\nCarouselPrevious.displayName = 'CarouselPrevious';\n\nconst CarouselNext = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>(\n ({ className, variant = 'outline', size = 'icon', ...props }, ref) => {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n 'absolute h-8 w-8 rounded-full',\n orientation === 'horizontal'\n ? 'right-2 top-1/2 -translate-y-1/2'\n : 'bottom-2 left-1/2 -translate-x-1/2 rotate-90',\n className\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ArrowRight className=\"h-4 w-4\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n }\n);\nCarouselNext.displayName = 'CarouselNext';\n\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n};\n"],"mappings":"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"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as RechartsPrimitive from "recharts";
|
|
3
|
+
|
|
4
|
+
//#region src/components/chart.d.ts
|
|
5
|
+
type ChartConfig = { [k in string]: {
|
|
6
|
+
label?: React.ReactNode;
|
|
7
|
+
icon?: React.ComponentType;
|
|
8
|
+
color?: string;
|
|
9
|
+
} };
|
|
10
|
+
declare const ChartContainer: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
11
|
+
config: ChartConfig;
|
|
12
|
+
children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
|
|
13
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const ChartTooltip: any;
|
|
15
|
+
interface ChartTooltipContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
16
|
+
active?: boolean;
|
|
17
|
+
payload?: any[];
|
|
18
|
+
label?: string;
|
|
19
|
+
labelFormatter?: (value: any, payload: any[]) => React.ReactNode;
|
|
20
|
+
labelClassName?: string;
|
|
21
|
+
formatter?: (value: any, name: any, item: any, index: any, payload: any) => React.ReactNode;
|
|
22
|
+
color?: string;
|
|
23
|
+
hideLabel?: boolean;
|
|
24
|
+
hideIndicator?: boolean;
|
|
25
|
+
indicator?: 'line' | 'dot' | 'dashed';
|
|
26
|
+
nameKey?: string;
|
|
27
|
+
labelKey?: string;
|
|
28
|
+
}
|
|
29
|
+
declare const ChartTooltipContent: React.ForwardRefExoticComponent<ChartTooltipContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { ChartConfig, ChartContainer, ChartTooltip, ChartTooltipContent };
|
|
32
|
+
//# sourceMappingURL=chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart.d.ts","names":[],"sources":["../../src/components/chart.tsx"],"sourcesContent":[],"mappings":";;;;KAIY,WAAA;EAAA,KAAA,CAAA,EAEA,KAAA,CAAM,SAFK;EAAA,IAAA,CAAA,EAGZ,KAAA,CAAM,aAHM;EAEX,KAAM,CAAA,EAAA,MAAA;AAAS,CAAA,EACG;AAG5B,cAgBI,cAsCJ,EAtCkB,KAAA,CAAA,yBAsClB,CAtCkB,IAsClB,CAtCkB,KAAA,CAAA,eAsClB,CAtCkB,cAsClB,CAAA,GAtCkB,KAAA,CAAA,cAsClB,CAtCkB,cAsClB,CAAA,GAAA;EAAA,MAAA,EAnCU,WAmCV;EAAA,QAtCkB,EAIN,KAAA,CAAM,cAJA,CAAA,OAIsB,iBAAA,CAAkB,mBAJxC,CAAA,CAAA,UAAA,CAAA;CAAA,EAAA,KAAA,CAAA,sBAAA,CAAA,cAAA,CAAA,CAAA;cAyCd,YAzCc,EAAA,GAAA;UA2CV,wBAAA,SAAiC,KAAA,CAAM,cA3C7B,CA2C4C,cA3C5C,CAAA,CAAA;EAAA,MAGR,CAAA,EAAA,OAAA;EAAW,OACmB,CAAA,EAAA,GAAA,EAAA;EAAqC,KAAjE,CAAA,EAAA,MAAM;EAAc,cAJd,CAAA,EAAA,CAAA,KAAA,EAAA,GAAA,EAAA,OAAA,EAAA,GAAA,EAAA,EAAA,GAiD+B,KAAA,CAAM,SAjDrC;EAAA,cAAA,CAAA,EAAA,MAAA;8EAoD0D,KAAA,CAAM;OApDhE,CAAA,EAAA,MAAA;EAAA,SAAA,CAAA,EAAA,OAAA;EAyCd,aAAA,CAAA,EAAwC,OAAA;EAEpC,SAAA,CAAA,EAAA,MAAA,GAAA,KAAA,GAAyB,QAAA;EAAA,OAAA,CAAA,EAAA,MAAA;EAAA,QAA6B,CAAA,EAAA,MAAA;;cAkB1D,mBAT8E,EAS3D,KAAA,CAAA,yBAT2D,CAS3D,wBAT2D,GAS3D,KAAA,CAAA,aAT2D,CAS3D,cAT2D,CAAA,CAAA"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { cn } from "../utils-C0f9Ma6r.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import * as RechartsPrimitive from "recharts";
|
|
5
|
+
|
|
6
|
+
//#region src/components/chart.tsx
|
|
7
|
+
const ChartContext = React.createContext(null);
|
|
8
|
+
function useChart() {
|
|
9
|
+
const context = React.useContext(ChartContext);
|
|
10
|
+
if (!context) throw new Error("useChart must be used within a <ChartContainer />");
|
|
11
|
+
return context;
|
|
12
|
+
}
|
|
13
|
+
const ChartContainer = React.forwardRef(({ id, className, children, config,...props }, ref) => {
|
|
14
|
+
const uniqueId = React.useId();
|
|
15
|
+
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
16
|
+
return /* @__PURE__ */ jsx(ChartContext.Provider, {
|
|
17
|
+
value: { config },
|
|
18
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
19
|
+
"data-chart": chartId,
|
|
20
|
+
ref,
|
|
21
|
+
className: cn("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none", className),
|
|
22
|
+
style: { ...Object.entries(config).reduce((vars, [key, value]) => {
|
|
23
|
+
if (value.color) vars[`--color-${key}`] = value.color;
|
|
24
|
+
return vars;
|
|
25
|
+
}, {}) },
|
|
26
|
+
...props,
|
|
27
|
+
children: /* @__PURE__ */ jsx(RechartsPrimitive.ResponsiveContainer, { children })
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
ChartContainer.displayName = "ChartContainer";
|
|
32
|
+
const ChartTooltip = RechartsPrimitive.Tooltip;
|
|
33
|
+
const ChartTooltipContent = React.forwardRef(({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey }, ref) => {
|
|
34
|
+
const { config } = useChart();
|
|
35
|
+
const tooltipLabel = React.useMemo(() => {
|
|
36
|
+
if (hideLabel || !payload?.length) return null;
|
|
37
|
+
const [item] = payload;
|
|
38
|
+
const key = `${labelKey || item?.dataKey || item?.name || "value"}`;
|
|
39
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
40
|
+
const value = !labelKey && typeof label === "string" ? config[label]?.label || label : itemConfig?.label;
|
|
41
|
+
if (labelFormatter) return /* @__PURE__ */ jsx("div", {
|
|
42
|
+
className: cn("font-medium", labelClassName),
|
|
43
|
+
children: labelFormatter(value, payload)
|
|
44
|
+
});
|
|
45
|
+
if (!value) return null;
|
|
46
|
+
return /* @__PURE__ */ jsx("div", {
|
|
47
|
+
className: cn("font-medium", labelClassName),
|
|
48
|
+
children: value
|
|
49
|
+
});
|
|
50
|
+
}, [
|
|
51
|
+
label,
|
|
52
|
+
labelFormatter,
|
|
53
|
+
payload,
|
|
54
|
+
hideLabel,
|
|
55
|
+
labelClassName,
|
|
56
|
+
config,
|
|
57
|
+
labelKey
|
|
58
|
+
]);
|
|
59
|
+
if (!active || !payload?.length) return null;
|
|
60
|
+
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
61
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
62
|
+
ref,
|
|
63
|
+
className: cn("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", className),
|
|
64
|
+
children: [!nestLabel ? tooltipLabel : null, /* @__PURE__ */ jsx("div", {
|
|
65
|
+
className: "grid gap-1.5",
|
|
66
|
+
children: payload.map((item, index) => {
|
|
67
|
+
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
68
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
69
|
+
const indicatorColor = color || item.payload?.fill || item.color;
|
|
70
|
+
return /* @__PURE__ */ jsx("div", {
|
|
71
|
+
className: cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", indicator === "dot" && "items-center"),
|
|
72
|
+
children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [!hideIndicator && /* @__PURE__ */ jsx("div", {
|
|
73
|
+
className: cn("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]", {
|
|
74
|
+
"h-2.5 w-2.5": indicator === "dot",
|
|
75
|
+
"w-1": indicator === "line",
|
|
76
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
77
|
+
"my-0.5": nestLabel && indicator === "dashed"
|
|
78
|
+
}),
|
|
79
|
+
style: {
|
|
80
|
+
"--color-bg": indicatorColor,
|
|
81
|
+
"--color-border": indicatorColor
|
|
82
|
+
}
|
|
83
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
84
|
+
className: cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center"),
|
|
85
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
86
|
+
className: "grid gap-1.5",
|
|
87
|
+
children: [nestLabel ? tooltipLabel : null, /* @__PURE__ */ jsx("span", {
|
|
88
|
+
className: "text-muted-foreground",
|
|
89
|
+
children: itemConfig?.label || item.name
|
|
90
|
+
})]
|
|
91
|
+
}), item.value !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
92
|
+
className: "font-mono font-medium tabular-nums text-foreground",
|
|
93
|
+
children: item.value.toLocaleString()
|
|
94
|
+
})]
|
|
95
|
+
})] })
|
|
96
|
+
}, item.dataKey || index);
|
|
97
|
+
})
|
|
98
|
+
})]
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
ChartTooltipContent.displayName = "ChartTooltipContent";
|
|
102
|
+
function getPayloadConfigFromPayload(config, payload, key) {
|
|
103
|
+
if (typeof payload !== "object" || payload === null) return void 0;
|
|
104
|
+
const payloadPayload = payload?.payload;
|
|
105
|
+
let configLabelKey = key;
|
|
106
|
+
if (key in config) configLabelKey = key;
|
|
107
|
+
else if (payloadPayload && typeof payloadPayload === "object") {
|
|
108
|
+
if (typeof payloadPayload[key] === "string" && payloadPayload[key] in config) configLabelKey = payloadPayload[key];
|
|
109
|
+
}
|
|
110
|
+
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
//#endregion
|
|
114
|
+
export { ChartContainer, ChartTooltip, ChartTooltipContent };
|
|
115
|
+
//# sourceMappingURL=chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart.js","names":["item: any","index: number","config: ChartConfig","payload: any","key: string","configLabelKey: string"],"sources":["../../src/components/chart.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as RechartsPrimitive from 'recharts';\nimport { cn } from '../lib/utils';\n\nexport type ChartConfig = {\n [k in string]: {\n label?: React.ReactNode;\n icon?: React.ComponentType;\n color?: string;\n };\n};\n\ntype ChartContextProps = {\n config: ChartConfig;\n};\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\n\nfunction useChart() {\n const context = React.useContext(ChartContext);\n if (!context) {\n throw new Error('useChart must be used within a <ChartContainer />');\n }\n return context;\n}\n\nconst ChartContainer = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> & {\n config: ChartConfig;\n children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];\n }\n>(({ id, className, children, config, ...props }, ref) => {\n const uniqueId = React.useId();\n const chartId = `chart-${id || uniqueId.replace(/:/g, '')}`;\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n data-chart={chartId}\n ref={ref}\n className={cn(\n \"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none\",\n className\n )}\n style={\n {\n ...Object.entries(config).reduce(\n (vars, [key, value]) => {\n if (value.color) {\n vars[`--color-${key}`] = value.color;\n }\n return vars;\n },\n {} as Record<string, string>\n ),\n } as React.CSSProperties\n }\n {...props}\n >\n <RechartsPrimitive.ResponsiveContainer>{children}</RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n );\n});\nChartContainer.displayName = 'ChartContainer';\n\nconst ChartTooltip = RechartsPrimitive.Tooltip;\n\ninterface ChartTooltipContentProps extends React.HTMLAttributes<HTMLDivElement> {\n active?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n payload?: any[];\n label?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n labelFormatter?: (value: any, payload: any[]) => React.ReactNode;\n labelClassName?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n formatter?: (value: any, name: any, item: any, index: any, payload: any) => React.ReactNode;\n color?: string;\n hideLabel?: boolean;\n hideIndicator?: boolean;\n indicator?: 'line' | 'dot' | 'dashed';\n nameKey?: string;\n labelKey?: string;\n}\n\nconst ChartTooltipContent = React.forwardRef<HTMLDivElement, ChartTooltipContentProps>(\n (\n {\n active,\n payload,\n className,\n indicator = 'dot',\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey,\n },\n ref\n ) => {\n const { config } = useChart();\n\n const tooltipLabel = React.useMemo(() => {\n if (hideLabel || !payload?.length) return null;\n\n const [item] = payload;\n const key = `${labelKey || item?.dataKey || item?.name || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const value =\n !labelKey && typeof label === 'string'\n ? config[label as keyof typeof config]?.label || label\n : itemConfig?.label;\n\n if (labelFormatter) {\n return (\n <div className={cn('font-medium', labelClassName)}>{labelFormatter(value, payload)}</div>\n );\n }\n\n if (!value) return null;\n\n return <div className={cn('font-medium', labelClassName)}>{value}</div>;\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);\n\n if (!active || !payload?.length) return null;\n\n const nestLabel = payload.length === 1 && indicator !== 'dot';\n\n return (\n <div\n ref={ref}\n className={cn(\n 'grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl',\n className\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {/* eslint-disable-next-line @typescript-eslint/no-explicit-any */}\n {payload.map((item: any, index: number) => {\n const key = `${nameKey || item.name || item.dataKey || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const indicatorColor = color || item.payload?.fill || item.color;\n\n return (\n <div\n key={item.dataKey || index}\n className={cn(\n 'flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground',\n indicator === 'dot' && 'items-center'\n )}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {!hideIndicator && (\n <div\n className={cn(\n 'shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]',\n {\n 'h-2.5 w-2.5': indicator === 'dot',\n 'w-1': indicator === 'line',\n 'w-0 border-[1.5px] border-dashed bg-transparent':\n indicator === 'dashed',\n 'my-0.5': nestLabel && indicator === 'dashed',\n }\n )}\n style={\n {\n '--color-bg': indicatorColor,\n '--color-border': indicatorColor,\n } as React.CSSProperties\n }\n />\n )}\n <div\n className={cn(\n 'flex flex-1 justify-between leading-none',\n nestLabel ? 'items-end' : 'items-center'\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">\n {itemConfig?.label || item.name}\n </span>\n </div>\n {item.value !== undefined && (\n <span className=\"font-mono font-medium tabular-nums text-foreground\">\n {item.value.toLocaleString()}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n }\n);\nChartTooltipContent.displayName = 'ChartTooltipContent';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: any, key: string) {\n if (typeof payload !== 'object' || payload === null) return undefined;\n\n const payloadPayload = payload?.payload;\n\n let configLabelKey: string = key;\n\n if (key in config) {\n configLabelKey = key;\n } else if (payloadPayload && typeof payloadPayload === 'object') {\n if (typeof payloadPayload[key] === 'string' && payloadPayload[key] in config) {\n configLabelKey = payloadPayload[key] as string;\n }\n }\n\n return configLabelKey in config ? config[configLabelKey] : config[key];\n}\n\nexport { ChartContainer, ChartTooltip, ChartTooltipContent };\n"],"mappings":"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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
3
|
+
|
|
4
|
+
//#region src/components/checkbox.d.ts
|
|
5
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { Checkbox };
|
|
8
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","names":[],"sources":["../../src/components/checkbox.tsx"],"sourcesContent":[],"mappings":";;;;cAKM,UAAQ,KAAA,CAAA,0BAAA,KAAA,iBAAA,CAAA,gBAAA,KAAA,CAAA,cAAA,6BAAA,KAAA,CAAA,cAAA"}
|