@codefast/ui 0.3.11 → 0.3.12-canary.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/CHANGELOG.md +15 -0
- package/README.md +4 -0
- package/dist/components/accordion.d.ts +11 -29
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +10 -37
- package/dist/components/alert-dialog.d.ts +25 -60
- package/dist/components/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog.js +16 -69
- package/dist/components/alert.d.ts +16 -27
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +22 -30
- package/dist/components/aspect-ratio.d.ts +5 -8
- package/dist/components/aspect-ratio.d.ts.map +1 -0
- package/dist/components/aspect-ratio.js +5 -7
- package/dist/components/avatar.d.ts +7 -17
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +7 -18
- package/dist/components/badge.d.ts +15 -21
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +23 -20
- package/dist/components/breadcrumb.d.ts +13 -35
- package/dist/components/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb.js +13 -49
- package/dist/components/button-group.d.ts +15 -29
- package/dist/components/button-group.d.ts.map +1 -0
- package/dist/components/button-group.js +22 -27
- package/dist/components/button.d.ts +26 -35
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +43 -51
- package/dist/components/calendar.d.ts +10 -24
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/calendar.js +75 -92
- package/dist/components/card.d.ts +11 -34
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +11 -39
- package/dist/components/carousel.d.ts +25 -55
- package/dist/components/carousel.d.ts.map +1 -0
- package/dist/components/carousel.js +82 -114
- package/dist/components/chart.d.ts +37 -72
- package/dist/components/chart.d.ts.map +1 -0
- package/dist/components/chart.js +161 -150
- package/dist/components/checkbox-cards.d.ts +9 -15
- package/dist/components/checkbox-cards.d.ts.map +1 -0
- package/dist/components/checkbox-cards.js +8 -22
- package/dist/components/checkbox-group.d.ts +9 -16
- package/dist/components/checkbox-group.d.ts.map +1 -0
- package/dist/components/checkbox-group.js +7 -19
- package/dist/components/checkbox.d.ts +5 -9
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +6 -14
- package/dist/components/collapsible.d.ts +7 -14
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +7 -15
- package/dist/components/command.d.ts +24 -55
- package/dist/components/command.d.ts.map +1 -0
- package/dist/components/command.js +18 -69
- package/dist/components/context-menu.d.ts +23 -72
- package/dist/components/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu.js +21 -89
- package/dist/components/dialog.d.ts +23 -53
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +20 -72
- package/dist/components/drawer.d.ts +29 -60
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js +16 -58
- package/dist/components/dropdown-menu.d.ts +23 -73
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +21 -96
- package/dist/components/empty.d.ts +16 -37
- package/dist/components/empty.d.ts.map +1 -0
- package/dist/components/empty.js +24 -44
- package/dist/components/field.d.ts +26 -63
- package/dist/components/field.d.ts.map +1 -0
- package/dist/components/field.js +46 -89
- package/dist/components/form.d.ts +16 -37
- package/dist/components/form.d.ts.map +1 -0
- package/dist/components/form.js +50 -66
- package/dist/components/hover-card.d.ts +8 -21
- package/dist/components/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card.js +8 -23
- package/dist/components/input-group.d.ts +29 -53
- package/dist/components/input-group.d.ts.map +1 -0
- package/dist/components/input-group.js +59 -66
- package/dist/components/input-number.d.ts +8 -28
- package/dist/components/input-number.d.ts.map +1 -0
- package/dist/components/input-number.js +14 -55
- package/dist/components/input-otp.d.ts +11 -24
- package/dist/components/input-otp.d.ts.map +1 -0
- package/dist/components/input-otp.js +13 -34
- package/dist/components/input-password.d.ts +6 -12
- package/dist/components/input-password.d.ts.map +1 -0
- package/dist/components/input-password.js +10 -31
- package/dist/components/input-search.d.ts +9 -18
- package/dist/components/input-search.d.ts.map +1 -0
- package/dist/components/input-search.js +16 -44
- package/dist/components/input.d.ts +5 -10
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +5 -9
- package/dist/components/item.d.ts +33 -69
- package/dist/components/item.d.ts.map +1 -0
- package/dist/components/item.js +47 -90
- package/dist/components/kbd.d.ts +6 -13
- package/dist/components/kbd.d.ts.map +1 -0
- package/dist/components/kbd.js +6 -13
- package/dist/components/label.d.ts +5 -9
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +5 -8
- package/dist/components/menubar.d.ts +24 -80
- package/dist/components/menubar.d.ts.map +1 -0
- package/dist/components/menubar.js +23 -99
- package/dist/components/native-select.d.ts +7 -16
- package/dist/components/native-select.d.ts.map +1 -0
- package/dist/components/native-select.js +7 -25
- package/dist/components/navigation-menu.d.ts +13 -36
- package/dist/components/navigation-menu.d.ts.map +1 -0
- package/dist/components/navigation-menu.js +25 -61
- package/dist/components/pagination.d.ts +15 -35
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +13 -55
- package/dist/components/popover.d.ts +9 -24
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +9 -27
- package/dist/components/progress-circle.d.ts +89 -106
- package/dist/components/progress-circle.d.ts.map +1 -0
- package/dist/components/progress-circle.js +70 -103
- package/dist/components/progress.d.ts +5 -10
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +7 -13
- package/dist/components/radio-cards.d.ts +5 -10
- package/dist/components/radio-cards.d.ts.map +1 -0
- package/dist/components/radio-cards.js +7 -21
- package/dist/components/radio-group.d.ts +6 -13
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +6 -17
- package/dist/components/radio.d.ts +6 -12
- package/dist/components/radio.d.ts.map +1 -0
- package/dist/components/radio.js +5 -10
- package/dist/components/resizable.d.ts +8 -18
- package/dist/components/resizable.d.ts.map +1 -0
- package/dist/components/resizable.js +7 -21
- package/dist/components/scroll-area.d.ts +21 -33
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js +64 -84
- package/dist/components/select.d.ts +17 -50
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +26 -78
- package/dist/components/separator.d.ts +20 -29
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +27 -36
- package/dist/components/sheet.d.ts +30 -62
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.js +36 -80
- package/dist/components/sidebar.d.ts +67 -160
- package/dist/components/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar.js +166 -301
- package/dist/components/skeleton.d.ts +5 -9
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +5 -8
- package/dist/components/slider.d.ts +5 -13
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +12 -34
- package/dist/components/sonner.d.ts +8 -10
- package/dist/components/sonner.d.ts.map +1 -0
- package/dist/components/sonner.js +13 -16
- package/dist/components/spinner.d.ts +6 -12
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +20 -33
- package/dist/components/switch.d.ts +5 -9
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +5 -12
- package/dist/components/table.d.ts +12 -37
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +12 -47
- package/dist/components/tabs.d.ts +8 -21
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +8 -23
- package/dist/components/textarea.d.ts +5 -9
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +5 -8
- package/dist/components/toggle-group.d.ts +10 -24
- package/dist/components/toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group.js +20 -38
- package/dist/components/toggle.d.ts +18 -25
- package/dist/components/toggle.d.ts.map +1 -0
- package/dist/components/toggle.js +24 -29
- package/dist/components/tooltip.d.ts +9 -24
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +9 -28
- package/dist/hooks/use-animated-value.d.ts +2 -4
- package/dist/hooks/use-animated-value.d.ts.map +1 -0
- package/dist/hooks/use-animated-value.js +67 -58
- package/dist/hooks/use-copy-to-clipboard.d.ts +6 -11
- package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -0
- package/dist/hooks/use-copy-to-clipboard.js +42 -39
- package/dist/hooks/use-is-mobile.d.ts +2 -4
- package/dist/hooks/use-is-mobile.d.ts.map +1 -0
- package/dist/hooks/use-is-mobile.js +20 -23
- package/dist/hooks/use-media-query.d.ts +2 -4
- package/dist/hooks/use-media-query.d.ts.map +1 -0
- package/dist/hooks/use-media-query.js +49 -46
- package/dist/hooks/use-mutation-observer.d.ts +3 -6
- package/dist/hooks/use-mutation-observer.d.ts.map +1 -0
- package/dist/hooks/use-mutation-observer.js +33 -34
- package/dist/hooks/use-pagination.d.ts +15 -22
- package/dist/hooks/use-pagination.d.ts.map +1 -0
- package/dist/hooks/use-pagination.js +99 -99
- package/dist/index.d.ts +131 -69
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +68 -69
- package/dist/primitives/checkbox-group.d.ts +84 -105
- package/dist/primitives/checkbox-group.d.ts.map +1 -0
- package/dist/primitives/checkbox-group.js +91 -105
- package/dist/primitives/input-number.d.ts +41 -51
- package/dist/primitives/input-number.d.ts.map +1 -0
- package/dist/primitives/input-number.js +417 -473
- package/dist/primitives/input.d.ts +43 -48
- package/dist/primitives/input.d.ts.map +1 -0
- package/dist/primitives/input.js +67 -66
- package/dist/primitives/progress-circle.d.ts +49 -79
- package/dist/primitives/progress-circle.d.ts.map +1 -0
- package/dist/primitives/progress-circle.js +134 -149
- package/package.json +17 -10
- package/{dist → src}/css/preset.css +1 -1
- /package/{dist → src}/css/amber.css +0 -0
- /package/{dist → src}/css/blue.css +0 -0
- /package/{dist → src}/css/cyan.css +0 -0
- /package/{dist → src}/css/emerald.css +0 -0
- /package/{dist → src}/css/fuchsia.css +0 -0
- /package/{dist → src}/css/gray.css +0 -0
- /package/{dist → src}/css/green.css +0 -0
- /package/{dist → src}/css/indigo.css +0 -0
- /package/{dist → src}/css/lime.css +0 -0
- /package/{dist → src}/css/neutral.css +0 -0
- /package/{dist → src}/css/orange.css +0 -0
- /package/{dist → src}/css/pink.css +0 -0
- /package/{dist → src}/css/purple.css +0 -0
- /package/{dist → src}/css/red.css +0 -0
- /package/{dist → src}/css/rose.css +0 -0
- /package/{dist → src}/css/sky.css +0 -0
- /package/{dist → src}/css/slate.css +0 -0
- /package/{dist → src}/css/stone.css +0 -0
- /package/{dist → src}/css/style.css +0 -0
- /package/{dist → src}/css/teal.css +0 -0
- /package/{dist → src}/css/violet.css +0 -0
- /package/{dist → src}/css/yellow.css +0 -0
- /package/{dist → src}/css/zinc.css +0 -0
|
@@ -1,79 +1,43 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn, tv } from "@codefast/tailwind-variants";
|
|
3
|
-
import { ChevronDownIcon } from "lucide-react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
3
|
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
5
|
+
import { buttonVariants } from "#components/button";
|
|
6
|
+
/* -----------------------------------------------------------------------------
|
|
7
|
+
* Style: NavigationMenuTrigger
|
|
8
|
+
* -------------------------------------------------------------------------- */
|
|
9
|
+
const navigationMenuTriggerVariants = tv({
|
|
10
|
+
base: buttonVariants({
|
|
11
|
+
className: "data-[state=open]:bg-secondary/50 data-[state=open]:text-secondary-foreground group/navigation-menu-trigger focus-visible:bg-secondary dark:hover:not-disabled:bg-secondary",
|
|
12
|
+
variant: "ghost",
|
|
13
|
+
}),
|
|
14
|
+
});
|
|
11
15
|
function NavigationMenu({ children, className, viewport = true, ...props }) {
|
|
12
|
-
|
|
13
|
-
className: cn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", className),
|
|
14
|
-
"data-slot": "navigation-menu",
|
|
15
|
-
"data-viewport": viewport,
|
|
16
|
-
...props,
|
|
17
|
-
children: [children, viewport ? /* @__PURE__ */ jsx(NavigationMenuViewport, {}) : null]
|
|
18
|
-
});
|
|
16
|
+
return (_jsxs(NavigationMenuPrimitive.Root, { className: cn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", className), "data-slot": "navigation-menu", "data-viewport": viewport, ...props, children: [children, viewport ? _jsx(NavigationMenuViewport, {}) : null] }));
|
|
19
17
|
}
|
|
20
18
|
function NavigationMenuList({ children, className, ...props }) {
|
|
21
|
-
|
|
22
|
-
className: cn("flex flex-1 list-none items-center justify-center gap-1", className),
|
|
23
|
-
"data-slot": "navigation-menu-list",
|
|
24
|
-
...props,
|
|
25
|
-
children: [children, /* @__PURE__ */ jsx(NavigationMenuIndicator, { className: "invisible" })]
|
|
26
|
-
});
|
|
19
|
+
return (_jsxs(NavigationMenuPrimitive.List, { className: cn("flex flex-1 list-none items-center justify-center gap-1", className), "data-slot": "navigation-menu-list", ...props, children: [children, _jsx(NavigationMenuIndicator, { className: "invisible" })] }));
|
|
27
20
|
}
|
|
28
21
|
function NavigationMenuItem({ className, ...props }) {
|
|
29
|
-
|
|
30
|
-
className: cn("group-data-[viewport=false]/navigation-menu:relative", className),
|
|
31
|
-
"data-slot": "navigation-menu-item",
|
|
32
|
-
...props
|
|
33
|
-
});
|
|
22
|
+
return (_jsx(NavigationMenuPrimitive.Item, { className: cn("group-data-[viewport=false]/navigation-menu:relative", className), "data-slot": "navigation-menu-item", ...props }));
|
|
34
23
|
}
|
|
35
24
|
function NavigationMenuTrigger({ children, className, ...props }) {
|
|
36
|
-
|
|
37
|
-
className: navigationMenuTriggerVariants({ className }),
|
|
38
|
-
"data-slot": "navigation-menu-trigger",
|
|
39
|
-
...props,
|
|
40
|
-
children: [children, /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
41
|
-
"aria-hidden": "true",
|
|
42
|
-
className: "relative top-px ml-1 size-3 transition duration-300 group-data-[state=open]/navigation-menu-trigger:rotate-180"
|
|
43
|
-
})]
|
|
44
|
-
});
|
|
25
|
+
return (_jsxs(NavigationMenuPrimitive.Trigger, { className: navigationMenuTriggerVariants({ className }), "data-slot": "navigation-menu-trigger", ...props, children: [children, _jsx(ChevronDownIcon, { "aria-hidden": "true", className: "relative top-px ml-1 size-3 transition duration-300 group-data-[state=open]/navigation-menu-trigger:rotate-180" })] }));
|
|
45
26
|
}
|
|
46
27
|
function NavigationMenuContent({ className, ...props }) {
|
|
47
|
-
|
|
48
|
-
className: cn("top-0 left-0 w-full ease-ui group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-2 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:p-1 group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=true]/navigation-menu:p-2 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in-0 data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 md:absolute md:w-auto", className),
|
|
49
|
-
"data-slot": "navigation-menu-content",
|
|
50
|
-
...props
|
|
51
|
-
});
|
|
28
|
+
return (_jsx(NavigationMenuPrimitive.Content, { className: cn("top-0 left-0 w-full ease-ui group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-2 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:p-1 group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=true]/navigation-menu:p-2 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in-0 data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 md:absolute md:w-auto", className), "data-slot": "navigation-menu-content", ...props }));
|
|
52
29
|
}
|
|
53
30
|
function NavigationMenuLink({ className, ...props }) {
|
|
54
|
-
|
|
55
|
-
className: cn("flex flex-col gap-1 rounded-sm p-2 text-sm outline-hidden transition hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground data-[active=true]:hover:bg-accent data-[active=true]:focus:bg-accent [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80", className),
|
|
56
|
-
"data-slot": "navigation-menu-link",
|
|
57
|
-
...props
|
|
58
|
-
});
|
|
31
|
+
return (_jsx(NavigationMenuPrimitive.Link, { className: cn("flex flex-col gap-1 rounded-sm p-2 text-sm outline-hidden transition hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground data-[active=true]:hover:bg-accent data-[active=true]:focus:bg-accent [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80", className), "data-slot": "navigation-menu-link", ...props }));
|
|
59
32
|
}
|
|
60
33
|
function NavigationMenuViewport({ className, ...props }) {
|
|
61
|
-
|
|
62
|
-
className: "absolute top-full left-0 z-30 flex justify-center perspective-distant",
|
|
63
|
-
children: /* @__PURE__ */ jsx(NavigationMenuPrimitive.Viewport, {
|
|
64
|
-
className: cn("relative mt-2 min-h-[calc(var(--radix-navigation-menu-viewport-height)+2px)] w-full origin-[top_center] overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg transition-[width,height] ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-90 sm:min-w-[calc(var(--radix-navigation-menu-viewport-width)+2px)]", className),
|
|
65
|
-
"data-slot": "navigation-menu-viewport",
|
|
66
|
-
...props
|
|
67
|
-
})
|
|
68
|
-
});
|
|
34
|
+
return (_jsx("div", { className: "absolute top-full left-0 z-30 flex justify-center perspective-distant", children: _jsx(NavigationMenuPrimitive.Viewport, { className: cn("relative mt-2 min-h-[calc(var(--radix-navigation-menu-viewport-height)+2px)] w-full origin-[top_center] overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg transition-[width,height] ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-90 sm:min-w-[calc(var(--radix-navigation-menu-viewport-width)+2px)]", className), "data-slot": "navigation-menu-viewport", ...props }) }));
|
|
69
35
|
}
|
|
70
36
|
function NavigationMenuIndicator({ className, ...props }) {
|
|
71
|
-
|
|
72
|
-
className: cn("top-full z-10 flex h-2 items-center justify-center overflow-hidden ease-ui data-[state=hidden]:animate-out data-[state=hidden]:fade-out-0 data-[state=visible]:animate-in data-[state=visible]:fade-in-0", className),
|
|
73
|
-
"data-slot": "navigation-menu-indicator",
|
|
74
|
-
...props,
|
|
75
|
-
children: /* @__PURE__ */ jsx("div", { className: "relative top-[60%] size-2.5 rotate-45 rounded-tl-xs bg-popover text-popover-foreground" })
|
|
76
|
-
});
|
|
37
|
+
return (_jsx(NavigationMenuPrimitive.Indicator, { className: cn("top-full z-10 flex h-2 items-center justify-center overflow-hidden ease-ui data-[state=hidden]:animate-out data-[state=hidden]:fade-out-0 data-[state=visible]:animate-in data-[state=visible]:fade-in-0", className), "data-slot": "navigation-menu-indicator", ...props, children: _jsx("div", { className: "relative top-[60%] size-2.5 rotate-45 rounded-tl-xs bg-popover text-popover-foreground" }) }));
|
|
77
38
|
}
|
|
78
|
-
|
|
79
|
-
|
|
39
|
+
/* -----------------------------------------------------------------------------
|
|
40
|
+
* Exports
|
|
41
|
+
* -------------------------------------------------------------------------- */
|
|
42
|
+
export { navigationMenuTriggerVariants };
|
|
43
|
+
export { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, };
|
|
@@ -1,46 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
//#region src/components/pagination.d.ts
|
|
1
|
+
import type { VariantProps } from "@codefast/tailwind-variants";
|
|
2
|
+
import type { ComponentProps, JSX } from "react";
|
|
3
|
+
import { buttonVariants } from "#components/button";
|
|
6
4
|
type PaginationProps = ComponentProps<"nav">;
|
|
7
|
-
declare function Pagination({
|
|
8
|
-
className,
|
|
9
|
-
...props
|
|
10
|
-
}: PaginationProps): JSX.Element;
|
|
5
|
+
declare function Pagination({ className, ...props }: PaginationProps): JSX.Element;
|
|
11
6
|
type PaginationContentProps = ComponentProps<"ul">;
|
|
12
|
-
declare function PaginationContent({
|
|
13
|
-
className,
|
|
14
|
-
...props
|
|
15
|
-
}: PaginationContentProps): JSX.Element;
|
|
7
|
+
declare function PaginationContent({ className, ...props }: PaginationContentProps): JSX.Element;
|
|
16
8
|
type PaginationItemProps = ComponentProps<"li">;
|
|
17
9
|
declare function PaginationItem(props: PaginationItemProps): JSX.Element;
|
|
18
10
|
interface PaginationLinkProps extends ComponentProps<"a">, Pick<VariantProps<typeof buttonVariants>, "size"> {
|
|
19
|
-
|
|
11
|
+
isActive?: boolean;
|
|
20
12
|
}
|
|
21
|
-
declare function PaginationLink({
|
|
22
|
-
children,
|
|
23
|
-
className,
|
|
24
|
-
isActive,
|
|
25
|
-
size,
|
|
26
|
-
...props
|
|
27
|
-
}: PaginationLinkProps): JSX.Element;
|
|
13
|
+
declare function PaginationLink({ children, className, isActive, size, ...props }: PaginationLinkProps): JSX.Element;
|
|
28
14
|
interface PaginationPreviousProps extends ComponentProps<"a">, Pick<VariantProps<typeof buttonVariants>, "size"> {
|
|
29
|
-
|
|
15
|
+
isActive?: boolean;
|
|
30
16
|
}
|
|
31
|
-
declare function PaginationPrevious({
|
|
32
|
-
...props
|
|
33
|
-
}: PaginationPreviousProps): JSX.Element;
|
|
17
|
+
declare function PaginationPrevious({ ...props }: PaginationPreviousProps): JSX.Element;
|
|
34
18
|
interface PaginationNextProps extends ComponentProps<"a">, Pick<VariantProps<typeof buttonVariants>, "size"> {
|
|
35
|
-
|
|
19
|
+
isActive?: boolean;
|
|
36
20
|
}
|
|
37
|
-
declare function PaginationNext({
|
|
38
|
-
...props
|
|
39
|
-
}: PaginationNextProps): JSX.Element;
|
|
21
|
+
declare function PaginationNext({ ...props }: PaginationNextProps): JSX.Element;
|
|
40
22
|
type PaginationEllipsisProps = ComponentProps<"span">;
|
|
41
|
-
declare function PaginationEllipsis({
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
//#endregion
|
|
46
|
-
export { Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps };
|
|
23
|
+
declare function PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): JSX.Element;
|
|
24
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, };
|
|
25
|
+
export type { PaginationContentProps, PaginationEllipsisProps, PaginationItemProps, PaginationLinkProps, PaginationNextProps, PaginationPreviousProps, PaginationProps, };
|
|
26
|
+
//# sourceMappingURL=pagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/components/pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAKjD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAMpD,KAAK,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE7C,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CASzE;AAMD,KAAK,sBAAsB,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;AAEnD,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,GAAG,GAAG,CAAC,OAAO,CAQvF;AAMD,KAAK,mBAAmB,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;AAEhD,iBAAS,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAE/D;AAMD,UAAU,mBACR,SAAQ,cAAc,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC,OAAO,cAAc,CAAC,EAAE,MAAM,CAAC;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,iBAAS,cAAc,CAAC,EACtB,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,IAAa,EACb,GAAG,KAAK,EACT,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAWnC;AAMD,UAAU,uBACR,SAAQ,cAAc,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC,OAAO,cAAc,CAAC,EAAE,MAAM,CAAC;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,iBAAS,kBAAkB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAY9E;AAMD,UAAU,mBACR,SAAQ,cAAc,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC,OAAO,cAAc,CAAC,EAAE,MAAM,CAAC;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,iBAAS,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAOtE;AAMD,KAAK,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;AAEtD,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAYzF;AAMD,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,GACnB,CAAC;AACF,YAAY,EACV,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,eAAe,GAChB,CAAC"}
|
|
@@ -1,71 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "@codefast/tailwind-variants";
|
|
3
3
|
import { ChevronLeftIcon, ChevronRightIcon, EllipsisIcon } from "lucide-react";
|
|
4
|
-
import {
|
|
5
|
-
//#region src/components/pagination.tsx
|
|
4
|
+
import { buttonVariants } from "#components/button";
|
|
6
5
|
function Pagination({ className, ...props }) {
|
|
7
|
-
|
|
8
|
-
"aria-label": "pagination",
|
|
9
|
-
className: cn("mx-auto flex w-full justify-center", className),
|
|
10
|
-
"data-slot": "pagination",
|
|
11
|
-
...props
|
|
12
|
-
});
|
|
6
|
+
return (_jsx("nav", { "aria-label": "pagination", className: cn("mx-auto flex w-full justify-center", className), "data-slot": "pagination", ...props }));
|
|
13
7
|
}
|
|
14
8
|
function PaginationContent({ className, ...props }) {
|
|
15
|
-
|
|
16
|
-
className: cn("flex flex-row items-center gap-1", className),
|
|
17
|
-
"data-slot": "pagination-content",
|
|
18
|
-
...props
|
|
19
|
-
});
|
|
9
|
+
return (_jsx("ul", { className: cn("flex flex-row items-center gap-1", className), "data-slot": "pagination-content", ...props }));
|
|
20
10
|
}
|
|
21
11
|
function PaginationItem(props) {
|
|
22
|
-
|
|
23
|
-
"data-slot": "pagination-item",
|
|
24
|
-
...props
|
|
25
|
-
});
|
|
12
|
+
return _jsx("li", { "data-slot": "pagination-item", ...props });
|
|
26
13
|
}
|
|
27
14
|
function PaginationLink({ children, className, isActive, size = "icon", ...props }) {
|
|
28
|
-
|
|
29
|
-
"aria-current": isActive ? "page" : void 0,
|
|
30
|
-
className: buttonVariants({
|
|
31
|
-
className,
|
|
32
|
-
size,
|
|
33
|
-
variant: isActive ? "outline" : "ghost"
|
|
34
|
-
}),
|
|
35
|
-
"data-slot": "pagination-link",
|
|
36
|
-
...props,
|
|
37
|
-
children
|
|
38
|
-
});
|
|
15
|
+
return (_jsx("a", { "aria-current": isActive ? "page" : undefined, className: buttonVariants({ className, size, variant: isActive ? "outline" : "ghost" }), "data-slot": "pagination-link", ...props, children: children }));
|
|
39
16
|
}
|
|
40
17
|
function PaginationPrevious({ ...props }) {
|
|
41
|
-
|
|
42
|
-
"aria-label": "Go to previous page",
|
|
43
|
-
"data-slot": "pagination-previous",
|
|
44
|
-
size: "md",
|
|
45
|
-
...props,
|
|
46
|
-
children: [/* @__PURE__ */ jsx(ChevronLeftIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", { children: "Previous" })]
|
|
47
|
-
});
|
|
18
|
+
return (_jsxs(PaginationLink, { "aria-label": "Go to previous page", "data-slot": "pagination-previous", size: "md", ...props, children: [_jsx(ChevronLeftIcon, { className: "size-4" }), _jsx("span", { children: "Previous" })] }));
|
|
48
19
|
}
|
|
49
20
|
function PaginationNext({ ...props }) {
|
|
50
|
-
|
|
51
|
-
"aria-label": "Go to next page",
|
|
52
|
-
"data-slot": "pagination-next",
|
|
53
|
-
size: "md",
|
|
54
|
-
...props,
|
|
55
|
-
children: [/* @__PURE__ */ jsx("span", { children: "Next" }), /* @__PURE__ */ jsx(ChevronRightIcon, {})]
|
|
56
|
-
});
|
|
21
|
+
return (_jsxs(PaginationLink, { "aria-label": "Go to next page", "data-slot": "pagination-next", size: "md", ...props, children: [_jsx("span", { children: "Next" }), _jsx(ChevronRightIcon, {})] }));
|
|
57
22
|
}
|
|
58
23
|
function PaginationEllipsis({ className, ...props }) {
|
|
59
|
-
|
|
60
|
-
"aria-hidden": true,
|
|
61
|
-
className: cn("flex size-10 items-center justify-center", className),
|
|
62
|
-
"data-slot": "pagination-ellipsis",
|
|
63
|
-
...props,
|
|
64
|
-
children: [/* @__PURE__ */ jsx(EllipsisIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
|
|
65
|
-
className: "sr-only",
|
|
66
|
-
children: "More pages"
|
|
67
|
-
})]
|
|
68
|
-
});
|
|
24
|
+
return (_jsxs("span", { "aria-hidden": true, className: cn("flex size-10 items-center justify-center", className), "data-slot": "pagination-ellipsis", ...props, children: [_jsx(EllipsisIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "More pages" })] }));
|
|
69
25
|
}
|
|
70
|
-
|
|
71
|
-
|
|
26
|
+
/* -----------------------------------------------------------------------------
|
|
27
|
+
* Exports
|
|
28
|
+
* -------------------------------------------------------------------------- */
|
|
29
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, };
|
|
@@ -1,30 +1,15 @@
|
|
|
1
|
-
import { ComponentProps, JSX } from "react";
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
2
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
|
-
|
|
4
|
-
//#region src/components/popover.d.ts
|
|
5
3
|
type PopoverProps = ComponentProps<typeof PopoverPrimitive.Root>;
|
|
6
|
-
declare function Popover({
|
|
7
|
-
...props
|
|
8
|
-
}: PopoverProps): JSX.Element;
|
|
4
|
+
declare function Popover({ ...props }: PopoverProps): JSX.Element;
|
|
9
5
|
type PopoverTriggerProps = ComponentProps<typeof PopoverPrimitive.Trigger>;
|
|
10
|
-
declare function PopoverTrigger({
|
|
11
|
-
...props
|
|
12
|
-
}: PopoverTriggerProps): JSX.Element;
|
|
6
|
+
declare function PopoverTrigger({ ...props }: PopoverTriggerProps): JSX.Element;
|
|
13
7
|
type PopoverAnchorProps = ComponentProps<typeof PopoverPrimitive.Anchor>;
|
|
14
|
-
declare function PopoverAnchor({
|
|
15
|
-
...props
|
|
16
|
-
}: PopoverAnchorProps): JSX.Element;
|
|
8
|
+
declare function PopoverAnchor({ ...props }: PopoverAnchorProps): JSX.Element;
|
|
17
9
|
type PopoverContentProps = ComponentProps<typeof PopoverPrimitive.Content>;
|
|
18
|
-
declare function PopoverContent({
|
|
19
|
-
align,
|
|
20
|
-
className,
|
|
21
|
-
sideOffset,
|
|
22
|
-
...props
|
|
23
|
-
}: PopoverContentProps): JSX.Element;
|
|
10
|
+
declare function PopoverContent({ align, className, sideOffset, ...props }: PopoverContentProps): JSX.Element;
|
|
24
11
|
type PopoverArrowProps = ComponentProps<typeof PopoverPrimitive.Arrow>;
|
|
25
|
-
declare function PopoverArrow({
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
//#endregion
|
|
30
|
-
export { Popover, PopoverAnchor, type PopoverAnchorProps, PopoverArrow, type PopoverArrowProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps };
|
|
12
|
+
declare function PopoverArrow({ className, ...props }: PopoverArrowProps): JSX.Element;
|
|
13
|
+
export { Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger };
|
|
14
|
+
export type { PopoverAnchorProps, PopoverArrowProps, PopoverContentProps, PopoverProps, PopoverTriggerProps, };
|
|
15
|
+
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/components/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAM5D,KAAK,YAAY,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC;AAEjE,iBAAS,OAAO,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAExD;AAMD,KAAK,mBAAmB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAE3E,iBAAS,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAEtE;AAMD,KAAK,kBAAkB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAEzE,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAEpE;AAMD,KAAK,mBAAmB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAE3E,iBAAS,cAAc,CAAC,EACtB,KAAgB,EAChB,SAAS,EACT,UAAc,EACd,GAAG,KAAK,EACT,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAenC;AAMD,KAAK,iBAAiB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAEvE,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAQ7E;AAMD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC;AAChF,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,GACpB,CAAC"}
|
|
@@ -1,41 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { cn } from "@codefast/tailwind-variants";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
5
|
-
//#region src/components/popover.tsx
|
|
6
5
|
function Popover({ ...props }) {
|
|
7
|
-
|
|
8
|
-
"data-slot": "popover",
|
|
9
|
-
...props
|
|
10
|
-
});
|
|
6
|
+
return _jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
11
7
|
}
|
|
12
8
|
function PopoverTrigger({ ...props }) {
|
|
13
|
-
|
|
14
|
-
"data-slot": "popover-trigger",
|
|
15
|
-
...props
|
|
16
|
-
});
|
|
9
|
+
return _jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
17
10
|
}
|
|
18
11
|
function PopoverAnchor({ ...props }) {
|
|
19
|
-
|
|
20
|
-
"data-slot": "popover-anchor",
|
|
21
|
-
...props
|
|
22
|
-
});
|
|
12
|
+
return _jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
23
13
|
}
|
|
24
14
|
function PopoverContent({ align = "center", className, sideOffset = 4, ...props }) {
|
|
25
|
-
|
|
26
|
-
align,
|
|
27
|
-
className: cn("z-50 min-w-32 origin-(--radix-popover-content-transform-origin) rounded-lg border bg-popover p-4 text-popover-foreground shadow-lg outline-hidden ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2", className),
|
|
28
|
-
"data-slot": "popover-content",
|
|
29
|
-
sideOffset,
|
|
30
|
-
...props
|
|
31
|
-
}) });
|
|
15
|
+
return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { align: align, className: cn("z-50 min-w-32 origin-(--radix-popover-content-transform-origin) rounded-lg border bg-popover p-4 text-popover-foreground shadow-lg outline-hidden ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2", className), "data-slot": "popover-content", sideOffset: sideOffset, ...props }) }));
|
|
32
16
|
}
|
|
33
17
|
function PopoverArrow({ className, ...props }) {
|
|
34
|
-
|
|
35
|
-
className: cn("fill-popover", className),
|
|
36
|
-
"data-slot": "popover-arrow",
|
|
37
|
-
...props
|
|
38
|
-
});
|
|
18
|
+
return (_jsx(PopoverPrimitive.Arrow, { className: cn("fill-popover", className), "data-slot": "popover-arrow", ...props }));
|
|
39
19
|
}
|
|
40
|
-
|
|
20
|
+
/* -----------------------------------------------------------------------------
|
|
21
|
+
* Exports
|
|
22
|
+
* -------------------------------------------------------------------------- */
|
|
41
23
|
export { Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger };
|
|
@@ -1,124 +1,107 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import type { VariantProps } from "@codefast/tailwind-variants";
|
|
2
|
+
import type { ComponentProps, JSX } from "react";
|
|
3
|
+
import * as ProgressCirclePrimitive from "#primitives/progress-circle";
|
|
4
|
+
declare const progressCircleVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
|
|
5
|
+
size: {
|
|
6
|
+
sm: {
|
|
7
|
+
label: string;
|
|
8
|
+
};
|
|
9
|
+
md: {
|
|
10
|
+
label: string;
|
|
11
|
+
};
|
|
12
|
+
lg: {
|
|
13
|
+
label: string;
|
|
14
|
+
};
|
|
15
|
+
xl: {
|
|
16
|
+
label: string;
|
|
17
|
+
};
|
|
18
|
+
"2xl": {
|
|
19
|
+
label: string;
|
|
20
|
+
};
|
|
11
21
|
};
|
|
12
|
-
|
|
13
|
-
|
|
22
|
+
thickness: {
|
|
23
|
+
regular: {};
|
|
24
|
+
thick: {};
|
|
25
|
+
thin: {};
|
|
14
26
|
};
|
|
15
|
-
|
|
16
|
-
|
|
27
|
+
variant: {
|
|
28
|
+
default: {
|
|
29
|
+
indicator: string;
|
|
30
|
+
track: string;
|
|
31
|
+
};
|
|
32
|
+
destructive: {
|
|
33
|
+
indicator: string;
|
|
34
|
+
track: string;
|
|
35
|
+
};
|
|
17
36
|
};
|
|
18
|
-
xl: {
|
|
19
|
-
label: string;
|
|
20
|
-
};
|
|
21
|
-
"2xl": {
|
|
22
|
-
label: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
thickness: {
|
|
26
|
-
regular: {};
|
|
27
|
-
thick: {};
|
|
28
|
-
thin: {};
|
|
29
|
-
};
|
|
30
|
-
variant: {
|
|
31
|
-
default: {
|
|
32
|
-
indicator: string;
|
|
33
|
-
track: string;
|
|
34
|
-
};
|
|
35
|
-
destructive: {
|
|
36
|
-
indicator: string;
|
|
37
|
-
track: string;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
37
|
}, {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
indicator: string;
|
|
39
|
+
label: string;
|
|
40
|
+
root: string;
|
|
41
|
+
svg: string;
|
|
42
|
+
track: string;
|
|
46
43
|
}>;
|
|
47
|
-
interface ProgressCircleProps extends Omit<ComponentProps<typeof
|
|
48
|
-
/**
|
|
49
|
-
* Enables animation effect when value changes
|
|
50
|
-
*/
|
|
51
|
-
animate?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Duration of the animation in milliseconds
|
|
54
|
-
*/
|
|
55
|
-
animationDuration?: number;
|
|
56
|
-
/**
|
|
57
|
-
* CSS class to customize the entire component
|
|
58
|
-
*/
|
|
59
|
-
className?: string;
|
|
60
|
-
/**
|
|
61
|
-
* CSS classes to customize specific parts of the component
|
|
62
|
-
*/
|
|
63
|
-
classNames?: {
|
|
44
|
+
interface ProgressCircleProps extends Omit<ComponentProps<typeof ProgressCirclePrimitive.Provider>, "children" | "size">, VariantProps<typeof progressCircleVariants> {
|
|
64
45
|
/**
|
|
65
|
-
*
|
|
46
|
+
* Enables animation effect when value changes
|
|
66
47
|
*/
|
|
67
|
-
|
|
48
|
+
animate?: boolean;
|
|
68
49
|
/**
|
|
69
|
-
*
|
|
50
|
+
* Duration of the animation in milliseconds
|
|
70
51
|
*/
|
|
71
|
-
|
|
52
|
+
animationDuration?: number;
|
|
53
|
+
/**
|
|
54
|
+
* CSS class to customize the entire component
|
|
55
|
+
*/
|
|
56
|
+
className?: string;
|
|
57
|
+
/**
|
|
58
|
+
* CSS classes to customize specific parts of the component
|
|
59
|
+
*/
|
|
60
|
+
classNames?: {
|
|
61
|
+
/**
|
|
62
|
+
* Class for the progress indicator
|
|
63
|
+
*/
|
|
64
|
+
indicator?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Class for the label in the center of the circle
|
|
67
|
+
*/
|
|
68
|
+
label?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Class for the root element of the component
|
|
71
|
+
*/
|
|
72
|
+
root?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Class for the SVG element
|
|
75
|
+
*/
|
|
76
|
+
svg?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Class for the circle track
|
|
79
|
+
*/
|
|
80
|
+
track?: string;
|
|
81
|
+
};
|
|
72
82
|
/**
|
|
73
|
-
*
|
|
83
|
+
* Custom function to render content in the center of the circle
|
|
84
|
+
* @param value - Current value of the component
|
|
85
|
+
* @returns React element to display in the center of the circle
|
|
74
86
|
*/
|
|
75
|
-
|
|
87
|
+
customLabel?: ({ value }: {
|
|
88
|
+
value: number;
|
|
89
|
+
}) => JSX.Element;
|
|
76
90
|
/**
|
|
77
|
-
*
|
|
91
|
+
* Display the numeric value in the center of the circle
|
|
78
92
|
*/
|
|
79
|
-
|
|
93
|
+
showValue?: boolean;
|
|
80
94
|
/**
|
|
81
|
-
*
|
|
95
|
+
* Custom size in pixels
|
|
96
|
+
* When provided, this value overrides the size variant option
|
|
82
97
|
*/
|
|
83
|
-
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Custom function to render content in the center of the circle
|
|
87
|
-
* @param value - Current value of the component
|
|
88
|
-
* @returns React element to display in the center of the circle
|
|
89
|
-
*/
|
|
90
|
-
customLabel?: ({
|
|
91
|
-
value
|
|
92
|
-
}: {
|
|
93
|
-
value: number;
|
|
94
|
-
}) => JSX.Element;
|
|
95
|
-
/**
|
|
96
|
-
* Display the numeric value in the center of the circle
|
|
97
|
-
*/
|
|
98
|
-
showValue?: boolean;
|
|
99
|
-
/**
|
|
100
|
-
* Custom size in pixels
|
|
101
|
-
* When provided, this value overrides the size variant option
|
|
102
|
-
*/
|
|
103
|
-
sizeInPixels?: number;
|
|
98
|
+
sizeInPixels?: number;
|
|
104
99
|
}
|
|
105
|
-
declare function ProgressCircle({
|
|
106
|
-
animate,
|
|
107
|
-
animationDuration,
|
|
108
|
-
className,
|
|
109
|
-
classNames,
|
|
110
|
-
customLabel,
|
|
111
|
-
showValue,
|
|
112
|
-
size,
|
|
113
|
-
sizeInPixels,
|
|
114
|
-
strokeWidth,
|
|
115
|
-
thickness,
|
|
116
|
-
value,
|
|
117
|
-
variant,
|
|
118
|
-
...props
|
|
119
|
-
}: ProgressCircleProps): JSX.Element;
|
|
100
|
+
declare function ProgressCircle({ animate, animationDuration, className, classNames, customLabel, showValue, size, sizeInPixels, strokeWidth, thickness, value, variant, ...props }: ProgressCircleProps): JSX.Element;
|
|
120
101
|
declare namespace ProgressCircle {
|
|
121
|
-
|
|
102
|
+
var displayName: string;
|
|
122
103
|
}
|
|
123
|
-
|
|
124
|
-
export { ProgressCircle
|
|
104
|
+
export { progressCircleVariants };
|
|
105
|
+
export { ProgressCircle };
|
|
106
|
+
export type { ProgressCircleProps };
|
|
107
|
+
//# sourceMappingURL=progress-circle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-circle.d.ts","sourceRoot":"","sources":["../../src/components/progress-circle.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAiB,GAAG,EAAE,MAAM,OAAO,CAAC;AAMhE,OAAO,KAAK,uBAAuB,MAAM,6BAA6B,CAAC;AAMvE,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2B1B,CAAC;AAMH,UAAU,mBACR,SACE,IAAI,CAAC,cAAc,CAAC,OAAO,uBAAuB,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC,EAClF,YAAY,CAAC,OAAO,sBAAsB,CAAC;IAC7C;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EAAE;QACX;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IAEF;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IAE5D;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,iBAAS,cAAc,CAAC,EACtB,OAAc,EACd,iBAAwB,EACxB,SAAS,EACT,UAAU,EACV,WAAW,EACX,SAAiB,EACjB,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,SAAqB,EACrB,KAAS,EACT,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAyDnC;kBAvEQ,cAAc;;;AAkHvB,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
|