@jackbernnie/hiyf 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/LICENSE +191 -0
- package/NOTICE +12 -0
- package/README.md +47 -0
- package/dist/components/Accordion.d.ts +38 -0
- package/dist/components/Accordion.js +38 -0
- package/dist/components/Alert.d.ts +29 -0
- package/dist/components/Alert.js +39 -0
- package/dist/components/AlertDialog.d.ts +37 -0
- package/dist/components/AlertDialog.js +38 -0
- package/dist/components/AspectRatio.d.ts +15 -0
- package/dist/components/AspectRatio.js +15 -0
- package/dist/components/Avatar.d.ts +26 -0
- package/dist/components/Avatar.js +13 -0
- package/dist/components/Badge.d.ts +18 -0
- package/dist/components/Badge.js +17 -0
- package/dist/components/Box.d.ts +13 -0
- package/dist/components/Box.js +52 -0
- package/dist/components/Breadcrumb.d.ts +33 -0
- package/dist/components/Breadcrumb.js +16 -0
- package/dist/components/Button.d.ts +40 -0
- package/dist/components/Button.js +33 -0
- package/dist/components/ButtonGroup.d.ts +18 -0
- package/dist/components/ButtonGroup.js +8 -0
- package/dist/components/Card.d.ts +46 -0
- package/dist/components/Card.js +24 -0
- package/dist/components/Carousel.d.ts +27 -0
- package/dist/components/Carousel.js +13 -0
- package/dist/components/Chart.d.ts +17 -0
- package/dist/components/Chart.js +94 -0
- package/dist/components/Checkbox.d.ts +26 -0
- package/dist/components/Checkbox.js +9 -0
- package/dist/components/Collapsible.d.ts +27 -0
- package/dist/components/Collapsible.js +26 -0
- package/dist/components/Combobox.d.ts +36 -0
- package/dist/components/Combobox.js +41 -0
- package/dist/components/Command.d.ts +37 -0
- package/dist/components/Command.js +32 -0
- package/dist/components/ContextMenu.d.ts +34 -0
- package/dist/components/ContextMenu.js +23 -0
- package/dist/components/Dialog.d.ts +20 -0
- package/dist/components/Dialog.js +34 -0
- package/dist/components/Drawer.d.ts +28 -0
- package/dist/components/Drawer.js +25 -0
- package/dist/components/DropdownMenu.d.ts +42 -0
- package/dist/components/DropdownMenu.js +32 -0
- package/dist/components/Empty.d.ts +28 -0
- package/dist/components/Empty.js +15 -0
- package/dist/components/Field.d.ts +30 -0
- package/dist/components/Field.js +13 -0
- package/dist/components/Grid.d.ts +32 -0
- package/dist/components/Grid.js +37 -0
- package/dist/components/GridItem.d.ts +30 -0
- package/dist/components/GridItem.js +40 -0
- package/dist/components/HoverCard.d.ts +22 -0
- package/dist/components/HoverCard.js +12 -0
- package/dist/components/Input.d.ts +34 -0
- package/dist/components/Input.js +8 -0
- package/dist/components/InputGroup.d.ts +28 -0
- package/dist/components/InputGroup.js +13 -0
- package/dist/components/InputOTP.d.ts +26 -0
- package/dist/components/InputOTP.js +25 -0
- package/dist/components/Kbd.d.ts +26 -0
- package/dist/components/Kbd.js +11 -0
- package/dist/components/Label.d.ts +20 -0
- package/dist/components/Label.js +17 -0
- package/dist/components/Menubar.d.ts +35 -0
- package/dist/components/Menubar.js +19 -0
- package/dist/components/NativeSelect.d.ts +33 -0
- package/dist/components/NativeSelect.js +37 -0
- package/dist/components/NavigationMenu.d.ts +32 -0
- package/dist/components/NavigationMenu.js +14 -0
- package/dist/components/Pagination.d.ts +28 -0
- package/dist/components/Pagination.js +62 -0
- package/dist/components/Popover.d.ts +28 -0
- package/dist/components/Popover.js +19 -0
- package/dist/components/Progress.d.ts +25 -0
- package/dist/components/Progress.js +37 -0
- package/dist/components/RadioGroup.d.ts +35 -0
- package/dist/components/RadioGroup.js +44 -0
- package/dist/components/Resizable.d.ts +31 -0
- package/dist/components/Resizable.js +17 -0
- package/dist/components/ScrollArea.d.ts +8 -0
- package/dist/components/ScrollArea.js +14 -0
- package/dist/components/Select.d.ts +35 -0
- package/dist/components/Select.js +33 -0
- package/dist/components/Separator.d.ts +10 -0
- package/dist/components/Separator.js +30 -0
- package/dist/components/Sheet.d.ts +31 -0
- package/dist/components/Sheet.js +26 -0
- package/dist/components/Sidebar.d.ts +52 -0
- package/dist/components/Sidebar.js +96 -0
- package/dist/components/Skeleton.d.ts +40 -0
- package/dist/components/Skeleton.js +42 -0
- package/dist/components/Slider.d.ts +26 -0
- package/dist/components/Slider.js +9 -0
- package/dist/components/Spinner.d.ts +7 -0
- package/dist/components/Spinner.js +13 -0
- package/dist/components/Status.d.ts +30 -0
- package/dist/components/Status.js +27 -0
- package/dist/components/Switch.d.ts +27 -0
- package/dist/components/Switch.js +9 -0
- package/dist/components/Table.d.ts +39 -0
- package/dist/components/Table.js +22 -0
- package/dist/components/Tabs.d.ts +32 -0
- package/dist/components/Tabs.js +21 -0
- package/dist/components/Text.d.ts +2 -0
- package/dist/components/Text.js +5 -0
- package/dist/components/Textarea.d.ts +32 -0
- package/dist/components/Textarea.js +15 -0
- package/dist/components/Toaster.d.ts +30 -0
- package/dist/components/Toaster.js +9 -0
- package/dist/components/Toggle.d.ts +34 -0
- package/dist/components/Toggle.js +31 -0
- package/dist/components/ToggleGroup.d.ts +46 -0
- package/dist/components/ToggleGroup.js +26 -0
- package/dist/components/Tooltip.d.ts +25 -0
- package/dist/components/Tooltip.js +12 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/accordion.js +81 -0
- package/dist/components/ui/alert-dialog.d.ts +18 -0
- package/dist/components/ui/alert-dialog.js +154 -0
- package/dist/components/ui/alert.d.ts +10 -0
- package/dist/components/ui/alert.js +64 -0
- package/dist/components/ui/aspect-ratio.d.ts +3 -0
- package/dist/components/ui/aspect-ratio.js +11 -0
- package/dist/components/ui/avatar.d.ts +11 -0
- package/dist/components/ui/avatar.js +57 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/badge.js +42 -0
- package/dist/components/ui/breadcrumb.d.ts +11 -0
- package/dist/components/ui/breadcrumb.js +87 -0
- package/dist/components/ui/button-group.d.ts +11 -0
- package/dist/components/ui/button-group.js +37 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/button.js +55 -0
- package/dist/components/ui/card.d.ts +11 -0
- package/dist/components/ui/card.js +82 -0
- package/dist/components/ui/carousel.d.ts +28 -0
- package/dist/components/ui/carousel.js +196 -0
- package/dist/components/ui/chart.d.ts +44 -0
- package/dist/components/ui/chart.js +198 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox.js +33 -0
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/collapsible.js +33 -0
- package/dist/components/ui/combobox.d.ts +24 -0
- package/dist/components/ui/combobox.js +160 -0
- package/dist/components/ui/command.d.ts +18 -0
- package/dist/components/ui/command.js +142 -0
- package/dist/components/ui/context-menu.d.ts +31 -0
- package/dist/components/ui/context-menu.js +73 -0
- package/dist/components/ui/dialog.d.ts +17 -0
- package/dist/components/ui/dialog.js +138 -0
- package/dist/components/ui/direction.d.ts +7 -0
- package/dist/components/ui/direction.js +14 -0
- package/dist/components/ui/drawer.d.ts +13 -0
- package/dist/components/ui/drawer.js +101 -0
- package/dist/components/ui/dropdown-menu.d.ts +29 -0
- package/dist/components/ui/dropdown-menu.js +98 -0
- package/dist/components/ui/empty.d.ts +11 -0
- package/dist/components/ui/empty.js +97 -0
- package/dist/components/ui/field.d.ts +24 -0
- package/dist/components/ui/field.js +110 -0
- package/dist/components/ui/hover-card.d.ts +6 -0
- package/dist/components/ui/hover-card.js +37 -0
- package/dist/components/ui/input-group.d.ts +16 -0
- package/dist/components/ui/input-group.js +111 -0
- package/dist/components/ui/input-otp.d.ts +11 -0
- package/dist/components/ui/input-otp.js +66 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/input.js +19 -0
- package/dist/components/ui/item.d.ts +23 -0
- package/dist/components/ui/item.js +181 -0
- package/dist/components/ui/kbd.d.ts +3 -0
- package/dist/components/ui/kbd.js +28 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/label.js +23 -0
- package/dist/components/ui/menubar.d.ts +30 -0
- package/dist/components/ui/menubar.js +119 -0
- package/dist/components/ui/native-select.d.ts +8 -0
- package/dist/components/ui/native-select.js +49 -0
- package/dist/components/ui/navigation-menu.d.ts +14 -0
- package/dist/components/ui/navigation-menu.js +139 -0
- package/dist/components/ui/pagination.d.ts +17 -0
- package/dist/components/ui/pagination.js +120 -0
- package/dist/components/ui/popover.d.ts +10 -0
- package/dist/components/ui/popover.js +37 -0
- package/dist/components/ui/progress.d.ts +4 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/radio-group.js +44 -0
- package/dist/components/ui/resizable.d.ts +7 -0
- package/dist/components/ui/resizable.js +44 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/scroll-area.js +59 -0
- package/dist/components/ui/select.d.ts +15 -0
- package/dist/components/ui/select.js +131 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.js +27 -0
- package/dist/components/ui/sheet.d.ts +14 -0
- package/dist/components/ui/sheet.js +113 -0
- package/dist/components/ui/sidebar.d.ts +69 -0
- package/dist/components/ui/sidebar.js +459 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/slider.js +60 -0
- package/dist/components/ui/sonner.d.ts +3 -0
- package/dist/components/ui/sonner.js +38 -0
- package/dist/components/ui/spinner.d.ts +2 -0
- package/dist/components/ui/spinner.js +13 -0
- package/dist/components/ui/switch.d.ts +6 -0
- package/dist/components/ui/switch.js +32 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/table.js +95 -0
- package/dist/components/ui/tabs.d.ts +11 -0
- package/dist/components/ui/tabs.js +87 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/textarea.js +18 -0
- package/dist/components/ui/toggle-group.d.ts +10 -0
- package/dist/components/ui/toggle-group.js +76 -0
- package/dist/components/ui/toggle.d.ts +9 -0
- package/dist/components/ui/toggle.js +43 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tooltip.js +53 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js +18 -0
- package/dist/index.d.ts +122 -0
- package/dist/index.js +61 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +8 -0
- package/dist/primitives/createText.d.ts +103 -0
- package/dist/primitives/createText.js +183 -0
- package/dist/primitives/resolveProperties.d.ts +17 -0
- package/dist/stylex.css +1450 -0
- package/dist/tokens/animations.d.ts +126 -0
- package/dist/tokens/animations.js +61 -0
- package/dist/tokens/tokens.stylex.d.ts +85 -0
- package/dist/tokens/tokens.stylex.js +81 -0
- package/dist/utils/box-styles.d.ts +1117 -0
- package/dist/utils/box-styles.js +1455 -0
- package/dist/utils/grid.d.ts +4 -0
- package/dist/utils/resolvers.d.ts +10 -0
- package/dist/utils/resolvers.js +356 -0
- package/dist/utils/types.d.ts +133 -0
- package/package.json +80 -0
- package/src/theme.css +206 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "outline" | "link" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { cva } from 'class-variance-authority';
|
|
3
|
+
import { Slot } from 'radix-ui';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
|
+
|
|
6
|
+
const badgeVariants = cva(
|
|
7
|
+
"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
12
|
+
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
13
|
+
destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
|
|
14
|
+
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
|
15
|
+
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
|
16
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
variant: "default"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
function Badge({
|
|
25
|
+
className,
|
|
26
|
+
variant = "default",
|
|
27
|
+
asChild = false,
|
|
28
|
+
...props
|
|
29
|
+
}) {
|
|
30
|
+
const Comp = asChild ? Slot.Root : "span";
|
|
31
|
+
return /* @__PURE__ */ jsx(
|
|
32
|
+
Comp,
|
|
33
|
+
{
|
|
34
|
+
"data-slot": "badge",
|
|
35
|
+
"data-variant": variant,
|
|
36
|
+
className: cn(badgeVariants({ variant }), className),
|
|
37
|
+
...props
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">): React.JSX.Element;
|
|
3
|
+
declare function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">): React.JSX.Element;
|
|
4
|
+
declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
5
|
+
declare function BreadcrumbLink({ asChild, className, ...props }: React.ComponentProps<"a"> & {
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
}): React.JSX.Element;
|
|
8
|
+
declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
9
|
+
declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
10
|
+
declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
11
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Slot } from 'radix-ui';
|
|
3
|
+
import { cn } from '../../lib/utils.js';
|
|
4
|
+
import { HugeiconsIcon } from '@hugeicons/react';
|
|
5
|
+
import { ArrowRight01Icon } from '@hugeicons/core-free-icons';
|
|
6
|
+
|
|
7
|
+
function Breadcrumb({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
"nav",
|
|
10
|
+
{
|
|
11
|
+
"aria-label": "breadcrumb",
|
|
12
|
+
"data-slot": "breadcrumb",
|
|
13
|
+
className: cn(className),
|
|
14
|
+
...props
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
function BreadcrumbList({ className, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
"ol",
|
|
21
|
+
{
|
|
22
|
+
"data-slot": "breadcrumb-list",
|
|
23
|
+
className: cn(
|
|
24
|
+
"flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground sm:gap-2.5",
|
|
25
|
+
className
|
|
26
|
+
),
|
|
27
|
+
...props
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
function BreadcrumbItem({ className, ...props }) {
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
"li",
|
|
34
|
+
{
|
|
35
|
+
"data-slot": "breadcrumb-item",
|
|
36
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
37
|
+
...props
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function BreadcrumbLink({
|
|
42
|
+
asChild,
|
|
43
|
+
className,
|
|
44
|
+
...props
|
|
45
|
+
}) {
|
|
46
|
+
const Comp = asChild ? Slot.Root : "a";
|
|
47
|
+
return /* @__PURE__ */ jsx(
|
|
48
|
+
Comp,
|
|
49
|
+
{
|
|
50
|
+
"data-slot": "breadcrumb-link",
|
|
51
|
+
className: cn("transition-colors hover:text-foreground", className),
|
|
52
|
+
...props
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
57
|
+
return /* @__PURE__ */ jsx(
|
|
58
|
+
"span",
|
|
59
|
+
{
|
|
60
|
+
"data-slot": "breadcrumb-page",
|
|
61
|
+
role: "link",
|
|
62
|
+
"aria-disabled": "true",
|
|
63
|
+
"aria-current": "page",
|
|
64
|
+
className: cn("font-normal text-foreground", className),
|
|
65
|
+
...props
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
function BreadcrumbSeparator({
|
|
70
|
+
children,
|
|
71
|
+
className,
|
|
72
|
+
...props
|
|
73
|
+
}) {
|
|
74
|
+
return /* @__PURE__ */ jsx(
|
|
75
|
+
"li",
|
|
76
|
+
{
|
|
77
|
+
"data-slot": "breadcrumb-separator",
|
|
78
|
+
role: "presentation",
|
|
79
|
+
"aria-hidden": "true",
|
|
80
|
+
className: cn("[&>svg]:size-3.5", className),
|
|
81
|
+
...props,
|
|
82
|
+
children: children ?? /* @__PURE__ */ jsx(HugeiconsIcon, { icon: ArrowRight01Icon, strokeWidth: 2 })
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { Separator } from "./separator";
|
|
3
|
+
declare const buttonGroupVariants: (props?: ({
|
|
4
|
+
orientation?: "vertical" | "horizontal" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function ButtonGroup({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>): import("react").JSX.Element;
|
|
7
|
+
declare function ButtonGroupText({ className, asChild, ...props }: React.ComponentProps<"div"> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
declare function ButtonGroupSeparator({ className, orientation, ...props }: React.ComponentProps<typeof Separator>): import("react").JSX.Element;
|
|
11
|
+
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { cva } from 'class-variance-authority';
|
|
3
|
+
import 'radix-ui';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
|
+
|
|
6
|
+
const buttonGroupVariants = cva(
|
|
7
|
+
"group/button-group flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
orientation: {
|
|
11
|
+
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-md!",
|
|
12
|
+
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-md!"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
orientation: "horizontal"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
function ButtonGroup({
|
|
21
|
+
className,
|
|
22
|
+
orientation,
|
|
23
|
+
...props
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
role: "group",
|
|
29
|
+
"data-slot": "button-group",
|
|
30
|
+
"data-orientation": orientation,
|
|
31
|
+
className: cn(buttonGroupVariants({ orientation }), className),
|
|
32
|
+
...props
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { ButtonGroup, buttonGroupVariants };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "outline" | "link" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
5
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}): React.JSX.Element;
|
|
10
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { cva } from 'class-variance-authority';
|
|
3
|
+
import { Slot } from 'radix-ui';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
|
+
|
|
6
|
+
const buttonVariants = cva(
|
|
7
|
+
"group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
12
|
+
outline: "border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
13
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
14
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
15
|
+
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
16
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
default: "h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
20
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
21
|
+
sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
22
|
+
lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
23
|
+
icon: "size-9",
|
|
24
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
25
|
+
"icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
|
|
26
|
+
"icon-lg": "size-10"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
variant: "default",
|
|
31
|
+
size: "default"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
function Button({
|
|
36
|
+
className,
|
|
37
|
+
variant = "default",
|
|
38
|
+
size = "default",
|
|
39
|
+
asChild = false,
|
|
40
|
+
...props
|
|
41
|
+
}) {
|
|
42
|
+
const Comp = asChild ? Slot.Root : "button";
|
|
43
|
+
return /* @__PURE__ */ jsx(
|
|
44
|
+
Comp,
|
|
45
|
+
{
|
|
46
|
+
"data-slot": "button",
|
|
47
|
+
"data-variant": variant,
|
|
48
|
+
"data-size": size,
|
|
49
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
50
|
+
...props
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function Card({ className, size, ...props }: React.ComponentProps<"div"> & {
|
|
3
|
+
size?: "default" | "sm";
|
|
4
|
+
}): React.JSX.Element;
|
|
5
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
6
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
7
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
+
declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
11
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { cn } from '../../lib/utils.js';
|
|
3
|
+
|
|
4
|
+
function Card({
|
|
5
|
+
className,
|
|
6
|
+
size = "default",
|
|
7
|
+
...props
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
"div",
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "card",
|
|
13
|
+
"data-size": size,
|
|
14
|
+
className: cn(
|
|
15
|
+
"group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
|
|
16
|
+
className
|
|
17
|
+
),
|
|
18
|
+
...props
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
function CardHeader({ className, ...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsx(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
"data-slot": "card-header",
|
|
27
|
+
className: cn(
|
|
28
|
+
"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",
|
|
29
|
+
className
|
|
30
|
+
),
|
|
31
|
+
...props
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
function CardTitle({ className, ...props }) {
|
|
36
|
+
return /* @__PURE__ */ jsx(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
"data-slot": "card-title",
|
|
40
|
+
className: cn(
|
|
41
|
+
"font-heading text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",
|
|
42
|
+
className
|
|
43
|
+
),
|
|
44
|
+
...props
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
function CardDescription({ className, ...props }) {
|
|
49
|
+
return /* @__PURE__ */ jsx(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
"data-slot": "card-description",
|
|
53
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
54
|
+
...props
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
function CardContent({ className, ...props }) {
|
|
59
|
+
return /* @__PURE__ */ jsx(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
"data-slot": "card-content",
|
|
63
|
+
className: cn("px-(--card-spacing)", className),
|
|
64
|
+
...props
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
function CardFooter({ className, ...props }) {
|
|
69
|
+
return /* @__PURE__ */ jsx(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
"data-slot": "card-footer",
|
|
73
|
+
className: cn(
|
|
74
|
+
"flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",
|
|
75
|
+
className
|
|
76
|
+
),
|
|
77
|
+
...props
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import useEmblaCarousel, { type UseEmblaCarouselType } from "embla-carousel-react";
|
|
3
|
+
import { Button } from "./button";
|
|
4
|
+
type CarouselApi = UseEmblaCarouselType[1];
|
|
5
|
+
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
6
|
+
type CarouselOptions = UseCarouselParameters[0];
|
|
7
|
+
type CarouselPlugin = UseCarouselParameters[1];
|
|
8
|
+
type CarouselProps = {
|
|
9
|
+
opts?: CarouselOptions;
|
|
10
|
+
plugins?: CarouselPlugin;
|
|
11
|
+
orientation?: "horizontal" | "vertical";
|
|
12
|
+
setApi?: (api: CarouselApi) => void;
|
|
13
|
+
};
|
|
14
|
+
type CarouselContextProps = {
|
|
15
|
+
carouselRef: ReturnType<typeof useEmblaCarousel>[0];
|
|
16
|
+
api: ReturnType<typeof useEmblaCarousel>[1];
|
|
17
|
+
scrollPrev: () => void;
|
|
18
|
+
scrollNext: () => void;
|
|
19
|
+
canScrollPrev: boolean;
|
|
20
|
+
canScrollNext: boolean;
|
|
21
|
+
} & CarouselProps;
|
|
22
|
+
declare function useCarousel(): CarouselContextProps;
|
|
23
|
+
declare function Carousel({ orientation, opts, setApi, plugins, className, children, ...props }: React.ComponentProps<"div"> & CarouselProps): React.JSX.Element;
|
|
24
|
+
declare function CarouselContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
25
|
+
declare function CarouselItem({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
26
|
+
declare function CarouselPrevious({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
|
|
27
|
+
declare function CarouselNext({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
|
|
28
|
+
export { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, useCarousel, };
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import useEmblaCarousel from 'embla-carousel-react';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
import { Button } from './button.js';
|
|
7
|
+
import { HugeiconsIcon } from '@hugeicons/react';
|
|
8
|
+
import { ArrowLeft01Icon, ArrowRight01Icon } from '@hugeicons/core-free-icons';
|
|
9
|
+
|
|
10
|
+
const CarouselContext = React.createContext(null);
|
|
11
|
+
function useCarousel() {
|
|
12
|
+
const context = React.useContext(CarouselContext);
|
|
13
|
+
if (!context) {
|
|
14
|
+
throw new Error("useCarousel must be used within a <Carousel />");
|
|
15
|
+
}
|
|
16
|
+
return context;
|
|
17
|
+
}
|
|
18
|
+
function Carousel({
|
|
19
|
+
orientation = "horizontal",
|
|
20
|
+
opts,
|
|
21
|
+
setApi,
|
|
22
|
+
plugins,
|
|
23
|
+
className,
|
|
24
|
+
children,
|
|
25
|
+
...props
|
|
26
|
+
}) {
|
|
27
|
+
const [carouselRef, api] = useEmblaCarousel(
|
|
28
|
+
{
|
|
29
|
+
...opts,
|
|
30
|
+
axis: orientation === "horizontal" ? "x" : "y"
|
|
31
|
+
},
|
|
32
|
+
plugins
|
|
33
|
+
);
|
|
34
|
+
const [canScrollPrev, setCanScrollPrev] = React.useState(false);
|
|
35
|
+
const [canScrollNext, setCanScrollNext] = React.useState(false);
|
|
36
|
+
const onSelect = React.useCallback((api2) => {
|
|
37
|
+
if (!api2) return;
|
|
38
|
+
setCanScrollPrev(api2.canScrollPrev());
|
|
39
|
+
setCanScrollNext(api2.canScrollNext());
|
|
40
|
+
}, []);
|
|
41
|
+
const scrollPrev = React.useCallback(() => {
|
|
42
|
+
api?.scrollPrev();
|
|
43
|
+
}, [api]);
|
|
44
|
+
const scrollNext = React.useCallback(() => {
|
|
45
|
+
api?.scrollNext();
|
|
46
|
+
}, [api]);
|
|
47
|
+
const handleKeyDown = React.useCallback(
|
|
48
|
+
(event) => {
|
|
49
|
+
if (event.key === "ArrowLeft") {
|
|
50
|
+
event.preventDefault();
|
|
51
|
+
scrollPrev();
|
|
52
|
+
} else if (event.key === "ArrowRight") {
|
|
53
|
+
event.preventDefault();
|
|
54
|
+
scrollNext();
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
[scrollPrev, scrollNext]
|
|
58
|
+
);
|
|
59
|
+
React.useEffect(() => {
|
|
60
|
+
if (!api || !setApi) return;
|
|
61
|
+
setApi(api);
|
|
62
|
+
}, [api, setApi]);
|
|
63
|
+
React.useEffect(() => {
|
|
64
|
+
if (!api) return;
|
|
65
|
+
onSelect(api);
|
|
66
|
+
api.on("reInit", onSelect);
|
|
67
|
+
api.on("select", onSelect);
|
|
68
|
+
return () => {
|
|
69
|
+
api?.off("select", onSelect);
|
|
70
|
+
};
|
|
71
|
+
}, [api, onSelect]);
|
|
72
|
+
return /* @__PURE__ */ jsx(
|
|
73
|
+
CarouselContext.Provider,
|
|
74
|
+
{
|
|
75
|
+
value: {
|
|
76
|
+
carouselRef,
|
|
77
|
+
api,
|
|
78
|
+
opts,
|
|
79
|
+
orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
|
|
80
|
+
scrollPrev,
|
|
81
|
+
scrollNext,
|
|
82
|
+
canScrollPrev,
|
|
83
|
+
canScrollNext
|
|
84
|
+
},
|
|
85
|
+
children: /* @__PURE__ */ jsx(
|
|
86
|
+
"div",
|
|
87
|
+
{
|
|
88
|
+
onKeyDownCapture: handleKeyDown,
|
|
89
|
+
className: cn("relative", className),
|
|
90
|
+
role: "region",
|
|
91
|
+
"aria-roledescription": "carousel",
|
|
92
|
+
"data-slot": "carousel",
|
|
93
|
+
...props,
|
|
94
|
+
children
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
function CarouselContent({ className, ...props }) {
|
|
101
|
+
const { carouselRef, orientation } = useCarousel();
|
|
102
|
+
return /* @__PURE__ */ jsx(
|
|
103
|
+
"div",
|
|
104
|
+
{
|
|
105
|
+
ref: carouselRef,
|
|
106
|
+
className: "overflow-hidden",
|
|
107
|
+
"data-slot": "carousel-content",
|
|
108
|
+
children: /* @__PURE__ */ jsx(
|
|
109
|
+
"div",
|
|
110
|
+
{
|
|
111
|
+
className: cn(
|
|
112
|
+
"flex",
|
|
113
|
+
orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
|
114
|
+
className
|
|
115
|
+
),
|
|
116
|
+
...props
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
function CarouselItem({ className, ...props }) {
|
|
123
|
+
const { orientation } = useCarousel();
|
|
124
|
+
return /* @__PURE__ */ jsx(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
role: "group",
|
|
128
|
+
"aria-roledescription": "slide",
|
|
129
|
+
"data-slot": "carousel-item",
|
|
130
|
+
className: cn(
|
|
131
|
+
"min-w-0 shrink-0 grow-0 basis-full",
|
|
132
|
+
orientation === "horizontal" ? "pl-4" : "pt-4",
|
|
133
|
+
className
|
|
134
|
+
),
|
|
135
|
+
...props
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
function CarouselPrevious({
|
|
140
|
+
className,
|
|
141
|
+
variant = "outline",
|
|
142
|
+
size = "icon-sm",
|
|
143
|
+
...props
|
|
144
|
+
}) {
|
|
145
|
+
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
146
|
+
return /* @__PURE__ */ jsxs(
|
|
147
|
+
Button,
|
|
148
|
+
{
|
|
149
|
+
"data-slot": "carousel-previous",
|
|
150
|
+
variant,
|
|
151
|
+
size,
|
|
152
|
+
className: cn(
|
|
153
|
+
"absolute touch-manipulation rounded-full",
|
|
154
|
+
orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
155
|
+
className
|
|
156
|
+
),
|
|
157
|
+
disabled: !canScrollPrev,
|
|
158
|
+
onClick: scrollPrev,
|
|
159
|
+
...props,
|
|
160
|
+
children: [
|
|
161
|
+
/* @__PURE__ */ jsx(HugeiconsIcon, { icon: ArrowLeft01Icon, strokeWidth: 2 }),
|
|
162
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous slide" })
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
function CarouselNext({
|
|
168
|
+
className,
|
|
169
|
+
variant = "outline",
|
|
170
|
+
size = "icon-sm",
|
|
171
|
+
...props
|
|
172
|
+
}) {
|
|
173
|
+
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
174
|
+
return /* @__PURE__ */ jsxs(
|
|
175
|
+
Button,
|
|
176
|
+
{
|
|
177
|
+
"data-slot": "carousel-next",
|
|
178
|
+
variant,
|
|
179
|
+
size,
|
|
180
|
+
className: cn(
|
|
181
|
+
"absolute touch-manipulation rounded-full",
|
|
182
|
+
orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
183
|
+
className
|
|
184
|
+
),
|
|
185
|
+
disabled: !canScrollNext,
|
|
186
|
+
onClick: scrollNext,
|
|
187
|
+
...props,
|
|
188
|
+
children: [
|
|
189
|
+
/* @__PURE__ */ jsx(HugeiconsIcon, { icon: ArrowRight01Icon, strokeWidth: 2 }),
|
|
190
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Next slide" })
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, useCarousel };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as RechartsPrimitive from "recharts";
|
|
3
|
+
import type { TooltipValueType } from "recharts";
|
|
4
|
+
declare const THEMES: {
|
|
5
|
+
readonly light: "";
|
|
6
|
+
readonly dark: ".dark";
|
|
7
|
+
};
|
|
8
|
+
type TooltipNameType = number | string;
|
|
9
|
+
export type ChartConfig = Record<string, {
|
|
10
|
+
label?: React.ReactNode;
|
|
11
|
+
icon?: React.ComponentType;
|
|
12
|
+
} & ({
|
|
13
|
+
color?: string;
|
|
14
|
+
theme?: never;
|
|
15
|
+
} | {
|
|
16
|
+
color?: never;
|
|
17
|
+
theme: Record<keyof typeof THEMES, string>;
|
|
18
|
+
})>;
|
|
19
|
+
declare function ChartContainer({ id, className, children, config, initialDimension, ...props }: React.ComponentProps<"div"> & {
|
|
20
|
+
config: ChartConfig;
|
|
21
|
+
children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
|
|
22
|
+
initialDimension?: {
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
};
|
|
26
|
+
}): React.JSX.Element;
|
|
27
|
+
declare const ChartStyle: ({ id, config }: {
|
|
28
|
+
id: string;
|
|
29
|
+
config: ChartConfig;
|
|
30
|
+
}) => React.JSX.Element | null;
|
|
31
|
+
declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
|
|
32
|
+
declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: React.ComponentProps<typeof RechartsPrimitive.Tooltip> & React.ComponentProps<"div"> & {
|
|
33
|
+
hideLabel?: boolean;
|
|
34
|
+
hideIndicator?: boolean;
|
|
35
|
+
indicator?: "line" | "dot" | "dashed";
|
|
36
|
+
nameKey?: string;
|
|
37
|
+
labelKey?: string;
|
|
38
|
+
} & Omit<RechartsPrimitive.DefaultTooltipContentProps<TooltipValueType, TooltipNameType>, "accessibilityLayer">): React.JSX.Element | null;
|
|
39
|
+
declare const ChartLegend: React.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
|
|
40
|
+
declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: React.ComponentProps<"div"> & {
|
|
41
|
+
hideIcon?: boolean;
|
|
42
|
+
nameKey?: string;
|
|
43
|
+
} & RechartsPrimitive.DefaultLegendContentProps): React.JSX.Element | null;
|
|
44
|
+
export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
|