@codefast/ui 0.3.10 → 0.3.11-canary.1
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 +32 -0
- package/README.md +277 -167
- package/dist/components/accordion.d.ts +4 -4
- package/dist/components/accordion.js +5 -5
- package/dist/components/alert-dialog.d.ts +11 -11
- package/dist/components/alert-dialog.js +9 -9
- package/dist/components/alert.d.ts +5 -5
- package/dist/components/alert.js +5 -5
- package/dist/components/aspect-ratio.d.ts +2 -2
- package/dist/components/avatar.d.ts +2 -2
- package/dist/components/avatar.js +3 -3
- package/dist/components/badge.d.ts +3 -3
- package/dist/components/badge.js +7 -7
- package/dist/components/breadcrumb.d.ts +8 -8
- package/dist/components/breadcrumb.js +6 -8
- package/dist/components/button-group.d.ts +5 -5
- package/dist/components/button-group.js +8 -8
- package/dist/components/button.d.ts +6 -6
- package/dist/components/button.js +17 -17
- package/dist/components/calendar.d.ts +5 -5
- package/dist/components/calendar.js +35 -35
- package/dist/components/card.d.ts +8 -8
- package/dist/components/card.js +7 -7
- package/dist/components/carousel.d.ts +10 -10
- package/dist/components/carousel.js +20 -20
- package/dist/components/chart.d.ts +12 -11
- package/dist/components/chart.js +42 -42
- package/dist/components/checkbox-cards.d.ts +2 -2
- package/dist/components/checkbox-cards.js +2 -2
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group.js +2 -2
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +1 -1
- package/dist/components/collapsible.d.ts +2 -2
- package/dist/components/command.d.ts +4 -4
- package/dist/components/command.js +10 -10
- package/dist/components/context-menu.d.ts +4 -4
- package/dist/components/context-menu.js +10 -10
- package/dist/components/dialog.d.ts +10 -10
- package/dist/components/dialog.js +12 -12
- package/dist/components/drawer.d.ts +9 -9
- package/dist/components/drawer.js +9 -9
- package/dist/components/dropdown-menu.d.ts +4 -4
- package/dist/components/dropdown-menu.js +10 -10
- package/dist/components/empty.d.ts +9 -9
- package/dist/components/empty.js +10 -10
- package/dist/components/field.d.ts +14 -14
- package/dist/components/field.js +17 -17
- package/dist/components/form.d.ts +10 -10
- package/dist/components/form.js +8 -8
- package/dist/components/hover-card.d.ts +2 -2
- package/dist/components/hover-card.js +3 -3
- package/dist/components/input-group.d.ts +15 -15
- package/dist/components/input-group.js +20 -20
- package/dist/components/input-number.d.ts +2 -2
- package/dist/components/input-number.js +7 -7
- package/dist/components/input-otp.d.ts +6 -6
- package/dist/components/input-otp.js +4 -4
- package/dist/components/input-password.d.ts +3 -3
- package/dist/components/input-password.js +6 -6
- package/dist/components/input-search.d.ts +3 -3
- package/dist/components/input-search.js +4 -4
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +1 -1
- package/dist/components/item.d.ts +12 -12
- package/dist/components/item.js +23 -23
- package/dist/components/kbd.d.ts +3 -3
- package/dist/components/kbd.js +2 -2
- package/dist/components/label.d.ts +2 -2
- package/dist/components/label.js +1 -1
- package/dist/components/menubar.d.ts +4 -4
- package/dist/components/menubar.js +13 -13
- package/dist/components/native-select.d.ts +4 -4
- package/dist/components/native-select.js +2 -2
- package/dist/components/navigation-menu.d.ts +2 -2
- package/dist/components/navigation-menu.js +10 -10
- package/dist/components/pagination.d.ts +10 -10
- package/dist/components/pagination.js +6 -6
- package/dist/components/popover.d.ts +3 -3
- package/dist/components/popover.js +3 -3
- package/dist/components/progress-circle.d.ts +5 -5
- package/dist/components/progress-circle.js +22 -22
- package/dist/components/progress.d.ts +2 -2
- package/dist/components/progress.js +2 -2
- package/dist/components/radio-cards.d.ts +2 -2
- package/dist/components/radio-cards.js +3 -3
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +3 -3
- package/dist/components/radio.d.ts +2 -2
- package/dist/components/radio.js +1 -1
- package/dist/components/resizable.d.ts +2 -2
- package/dist/components/resizable.js +3 -3
- package/dist/components/scroll-area.d.ts +5 -5
- package/dist/components/scroll-area.js +31 -31
- package/dist/components/select.d.ts +5 -5
- package/dist/components/select.js +9 -9
- package/dist/components/separator.d.ts +5 -5
- package/dist/components/separator.js +9 -9
- package/dist/components/sheet.d.ts +9 -9
- package/dist/components/sheet.js +17 -17
- package/dist/components/sidebar.d.ts +31 -31
- package/dist/components/sidebar.js +65 -65
- package/dist/components/skeleton.d.ts +2 -2
- package/dist/components/skeleton.js +1 -1
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +4 -4
- package/dist/components/sonner.d.ts +3 -3
- package/dist/components/sonner.js +4 -4
- package/dist/components/spinner.d.ts +2 -2
- package/dist/components/spinner.js +5 -5
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/switch.js +2 -2
- package/dist/components/table.d.ts +9 -9
- package/dist/components/table.js +8 -8
- package/dist/components/tabs.d.ts +2 -2
- package/dist/components/tabs.js +4 -4
- package/dist/components/textarea.d.ts +2 -2
- package/dist/components/textarea.js +1 -1
- package/dist/components/toggle-group.d.ts +4 -4
- package/dist/components/toggle-group.js +5 -5
- package/dist/components/toggle.d.ts +3 -3
- package/dist/components/toggle.js +8 -8
- package/dist/components/tooltip.d.ts +3 -3
- package/dist/components/tooltip.js +2 -2
- package/dist/css/preset.css +4 -4
- package/dist/css/style.css +3 -3
- package/dist/hooks/use-copy-to-clipboard.d.ts +1 -1
- package/dist/hooks/use-copy-to-clipboard.js +1 -1
- package/dist/hooks/use-media-query.js +3 -3
- package/dist/hooks/use-mutation-observer.d.ts +1 -1
- package/dist/hooks/use-pagination.js +1 -1
- package/dist/index.d.ts +130 -130
- package/dist/primitives/checkbox-group.d.ts +11 -11
- package/dist/primitives/checkbox-group.js +3 -3
- package/dist/primitives/input-number.d.ts +8 -8
- package/dist/primitives/input-number.js +46 -46
- package/dist/primitives/input.d.ts +4 -4
- package/dist/primitives/input.js +7 -7
- package/dist/primitives/progress-circle.d.ts +7 -7
- package/dist/primitives/progress-circle.js +8 -8
- package/package.json +111 -189
- package/dist/components/accordion.cjs +0 -98
- package/dist/components/alert-dialog.cjs +0 -156
- package/dist/components/alert.cjs +0 -84
- package/dist/components/aspect-ratio.cjs +0 -44
- package/dist/components/avatar.cjs +0 -66
- package/dist/components/badge.cjs +0 -67
- package/dist/components/breadcrumb.cjs +0 -127
- package/dist/components/button-group.cjs +0 -87
- package/dist/components/button.cjs +0 -92
- package/dist/components/calendar.cjs +0 -151
- package/dist/components/card.cjs +0 -105
- package/dist/components/carousel.cjs +0 -211
- package/dist/components/chart.cjs +0 -251
- package/dist/components/checkbox-cards.cjs +0 -70
- package/dist/components/checkbox-group.cjs +0 -64
- package/dist/components/checkbox.cjs +0 -54
- package/dist/components/collapsible.cjs +0 -62
- package/dist/components/command.cjs +0 -168
- package/dist/components/context-menu.cjs +0 -219
- package/dist/components/dialog.cjs +0 -165
- package/dist/components/drawer.cjs +0 -144
- package/dist/components/dropdown-menu.cjs +0 -222
- package/dist/components/empty.cjs +0 -113
- package/dist/components/field.cjs +0 -194
- package/dist/components/form.cjs +0 -152
- package/dist/components/hover-card.cjs +0 -78
- package/dist/components/input-group.cjs +0 -156
- package/dist/components/input-number.cjs +0 -99
- package/dist/components/input-otp.cjs +0 -102
- package/dist/components/input-password.cjs +0 -72
- package/dist/components/input-search.cjs +0 -81
- package/dist/components/input.cjs +0 -46
- package/dist/components/item.cjs +0 -186
- package/dist/components/kbd.cjs +0 -54
- package/dist/components/label.cjs +0 -46
- package/dist/components/menubar.cjs +0 -233
- package/dist/components/native-select.cjs +0 -75
- package/dist/components/navigation-menu.cjs +0 -146
- package/dist/components/pagination.cjs +0 -138
- package/dist/components/popover.cjs +0 -87
- package/dist/components/progress-circle.cjs +0 -185
- package/dist/components/progress.cjs +0 -53
- package/dist/components/radio-cards.cjs +0 -67
- package/dist/components/radio-group.cjs +0 -60
- package/dist/components/radio.cjs +0 -48
- package/dist/components/resizable.cjs +0 -72
- package/dist/components/scroll-area.cjs +0 -141
- package/dist/components/select.cjs +0 -181
- package/dist/components/separator.cjs +0 -83
- package/dist/components/sheet.cjs +0 -185
- package/dist/components/sidebar.cjs +0 -507
- package/dist/components/skeleton.cjs +0 -44
- package/dist/components/slider.cjs +0 -80
- package/dist/components/sonner.cjs +0 -58
- package/dist/components/spinner.cjs +0 -76
- package/dist/components/switch.cjs +0 -50
- package/dist/components/table.cjs +0 -118
- package/dist/components/tabs.cjs +0 -76
- package/dist/components/textarea.cjs +0 -44
- package/dist/components/toggle-group.cjs +0 -91
- package/dist/components/toggle.cjs +0 -72
- package/dist/components/tooltip.cjs +0 -91
- package/dist/hooks/use-animated-value.cjs +0 -75
- package/dist/hooks/use-copy-to-clipboard.cjs +0 -58
- package/dist/hooks/use-is-mobile.cjs +0 -40
- package/dist/hooks/use-media-query.cjs +0 -57
- package/dist/hooks/use-mutation-observer.cjs +0 -57
- package/dist/hooks/use-pagination.cjs +0 -93
- package/dist/index.cjs +0 -1081
- package/dist/primitives/checkbox-group.cjs +0 -151
- package/dist/primitives/input-number.cjs +0 -439
- package/dist/primitives/input.cjs +0 -99
- package/dist/primitives/progress-circle.cjs +0 -199
package/dist/components/item.js
CHANGED
|
@@ -3,39 +3,39 @@ import { cn, tv } from "@codefast/tailwind-variants";
|
|
|
3
3
|
import { Slot } from "@radix-ui/react-slot";
|
|
4
4
|
import { Separator } from "./separator.js";
|
|
5
5
|
const itemVariants = tv({
|
|
6
|
-
base: cn(
|
|
6
|
+
base: cn("group/item flex flex-wrap items-center rounded-lg border border-transparent text-sm outline-hidden transition-colors duration-100", "[a]:transition-colors [a]:hover:bg-accent/50", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50"),
|
|
7
7
|
defaultVariants: {
|
|
8
|
-
size:
|
|
9
|
-
variant:
|
|
8
|
+
size: "default",
|
|
9
|
+
variant: "default"
|
|
10
10
|
},
|
|
11
11
|
variants: {
|
|
12
12
|
size: {
|
|
13
|
-
default:
|
|
14
|
-
sm:
|
|
13
|
+
default: "gap-4 p-4",
|
|
14
|
+
sm: "gap-2.5 px-4 py-3"
|
|
15
15
|
},
|
|
16
16
|
variant: {
|
|
17
|
-
default:
|
|
18
|
-
muted:
|
|
19
|
-
outline:
|
|
17
|
+
default: "bg-transparent",
|
|
18
|
+
muted: "bg-muted/50",
|
|
19
|
+
outline: "border-border"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
const itemMediaVariants = tv({
|
|
24
|
-
base: cn("group-has-[[data-slot=item-description]]/item:self-start
|
|
24
|
+
base: cn("flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start", "group-has-[[data-slot=item-description]]/item:translate-y-0.5 [&_svg]:pointer-events-none"),
|
|
25
25
|
defaultVariants: {
|
|
26
|
-
variant:
|
|
26
|
+
variant: "default"
|
|
27
27
|
},
|
|
28
28
|
variants: {
|
|
29
29
|
variant: {
|
|
30
|
-
default:
|
|
30
|
+
default: "bg-transparent",
|
|
31
31
|
icon: "size-8 shrink-0 rounded-md border bg-muted [&_svg:not([class*='size-'])]:size-4",
|
|
32
|
-
image:
|
|
32
|
+
image: "size-10 shrink-0 overflow-hidden rounded-md [&_img]:size-full [&_img]:object-cover"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
function ItemGroup({ className, ...props }) {
|
|
37
37
|
return /*#__PURE__*/ jsx("div", {
|
|
38
|
-
className: cn(
|
|
38
|
+
className: cn("group/item-group flex flex-col", className),
|
|
39
39
|
"data-slot": "item-group",
|
|
40
40
|
role: "list",
|
|
41
41
|
...props
|
|
@@ -43,14 +43,14 @@ function ItemGroup({ className, ...props }) {
|
|
|
43
43
|
}
|
|
44
44
|
function ItemSeparator({ className, ...props }) {
|
|
45
45
|
return /*#__PURE__*/ jsx(Separator, {
|
|
46
|
-
className: cn(
|
|
46
|
+
className: cn("my-0", className),
|
|
47
47
|
"data-slot": "item-separator",
|
|
48
48
|
orientation: "horizontal",
|
|
49
49
|
...props
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
function Item({ asChild = false, className, size =
|
|
53
|
-
const Component = asChild ? Slot :
|
|
52
|
+
function Item({ asChild = false, className, size = "default", variant = "default", ...props }) {
|
|
53
|
+
const Component = asChild ? Slot : "div";
|
|
54
54
|
return /*#__PURE__*/ jsx(Component, {
|
|
55
55
|
className: itemVariants({
|
|
56
56
|
className,
|
|
@@ -63,7 +63,7 @@ function Item({ asChild = false, className, size = 'default', variant = 'default
|
|
|
63
63
|
...props
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
-
function ItemMedia({ className, variant =
|
|
66
|
+
function ItemMedia({ className, variant = "default", ...props }) {
|
|
67
67
|
return /*#__PURE__*/ jsx("div", {
|
|
68
68
|
className: itemMediaVariants({
|
|
69
69
|
className,
|
|
@@ -76,42 +76,42 @@ function ItemMedia({ className, variant = 'default', ...props }) {
|
|
|
76
76
|
}
|
|
77
77
|
function ItemContent({ className, ...props }) {
|
|
78
78
|
return /*#__PURE__*/ jsx("div", {
|
|
79
|
-
className: cn(
|
|
79
|
+
className: cn("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none", className),
|
|
80
80
|
"data-slot": "item-content",
|
|
81
81
|
...props
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
function ItemTitle({ className, ...props }) {
|
|
85
85
|
return /*#__PURE__*/ jsx("div", {
|
|
86
|
-
className: cn(
|
|
86
|
+
className: cn("flex w-fit items-center gap-2 text-sm leading-snug font-medium", className),
|
|
87
87
|
"data-slot": "item-title",
|
|
88
88
|
...props
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
91
|
function ItemDescription({ className, ...props }) {
|
|
92
92
|
return /*#__PURE__*/ jsx("p", {
|
|
93
|
-
className: cn(
|
|
93
|
+
className: cn("line-clamp-2 text-sm leading-normal font-normal text-balance text-muted-foreground", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
|
|
94
94
|
"data-slot": "item-description",
|
|
95
95
|
...props
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
function ItemActions({ className, ...props }) {
|
|
99
99
|
return /*#__PURE__*/ jsx("div", {
|
|
100
|
-
className: cn(
|
|
100
|
+
className: cn("flex items-center gap-2", className),
|
|
101
101
|
"data-slot": "item-actions",
|
|
102
102
|
...props
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
function ItemHeader({ className, ...props }) {
|
|
106
106
|
return /*#__PURE__*/ jsx("div", {
|
|
107
|
-
className: cn(
|
|
107
|
+
className: cn("flex basis-full items-center justify-between gap-2", className),
|
|
108
108
|
"data-slot": "item-header",
|
|
109
109
|
...props
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
function ItemFooter({ className, ...props }) {
|
|
113
113
|
return /*#__PURE__*/ jsx("div", {
|
|
114
|
-
className: cn(
|
|
114
|
+
className: cn("flex basis-full items-center justify-between gap-2", className),
|
|
115
115
|
"data-slot": "item-footer",
|
|
116
116
|
...props
|
|
117
117
|
});
|
package/dist/components/kbd.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
type KbdProps = ComponentProps<
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
|
+
type KbdProps = ComponentProps<"kbd">;
|
|
3
3
|
declare function Kbd({ className, ...props }: KbdProps): JSX.Element;
|
|
4
|
-
type KbdGroupProps = ComponentProps<
|
|
4
|
+
type KbdGroupProps = ComponentProps<"kbd">;
|
|
5
5
|
declare function KbdGroup({ className, ...props }: KbdGroupProps): JSX.Element;
|
|
6
6
|
export { Kbd, KbdGroup };
|
|
7
7
|
export type { KbdGroupProps, KbdProps };
|
package/dist/components/kbd.js
CHANGED
|
@@ -2,14 +2,14 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { cn } from "@codefast/tailwind-variants";
|
|
3
3
|
function Kbd({ className, ...props }) {
|
|
4
4
|
return /*#__PURE__*/ jsx("kbd", {
|
|
5
|
-
className: cn(
|
|
5
|
+
className: cn("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-md bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none", "[&_svg:not([class*='size-'])]:size-3", "[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10", className),
|
|
6
6
|
"data-slot": "kbd",
|
|
7
7
|
...props
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
function KbdGroup({ className, ...props }) {
|
|
11
11
|
return /*#__PURE__*/ jsx("kbd", {
|
|
12
|
-
className: cn(
|
|
12
|
+
className: cn("inline-flex items-center gap-1", className),
|
|
13
13
|
"data-slot": "kbd-group",
|
|
14
14
|
...props
|
|
15
15
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
import * as LabelPrimitive from
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
3
|
type LabelProps = ComponentProps<typeof LabelPrimitive.Root>;
|
|
4
4
|
declare function Label({ className, ...props }: LabelProps): JSX.Element;
|
|
5
5
|
export { Label };
|
package/dist/components/label.js
CHANGED
|
@@ -4,7 +4,7 @@ import { cn } from "@codefast/tailwind-variants";
|
|
|
4
4
|
import { Root } from "@radix-ui/react-label";
|
|
5
5
|
function Label({ className, ...props }) {
|
|
6
6
|
return /*#__PURE__*/ jsx(Root, {
|
|
7
|
-
className: cn(
|
|
7
|
+
className: cn("inline-block text-sm leading-none font-medium group-data-disabled:opacity-50 peer-disabled:opacity-50 peer-aria-invalid:text-destructive peer-data-disabled:opacity-50 data-invalid:text-destructive", className),
|
|
8
8
|
"data-slot": "label",
|
|
9
9
|
...props
|
|
10
10
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
import * as MenubarPrimitive from
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
|
+
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
3
3
|
type MenubarProps = ComponentProps<typeof MenubarPrimitive.Root>;
|
|
4
4
|
declare function Menubar({ className, ...props }: MenubarProps): JSX.Element;
|
|
5
5
|
type MenubarMenuProps = ComponentProps<typeof MenubarPrimitive.Menu>;
|
|
@@ -22,7 +22,7 @@ type MenubarContentProps = ComponentProps<typeof MenubarPrimitive.Content>;
|
|
|
22
22
|
declare function MenubarContent({ align, alignOffset, className, sideOffset, ...props }: MenubarContentProps): JSX.Element;
|
|
23
23
|
interface MenubarItemProps extends ComponentProps<typeof MenubarPrimitive.Item> {
|
|
24
24
|
inset?: boolean;
|
|
25
|
-
variant?:
|
|
25
|
+
variant?: "default" | "destructive";
|
|
26
26
|
}
|
|
27
27
|
declare function MenubarItem({ className, inset, variant, ...props }: MenubarItemProps): JSX.Element;
|
|
28
28
|
type MenubarCheckboxItemProps = ComponentProps<typeof MenubarPrimitive.CheckboxItem>;
|
|
@@ -35,7 +35,7 @@ interface MenubarLabelProps extends ComponentProps<typeof MenubarPrimitive.Label
|
|
|
35
35
|
declare function MenubarLabel({ className, inset, ...props }: MenubarLabelProps): JSX.Element;
|
|
36
36
|
type MenubarSeparatorProps = ComponentProps<typeof MenubarPrimitive.Separator>;
|
|
37
37
|
declare function MenubarSeparator({ className, ...props }: MenubarSeparatorProps): JSX.Element;
|
|
38
|
-
type MenubarShortcutProps = ComponentProps<
|
|
38
|
+
type MenubarShortcutProps = ComponentProps<"span">;
|
|
39
39
|
declare function MenubarShortcut({ className, ...props }: MenubarShortcutProps): JSX.Element;
|
|
40
40
|
type MenubarArrowProps = ComponentProps<typeof MenubarPrimitive.Arrow>;
|
|
41
41
|
declare function MenubarArrow({ className, ...props }: MenubarArrowProps): JSX.Element;
|
|
@@ -5,7 +5,7 @@ import { Arrow, CheckboxItem, Content, Group, Item, ItemIndicator, Label, Menu,
|
|
|
5
5
|
import { CheckIcon, ChevronRightIcon, DotIcon } from "lucide-react";
|
|
6
6
|
function Menubar({ className, ...props }) {
|
|
7
7
|
return /*#__PURE__*/ jsx(Root, {
|
|
8
|
-
className: cn(
|
|
8
|
+
className: cn("flex items-center space-x-1 rounded-lg border bg-background p-1", className),
|
|
9
9
|
"data-slot": "menubar",
|
|
10
10
|
...props
|
|
11
11
|
});
|
|
@@ -36,14 +36,14 @@ function MenubarRadioGroup({ ...props }) {
|
|
|
36
36
|
}
|
|
37
37
|
function MenubarTrigger({ className, ...props }) {
|
|
38
38
|
return /*#__PURE__*/ jsx(Trigger, {
|
|
39
|
-
className: cn(
|
|
39
|
+
className: cn("flex items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", className),
|
|
40
40
|
"data-slot": "menubar-trigger",
|
|
41
41
|
...props
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
function MenubarSubTrigger({ children, className, inset, ...props }) {
|
|
45
45
|
return /*#__PURE__*/ jsxs(SubTrigger, {
|
|
46
|
-
className: cn(
|
|
46
|
+
className: cn("flex cursor-default items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", className),
|
|
47
47
|
"data-inset": inset,
|
|
48
48
|
"data-slot": "menubar-sub-trigger",
|
|
49
49
|
...props,
|
|
@@ -58,18 +58,18 @@ function MenubarSubTrigger({ children, className, inset, ...props }) {
|
|
|
58
58
|
function MenubarSubContent({ className, ...props }) {
|
|
59
59
|
return /*#__PURE__*/ jsx(Portal, {
|
|
60
60
|
children: /*#__PURE__*/ jsx(SubContent, {
|
|
61
|
-
className: cn(
|
|
61
|
+
className: cn("z-50 min-w-32 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg 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),
|
|
62
62
|
"data-slot": "menubar-sub-content",
|
|
63
63
|
...props
|
|
64
64
|
})
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
function MenubarContent({ align =
|
|
67
|
+
function MenubarContent({ align = "start", alignOffset = -4, className, sideOffset = 4, ...props }) {
|
|
68
68
|
return /*#__PURE__*/ jsx(Portal, {
|
|
69
69
|
children: /*#__PURE__*/ jsx(Content, {
|
|
70
70
|
align: align,
|
|
71
71
|
alignOffset: alignOffset,
|
|
72
|
-
className: cn(
|
|
72
|
+
className: cn("z-50 min-w-32 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg ease-ui 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),
|
|
73
73
|
"data-slot": "menubar-content",
|
|
74
74
|
sideOffset: sideOffset,
|
|
75
75
|
...props
|
|
@@ -78,7 +78,7 @@ function MenubarContent({ align = 'start', alignOffset = -4, className, sideOffs
|
|
|
78
78
|
}
|
|
79
79
|
function MenubarItem({ className, inset, variant, ...props }) {
|
|
80
80
|
return /*#__PURE__*/ jsx(Item, {
|
|
81
|
-
className: cn("focus:bg-accent focus:text-accent-foreground
|
|
81
|
+
className: cn("group/menubar-item relative flex cursor-default items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground aria-disabled:opacity-50 data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 [&_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),
|
|
82
82
|
"data-inset": inset,
|
|
83
83
|
"data-slot": "menubar-item",
|
|
84
84
|
"data-variant": variant,
|
|
@@ -88,7 +88,7 @@ function MenubarItem({ className, inset, variant, ...props }) {
|
|
|
88
88
|
function MenubarCheckboxItem({ checked, children, className, ...props }) {
|
|
89
89
|
return /*#__PURE__*/ jsxs(CheckboxItem, {
|
|
90
90
|
checked: checked,
|
|
91
|
-
className: cn("
|
|
91
|
+
className: cn("group/menubar-item relative flex cursor-default items-center gap-x-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
92
92
|
"data-slot": "menubar-checkbox-item",
|
|
93
93
|
...props,
|
|
94
94
|
children: [
|
|
@@ -106,7 +106,7 @@ function MenubarCheckboxItem({ checked, children, className, ...props }) {
|
|
|
106
106
|
}
|
|
107
107
|
function MenubarRadioItem({ children, className, ...props }) {
|
|
108
108
|
return /*#__PURE__*/ jsxs(RadioItem, {
|
|
109
|
-
className: cn("
|
|
109
|
+
className: cn("group/menubar-item relative flex cursor-default items-center gap-x-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
110
110
|
"data-slot": "menubar-radio-item",
|
|
111
111
|
...props,
|
|
112
112
|
children: [
|
|
@@ -124,7 +124,7 @@ function MenubarRadioItem({ children, className, ...props }) {
|
|
|
124
124
|
}
|
|
125
125
|
function MenubarLabel({ className, inset, ...props }) {
|
|
126
126
|
return /*#__PURE__*/ jsx(Label, {
|
|
127
|
-
className: cn(
|
|
127
|
+
className: cn("flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold data-inset:pl-8", className),
|
|
128
128
|
"data-inset": inset,
|
|
129
129
|
"data-slot": "menubar-label",
|
|
130
130
|
...props
|
|
@@ -132,21 +132,21 @@ function MenubarLabel({ className, inset, ...props }) {
|
|
|
132
132
|
}
|
|
133
133
|
function MenubarSeparator({ className, ...props }) {
|
|
134
134
|
return /*#__PURE__*/ jsx(Separator, {
|
|
135
|
-
className: cn(
|
|
135
|
+
className: cn("mx-2 my-1 h-px bg-border", className),
|
|
136
136
|
"data-slot": "menubar-separator",
|
|
137
137
|
...props
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
140
|
function MenubarShortcut({ className, ...props }) {
|
|
141
141
|
return /*#__PURE__*/ jsx("span", {
|
|
142
|
-
className: cn(
|
|
142
|
+
className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-data-[variant=destructive]/menubar-item:text-destructive/80", className),
|
|
143
143
|
"data-slot": "menubar-shortcut",
|
|
144
144
|
...props
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
147
|
function MenubarArrow({ className, ...props }) {
|
|
148
148
|
return /*#__PURE__*/ jsx(Arrow, {
|
|
149
|
-
className: cn(
|
|
149
|
+
className: cn("fill-popover", className),
|
|
150
150
|
"data-slot": "menubar-arrow",
|
|
151
151
|
...props
|
|
152
152
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
type NativeSelectProps = ComponentProps<
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
|
+
type NativeSelectProps = ComponentProps<"select">;
|
|
3
3
|
declare function NativeSelect({ className, ...props }: NativeSelectProps): JSX.Element;
|
|
4
|
-
type NativeSelectOptionProps = ComponentProps<
|
|
4
|
+
type NativeSelectOptionProps = ComponentProps<"option">;
|
|
5
5
|
declare function NativeSelectOption({ ...props }: NativeSelectOptionProps): JSX.Element;
|
|
6
|
-
type NativeSelectOptGroupProps = ComponentProps<
|
|
6
|
+
type NativeSelectOptGroupProps = ComponentProps<"optgroup">;
|
|
7
7
|
declare function NativeSelectOptGroup({ className, ...props }: NativeSelectOptGroupProps): JSX.Element;
|
|
8
8
|
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|
|
9
9
|
export type { NativeSelectOptGroupProps, NativeSelectOptionProps, NativeSelectProps };
|
|
@@ -7,13 +7,13 @@ function NativeSelect({ className, ...props }) {
|
|
|
7
7
|
"data-slot": "native-select-wrapper",
|
|
8
8
|
children: [
|
|
9
9
|
/*#__PURE__*/ jsx("select", {
|
|
10
|
-
className: cn(
|
|
10
|
+
className: cn("h-9 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed dark:bg-input/30 dark:hover:bg-input/50", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", className),
|
|
11
11
|
"data-slot": "native-select",
|
|
12
12
|
...props
|
|
13
13
|
}),
|
|
14
14
|
/*#__PURE__*/ jsx(ChevronDownIcon, {
|
|
15
15
|
"aria-hidden": "true",
|
|
16
|
-
className: "
|
|
16
|
+
className: "pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 text-muted-foreground opacity-50 select-none",
|
|
17
17
|
"data-slot": "native-select-icon"
|
|
18
18
|
})
|
|
19
19
|
]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
import * as NavigationMenuPrimitive from
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
|
+
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
3
3
|
declare const navigationMenuTriggerVariants: import("@codefast/tailwind-variants").VariantFunctionType<import("@codefast/tailwind-variants").ConfigurationSchema, Record<string, never>>;
|
|
4
4
|
interface NavigationMenuProps extends ComponentProps<typeof NavigationMenuPrimitive.Root> {
|
|
5
5
|
viewport?: boolean;
|
|
@@ -5,13 +5,13 @@ import { ChevronDownIcon } from "lucide-react";
|
|
|
5
5
|
import { buttonVariants } from "./button.js";
|
|
6
6
|
const navigationMenuTriggerVariants = tv({
|
|
7
7
|
base: buttonVariants({
|
|
8
|
-
className:
|
|
9
|
-
variant:
|
|
8
|
+
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",
|
|
9
|
+
variant: "ghost"
|
|
10
10
|
})
|
|
11
11
|
});
|
|
12
12
|
function NavigationMenu({ children, className, viewport = true, ...props }) {
|
|
13
13
|
return /*#__PURE__*/ jsxs(Root, {
|
|
14
|
-
className: cn(
|
|
14
|
+
className: cn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", className),
|
|
15
15
|
"data-slot": "navigation-menu",
|
|
16
16
|
"data-viewport": viewport,
|
|
17
17
|
...props,
|
|
@@ -23,7 +23,7 @@ function NavigationMenu({ children, className, viewport = true, ...props }) {
|
|
|
23
23
|
}
|
|
24
24
|
function NavigationMenuList({ children, className, ...props }) {
|
|
25
25
|
return /*#__PURE__*/ jsxs(List, {
|
|
26
|
-
className: cn(
|
|
26
|
+
className: cn("flex flex-1 list-none items-center justify-center gap-1", className),
|
|
27
27
|
"data-slot": "navigation-menu-list",
|
|
28
28
|
...props,
|
|
29
29
|
children: [
|
|
@@ -36,7 +36,7 @@ function NavigationMenuList({ children, className, ...props }) {
|
|
|
36
36
|
}
|
|
37
37
|
function NavigationMenuItem({ className, ...props }) {
|
|
38
38
|
return /*#__PURE__*/ jsx(Item, {
|
|
39
|
-
className: cn(
|
|
39
|
+
className: cn("group-data-[viewport=false]/navigation-menu:relative", className),
|
|
40
40
|
"data-slot": "navigation-menu-item",
|
|
41
41
|
...props
|
|
42
42
|
});
|
|
@@ -59,14 +59,14 @@ function NavigationMenuTrigger({ children, className, ...props }) {
|
|
|
59
59
|
}
|
|
60
60
|
function NavigationMenuContent({ className, ...props }) {
|
|
61
61
|
return /*#__PURE__*/ jsx(Content, {
|
|
62
|
-
className: cn(
|
|
62
|
+
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),
|
|
63
63
|
"data-slot": "navigation-menu-content",
|
|
64
64
|
...props
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
function NavigationMenuLink({ className, ...props }) {
|
|
68
68
|
return /*#__PURE__*/ jsx(Link, {
|
|
69
|
-
className: cn("
|
|
69
|
+
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),
|
|
70
70
|
"data-slot": "navigation-menu-link",
|
|
71
71
|
...props
|
|
72
72
|
});
|
|
@@ -75,7 +75,7 @@ function NavigationMenuViewport({ className, ...props }) {
|
|
|
75
75
|
return /*#__PURE__*/ jsx("div", {
|
|
76
76
|
className: "absolute top-full left-0 z-30 flex justify-center perspective-distant",
|
|
77
77
|
children: /*#__PURE__*/ jsx(Viewport, {
|
|
78
|
-
className: cn(
|
|
78
|
+
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),
|
|
79
79
|
"data-slot": "navigation-menu-viewport",
|
|
80
80
|
...props
|
|
81
81
|
})
|
|
@@ -83,11 +83,11 @@ function NavigationMenuViewport({ className, ...props }) {
|
|
|
83
83
|
}
|
|
84
84
|
function NavigationMenuIndicator({ className, ...props }) {
|
|
85
85
|
return /*#__PURE__*/ jsx(Indicator, {
|
|
86
|
-
className: cn(
|
|
86
|
+
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),
|
|
87
87
|
"data-slot": "navigation-menu-indicator",
|
|
88
88
|
...props,
|
|
89
89
|
children: /*#__PURE__*/ jsx("div", {
|
|
90
|
-
className: "
|
|
90
|
+
className: "relative top-[60%] size-2.5 rotate-45 rounded-tl-xs bg-popover text-popover-foreground"
|
|
91
91
|
})
|
|
92
92
|
});
|
|
93
93
|
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import type { VariantProps } from
|
|
2
|
-
import type { ComponentProps, JSX } from
|
|
3
|
-
import { buttonVariants } from
|
|
4
|
-
type PaginationProps = ComponentProps<
|
|
1
|
+
import type { VariantProps } from "@codefast/tailwind-variants";
|
|
2
|
+
import type { ComponentProps, JSX } from "react";
|
|
3
|
+
import { buttonVariants } from "./button";
|
|
4
|
+
type PaginationProps = ComponentProps<"nav">;
|
|
5
5
|
declare function Pagination({ className, ...props }: PaginationProps): JSX.Element;
|
|
6
|
-
type PaginationContentProps = ComponentProps<
|
|
6
|
+
type PaginationContentProps = ComponentProps<"ul">;
|
|
7
7
|
declare function PaginationContent({ className, ...props }: PaginationContentProps): JSX.Element;
|
|
8
|
-
type PaginationItemProps = ComponentProps<
|
|
8
|
+
type PaginationItemProps = ComponentProps<"li">;
|
|
9
9
|
declare function PaginationItem(props: PaginationItemProps): JSX.Element;
|
|
10
|
-
interface PaginationLinkProps extends ComponentProps<
|
|
10
|
+
interface PaginationLinkProps extends ComponentProps<"a">, Pick<VariantProps<typeof buttonVariants>, "size"> {
|
|
11
11
|
isActive?: boolean;
|
|
12
12
|
}
|
|
13
13
|
declare function PaginationLink({ children, className, isActive, size, ...props }: PaginationLinkProps): JSX.Element;
|
|
14
|
-
interface PaginationPreviousProps extends ComponentProps<
|
|
14
|
+
interface PaginationPreviousProps extends ComponentProps<"a">, Pick<VariantProps<typeof buttonVariants>, "size"> {
|
|
15
15
|
isActive?: boolean;
|
|
16
16
|
}
|
|
17
17
|
declare function PaginationPrevious({ ...props }: PaginationPreviousProps): JSX.Element;
|
|
18
|
-
interface PaginationNextProps extends ComponentProps<
|
|
18
|
+
interface PaginationNextProps extends ComponentProps<"a">, Pick<VariantProps<typeof buttonVariants>, "size"> {
|
|
19
19
|
isActive?: boolean;
|
|
20
20
|
}
|
|
21
21
|
declare function PaginationNext({ ...props }: PaginationNextProps): JSX.Element;
|
|
22
|
-
type PaginationEllipsisProps = ComponentProps<
|
|
22
|
+
type PaginationEllipsisProps = ComponentProps<"span">;
|
|
23
23
|
declare function PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): JSX.Element;
|
|
24
24
|
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, };
|
|
25
25
|
export type { PaginationContentProps, PaginationEllipsisProps, PaginationItemProps, PaginationLinkProps, PaginationNextProps, PaginationPreviousProps, PaginationProps, };
|
|
@@ -5,14 +5,14 @@ import { buttonVariants } from "./button.js";
|
|
|
5
5
|
function Pagination({ className, ...props }) {
|
|
6
6
|
return /*#__PURE__*/ jsx("nav", {
|
|
7
7
|
"aria-label": "pagination",
|
|
8
|
-
className: cn(
|
|
8
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
9
9
|
"data-slot": "pagination",
|
|
10
10
|
...props
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
function PaginationContent({ className, ...props }) {
|
|
14
14
|
return /*#__PURE__*/ jsx("ul", {
|
|
15
|
-
className: cn(
|
|
15
|
+
className: cn("flex flex-row items-center gap-1", className),
|
|
16
16
|
"data-slot": "pagination-content",
|
|
17
17
|
...props
|
|
18
18
|
});
|
|
@@ -23,13 +23,13 @@ function PaginationItem(props) {
|
|
|
23
23
|
...props
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
function PaginationLink({ children, className, isActive, size =
|
|
26
|
+
function PaginationLink({ children, className, isActive, size = "icon", ...props }) {
|
|
27
27
|
return /*#__PURE__*/ jsx("a", {
|
|
28
|
-
"aria-current": isActive ?
|
|
28
|
+
"aria-current": isActive ? "page" : void 0,
|
|
29
29
|
className: buttonVariants({
|
|
30
30
|
className,
|
|
31
31
|
size,
|
|
32
|
-
variant: isActive ?
|
|
32
|
+
variant: isActive ? "outline" : "ghost"
|
|
33
33
|
}),
|
|
34
34
|
"data-slot": "pagination-link",
|
|
35
35
|
...props,
|
|
@@ -69,7 +69,7 @@ function PaginationNext({ ...props }) {
|
|
|
69
69
|
function PaginationEllipsis({ className, ...props }) {
|
|
70
70
|
return /*#__PURE__*/ jsxs("span", {
|
|
71
71
|
"aria-hidden": true,
|
|
72
|
-
className: cn(
|
|
72
|
+
className: cn("flex size-10 items-center justify-center", className),
|
|
73
73
|
"data-slot": "pagination-ellipsis",
|
|
74
74
|
...props,
|
|
75
75
|
children: [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
import * as PopoverPrimitive from
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
3
|
type PopoverProps = ComponentProps<typeof PopoverPrimitive.Root>;
|
|
4
4
|
declare function Popover({ ...props }: PopoverProps): JSX.Element;
|
|
5
5
|
type PopoverTriggerProps = ComponentProps<typeof PopoverPrimitive.Trigger>;
|
|
@@ -11,4 +11,4 @@ declare function PopoverContent({ align, className, sideOffset, ...props }: Popo
|
|
|
11
11
|
type PopoverArrowProps = ComponentProps<typeof PopoverPrimitive.Arrow>;
|
|
12
12
|
declare function PopoverArrow({ className, ...props }: PopoverArrowProps): JSX.Element;
|
|
13
13
|
export { Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger };
|
|
14
|
-
export type { PopoverAnchorProps, PopoverArrowProps, PopoverContentProps, PopoverProps, PopoverTriggerProps };
|
|
14
|
+
export type { PopoverAnchorProps, PopoverArrowProps, PopoverContentProps, PopoverProps, PopoverTriggerProps, };
|
|
@@ -20,11 +20,11 @@ function PopoverAnchor({ ...props }) {
|
|
|
20
20
|
...props
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
function PopoverContent({ align =
|
|
23
|
+
function PopoverContent({ align = "center", className, sideOffset = 4, ...props }) {
|
|
24
24
|
return /*#__PURE__*/ jsx(Portal, {
|
|
25
25
|
children: /*#__PURE__*/ jsx(Content, {
|
|
26
26
|
align: align,
|
|
27
|
-
className: cn(
|
|
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
28
|
"data-slot": "popover-content",
|
|
29
29
|
sideOffset: sideOffset,
|
|
30
30
|
...props
|
|
@@ -33,7 +33,7 @@ function PopoverContent({ align = 'center', className, sideOffset = 4, ...props
|
|
|
33
33
|
}
|
|
34
34
|
function PopoverArrow({ className, ...props }) {
|
|
35
35
|
return /*#__PURE__*/ jsx(Arrow, {
|
|
36
|
-
className: cn(
|
|
36
|
+
className: cn("fill-popover", className),
|
|
37
37
|
"data-slot": "popover-arrow",
|
|
38
38
|
...props
|
|
39
39
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { VariantProps } from
|
|
2
|
-
import type { ComponentProps, JSX } from
|
|
3
|
-
import * as ProgressCirclePrimitive from
|
|
1
|
+
import type { VariantProps } from "@codefast/tailwind-variants";
|
|
2
|
+
import type { ComponentProps, JSX } from "react";
|
|
3
|
+
import * as ProgressCirclePrimitive from "../primitives/progress-circle";
|
|
4
4
|
declare const progressCircleVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
|
|
5
5
|
size: {
|
|
6
6
|
sm: {
|
|
@@ -15,7 +15,7 @@ declare const progressCircleVariants: import("@codefast/tailwind-variants").Vari
|
|
|
15
15
|
xl: {
|
|
16
16
|
label: string;
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
"2xl": {
|
|
19
19
|
label: string;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
@@ -41,7 +41,7 @@ declare const progressCircleVariants: import("@codefast/tailwind-variants").Vari
|
|
|
41
41
|
svg: string;
|
|
42
42
|
track: string;
|
|
43
43
|
}>;
|
|
44
|
-
interface ProgressCircleProps extends Omit<ComponentProps<typeof ProgressCirclePrimitive.Provider>,
|
|
44
|
+
interface ProgressCircleProps extends Omit<ComponentProps<typeof ProgressCirclePrimitive.Provider>, "children" | "size">, VariantProps<typeof progressCircleVariants> {
|
|
45
45
|
/**
|
|
46
46
|
* Enables animation effect when value changes
|
|
47
47
|
*/
|