@enya-learning/nova 0.4.0 → 0.4.2

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.
Files changed (148) hide show
  1. package/dist/chunks/{button-npy7isi3nsvlhf86.js → button-kvgr8g13fe959ju0.js} +19 -19
  2. package/dist/chunks/{button-npy7isi3nsvlhf86.js.map → button-kvgr8g13fe959ju0.js.map} +1 -1
  3. package/dist/chunks/vendor-utils-egkaeebaqpft6cxj.js +473 -0
  4. package/dist/chunks/vendor-utils-egkaeebaqpft6cxj.js.map +1 -0
  5. package/dist/components/button.js +1 -1
  6. package/dist/components/enya-logo.js +1 -1
  7. package/dist/index.js +6782 -7036
  8. package/dist/index.js.map +1 -1
  9. package/package.json +26 -11
  10. package/changelog.md +0 -44
  11. package/components.json +0 -23
  12. package/dist/chunks/vendor-base-ui-efqwzv4oinwg1f0d.js +0 -16049
  13. package/dist/chunks/vendor-base-ui-efqwzv4oinwg1f0d.js.map +0 -1
  14. package/eslint.config.js +0 -30
  15. package/plopfile.mjs +0 -49
  16. package/src/components/.gitkeep +0 -0
  17. package/src/components/accordion/accordion.mdx +0 -83
  18. package/src/components/accordion/accordion.tsx +0 -81
  19. package/src/components/accordion/index.ts +0 -1
  20. package/src/components/alert/alert.tsx +0 -76
  21. package/src/components/alert/index.ts +0 -1
  22. package/src/components/alert-dialog/alert-dialog.tsx +0 -187
  23. package/src/components/alert-dialog/index.ts +0 -1
  24. package/src/components/aspect-ratio/aspect-ratio.tsx +0 -22
  25. package/src/components/aspect-ratio/index.ts +0 -1
  26. package/src/components/avatar/avatar.tsx +0 -107
  27. package/src/components/avatar/index.ts +0 -1
  28. package/src/components/badge/badge.tsx +0 -52
  29. package/src/components/badge/index.ts +0 -1
  30. package/src/components/breadcrumb/breadcrumb.tsx +0 -122
  31. package/src/components/breadcrumb/index.ts +0 -1
  32. package/src/components/button/button.mdx +0 -255
  33. package/src/components/button/button.tsx +0 -59
  34. package/src/components/button/index.ts +0 -1
  35. package/src/components/button-group/button-group.tsx +0 -87
  36. package/src/components/button-group/index.ts +0 -1
  37. package/src/components/calendar/calendar.tsx +0 -228
  38. package/src/components/calendar/index.ts +0 -1
  39. package/src/components/card/card.tsx +0 -100
  40. package/src/components/card/index.ts +0 -1
  41. package/src/components/carousel/carousel.tsx +0 -243
  42. package/src/components/carousel/index.ts +0 -1
  43. package/src/components/chart/chart.tsx +0 -371
  44. package/src/components/chart/index.ts +0 -1
  45. package/src/components/checkbox/checkbox.tsx +0 -28
  46. package/src/components/checkbox/index.ts +0 -1
  47. package/src/components/collapsible/collapsible.tsx +0 -19
  48. package/src/components/collapsible/index.ts +0 -1
  49. package/src/components/combobox/combobox.tsx +0 -298
  50. package/src/components/combobox/index.ts +0 -1
  51. package/src/components/command/command.tsx +0 -193
  52. package/src/components/command/index.ts +0 -1
  53. package/src/components/context-menu/context-menu.tsx +0 -272
  54. package/src/components/context-menu/index.ts +0 -1
  55. package/src/components/dialog/dialog.tsx +0 -157
  56. package/src/components/dialog/index.ts +0 -1
  57. package/src/components/direction/direction.tsx +0 -4
  58. package/src/components/direction/index.ts +0 -1
  59. package/src/components/drawer/drawer.tsx +0 -134
  60. package/src/components/drawer/index.ts +0 -1
  61. package/src/components/dropdown-menu/dropdown-menu.tsx +0 -270
  62. package/src/components/dropdown-menu/index.ts +0 -1
  63. package/src/components/empty/empty.tsx +0 -104
  64. package/src/components/empty/index.ts +0 -1
  65. package/src/components/enya-logo/enya-logo.mdx +0 -174
  66. package/src/components/enya-logo/enya-logo.tsx +0 -383
  67. package/src/components/enya-logo/index.ts +0 -1
  68. package/src/components/field/field.tsx +0 -236
  69. package/src/components/field/index.ts +0 -1
  70. package/src/components/hover-card/hover-card.tsx +0 -51
  71. package/src/components/hover-card/index.ts +0 -1
  72. package/src/components/input/index.ts +0 -1
  73. package/src/components/input/input.tsx +0 -20
  74. package/src/components/input-group/index.ts +0 -1
  75. package/src/components/input-group/input-group.tsx +0 -157
  76. package/src/components/input-otp/index.ts +0 -1
  77. package/src/components/input-otp/input-otp.tsx +0 -84
  78. package/src/components/item/index.ts +0 -1
  79. package/src/components/item/item.tsx +0 -201
  80. package/src/components/kbd/index.ts +0 -1
  81. package/src/components/kbd/kbd.tsx +0 -26
  82. package/src/components/label/index.ts +0 -1
  83. package/src/components/label/label.tsx +0 -20
  84. package/src/components/menubar/index.ts +0 -1
  85. package/src/components/menubar/menubar.tsx +0 -281
  86. package/src/components/native-select/index.ts +0 -1
  87. package/src/components/native-select/native-select.tsx +0 -65
  88. package/src/components/navigation-menu/index.ts +0 -1
  89. package/src/components/navigation-menu/navigation-menu.tsx +0 -171
  90. package/src/components/pagination/index.ts +0 -1
  91. package/src/components/pagination/pagination.tsx +0 -133
  92. package/src/components/popover/index.ts +0 -1
  93. package/src/components/popover/popover.tsx +0 -88
  94. package/src/components/progress/index.ts +0 -1
  95. package/src/components/progress/progress.tsx +0 -83
  96. package/src/components/radio-group/index.ts +0 -1
  97. package/src/components/radio-group/radio-group.tsx +0 -36
  98. package/src/components/resizable/index.ts +0 -1
  99. package/src/components/resizable/resizable.tsx +0 -50
  100. package/src/components/scroll-area/index.ts +0 -1
  101. package/src/components/scroll-area/scroll-area.tsx +0 -53
  102. package/src/components/select/index.ts +0 -1
  103. package/src/components/select/select.tsx +0 -205
  104. package/src/components/separator/index.ts +0 -1
  105. package/src/components/separator/separator.tsx +0 -23
  106. package/src/components/sheet/index.ts +0 -1
  107. package/src/components/sheet/sheet.tsx +0 -137
  108. package/src/components/sidebar/index.ts +0 -1
  109. package/src/components/sidebar/sidebar.tsx +0 -722
  110. package/src/components/skeleton/index.ts +0 -1
  111. package/src/components/skeleton/skeleton.tsx +0 -13
  112. package/src/components/slider/index.ts +0 -1
  113. package/src/components/slider/slider.tsx +0 -52
  114. package/src/components/sonner/index.ts +0 -1
  115. package/src/components/sonner/sonner.tsx +0 -45
  116. package/src/components/spinner/index.ts +0 -1
  117. package/src/components/spinner/spinner.tsx +0 -15
  118. package/src/components/switch/index.ts +0 -1
  119. package/src/components/switch/switch.tsx +0 -30
  120. package/src/components/table/index.ts +0 -1
  121. package/src/components/table/table.tsx +0 -116
  122. package/src/components/tabs/index.ts +0 -1
  123. package/src/components/tabs/tabs.tsx +0 -80
  124. package/src/components/textarea/index.ts +0 -1
  125. package/src/components/textarea/textarea.tsx +0 -18
  126. package/src/components/toggle/index.ts +0 -1
  127. package/src/components/toggle/toggle.tsx +0 -45
  128. package/src/components/toggle-group/index.ts +0 -1
  129. package/src/components/toggle-group/toggle-group.tsx +0 -87
  130. package/src/components/tooltip/index.ts +0 -1
  131. package/src/components/tooltip/tooltip.tsx +0 -64
  132. package/src/hooks/use-mobile.ts +0 -21
  133. package/src/index.ts +0 -58
  134. package/src/lib/.gitkeep +0 -0
  135. package/src/lib/utils.ts +0 -6
  136. package/src/styles/nova-binding.css +0 -290
  137. package/src/styles/nova.css +0 -58
  138. package/src/styles/theme-nova.css +0 -201
  139. package/src/styles/typography.css +0 -215
  140. package/src/utils/index.ts +0 -1
  141. package/templates/component/component.tsx.hbs +0 -16
  142. package/templates/component/index.ts.hbs +0 -1
  143. package/templates/component/stories.tsx.hbs +0 -13
  144. package/tsconfig.json +0 -18
  145. package/tsconfig.lint.json +0 -14
  146. package/vite.config.ts +0 -101
  147. /package/{Readme.md → README.md} +0 -0
  148. /package/{src → dist}/styles/globals.css +0 -0
