@codefast/ui 0.0.65 → 0.0.67
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/dist/{chunk-ZMF2SRE5.js → chunk-26W5NJTU.js} +1 -1
- package/dist/chunk-26W5NJTU.js.map +1 -0
- package/dist/chunk-3COHZ24E.cjs +2 -0
- package/dist/chunk-3COHZ24E.cjs.map +1 -0
- package/dist/{chunk-QEWITXOV.cjs → chunk-4MTN7WZ2.cjs} +1 -1
- package/dist/chunk-4MTN7WZ2.cjs.map +1 -0
- package/dist/chunk-5QETIFO4.js +2 -0
- package/dist/chunk-5QETIFO4.js.map +1 -0
- package/dist/{chunk-WECV77JD.cjs → chunk-5RJANBDJ.cjs} +1 -1
- package/dist/chunk-5RJANBDJ.cjs.map +1 -0
- package/dist/chunk-6UQKMUZG.cjs +2 -0
- package/dist/chunk-6UQKMUZG.cjs.map +1 -0
- package/dist/chunk-AVEDWLNQ.js +2 -0
- package/dist/chunk-AVEDWLNQ.js.map +1 -0
- package/dist/{chunk-YLE5XFEO.cjs → chunk-EW7DAPDC.cjs} +1 -1
- package/dist/chunk-EW7DAPDC.cjs.map +1 -0
- package/dist/{chunk-RSNKUKY7.js → chunk-HDHZESSG.js} +1 -1
- package/dist/chunk-HDHZESSG.js.map +1 -0
- package/dist/{chunk-GCHNSK5O.cjs → chunk-JMM2MTPI.cjs} +1 -1
- package/dist/chunk-JMM2MTPI.cjs.map +1 -0
- package/dist/{chunk-WRO3QIWH.js → chunk-JNOLIDCD.js} +1 -1
- package/dist/chunk-JNOLIDCD.js.map +1 -0
- package/dist/{chunk-F5TIIJJJ.cjs → chunk-LOJBMYTH.cjs} +1 -1
- package/dist/chunk-LOJBMYTH.cjs.map +1 -0
- package/dist/{chunk-A5ILA637.js → chunk-RBP4PBCK.js} +1 -1
- package/dist/chunk-RBP4PBCK.js.map +1 -0
- package/dist/{chunk-L7IASKCH.js → chunk-RVGKUNXC.js} +1 -1
- package/dist/{chunk-L7IASKCH.js.map → chunk-RVGKUNXC.js.map} +1 -1
- package/dist/{chunk-72NPDP3X.cjs → chunk-T3G5USVY.cjs} +1 -1
- package/dist/chunk-T3G5USVY.cjs.map +1 -0
- package/dist/chunk-VDVLCSO4.js +2 -0
- package/dist/chunk-VDVLCSO4.js.map +1 -0
- package/dist/{chunk-2OBTJ7SD.cjs → chunk-WKKCZQNO.cjs} +2 -2
- package/dist/chunk-WKKCZQNO.cjs.map +1 -0
- package/dist/{chunk-FNQFZJUG.js → chunk-WQFHFTYS.js} +1 -1
- package/dist/chunk-WQFHFTYS.js.map +1 -0
- package/dist/react/accordion.cjs.map +1 -1
- package/dist/react/accordion.js.map +1 -1
- package/dist/react/alert-dialog.cjs +1 -1
- package/dist/react/alert-dialog.cjs.map +1 -1
- package/dist/react/alert-dialog.js +1 -1
- package/dist/react/alert-dialog.js.map +1 -1
- package/dist/react/alert.cjs.map +1 -1
- package/dist/react/alert.js.map +1 -1
- package/dist/react/avatar.cjs.map +1 -1
- package/dist/react/avatar.js.map +1 -1
- package/dist/react/blockquote.cjs.map +1 -1
- package/dist/react/blockquote.js.map +1 -1
- package/dist/react/box.cjs.map +1 -1
- package/dist/react/box.js.map +1 -1
- package/dist/react/breadcrumb.cjs.map +1 -1
- package/dist/react/breadcrumb.js.map +1 -1
- package/dist/react/button.cjs +1 -1
- package/dist/react/button.js +1 -1
- package/dist/react/calendar.cjs +1 -1
- package/dist/react/calendar.js +1 -1
- package/dist/react/card.cjs.map +1 -1
- package/dist/react/card.js.map +1 -1
- package/dist/react/carousel.cjs +1 -1
- package/dist/react/carousel.cjs.map +1 -1
- package/dist/react/carousel.js +1 -1
- package/dist/react/carousel.js.map +1 -1
- package/dist/react/checkbox-cards.cjs +1 -1
- package/dist/react/checkbox-cards.cjs.map +1 -1
- package/dist/react/checkbox-cards.js +1 -1
- package/dist/react/checkbox-cards.js.map +1 -1
- package/dist/react/checkbox-group.cjs +1 -1
- package/dist/react/checkbox-group.cjs.map +1 -1
- package/dist/react/checkbox-group.js +1 -1
- package/dist/react/checkbox-group.js.map +1 -1
- package/dist/react/checkbox-group.primitive.cjs +1 -1
- package/dist/react/checkbox-group.primitive.js +1 -1
- package/dist/react/checkbox.cjs +1 -1
- package/dist/react/checkbox.cjs.map +1 -1
- package/dist/react/checkbox.js +1 -1
- package/dist/react/checkbox.js.map +1 -1
- package/dist/react/code.cjs.map +1 -1
- package/dist/react/code.js.map +1 -1
- package/dist/react/collapsible.cjs.map +1 -1
- package/dist/react/collapsible.js.map +1 -1
- package/dist/react/command.cjs +1 -1
- package/dist/react/command.cjs.map +1 -1
- package/dist/react/command.js +1 -1
- package/dist/react/command.js.map +1 -1
- package/dist/react/container.cjs.map +1 -1
- package/dist/react/container.js.map +1 -1
- package/dist/react/context-menu.cjs.map +1 -1
- package/dist/react/context-menu.js.map +1 -1
- package/dist/react/data-table.cjs +1 -1
- package/dist/react/data-table.js +1 -1
- package/dist/react/dialog.cjs +1 -1
- package/dist/react/dialog.js +1 -1
- package/dist/react/drawer.cjs.map +1 -1
- package/dist/react/drawer.js.map +1 -1
- package/dist/react/dropdown-menu.cjs +1 -1
- package/dist/react/dropdown-menu.js +1 -1
- package/dist/react/em.cjs.map +1 -1
- package/dist/react/em.js.map +1 -1
- package/dist/react/form.cjs +1 -1
- package/dist/react/form.cjs.map +1 -1
- package/dist/react/form.js +1 -1
- package/dist/react/form.js.map +1 -1
- package/dist/react/heading.cjs.map +1 -1
- package/dist/react/heading.js.map +1 -1
- package/dist/react/hover-card.cjs.map +1 -1
- package/dist/react/hover-card.js.map +1 -1
- package/dist/react/input-otp.cjs +1 -1
- package/dist/react/input-otp.cjs.map +1 -1
- package/dist/react/input-otp.js +1 -1
- package/dist/react/input-otp.js.map +1 -1
- package/dist/react/input.cjs +1 -1
- package/dist/react/input.cjs.map +1 -1
- package/dist/react/input.d.cts +113 -34
- package/dist/react/input.d.ts +113 -34
- package/dist/react/input.js +1 -1
- package/dist/react/input.js.map +1 -1
- package/dist/react/kbd.cjs.map +1 -1
- package/dist/react/kbd.js.map +1 -1
- package/dist/react/label.cjs +1 -1
- package/dist/react/label.js +1 -1
- package/dist/react/menubar.cjs.map +1 -1
- package/dist/react/menubar.js.map +1 -1
- package/dist/react/navigation-menu.cjs.map +1 -1
- package/dist/react/navigation-menu.js.map +1 -1
- package/dist/react/pagination.cjs +1 -1
- package/dist/react/pagination.cjs.map +1 -1
- package/dist/react/pagination.js +1 -1
- package/dist/react/pagination.js.map +1 -1
- package/dist/react/popover.cjs.map +1 -1
- package/dist/react/popover.js.map +1 -1
- package/dist/react/pre.cjs.map +1 -1
- package/dist/react/pre.js.map +1 -1
- package/dist/react/progress.cjs.map +1 -1
- package/dist/react/progress.js.map +1 -1
- package/dist/react/quote.cjs.map +1 -1
- package/dist/react/quote.js.map +1 -1
- package/dist/react/radio-cards.cjs +1 -1
- package/dist/react/radio-cards.cjs.map +1 -1
- package/dist/react/radio-cards.js +1 -1
- package/dist/react/radio-cards.js.map +1 -1
- package/dist/react/radio-group.cjs.map +1 -1
- package/dist/react/radio-group.js.map +1 -1
- package/dist/react/radio.cjs.map +1 -1
- package/dist/react/radio.js.map +1 -1
- package/dist/react/scroll-area.cjs.map +1 -1
- package/dist/react/scroll-area.js.map +1 -1
- package/dist/react/section.cjs.map +1 -1
- package/dist/react/section.js.map +1 -1
- package/dist/react/select.cjs +1 -1
- package/dist/react/select.js +1 -1
- package/dist/react/separator.cjs.map +1 -1
- package/dist/react/separator.js.map +1 -1
- package/dist/react/sheet.cjs.map +1 -1
- package/dist/react/sheet.js.map +1 -1
- package/dist/react/slider.cjs.map +1 -1
- package/dist/react/slider.js.map +1 -1
- package/dist/react/spinner.cjs +1 -1
- package/dist/react/spinner.js +1 -1
- package/dist/react/strong.cjs.map +1 -1
- package/dist/react/strong.js.map +1 -1
- package/dist/react/switch.cjs +1 -1
- package/dist/react/switch.cjs.map +1 -1
- package/dist/react/switch.js +1 -1
- package/dist/react/switch.js.map +1 -1
- package/dist/react/table.cjs.map +1 -1
- package/dist/react/table.js.map +1 -1
- package/dist/react/tabs.cjs.map +1 -1
- package/dist/react/tabs.js.map +1 -1
- package/dist/react/text-input.cjs +2 -0
- package/dist/react/text-input.cjs.map +1 -0
- package/dist/react/text-input.d.cts +11 -0
- package/dist/react/text-input.d.ts +11 -0
- package/dist/react/text-input.js +2 -0
- package/dist/react/text-input.js.map +1 -0
- package/dist/react/text.cjs.map +1 -1
- package/dist/react/text.js.map +1 -1
- package/dist/react/textarea.cjs +1 -1
- package/dist/react/textarea.cjs.map +1 -1
- package/dist/react/textarea.js +1 -1
- package/dist/react/textarea.js.map +1 -1
- package/dist/react/toggle-group.cjs +1 -1
- package/dist/react/toggle-group.cjs.map +1 -1
- package/dist/react/toggle-group.js +1 -1
- package/dist/react/toggle-group.js.map +1 -1
- package/dist/react/toggle.cjs +1 -1
- package/dist/react/toggle.js +1 -1
- package/dist/react/tooltip.cjs.map +1 -1
- package/dist/react/tooltip.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +76 -102
- package/dist/chunk-2OBTJ7SD.cjs.map +0 -1
- package/dist/chunk-3OEPCFBF.cjs +0 -2
- package/dist/chunk-3OEPCFBF.cjs.map +0 -1
- package/dist/chunk-6AFJCDFU.js +0 -2
- package/dist/chunk-6AFJCDFU.js.map +0 -1
- package/dist/chunk-72NPDP3X.cjs.map +0 -1
- package/dist/chunk-7CHCTEST.js +0 -2
- package/dist/chunk-7CHCTEST.js.map +0 -1
- package/dist/chunk-A5ILA637.js.map +0 -1
- package/dist/chunk-DH3YP4ZC.cjs +0 -2
- package/dist/chunk-DH3YP4ZC.cjs.map +0 -1
- package/dist/chunk-DTSAQICV.js +0 -2
- package/dist/chunk-DTSAQICV.js.map +0 -1
- package/dist/chunk-F5TIIJJJ.cjs.map +0 -1
- package/dist/chunk-FNQFZJUG.js.map +0 -1
- package/dist/chunk-GCHNSK5O.cjs.map +0 -1
- package/dist/chunk-NH6X3FON.js +0 -2
- package/dist/chunk-NH6X3FON.js.map +0 -1
- package/dist/chunk-P563ILDJ.cjs +0 -2
- package/dist/chunk-P563ILDJ.cjs.map +0 -1
- package/dist/chunk-QEWITXOV.cjs.map +0 -1
- package/dist/chunk-RSNKUKY7.js.map +0 -1
- package/dist/chunk-VVA2EE5V.js +0 -2
- package/dist/chunk-VVA2EE5V.js.map +0 -1
- package/dist/chunk-VZ6P3BCB.cjs +0 -2
- package/dist/chunk-VZ6P3BCB.cjs.map +0 -1
- package/dist/chunk-WECV77JD.cjs.map +0 -1
- package/dist/chunk-WRO3QIWH.js.map +0 -1
- package/dist/chunk-YLE5XFEO.cjs.map +0 -1
- package/dist/chunk-ZMF2SRE5.js.map +0 -1
- package/dist/hooks/use-media-query.cjs +0 -2
- package/dist/hooks/use-media-query.cjs.map +0 -1
- package/dist/hooks/use-media-query.d.cts +0 -3
- package/dist/hooks/use-media-query.d.ts +0 -3
- package/dist/hooks/use-media-query.js +0 -2
- package/dist/hooks/use-media-query.js.map +0 -1
- package/dist/hooks/use-mutation-observer.cjs +0 -2
- package/dist/hooks/use-mutation-observer.cjs.map +0 -1
- package/dist/hooks/use-mutation-observer.d.cts +0 -5
- package/dist/hooks/use-mutation-observer.d.ts +0 -5
- package/dist/hooks/use-mutation-observer.js +0 -2
- package/dist/hooks/use-mutation-observer.js.map +0 -1
- package/dist/lib/colors.cjs +0 -2
- package/dist/lib/colors.cjs.map +0 -1
- package/dist/lib/colors.d.cts +0 -1759
- package/dist/lib/colors.d.ts +0 -1759
- package/dist/lib/colors.js +0 -2
- package/dist/lib/colors.js.map +0 -1
- package/dist/plugin/animate.plugin.cjs +0 -2
- package/dist/plugin/animate.plugin.cjs.map +0 -1
- package/dist/plugin/animate.plugin.js +0 -2
- package/dist/plugin/animate.plugin.js.map +0 -1
- package/dist/plugin/base.plugin.cjs +0 -2
- package/dist/plugin/base.plugin.cjs.map +0 -1
- package/dist/plugin/base.plugin.js +0 -2
- package/dist/plugin/base.plugin.js.map +0 -1
- package/dist/plugin/perspective.plugin.cjs +0 -2
- package/dist/plugin/perspective.plugin.cjs.map +0 -1
- package/dist/plugin/perspective.plugin.js +0 -2
- package/dist/plugin/perspective.plugin.js.map +0 -1
- package/dist/tailwind.config.cjs +0 -2
- package/dist/tailwind.config.cjs.map +0 -1
- package/dist/tailwind.config.js +0 -2
- package/dist/tailwind.config.js.map +0 -1
- package/plugin/animate.plugin.ts +0 -319
- package/plugin/base.plugin.ts +0 -21
- package/plugin/perspective.plugin.ts +0 -11
- package/src/hooks/use-media-query.ts +0 -22
- package/src/hooks/use-mutation-observer.ts +0 -26
- package/src/lib/colors.ts +0 -1757
- package/src/lib/utils.ts +0 -6
- package/src/react/accordion.tsx +0 -86
- package/src/react/alert-dialog.tsx +0 -177
- package/src/react/alert.tsx +0 -71
- package/src/react/aspect-ratio.tsx +0 -17
- package/src/react/avatar.tsx +0 -58
- package/src/react/badge.tsx +0 -39
- package/src/react/blockquote.tsx +0 -26
- package/src/react/box.tsx +0 -34
- package/src/react/breadcrumb.tsx +0 -148
- package/src/react/button.tsx +0 -95
- package/src/react/calendar.tsx +0 -79
- package/src/react/card.tsx +0 -103
- package/src/react/carousel.tsx +0 -299
- package/src/react/checkbox-cards.tsx +0 -59
- package/src/react/checkbox-group.primitive.tsx +0 -200
- package/src/react/checkbox-group.tsx +0 -53
- package/src/react/checkbox.tsx +0 -36
- package/src/react/code.tsx +0 -26
- package/src/react/collapsible.tsx +0 -54
- package/src/react/command.tsx +0 -199
- package/src/react/container.tsx +0 -27
- package/src/react/context-menu.tsx +0 -302
- package/src/react/data-table.tsx +0 -249
- package/src/react/dialog.tsx +0 -156
- package/src/react/drawer.tsx +0 -132
- package/src/react/dropdown-menu.tsx +0 -286
- package/src/react/em.tsx +0 -26
- package/src/react/form.tsx +0 -218
- package/src/react/heading.tsx +0 -27
- package/src/react/hover-card.tsx +0 -73
- package/src/react/input-otp.tsx +0 -114
- package/src/react/input.tsx +0 -42
- package/src/react/kbd.tsx +0 -36
- package/src/react/label.tsx +0 -31
- package/src/react/menubar.tsx +0 -316
- package/src/react/navigation-menu.tsx +0 -192
- package/src/react/pagination.tsx +0 -150
- package/src/react/popover.tsx +0 -82
- package/src/react/pre.tsx +0 -26
- package/src/react/progress.tsx +0 -35
- package/src/react/quote.tsx +0 -26
- package/src/react/radio-cards.tsx +0 -46
- package/src/react/radio-group.tsx +0 -48
- package/src/react/radio.tsx +0 -38
- package/src/react/resizable.tsx +0 -62
- package/src/react/scroll-area.tsx +0 -106
- package/src/react/section.tsx +0 -26
- package/src/react/select.tsx +0 -217
- package/src/react/separator.tsx +0 -32
- package/src/react/sheet.tsx +0 -170
- package/src/react/skeleton.tsx +0 -18
- package/src/react/slider.tsx +0 -41
- package/src/react/sonner.tsx +0 -40
- package/src/react/spinner.tsx +0 -68
- package/src/react/strong.tsx +0 -26
- package/src/react/switch.tsx +0 -33
- package/src/react/table.tsx +0 -142
- package/src/react/tabs.tsx +0 -87
- package/src/react/text.tsx +0 -34
- package/src/react/textarea.tsx +0 -30
- package/src/react/toggle-group.tsx +0 -81
- package/src/react/toggle.tsx +0 -49
- package/src/react/tooltip.tsx +0 -81
- package/src/styles/styles.css +0 -3
- package/tailwind.config.ts +0 -126
package/src/react/dialog.tsx
DELETED
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
5
|
-
import { Cross2Icon } from '@radix-ui/react-icons';
|
|
6
|
-
import { cn } from '../lib/utils';
|
|
7
|
-
|
|
8
|
-
/* -----------------------------------------------------------------------------
|
|
9
|
-
* Component: Dialog
|
|
10
|
-
* -------------------------------------------------------------------------- */
|
|
11
|
-
|
|
12
|
-
type DialogProps = React.ComponentProps<typeof DialogPrimitive.Root>;
|
|
13
|
-
const Dialog = DialogPrimitive.Root;
|
|
14
|
-
|
|
15
|
-
/* -----------------------------------------------------------------------------
|
|
16
|
-
* Component: DialogTrigger
|
|
17
|
-
* -------------------------------------------------------------------------- */
|
|
18
|
-
|
|
19
|
-
type DialogTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;
|
|
20
|
-
const DialogTrigger = DialogPrimitive.Trigger;
|
|
21
|
-
|
|
22
|
-
/* -----------------------------------------------------------------------------
|
|
23
|
-
* Component: DialogClose
|
|
24
|
-
* -------------------------------------------------------------------------- */
|
|
25
|
-
|
|
26
|
-
type DialogCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>;
|
|
27
|
-
const DialogClose = DialogPrimitive.Close;
|
|
28
|
-
|
|
29
|
-
/* -----------------------------------------------------------------------------
|
|
30
|
-
* Component: DialogContent
|
|
31
|
-
* -------------------------------------------------------------------------- */
|
|
32
|
-
|
|
33
|
-
type DialogContentElement = React.ElementRef<typeof DialogPrimitive.Content>;
|
|
34
|
-
type DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;
|
|
35
|
-
|
|
36
|
-
const DialogContent = React.forwardRef<DialogContentElement, DialogContentProps>(
|
|
37
|
-
({ children, className, ...props }, ref) => (
|
|
38
|
-
<DialogPrimitive.Portal>
|
|
39
|
-
<DialogPrimitive.Overlay className="data-[state=open]:animate-duration-200 data-[state=closed]:animate-duration-200 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 grid place-items-center overflow-auto bg-black/80 p-4 sm:pb-12 sm:pt-8">
|
|
40
|
-
<DialogPrimitive.Content
|
|
41
|
-
ref={ref}
|
|
42
|
-
className={cn(
|
|
43
|
-
'bg-background data-[state=open]:animate-in data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95 data-[state=open]:animate-duration-200 data-[state=closed]:animate-duration-200 data-[state=open]:fade-in data-[state=closed]:animate-out data-[state=closed]:fade-out relative z-50 flex w-full max-w-lg flex-col rounded-lg border shadow-lg',
|
|
44
|
-
className,
|
|
45
|
-
)}
|
|
46
|
-
{...props}
|
|
47
|
-
>
|
|
48
|
-
{children}
|
|
49
|
-
<DialogPrimitive.Close className="data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm p-1 opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none">
|
|
50
|
-
<Cross2Icon className="size-4" />
|
|
51
|
-
<span className="sr-only">Close</span>
|
|
52
|
-
</DialogPrimitive.Close>
|
|
53
|
-
</DialogPrimitive.Content>
|
|
54
|
-
</DialogPrimitive.Overlay>
|
|
55
|
-
</DialogPrimitive.Portal>
|
|
56
|
-
),
|
|
57
|
-
);
|
|
58
|
-
|
|
59
|
-
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
60
|
-
|
|
61
|
-
/* -----------------------------------------------------------------------------
|
|
62
|
-
* Component: DialogHeader
|
|
63
|
-
* -------------------------------------------------------------------------- */
|
|
64
|
-
|
|
65
|
-
type DialogHeaderProps = React.HTMLAttributes<HTMLDivElement>;
|
|
66
|
-
|
|
67
|
-
function DialogHeader({ className, ...props }: DialogHeaderProps): React.JSX.Element {
|
|
68
|
-
return (
|
|
69
|
-
<header
|
|
70
|
-
className={cn('flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left', className)}
|
|
71
|
-
{...props}
|
|
72
|
-
/>
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/* -----------------------------------------------------------------------------
|
|
77
|
-
* Component: DialogBody
|
|
78
|
-
* -------------------------------------------------------------------------- */
|
|
79
|
-
|
|
80
|
-
type DialogBodyProps = React.HTMLAttributes<HTMLDivElement>;
|
|
81
|
-
|
|
82
|
-
function DialogBody({ className, ...props }: DialogBodyProps): React.JSX.Element {
|
|
83
|
-
return <main className={cn('overflow-auto px-6 py-2', className)} {...props} />;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/* -----------------------------------------------------------------------------
|
|
87
|
-
* Component: DialogFooter
|
|
88
|
-
* -------------------------------------------------------------------------- */
|
|
89
|
-
|
|
90
|
-
type DialogFooterProps = React.HTMLAttributes<HTMLDivElement>;
|
|
91
|
-
|
|
92
|
-
function DialogFooter({ className, ...props }: DialogFooterProps): React.JSX.Element {
|
|
93
|
-
return (
|
|
94
|
-
<footer
|
|
95
|
-
className={cn('flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-4 sm:flex-row sm:justify-end', className)}
|
|
96
|
-
{...props}
|
|
97
|
-
/>
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/* -----------------------------------------------------------------------------
|
|
102
|
-
* Component: DialogTitle
|
|
103
|
-
* -------------------------------------------------------------------------- */
|
|
104
|
-
|
|
105
|
-
type DialogTitleElement = React.ElementRef<typeof DialogPrimitive.Title>;
|
|
106
|
-
type DialogTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;
|
|
107
|
-
|
|
108
|
-
const DialogTitle = React.forwardRef<DialogTitleElement, DialogTitleProps>(({ className, ...props }, ref) => (
|
|
109
|
-
<DialogPrimitive.Title
|
|
110
|
-
ref={ref}
|
|
111
|
-
className={cn('text-lg font-semibold leading-none tracking-tight', className)}
|
|
112
|
-
{...props}
|
|
113
|
-
/>
|
|
114
|
-
));
|
|
115
|
-
|
|
116
|
-
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
117
|
-
|
|
118
|
-
/* -----------------------------------------------------------------------------
|
|
119
|
-
* Component: DialogDescription
|
|
120
|
-
* -------------------------------------------------------------------------- */
|
|
121
|
-
|
|
122
|
-
type DialogDescriptionElement = React.ElementRef<typeof DialogPrimitive.Description>;
|
|
123
|
-
type DialogDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;
|
|
124
|
-
|
|
125
|
-
const DialogDescription = React.forwardRef<DialogDescriptionElement, DialogDescriptionProps>(
|
|
126
|
-
({ className, ...props }, ref) => (
|
|
127
|
-
<DialogPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />
|
|
128
|
-
),
|
|
129
|
-
);
|
|
130
|
-
|
|
131
|
-
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
132
|
-
|
|
133
|
-
/* -----------------------------------------------------------------------------
|
|
134
|
-
* Exports
|
|
135
|
-
* -------------------------------------------------------------------------- */
|
|
136
|
-
|
|
137
|
-
export {
|
|
138
|
-
Dialog,
|
|
139
|
-
DialogTrigger,
|
|
140
|
-
DialogClose,
|
|
141
|
-
DialogContent,
|
|
142
|
-
DialogHeader,
|
|
143
|
-
DialogBody,
|
|
144
|
-
DialogFooter,
|
|
145
|
-
DialogTitle,
|
|
146
|
-
DialogDescription,
|
|
147
|
-
type DialogProps,
|
|
148
|
-
type DialogTriggerProps,
|
|
149
|
-
type DialogCloseProps,
|
|
150
|
-
type DialogContentProps,
|
|
151
|
-
type DialogHeaderProps,
|
|
152
|
-
type DialogBodyProps,
|
|
153
|
-
type DialogFooterProps,
|
|
154
|
-
type DialogTitleProps,
|
|
155
|
-
type DialogDescriptionProps,
|
|
156
|
-
};
|
package/src/react/drawer.tsx
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { Drawer as DrawerPrimitive } from 'vaul';
|
|
5
|
-
import { cn } from '../lib/utils';
|
|
6
|
-
|
|
7
|
-
/* -----------------------------------------------------------------------------
|
|
8
|
-
* Component: Drawer
|
|
9
|
-
* -------------------------------------------------------------------------- */
|
|
10
|
-
|
|
11
|
-
type DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;
|
|
12
|
-
|
|
13
|
-
function Drawer({ shouldScaleBackground = true, ...props }: DrawerProps): React.JSX.Element {
|
|
14
|
-
return <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/* -----------------------------------------------------------------------------
|
|
18
|
-
* Component: DrawerTrigger
|
|
19
|
-
* -------------------------------------------------------------------------- */
|
|
20
|
-
|
|
21
|
-
type DrawerTriggerProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Trigger>;
|
|
22
|
-
const DrawerTrigger = DrawerPrimitive.Trigger;
|
|
23
|
-
|
|
24
|
-
/* -----------------------------------------------------------------------------
|
|
25
|
-
* Component: DrawerClose
|
|
26
|
-
* -------------------------------------------------------------------------- */
|
|
27
|
-
|
|
28
|
-
type DrawerCloseProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Close>;
|
|
29
|
-
const DrawerClose = DrawerPrimitive.Close;
|
|
30
|
-
|
|
31
|
-
/* -----------------------------------------------------------------------------
|
|
32
|
-
* Component: DrawerContent
|
|
33
|
-
* -------------------------------------------------------------------------- */
|
|
34
|
-
|
|
35
|
-
type DrawerContentElement = React.ElementRef<typeof DrawerPrimitive.Content>;
|
|
36
|
-
type DrawerContentProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>;
|
|
37
|
-
|
|
38
|
-
const DrawerContent = React.forwardRef<DrawerContentElement, DrawerContentProps>(
|
|
39
|
-
({ children, className, ...props }, ref) => (
|
|
40
|
-
<DrawerPrimitive.Portal>
|
|
41
|
-
<DrawerPrimitive.Overlay className="fixed inset-0 z-50 bg-black/80" />
|
|
42
|
-
<DrawerPrimitive.Content
|
|
43
|
-
ref={ref}
|
|
44
|
-
className={cn(
|
|
45
|
-
'bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border',
|
|
46
|
-
className,
|
|
47
|
-
)}
|
|
48
|
-
{...props}
|
|
49
|
-
>
|
|
50
|
-
<div className="bg-muted mx-auto mt-4 h-2 w-24 rounded-full" />
|
|
51
|
-
{children}
|
|
52
|
-
</DrawerPrimitive.Content>
|
|
53
|
-
</DrawerPrimitive.Portal>
|
|
54
|
-
),
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
DrawerContent.displayName = 'DrawerContent';
|
|
58
|
-
|
|
59
|
-
/* -----------------------------------------------------------------------------
|
|
60
|
-
* Component: DrawerHeader
|
|
61
|
-
* -------------------------------------------------------------------------- */
|
|
62
|
-
|
|
63
|
-
type DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;
|
|
64
|
-
|
|
65
|
-
function DrawerHeader({ className, ...props }: DrawerHeaderProps): React.JSX.Element {
|
|
66
|
-
return <div className={cn('grid gap-1.5 p-4 text-center sm:text-left', className)} {...props} />;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/* -----------------------------------------------------------------------------
|
|
70
|
-
* Component: DrawerFooter
|
|
71
|
-
* -------------------------------------------------------------------------- */
|
|
72
|
-
|
|
73
|
-
type DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;
|
|
74
|
-
|
|
75
|
-
function DrawerFooter({ className, ...props }: DrawerFooterProps): React.JSX.Element {
|
|
76
|
-
return <div className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props} />;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/* -----------------------------------------------------------------------------
|
|
80
|
-
* Component: DrawerTitle
|
|
81
|
-
* -------------------------------------------------------------------------- */
|
|
82
|
-
|
|
83
|
-
type DrawerTitleElement = React.ElementRef<typeof DrawerPrimitive.Title>;
|
|
84
|
-
type DrawerTitleProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>;
|
|
85
|
-
|
|
86
|
-
const DrawerTitle = React.forwardRef<DrawerTitleElement, DrawerTitleProps>(({ className, ...props }, ref) => (
|
|
87
|
-
<DrawerPrimitive.Title
|
|
88
|
-
ref={ref}
|
|
89
|
-
className={cn('text-lg font-semibold leading-none tracking-tight', className)}
|
|
90
|
-
{...props}
|
|
91
|
-
/>
|
|
92
|
-
));
|
|
93
|
-
|
|
94
|
-
DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
|
|
95
|
-
|
|
96
|
-
/* -----------------------------------------------------------------------------
|
|
97
|
-
* Component: DrawerDescription
|
|
98
|
-
* -------------------------------------------------------------------------- */
|
|
99
|
-
|
|
100
|
-
type DrawerDescriptionElement = React.ElementRef<typeof DrawerPrimitive.Description>;
|
|
101
|
-
type DrawerDescriptionProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>;
|
|
102
|
-
|
|
103
|
-
const DrawerDescription = React.forwardRef<DrawerDescriptionElement, DrawerDescriptionProps>(
|
|
104
|
-
({ className, ...props }, ref) => (
|
|
105
|
-
<DrawerPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />
|
|
106
|
-
),
|
|
107
|
-
);
|
|
108
|
-
|
|
109
|
-
DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
|
|
110
|
-
|
|
111
|
-
/* -----------------------------------------------------------------------------
|
|
112
|
-
* Exports
|
|
113
|
-
* -------------------------------------------------------------------------- */
|
|
114
|
-
|
|
115
|
-
export {
|
|
116
|
-
Drawer,
|
|
117
|
-
DrawerTrigger,
|
|
118
|
-
DrawerClose,
|
|
119
|
-
DrawerContent,
|
|
120
|
-
DrawerHeader,
|
|
121
|
-
DrawerFooter,
|
|
122
|
-
DrawerTitle,
|
|
123
|
-
DrawerDescription,
|
|
124
|
-
type DrawerProps,
|
|
125
|
-
type DrawerTriggerProps,
|
|
126
|
-
type DrawerCloseProps,
|
|
127
|
-
type DrawerContentProps,
|
|
128
|
-
type DrawerHeaderProps,
|
|
129
|
-
type DrawerFooterProps,
|
|
130
|
-
type DrawerTitleProps,
|
|
131
|
-
type DrawerDescriptionProps,
|
|
132
|
-
};
|
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
5
|
-
import { CheckIcon, ChevronRightIcon, DotFilledIcon } from '@radix-ui/react-icons';
|
|
6
|
-
import { cn } from '../lib/utils';
|
|
7
|
-
|
|
8
|
-
/* -----------------------------------------------------------------------------
|
|
9
|
-
* Component: DropdownMenu
|
|
10
|
-
* -------------------------------------------------------------------------- */
|
|
11
|
-
|
|
12
|
-
type DropdownMenuProps = React.ComponentProps<typeof DropdownMenuPrimitive.Root>;
|
|
13
|
-
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
14
|
-
|
|
15
|
-
/* -----------------------------------------------------------------------------
|
|
16
|
-
* Component: DropdownMenuTrigger
|
|
17
|
-
* -------------------------------------------------------------------------- */
|
|
18
|
-
|
|
19
|
-
type DropdownMenuTriggerProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>;
|
|
20
|
-
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
21
|
-
|
|
22
|
-
/* -----------------------------------------------------------------------------
|
|
23
|
-
* Component: DropdownMenuGroup
|
|
24
|
-
* -------------------------------------------------------------------------- */
|
|
25
|
-
|
|
26
|
-
type DropdownMenuGroupProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Group>;
|
|
27
|
-
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
28
|
-
|
|
29
|
-
/* -----------------------------------------------------------------------------
|
|
30
|
-
* Component: DropdownMenuSub
|
|
31
|
-
* -------------------------------------------------------------------------- */
|
|
32
|
-
|
|
33
|
-
type DropdownMenuSubProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Sub>;
|
|
34
|
-
const DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
35
|
-
|
|
36
|
-
/* -----------------------------------------------------------------------------
|
|
37
|
-
* Component: DropdownMenuSubTrigger
|
|
38
|
-
* -------------------------------------------------------------------------- */
|
|
39
|
-
|
|
40
|
-
type DropdownMenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup>;
|
|
41
|
-
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
42
|
-
|
|
43
|
-
/* -----------------------------------------------------------------------------
|
|
44
|
-
* Component: DropdownMenuSubTrigger
|
|
45
|
-
* -------------------------------------------------------------------------- */
|
|
46
|
-
|
|
47
|
-
type DropdownMenuSubTriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>;
|
|
48
|
-
|
|
49
|
-
interface DropdownMenuSubTriggerProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> {
|
|
50
|
-
inset?: boolean;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const DropdownMenuSubTrigger = React.forwardRef<DropdownMenuSubTriggerElement, DropdownMenuSubTriggerProps>(
|
|
54
|
-
({ children, className, inset, ...props }, ref) => (
|
|
55
|
-
<DropdownMenuPrimitive.SubTrigger
|
|
56
|
-
ref={ref}
|
|
57
|
-
className={cn(
|
|
58
|
-
'focus:bg-accent data-[state=open]:bg-accent flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none',
|
|
59
|
-
inset && 'pl-8',
|
|
60
|
-
className,
|
|
61
|
-
)}
|
|
62
|
-
{...props}
|
|
63
|
-
>
|
|
64
|
-
{children}
|
|
65
|
-
<ChevronRightIcon className="ml-auto size-4" />
|
|
66
|
-
</DropdownMenuPrimitive.SubTrigger>
|
|
67
|
-
),
|
|
68
|
-
);
|
|
69
|
-
|
|
70
|
-
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
71
|
-
|
|
72
|
-
/* -----------------------------------------------------------------------------
|
|
73
|
-
* Component: DropdownMenuSubContent
|
|
74
|
-
* -------------------------------------------------------------------------- */
|
|
75
|
-
|
|
76
|
-
type DropdownMenuSubContentProps = DropdownMenuPrimitive.DropdownMenuSubContentProps;
|
|
77
|
-
|
|
78
|
-
const DropdownMenuSubContent = React.forwardRef<
|
|
79
|
-
React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
|
|
80
|
-
DropdownMenuSubContentProps
|
|
81
|
-
>(({ className, ...props }, ref) => (
|
|
82
|
-
<DropdownMenuPrimitive.Portal>
|
|
83
|
-
<DropdownMenuPrimitive.SubContent
|
|
84
|
-
ref={ref}
|
|
85
|
-
className={cn(
|
|
86
|
-
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',
|
|
87
|
-
className,
|
|
88
|
-
)}
|
|
89
|
-
{...props}
|
|
90
|
-
/>
|
|
91
|
-
</DropdownMenuPrimitive.Portal>
|
|
92
|
-
));
|
|
93
|
-
|
|
94
|
-
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
95
|
-
|
|
96
|
-
/* -----------------------------------------------------------------------------
|
|
97
|
-
* Component: DropdownMenuContent
|
|
98
|
-
* -------------------------------------------------------------------------- */
|
|
99
|
-
|
|
100
|
-
type DropdownMenuContentElement = React.ElementRef<typeof DropdownMenuPrimitive.Content>;
|
|
101
|
-
type DropdownMenuContentProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>;
|
|
102
|
-
|
|
103
|
-
const DropdownMenuContent = React.forwardRef<DropdownMenuContentElement, DropdownMenuContentProps>(
|
|
104
|
-
({ className, sideOffset = 6, ...props }, ref) => (
|
|
105
|
-
<DropdownMenuPrimitive.Portal>
|
|
106
|
-
<DropdownMenuPrimitive.Content
|
|
107
|
-
ref={ref}
|
|
108
|
-
className={cn(
|
|
109
|
-
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',
|
|
110
|
-
className,
|
|
111
|
-
)}
|
|
112
|
-
sideOffset={sideOffset}
|
|
113
|
-
{...props}
|
|
114
|
-
/>
|
|
115
|
-
</DropdownMenuPrimitive.Portal>
|
|
116
|
-
),
|
|
117
|
-
);
|
|
118
|
-
|
|
119
|
-
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
120
|
-
|
|
121
|
-
/* -----------------------------------------------------------------------------
|
|
122
|
-
* Component: DropdownMenuItem
|
|
123
|
-
* -------------------------------------------------------------------------- */
|
|
124
|
-
|
|
125
|
-
type DropdownMenuItemElement = React.ElementRef<typeof DropdownMenuPrimitive.Item>;
|
|
126
|
-
|
|
127
|
-
interface DropdownMenuItemProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> {
|
|
128
|
-
inset?: boolean;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
const DropdownMenuItem = React.forwardRef<DropdownMenuItemElement, DropdownMenuItemProps>(
|
|
132
|
-
({ className, inset, ...props }, ref) => (
|
|
133
|
-
<DropdownMenuPrimitive.Item
|
|
134
|
-
ref={ref}
|
|
135
|
-
className={cn(
|
|
136
|
-
'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm transition focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',
|
|
137
|
-
inset && 'pl-8',
|
|
138
|
-
className,
|
|
139
|
-
)}
|
|
140
|
-
{...props}
|
|
141
|
-
/>
|
|
142
|
-
),
|
|
143
|
-
);
|
|
144
|
-
|
|
145
|
-
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
146
|
-
|
|
147
|
-
/* -----------------------------------------------------------------------------
|
|
148
|
-
* Component: DropdownMenuCheckboxItem
|
|
149
|
-
* -------------------------------------------------------------------------- */
|
|
150
|
-
|
|
151
|
-
type DropdownMenuCheckboxItemElement = React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>;
|
|
152
|
-
type DropdownMenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>;
|
|
153
|
-
|
|
154
|
-
const DropdownMenuCheckboxItem = React.forwardRef<DropdownMenuCheckboxItemElement, DropdownMenuCheckboxItemProps>(
|
|
155
|
-
({ children, className, checked, ...props }, ref) => (
|
|
156
|
-
<DropdownMenuPrimitive.CheckboxItem
|
|
157
|
-
ref={ref}
|
|
158
|
-
checked={checked}
|
|
159
|
-
className={cn(
|
|
160
|
-
'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm transition focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',
|
|
161
|
-
className,
|
|
162
|
-
)}
|
|
163
|
-
{...props}
|
|
164
|
-
>
|
|
165
|
-
<span className="absolute left-2 flex size-3.5 items-center justify-center">
|
|
166
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
167
|
-
<CheckIcon className="size-4" />
|
|
168
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
169
|
-
</span>
|
|
170
|
-
{children}
|
|
171
|
-
</DropdownMenuPrimitive.CheckboxItem>
|
|
172
|
-
),
|
|
173
|
-
);
|
|
174
|
-
|
|
175
|
-
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
176
|
-
|
|
177
|
-
/* -----------------------------------------------------------------------------
|
|
178
|
-
* Component: DropdownMenuRadioItem
|
|
179
|
-
* -------------------------------------------------------------------------- */
|
|
180
|
-
|
|
181
|
-
type DropdownMenuRadioItemElement = React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>;
|
|
182
|
-
type DropdownMenuRadioItemProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>;
|
|
183
|
-
|
|
184
|
-
const DropdownMenuRadioItem = React.forwardRef<DropdownMenuRadioItemElement, DropdownMenuRadioItemProps>(
|
|
185
|
-
({ children, className, ...props }, ref) => (
|
|
186
|
-
<DropdownMenuPrimitive.RadioItem
|
|
187
|
-
ref={ref}
|
|
188
|
-
className={cn(
|
|
189
|
-
'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm transition focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',
|
|
190
|
-
className,
|
|
191
|
-
)}
|
|
192
|
-
{...props}
|
|
193
|
-
>
|
|
194
|
-
<span className="absolute left-2 flex size-3.5 items-center justify-center">
|
|
195
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
196
|
-
<DotFilledIcon className="size-4 fill-current" />
|
|
197
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
198
|
-
</span>
|
|
199
|
-
{children}
|
|
200
|
-
</DropdownMenuPrimitive.RadioItem>
|
|
201
|
-
),
|
|
202
|
-
);
|
|
203
|
-
|
|
204
|
-
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
205
|
-
|
|
206
|
-
/* -----------------------------------------------------------------------------
|
|
207
|
-
* Component: DropdownMenuLabel
|
|
208
|
-
* -------------------------------------------------------------------------- */
|
|
209
|
-
|
|
210
|
-
type DropdownMenuLabelElement = React.ElementRef<typeof DropdownMenuPrimitive.Label>;
|
|
211
|
-
|
|
212
|
-
interface DropdownMenuLabelProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> {
|
|
213
|
-
inset?: boolean;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
const DropdownMenuLabel = React.forwardRef<DropdownMenuLabelElement, DropdownMenuLabelProps>(
|
|
217
|
-
({ className, inset, ...props }, ref) => (
|
|
218
|
-
<DropdownMenuPrimitive.Label
|
|
219
|
-
ref={ref}
|
|
220
|
-
className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}
|
|
221
|
-
{...props}
|
|
222
|
-
/>
|
|
223
|
-
),
|
|
224
|
-
);
|
|
225
|
-
|
|
226
|
-
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
227
|
-
|
|
228
|
-
/* -----------------------------------------------------------------------------
|
|
229
|
-
* Component: DropdownMenuSeparator
|
|
230
|
-
* -------------------------------------------------------------------------- */
|
|
231
|
-
|
|
232
|
-
type DropdownMenuSeparatorElement = React.ElementRef<typeof DropdownMenuPrimitive.Separator>;
|
|
233
|
-
type DropdownMenuSeparatorProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>;
|
|
234
|
-
|
|
235
|
-
const DropdownMenuSeparator = React.forwardRef<DropdownMenuSeparatorElement, DropdownMenuSeparatorProps>(
|
|
236
|
-
({ className, ...props }, ref) => (
|
|
237
|
-
<DropdownMenuPrimitive.Separator ref={ref} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />
|
|
238
|
-
),
|
|
239
|
-
);
|
|
240
|
-
|
|
241
|
-
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
242
|
-
|
|
243
|
-
/* -----------------------------------------------------------------------------
|
|
244
|
-
* Component: DropdownMenuShortcut
|
|
245
|
-
* -------------------------------------------------------------------------- */
|
|
246
|
-
|
|
247
|
-
type DropdownMenuShortcutProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
248
|
-
|
|
249
|
-
function DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps): React.JSX.Element {
|
|
250
|
-
return <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
/* -----------------------------------------------------------------------------
|
|
254
|
-
* Exports
|
|
255
|
-
* -------------------------------------------------------------------------- */
|
|
256
|
-
|
|
257
|
-
export {
|
|
258
|
-
DropdownMenu,
|
|
259
|
-
DropdownMenuTrigger,
|
|
260
|
-
DropdownMenuContent,
|
|
261
|
-
DropdownMenuItem,
|
|
262
|
-
DropdownMenuCheckboxItem,
|
|
263
|
-
DropdownMenuRadioItem,
|
|
264
|
-
DropdownMenuLabel,
|
|
265
|
-
DropdownMenuSeparator,
|
|
266
|
-
DropdownMenuShortcut,
|
|
267
|
-
DropdownMenuGroup,
|
|
268
|
-
DropdownMenuSub,
|
|
269
|
-
DropdownMenuSubContent,
|
|
270
|
-
DropdownMenuSubTrigger,
|
|
271
|
-
DropdownMenuRadioGroup,
|
|
272
|
-
type DropdownMenuProps,
|
|
273
|
-
type DropdownMenuTriggerProps,
|
|
274
|
-
type DropdownMenuContentProps,
|
|
275
|
-
type DropdownMenuItemProps,
|
|
276
|
-
type DropdownMenuCheckboxItemProps,
|
|
277
|
-
type DropdownMenuRadioItemProps,
|
|
278
|
-
type DropdownMenuLabelProps,
|
|
279
|
-
type DropdownMenuSeparatorProps,
|
|
280
|
-
type DropdownMenuShortcutProps,
|
|
281
|
-
type DropdownMenuGroupProps,
|
|
282
|
-
type DropdownMenuSubProps,
|
|
283
|
-
type DropdownMenuSubContentProps,
|
|
284
|
-
type DropdownMenuSubTriggerProps,
|
|
285
|
-
type DropdownMenuRadioGroupProps,
|
|
286
|
-
};
|
package/src/react/em.tsx
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Slot } from '@radix-ui/react-slot';
|
|
3
|
-
|
|
4
|
-
/* -----------------------------------------------------------------------------
|
|
5
|
-
* Component: Em
|
|
6
|
-
* -------------------------------------------------------------------------- */
|
|
7
|
-
|
|
8
|
-
type EmElement = HTMLElement;
|
|
9
|
-
|
|
10
|
-
interface EmProps extends React.HTMLAttributes<HTMLElement> {
|
|
11
|
-
asChild?: boolean;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const Em = React.forwardRef<EmElement, EmProps>(({ asChild, ...props }, ref) => {
|
|
15
|
-
const Component = asChild ? Slot : 'em';
|
|
16
|
-
|
|
17
|
-
return <Component ref={ref} {...props} />;
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
Em.displayName = 'Em';
|
|
21
|
-
|
|
22
|
-
/* -----------------------------------------------------------------------------
|
|
23
|
-
* Exports
|
|
24
|
-
* -------------------------------------------------------------------------- */
|
|
25
|
-
|
|
26
|
-
export { Em, type EmProps };
|