@codefast/ui 0.3.13-canary.3 → 0.3.13-canary.4
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 +19 -0
- package/dist/components/accordion.d.mts +37 -0
- package/dist/components/accordion.mjs +53 -0
- package/dist/components/alert-dialog.d.mts +74 -0
- package/dist/components/alert-dialog.mjs +92 -0
- package/dist/components/alert.d.mts +30 -0
- package/dist/components/alert.mjs +49 -0
- package/dist/components/aspect-ratio.d.mts +10 -0
- package/dist/components/aspect-ratio.mjs +12 -0
- package/dist/components/avatar.d.mts +21 -0
- package/dist/components/avatar.mjs +28 -0
- package/dist/components/badge.d.mts +24 -0
- package/dist/components/badge.mjs +56 -0
- package/dist/components/breadcrumb.d.mts +44 -0
- package/dist/components/breadcrumb.mjs +67 -0
- package/dist/components/button-group.d.mts +34 -0
- package/dist/components/button-group.mjs +53 -0
- package/dist/components/button.d.mts +38 -0
- package/dist/components/button.mjs +99 -0
- package/dist/components/calendar.d.mts +27 -0
- package/dist/components/calendar.mjs +114 -0
- package/dist/components/card.d.mts +41 -0
- package/dist/components/card.mjs +55 -0
- package/dist/components/carousel.d.mts +68 -0
- package/dist/components/carousel.mjs +135 -0
- package/dist/components/chart.d.mts +93 -0
- package/dist/components/chart.mjs +189 -0
- package/dist/components/checkbox-cards.d.mts +17 -0
- package/dist/components/checkbox-cards.mjs +30 -0
- package/dist/components/checkbox-group.d.mts +16 -0
- package/dist/components/checkbox-group.mjs +27 -0
- package/dist/components/checkbox.d.mts +11 -0
- package/dist/components/checkbox.mjs +20 -0
- package/dist/components/collapsible.d.mts +18 -0
- package/dist/components/collapsible.mjs +24 -0
- package/dist/components/command.d.mts +57 -0
- package/dist/components/command.mjs +92 -0
- package/dist/components/context-menu.d.mts +91 -0
- package/dist/components/context-menu.mjs +122 -0
- package/dist/components/dialog.d.mts +65 -0
- package/dist/components/dialog.mjs +93 -0
- package/dist/components/drawer.d.mts +65 -0
- package/dist/components/drawer.mjs +78 -0
- package/dist/components/dropdown-menu.d.mts +92 -0
- package/dist/components/dropdown-menu.mjs +129 -0
- package/dist/components/empty.d.mts +44 -0
- package/dist/components/empty.mjs +64 -0
- package/dist/components/field.d.mts +79 -0
- package/dist/components/field.mjs +132 -0
- package/dist/components/form.d.mts +48 -0
- package/dist/components/form.mjs +92 -0
- package/dist/components/hover-card.d.mts +26 -0
- package/dist/components/hover-card.mjs +35 -0
- package/dist/components/input-group.d.mts +61 -0
- package/dist/components/input-group.mjs +142 -0
- package/dist/components/input-number.d.mts +28 -0
- package/dist/components/input-number.mjs +61 -0
- package/dist/components/input-otp.d.mts +29 -0
- package/dist/components/input-otp.mjs +48 -0
- package/dist/components/input-password.d.mts +13 -0
- package/dist/components/input-password.mjs +38 -0
- package/dist/components/input-search.d.mts +20 -0
- package/dist/components/input-search.mjs +50 -0
- package/dist/components/input.d.mts +11 -0
- package/dist/components/input.mjs +14 -0
- package/dist/components/item.d.mts +82 -0
- package/dist/components/item.mjs +137 -0
- package/dist/components/kbd.d.mts +15 -0
- package/dist/components/kbd.mjs +19 -0
- package/dist/components/label.d.mts +11 -0
- package/dist/components/label.mjs +14 -0
- package/dist/components/menubar.d.mts +100 -0
- package/dist/components/menubar.mjs +133 -0
- package/dist/components/native-select.d.mts +19 -0
- package/dist/components/native-select.mjs +34 -0
- package/dist/components/navigation-menu.d.mts +44 -0
- package/dist/components/navigation-menu.mjs +79 -0
- package/dist/components/pagination.d.mts +46 -0
- package/dist/components/pagination.mjs +71 -0
- package/dist/components/popover.d.mts +30 -0
- package/dist/components/popover.mjs +41 -0
- package/dist/components/progress-circle.d.mts +124 -0
- package/dist/components/progress-circle.mjs +120 -0
- package/dist/components/progress.d.mts +12 -0
- package/dist/components/progress.mjs +19 -0
- package/dist/components/{radio-cards.d.ts → radio-cards.d.mts} +10 -5
- package/dist/components/radio-cards.mjs +29 -0
- package/dist/components/radio-group.d.mts +16 -0
- package/dist/components/radio-group.mjs +25 -0
- package/dist/components/radio.d.mts +14 -0
- package/dist/components/radio.mjs +16 -0
- package/dist/components/resizable.d.mts +23 -0
- package/dist/components/resizable.mjs +32 -0
- package/dist/components/scroll-area.d.mts +40 -0
- package/dist/components/scroll-area.mjs +101 -0
- package/dist/components/select.d.mts +62 -0
- package/dist/components/select.mjs +101 -0
- package/dist/components/separator.d.mts +32 -0
- package/dist/components/separator.mjs +45 -0
- package/dist/components/sheet.d.mts +75 -0
- package/dist/components/sheet.mjs +134 -0
- package/dist/components/sidebar.d.mts +195 -0
- package/dist/components/sidebar.mjs +375 -0
- package/dist/components/skeleton.d.mts +10 -0
- package/dist/components/skeleton.mjs +12 -0
- package/dist/components/slider.d.mts +15 -0
- package/dist/components/slider.mjs +40 -0
- package/dist/components/sonner.d.mts +10 -0
- package/dist/components/sonner.mjs +21 -0
- package/dist/components/spinner.d.mts +14 -0
- package/dist/components/spinner.mjs +40 -0
- package/dist/components/switch.d.mts +11 -0
- package/dist/components/switch.mjs +18 -0
- package/dist/components/table.d.mts +45 -0
- package/dist/components/table.mjs +65 -0
- package/dist/components/tabs.d.mts +26 -0
- package/dist/components/tabs.mjs +35 -0
- package/dist/components/textarea.d.mts +10 -0
- package/dist/components/textarea.mjs +12 -0
- package/dist/components/toggle-group.d.mts +30 -0
- package/dist/components/toggle-group.mjs +53 -0
- package/dist/components/toggle.d.mts +28 -0
- package/dist/components/toggle.mjs +53 -0
- package/dist/components/tooltip.d.mts +30 -0
- package/dist/components/tooltip.mjs +42 -0
- package/dist/hooks/{use-animated-value.d.ts → use-animated-value.d.mts} +4 -2
- package/dist/hooks/use-animated-value.mjs +62 -0
- package/dist/hooks/{use-copy-to-clipboard.d.ts → use-copy-to-clipboard.d.mts} +11 -6
- package/dist/hooks/use-copy-to-clipboard.mjs +43 -0
- package/dist/hooks/{use-is-mobile.d.ts → use-is-mobile.d.mts} +4 -2
- package/dist/hooks/use-is-mobile.mjs +26 -0
- package/dist/hooks/{use-media-query.d.ts → use-media-query.d.mts} +4 -2
- package/dist/hooks/use-media-query.mjs +50 -0
- package/dist/hooks/{use-mutation-observer.d.ts → use-mutation-observer.d.mts} +6 -3
- package/dist/hooks/use-mutation-observer.mjs +41 -0
- package/dist/hooks/use-pagination.d.mts +44 -0
- package/dist/hooks/use-pagination.mjs +107 -0
- package/dist/index.d.mts +69 -0
- package/dist/index.mjs +69 -0
- package/dist/lib/utils.d.mts +13 -0
- package/dist/lib/utils.mjs +10 -0
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/clsx.d.mts +6 -0
- package/dist/primitives/checkbox-group.d.mts +144 -0
- package/dist/primitives/checkbox-group.mjs +126 -0
- package/dist/primitives/input-number.d.mts +73 -0
- package/dist/primitives/input-number.mjs +514 -0
- package/dist/primitives/input.d.mts +72 -0
- package/dist/primitives/input.mjs +75 -0
- package/dist/primitives/progress-circle.d.mts +146 -0
- package/dist/primitives/progress-circle.mjs +178 -0
- package/package.json +164 -170
- package/dist/components/accordion.d.ts +0 -19
- package/dist/components/accordion.d.ts.map +0 -1
- package/dist/components/accordion.js +0 -26
- package/dist/components/alert-dialog.d.ts +0 -39
- package/dist/components/alert-dialog.d.ts.map +0 -1
- package/dist/components/alert-dialog.js +0 -39
- package/dist/components/alert.d.ts +0 -19
- package/dist/components/alert.d.ts.map +0 -1
- package/dist/components/alert.js +0 -41
- package/dist/components/aspect-ratio.d.ts +0 -7
- package/dist/components/aspect-ratio.d.ts.map +0 -1
- package/dist/components/aspect-ratio.js +0 -10
- package/dist/components/avatar.d.ts +0 -11
- package/dist/components/avatar.d.ts.map +0 -1
- package/dist/components/avatar.js +0 -17
- package/dist/components/badge.d.ts +0 -18
- package/dist/components/badge.d.ts.map +0 -1
- package/dist/components/badge.js +0 -59
- package/dist/components/breadcrumb.d.ts +0 -22
- package/dist/components/breadcrumb.d.ts.map +0 -1
- package/dist/components/breadcrumb.js +0 -31
- package/dist/components/button-group.d.ts +0 -20
- package/dist/components/button-group.d.ts.map +0 -1
- package/dist/components/button-group.js +0 -48
- package/dist/components/button.d.ts +0 -29
- package/dist/components/button.d.ts.map +0 -1
- package/dist/components/button.js +0 -92
- package/dist/components/calendar.d.ts +0 -13
- package/dist/components/calendar.d.ts.map +0 -1
- package/dist/components/calendar.js +0 -104
- package/dist/components/card.d.ts +0 -18
- package/dist/components/card.d.ts.map +0 -1
- package/dist/components/card.js +0 -27
- package/dist/components/carousel.d.ts +0 -38
- package/dist/components/carousel.d.ts.map +0 -1
- package/dist/components/carousel.js +0 -103
- package/dist/components/chart.d.ts +0 -58
- package/dist/components/chart.d.ts.map +0 -1
- package/dist/components/chart.js +0 -198
- package/dist/components/checkbox-cards.d.ts +0 -11
- package/dist/components/checkbox-cards.d.ts.map +0 -1
- package/dist/components/checkbox-cards.js +0 -16
- package/dist/components/checkbox-group.d.ts +0 -9
- package/dist/components/checkbox-group.d.ts.map +0 -1
- package/dist/components/checkbox-group.js +0 -15
- package/dist/components/checkbox.d.ts +0 -7
- package/dist/components/checkbox.d.ts.map +0 -1
- package/dist/components/checkbox.js +0 -12
- package/dist/components/collapsible.d.ts +0 -11
- package/dist/components/collapsible.d.ts.map +0 -1
- package/dist/components/collapsible.js +0 -16
- package/dist/components/command.d.ts +0 -26
- package/dist/components/command.d.ts.map +0 -1
- package/dist/components/command.js +0 -41
- package/dist/components/context-menu.d.ts +0 -42
- package/dist/components/context-menu.d.ts.map +0 -1
- package/dist/components/context-menu.js +0 -54
- package/dist/components/dialog.d.ts +0 -35
- package/dist/components/dialog.d.ts.map +0 -1
- package/dist/components/dialog.js +0 -41
- package/dist/components/drawer.d.ts +0 -34
- package/dist/components/drawer.d.ts.map +0 -1
- package/dist/components/drawer.js +0 -36
- package/dist/components/dropdown-menu.d.ts +0 -42
- package/dist/components/dropdown-menu.d.ts.map +0 -1
- package/dist/components/dropdown-menu.js +0 -54
- package/dist/components/empty.d.ts +0 -23
- package/dist/components/empty.d.ts.map +0 -1
- package/dist/components/empty.js +0 -47
- package/dist/components/field.d.ts +0 -42
- package/dist/components/field.d.ts.map +0 -1
- package/dist/components/field.js +0 -85
- package/dist/components/form.d.ts +0 -27
- package/dist/components/form.d.ts.map +0 -1
- package/dist/components/form.js +0 -76
- package/dist/components/hover-card.d.ts +0 -13
- package/dist/components/hover-card.d.ts.map +0 -1
- package/dist/components/hover-card.js +0 -20
- package/dist/components/input-group.d.ts +0 -37
- package/dist/components/input-group.d.ts.map +0 -1
- package/dist/components/input-group.js +0 -127
- package/dist/components/input-number.d.ts +0 -8
- package/dist/components/input-number.d.ts.map +0 -1
- package/dist/components/input-number.js +0 -20
- package/dist/components/input-otp.d.ts +0 -16
- package/dist/components/input-otp.d.ts.map +0 -1
- package/dist/components/input-otp.js +0 -25
- package/dist/components/input-password.d.ts +0 -7
- package/dist/components/input-password.d.ts.map +0 -1
- package/dist/components/input-password.js +0 -17
- package/dist/components/input-search.d.ts +0 -11
- package/dist/components/input-search.d.ts.map +0 -1
- package/dist/components/input-search.js +0 -22
- package/dist/components/input.d.ts +0 -6
- package/dist/components/input.d.ts.map +0 -1
- package/dist/components/input.js +0 -10
- package/dist/components/item.d.ts +0 -46
- package/dist/components/item.d.ts.map +0 -1
- package/dist/components/item.js +0 -94
- package/dist/components/kbd.d.ts +0 -8
- package/dist/components/kbd.d.ts.map +0 -1
- package/dist/components/kbd.js +0 -12
- package/dist/components/label.d.ts +0 -7
- package/dist/components/label.d.ts.map +0 -1
- package/dist/components/label.js +0 -11
- package/dist/components/menubar.d.ts +0 -44
- package/dist/components/menubar.d.ts.map +0 -1
- package/dist/components/menubar.js +0 -57
- package/dist/components/native-select.d.ts +0 -10
- package/dist/components/native-select.d.ts.map +0 -1
- package/dist/components/native-select.js +0 -16
- package/dist/components/navigation-menu.d.ts +0 -21
- package/dist/components/navigation-menu.d.ts.map +0 -1
- package/dist/components/navigation-menu.js +0 -43
- package/dist/components/pagination.d.ts +0 -26
- package/dist/components/pagination.d.ts.map +0 -1
- package/dist/components/pagination.js +0 -29
- package/dist/components/popover.d.ts +0 -15
- package/dist/components/popover.d.ts.map +0 -1
- package/dist/components/popover.js +0 -23
- package/dist/components/progress-circle.d.ts +0 -107
- package/dist/components/progress-circle.d.ts.map +0 -1
- package/dist/components/progress-circle.js +0 -83
- package/dist/components/progress.d.ts +0 -7
- package/dist/components/progress.d.ts.map +0 -1
- package/dist/components/progress.js +0 -13
- package/dist/components/radio-cards.d.ts.map +0 -1
- package/dist/components/radio-cards.js +0 -15
- package/dist/components/radio-group.d.ts +0 -9
- package/dist/components/radio-group.d.ts.map +0 -1
- package/dist/components/radio-group.js +0 -14
- package/dist/components/radio.d.ts +0 -8
- package/dist/components/radio.d.ts.map +0 -1
- package/dist/components/radio.js +0 -11
- package/dist/components/resizable.d.ts +0 -13
- package/dist/components/resizable.d.ts.map +0 -1
- package/dist/components/resizable.js +0 -18
- package/dist/components/scroll-area.d.ts +0 -28
- package/dist/components/scroll-area.d.ts.map +0 -1
- package/dist/components/scroll-area.js +0 -77
- package/dist/components/select.d.ts +0 -29
- package/dist/components/select.d.ts.map +0 -1
- package/dist/components/select.js +0 -49
- package/dist/components/separator.d.ts +0 -23
- package/dist/components/separator.d.ts.map +0 -1
- package/dist/components/separator.js +0 -36
- package/dist/components/sheet.d.ts +0 -43
- package/dist/components/sheet.d.ts.map +0 -1
- package/dist/components/sheet.js +0 -90
- package/dist/components/sidebar.d.ts +0 -102
- package/dist/components/sidebar.d.ts.map +0 -1
- package/dist/components/sidebar.js +0 -241
- package/dist/components/skeleton.d.ts +0 -6
- package/dist/components/skeleton.d.ts.map +0 -1
- package/dist/components/skeleton.js +0 -9
- package/dist/components/slider.d.ts +0 -7
- package/dist/components/slider.d.ts.map +0 -1
- package/dist/components/slider.js +0 -18
- package/dist/components/sonner.d.ts +0 -8
- package/dist/components/sonner.d.ts.map +0 -1
- package/dist/components/sonner.js +0 -18
- package/dist/components/spinner.d.ts +0 -8
- package/dist/components/spinner.d.ts.map +0 -1
- package/dist/components/spinner.js +0 -27
- package/dist/components/switch.d.ts +0 -7
- package/dist/components/switch.d.ts.map +0 -1
- package/dist/components/switch.js +0 -11
- package/dist/components/table.d.ts +0 -20
- package/dist/components/table.d.ts.map +0 -1
- package/dist/components/table.js +0 -30
- package/dist/components/tabs.d.ts +0 -13
- package/dist/components/tabs.d.ts.map +0 -1
- package/dist/components/tabs.js +0 -20
- package/dist/components/textarea.d.ts +0 -6
- package/dist/components/textarea.d.ts.map +0 -1
- package/dist/components/textarea.js +0 -9
- package/dist/components/toggle-group.d.ts +0 -16
- package/dist/components/toggle-group.d.ts.map +0 -1
- package/dist/components/toggle-group.js +0 -35
- package/dist/components/toggle.d.ts +0 -21
- package/dist/components/toggle.d.ts.map +0 -1
- package/dist/components/toggle.js +0 -49
- package/dist/components/tooltip.d.ts +0 -15
- package/dist/components/tooltip.d.ts.map +0 -1
- package/dist/components/tooltip.js +0 -23
- package/dist/hooks/use-animated-value.d.ts.map +0 -1
- package/dist/hooks/use-animated-value.js +0 -71
- package/dist/hooks/use-copy-to-clipboard.d.ts.map +0 -1
- package/dist/hooks/use-copy-to-clipboard.js +0 -46
- package/dist/hooks/use-is-mobile.d.ts.map +0 -1
- package/dist/hooks/use-is-mobile.js +0 -23
- package/dist/hooks/use-media-query.d.ts.map +0 -1
- package/dist/hooks/use-media-query.js +0 -53
- package/dist/hooks/use-mutation-observer.d.ts.map +0 -1
- package/dist/hooks/use-mutation-observer.js +0 -40
- package/dist/hooks/use-pagination.d.ts +0 -37
- package/dist/hooks/use-pagination.d.ts.map +0 -1
- package/dist/hooks/use-pagination.js +0 -107
- package/dist/index.d.ts +0 -131
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -68
- package/dist/lib/utils.d.ts +0 -10
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -10
- package/dist/primitives/checkbox-group.d.ts +0 -123
- package/dist/primitives/checkbox-group.d.ts.map +0 -1
- package/dist/primitives/checkbox-group.js +0 -112
- package/dist/primitives/input-number.d.ts +0 -63
- package/dist/primitives/input-number.d.ts.map +0 -1
- package/dist/primitives/input-number.js +0 -458
- package/dist/primitives/input.d.ts +0 -67
- package/dist/primitives/input.d.ts.map +0 -1
- package/dist/primitives/input.js +0 -76
- package/dist/primitives/progress-circle.d.ts +0 -116
- package/dist/primitives/progress-circle.d.ts.map +0 -1
- package/dist/primitives/progress-circle.js +0 -163
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { ComponentProps, JSX } from "react";
|
|
2
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
3
|
+
|
|
4
|
+
//#region src/components/context-menu.d.ts
|
|
5
|
+
type ContextMenuProps = ComponentProps<typeof ContextMenuPrimitive.Root>;
|
|
6
|
+
declare function ContextMenu({
|
|
7
|
+
...props
|
|
8
|
+
}: ContextMenuProps): JSX.Element;
|
|
9
|
+
type ContextMenuTriggerProps = ComponentProps<typeof ContextMenuPrimitive.Trigger>;
|
|
10
|
+
declare function ContextMenuTrigger({
|
|
11
|
+
...props
|
|
12
|
+
}: ContextMenuTriggerProps): JSX.Element;
|
|
13
|
+
type ContextMenuGroupProps = ComponentProps<typeof ContextMenuPrimitive.Group>;
|
|
14
|
+
declare function ContextMenuGroup({
|
|
15
|
+
...props
|
|
16
|
+
}: ContextMenuGroupProps): JSX.Element;
|
|
17
|
+
type ContextMenuSubProps = ComponentProps<typeof ContextMenuPrimitive.Sub>;
|
|
18
|
+
declare function ContextMenuSub({
|
|
19
|
+
...props
|
|
20
|
+
}: ContextMenuSubProps): JSX.Element;
|
|
21
|
+
type ContextMenuRadioGroupProps = ComponentProps<typeof ContextMenuPrimitive.RadioGroup>;
|
|
22
|
+
declare function ContextMenuRadioGroup({
|
|
23
|
+
...props
|
|
24
|
+
}: ContextMenuRadioGroupProps): JSX.Element;
|
|
25
|
+
interface ContextMenuSubTriggerProps extends ComponentProps<typeof ContextMenuPrimitive.SubTrigger> {
|
|
26
|
+
inset?: boolean;
|
|
27
|
+
}
|
|
28
|
+
declare function ContextMenuSubTrigger({
|
|
29
|
+
children,
|
|
30
|
+
className,
|
|
31
|
+
inset,
|
|
32
|
+
...props
|
|
33
|
+
}: ContextMenuSubTriggerProps): JSX.Element;
|
|
34
|
+
type ContextMenuSubContentProps = ComponentProps<typeof ContextMenuPrimitive.SubContent>;
|
|
35
|
+
declare function ContextMenuSubContent({
|
|
36
|
+
className,
|
|
37
|
+
...props
|
|
38
|
+
}: ContextMenuSubContentProps): JSX.Element;
|
|
39
|
+
type ContextMenuContentProps = ComponentProps<typeof ContextMenuPrimitive.Content>;
|
|
40
|
+
declare function ContextMenuContent({
|
|
41
|
+
className,
|
|
42
|
+
...props
|
|
43
|
+
}: ContextMenuContentProps): JSX.Element;
|
|
44
|
+
interface ContextMenuItemProps extends ComponentProps<typeof ContextMenuPrimitive.Item> {
|
|
45
|
+
inset?: boolean;
|
|
46
|
+
variant?: "default" | "destructive";
|
|
47
|
+
}
|
|
48
|
+
declare function ContextMenuItem({
|
|
49
|
+
className,
|
|
50
|
+
inset,
|
|
51
|
+
variant,
|
|
52
|
+
...props
|
|
53
|
+
}: ContextMenuItemProps): JSX.Element;
|
|
54
|
+
type ContextMenuCheckboxItemProps = ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>;
|
|
55
|
+
declare function ContextMenuCheckboxItem({
|
|
56
|
+
checked,
|
|
57
|
+
children,
|
|
58
|
+
className,
|
|
59
|
+
...props
|
|
60
|
+
}: ContextMenuCheckboxItemProps): JSX.Element;
|
|
61
|
+
type ContextMenuRadioItemProps = ComponentProps<typeof ContextMenuPrimitive.RadioItem>;
|
|
62
|
+
declare function ContextMenuRadioItem({
|
|
63
|
+
children,
|
|
64
|
+
className,
|
|
65
|
+
...props
|
|
66
|
+
}: ContextMenuRadioItemProps): JSX.Element;
|
|
67
|
+
interface ContextMenuLabelProps extends ComponentProps<typeof ContextMenuPrimitive.Label> {
|
|
68
|
+
inset?: boolean;
|
|
69
|
+
}
|
|
70
|
+
declare function ContextMenuLabel({
|
|
71
|
+
className,
|
|
72
|
+
inset,
|
|
73
|
+
...props
|
|
74
|
+
}: ContextMenuLabelProps): JSX.Element;
|
|
75
|
+
type ContextMenuSeparatorProps = ComponentProps<typeof ContextMenuPrimitive.Separator>;
|
|
76
|
+
declare function ContextMenuSeparator({
|
|
77
|
+
className,
|
|
78
|
+
...props
|
|
79
|
+
}: ContextMenuSeparatorProps): JSX.Element;
|
|
80
|
+
type ContextMenuShortcutProps = ComponentProps<"span">;
|
|
81
|
+
declare function ContextMenuShortcut({
|
|
82
|
+
className,
|
|
83
|
+
...props
|
|
84
|
+
}: ContextMenuShortcutProps): JSX.Element;
|
|
85
|
+
type ContextMenuArrowProps = ComponentProps<typeof ContextMenuPrimitive.Arrow>;
|
|
86
|
+
declare function ContextMenuArrow({
|
|
87
|
+
className,
|
|
88
|
+
...props
|
|
89
|
+
}: ContextMenuArrowProps): JSX.Element;
|
|
90
|
+
//#endregion
|
|
91
|
+
export { ContextMenu, ContextMenuArrow, type ContextMenuArrowProps, ContextMenuCheckboxItem, type ContextMenuCheckboxItemProps, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, type ContextMenuGroupProps, ContextMenuItem, type ContextMenuItemProps, ContextMenuLabel, type ContextMenuLabelProps, type ContextMenuProps, ContextMenuRadioGroup, type ContextMenuRadioGroupProps, ContextMenuRadioItem, type ContextMenuRadioItemProps, ContextMenuSeparator, type ContextMenuSeparatorProps, ContextMenuShortcut, type ContextMenuShortcutProps, ContextMenuSub, ContextMenuSubContent, type ContextMenuSubContentProps, type ContextMenuSubProps, ContextMenuSubTrigger, type ContextMenuSubTriggerProps, ContextMenuTrigger, type ContextMenuTriggerProps };
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/utils.mjs";
|
|
3
|
+
import { CheckIcon, ChevronRightIcon, DotIcon } from "lucide-react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
6
|
+
//#region src/components/context-menu.tsx
|
|
7
|
+
function ContextMenu({ ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Root, {
|
|
9
|
+
"data-slot": "context-menu",
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function ContextMenuTrigger({ ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Trigger, {
|
|
15
|
+
"data-slot": "context-menu-trigger",
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function ContextMenuGroup({ ...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Group, {
|
|
21
|
+
"data-slot": "context-menu-group",
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function ContextMenuSub({ ...props }) {
|
|
26
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Sub, {
|
|
27
|
+
"data-slot": "context-menu-sub",
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function ContextMenuRadioGroup({ ...props }) {
|
|
32
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.RadioGroup, {
|
|
33
|
+
"data-slot": "context-menu-radio-group",
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function ContextMenuSubTrigger({ children, className, inset, ...props }) {
|
|
38
|
+
return /* @__PURE__ */ jsxs(ContextMenuPrimitive.SubTrigger, {
|
|
39
|
+
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", "[&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
40
|
+
"data-inset": inset,
|
|
41
|
+
"data-slot": "context-menu-sub-trigger",
|
|
42
|
+
...props,
|
|
43
|
+
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: cn("size-4", "ml-auto") })]
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function ContextMenuSubContent({ className, ...props }) {
|
|
47
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(ContextMenuPrimitive.SubContent, {
|
|
48
|
+
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-context-menu-content-transform-origin)", className),
|
|
49
|
+
"data-slot": "context-menu-sub-content",
|
|
50
|
+
...props
|
|
51
|
+
}) });
|
|
52
|
+
}
|
|
53
|
+
function ContextMenuContent({ className, ...props }) {
|
|
54
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(ContextMenuPrimitive.Content, {
|
|
55
|
+
className: cn("z-50", "max-h-(--radix-context-menu-content-available-height) min-w-32 overflow-x-hidden overflow-y-auto 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-context-menu-content-transform-origin)", className),
|
|
56
|
+
"data-slot": "context-menu-content",
|
|
57
|
+
...props
|
|
58
|
+
}) });
|
|
59
|
+
}
|
|
60
|
+
function ContextMenuItem({ className, inset, variant, ...props }) {
|
|
61
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Item, {
|
|
62
|
+
className: cn("group/context-menu-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", "data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80", "[&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "[&_svg:not([class*='text-'])]:text-muted-foreground", className),
|
|
63
|
+
"data-inset": inset,
|
|
64
|
+
"data-slot": "context-menu-item",
|
|
65
|
+
"data-variant": variant,
|
|
66
|
+
...props
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function ContextMenuCheckboxItem({ checked, children, className, ...props }) {
|
|
70
|
+
return /* @__PURE__ */ jsxs(ContextMenuPrimitive.CheckboxItem, {
|
|
71
|
+
checked,
|
|
72
|
+
className: cn("group/context-menu-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),
|
|
73
|
+
"data-slot": "context-menu-checkbox-item",
|
|
74
|
+
...props,
|
|
75
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
76
|
+
className: cn("absolute flex items-center justify-center", "left-2"),
|
|
77
|
+
children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
|
|
78
|
+
}), children]
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function ContextMenuRadioItem({ children, className, ...props }) {
|
|
82
|
+
return /* @__PURE__ */ jsxs(ContextMenuPrimitive.RadioItem, {
|
|
83
|
+
className: cn("group/context-menu-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),
|
|
84
|
+
"data-slot": "context-menu-radio-item",
|
|
85
|
+
...props,
|
|
86
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
87
|
+
className: cn("absolute flex items-center justify-center", "left-2"),
|
|
88
|
+
children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(DotIcon, { className: cn("size-4", "fill-current") }) })
|
|
89
|
+
}), children]
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
function ContextMenuLabel({ className, inset, ...props }) {
|
|
93
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Label, {
|
|
94
|
+
className: cn("flex items-center gap-x-2", "px-2 py-1.5", "text-sm font-semibold", "data-inset:pl-8", className),
|
|
95
|
+
"data-inset": inset,
|
|
96
|
+
"data-slot": "context-menu-label",
|
|
97
|
+
...props
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function ContextMenuSeparator({ className, ...props }) {
|
|
101
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Separator, {
|
|
102
|
+
className: cn("mx-2 my-1 h-px", "bg-border", className),
|
|
103
|
+
"data-slot": "context-menu-separator",
|
|
104
|
+
...props
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
function ContextMenuShortcut({ className, ...props }) {
|
|
108
|
+
return /* @__PURE__ */ jsx("span", {
|
|
109
|
+
className: cn("ml-auto", "text-xs tracking-widest text-muted-foreground", "group-data-[variant=destructive]/context-menu-item:text-destructive/80", className),
|
|
110
|
+
"data-slot": "context-menu-shortcut",
|
|
111
|
+
...props
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
function ContextMenuArrow({ className, ...props }) {
|
|
115
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Arrow, {
|
|
116
|
+
className: cn("fill-popover", className),
|
|
117
|
+
"data-slot": "context-menu-arrow",
|
|
118
|
+
...props
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
//#endregion
|
|
122
|
+
export { ContextMenu, ContextMenuArrow, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { VariantProps } from "../lib/utils.mjs";
|
|
2
|
+
import { buttonVariants } from "./button.mjs";
|
|
3
|
+
import { ComponentProps, JSX } from "react";
|
|
4
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
5
|
+
|
|
6
|
+
//#region src/components/dialog.d.ts
|
|
7
|
+
type DialogProps = ComponentProps<typeof DialogPrimitive.Root>;
|
|
8
|
+
declare function Dialog({
|
|
9
|
+
...props
|
|
10
|
+
}: DialogProps): JSX.Element;
|
|
11
|
+
type DialogTriggerProps = ComponentProps<typeof DialogPrimitive.Trigger>;
|
|
12
|
+
declare function DialogTrigger({
|
|
13
|
+
...props
|
|
14
|
+
}: DialogTriggerProps): JSX.Element;
|
|
15
|
+
interface DialogContentProps extends ComponentProps<typeof DialogPrimitive.Content> {
|
|
16
|
+
classNames?: {
|
|
17
|
+
close?: string;
|
|
18
|
+
content?: string;
|
|
19
|
+
overlay?: string;
|
|
20
|
+
wrapper?: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
declare function DialogContent({
|
|
24
|
+
children,
|
|
25
|
+
className,
|
|
26
|
+
classNames,
|
|
27
|
+
...props
|
|
28
|
+
}: DialogContentProps): JSX.Element;
|
|
29
|
+
type DialogHeaderProps = ComponentProps<"div">;
|
|
30
|
+
declare function DialogHeader({
|
|
31
|
+
className,
|
|
32
|
+
...props
|
|
33
|
+
}: DialogHeaderProps): JSX.Element;
|
|
34
|
+
type DialogBodyProps = ComponentProps<"div">;
|
|
35
|
+
declare function DialogBody({
|
|
36
|
+
className,
|
|
37
|
+
...props
|
|
38
|
+
}: DialogBodyProps): JSX.Element;
|
|
39
|
+
type DialogFooterProps = ComponentProps<"div">;
|
|
40
|
+
declare function DialogFooter({
|
|
41
|
+
className,
|
|
42
|
+
...props
|
|
43
|
+
}: DialogFooterProps): JSX.Element;
|
|
44
|
+
type DialogTitleProps = ComponentProps<typeof DialogPrimitive.Title>;
|
|
45
|
+
declare function DialogTitle({
|
|
46
|
+
className,
|
|
47
|
+
...props
|
|
48
|
+
}: DialogTitleProps): JSX.Element;
|
|
49
|
+
type DialogDescriptionProps = ComponentProps<typeof DialogPrimitive.Description>;
|
|
50
|
+
declare function DialogDescription({
|
|
51
|
+
className,
|
|
52
|
+
...props
|
|
53
|
+
}: DialogDescriptionProps): JSX.Element;
|
|
54
|
+
interface DialogCloseProps extends Omit<ComponentProps<typeof DialogPrimitive.Close>, "ref"> {
|
|
55
|
+
size?: VariantProps<typeof buttonVariants>["size"];
|
|
56
|
+
variant?: VariantProps<typeof buttonVariants>["variant"];
|
|
57
|
+
}
|
|
58
|
+
declare function DialogClose({
|
|
59
|
+
className,
|
|
60
|
+
size,
|
|
61
|
+
variant,
|
|
62
|
+
...props
|
|
63
|
+
}: DialogCloseProps): JSX.Element;
|
|
64
|
+
//#endregion
|
|
65
|
+
export { Dialog, DialogBody, type DialogBodyProps, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, type DialogProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/utils.mjs";
|
|
3
|
+
import { buttonVariants } from "./button.mjs";
|
|
4
|
+
import { XIcon } from "lucide-react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
7
|
+
//#region src/components/dialog.tsx
|
|
8
|
+
function Dialog({ ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Root, {
|
|
10
|
+
"data-slot": "dialog",
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function DialogTrigger({ ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, {
|
|
16
|
+
"data-slot": "dialog-trigger",
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function DialogContent({ children, className, classNames, ...props }) {
|
|
21
|
+
return /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { children: [/* @__PURE__ */ jsx(DialogPrimitive.Overlay, {
|
|
22
|
+
className: cn("fixed inset-0 z-50", "bg-black/50", "ease-ui data-open:animate-in data-open:fade-in-0", "data-closed:animate-out data-closed:fade-out-0", classNames?.overlay),
|
|
23
|
+
"data-slot": "dialog-overlay"
|
|
24
|
+
}), /* @__PURE__ */ jsx(DialogPrimitive.Content, {
|
|
25
|
+
className: cn("fixed inset-0 z-50 grid grid-rows-[1fr_auto] justify-items-center overflow-auto", "sm:grid-rows-[1fr_auto_3fr] sm:p-4", "ease-ui data-open:animate-in", "max-sm:data-open:animation-duration-500 max-sm:data-open:slide-in-from-bottom", "sm:data-open:fade-in-0 sm:data-open:zoom-in-95", "data-closed:animate-out", "max-sm:data-closed:animation-duration-500 max-sm:data-closed:slide-out-to-bottom", "sm:data-closed:fade-out-0 sm:data-closed:zoom-out-95", classNames?.wrapper),
|
|
26
|
+
"data-slot": "dialog-content-wrapper",
|
|
27
|
+
...props,
|
|
28
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
29
|
+
className: cn("relative row-start-2 flex w-full flex-col", "rounded-t-2xl border", "bg-popover text-popover-foreground shadow-lg", "sm:max-w-lg sm:rounded-2xl", classNames?.content, className),
|
|
30
|
+
"data-slot": "dialog-content",
|
|
31
|
+
children: [children, /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
|
|
32
|
+
className: buttonVariants({
|
|
33
|
+
className: ["absolute top-2.5 right-2.5 size-7", classNames?.close],
|
|
34
|
+
size: "icon",
|
|
35
|
+
variant: "ghost"
|
|
36
|
+
}),
|
|
37
|
+
"data-slot": "dialog-close",
|
|
38
|
+
children: [/* @__PURE__ */ jsx(XIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
|
|
39
|
+
className: "sr-only",
|
|
40
|
+
children: "Close"
|
|
41
|
+
})]
|
|
42
|
+
})]
|
|
43
|
+
})
|
|
44
|
+
})] });
|
|
45
|
+
}
|
|
46
|
+
function DialogHeader({ className, ...props }) {
|
|
47
|
+
return /* @__PURE__ */ jsx("header", {
|
|
48
|
+
className: cn("flex shrink-0 flex-col gap-1.5 px-6 pt-6 pb-2 text-center", "sm:text-left", className),
|
|
49
|
+
"data-slot": "dialog-header",
|
|
50
|
+
...props
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function DialogBody({ className, ...props }) {
|
|
54
|
+
return /* @__PURE__ */ jsx("main", {
|
|
55
|
+
className: cn("overflow-auto", "px-6 py-2", className),
|
|
56
|
+
"data-slot": "dialog-body",
|
|
57
|
+
...props
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function DialogFooter({ className, ...props }) {
|
|
61
|
+
return /* @__PURE__ */ jsx("footer", {
|
|
62
|
+
className: cn("flex shrink-0 flex-col-reverse gap-2 px-6 pt-2 pb-6", "sm:flex-row sm:justify-end", className),
|
|
63
|
+
"data-slot": "dialog-footer",
|
|
64
|
+
...props
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function DialogTitle({ className, ...props }) {
|
|
68
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Title, {
|
|
69
|
+
className: cn("text-lg leading-none font-semibold tracking-tight", className),
|
|
70
|
+
"data-slot": "dialog-title",
|
|
71
|
+
...props
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function DialogDescription({ className, ...props }) {
|
|
75
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Description, {
|
|
76
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
77
|
+
"data-slot": "dialog-description",
|
|
78
|
+
...props
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function DialogClose({ className, size, variant = "outline", ...props }) {
|
|
82
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Close, {
|
|
83
|
+
className: buttonVariants({
|
|
84
|
+
className,
|
|
85
|
+
size,
|
|
86
|
+
variant
|
|
87
|
+
}),
|
|
88
|
+
"data-slot": "dialog-close",
|
|
89
|
+
...props
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { VariantProps } from "../lib/utils.mjs";
|
|
2
|
+
import { buttonVariants } from "./button.mjs";
|
|
3
|
+
import { ComponentProps, JSX } from "react";
|
|
4
|
+
import { Drawer as Drawer$1 } from "vaul";
|
|
5
|
+
|
|
6
|
+
//#region src/components/drawer.d.ts
|
|
7
|
+
type DrawerProps = ComponentProps<typeof Drawer$1.Root>;
|
|
8
|
+
declare function Drawer({
|
|
9
|
+
shouldScaleBackground,
|
|
10
|
+
...props
|
|
11
|
+
}: DrawerProps): JSX.Element;
|
|
12
|
+
type DrawerTriggerProps = ComponentProps<typeof Drawer$1.Trigger>;
|
|
13
|
+
declare function DrawerTrigger({
|
|
14
|
+
...props
|
|
15
|
+
}: DrawerTriggerProps): JSX.Element;
|
|
16
|
+
interface DrawerContentProps extends ComponentProps<typeof Drawer$1.Content> {
|
|
17
|
+
classNames?: {
|
|
18
|
+
content?: string;
|
|
19
|
+
handle?: string;
|
|
20
|
+
overlay?: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
declare function DrawerContent({
|
|
24
|
+
children,
|
|
25
|
+
className,
|
|
26
|
+
classNames,
|
|
27
|
+
...props
|
|
28
|
+
}: DrawerContentProps): JSX.Element;
|
|
29
|
+
type DrawerHeaderProps = ComponentProps<"div">;
|
|
30
|
+
declare function DrawerHeader({
|
|
31
|
+
className,
|
|
32
|
+
...props
|
|
33
|
+
}: DrawerHeaderProps): JSX.Element;
|
|
34
|
+
type DrawerBodyProps = ComponentProps<"div">;
|
|
35
|
+
declare function DrawerBody({
|
|
36
|
+
className,
|
|
37
|
+
...props
|
|
38
|
+
}: DrawerBodyProps): JSX.Element;
|
|
39
|
+
type DrawerFooterProps = ComponentProps<"div">;
|
|
40
|
+
declare function DrawerFooter({
|
|
41
|
+
className,
|
|
42
|
+
...props
|
|
43
|
+
}: DrawerFooterProps): JSX.Element;
|
|
44
|
+
type DrawerTitleProps = ComponentProps<typeof Drawer$1.Title>;
|
|
45
|
+
declare function DrawerTitle({
|
|
46
|
+
className,
|
|
47
|
+
...props
|
|
48
|
+
}: DrawerTitleProps): JSX.Element;
|
|
49
|
+
type DrawerDescriptionProps = ComponentProps<typeof Drawer$1.Description>;
|
|
50
|
+
declare function DrawerDescription({
|
|
51
|
+
className,
|
|
52
|
+
...props
|
|
53
|
+
}: DrawerDescriptionProps): JSX.Element;
|
|
54
|
+
interface DrawerCloseProps extends ComponentProps<typeof Drawer$1.Close> {
|
|
55
|
+
size?: VariantProps<typeof buttonVariants>["size"];
|
|
56
|
+
variant?: VariantProps<typeof buttonVariants>["variant"];
|
|
57
|
+
}
|
|
58
|
+
declare function DrawerClose({
|
|
59
|
+
className,
|
|
60
|
+
size,
|
|
61
|
+
variant,
|
|
62
|
+
...props
|
|
63
|
+
}: DrawerCloseProps): JSX.Element;
|
|
64
|
+
//#endregion
|
|
65
|
+
export { Drawer, DrawerBody, type DrawerBodyProps, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/utils.mjs";
|
|
3
|
+
import { buttonVariants } from "./button.mjs";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Drawer as Drawer$1 } from "vaul";
|
|
6
|
+
//#region src/components/drawer.tsx
|
|
7
|
+
function Drawer({ shouldScaleBackground = true, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Drawer$1.Root, {
|
|
9
|
+
"data-slot": "drawer",
|
|
10
|
+
shouldScaleBackground,
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function DrawerTrigger({ ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx(Drawer$1.Trigger, {
|
|
16
|
+
"data-slot": "drawer-trigger",
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function DrawerContent({ children, className, classNames, ...props }) {
|
|
21
|
+
return /* @__PURE__ */ jsxs(Drawer$1.Portal, { children: [/* @__PURE__ */ jsx(Drawer$1.Overlay, {
|
|
22
|
+
className: cn("fixed inset-0 z-50", "bg-black/50", classNames?.overlay),
|
|
23
|
+
"data-slot": "drawer-overlay"
|
|
24
|
+
}), /* @__PURE__ */ jsxs(Drawer$1.Content, {
|
|
25
|
+
className: cn("group/drawer-content fixed z-50 flex h-auto flex-col", "bg-background", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-2xl", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-2xl", "data-[vaul-drawer-direction=left]:sm:max-w-sm", "data-[vaul-drawer-direction=right]:sm:max-w-sm", classNames?.content, className),
|
|
26
|
+
"data-slot": "drawer-content",
|
|
27
|
+
...props,
|
|
28
|
+
children: [/* @__PURE__ */ jsx("div", { className: cn("hidden", "mx-auto mt-4 h-1.5 w-12 shrink-0", "rounded-full", "bg-muted", "group-data-[vaul-drawer-direction=bottom]/drawer-content:block", classNames?.handle) }), children]
|
|
29
|
+
})] });
|
|
30
|
+
}
|
|
31
|
+
function DrawerHeader({ className, ...props }) {
|
|
32
|
+
return /* @__PURE__ */ jsx("div", {
|
|
33
|
+
className: cn("flex flex-col gap-1.5", "p-4", className),
|
|
34
|
+
"data-slot": "drawer-header",
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function DrawerBody({ className, ...props }) {
|
|
39
|
+
return /* @__PURE__ */ jsx("main", {
|
|
40
|
+
className: cn("overflow-auto", "px-6 py-2", className),
|
|
41
|
+
"data-slot": "drawer-body",
|
|
42
|
+
...props
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function DrawerFooter({ className, ...props }) {
|
|
46
|
+
return /* @__PURE__ */ jsx("div", {
|
|
47
|
+
className: cn("flex flex-col gap-2", "mt-auto p-4", className),
|
|
48
|
+
"data-slot": "drawer-footer",
|
|
49
|
+
...props
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function DrawerTitle({ className, ...props }) {
|
|
53
|
+
return /* @__PURE__ */ jsx(Drawer$1.Title, {
|
|
54
|
+
className: cn("font-semibold text-foreground", className),
|
|
55
|
+
"data-slot": "drawer-title",
|
|
56
|
+
...props
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function DrawerDescription({ className, ...props }) {
|
|
60
|
+
return /* @__PURE__ */ jsx(Drawer$1.Description, {
|
|
61
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
62
|
+
"data-slot": "drawer-description",
|
|
63
|
+
...props
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function DrawerClose({ className, size, variant = "outline", ...props }) {
|
|
67
|
+
return /* @__PURE__ */ jsx(Drawer$1.Close, {
|
|
68
|
+
className: buttonVariants({
|
|
69
|
+
className,
|
|
70
|
+
size,
|
|
71
|
+
variant
|
|
72
|
+
}),
|
|
73
|
+
"data-slot": "drawer-close",
|
|
74
|
+
...props
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
78
|
+
export { Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { ComponentProps, JSX } from "react";
|
|
2
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3
|
+
|
|
4
|
+
//#region src/components/dropdown-menu.d.ts
|
|
5
|
+
type DropdownMenuProps = ComponentProps<typeof DropdownMenuPrimitive.Root>;
|
|
6
|
+
declare function DropdownMenu({
|
|
7
|
+
...props
|
|
8
|
+
}: DropdownMenuProps): JSX.Element;
|
|
9
|
+
type DropdownMenuTriggerProps = ComponentProps<typeof DropdownMenuPrimitive.Trigger>;
|
|
10
|
+
declare function DropdownMenuTrigger({
|
|
11
|
+
...props
|
|
12
|
+
}: DropdownMenuTriggerProps): JSX.Element;
|
|
13
|
+
type DropdownMenuGroupProps = ComponentProps<typeof DropdownMenuPrimitive.Group>;
|
|
14
|
+
declare function DropdownMenuGroup({
|
|
15
|
+
...props
|
|
16
|
+
}: DropdownMenuGroupProps): JSX.Element;
|
|
17
|
+
type DropdownMenuSubProps = ComponentProps<typeof DropdownMenuPrimitive.Sub>;
|
|
18
|
+
declare function DropdownMenuSub({
|
|
19
|
+
...props
|
|
20
|
+
}: DropdownMenuSubProps): JSX.Element;
|
|
21
|
+
type DropdownMenuRadioGroupProps = ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>;
|
|
22
|
+
declare function DropdownMenuRadioGroup({
|
|
23
|
+
...props
|
|
24
|
+
}: DropdownMenuRadioGroupProps): JSX.Element;
|
|
25
|
+
interface DropdownMenuSubTriggerProps extends ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> {
|
|
26
|
+
inset?: boolean;
|
|
27
|
+
}
|
|
28
|
+
declare function DropdownMenuSubTrigger({
|
|
29
|
+
children,
|
|
30
|
+
className,
|
|
31
|
+
inset,
|
|
32
|
+
...props
|
|
33
|
+
}: DropdownMenuSubTriggerProps): JSX.Element;
|
|
34
|
+
type DropdownMenuSubContentProps = ComponentProps<typeof DropdownMenuPrimitive.SubContent>;
|
|
35
|
+
declare function DropdownMenuSubContent({
|
|
36
|
+
className,
|
|
37
|
+
...props
|
|
38
|
+
}: DropdownMenuSubContentProps): JSX.Element;
|
|
39
|
+
type DropdownMenuContentProps = ComponentProps<typeof DropdownMenuPrimitive.Content>;
|
|
40
|
+
declare function DropdownMenuContent({
|
|
41
|
+
className,
|
|
42
|
+
sideOffset,
|
|
43
|
+
...props
|
|
44
|
+
}: DropdownMenuContentProps): JSX.Element;
|
|
45
|
+
interface DropdownMenuItemProps extends ComponentProps<typeof DropdownMenuPrimitive.Item> {
|
|
46
|
+
inset?: boolean;
|
|
47
|
+
variant?: "default" | "destructive";
|
|
48
|
+
}
|
|
49
|
+
declare function DropdownMenuItem({
|
|
50
|
+
className,
|
|
51
|
+
inset,
|
|
52
|
+
variant,
|
|
53
|
+
...props
|
|
54
|
+
}: DropdownMenuItemProps): JSX.Element;
|
|
55
|
+
type DropdownMenuCheckboxItemProps = ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>;
|
|
56
|
+
declare function DropdownMenuCheckboxItem({
|
|
57
|
+
checked,
|
|
58
|
+
children,
|
|
59
|
+
className,
|
|
60
|
+
...props
|
|
61
|
+
}: DropdownMenuCheckboxItemProps): JSX.Element;
|
|
62
|
+
type DropdownMenuRadioItemProps = ComponentProps<typeof DropdownMenuPrimitive.RadioItem>;
|
|
63
|
+
declare function DropdownMenuRadioItem({
|
|
64
|
+
children,
|
|
65
|
+
className,
|
|
66
|
+
...props
|
|
67
|
+
}: DropdownMenuRadioItemProps): JSX.Element;
|
|
68
|
+
interface DropdownMenuLabelProps extends ComponentProps<typeof DropdownMenuPrimitive.Label> {
|
|
69
|
+
inset?: boolean;
|
|
70
|
+
}
|
|
71
|
+
declare function DropdownMenuLabel({
|
|
72
|
+
className,
|
|
73
|
+
inset,
|
|
74
|
+
...props
|
|
75
|
+
}: DropdownMenuLabelProps): JSX.Element;
|
|
76
|
+
type DropdownMenuSeparatorProps = ComponentProps<typeof DropdownMenuPrimitive.Separator>;
|
|
77
|
+
declare function DropdownMenuSeparator({
|
|
78
|
+
className,
|
|
79
|
+
...props
|
|
80
|
+
}: DropdownMenuSeparatorProps): JSX.Element;
|
|
81
|
+
type DropdownMenuShortcutProps = ComponentProps<"span">;
|
|
82
|
+
declare function DropdownMenuShortcut({
|
|
83
|
+
className,
|
|
84
|
+
...props
|
|
85
|
+
}: DropdownMenuShortcutProps): JSX.Element;
|
|
86
|
+
type DropdownMenuArrowProps = ComponentProps<typeof DropdownMenuPrimitive.Arrow>;
|
|
87
|
+
declare function DropdownMenuArrow({
|
|
88
|
+
className,
|
|
89
|
+
...props
|
|
90
|
+
}: DropdownMenuArrowProps): JSX.Element;
|
|
91
|
+
//#endregion
|
|
92
|
+
export { DropdownMenu, DropdownMenuArrow, type DropdownMenuArrowProps, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps };
|