@naeil/ui 0.1.0 → 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/CHANGELOG.md +18 -0
- package/DESIGN.md +186 -0
- package/LICENSE +21 -0
- package/README.md +85 -22
- package/THIRD_PARTY_NOTICES.md +49 -0
- package/dist/chunk-JBTDRVZ7.js +46 -0
- package/dist/chunk-QKVN6Q6C.js +438 -0
- package/dist/components/index.d.ts +87 -0
- package/dist/components/index.js +832 -0
- package/dist/components/ui/index.d.ts +105 -0
- package/dist/components/ui/index.js +736 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +7 -0
- package/dist/source/components/footer.d.ts +15 -0
- package/dist/source/components/footer.js +172 -0
- package/dist/source/components/index.d.ts +11 -0
- package/dist/source/components/index.js +26 -0
- package/dist/source/components/locale-switcher.d.ts +17 -0
- package/dist/source/components/locale-switcher.js +66 -0
- package/dist/source/components/logo.d.ts +9 -0
- package/dist/source/components/logo.js +52 -0
- package/dist/source/components/nav.d.ts +39 -0
- package/dist/source/components/nav.js +412 -0
- package/dist/source/components/theme-provider.d.ts +6 -0
- package/dist/source/components/theme-provider.js +45 -0
- package/dist/source/components/theme-toggle-icon.d.ts +5 -0
- package/dist/source/components/theme-toggle-icon.js +62 -0
- package/dist/source/components/theme-toggle.d.ts +5 -0
- package/dist/source/components/theme-toggle.js +34 -0
- package/dist/source/components/typography.d.ts +12 -0
- package/dist/source/components/typography.js +49 -0
- package/dist/source/components/ui/avatar.d.ts +14 -0
- package/dist/source/components/ui/avatar.js +137 -0
- package/dist/source/components/ui/badge.d.ts +13 -0
- package/dist/source/components/ui/badge.js +76 -0
- package/dist/source/components/ui/button.d.ts +14 -0
- package/dist/source/components/ui/button.js +88 -0
- package/dist/source/components/ui/card.d.ts +13 -0
- package/dist/source/components/ui/card.js +135 -0
- package/dist/source/components/ui/checkbox.d.ts +7 -0
- package/dist/source/components/ui/checkbox.js +58 -0
- package/dist/source/components/ui/dialog.d.ts +20 -0
- package/dist/source/components/ui/dialog.js +182 -0
- package/dist/source/components/ui/dropdown-menu.d.ts +28 -0
- package/dist/source/components/ui/dropdown-menu.js +282 -0
- package/dist/source/components/ui/index.d.ts +19 -0
- package/dist/source/components/ui/index.js +131 -0
- package/dist/source/components/ui/input.d.ts +6 -0
- package/dist/source/components/ui/input.js +49 -0
- package/dist/source/components/ui/select.d.ts +16 -0
- package/dist/source/components/ui/select.js +197 -0
- package/dist/source/components/ui/sonner.d.ts +6 -0
- package/dist/source/components/ui/sonner.js +80 -0
- package/dist/source/components/ui/switch.d.ts +7 -0
- package/dist/source/components/ui/switch.js +54 -0
- package/dist/source/components/ui/tabs.d.ts +10 -0
- package/dist/source/components/ui/tabs.js +57 -0
- package/dist/source/components/ui/textarea.d.ts +6 -0
- package/dist/source/components/ui/textarea.js +46 -0
- package/dist/source/i18n/config.d.ts +6 -0
- package/dist/source/i18n/config.js +12 -0
- package/dist/source/i18n/routing.d.ts +371 -0
- package/dist/source/i18n/routing.js +17 -0
- package/dist/source/lib/design/modal-inert.d.ts +6 -0
- package/dist/source/lib/design/modal-inert.js +73 -0
- package/dist/source/lib/utils.d.ts +5 -0
- package/dist/source/lib/utils.js +8 -0
- package/dist/tokens.ts +217 -0
- package/docs/components/README.md +21 -0
- package/docs/components/avatar.md +47 -0
- package/docs/components/badge.md +29 -0
- package/docs/components/button.md +39 -0
- package/docs/components/card.md +32 -0
- package/docs/components/checkbox.md +35 -0
- package/docs/components/common.md +31 -0
- package/docs/components/composition.md +68 -0
- package/docs/components/dialog.md +41 -0
- package/docs/components/dropdown-menu.md +38 -0
- package/docs/components/input.md +32 -0
- package/docs/components/select.md +39 -0
- package/docs/components/sonner.md +37 -0
- package/docs/components/switch.md +33 -0
- package/docs/components/tabs.md +40 -0
- package/docs/components/textarea.md +35 -0
- package/docs/design/component-demand.md +30 -0
- package/docs/design/public-ui-final-verification.md +96 -0
- package/docs/design/public-ui-release-validation.md +86 -0
- package/docs/design/public-ui-stage3-verification.md +98 -0
- package/docs/design/public-ui-stage4-verification.md +129 -0
- package/docs/design/public-ui-support.md +40 -0
- package/docs/design/v2-migration.md +199 -0
- package/docs/package-release.md +89 -0
- package/licenses/Noto-Sans-JP-OFL.txt +93 -0
- package/licenses/Nunito-Sans-OFL.txt +93 -0
- package/licenses/Pretendard-OFL.txt +94 -0
- package/licenses/React-MIT.txt +21 -0
- package/licenses/Storybook-MIT.txt +21 -0
- package/licenses/popper-MIT.txt +25 -0
- package/licenses/react-remove-scroll-bar-MIT.txt +21 -0
- package/licenses/store2-MIT.txt +22 -0
- package/licenses/toggle-selection-MIT.txt +21 -0
- package/package.json +215 -26
- package/src/styles/components.css +276 -0
- package/src/styles/globals.css +18 -0
- package/src/styles/theme.css +293 -0
- package/messages/en.json +0 -221
- package/messages/ja.json +0 -221
- package/messages/ko.json +0 -221
- package/postcss.config.mjs +0 -7
- package/src/app/[locale]/(content)/baby-agent/page.tsx +0 -30
- package/src/app/[locale]/(content)/blog/page.tsx +0 -68
- package/src/app/[locale]/(content)/cc/page.tsx +0 -216
- package/src/app/[locale]/(content)/design/page.tsx +0 -703
- package/src/app/[locale]/(content)/layout.tsx +0 -7
- package/src/app/[locale]/(content)/pkm/page.tsx +0 -31
- package/src/app/[locale]/(content)/projects/page.tsx +0 -100
- package/src/app/[locale]/(content)/sa/page.tsx +0 -179
- package/src/app/[locale]/(landing)/page.tsx +0 -157
- package/src/app/[locale]/layout.tsx +0 -72
- package/src/app/[locale]/login/actions.ts +0 -10
- package/src/app/[locale]/login/oauth-buttons.tsx +0 -78
- package/src/app/[locale]/login/page.tsx +0 -85
- package/src/app/auth/callback/route.ts +0 -78
- package/src/app/favicon.ico +0 -0
- package/src/app/globals.css +0 -32
- package/src/app/layout.tsx +0 -22
- package/src/app/sitemap.ts +0 -26
- package/src/components/accent-picker.tsx +0 -62
- package/src/components/auth-slot.tsx +0 -96
- package/src/components/footer-wrapper.tsx +0 -8
- package/src/components/footer.tsx +0 -193
- package/src/components/hero-scene.tsx +0 -948
- package/src/components/hero-section.tsx +0 -57
- package/src/components/locale-switcher.tsx +0 -74
- package/src/components/logo.tsx +0 -51
- package/src/components/nav-server-wrapper.tsx +0 -22
- package/src/components/nav-wrapper.tsx +0 -45
- package/src/components/nav.tsx +0 -550
- package/src/components/paraglider-cursor.tsx +0 -112
- package/src/components/project-layout.tsx +0 -194
- package/src/components/theme-provider.tsx +0 -10
- package/src/components/theme-toggle-icon.tsx +0 -62
- package/src/components/theme-toggle.tsx +0 -39
- package/src/components/typography.tsx +0 -27
- package/src/components/ui/avatar.tsx +0 -109
- package/src/components/ui/badge.tsx +0 -47
- package/src/components/ui/button.tsx +0 -65
- package/src/components/ui/card.tsx +0 -106
- package/src/components/ui/dialog.tsx +0 -158
- package/src/components/ui/dropdown-menu.tsx +0 -257
- package/src/components/ui/input.tsx +0 -21
- package/src/components/ui/sonner.tsx +0 -54
- package/src/components/workflow-diagram.tsx +0 -414
- package/src/i18n/config.ts +0 -8
- package/src/i18n/request.ts +0 -16
- package/src/i18n/routing.ts +0 -12
- package/src/lib/supabase/client.ts +0 -18
- package/src/lib/supabase/middleware.ts +0 -42
- package/src/lib/supabase/server.ts +0 -37
- package/src/lib/utils.ts +0 -6
- package/src/proxy.ts +0 -62
- package/src/tokens/.gitkeep +0 -0
- package/src/tokens/color.json +0 -56
- package/src/tokens/radius.json +0 -9
- package/src/tokens/semantic.json +0 -81
- package/src/tokens/shadow.json +0 -7
- package/src/tokens/spacing.json +0 -16
- package/src/tokens/typography.json +0 -34
- package/src/types/i18n.d.ts +0 -6
- package/src/utils/.gitkeep +0 -0
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { XIcon } from "lucide-react"
|
|
5
|
-
import { Dialog as DialogPrimitive } from "radix-ui"
|
|
6
|
-
|
|
7
|
-
import { cn } from "../../lib/utils"
|
|
8
|
-
import { Button } from "./button"
|
|
9
|
-
|
|
10
|
-
function Dialog({
|
|
11
|
-
...props
|
|
12
|
-
}: React.ComponentProps<typeof DialogPrimitive.Root>) {
|
|
13
|
-
return <DialogPrimitive.Root data-slot="dialog" {...props} />
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function DialogTrigger({
|
|
17
|
-
...props
|
|
18
|
-
}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
|
|
19
|
-
return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function DialogPortal({
|
|
23
|
-
...props
|
|
24
|
-
}: React.ComponentProps<typeof DialogPrimitive.Portal>) {
|
|
25
|
-
return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function DialogClose({
|
|
29
|
-
...props
|
|
30
|
-
}: React.ComponentProps<typeof DialogPrimitive.Close>) {
|
|
31
|
-
return <DialogPrimitive.Close data-slot="dialog-close" {...props} />
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function DialogOverlay({
|
|
35
|
-
className,
|
|
36
|
-
...props
|
|
37
|
-
}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
|
|
38
|
-
return (
|
|
39
|
-
<DialogPrimitive.Overlay
|
|
40
|
-
data-slot="dialog-overlay"
|
|
41
|
-
className={cn(
|
|
42
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/60 backdrop-blur-sm",
|
|
43
|
-
className
|
|
44
|
-
)}
|
|
45
|
-
{...props}
|
|
46
|
-
/>
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function DialogContent({
|
|
51
|
-
className,
|
|
52
|
-
children,
|
|
53
|
-
showCloseButton = true,
|
|
54
|
-
...props
|
|
55
|
-
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
56
|
-
showCloseButton?: boolean
|
|
57
|
-
}) {
|
|
58
|
-
return (
|
|
59
|
-
<DialogPortal data-slot="dialog-portal">
|
|
60
|
-
<DialogOverlay />
|
|
61
|
-
<DialogPrimitive.Content
|
|
62
|
-
data-slot="dialog-content"
|
|
63
|
-
className={cn(
|
|
64
|
-
"bg-background 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=open]:duration-200 data-[state=closed]:duration-150 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border border-border-subtle p-6 outline-none sm:max-w-lg",
|
|
65
|
-
className
|
|
66
|
-
)}
|
|
67
|
-
{...props}
|
|
68
|
-
>
|
|
69
|
-
{children}
|
|
70
|
-
{showCloseButton && (
|
|
71
|
-
<DialogPrimitive.Close
|
|
72
|
-
data-slot="dialog-close"
|
|
73
|
-
className="absolute top-4 right-4 rounded-sm text-muted-foreground hover:text-foreground transition-colors focus-visible:ring-accent/25 focus-visible:ring-[2px] focus-visible:outline-none disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
|
|
74
|
-
>
|
|
75
|
-
<XIcon />
|
|
76
|
-
<span className="sr-only">Close</span>
|
|
77
|
-
</DialogPrimitive.Close>
|
|
78
|
-
)}
|
|
79
|
-
</DialogPrimitive.Content>
|
|
80
|
-
</DialogPortal>
|
|
81
|
-
)
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
85
|
-
return (
|
|
86
|
-
<div
|
|
87
|
-
data-slot="dialog-header"
|
|
88
|
-
className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
|
|
89
|
-
{...props}
|
|
90
|
-
/>
|
|
91
|
-
)
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function DialogFooter({
|
|
95
|
-
className,
|
|
96
|
-
showCloseButton = false,
|
|
97
|
-
children,
|
|
98
|
-
...props
|
|
99
|
-
}: React.ComponentProps<"div"> & {
|
|
100
|
-
showCloseButton?: boolean
|
|
101
|
-
}) {
|
|
102
|
-
return (
|
|
103
|
-
<div
|
|
104
|
-
data-slot="dialog-footer"
|
|
105
|
-
className={cn(
|
|
106
|
-
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
107
|
-
className
|
|
108
|
-
)}
|
|
109
|
-
{...props}
|
|
110
|
-
>
|
|
111
|
-
{children}
|
|
112
|
-
{showCloseButton && (
|
|
113
|
-
<DialogPrimitive.Close asChild>
|
|
114
|
-
<Button variant="outline">Close</Button>
|
|
115
|
-
</DialogPrimitive.Close>
|
|
116
|
-
)}
|
|
117
|
-
</div>
|
|
118
|
-
)
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
function DialogTitle({
|
|
122
|
-
className,
|
|
123
|
-
...props
|
|
124
|
-
}: React.ComponentProps<typeof DialogPrimitive.Title>) {
|
|
125
|
-
return (
|
|
126
|
-
<DialogPrimitive.Title
|
|
127
|
-
data-slot="dialog-title"
|
|
128
|
-
className={cn("text-lg leading-none font-semibold", className)}
|
|
129
|
-
{...props}
|
|
130
|
-
/>
|
|
131
|
-
)
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
function DialogDescription({
|
|
135
|
-
className,
|
|
136
|
-
...props
|
|
137
|
-
}: React.ComponentProps<typeof DialogPrimitive.Description>) {
|
|
138
|
-
return (
|
|
139
|
-
<DialogPrimitive.Description
|
|
140
|
-
data-slot="dialog-description"
|
|
141
|
-
className={cn("text-muted-foreground text-sm", className)}
|
|
142
|
-
{...props}
|
|
143
|
-
/>
|
|
144
|
-
)
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export {
|
|
148
|
-
Dialog,
|
|
149
|
-
DialogClose,
|
|
150
|
-
DialogContent,
|
|
151
|
-
DialogDescription,
|
|
152
|
-
DialogFooter,
|
|
153
|
-
DialogHeader,
|
|
154
|
-
DialogOverlay,
|
|
155
|
-
DialogPortal,
|
|
156
|
-
DialogTitle,
|
|
157
|
-
DialogTrigger,
|
|
158
|
-
}
|
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react"
|
|
5
|
-
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui"
|
|
6
|
-
|
|
7
|
-
import { cn } from "../../lib/utils"
|
|
8
|
-
|
|
9
|
-
function DropdownMenu({
|
|
10
|
-
...props
|
|
11
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
|
|
12
|
-
return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function DropdownMenuPortal({
|
|
16
|
-
...props
|
|
17
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
|
|
18
|
-
return (
|
|
19
|
-
<DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
|
|
20
|
-
)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function DropdownMenuTrigger({
|
|
24
|
-
...props
|
|
25
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {
|
|
26
|
-
return (
|
|
27
|
-
<DropdownMenuPrimitive.Trigger
|
|
28
|
-
data-slot="dropdown-menu-trigger"
|
|
29
|
-
{...props}
|
|
30
|
-
/>
|
|
31
|
-
)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function DropdownMenuContent({
|
|
35
|
-
className,
|
|
36
|
-
sideOffset = 4,
|
|
37
|
-
...props
|
|
38
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {
|
|
39
|
-
return (
|
|
40
|
-
<DropdownMenuPrimitive.Portal>
|
|
41
|
-
<DropdownMenuPrimitive.Content
|
|
42
|
-
data-slot="dropdown-menu-content"
|
|
43
|
-
sideOffset={sideOffset}
|
|
44
|
-
className={cn(
|
|
45
|
-
"bg-card/95 text-popover-foreground backdrop-blur-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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border border-border-subtle p-1 shadow-md",
|
|
46
|
-
className
|
|
47
|
-
)}
|
|
48
|
-
{...props}
|
|
49
|
-
/>
|
|
50
|
-
</DropdownMenuPrimitive.Portal>
|
|
51
|
-
)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function DropdownMenuGroup({
|
|
55
|
-
...props
|
|
56
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {
|
|
57
|
-
return (
|
|
58
|
-
<DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
|
|
59
|
-
)
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function DropdownMenuItem({
|
|
63
|
-
className,
|
|
64
|
-
inset,
|
|
65
|
-
variant = "default",
|
|
66
|
-
...props
|
|
67
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
68
|
-
inset?: boolean
|
|
69
|
-
variant?: "default" | "destructive"
|
|
70
|
-
}) {
|
|
71
|
-
return (
|
|
72
|
-
<DropdownMenuPrimitive.Item
|
|
73
|
-
data-slot="dropdown-menu-item"
|
|
74
|
-
data-inset={inset}
|
|
75
|
-
data-variant={variant}
|
|
76
|
-
className={cn(
|
|
77
|
-
"focus:bg-surface-subtle data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden select-none transition-colors duration-150 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
78
|
-
className
|
|
79
|
-
)}
|
|
80
|
-
{...props}
|
|
81
|
-
/>
|
|
82
|
-
)
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function DropdownMenuCheckboxItem({
|
|
86
|
-
className,
|
|
87
|
-
children,
|
|
88
|
-
checked,
|
|
89
|
-
...props
|
|
90
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {
|
|
91
|
-
return (
|
|
92
|
-
<DropdownMenuPrimitive.CheckboxItem
|
|
93
|
-
data-slot="dropdown-menu-checkbox-item"
|
|
94
|
-
className={cn(
|
|
95
|
-
"focus:bg-surface-subtle relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-sm outline-hidden select-none transition-colors duration-150 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
96
|
-
className
|
|
97
|
-
)}
|
|
98
|
-
checked={checked}
|
|
99
|
-
{...props}
|
|
100
|
-
>
|
|
101
|
-
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
102
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
103
|
-
<CheckIcon className="size-4" />
|
|
104
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
105
|
-
</span>
|
|
106
|
-
{children}
|
|
107
|
-
</DropdownMenuPrimitive.CheckboxItem>
|
|
108
|
-
)
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function DropdownMenuRadioGroup({
|
|
112
|
-
...props
|
|
113
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {
|
|
114
|
-
return (
|
|
115
|
-
<DropdownMenuPrimitive.RadioGroup
|
|
116
|
-
data-slot="dropdown-menu-radio-group"
|
|
117
|
-
{...props}
|
|
118
|
-
/>
|
|
119
|
-
)
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function DropdownMenuRadioItem({
|
|
123
|
-
className,
|
|
124
|
-
children,
|
|
125
|
-
...props
|
|
126
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {
|
|
127
|
-
return (
|
|
128
|
-
<DropdownMenuPrimitive.RadioItem
|
|
129
|
-
data-slot="dropdown-menu-radio-item"
|
|
130
|
-
className={cn(
|
|
131
|
-
"focus:bg-surface-subtle relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-sm outline-hidden select-none transition-colors duration-150 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
132
|
-
className
|
|
133
|
-
)}
|
|
134
|
-
{...props}
|
|
135
|
-
>
|
|
136
|
-
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
137
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
138
|
-
<CircleIcon className="size-2 fill-current" />
|
|
139
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
140
|
-
</span>
|
|
141
|
-
{children}
|
|
142
|
-
</DropdownMenuPrimitive.RadioItem>
|
|
143
|
-
)
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
function DropdownMenuLabel({
|
|
147
|
-
className,
|
|
148
|
-
inset,
|
|
149
|
-
...props
|
|
150
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
151
|
-
inset?: boolean
|
|
152
|
-
}) {
|
|
153
|
-
return (
|
|
154
|
-
<DropdownMenuPrimitive.Label
|
|
155
|
-
data-slot="dropdown-menu-label"
|
|
156
|
-
data-inset={inset}
|
|
157
|
-
className={cn(
|
|
158
|
-
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
159
|
-
className
|
|
160
|
-
)}
|
|
161
|
-
{...props}
|
|
162
|
-
/>
|
|
163
|
-
)
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
function DropdownMenuSeparator({
|
|
167
|
-
className,
|
|
168
|
-
...props
|
|
169
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {
|
|
170
|
-
return (
|
|
171
|
-
<DropdownMenuPrimitive.Separator
|
|
172
|
-
data-slot="dropdown-menu-separator"
|
|
173
|
-
className={cn("bg-border-subtle -mx-1 my-1 h-px", className)}
|
|
174
|
-
{...props}
|
|
175
|
-
/>
|
|
176
|
-
)
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
function DropdownMenuShortcut({
|
|
180
|
-
className,
|
|
181
|
-
...props
|
|
182
|
-
}: React.ComponentProps<"span">) {
|
|
183
|
-
return (
|
|
184
|
-
<span
|
|
185
|
-
data-slot="dropdown-menu-shortcut"
|
|
186
|
-
className={cn(
|
|
187
|
-
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
188
|
-
className
|
|
189
|
-
)}
|
|
190
|
-
{...props}
|
|
191
|
-
/>
|
|
192
|
-
)
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
function DropdownMenuSub({
|
|
196
|
-
...props
|
|
197
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
|
|
198
|
-
return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
function DropdownMenuSubTrigger({
|
|
202
|
-
className,
|
|
203
|
-
inset,
|
|
204
|
-
children,
|
|
205
|
-
...props
|
|
206
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
207
|
-
inset?: boolean
|
|
208
|
-
}) {
|
|
209
|
-
return (
|
|
210
|
-
<DropdownMenuPrimitive.SubTrigger
|
|
211
|
-
data-slot="dropdown-menu-sub-trigger"
|
|
212
|
-
data-inset={inset}
|
|
213
|
-
className={cn(
|
|
214
|
-
"focus:bg-surface-subtle data-[state=open]:bg-surface-subtle [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden select-none transition-colors duration-150 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
215
|
-
className
|
|
216
|
-
)}
|
|
217
|
-
{...props}
|
|
218
|
-
>
|
|
219
|
-
{children}
|
|
220
|
-
<ChevronRightIcon className="ml-auto size-4" />
|
|
221
|
-
</DropdownMenuPrimitive.SubTrigger>
|
|
222
|
-
)
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
function DropdownMenuSubContent({
|
|
226
|
-
className,
|
|
227
|
-
...props
|
|
228
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {
|
|
229
|
-
return (
|
|
230
|
-
<DropdownMenuPrimitive.SubContent
|
|
231
|
-
data-slot="dropdown-menu-sub-content"
|
|
232
|
-
className={cn(
|
|
233
|
-
"bg-card/95 text-popover-foreground backdrop-blur-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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg border border-border-subtle p-1 shadow-lg",
|
|
234
|
-
className
|
|
235
|
-
)}
|
|
236
|
-
{...props}
|
|
237
|
-
/>
|
|
238
|
-
)
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
export {
|
|
242
|
-
DropdownMenu,
|
|
243
|
-
DropdownMenuPortal,
|
|
244
|
-
DropdownMenuTrigger,
|
|
245
|
-
DropdownMenuContent,
|
|
246
|
-
DropdownMenuGroup,
|
|
247
|
-
DropdownMenuLabel,
|
|
248
|
-
DropdownMenuItem,
|
|
249
|
-
DropdownMenuCheckboxItem,
|
|
250
|
-
DropdownMenuRadioGroup,
|
|
251
|
-
DropdownMenuRadioItem,
|
|
252
|
-
DropdownMenuSeparator,
|
|
253
|
-
DropdownMenuShortcut,
|
|
254
|
-
DropdownMenuSub,
|
|
255
|
-
DropdownMenuSubTrigger,
|
|
256
|
-
DropdownMenuSubContent,
|
|
257
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
|
|
3
|
-
import { cn } from "../../lib/utils"
|
|
4
|
-
|
|
5
|
-
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
6
|
-
return (
|
|
7
|
-
<input
|
|
8
|
-
type={type}
|
|
9
|
-
data-slot="input"
|
|
10
|
-
className={cn(
|
|
11
|
-
"file:text-foreground placeholder:text-muted-foreground/60 selection:bg-primary selection:text-primary-foreground dark:bg-surface-subtle border-border-subtle h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base transition-colors duration-150 outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
12
|
-
"focus-visible:border-accent focus-visible:ring-accent/25 focus-visible:ring-[2px]",
|
|
13
|
-
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
14
|
-
className
|
|
15
|
-
)}
|
|
16
|
-
{...props}
|
|
17
|
-
/>
|
|
18
|
-
)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export { Input }
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
CircleCheckIcon,
|
|
5
|
-
InfoIcon,
|
|
6
|
-
Loader2Icon,
|
|
7
|
-
OctagonXIcon,
|
|
8
|
-
TriangleAlertIcon,
|
|
9
|
-
} from "lucide-react"
|
|
10
|
-
import { useTheme } from "next-themes"
|
|
11
|
-
import { Toaster as Sonner, type ToasterProps } from "sonner"
|
|
12
|
-
|
|
13
|
-
const Toaster = ({ ...props }: ToasterProps) => {
|
|
14
|
-
const { theme = "system" } = useTheme()
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<Sonner
|
|
18
|
-
theme={theme as ToasterProps["theme"]}
|
|
19
|
-
className="toaster group font-sans"
|
|
20
|
-
position="bottom-right"
|
|
21
|
-
duration={4000}
|
|
22
|
-
icons={{
|
|
23
|
-
success: <CircleCheckIcon className="size-4" />,
|
|
24
|
-
info: <InfoIcon className="size-4" />,
|
|
25
|
-
warning: <TriangleAlertIcon className="size-4" />,
|
|
26
|
-
error: <OctagonXIcon className="size-4" />,
|
|
27
|
-
loading: <Loader2Icon className="size-4 animate-spin" />,
|
|
28
|
-
}}
|
|
29
|
-
style={
|
|
30
|
-
{
|
|
31
|
-
"--normal-bg": "var(--card)",
|
|
32
|
-
"--normal-text": "var(--card-foreground)",
|
|
33
|
-
"--normal-border": "var(--border-subtle)",
|
|
34
|
-
"--success-bg": "var(--card)",
|
|
35
|
-
"--success-text": "var(--card-foreground)",
|
|
36
|
-
"--success-border": "var(--border-subtle)",
|
|
37
|
-
"--error-bg": "var(--card)",
|
|
38
|
-
"--error-text": "var(--destructive)",
|
|
39
|
-
"--error-border": "var(--border-subtle)",
|
|
40
|
-
"--info-bg": "var(--card)",
|
|
41
|
-
"--info-text": "var(--card-foreground)",
|
|
42
|
-
"--info-border": "var(--border-subtle)",
|
|
43
|
-
"--warning-bg": "var(--card)",
|
|
44
|
-
"--warning-text": "var(--card-foreground)",
|
|
45
|
-
"--warning-border": "var(--border-subtle)",
|
|
46
|
-
"--border-radius": "var(--radius-md-value)",
|
|
47
|
-
} as React.CSSProperties
|
|
48
|
-
}
|
|
49
|
-
{...props}
|
|
50
|
-
/>
|
|
51
|
-
)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export { Toaster }
|