@codefast/ui 0.3.11 → 0.3.12-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 +66 -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 +11 -38
- 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 +17 -70
- package/dist/components/alert.d.ts +16 -27
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +33 -31
- 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 +8 -19
- package/dist/components/badge.d.ts +15 -21
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +53 -21
- package/dist/components/breadcrumb.d.ts +13 -35
- package/dist/components/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb.js +14 -50
- 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 +37 -28
- package/dist/components/button.d.ts +26 -35
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +87 -52
- package/dist/components/calendar.d.ts +10 -24
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/calendar.js +88 -93
- package/dist/components/card.d.ts +11 -34
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +12 -40
- package/dist/components/carousel.d.ts +25 -55
- package/dist/components/carousel.d.ts.map +1 -0
- package/dist/components/carousel.js +83 -115
- package/dist/components/chart.d.ts +37 -72
- package/dist/components/chart.d.ts.map +1 -0
- package/dist/components/chart.js +162 -151
- 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 +9 -23
- 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 +8 -20
- package/dist/components/checkbox.d.ts +5 -9
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +7 -15
- 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 +19 -70
- 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 +22 -90
- package/dist/components/dialog.d.ts +23 -53
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +21 -73
- package/dist/components/drawer.d.ts +29 -60
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js +17 -59
- 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 +22 -97
- package/dist/components/empty.d.ts +16 -37
- package/dist/components/empty.d.ts.map +1 -0
- package/dist/components/empty.js +33 -45
- package/dist/components/field.d.ts +26 -63
- package/dist/components/field.d.ts.map +1 -0
- package/dist/components/field.js +61 -90
- package/dist/components/form.d.ts +16 -37
- package/dist/components/form.d.ts.map +1 -0
- package/dist/components/form.js +51 -67
- 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 +9 -24
- 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 +110 -67
- 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 +15 -56
- 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 +14 -35
- 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 +11 -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 +17 -44
- package/dist/components/input.d.ts +5 -10
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +6 -10
- package/dist/components/item.d.ts +33 -69
- package/dist/components/item.d.ts.map +1 -0
- package/dist/components/item.js +69 -91
- package/dist/components/kbd.d.ts +6 -13
- package/dist/components/kbd.d.ts.map +1 -0
- package/dist/components/kbd.js +7 -14
- package/dist/components/label.d.ts +5 -9
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +6 -9
- package/dist/components/menubar.d.ts +24 -80
- package/dist/components/menubar.d.ts.map +1 -0
- package/dist/components/menubar.js +24 -100
- 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 +8 -26
- 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 +26 -62
- package/dist/components/pagination.d.ts +15 -35
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +14 -56
- package/dist/components/popover.d.ts +9 -24
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +10 -28
- 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 +71 -104
- package/dist/components/progress.d.ts +5 -10
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +8 -14
- 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 +8 -22
- 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 +7 -18
- package/dist/components/radio.d.ts +6 -12
- package/dist/components/radio.d.ts.map +1 -0
- package/dist/components/radio.js +6 -11
- package/dist/components/resizable.d.ts +8 -18
- package/dist/components/resizable.d.ts.map +1 -0
- package/dist/components/resizable.js +8 -22
- 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 +65 -85
- package/dist/components/select.d.ts +17 -50
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +27 -79
- package/dist/components/separator.d.ts +20 -29
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +28 -37
- package/dist/components/sheet.d.ts +30 -62
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.js +68 -81
- package/dist/components/sidebar.d.ts +67 -160
- package/dist/components/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar.js +184 -302
- package/dist/components/skeleton.d.ts +5 -9
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +6 -9
- package/dist/components/slider.d.ts +5 -13
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +13 -35
- package/dist/components/sonner.d.ts +8 -10
- package/dist/components/sonner.d.ts.map +1 -0
- package/dist/components/sonner.js +14 -16
- package/dist/components/spinner.d.ts +6 -12
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +21 -34
- package/dist/components/switch.d.ts +5 -9
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +6 -13
- package/dist/components/table.d.ts +12 -37
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +13 -48
- package/dist/components/tabs.d.ts +8 -21
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +9 -24
- package/dist/components/textarea.d.ts +5 -9
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +6 -9
- 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 +21 -39
- package/dist/components/toggle.d.ts +18 -25
- package/dist/components/toggle.d.ts.map +1 -0
- package/dist/components/toggle.js +42 -30
- package/dist/components/tooltip.d.ts +9 -24
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +10 -29
- 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/lib/utils.d.ts +10 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +10 -0
- 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 +33 -16
- package/{dist → src}/css/preset.css +86 -9
- /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
package/dist/components/item.js
CHANGED
|
@@ -1,116 +1,94 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { cn, tv } from "
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn, tv } from "#lib/utils";
|
|
3
3
|
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { Separator } from "#components/separator";
|
|
5
|
+
/* -----------------------------------------------------------------------------
|
|
6
|
+
* Variants: Item
|
|
7
|
+
* -------------------------------------------------------------------------- */
|
|
6
8
|
const itemVariants = tv({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
base: [
|
|
10
|
+
"group/item flex flex-wrap items-center",
|
|
11
|
+
"rounded-lg border border-transparent outline-hidden",
|
|
12
|
+
"text-sm",
|
|
13
|
+
"transition-colors duration-100",
|
|
14
|
+
"focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50",
|
|
15
|
+
"[a]:transition-colors",
|
|
16
|
+
"[a]:hover:bg-accent/50",
|
|
17
|
+
],
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
size: "default",
|
|
20
|
+
variant: "default",
|
|
21
|
+
},
|
|
22
|
+
variants: {
|
|
23
|
+
size: {
|
|
24
|
+
default: ["gap-4", "p-4"],
|
|
25
|
+
sm: ["gap-2.5", "px-4 py-3"],
|
|
26
|
+
},
|
|
27
|
+
variant: {
|
|
28
|
+
default: "bg-transparent",
|
|
29
|
+
muted: "bg-muted/50",
|
|
30
|
+
outline: "border-border",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
23
33
|
});
|
|
24
34
|
const itemMediaVariants = tv({
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
base: [
|
|
36
|
+
"flex shrink-0 items-center justify-center gap-2",
|
|
37
|
+
"group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start",
|
|
38
|
+
"[&_svg]:pointer-events-none",
|
|
39
|
+
],
|
|
40
|
+
defaultVariants: {
|
|
41
|
+
variant: "default",
|
|
42
|
+
},
|
|
43
|
+
variants: {
|
|
44
|
+
variant: {
|
|
45
|
+
default: "bg-transparent",
|
|
46
|
+
icon: [
|
|
47
|
+
"size-8 shrink-0",
|
|
48
|
+
"rounded-md border",
|
|
49
|
+
"bg-muted",
|
|
50
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
51
|
+
],
|
|
52
|
+
image: [
|
|
53
|
+
"size-10 shrink-0 overflow-hidden",
|
|
54
|
+
"rounded-md",
|
|
55
|
+
"[&_img]:size-full [&_img]:object-cover",
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
},
|
|
32
59
|
});
|
|
33
60
|
function ItemGroup({ className, ...props }) {
|
|
34
|
-
|
|
35
|
-
className: cn("group/item-group flex flex-col", className),
|
|
36
|
-
"data-slot": "item-group",
|
|
37
|
-
role: "list",
|
|
38
|
-
...props
|
|
39
|
-
});
|
|
61
|
+
return (_jsx("div", { className: cn("group/item-group flex flex-col", className), "data-slot": "item-group", role: "list", ...props }));
|
|
40
62
|
}
|
|
41
63
|
function ItemSeparator({ className, ...props }) {
|
|
42
|
-
|
|
43
|
-
className: cn("my-0", className),
|
|
44
|
-
"data-slot": "item-separator",
|
|
45
|
-
orientation: "horizontal",
|
|
46
|
-
...props
|
|
47
|
-
});
|
|
64
|
+
return (_jsx(Separator, { className: cn("my-0", className), "data-slot": "item-separator", orientation: "horizontal", ...props }));
|
|
48
65
|
}
|
|
49
66
|
function Item({ asChild = false, className, size = "default", variant = "default", ...props }) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
className,
|
|
53
|
-
size,
|
|
54
|
-
variant
|
|
55
|
-
}),
|
|
56
|
-
"data-size": size,
|
|
57
|
-
"data-slot": "item",
|
|
58
|
-
"data-variant": variant,
|
|
59
|
-
...props
|
|
60
|
-
});
|
|
67
|
+
const Component = asChild ? Slot : "div";
|
|
68
|
+
return (_jsx(Component, { className: itemVariants({ className, size, variant }), "data-size": size, "data-slot": "item", "data-variant": variant, ...props }));
|
|
61
69
|
}
|
|
62
70
|
function ItemMedia({ className, variant = "default", ...props }) {
|
|
63
|
-
|
|
64
|
-
className: itemMediaVariants({
|
|
65
|
-
className,
|
|
66
|
-
variant
|
|
67
|
-
}),
|
|
68
|
-
"data-slot": "item-media",
|
|
69
|
-
"data-variant": variant,
|
|
70
|
-
...props
|
|
71
|
-
});
|
|
71
|
+
return (_jsx("div", { className: itemMediaVariants({ className, variant }), "data-slot": "item-media", "data-variant": variant, ...props }));
|
|
72
72
|
}
|
|
73
73
|
function ItemContent({ className, ...props }) {
|
|
74
|
-
|
|
75
|
-
className: cn("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none", className),
|
|
76
|
-
"data-slot": "item-content",
|
|
77
|
-
...props
|
|
78
|
-
});
|
|
74
|
+
return (_jsx("div", { className: cn("flex flex-1 flex-col gap-1", "[&+[data-slot=item-content]]:flex-none", className), "data-slot": "item-content", ...props }));
|
|
79
75
|
}
|
|
80
76
|
function ItemTitle({ className, ...props }) {
|
|
81
|
-
|
|
82
|
-
className: cn("flex w-fit items-center gap-2 text-sm leading-snug font-medium", className),
|
|
83
|
-
"data-slot": "item-title",
|
|
84
|
-
...props
|
|
85
|
-
});
|
|
77
|
+
return (_jsx("div", { className: cn("flex w-fit items-center gap-2", "text-sm leading-snug font-medium", className), "data-slot": "item-title", ...props }));
|
|
86
78
|
}
|
|
87
79
|
function ItemDescription({ className, ...props }) {
|
|
88
|
-
|
|
89
|
-
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),
|
|
90
|
-
"data-slot": "item-description",
|
|
91
|
-
...props
|
|
92
|
-
});
|
|
80
|
+
return (_jsx("p", { 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), "data-slot": "item-description", ...props }));
|
|
93
81
|
}
|
|
94
82
|
function ItemActions({ className, ...props }) {
|
|
95
|
-
|
|
96
|
-
className: cn("flex items-center gap-2", className),
|
|
97
|
-
"data-slot": "item-actions",
|
|
98
|
-
...props
|
|
99
|
-
});
|
|
83
|
+
return (_jsx("div", { className: cn("flex items-center gap-2", className), "data-slot": "item-actions", ...props }));
|
|
100
84
|
}
|
|
101
85
|
function ItemHeader({ className, ...props }) {
|
|
102
|
-
|
|
103
|
-
className: cn("flex basis-full items-center justify-between gap-2", className),
|
|
104
|
-
"data-slot": "item-header",
|
|
105
|
-
...props
|
|
106
|
-
});
|
|
86
|
+
return (_jsx("div", { className: cn("flex basis-full items-center justify-between gap-2", className), "data-slot": "item-header", ...props }));
|
|
107
87
|
}
|
|
108
88
|
function ItemFooter({ className, ...props }) {
|
|
109
|
-
|
|
110
|
-
className: cn("flex basis-full items-center justify-between gap-2", className),
|
|
111
|
-
"data-slot": "item-footer",
|
|
112
|
-
...props
|
|
113
|
-
});
|
|
89
|
+
return (_jsx("div", { className: cn("flex basis-full items-center justify-between gap-2", className), "data-slot": "item-footer", ...props }));
|
|
114
90
|
}
|
|
115
|
-
|
|
116
|
-
|
|
91
|
+
/* -----------------------------------------------------------------------------
|
|
92
|
+
* Exports
|
|
93
|
+
* -------------------------------------------------------------------------- */
|
|
94
|
+
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, itemMediaVariants, ItemSeparator, ItemTitle, itemVariants, };
|
package/dist/components/kbd.d.ts
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import { ComponentProps, JSX } from "react";
|
|
2
|
-
|
|
3
|
-
//#region src/components/kbd.d.ts
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
4
2
|
type KbdProps = ComponentProps<"kbd">;
|
|
5
|
-
declare function Kbd({
|
|
6
|
-
className,
|
|
7
|
-
...props
|
|
8
|
-
}: KbdProps): JSX.Element;
|
|
3
|
+
declare function Kbd({ className, ...props }: KbdProps): JSX.Element;
|
|
9
4
|
type KbdGroupProps = ComponentProps<"kbd">;
|
|
10
|
-
declare function KbdGroup({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
//#endregion
|
|
15
|
-
export { Kbd, KbdGroup, type KbdGroupProps, type KbdProps };
|
|
5
|
+
declare function KbdGroup({ className, ...props }: KbdGroupProps): JSX.Element;
|
|
6
|
+
export { Kbd, KbdGroup };
|
|
7
|
+
export type { KbdGroupProps, KbdProps };
|
|
8
|
+
//# sourceMappingURL=kbd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kbd.d.ts","sourceRoot":"","sources":["../../src/components/kbd.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAQjD,KAAK,QAAQ,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEtC,iBAAS,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,QAAQ,GAAG,GAAG,CAAC,OAAO,CAiB3D;AAED,KAAK,aAAa,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE3C,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,GAAG,GAAG,CAAC,OAAO,CAQrE;AAMD,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;AACzB,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC"}
|
package/dist/components/kbd.js
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
//#region src/components/kbd.tsx
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "#lib/utils";
|
|
4
3
|
function Kbd({ className, ...props }) {
|
|
5
|
-
|
|
6
|
-
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),
|
|
7
|
-
"data-slot": "kbd",
|
|
8
|
-
...props
|
|
9
|
-
});
|
|
4
|
+
return (_jsx("kbd", { className: cn("inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 px-1", "rounded-md", "bg-muted font-sans text-xs font-medium text-muted-foreground", "pointer-events-none select-none", "in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background", "dark:in-data-[slot=tooltip-content]:bg-background/10", "[&_svg:not([class*='size-'])]:size-3", className), "data-slot": "kbd", ...props }));
|
|
10
5
|
}
|
|
11
6
|
function KbdGroup({ className, ...props }) {
|
|
12
|
-
|
|
13
|
-
className: cn("inline-flex items-center gap-1", className),
|
|
14
|
-
"data-slot": "kbd-group",
|
|
15
|
-
...props
|
|
16
|
-
});
|
|
7
|
+
return (_jsx("kbd", { className: cn("inline-flex items-center gap-1", className), "data-slot": "kbd-group", ...props }));
|
|
17
8
|
}
|
|
18
|
-
|
|
9
|
+
/* -----------------------------------------------------------------------------
|
|
10
|
+
* Exports
|
|
11
|
+
* -------------------------------------------------------------------------- */
|
|
19
12
|
export { Kbd, KbdGroup };
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import { ComponentProps, JSX } from "react";
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
2
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
-
|
|
4
|
-
//#region src/components/label.d.ts
|
|
5
3
|
type LabelProps = ComponentProps<typeof LabelPrimitive.Root>;
|
|
6
|
-
declare function Label({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
export { Label, type LabelProps };
|
|
4
|
+
declare function Label({ className, ...props }: LabelProps): JSX.Element;
|
|
5
|
+
export { Label };
|
|
6
|
+
export type { LabelProps };
|
|
7
|
+
//# sourceMappingURL=label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAMxD,KAAK,UAAU,GAAG,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;AAE7D,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CAiB/D;AAMD,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,YAAY,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/components/label.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "#lib/utils";
|
|
4
4
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
5
|
-
//#region src/components/label.tsx
|
|
6
5
|
function Label({ className, ...props }) {
|
|
7
|
-
|
|
8
|
-
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),
|
|
9
|
-
"data-slot": "label",
|
|
10
|
-
...props
|
|
11
|
-
});
|
|
6
|
+
return (_jsx(LabelPrimitive.Root, { 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), "data-slot": "label", ...props }));
|
|
12
7
|
}
|
|
13
|
-
|
|
8
|
+
/* -----------------------------------------------------------------------------
|
|
9
|
+
* Exports
|
|
10
|
+
* -------------------------------------------------------------------------- */
|
|
14
11
|
export { Label };
|
|
@@ -1,100 +1,44 @@
|
|
|
1
|
-
import { ComponentProps, JSX } from "react";
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
2
|
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
3
|
-
|
|
4
|
-
//#region src/components/menubar.d.ts
|
|
5
3
|
type MenubarProps = ComponentProps<typeof MenubarPrimitive.Root>;
|
|
6
|
-
declare function Menubar({
|
|
7
|
-
className,
|
|
8
|
-
...props
|
|
9
|
-
}: MenubarProps): JSX.Element;
|
|
4
|
+
declare function Menubar({ className, ...props }: MenubarProps): JSX.Element;
|
|
10
5
|
type MenubarMenuProps = ComponentProps<typeof MenubarPrimitive.Menu>;
|
|
11
|
-
declare function MenubarMenu({
|
|
12
|
-
...props
|
|
13
|
-
}: MenubarMenuProps): JSX.Element;
|
|
6
|
+
declare function MenubarMenu({ ...props }: MenubarMenuProps): JSX.Element;
|
|
14
7
|
type MenubarGroupProps = ComponentProps<typeof MenubarPrimitive.Group>;
|
|
15
|
-
declare function MenubarGroup({
|
|
16
|
-
...props
|
|
17
|
-
}: MenubarGroupProps): JSX.Element;
|
|
8
|
+
declare function MenubarGroup({ ...props }: MenubarGroupProps): JSX.Element;
|
|
18
9
|
type MenubarSubProps = ComponentProps<typeof MenubarPrimitive.Sub>;
|
|
19
|
-
declare function MenubarSub({
|
|
20
|
-
...props
|
|
21
|
-
}: MenubarSubProps): JSX.Element;
|
|
10
|
+
declare function MenubarSub({ ...props }: MenubarSubProps): JSX.Element;
|
|
22
11
|
type MenubarRadioGroupProps = ComponentProps<typeof MenubarPrimitive.RadioGroup>;
|
|
23
|
-
declare function MenubarRadioGroup({
|
|
24
|
-
...props
|
|
25
|
-
}: MenubarRadioGroupProps): JSX.Element;
|
|
12
|
+
declare function MenubarRadioGroup({ ...props }: MenubarRadioGroupProps): JSX.Element;
|
|
26
13
|
type MenubarTriggerProps = ComponentProps<typeof MenubarPrimitive.Trigger>;
|
|
27
|
-
declare function MenubarTrigger({
|
|
28
|
-
className,
|
|
29
|
-
...props
|
|
30
|
-
}: MenubarTriggerProps): JSX.Element;
|
|
14
|
+
declare function MenubarTrigger({ className, ...props }: MenubarTriggerProps): JSX.Element;
|
|
31
15
|
interface MenubarSubTriggerProps extends ComponentProps<typeof MenubarPrimitive.SubTrigger> {
|
|
32
|
-
|
|
16
|
+
inset?: boolean;
|
|
33
17
|
}
|
|
34
|
-
declare function MenubarSubTrigger({
|
|
35
|
-
children,
|
|
36
|
-
className,
|
|
37
|
-
inset,
|
|
38
|
-
...props
|
|
39
|
-
}: MenubarSubTriggerProps): JSX.Element;
|
|
18
|
+
declare function MenubarSubTrigger({ children, className, inset, ...props }: MenubarSubTriggerProps): JSX.Element;
|
|
40
19
|
type MenubarSubContentProps = ComponentProps<typeof MenubarPrimitive.SubContent>;
|
|
41
|
-
declare function MenubarSubContent({
|
|
42
|
-
className,
|
|
43
|
-
...props
|
|
44
|
-
}: MenubarSubContentProps): JSX.Element;
|
|
20
|
+
declare function MenubarSubContent({ className, ...props }: MenubarSubContentProps): JSX.Element;
|
|
45
21
|
type MenubarContentProps = ComponentProps<typeof MenubarPrimitive.Content>;
|
|
46
|
-
declare function MenubarContent({
|
|
47
|
-
align,
|
|
48
|
-
alignOffset,
|
|
49
|
-
className,
|
|
50
|
-
sideOffset,
|
|
51
|
-
...props
|
|
52
|
-
}: MenubarContentProps): JSX.Element;
|
|
22
|
+
declare function MenubarContent({ align, alignOffset, className, sideOffset, ...props }: MenubarContentProps): JSX.Element;
|
|
53
23
|
interface MenubarItemProps extends ComponentProps<typeof MenubarPrimitive.Item> {
|
|
54
|
-
|
|
55
|
-
|
|
24
|
+
inset?: boolean;
|
|
25
|
+
variant?: "default" | "destructive";
|
|
56
26
|
}
|
|
57
|
-
declare function MenubarItem({
|
|
58
|
-
className,
|
|
59
|
-
inset,
|
|
60
|
-
variant,
|
|
61
|
-
...props
|
|
62
|
-
}: MenubarItemProps): JSX.Element;
|
|
27
|
+
declare function MenubarItem({ className, inset, variant, ...props }: MenubarItemProps): JSX.Element;
|
|
63
28
|
type MenubarCheckboxItemProps = ComponentProps<typeof MenubarPrimitive.CheckboxItem>;
|
|
64
|
-
declare function MenubarCheckboxItem({
|
|
65
|
-
checked,
|
|
66
|
-
children,
|
|
67
|
-
className,
|
|
68
|
-
...props
|
|
69
|
-
}: MenubarCheckboxItemProps): JSX.Element;
|
|
29
|
+
declare function MenubarCheckboxItem({ checked, children, className, ...props }: MenubarCheckboxItemProps): JSX.Element;
|
|
70
30
|
type MenubarRadioItemProps = ComponentProps<typeof MenubarPrimitive.RadioItem>;
|
|
71
|
-
declare function MenubarRadioItem({
|
|
72
|
-
children,
|
|
73
|
-
className,
|
|
74
|
-
...props
|
|
75
|
-
}: MenubarRadioItemProps): JSX.Element;
|
|
31
|
+
declare function MenubarRadioItem({ children, className, ...props }: MenubarRadioItemProps): JSX.Element;
|
|
76
32
|
interface MenubarLabelProps extends ComponentProps<typeof MenubarPrimitive.Label> {
|
|
77
|
-
|
|
33
|
+
inset?: boolean;
|
|
78
34
|
}
|
|
79
|
-
declare function MenubarLabel({
|
|
80
|
-
className,
|
|
81
|
-
inset,
|
|
82
|
-
...props
|
|
83
|
-
}: MenubarLabelProps): JSX.Element;
|
|
35
|
+
declare function MenubarLabel({ className, inset, ...props }: MenubarLabelProps): JSX.Element;
|
|
84
36
|
type MenubarSeparatorProps = ComponentProps<typeof MenubarPrimitive.Separator>;
|
|
85
|
-
declare function MenubarSeparator({
|
|
86
|
-
className,
|
|
87
|
-
...props
|
|
88
|
-
}: MenubarSeparatorProps): JSX.Element;
|
|
37
|
+
declare function MenubarSeparator({ className, ...props }: MenubarSeparatorProps): JSX.Element;
|
|
89
38
|
type MenubarShortcutProps = ComponentProps<"span">;
|
|
90
|
-
declare function MenubarShortcut({
|
|
91
|
-
className,
|
|
92
|
-
...props
|
|
93
|
-
}: MenubarShortcutProps): JSX.Element;
|
|
39
|
+
declare function MenubarShortcut({ className, ...props }: MenubarShortcutProps): JSX.Element;
|
|
94
40
|
type MenubarArrowProps = ComponentProps<typeof MenubarPrimitive.Arrow>;
|
|
95
|
-
declare function MenubarArrow({
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
//#endregion
|
|
100
|
-
export { Menubar, MenubarArrow, type MenubarArrowProps, MenubarCheckboxItem, type MenubarCheckboxItemProps, MenubarContent, type MenubarContentProps, MenubarGroup, type MenubarGroupProps, MenubarItem, type MenubarItemProps, MenubarLabel, type MenubarLabelProps, MenubarMenu, type MenubarMenuProps, type MenubarProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, type MenubarRadioItemProps, MenubarSeparator, type MenubarSeparatorProps, MenubarShortcut, type MenubarShortcutProps, MenubarSub, MenubarSubContent, type MenubarSubContentProps, type MenubarSubProps, MenubarSubTrigger, type MenubarSubTriggerProps, MenubarTrigger, type MenubarTriggerProps };
|
|
41
|
+
declare function MenubarArrow({ className, ...props }: MenubarArrowProps): JSX.Element;
|
|
42
|
+
export { Menubar, MenubarArrow, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, };
|
|
43
|
+
export type { MenubarArrowProps, MenubarCheckboxItemProps, MenubarContentProps, MenubarGroupProps, MenubarItemProps, MenubarLabelProps, MenubarMenuProps, MenubarProps, MenubarRadioGroupProps, MenubarRadioItemProps, MenubarSeparatorProps, MenubarShortcutProps, MenubarSubContentProps, MenubarSubProps, MenubarSubTriggerProps, MenubarTriggerProps, };
|
|
44
|
+
//# sourceMappingURL=menubar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menubar.d.ts","sourceRoot":"","sources":["../../src/components/menubar.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,133 +1,57 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "#lib/utils";
|
|
5
4
|
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
6
|
-
|
|
5
|
+
import { CheckIcon, ChevronRightIcon, DotIcon } from "lucide-react";
|
|
7
6
|
function Menubar({ className, ...props }) {
|
|
8
|
-
|
|
9
|
-
className: cn("flex items-center space-x-1 rounded-lg border bg-background p-1", className),
|
|
10
|
-
"data-slot": "menubar",
|
|
11
|
-
...props
|
|
12
|
-
});
|
|
7
|
+
return (_jsx(MenubarPrimitive.Root, { className: cn("flex items-center space-x-1", "p-1", "rounded-lg border", "bg-background", className), "data-slot": "menubar", ...props }));
|
|
13
8
|
}
|
|
14
9
|
function MenubarMenu({ ...props }) {
|
|
15
|
-
|
|
16
|
-
"data-slot": "menubar-menu",
|
|
17
|
-
...props
|
|
18
|
-
});
|
|
10
|
+
return _jsx(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
|
|
19
11
|
}
|
|
20
12
|
function MenubarGroup({ ...props }) {
|
|
21
|
-
|
|
22
|
-
"data-slot": "menubar-group",
|
|
23
|
-
...props
|
|
24
|
-
});
|
|
13
|
+
return _jsx(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
|
|
25
14
|
}
|
|
26
15
|
function MenubarSub({ ...props }) {
|
|
27
|
-
|
|
28
|
-
"data-slot": "menubar-sub",
|
|
29
|
-
...props
|
|
30
|
-
});
|
|
16
|
+
return _jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
|
|
31
17
|
}
|
|
32
18
|
function MenubarRadioGroup({ ...props }) {
|
|
33
|
-
|
|
34
|
-
"data-slot": "menubar-radio-group",
|
|
35
|
-
...props
|
|
36
|
-
});
|
|
19
|
+
return _jsx(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
|
|
37
20
|
}
|
|
38
21
|
function MenubarTrigger({ className, ...props }) {
|
|
39
|
-
|
|
40
|
-
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),
|
|
41
|
-
"data-slot": "menubar-trigger",
|
|
42
|
-
...props
|
|
43
|
-
});
|
|
22
|
+
return (_jsx(MenubarPrimitive.Trigger, { className: cn("flex items-center gap-x-2", "px-2 py-1.5", "rounded-sm outline-hidden", "text-sm font-medium", "select-none", "focus:bg-accent focus:text-accent-foreground", "data-open:bg-accent data-open:text-accent-foreground", className), "data-slot": "menubar-trigger", ...props }));
|
|
44
23
|
}
|
|
45
24
|
function MenubarSubTrigger({ children, className, inset, ...props }) {
|
|
46
|
-
|
|
47
|
-
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),
|
|
48
|
-
"data-inset": inset,
|
|
49
|
-
"data-slot": "menubar-sub-trigger",
|
|
50
|
-
...props,
|
|
51
|
-
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })]
|
|
52
|
-
});
|
|
25
|
+
return (_jsxs(MenubarPrimitive.SubTrigger, { className: cn("flex items-center gap-x-2", "px-2 py-1.5", "rounded-sm outline-hidden", "text-sm", "cursor-default select-none", "focus:bg-accent focus:text-accent-foreground", "data-inset:pl-8", "data-open:bg-accent data-open:text-accent-foreground", className), "data-inset": inset, "data-slot": "menubar-sub-trigger", ...props, children: [children, _jsx(ChevronRightIcon, { className: cn("size-4", "ml-auto") })] }));
|
|
53
26
|
}
|
|
54
27
|
function MenubarSubContent({ className, ...props }) {
|
|
55
|
-
|
|
56
|
-
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),
|
|
57
|
-
"data-slot": "menubar-sub-content",
|
|
58
|
-
...props
|
|
59
|
-
}) });
|
|
28
|
+
return (_jsx(MenubarPrimitive.Portal, { children: _jsx(MenubarPrimitive.SubContent, { className: cn("z-50", "min-w-32 overflow-hidden p-1", "rounded-lg border", "bg-popover text-popover-foreground shadow-lg", "ease-ui data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95", "data-open:data-side-top:slide-in-from-bottom-2", "data-open:data-side-right:slide-in-from-left-2", "data-open:data-side-bottom:slide-in-from-top-2", "data-open:data-side-left:slide-in-from-right-2", "data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", "data-closed:data-side-top:slide-out-to-bottom-2", "data-closed:data-side-right:slide-out-to-left-2", "data-closed:data-side-bottom:slide-out-to-top-2", "data-closed:data-side-left:slide-out-to-right-2", "origin-(--radix-menubar-content-transform-origin)", className), "data-slot": "menubar-sub-content", ...props }) }));
|
|
60
29
|
}
|
|
61
30
|
function MenubarContent({ align = "start", alignOffset = -4, className, sideOffset = 4, ...props }) {
|
|
62
|
-
|
|
63
|
-
align,
|
|
64
|
-
alignOffset,
|
|
65
|
-
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),
|
|
66
|
-
"data-slot": "menubar-content",
|
|
67
|
-
sideOffset,
|
|
68
|
-
...props
|
|
69
|
-
}) });
|
|
31
|
+
return (_jsx(MenubarPrimitive.Portal, { children: _jsx(MenubarPrimitive.Content, { align: align, alignOffset: alignOffset, className: cn("z-50", "min-w-32 overflow-hidden p-1", "rounded-lg border", "bg-popover text-popover-foreground shadow-lg", "ease-ui data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95", "data-open:data-side-top:slide-in-from-bottom-2", "data-open:data-side-right:slide-in-from-left-2", "data-open:data-side-bottom:slide-in-from-top-2", "data-open:data-side-left:slide-in-from-right-2", "origin-(--radix-menubar-content-transform-origin)", className), "data-slot": "menubar-content", sideOffset: sideOffset, ...props }) }));
|
|
70
32
|
}
|
|
71
33
|
function MenubarItem({ className, inset, variant, ...props }) {
|
|
72
|
-
|
|
73
|
-
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),
|
|
74
|
-
"data-inset": inset,
|
|
75
|
-
"data-slot": "menubar-item",
|
|
76
|
-
"data-variant": variant,
|
|
77
|
-
...props
|
|
78
|
-
});
|
|
34
|
+
return (_jsx(MenubarPrimitive.Item, { className: cn("group/menubar-item relative flex items-center gap-x-2", "px-2 py-1.5", "rounded-sm outline-hidden", "text-sm", "cursor-default 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), "data-inset": inset, "data-slot": "menubar-item", "data-variant": variant, ...props }));
|
|
79
35
|
}
|
|
80
36
|
function MenubarCheckboxItem({ checked, children, className, ...props }) {
|
|
81
|
-
|
|
82
|
-
checked,
|
|
83
|
-
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),
|
|
84
|
-
"data-slot": "menubar-checkbox-item",
|
|
85
|
-
...props,
|
|
86
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
87
|
-
className: "absolute left-2 flex items-center justify-center",
|
|
88
|
-
children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
|
|
89
|
-
}), children]
|
|
90
|
-
});
|
|
37
|
+
return (_jsxs(MenubarPrimitive.CheckboxItem, { checked: checked, className: cn("group/menubar-item relative flex items-center gap-x-2", "py-1.5 pr-2 pl-8", "rounded-sm outline-hidden", "text-sm", "cursor-default select-none", "focus:bg-accent focus:text-accent-foreground", "aria-disabled:opacity-50", "[&_svg]:shrink-0", "[&_svg:not([class*='size-'])]:size-4", className), "data-slot": "menubar-checkbox-item", ...props, children: [_jsx("span", { className: cn("absolute flex items-center justify-center", "left-2"), children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), children] }));
|
|
91
38
|
}
|
|
92
39
|
function MenubarRadioItem({ children, className, ...props }) {
|
|
93
|
-
|
|
94
|
-
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),
|
|
95
|
-
"data-slot": "menubar-radio-item",
|
|
96
|
-
...props,
|
|
97
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
98
|
-
className: "absolute left-2 flex items-center justify-center",
|
|
99
|
-
children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(DotIcon, { className: "size-4 fill-current" }) })
|
|
100
|
-
}), children]
|
|
101
|
-
});
|
|
40
|
+
return (_jsxs(MenubarPrimitive.RadioItem, { className: cn("group/menubar-item relative flex items-center gap-x-2", "py-1.5 pr-2 pl-8", "rounded-sm outline-hidden", "text-sm", "cursor-default select-none", "focus:bg-accent focus:text-accent-foreground", "aria-disabled:opacity-50", "[&_svg]:shrink-0", "[&_svg:not([class*='size-'])]:size-4", className), "data-slot": "menubar-radio-item", ...props, children: [_jsx("span", { className: cn("absolute flex items-center justify-center", "left-2"), children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(DotIcon, { className: cn("size-4", "fill-current") }) }) }), children] }));
|
|
102
41
|
}
|
|
103
42
|
function MenubarLabel({ className, inset, ...props }) {
|
|
104
|
-
|
|
105
|
-
className: cn("flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold data-inset:pl-8", className),
|
|
106
|
-
"data-inset": inset,
|
|
107
|
-
"data-slot": "menubar-label",
|
|
108
|
-
...props
|
|
109
|
-
});
|
|
43
|
+
return (_jsx(MenubarPrimitive.Label, { className: cn("flex items-center gap-x-2", "px-2 py-1.5", "text-sm font-semibold", "data-inset:pl-8", className), "data-inset": inset, "data-slot": "menubar-label", ...props }));
|
|
110
44
|
}
|
|
111
45
|
function MenubarSeparator({ className, ...props }) {
|
|
112
|
-
|
|
113
|
-
className: cn("mx-2 my-1 h-px bg-border", className),
|
|
114
|
-
"data-slot": "menubar-separator",
|
|
115
|
-
...props
|
|
116
|
-
});
|
|
46
|
+
return (_jsx(MenubarPrimitive.Separator, { className: cn("mx-2 my-1 h-px", "bg-border", className), "data-slot": "menubar-separator", ...props }));
|
|
117
47
|
}
|
|
118
48
|
function MenubarShortcut({ className, ...props }) {
|
|
119
|
-
|
|
120
|
-
className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-data-[variant=destructive]/menubar-item:text-destructive/80", className),
|
|
121
|
-
"data-slot": "menubar-shortcut",
|
|
122
|
-
...props
|
|
123
|
-
});
|
|
49
|
+
return (_jsx("span", { className: cn("ml-auto", "text-xs tracking-widest text-muted-foreground", "group-data-[variant=destructive]/menubar-item:text-destructive/80", className), "data-slot": "menubar-shortcut", ...props }));
|
|
124
50
|
}
|
|
125
51
|
function MenubarArrow({ className, ...props }) {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
//#endregion
|
|
133
|
-
export { Menubar, MenubarArrow, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger };
|
|
52
|
+
return (_jsx(MenubarPrimitive.Arrow, { className: cn("fill-popover", className), "data-slot": "menubar-arrow", ...props }));
|
|
53
|
+
}
|
|
54
|
+
/* -----------------------------------------------------------------------------
|
|
55
|
+
* Exports
|
|
56
|
+
* -------------------------------------------------------------------------- */
|
|
57
|
+
export { Menubar, MenubarArrow, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, };
|
|
@@ -1,19 +1,10 @@
|
|
|
1
|
-
import { ComponentProps, JSX } from "react";
|
|
2
|
-
|
|
3
|
-
//#region src/components/native-select.d.ts
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
4
2
|
type NativeSelectProps = ComponentProps<"select">;
|
|
5
|
-
declare function NativeSelect({
|
|
6
|
-
className,
|
|
7
|
-
...props
|
|
8
|
-
}: NativeSelectProps): JSX.Element;
|
|
3
|
+
declare function NativeSelect({ className, ...props }: NativeSelectProps): JSX.Element;
|
|
9
4
|
type NativeSelectOptionProps = ComponentProps<"option">;
|
|
10
|
-
declare function NativeSelectOption({
|
|
11
|
-
...props
|
|
12
|
-
}: NativeSelectOptionProps): JSX.Element;
|
|
5
|
+
declare function NativeSelectOption({ ...props }: NativeSelectOptionProps): JSX.Element;
|
|
13
6
|
type NativeSelectOptGroupProps = ComponentProps<"optgroup">;
|
|
14
|
-
declare function NativeSelectOptGroup({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
export { NativeSelect, NativeSelectOptGroup, type NativeSelectOptGroupProps, NativeSelectOption, type NativeSelectOptionProps, type NativeSelectProps };
|
|
7
|
+
declare function NativeSelectOptGroup({ className, ...props }: NativeSelectOptGroupProps): JSX.Element;
|
|
8
|
+
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|
|
9
|
+
export type { NativeSelectOptGroupProps, NativeSelectOptionProps, NativeSelectProps };
|
|
10
|
+
//# sourceMappingURL=native-select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-select.d.ts","sourceRoot":"","sources":["../../src/components/native-select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AASjD,KAAK,iBAAiB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;AAElD,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAsC7E;AAMD,KAAK,uBAAuB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;AAExD,iBAAS,kBAAkB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAE9E;AAMD,KAAK,yBAAyB,GAAG,cAAc,CAAC,UAAU,CAAC,CAAC;AAE5D,iBAAS,oBAAoB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,yBAAyB,GAAG,GAAG,CAAC,OAAO,CAE7F;AAMD,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,CAAC;AAClE,YAAY,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,CAAC"}
|