@ptengine/design-components 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +309 -0
- package/components.json +21 -0
- package/dist/components/ui/accordion.d.ts +8 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +21 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert.d.ts +9 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +4 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/attachment.d.ts +26 -0
- package/dist/components/ui/attachment.d.ts.map +1 -0
- package/dist/components/ui/avatar.d.ts +10 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +22 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/bubble.d.ts +19 -0
- package/dist/components/ui/bubble.d.ts.map +1 -0
- package/dist/components/ui/button-group.d.ts +13 -0
- package/dist/components/ui/button-group.d.ts.map +1 -0
- package/dist/components/ui/button.d.ts +13 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/calendar.d.ts +9 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/carousel.d.ts +23 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/chart.d.ts +63 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/command.d.ts +81 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/context-menu.d.ts +28 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/dialog.d.ts +22 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/direction.d.ts +8 -0
- package/dist/components/ui/direction.d.ts.map +1 -0
- package/dist/components/ui/drawer.d.ts +23 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +28 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/empty.d.ts +13 -0
- package/dist/components/ui/empty.d.ts.map +1 -0
- package/dist/components/ui/field.d.ts +25 -0
- package/dist/components/ui/field.d.ts.map +1 -0
- package/dist/components/ui/hover-card.d.ts +7 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/input-group.d.ts +13 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-otp.d.ts +35 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/item.d.ts +24 -0
- package/dist/components/ui/item.d.ts.map +1 -0
- package/dist/components/ui/kbd.d.ts +5 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/label.d.ts +6 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/marker.d.ts +13 -0
- package/dist/components/ui/marker.d.ts.map +1 -0
- package/dist/components/ui/menubar.d.ts +29 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/message-scroller.d.ts +26 -0
- package/dist/components/ui/message-scroller.d.ts.map +1 -0
- package/dist/components/ui/message.d.ts +11 -0
- package/dist/components/ui/message.d.ts.map +1 -0
- package/dist/components/ui/native-select.d.ts +4 -0
- package/dist/components/ui/native-select.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +13 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/pagination.d.ts +35 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/popover.d.ts +8 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/progress.d.ts +5 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/radio-group.d.ts +6 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/resizable.d.ts +24 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/search-input.d.ts +23 -0
- package/dist/components/ui/search-input.d.ts.map +1 -0
- package/dist/components/ui/select.d.ts +14 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/sheet.d.ts +28 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sidebar.d.ts +70 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/skeleton.d.ts +4 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/slider.d.ts +5 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/sonner.d.ts +6 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/spinner.d.ts +7 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/tabs.d.ts +13 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/textarea.d.ts +5 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +13 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle.d.ts +13 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/index.cjs +82 -0
- package/dist/index.d.ts +71 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20969 -0
- package/dist/lib/utils.d.ts +4 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/llms.txt +173 -0
- package/package.json +125 -0
- package/src/components/ui/accordion.tsx +51 -0
- package/src/components/ui/alert-dialog.tsx +115 -0
- package/src/components/ui/alert.tsx +48 -0
- package/src/components/ui/aspect-ratio.tsx +5 -0
- package/src/components/ui/attachment.tsx +186 -0
- package/src/components/ui/avatar.tsx +57 -0
- package/src/components/ui/badge.tsx +40 -0
- package/src/components/ui/breadcrumb.tsx +101 -0
- package/src/components/ui/bubble.tsx +123 -0
- package/src/components/ui/button-group.tsx +74 -0
- package/src/components/ui/button.tsx +64 -0
- package/src/components/ui/calendar.tsx +63 -0
- package/src/components/ui/card.tsx +55 -0
- package/src/components/ui/carousel.tsx +252 -0
- package/src/components/ui/chart.tsx +323 -0
- package/src/components/ui/checkbox.tsx +26 -0
- package/src/components/ui/collapsible.tsx +9 -0
- package/src/components/ui/command.tsx +136 -0
- package/src/components/ui/context-menu.tsx +187 -0
- package/src/components/ui/dialog.tsx +103 -0
- package/src/components/ui/direction.tsx +15 -0
- package/src/components/ui/drawer.tsx +98 -0
- package/src/components/ui/dropdown-menu.tsx +186 -0
- package/src/components/ui/empty.tsx +75 -0
- package/src/components/ui/field.tsx +175 -0
- package/src/components/ui/hover-card.tsx +27 -0
- package/src/components/ui/input-group.tsx +80 -0
- package/src/components/ui/input-otp.tsx +67 -0
- package/src/components/ui/input.tsx +24 -0
- package/src/components/ui/item.tsx +118 -0
- package/src/components/ui/kbd.tsx +21 -0
- package/src/components/ui/label.tsx +19 -0
- package/src/components/ui/marker.tsx +67 -0
- package/src/components/ui/menubar.tsx +218 -0
- package/src/components/ui/message-scroller.tsx +206 -0
- package/src/components/ui/message.tsx +85 -0
- package/src/components/ui/native-select.tsx +29 -0
- package/src/components/ui/navigation-menu.tsx +120 -0
- package/src/components/ui/pagination.tsx +108 -0
- package/src/components/ui/popover.tsx +31 -0
- package/src/components/ui/progress.tsx +23 -0
- package/src/components/ui/radio-group.tsx +36 -0
- package/src/components/ui/resizable.tsx +40 -0
- package/src/components/ui/scroll-area.tsx +44 -0
- package/src/components/ui/search-input.tsx +97 -0
- package/src/components/ui/select.tsx +151 -0
- package/src/components/ui/separator.tsx +24 -0
- package/src/components/ui/sheet.tsx +124 -0
- package/src/components/ui/sidebar.tsx +704 -0
- package/src/components/ui/skeleton.tsx +9 -0
- package/src/components/ui/slider.tsx +41 -0
- package/src/components/ui/sonner.tsx +45 -0
- package/src/components/ui/spinner.tsx +21 -0
- package/src/components/ui/switch.tsx +27 -0
- package/src/components/ui/table.tsx +95 -0
- package/src/components/ui/tabs.tsx +119 -0
- package/src/components/ui/textarea.tsx +23 -0
- package/src/components/ui/toggle-group.tsx +55 -0
- package/src/components/ui/toggle.tsx +40 -0
- package/src/components/ui/tooltip.tsx +30 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/index.ts +414 -0
- package/src/lib/utils.ts +7 -0
- package/src/styles/tokens.css +360 -0
- package/tailwind.preset.js +235 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
+
import { Check } from 'lucide-react';
|
|
4
|
+
|
|
5
|
+
import { cn } from '../../lib/utils';
|
|
6
|
+
|
|
7
|
+
const Checkbox = React.forwardRef<
|
|
8
|
+
React.ElementRef<typeof CheckboxPrimitive.Root>,
|
|
9
|
+
React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
|
|
10
|
+
>(({ className, ...props }, ref) => (
|
|
11
|
+
<CheckboxPrimitive.Root
|
|
12
|
+
ref={ref}
|
|
13
|
+
className={cn(
|
|
14
|
+
'peer h-[16px] w-[16px] shrink-0 rounded-[var(--pt-radius-sm)] border border-neutral transition-colors enabled:hover:border-strong data-[state=unchecked]:enabled:active:bg-press focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:border-weak disabled:bg-disable disabled:text-disabled enabled:data-[state=checked]:border-primary enabled:data-[state=checked]:bg-primary enabled:data-[state=checked]:text-primary-foreground',
|
|
15
|
+
className
|
|
16
|
+
)}
|
|
17
|
+
{...props}
|
|
18
|
+
>
|
|
19
|
+
<CheckboxPrimitive.Indicator className={cn('flex items-center justify-center text-current')}>
|
|
20
|
+
<Check className="h-[16px] w-[16px]" />
|
|
21
|
+
</CheckboxPrimitive.Indicator>
|
|
22
|
+
</CheckboxPrimitive.Root>
|
|
23
|
+
));
|
|
24
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
25
|
+
|
|
26
|
+
export { Checkbox };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
2
|
+
|
|
3
|
+
const Collapsible = CollapsiblePrimitive.Root;
|
|
4
|
+
|
|
5
|
+
const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
|
|
6
|
+
|
|
7
|
+
const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
|
|
8
|
+
|
|
9
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type DialogProps } from '@radix-ui/react-dialog';
|
|
3
|
+
import { Command as CommandPrimitive } from 'cmdk';
|
|
4
|
+
import { Search } from 'lucide-react';
|
|
5
|
+
|
|
6
|
+
import { cn } from '../../lib/utils';
|
|
7
|
+
import { Dialog, DialogContent } from './dialog';
|
|
8
|
+
|
|
9
|
+
const Command = React.forwardRef<
|
|
10
|
+
React.ElementRef<typeof CommandPrimitive>,
|
|
11
|
+
React.ComponentPropsWithoutRef<typeof CommandPrimitive>
|
|
12
|
+
>(({ className, ...props }, ref) => (
|
|
13
|
+
<CommandPrimitive
|
|
14
|
+
ref={ref}
|
|
15
|
+
className={cn(
|
|
16
|
+
'flex h-full w-full flex-col overflow-hidden rounded-[var(--pt-radius-md)] bg-popover text-popover-foreground',
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...props}
|
|
20
|
+
/>
|
|
21
|
+
));
|
|
22
|
+
Command.displayName = CommandPrimitive.displayName;
|
|
23
|
+
|
|
24
|
+
const CommandDialog = ({ children, ...props }: DialogProps) => {
|
|
25
|
+
return (
|
|
26
|
+
<Dialog {...props}>
|
|
27
|
+
<DialogContent className="overflow-hidden p-0">
|
|
28
|
+
<Command className="[&_[cmdk-group-heading]]:px-[8px] [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-[8px] [&_[cmdk-input-wrapper]_svg]:h-[20px] [&_[cmdk-input-wrapper]_svg]:w-[20px] [&_[cmdk-input]]:h-[48px] [&_[cmdk-item]]:px-[8px] [&_[cmdk-item]]:py-[12px] [&_[cmdk-item]_svg]:h-[20px] [&_[cmdk-item]_svg]:w-[20px]">
|
|
29
|
+
{children}
|
|
30
|
+
</Command>
|
|
31
|
+
</DialogContent>
|
|
32
|
+
</Dialog>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const CommandInput = React.forwardRef<
|
|
37
|
+
React.ElementRef<typeof CommandPrimitive.Input>,
|
|
38
|
+
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
|
|
39
|
+
>(({ className, ...props }, ref) => (
|
|
40
|
+
<div className="flex items-center border-b px-[12px]" cmdk-input-wrapper="">
|
|
41
|
+
<Search className="mr-[8px] h-[16px] w-[16px] shrink-0 text-muted-foreground" />
|
|
42
|
+
<CommandPrimitive.Input
|
|
43
|
+
ref={ref}
|
|
44
|
+
className={cn(
|
|
45
|
+
'flex h-[40px] w-full rounded-[var(--pt-radius-md)] bg-transparent py-[12px] text-[14px] leading-[20px] text-foreground outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',
|
|
46
|
+
className
|
|
47
|
+
)}
|
|
48
|
+
{...props}
|
|
49
|
+
/>
|
|
50
|
+
</div>
|
|
51
|
+
));
|
|
52
|
+
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
53
|
+
|
|
54
|
+
const CommandList = React.forwardRef<
|
|
55
|
+
React.ElementRef<typeof CommandPrimitive.List>,
|
|
56
|
+
React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>
|
|
57
|
+
>(({ className, ...props }, ref) => (
|
|
58
|
+
<CommandPrimitive.List
|
|
59
|
+
ref={ref}
|
|
60
|
+
className={cn('max-h-[300px] overflow-y-auto overflow-x-hidden', className)}
|
|
61
|
+
{...props}
|
|
62
|
+
/>
|
|
63
|
+
));
|
|
64
|
+
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
65
|
+
|
|
66
|
+
const CommandEmpty = React.forwardRef<
|
|
67
|
+
React.ElementRef<typeof CommandPrimitive.Empty>,
|
|
68
|
+
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>
|
|
69
|
+
>((props, ref) => (
|
|
70
|
+
<CommandPrimitive.Empty ref={ref} className="py-[24px] text-center text-[13px] leading-[20px]" {...props} />
|
|
71
|
+
));
|
|
72
|
+
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
73
|
+
|
|
74
|
+
const CommandGroup = React.forwardRef<
|
|
75
|
+
React.ElementRef<typeof CommandPrimitive.Group>,
|
|
76
|
+
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>
|
|
77
|
+
>(({ className, ...props }, ref) => (
|
|
78
|
+
<CommandPrimitive.Group
|
|
79
|
+
ref={ref}
|
|
80
|
+
className={cn(
|
|
81
|
+
'overflow-hidden p-[4px] text-foreground [&_[cmdk-group-heading]]:px-[8px] [&_[cmdk-group-heading]]:py-[6px] [&_[cmdk-group-heading]]:text-[13px] [&_[cmdk-group-heading]]:leading-[20px] [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground',
|
|
82
|
+
className
|
|
83
|
+
)}
|
|
84
|
+
{...props}
|
|
85
|
+
/>
|
|
86
|
+
));
|
|
87
|
+
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
88
|
+
|
|
89
|
+
const CommandSeparator = React.forwardRef<
|
|
90
|
+
React.ElementRef<typeof CommandPrimitive.Separator>,
|
|
91
|
+
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>
|
|
92
|
+
>(({ className, ...props }, ref) => (
|
|
93
|
+
<CommandPrimitive.Separator
|
|
94
|
+
ref={ref}
|
|
95
|
+
className={cn('-mx-[4px] h-px bg-border', className)}
|
|
96
|
+
{...props}
|
|
97
|
+
/>
|
|
98
|
+
));
|
|
99
|
+
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
100
|
+
|
|
101
|
+
const CommandItem = React.forwardRef<
|
|
102
|
+
React.ElementRef<typeof CommandPrimitive.Item>,
|
|
103
|
+
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>
|
|
104
|
+
>(({ className, ...props }, ref) => (
|
|
105
|
+
<CommandPrimitive.Item
|
|
106
|
+
ref={ref}
|
|
107
|
+
className={cn(
|
|
108
|
+
'relative flex cursor-default select-none items-center gap-[8px] rounded-[var(--pt-radius-sm)] px-[8px] py-[6px] text-[14px] leading-[20px] outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-[16px] [&_svg]:shrink-0',
|
|
109
|
+
className
|
|
110
|
+
)}
|
|
111
|
+
{...props}
|
|
112
|
+
/>
|
|
113
|
+
));
|
|
114
|
+
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
|
115
|
+
|
|
116
|
+
const CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
117
|
+
return (
|
|
118
|
+
<span
|
|
119
|
+
className={cn('ml-auto text-[13px] leading-[20px] tracking-widest text-muted-foreground', className)}
|
|
120
|
+
{...props}
|
|
121
|
+
/>
|
|
122
|
+
);
|
|
123
|
+
};
|
|
124
|
+
CommandShortcut.displayName = 'CommandShortcut';
|
|
125
|
+
|
|
126
|
+
export {
|
|
127
|
+
Command,
|
|
128
|
+
CommandDialog,
|
|
129
|
+
CommandInput,
|
|
130
|
+
CommandList,
|
|
131
|
+
CommandEmpty,
|
|
132
|
+
CommandGroup,
|
|
133
|
+
CommandItem,
|
|
134
|
+
CommandShortcut,
|
|
135
|
+
CommandSeparator
|
|
136
|
+
};
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
3
|
+
import { Check, ChevronRight, Circle } from 'lucide-react';
|
|
4
|
+
|
|
5
|
+
import { cn } from '../../lib/utils';
|
|
6
|
+
|
|
7
|
+
const ContextMenu = ContextMenuPrimitive.Root;
|
|
8
|
+
|
|
9
|
+
const ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
10
|
+
|
|
11
|
+
const ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
12
|
+
|
|
13
|
+
const ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
14
|
+
|
|
15
|
+
const ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
16
|
+
|
|
17
|
+
const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
18
|
+
|
|
19
|
+
const ContextMenuSubTrigger = React.forwardRef<
|
|
20
|
+
React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,
|
|
21
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {
|
|
22
|
+
inset?: boolean;
|
|
23
|
+
}
|
|
24
|
+
>(({ className, inset, children, ...props }, ref) => (
|
|
25
|
+
<ContextMenuPrimitive.SubTrigger
|
|
26
|
+
ref={ref}
|
|
27
|
+
className={cn(
|
|
28
|
+
'flex cursor-default select-none items-center rounded-[var(--pt-radius-sm)] px-[8px] py-[6px] text-[14px] leading-[20px] outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',
|
|
29
|
+
inset && 'pl-[32px]',
|
|
30
|
+
className
|
|
31
|
+
)}
|
|
32
|
+
{...props}
|
|
33
|
+
>
|
|
34
|
+
{children}
|
|
35
|
+
<ChevronRight className="ml-auto h-[16px] w-[16px]" />
|
|
36
|
+
</ContextMenuPrimitive.SubTrigger>
|
|
37
|
+
));
|
|
38
|
+
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
39
|
+
|
|
40
|
+
const ContextMenuSubContent = React.forwardRef<
|
|
41
|
+
React.ElementRef<typeof ContextMenuPrimitive.SubContent>,
|
|
42
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>
|
|
43
|
+
>(({ className, ...props }, ref) => (
|
|
44
|
+
<ContextMenuPrimitive.SubContent
|
|
45
|
+
ref={ref}
|
|
46
|
+
className={cn(
|
|
47
|
+
'z-[var(--pt-z-popup,50)] min-w-[8rem] overflow-hidden rounded-[var(--pt-radius-md)] border bg-popover p-[4px] text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
|
|
48
|
+
className
|
|
49
|
+
)}
|
|
50
|
+
{...props}
|
|
51
|
+
/>
|
|
52
|
+
));
|
|
53
|
+
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
54
|
+
|
|
55
|
+
const ContextMenuContent = React.forwardRef<
|
|
56
|
+
React.ElementRef<typeof ContextMenuPrimitive.Content>,
|
|
57
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>
|
|
58
|
+
>(({ className, ...props }, ref) => (
|
|
59
|
+
<ContextMenuPrimitive.Portal>
|
|
60
|
+
<ContextMenuPrimitive.Content
|
|
61
|
+
ref={ref}
|
|
62
|
+
className={cn(
|
|
63
|
+
'z-[var(--pt-z-popup,50)] min-w-[8rem] overflow-hidden rounded-[var(--pt-radius-md)] border bg-popover p-[4px] text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
|
|
64
|
+
className
|
|
65
|
+
)}
|
|
66
|
+
{...props}
|
|
67
|
+
/>
|
|
68
|
+
</ContextMenuPrimitive.Portal>
|
|
69
|
+
));
|
|
70
|
+
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
71
|
+
|
|
72
|
+
const ContextMenuItem = React.forwardRef<
|
|
73
|
+
React.ElementRef<typeof ContextMenuPrimitive.Item>,
|
|
74
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {
|
|
75
|
+
inset?: boolean;
|
|
76
|
+
}
|
|
77
|
+
>(({ className, inset, ...props }, ref) => (
|
|
78
|
+
<ContextMenuPrimitive.Item
|
|
79
|
+
ref={ref}
|
|
80
|
+
className={cn(
|
|
81
|
+
'relative flex cursor-default select-none items-center gap-[8px] rounded-[var(--pt-radius-sm)] px-[8px] py-[6px] text-[14px] leading-[20px] outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-[16px] [&>svg]:shrink-0',
|
|
82
|
+
inset && 'pl-[32px]',
|
|
83
|
+
className
|
|
84
|
+
)}
|
|
85
|
+
{...props}
|
|
86
|
+
/>
|
|
87
|
+
));
|
|
88
|
+
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
89
|
+
|
|
90
|
+
const ContextMenuCheckboxItem = React.forwardRef<
|
|
91
|
+
React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,
|
|
92
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>
|
|
93
|
+
>(({ className, children, checked, ...props }, ref) => (
|
|
94
|
+
<ContextMenuPrimitive.CheckboxItem
|
|
95
|
+
ref={ref}
|
|
96
|
+
className={cn(
|
|
97
|
+
'relative flex cursor-default select-none items-center rounded-[var(--pt-radius-sm)] py-[6px] pl-[32px] pr-[8px] text-[14px] leading-[20px] outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
98
|
+
className
|
|
99
|
+
)}
|
|
100
|
+
checked={checked}
|
|
101
|
+
{...props}
|
|
102
|
+
>
|
|
103
|
+
<span className="absolute left-[8px] flex h-[14px] w-[14px] items-center justify-center">
|
|
104
|
+
<ContextMenuPrimitive.ItemIndicator>
|
|
105
|
+
<Check className="h-[16px] w-[16px]" />
|
|
106
|
+
</ContextMenuPrimitive.ItemIndicator>
|
|
107
|
+
</span>
|
|
108
|
+
{children}
|
|
109
|
+
</ContextMenuPrimitive.CheckboxItem>
|
|
110
|
+
));
|
|
111
|
+
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
|
112
|
+
|
|
113
|
+
const ContextMenuRadioItem = React.forwardRef<
|
|
114
|
+
React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,
|
|
115
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>
|
|
116
|
+
>(({ className, children, ...props }, ref) => (
|
|
117
|
+
<ContextMenuPrimitive.RadioItem
|
|
118
|
+
ref={ref}
|
|
119
|
+
className={cn(
|
|
120
|
+
'relative flex cursor-default select-none items-center rounded-[var(--pt-radius-sm)] py-[6px] pl-[32px] pr-[8px] text-[14px] leading-[20px] outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
121
|
+
className
|
|
122
|
+
)}
|
|
123
|
+
{...props}
|
|
124
|
+
>
|
|
125
|
+
<span className="absolute left-[8px] flex h-[14px] w-[14px] items-center justify-center">
|
|
126
|
+
<ContextMenuPrimitive.ItemIndicator>
|
|
127
|
+
<Circle className="h-[8px] w-[8px] fill-current" />
|
|
128
|
+
</ContextMenuPrimitive.ItemIndicator>
|
|
129
|
+
</span>
|
|
130
|
+
{children}
|
|
131
|
+
</ContextMenuPrimitive.RadioItem>
|
|
132
|
+
));
|
|
133
|
+
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
134
|
+
|
|
135
|
+
const ContextMenuLabel = React.forwardRef<
|
|
136
|
+
React.ElementRef<typeof ContextMenuPrimitive.Label>,
|
|
137
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {
|
|
138
|
+
inset?: boolean;
|
|
139
|
+
}
|
|
140
|
+
>(({ className, inset, ...props }, ref) => (
|
|
141
|
+
<ContextMenuPrimitive.Label
|
|
142
|
+
ref={ref}
|
|
143
|
+
className={cn('px-[8px] py-[6px] text-[14px] leading-[20px] font-semibold text-foreground', inset && 'pl-[32px]', className)}
|
|
144
|
+
{...props}
|
|
145
|
+
/>
|
|
146
|
+
));
|
|
147
|
+
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
148
|
+
|
|
149
|
+
const ContextMenuSeparator = React.forwardRef<
|
|
150
|
+
React.ElementRef<typeof ContextMenuPrimitive.Separator>,
|
|
151
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>
|
|
152
|
+
>(({ className, ...props }, ref) => (
|
|
153
|
+
<ContextMenuPrimitive.Separator
|
|
154
|
+
ref={ref}
|
|
155
|
+
className={cn('-mx-[4px] my-[4px] h-px bg-border', className)}
|
|
156
|
+
{...props}
|
|
157
|
+
/>
|
|
158
|
+
));
|
|
159
|
+
ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
|
160
|
+
|
|
161
|
+
const ContextMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
162
|
+
return (
|
|
163
|
+
<span
|
|
164
|
+
className={cn('ml-auto text-[13px] leading-[20px] tracking-widest text-muted-foreground', className)}
|
|
165
|
+
{...props}
|
|
166
|
+
/>
|
|
167
|
+
);
|
|
168
|
+
};
|
|
169
|
+
ContextMenuShortcut.displayName = 'ContextMenuShortcut';
|
|
170
|
+
|
|
171
|
+
export {
|
|
172
|
+
ContextMenu,
|
|
173
|
+
ContextMenuTrigger,
|
|
174
|
+
ContextMenuContent,
|
|
175
|
+
ContextMenuItem,
|
|
176
|
+
ContextMenuCheckboxItem,
|
|
177
|
+
ContextMenuRadioItem,
|
|
178
|
+
ContextMenuLabel,
|
|
179
|
+
ContextMenuSeparator,
|
|
180
|
+
ContextMenuShortcut,
|
|
181
|
+
ContextMenuGroup,
|
|
182
|
+
ContextMenuPortal,
|
|
183
|
+
ContextMenuSub,
|
|
184
|
+
ContextMenuSubContent,
|
|
185
|
+
ContextMenuSubTrigger,
|
|
186
|
+
ContextMenuRadioGroup
|
|
187
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
|
+
import { X } from 'lucide-react';
|
|
4
|
+
|
|
5
|
+
import { cn } from '../../lib/utils';
|
|
6
|
+
|
|
7
|
+
const Dialog = DialogPrimitive.Root;
|
|
8
|
+
|
|
9
|
+
const DialogTrigger = DialogPrimitive.Trigger;
|
|
10
|
+
|
|
11
|
+
const DialogPortal = DialogPrimitive.Portal;
|
|
12
|
+
|
|
13
|
+
const DialogClose = DialogPrimitive.Close;
|
|
14
|
+
|
|
15
|
+
const DialogOverlay = React.forwardRef<
|
|
16
|
+
React.ElementRef<typeof DialogPrimitive.Overlay>,
|
|
17
|
+
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
|
|
18
|
+
>(({ className, ...props }, ref) => (
|
|
19
|
+
<DialogPrimitive.Overlay
|
|
20
|
+
ref={ref}
|
|
21
|
+
className={cn(
|
|
22
|
+
'fixed inset-0 z-[var(--pt-z-overlay,50)] bg-[rgb(var(--pt-black)/0.8)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
|
|
23
|
+
className
|
|
24
|
+
)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
));
|
|
28
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
29
|
+
|
|
30
|
+
/* closeLabel:关闭钮读屏文案,库不做 i18n,消费方传译文(默认英文) */
|
|
31
|
+
const DialogContent = React.forwardRef<
|
|
32
|
+
React.ElementRef<typeof DialogPrimitive.Content>,
|
|
33
|
+
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & { closeLabel?: string }
|
|
34
|
+
>(({ className, children, closeLabel = 'Close', ...props }, ref) => (
|
|
35
|
+
<DialogPortal>
|
|
36
|
+
<DialogOverlay />
|
|
37
|
+
<DialogPrimitive.Content
|
|
38
|
+
ref={ref}
|
|
39
|
+
className={cn(
|
|
40
|
+
'fixed left-[50%] top-[50%] z-[var(--pt-z-overlay,50)] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-[16px] border bg-background p-[24px] shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-[var(--pt-radius)]',
|
|
41
|
+
className
|
|
42
|
+
)}
|
|
43
|
+
{...props}
|
|
44
|
+
>
|
|
45
|
+
{children}
|
|
46
|
+
<DialogPrimitive.Close className="absolute right-[16px] top-[16px] rounded-[var(--pt-radius-sm)] opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
|
|
47
|
+
<X className="h-[16px] w-[16px]" />
|
|
48
|
+
<span className="sr-only">{closeLabel}</span>
|
|
49
|
+
</DialogPrimitive.Close>
|
|
50
|
+
</DialogPrimitive.Content>
|
|
51
|
+
</DialogPortal>
|
|
52
|
+
));
|
|
53
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
54
|
+
|
|
55
|
+
const DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
|
|
56
|
+
<div className={cn('flex flex-col space-y-[6px] text-center sm:text-left', className)} {...props} />
|
|
57
|
+
);
|
|
58
|
+
DialogHeader.displayName = 'DialogHeader';
|
|
59
|
+
|
|
60
|
+
const DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
|
|
61
|
+
<div
|
|
62
|
+
className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-[8px]', className)}
|
|
63
|
+
{...props}
|
|
64
|
+
/>
|
|
65
|
+
);
|
|
66
|
+
DialogFooter.displayName = 'DialogFooter';
|
|
67
|
+
|
|
68
|
+
const DialogTitle = React.forwardRef<
|
|
69
|
+
React.ElementRef<typeof DialogPrimitive.Title>,
|
|
70
|
+
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
|
|
71
|
+
>(({ className, ...props }, ref) => (
|
|
72
|
+
<DialogPrimitive.Title
|
|
73
|
+
ref={ref}
|
|
74
|
+
className={cn('text-[18px] leading-[28px] font-semibold leading-none tracking-tight', className)}
|
|
75
|
+
{...props}
|
|
76
|
+
/>
|
|
77
|
+
));
|
|
78
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
79
|
+
|
|
80
|
+
const DialogDescription = React.forwardRef<
|
|
81
|
+
React.ElementRef<typeof DialogPrimitive.Description>,
|
|
82
|
+
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
|
|
83
|
+
>(({ className, ...props }, ref) => (
|
|
84
|
+
<DialogPrimitive.Description
|
|
85
|
+
ref={ref}
|
|
86
|
+
className={cn('text-[14px] leading-[20px] text-muted-foreground', className)}
|
|
87
|
+
{...props}
|
|
88
|
+
/>
|
|
89
|
+
));
|
|
90
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
91
|
+
|
|
92
|
+
export {
|
|
93
|
+
Dialog,
|
|
94
|
+
DialogPortal,
|
|
95
|
+
DialogOverlay,
|
|
96
|
+
DialogTrigger,
|
|
97
|
+
DialogClose,
|
|
98
|
+
DialogContent,
|
|
99
|
+
DialogHeader,
|
|
100
|
+
DialogFooter,
|
|
101
|
+
DialogTitle,
|
|
102
|
+
DialogDescription
|
|
103
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DirectionProvider as RadixDirectionProvider, useDirection } from '@radix-ui/react-direction';
|
|
3
|
+
|
|
4
|
+
function DirectionProvider({
|
|
5
|
+
dir,
|
|
6
|
+
direction,
|
|
7
|
+
children
|
|
8
|
+
}: React.ComponentProps<typeof RadixDirectionProvider> & {
|
|
9
|
+
/** Alias of `dir`; takes precedence when both are provided. */
|
|
10
|
+
direction?: React.ComponentProps<typeof RadixDirectionProvider>['dir'];
|
|
11
|
+
}) {
|
|
12
|
+
return <RadixDirectionProvider dir={direction ?? dir}>{children}</RadixDirectionProvider>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { DirectionProvider, useDirection };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Drawer as DrawerPrimitive } from 'vaul';
|
|
3
|
+
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
|
|
6
|
+
const Drawer = ({
|
|
7
|
+
shouldScaleBackground = true,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (
|
|
10
|
+
<DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />
|
|
11
|
+
);
|
|
12
|
+
Drawer.displayName = 'Drawer';
|
|
13
|
+
|
|
14
|
+
const DrawerTrigger = DrawerPrimitive.Trigger;
|
|
15
|
+
|
|
16
|
+
const DrawerPortal = DrawerPrimitive.Portal;
|
|
17
|
+
|
|
18
|
+
const DrawerClose = DrawerPrimitive.Close;
|
|
19
|
+
|
|
20
|
+
const DrawerOverlay = React.forwardRef<
|
|
21
|
+
React.ElementRef<typeof DrawerPrimitive.Overlay>,
|
|
22
|
+
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>
|
|
23
|
+
>(({ className, ...props }, ref) => (
|
|
24
|
+
<DrawerPrimitive.Overlay
|
|
25
|
+
ref={ref}
|
|
26
|
+
className={cn('fixed inset-0 z-[var(--pt-z-overlay,50)] bg-[rgb(var(--pt-black)/0.8)]', className)}
|
|
27
|
+
{...props}
|
|
28
|
+
/>
|
|
29
|
+
));
|
|
30
|
+
DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;
|
|
31
|
+
|
|
32
|
+
const DrawerContent = React.forwardRef<
|
|
33
|
+
React.ElementRef<typeof DrawerPrimitive.Content>,
|
|
34
|
+
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>
|
|
35
|
+
>(({ className, children, ...props }, ref) => (
|
|
36
|
+
<DrawerPortal>
|
|
37
|
+
<DrawerOverlay />
|
|
38
|
+
<DrawerPrimitive.Content
|
|
39
|
+
ref={ref}
|
|
40
|
+
className={cn(
|
|
41
|
+
'fixed inset-x-0 bottom-0 z-[var(--pt-z-overlay,50)] mt-[96px] flex h-auto flex-col rounded-t-[10px] border bg-background',
|
|
42
|
+
className
|
|
43
|
+
)}
|
|
44
|
+
{...props}
|
|
45
|
+
>
|
|
46
|
+
<div className="mx-auto mt-[16px] h-[8px] w-[100px] rounded-full bg-muted" />
|
|
47
|
+
{children}
|
|
48
|
+
</DrawerPrimitive.Content>
|
|
49
|
+
</DrawerPortal>
|
|
50
|
+
));
|
|
51
|
+
DrawerContent.displayName = 'DrawerContent';
|
|
52
|
+
|
|
53
|
+
const DrawerHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
|
|
54
|
+
<div className={cn('grid gap-[6px] p-[16px] text-center sm:text-left', className)} {...props} />
|
|
55
|
+
);
|
|
56
|
+
DrawerHeader.displayName = 'DrawerHeader';
|
|
57
|
+
|
|
58
|
+
const DrawerFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
|
|
59
|
+
<div className={cn('mt-auto flex flex-col gap-[8px] p-[16px]', className)} {...props} />
|
|
60
|
+
);
|
|
61
|
+
DrawerFooter.displayName = 'DrawerFooter';
|
|
62
|
+
|
|
63
|
+
const DrawerTitle = React.forwardRef<
|
|
64
|
+
React.ElementRef<typeof DrawerPrimitive.Title>,
|
|
65
|
+
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>
|
|
66
|
+
>(({ className, ...props }, ref) => (
|
|
67
|
+
<DrawerPrimitive.Title
|
|
68
|
+
ref={ref}
|
|
69
|
+
className={cn('text-[18px] leading-[28px] font-semibold leading-none tracking-tight text-foreground', className)}
|
|
70
|
+
{...props}
|
|
71
|
+
/>
|
|
72
|
+
));
|
|
73
|
+
DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
|
|
74
|
+
|
|
75
|
+
const DrawerDescription = React.forwardRef<
|
|
76
|
+
React.ElementRef<typeof DrawerPrimitive.Description>,
|
|
77
|
+
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>
|
|
78
|
+
>(({ className, ...props }, ref) => (
|
|
79
|
+
<DrawerPrimitive.Description
|
|
80
|
+
ref={ref}
|
|
81
|
+
className={cn('text-[14px] leading-[20px] text-muted-foreground', className)}
|
|
82
|
+
{...props}
|
|
83
|
+
/>
|
|
84
|
+
));
|
|
85
|
+
DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
|
|
86
|
+
|
|
87
|
+
export {
|
|
88
|
+
Drawer,
|
|
89
|
+
DrawerPortal,
|
|
90
|
+
DrawerOverlay,
|
|
91
|
+
DrawerTrigger,
|
|
92
|
+
DrawerClose,
|
|
93
|
+
DrawerContent,
|
|
94
|
+
DrawerHeader,
|
|
95
|
+
DrawerFooter,
|
|
96
|
+
DrawerTitle,
|
|
97
|
+
DrawerDescription
|
|
98
|
+
};
|