@@ -1,272 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu"
5
-
6
- import { cn } from "../../lib/utils"
7
- import { ChevronRightIcon, CheckIcon } from "lucide-react"
8
-
9
- function ContextMenu({ ...props }: ContextMenuPrimitive.Root.Props) {
10
- return <ContextMenuPrimitive.Root data-slot="context-menu" {...props} />
11
- }
12
-
13
- function ContextMenuPortal({ ...props }: ContextMenuPrimitive.Portal.Props) {
14
- return (
15
- <ContextMenuPrimitive.Portal data-slot="context-menu-portal" {...props} />
16
- )
17
- }
18
-
19
- function ContextMenuTrigger({
20
- className,
21
- ...props
22
- }: ContextMenuPrimitive.Trigger.Props) {
23
- return (
24
- <ContextMenuPrimitive.Trigger
25
- data-slot="context-menu-trigger"
26
- className={cn("select-none", className)}
27
- {...props}
28
- />
29
- )
30
- }
31
-
32
- function ContextMenuContent({
33
- className,
34
- align = "start",
35
- alignOffset = 4,
36
- side = "inline-end",
37
- sideOffset = 0,
38
- ...props
39
- }: ContextMenuPrimitive.Popup.Props &
40
- Pick<
41
- ContextMenuPrimitive.Positioner.Props,
42
- "align" | "alignOffset" | "side" | "sideOffset"
43
- >) {
44
- return (
45
- <ContextMenuPrimitive.Portal>
46
- <ContextMenuPrimitive.Positioner
47
- className="isolate z-50 outline-none"
48
- align={align}
49
- alignOffset={alignOffset}
50
- side={side}
51
- sideOffset={sideOffset}
52
- >
53
- <ContextMenuPrimitive.Popup
54
- data-slot="context-menu-content"
55
- className={cn(
56
- "z-50 max-h-(--available-height) min-w-48 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-2xl bg-popover p-1 text-popover-foreground shadow-2xl ring-1 ring-foreground/5 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
57
- className
58
- )}
59
- {...props}
60
- />
61
- </ContextMenuPrimitive.Positioner>
62
- </ContextMenuPrimitive.Portal>
63
- )
64
- }
65
-
66
- function ContextMenuGroup({ ...props }: ContextMenuPrimitive.Group.Props) {
67
- return (
68
- <ContextMenuPrimitive.Group data-slot="context-menu-group" {...props} />
69
- )
70
- }
71
-
72
- function ContextMenuLabel({
73
- className,
74
- inset,
75
- ...props
76
- }: ContextMenuPrimitive.GroupLabel.Props & {
77
- inset?: boolean
78
- }) {
79
- return (
80
- <ContextMenuPrimitive.GroupLabel
81
- data-slot="context-menu-label"
82
- data-inset={inset}
83
- className={cn(
84
- "px-3 py-2.5 text-xs text-muted-foreground data-inset:ps-9.5",
85
- className
86
- )}
87
- {...props}
88
- />
89
- )
90
- }
91
-
92
- function ContextMenuItem({
93
- className,
94
- inset,
95
- variant = "default",
96
- ...props
97
- }: ContextMenuPrimitive.Item.Props & {
98
- inset?: boolean
99
- variant?: "default" | "destructive"
100
- }) {
101
- return (
102
- <ContextMenuPrimitive.Item
103
- data-slot="context-menu-item"
104
- data-inset={inset}
105
- data-variant={variant}
106
- className={cn(
107
- "group/context-menu-item relative flex cursor-default items-center gap-2.5 rounded-xl px-3 py-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:ps-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive",
108
- className
109
- )}
110
- {...props}
111
- />
112
- )
113
- }
114
-
115
- function ContextMenuSub({ ...props }: ContextMenuPrimitive.SubmenuRoot.Props) {
116
- return (
117
- <ContextMenuPrimitive.SubmenuRoot data-slot="context-menu-sub" {...props} />
118
- )
119
- }
120
-
121
- function ContextMenuSubTrigger({
122
- className,
123
- inset,
124
- children,
125
- ...props
126
- }: ContextMenuPrimitive.SubmenuTrigger.Props & {
127
- inset?: boolean
128
- }) {
129
- return (
130
- <ContextMenuPrimitive.SubmenuTrigger
131
- data-slot="context-menu-sub-trigger"
132
- data-inset={inset}
133
- className={cn(
134
- "flex cursor-default items-center rounded-xl px-3 py-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:ps-9.5 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
135
- className
136
- )}
137
- {...props}
138
- >
139
- {children}
140
- <ChevronRightIcon className="ms-auto rtl:rotate-180" />
141
- </ContextMenuPrimitive.SubmenuTrigger>
142
- )
143
- }
144
-
145
- function ContextMenuSubContent({
146
- ...props
147
- }: React.ComponentProps<typeof ContextMenuContent>) {
148
- return (
149
- <ContextMenuContent
150
- data-slot="context-menu-sub-content"
151
- className="shadow-lg"
152
- side="inline-end"
153
- {...props}
154
- />
155
- )
156
- }
157
-
158
- function ContextMenuCheckboxItem({
159
- className,
160
- children,
161
- checked,
162
- inset,
163
- ...props
164
- }: ContextMenuPrimitive.CheckboxItem.Props & {
165
- inset?: boolean
166
- }) {
167
- return (
168
- <ContextMenuPrimitive.CheckboxItem
169
- data-slot="context-menu-checkbox-item"
170
- data-inset={inset}
171
- className={cn(
172
- "relative flex cursor-default items-center gap-2 rounded-xl py-2 ps-3 pe-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:ps-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
173
- className
174
- )}
175
- checked={checked}
176
- {...props}
177
- >
178
- <span className="pointer-events-none absolute end-2">
179
- <ContextMenuPrimitive.CheckboxItemIndicator>
180
- <CheckIcon />
181
- </ContextMenuPrimitive.CheckboxItemIndicator>
182
- </span>
183
- {children}
184
- </ContextMenuPrimitive.CheckboxItem>
185
- )
186
- }
187
-
188
- function ContextMenuRadioGroup({
189
- ...props
190
- }: ContextMenuPrimitive.RadioGroup.Props) {
191
- return (
192
- <ContextMenuPrimitive.RadioGroup
193
- data-slot="context-menu-radio-group"
194
- {...props}
195
- />
196
- )
197
- }
198
-
199
- function ContextMenuRadioItem({
200
- className,
201
- children,
202
- inset,
203
- ...props
204
- }: ContextMenuPrimitive.RadioItem.Props & {
205
- inset?: boolean
206
- }) {
207
- return (
208
- <ContextMenuPrimitive.RadioItem
209
- data-slot="context-menu-radio-item"
210
- data-inset={inset}
211
- className={cn(
212
- "relative flex cursor-default items-center gap-2 rounded-xl py-2 ps-3 pe-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:ps-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
213
- className
214
- )}
215
- {...props}
216
- >
217
- <span className="pointer-events-none absolute end-2">
218
- <ContextMenuPrimitive.RadioItemIndicator>
219
- <CheckIcon />
220
- </ContextMenuPrimitive.RadioItemIndicator>
221
- </span>
222
- {children}
223
- </ContextMenuPrimitive.RadioItem>
224
- )
225
- }
226
-
227
- function ContextMenuSeparator({
228
- className,
229
- ...props
230
- }: ContextMenuPrimitive.Separator.Props) {
231
- return (
232
- <ContextMenuPrimitive.Separator
233
- data-slot="context-menu-separator"
234
- className={cn("-mx-1 my-1 h-px bg-border/50", className)}
235
- {...props}
236
- />
237
- )
238
- }
239
-
240
- function ContextMenuShortcut({
241
- className,
242
- ...props
243
- }: React.ComponentProps<"span">) {
244
- return (
245
- <span
246
- data-slot="context-menu-shortcut"
247
- className={cn(
248
- "ms-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground",
249
- className
250
- )}
251
- {...props}
252
- />
253
- )
254
- }
255
-
256
- export {
257
- ContextMenu,
258
- ContextMenuTrigger,
259
- ContextMenuContent,
260
- ContextMenuItem,
261
- ContextMenuCheckboxItem,
262
- ContextMenuRadioItem,
263
- ContextMenuLabel,
264
- ContextMenuSeparator,
265
- ContextMenuShortcut,
266
- ContextMenuGroup,
267
- ContextMenuPortal,
268
- ContextMenuSub,
269
- ContextMenuSubContent,
270
- ContextMenuSubTrigger,
271
- ContextMenuRadioGroup,
272
- }
@@ -1 +0,0 @@
1
- export * from "./context-menu"
@@ -1,157 +0,0 @@
1
- import * as React from "react"
2
- import { Dialog as DialogPrimitive } from "@base-ui/react/dialog"
3
-
4
- import { cn } from "../../lib/utils"
5
- import { Button } from "../button"
6
- import { XIcon } from "lucide-react"
7
-
8
- function Dialog({ ...props }: DialogPrimitive.Root.Props) {
9
- return <DialogPrimitive.Root data-slot="dialog" {...props} />
10
- }
11
-
12
- function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props) {
13
- return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />
14
- }
15
-
16
- function DialogPortal({ ...props }: DialogPrimitive.Portal.Props) {
17
- return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />
18
- }
19
-
20
- function DialogClose({ ...props }: DialogPrimitive.Close.Props) {
21
- return <DialogPrimitive.Close data-slot="dialog-close" {...props} />
22
- }
23
-
24
- function DialogOverlay({
25
- className,
26
- ...props
27
- }: DialogPrimitive.Backdrop.Props) {
28
- return (
29
- <DialogPrimitive.Backdrop
30
- data-slot="dialog-overlay"
31
- className={cn(
32
- "fixed inset-0 isolate z-50 bg-nova-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
33
- className
34
- )}
35
- {...props}
36
- />
37
- )
38
- }
39
-
40
- function DialogContent({
41
- className,
42
- children,
43
- showCloseButton = true,
44
- ...props
45
- }: DialogPrimitive.Popup.Props & {
46
- showCloseButton?: boolean
47
- }) {
48
- return (
49
- <DialogPortal>
50
- <DialogOverlay />
51
- <DialogPrimitive.Popup
52
- data-slot="dialog-content"
53
- className={cn(
54
- "fixed start-1/2 top-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-4xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/5 duration-100 outline-none sm:max-w-md rtl:translate-x-1/2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
55
- className
56
- )}
57
- {...props}
58
- >
59
- {children}
60
- {showCloseButton && (
61
- <DialogPrimitive.Close
62
- data-slot="dialog-close"
63
- render={
64
- <Button
65
- variant="ghost"
66
- className="absolute end-4 top-4"
67
- size="icon-sm"
68
- />
69
- }
70
- >
71
- <XIcon />
72
- <span className="sr-only">Close</span>
73
- </DialogPrimitive.Close>
74
- )}
75
- </DialogPrimitive.Popup>
76
- </DialogPortal>
77
- )
78
- }
79
-
80
- function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
81
- return (
82
- <div
83
- data-slot="dialog-header"
84
- className={cn("flex flex-col gap-2", className)}
85
- {...props}
86
- />
87
- )
88
- }
89
-
90
- function DialogFooter({
91
- className,
92
- showCloseButton = false,
93
- children,
94
- ...props
95
- }: React.ComponentProps<"div"> & {
96
- showCloseButton?: boolean
97
- }) {
98
- return (
99
- <div
100
- data-slot="dialog-footer"
101
- className={cn(
102
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
103
- className
104
- )}
105
- {...props}
106
- >
107
- {children}
108
- {showCloseButton && (
109
- <DialogPrimitive.Close render={<Button variant="outline" />}>
110
- Close
111
- </DialogPrimitive.Close>
112
- )}
113
- </div>
114
- )
115
- }
116
-
117
- function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {
118
- return (
119
- <DialogPrimitive.Title
120
- data-slot="dialog-title"
121
- className={cn(
122
- "font-heading text-base leading-none font-medium",
123
- className
124
- )}
125
- {...props}
126
- />
127
- )
128
- }
129
-
130
- function DialogDescription({
131
- className,
132
- ...props
133
- }: DialogPrimitive.Description.Props) {
134
- return (
135
- <DialogPrimitive.Description
136
- data-slot="dialog-description"
137
- className={cn(
138
- "text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
139
- className
140
- )}
141
- {...props}
142
- />
143
- )
144
- }
145
-
146
- export {
147
- Dialog,
148
- DialogClose,
149
- DialogContent,
150
- DialogDescription,
151
- DialogFooter,
152
- DialogHeader,
153
- DialogOverlay,
154
- DialogPortal,
155
- DialogTitle,
156
- DialogTrigger,
157
- }
@@ -1 +0,0 @@
1
- export * from "./dialog"
@@ -1,4 +0,0 @@
1
- export {
2
- DirectionProvider,
3
- useDirection,
4
- } from "@base-ui/react/direction-provider"
@@ -1 +0,0 @@
1
- export * from "./direction"
@@ -1,134 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import { Drawer as DrawerPrimitive } from "vaul"
5
-
6
- import { cn } from "../../lib/utils"
7
-
8
- function Drawer({
9
- ...props
10
- }: React.ComponentProps<typeof DrawerPrimitive.Root>) {
11
- return <DrawerPrimitive.Root data-slot="drawer" {...props} />
12
- }
13
-
14
- function DrawerTrigger({
15
- ...props
16
- }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {
17
- return <DrawerPrimitive.Trigger data-slot="drawer-trigger" {...props} />
18
- }
19
-
20
- function DrawerPortal({
21
- ...props
22
- }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {
23
- return <DrawerPrimitive.Portal data-slot="drawer-portal" {...props} />
24
- }
25
-
26
- function DrawerClose({
27
- ...props
28
- }: React.ComponentProps<typeof DrawerPrimitive.Close>) {
29
- return <DrawerPrimitive.Close data-slot="drawer-close" {...props} />
30
- }
31
-
32
- function DrawerOverlay({
33
- className,
34
- ...props
35
- }: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {
36
- return (
37
- <DrawerPrimitive.Overlay
38
- data-slot="drawer-overlay"
39
- className={cn(
40
- "fixed inset-0 z-50 bg-nova-black/80 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
41
- className
42
- )}
43
- {...props}
44
- />
45
- )
46
- }
47
-
48
- function DrawerContent({
49
- className,
50
- children,
51
- ...props
52
- }: React.ComponentProps<typeof DrawerPrimitive.Content>) {
53
- return (
54
- <DrawerPortal data-slot="drawer-portal">
55
- <DrawerOverlay />
56
- <DrawerPrimitive.Content
57
- data-slot="drawer-content"
58
- className={cn(
59
- "group/drawer-content fixed z-50 flex h-auto flex-col bg-transparent p-4 text-sm text-popover-foreground before:absolute before:inset-2 before:-z-10 before:rounded-4xl before:border before:border-border before:bg-popover data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:start-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:end-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm",
60
- className
61
- )}
62
- {...props}
63
- >
64
- <div className="mx-auto mt-4 hidden h-1.5 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" />
65
- {children}
66
- </DrawerPrimitive.Content>
67
- </DrawerPortal>
68
- )
69
- }
70
-
71
- function DrawerHeader({ className, ...props }: React.ComponentProps<"div">) {
72
- return (
73
- <div
74
- data-slot="drawer-header"
75
- className={cn(
76
- "flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-start",
77
- className
78
- )}
79
- {...props}
80
- />
81
- )
82
- }
83
-
84
- function DrawerFooter({ className, ...props }: React.ComponentProps<"div">) {
85
- return (
86
- <div
87
- data-slot="drawer-footer"
88
- className={cn("mt-auto flex flex-col gap-2 p-4", className)}
89
- {...props}
90
- />
91
- )
92
- }
93
-
94
- function DrawerTitle({
95
- className,
96
- ...props
97
- }: React.ComponentProps<typeof DrawerPrimitive.Title>) {
98
- return (
99
- <DrawerPrimitive.Title
100
- data-slot="drawer-title"
101
- className={cn(
102
- "font-heading text-base font-medium text-foreground",
103
- className
104
- )}
105
- {...props}
106
- />
107
- )
108
- }
109
-
110
- function DrawerDescription({
111
- className,
112
- ...props
113
- }: React.ComponentProps<typeof DrawerPrimitive.Description>) {
114
- return (
115
- <DrawerPrimitive.Description
116
- data-slot="drawer-description"
117
- className={cn("text-sm text-muted-foreground", className)}
118
- {...props}
119
- />
120
- )
121
- }
122
-
123
- export {
124
- Drawer,
125
- DrawerPortal,
126
- DrawerOverlay,
127
- DrawerTrigger,
128
- DrawerClose,
129
- DrawerContent,
130
- DrawerHeader,
131
- DrawerFooter,
132
- DrawerTitle,
133
- DrawerDescription,
134
- }
@@ -1 +0,0 @@
1
- export * from "./drawer"