@auto-engineer/frontend-generator-react-graphql 0.11.3 → 0.11.5

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 (98) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/mui-starter/auto-configure.ts +114 -0
  3. package/dist/mui-starter/codegen.ts +16 -0
  4. package/dist/mui-starter/design-system-principles.md +32 -0
  5. package/dist/mui-starter/eslint.config.ts +57 -0
  6. package/dist/mui-starter/index.html +26 -0
  7. package/dist/mui-starter/package.json +70 -0
  8. package/dist/mui-starter/postcss.config.ts +5 -0
  9. package/dist/mui-starter/public/favicon.ico +0 -0
  10. package/dist/mui-starter/src/App.css +42 -0
  11. package/dist/mui-starter/src/App.tsx +21 -0
  12. package/dist/mui-starter/src/apolloClient.ts +8 -0
  13. package/dist/mui-starter/src/hooks/use-mobile.tsx +19 -0
  14. package/dist/mui-starter/src/hooks/use-toast.ts +186 -0
  15. package/dist/mui-starter/src/index.css +0 -0
  16. package/dist/mui-starter/src/main.tsx +5 -0
  17. package/dist/mui-starter/src/pages/Index.tsx +10 -0
  18. package/dist/mui-starter/src/pages/NotFound.tsx +20 -0
  19. package/dist/mui-starter/src/theme.ts +86 -0
  20. package/dist/mui-starter/src/theme.ts.ejs +3 -0
  21. package/dist/mui-starter/tsconfig.json +40 -0
  22. package/dist/mui-starter/vite.config.ts +21 -0
  23. package/dist/shadcn-starter/auto-configure.ts +107 -0
  24. package/dist/shadcn-starter/codegen.ts +16 -0
  25. package/dist/shadcn-starter/components.json +20 -0
  26. package/dist/shadcn-starter/design-system-principles.md +23 -0
  27. package/dist/shadcn-starter/eslint.config.ts +57 -0
  28. package/dist/shadcn-starter/index.html +26 -0
  29. package/dist/shadcn-starter/package.json +101 -0
  30. package/dist/shadcn-starter/pnpm-lock.yaml +8234 -0
  31. package/dist/shadcn-starter/postcss.config.ts +6 -0
  32. package/dist/shadcn-starter/public/favicon.ico +0 -0
  33. package/dist/shadcn-starter/src/App.css +6 -0
  34. package/dist/shadcn-starter/src/App.tsx +28 -0
  35. package/dist/shadcn-starter/src/apolloClient.ts +8 -0
  36. package/dist/shadcn-starter/src/components/atoms/accordion.tsx +52 -0
  37. package/dist/shadcn-starter/src/components/atoms/alert-dialog.tsx +104 -0
  38. package/dist/shadcn-starter/src/components/atoms/alert.tsx +43 -0
  39. package/dist/shadcn-starter/src/components/atoms/aspect-ratio.tsx +5 -0
  40. package/dist/shadcn-starter/src/components/atoms/avatar.tsx +40 -0
  41. package/dist/shadcn-starter/src/components/atoms/badge.tsx +29 -0
  42. package/dist/shadcn-starter/src/components/atoms/breadcrumb.tsx +90 -0
  43. package/dist/shadcn-starter/src/components/atoms/button.tsx +47 -0
  44. package/dist/shadcn-starter/src/components/atoms/calendar.tsx +158 -0
  45. package/dist/shadcn-starter/src/components/atoms/card.tsx +43 -0
  46. package/dist/shadcn-starter/src/components/atoms/carousel.tsx +224 -0
  47. package/dist/shadcn-starter/src/components/atoms/chart.tsx +307 -0
  48. package/dist/shadcn-starter/src/components/atoms/checkbox.tsx +26 -0
  49. package/dist/shadcn-starter/src/components/atoms/collapsible.tsx +11 -0
  50. package/dist/shadcn-starter/src/components/atoms/command.tsx +132 -0
  51. package/dist/shadcn-starter/src/components/atoms/context-menu.tsx +178 -0
  52. package/dist/shadcn-starter/src/components/atoms/dialog.tsx +97 -0
  53. package/dist/shadcn-starter/src/components/atoms/drawer.tsx +87 -0
  54. package/dist/shadcn-starter/src/components/atoms/dropdown-menu.tsx +181 -0
  55. package/dist/shadcn-starter/src/components/atoms/form.tsx +136 -0
  56. package/dist/shadcn-starter/src/components/atoms/hover-card.tsx +27 -0
  57. package/dist/shadcn-starter/src/components/atoms/input-otp.tsx +61 -0
  58. package/dist/shadcn-starter/src/components/atoms/input.tsx +22 -0
  59. package/dist/shadcn-starter/src/components/atoms/label.tsx +19 -0
  60. package/dist/shadcn-starter/src/components/atoms/menubar.tsx +217 -0
  61. package/dist/shadcn-starter/src/components/atoms/navigation-menu.tsx +120 -0
  62. package/dist/shadcn-starter/src/components/atoms/pagination.tsx +81 -0
  63. package/dist/shadcn-starter/src/components/atoms/popover.tsx +29 -0
  64. package/dist/shadcn-starter/src/components/atoms/progress.tsx +25 -0
  65. package/dist/shadcn-starter/src/components/atoms/radio-group.tsx +36 -0
  66. package/dist/shadcn-starter/src/components/atoms/resizable.tsx +39 -0
  67. package/dist/shadcn-starter/src/components/atoms/scroll-area.tsx +38 -0
  68. package/dist/shadcn-starter/src/components/atoms/select.tsx +145 -0
  69. package/dist/shadcn-starter/src/components/atoms/separator.tsx +20 -0
  70. package/dist/shadcn-starter/src/components/atoms/sheet.tsx +109 -0
  71. package/dist/shadcn-starter/src/components/atoms/sidebar.tsx +641 -0
  72. package/dist/shadcn-starter/src/components/atoms/skeleton.tsx +7 -0
  73. package/dist/shadcn-starter/src/components/atoms/slider.tsx +23 -0
  74. package/dist/shadcn-starter/src/components/atoms/sonner.tsx +29 -0
  75. package/dist/shadcn-starter/src/components/atoms/switch.tsx +27 -0
  76. package/dist/shadcn-starter/src/components/atoms/table.tsx +72 -0
  77. package/dist/shadcn-starter/src/components/atoms/tabs.tsx +53 -0
  78. package/dist/shadcn-starter/src/components/atoms/textarea.tsx +21 -0
  79. package/dist/shadcn-starter/src/components/atoms/toggle-group.tsx +51 -0
  80. package/dist/shadcn-starter/src/components/atoms/toggle.tsx +37 -0
  81. package/dist/shadcn-starter/src/components/atoms/tooltip.tsx +30 -0
  82. package/dist/shadcn-starter/src/hooks/use-mobile.tsx +19 -0
  83. package/dist/shadcn-starter/src/hooks/use-toast.ts +186 -0
  84. package/dist/shadcn-starter/src/index.css +103 -0
  85. package/dist/shadcn-starter/src/index.css.ejs +27 -0
  86. package/dist/shadcn-starter/src/lib/utils.ts +6 -0
  87. package/dist/shadcn-starter/src/main.tsx +5 -0
  88. package/dist/shadcn-starter/src/mockApolloClient.ts +93 -0
  89. package/dist/shadcn-starter/src/pages/NotFound.tsx +22 -0
  90. package/dist/shadcn-starter/tailwind.config.ts +92 -0
  91. package/dist/shadcn-starter/tsconfig.json +48 -0
  92. package/dist/shadcn-starter/vite.config.ts +21 -0
  93. package/dist/src/commands/generate-client.d.ts +2 -1
  94. package/dist/src/commands/generate-client.d.ts.map +1 -1
  95. package/dist/src/commands/generate-client.js +14 -4
  96. package/dist/src/commands/generate-client.js.map +1 -1
  97. package/dist/tsconfig.tsbuildinfo +1 -1
  98. package/package.json +5 -5
@@ -0,0 +1,27 @@
1
+ import * as React from 'react';
2
+ import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
3
+
4
+ import { cn } from '@/lib/utils';
5
+
6
+ const HoverCard = HoverCardPrimitive.Root;
7
+
8
+ const HoverCardTrigger = HoverCardPrimitive.Trigger;
9
+
10
+ const HoverCardContent = React.forwardRef<
11
+ React.ElementRef<typeof HoverCardPrimitive.Content>,
12
+ React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>
13
+ >(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (
14
+ <HoverCardPrimitive.Content
15
+ ref={ref}
16
+ align={align}
17
+ sideOffset={sideOffset}
18
+ className={cn(
19
+ 'z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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 origin-[--radix-hover-card-content-transform-origin]',
20
+ className,
21
+ )}
22
+ {...props}
23
+ />
24
+ ));
25
+ HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
26
+
27
+ export { HoverCard, HoverCardTrigger, HoverCardContent };
@@ -0,0 +1,61 @@
1
+ import * as React from 'react';
2
+ import { OTPInput, OTPInputContext } from 'input-otp';
3
+ import { Dot } from 'lucide-react';
4
+
5
+ import { cn } from '@/lib/utils';
6
+
7
+ const InputOTP = React.forwardRef<React.ElementRef<typeof OTPInput>, React.ComponentPropsWithoutRef<typeof OTPInput>>(
8
+ ({ className, containerClassName, ...props }, ref) => (
9
+ <OTPInput
10
+ ref={ref}
11
+ containerClassName={cn('flex items-center gap-2 has-[:disabled]:opacity-50', containerClassName)}
12
+ className={cn('disabled:cursor-not-allowed', className)}
13
+ {...props}
14
+ />
15
+ ),
16
+ );
17
+ InputOTP.displayName = 'InputOTP';
18
+
19
+ const InputOTPGroup = React.forwardRef<React.ElementRef<'div'>, React.ComponentPropsWithoutRef<'div'>>(
20
+ ({ className, ...props }, ref) => <div ref={ref} className={cn('flex items-center', className)} {...props} />,
21
+ );
22
+ InputOTPGroup.displayName = 'InputOTPGroup';
23
+
24
+ const InputOTPSlot = React.forwardRef<
25
+ React.ElementRef<'div'>,
26
+ React.ComponentPropsWithoutRef<'div'> & { index: number }
27
+ >(({ index, className, ...props }, ref) => {
28
+ const inputOTPContext = React.useContext(OTPInputContext);
29
+ const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
30
+
31
+ return (
32
+ <div
33
+ ref={ref}
34
+ className={cn(
35
+ 'relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md',
36
+ isActive && 'z-10 ring-2 ring-ring ring-offset-background',
37
+ className,
38
+ )}
39
+ {...props}
40
+ >
41
+ {char}
42
+ {hasFakeCaret && (
43
+ <div className="pointer-events-none absolute inset-0 flex items-center justify-center">
44
+ <div className="h-4 w-px animate-caret-blink bg-foreground duration-1000" />
45
+ </div>
46
+ )}
47
+ </div>
48
+ );
49
+ });
50
+ InputOTPSlot.displayName = 'InputOTPSlot';
51
+
52
+ const InputOTPSeparator = React.forwardRef<React.ElementRef<'div'>, React.ComponentPropsWithoutRef<'div'>>(
53
+ ({ ...props }, ref) => (
54
+ <div ref={ref} role="separator" {...props}>
55
+ <Dot />
56
+ </div>
57
+ ),
58
+ );
59
+ InputOTPSeparator.displayName = 'InputOTPSeparator';
60
+
61
+ export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+
3
+ import { cn } from '@/lib/utils';
4
+
5
+ const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<'input'>>(
6
+ ({ className, type, ...props }, ref) => {
7
+ return (
8
+ <input
9
+ type={type}
10
+ className={cn(
11
+ 'flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
12
+ className,
13
+ )}
14
+ ref={ref}
15
+ {...props}
16
+ />
17
+ );
18
+ },
19
+ );
20
+ Input.displayName = 'Input';
21
+
22
+ export { Input };
@@ -0,0 +1,19 @@
1
+ 'use client';
2
+
3
+ import * as React from 'react';
4
+ import * as LabelPrimitive from '@radix-ui/react-label';
5
+ import { cva, type VariantProps } from 'class-variance-authority';
6
+
7
+ import { cn } from '@/lib/utils';
8
+
9
+ const labelVariants = cva('text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70');
10
+
11
+ const Label = React.forwardRef<
12
+ React.ElementRef<typeof LabelPrimitive.Root>,
13
+ React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>
14
+ >(({ className, ...props }, ref) => (
15
+ <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />
16
+ ));
17
+ Label.displayName = LabelPrimitive.Root.displayName;
18
+
19
+ export { Label };
@@ -0,0 +1,217 @@
1
+ import * as React from 'react';
2
+ import * as MenubarPrimitive from '@radix-ui/react-menubar';
3
+ import { Check, ChevronRight, Circle } from 'lucide-react';
4
+
5
+ import { cn } from '@/lib/utils';
6
+
7
+ function MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>) {
8
+ return <MenubarPrimitive.Menu {...props} />;
9
+ }
10
+
11
+ function MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>) {
12
+ return <MenubarPrimitive.Group {...props} />;
13
+ }
14
+
15
+ function MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>) {
16
+ return <MenubarPrimitive.Portal {...props} />;
17
+ }
18
+
19
+ function MenubarRadioGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {
20
+ return <MenubarPrimitive.RadioGroup {...props} />;
21
+ }
22
+
23
+ function MenubarSub({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Sub>) {
24
+ return <MenubarPrimitive.Sub data-slot="menubar-sub" {...props} />;
25
+ }
26
+
27
+ const Menubar = React.forwardRef<
28
+ React.ElementRef<typeof MenubarPrimitive.Root>,
29
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>
30
+ >(({ className, ...props }, ref) => (
31
+ <MenubarPrimitive.Root
32
+ ref={ref}
33
+ className={cn('flex h-10 items-center space-x-1 rounded-md border bg-background p-1', className)}
34
+ {...props}
35
+ />
36
+ ));
37
+ Menubar.displayName = MenubarPrimitive.Root.displayName;
38
+
39
+ const MenubarTrigger = React.forwardRef<
40
+ React.ElementRef<typeof MenubarPrimitive.Trigger>,
41
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>
42
+ >(({ className, ...props }, ref) => (
43
+ <MenubarPrimitive.Trigger
44
+ ref={ref}
45
+ className={cn(
46
+ 'flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',
47
+ className,
48
+ )}
49
+ {...props}
50
+ />
51
+ ));
52
+ MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
53
+
54
+ const MenubarSubTrigger = React.forwardRef<
55
+ React.ElementRef<typeof MenubarPrimitive.SubTrigger>,
56
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {
57
+ inset?: boolean;
58
+ }
59
+ >(({ className, inset, children, ...props }, ref) => (
60
+ <MenubarPrimitive.SubTrigger
61
+ ref={ref}
62
+ className={cn(
63
+ 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',
64
+ inset && 'pl-8',
65
+ className,
66
+ )}
67
+ {...props}
68
+ >
69
+ {children}
70
+ <ChevronRight className="ml-auto h-4 w-4" />
71
+ </MenubarPrimitive.SubTrigger>
72
+ ));
73
+ MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
74
+
75
+ const MenubarSubContent = React.forwardRef<
76
+ React.ElementRef<typeof MenubarPrimitive.SubContent>,
77
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>
78
+ >(({ className, ...props }, ref) => (
79
+ <MenubarPrimitive.SubContent
80
+ ref={ref}
81
+ className={cn(
82
+ 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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 origin-[--radix-menubar-content-transform-origin]',
83
+ className,
84
+ )}
85
+ {...props}
86
+ />
87
+ ));
88
+ MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
89
+
90
+ const MenubarContent = React.forwardRef<
91
+ React.ElementRef<typeof MenubarPrimitive.Content>,
92
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>
93
+ >(({ className, align = 'start', alignOffset = -4, sideOffset = 8, ...props }, ref) => (
94
+ <MenubarPrimitive.Portal>
95
+ <MenubarPrimitive.Content
96
+ ref={ref}
97
+ align={align}
98
+ alignOffset={alignOffset}
99
+ sideOffset={sideOffset}
100
+ className={cn(
101
+ 'z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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 origin-[--radix-menubar-content-transform-origin]',
102
+ className,
103
+ )}
104
+ {...props}
105
+ />
106
+ </MenubarPrimitive.Portal>
107
+ ));
108
+ MenubarContent.displayName = MenubarPrimitive.Content.displayName;
109
+
110
+ const MenubarItem = React.forwardRef<
111
+ React.ElementRef<typeof MenubarPrimitive.Item>,
112
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {
113
+ inset?: boolean;
114
+ }
115
+ >(({ className, inset, ...props }, ref) => (
116
+ <MenubarPrimitive.Item
117
+ ref={ref}
118
+ className={cn(
119
+ 'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
120
+ inset && 'pl-8',
121
+ className,
122
+ )}
123
+ {...props}
124
+ />
125
+ ));
126
+ MenubarItem.displayName = MenubarPrimitive.Item.displayName;
127
+
128
+ const MenubarCheckboxItem = React.forwardRef<
129
+ React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,
130
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>
131
+ >(({ className, children, checked, ...props }, ref) => (
132
+ <MenubarPrimitive.CheckboxItem
133
+ ref={ref}
134
+ className={cn(
135
+ 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
136
+ className,
137
+ )}
138
+ checked={checked}
139
+ {...props}
140
+ >
141
+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
142
+ <MenubarPrimitive.ItemIndicator>
143
+ <Check className="h-4 w-4" />
144
+ </MenubarPrimitive.ItemIndicator>
145
+ </span>
146
+ {children}
147
+ </MenubarPrimitive.CheckboxItem>
148
+ ));
149
+ MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
150
+
151
+ const MenubarRadioItem = React.forwardRef<
152
+ React.ElementRef<typeof MenubarPrimitive.RadioItem>,
153
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>
154
+ >(({ className, children, ...props }, ref) => (
155
+ <MenubarPrimitive.RadioItem
156
+ ref={ref}
157
+ className={cn(
158
+ 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
159
+ className,
160
+ )}
161
+ {...props}
162
+ >
163
+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
164
+ <MenubarPrimitive.ItemIndicator>
165
+ <Circle className="h-2 w-2 fill-current" />
166
+ </MenubarPrimitive.ItemIndicator>
167
+ </span>
168
+ {children}
169
+ </MenubarPrimitive.RadioItem>
170
+ ));
171
+ MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
172
+
173
+ const MenubarLabel = React.forwardRef<
174
+ React.ElementRef<typeof MenubarPrimitive.Label>,
175
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {
176
+ inset?: boolean;
177
+ }
178
+ >(({ className, inset, ...props }, ref) => (
179
+ <MenubarPrimitive.Label
180
+ ref={ref}
181
+ className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}
182
+ {...props}
183
+ />
184
+ ));
185
+ MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
186
+
187
+ const MenubarSeparator = React.forwardRef<
188
+ React.ElementRef<typeof MenubarPrimitive.Separator>,
189
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>
190
+ >(({ className, ...props }, ref) => (
191
+ <MenubarPrimitive.Separator ref={ref} className={cn('-mx-1 my-1 h-px bg-muted', className)} {...props} />
192
+ ));
193
+ MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
194
+
195
+ const MenubarShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {
196
+ return <span className={cn('ml-auto text-xs tracking-widest text-muted-foreground', className)} {...props} />;
197
+ };
198
+ MenubarShortcut.displayname = 'MenubarShortcut';
199
+
200
+ export {
201
+ Menubar,
202
+ MenubarMenu,
203
+ MenubarTrigger,
204
+ MenubarContent,
205
+ MenubarItem,
206
+ MenubarSeparator,
207
+ MenubarLabel,
208
+ MenubarCheckboxItem,
209
+ MenubarRadioGroup,
210
+ MenubarRadioItem,
211
+ MenubarPortal,
212
+ MenubarSubContent,
213
+ MenubarSubTrigger,
214
+ MenubarGroup,
215
+ MenubarSub,
216
+ MenubarShortcut,
217
+ };
@@ -0,0 +1,120 @@
1
+ import * as React from 'react';
2
+ import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
3
+ import { cva } from 'class-variance-authority';
4
+ import { ChevronDown } from 'lucide-react';
5
+
6
+ import { cn } from '@/lib/utils';
7
+
8
+ const NavigationMenu = React.forwardRef<
9
+ React.ElementRef<typeof NavigationMenuPrimitive.Root>,
10
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>
11
+ >(({ className, children, ...props }, ref) => (
12
+ <NavigationMenuPrimitive.Root
13
+ ref={ref}
14
+ className={cn('relative z-10 flex max-w-max flex-1 items-center justify-center', className)}
15
+ {...props}
16
+ >
17
+ {children}
18
+ <NavigationMenuViewport />
19
+ </NavigationMenuPrimitive.Root>
20
+ ));
21
+ NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
22
+
23
+ const NavigationMenuList = React.forwardRef<
24
+ React.ElementRef<typeof NavigationMenuPrimitive.List>,
25
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>
26
+ >(({ className, ...props }, ref) => (
27
+ <NavigationMenuPrimitive.List
28
+ ref={ref}
29
+ className={cn('group flex flex-1 list-none items-center justify-center space-x-1', className)}
30
+ {...props}
31
+ />
32
+ ));
33
+ NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
34
+
35
+ const NavigationMenuItem = NavigationMenuPrimitive.Item;
36
+
37
+ const navigationMenuTriggerStyle = cva(
38
+ 'group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent',
39
+ );
40
+
41
+ const NavigationMenuTrigger = React.forwardRef<
42
+ React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,
43
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>
44
+ >(({ className, children, ...props }, ref) => (
45
+ <NavigationMenuPrimitive.Trigger
46
+ ref={ref}
47
+ className={cn(navigationMenuTriggerStyle(), 'group', className)}
48
+ {...props}
49
+ >
50
+ {children}{' '}
51
+ <ChevronDown
52
+ className="relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180"
53
+ aria-hidden="true"
54
+ />
55
+ </NavigationMenuPrimitive.Trigger>
56
+ ));
57
+ NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
58
+
59
+ const NavigationMenuContent = React.forwardRef<
60
+ React.ElementRef<typeof NavigationMenuPrimitive.Content>,
61
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>
62
+ >(({ className, ...props }, ref) => (
63
+ <NavigationMenuPrimitive.Content
64
+ ref={ref}
65
+ className={cn(
66
+ 'left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ',
67
+ className,
68
+ )}
69
+ {...props}
70
+ />
71
+ ));
72
+ NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
73
+
74
+ const NavigationMenuLink = NavigationMenuPrimitive.Link;
75
+
76
+ const NavigationMenuViewport = React.forwardRef<
77
+ React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,
78
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>
79
+ >(({ className, ...props }, ref) => (
80
+ <div className={cn('absolute left-0 top-full flex justify-center')}>
81
+ <NavigationMenuPrimitive.Viewport
82
+ className={cn(
83
+ 'origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]',
84
+ className,
85
+ )}
86
+ ref={ref}
87
+ {...props}
88
+ />
89
+ </div>
90
+ ));
91
+ NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
92
+
93
+ const NavigationMenuIndicator = React.forwardRef<
94
+ React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,
95
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>
96
+ >(({ className, ...props }, ref) => (
97
+ <NavigationMenuPrimitive.Indicator
98
+ ref={ref}
99
+ className={cn(
100
+ 'top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in',
101
+ className,
102
+ )}
103
+ {...props}
104
+ >
105
+ <div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" />
106
+ </NavigationMenuPrimitive.Indicator>
107
+ ));
108
+ NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
109
+
110
+ export {
111
+ navigationMenuTriggerStyle,
112
+ NavigationMenu,
113
+ NavigationMenuList,
114
+ NavigationMenuItem,
115
+ NavigationMenuContent,
116
+ NavigationMenuTrigger,
117
+ NavigationMenuLink,
118
+ NavigationMenuIndicator,
119
+ NavigationMenuViewport,
120
+ };
@@ -0,0 +1,81 @@
1
+ import * as React from 'react';
2
+ import { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-react';
3
+
4
+ import { cn } from '@/lib/utils';
5
+ import { ButtonProps, buttonVariants } from '@/components/atoms/button';
6
+
7
+ const Pagination = ({ className, ...props }: React.ComponentProps<'nav'>) => (
8
+ <nav
9
+ role="navigation"
10
+ aria-label="pagination"
11
+ className={cn('mx-auto flex w-full justify-center', className)}
12
+ {...props}
13
+ />
14
+ );
15
+ Pagination.displayName = 'Pagination';
16
+
17
+ const PaginationContent = React.forwardRef<HTMLUListElement, React.ComponentProps<'ul'>>(
18
+ ({ className, ...props }, ref) => (
19
+ <ul ref={ref} className={cn('flex flex-row items-center gap-1', className)} {...props} />
20
+ ),
21
+ );
22
+ PaginationContent.displayName = 'PaginationContent';
23
+
24
+ const PaginationItem = React.forwardRef<HTMLLIElement, React.ComponentProps<'li'>>(({ className, ...props }, ref) => (
25
+ <li ref={ref} className={cn('', className)} {...props} />
26
+ ));
27
+ PaginationItem.displayName = 'PaginationItem';
28
+
29
+ type PaginationLinkProps = {
30
+ isActive?: boolean;
31
+ } & Pick<ButtonProps, 'size'> &
32
+ React.ComponentProps<'a'>;
33
+
34
+ const PaginationLink = ({ className, isActive, size = 'icon', ...props }: PaginationLinkProps) => (
35
+ <a
36
+ aria-current={isActive ? 'page' : undefined}
37
+ className={cn(
38
+ buttonVariants({
39
+ variant: isActive ? 'outline' : 'ghost',
40
+ size,
41
+ }),
42
+ className,
43
+ )}
44
+ {...props}
45
+ />
46
+ );
47
+ PaginationLink.displayName = 'PaginationLink';
48
+
49
+ const PaginationPrevious = ({ className, ...props }: React.ComponentProps<typeof PaginationLink>) => (
50
+ <PaginationLink aria-label="Go to previous page" size="default" className={cn('gap-1 pl-2.5', className)} {...props}>
51
+ <ChevronLeft className="h-4 w-4" />
52
+ <span>Previous</span>
53
+ </PaginationLink>
54
+ );
55
+ PaginationPrevious.displayName = 'PaginationPrevious';
56
+
57
+ const PaginationNext = ({ className, ...props }: React.ComponentProps<typeof PaginationLink>) => (
58
+ <PaginationLink aria-label="Go to next page" size="default" className={cn('gap-1 pr-2.5', className)} {...props}>
59
+ <span>Next</span>
60
+ <ChevronRight className="h-4 w-4" />
61
+ </PaginationLink>
62
+ );
63
+ PaginationNext.displayName = 'PaginationNext';
64
+
65
+ const PaginationEllipsis = ({ className, ...props }: React.ComponentProps<'span'>) => (
66
+ <span aria-hidden className={cn('flex h-9 w-9 items-center justify-center', className)} {...props}>
67
+ <MoreHorizontal className="h-4 w-4" />
68
+ <span className="sr-only">More pages</span>
69
+ </span>
70
+ );
71
+ PaginationEllipsis.displayName = 'PaginationEllipsis';
72
+
73
+ export {
74
+ Pagination,
75
+ PaginationContent,
76
+ PaginationEllipsis,
77
+ PaginationItem,
78
+ PaginationLink,
79
+ PaginationNext,
80
+ PaginationPrevious,
81
+ };
@@ -0,0 +1,29 @@
1
+ import * as React from 'react';
2
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
3
+
4
+ import { cn } from '@/lib/utils';
5
+
6
+ const Popover = PopoverPrimitive.Root;
7
+
8
+ const PopoverTrigger = PopoverPrimitive.Trigger;
9
+
10
+ const PopoverContent = React.forwardRef<
11
+ React.ElementRef<typeof PopoverPrimitive.Content>,
12
+ React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
13
+ >(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (
14
+ <PopoverPrimitive.Portal>
15
+ <PopoverPrimitive.Content
16
+ ref={ref}
17
+ align={align}
18
+ sideOffset={sideOffset}
19
+ className={cn(
20
+ 'z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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 origin-[--radix-popover-content-transform-origin]',
21
+ className,
22
+ )}
23
+ {...props}
24
+ />
25
+ </PopoverPrimitive.Portal>
26
+ ));
27
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
28
+
29
+ export { Popover, PopoverTrigger, PopoverContent };
@@ -0,0 +1,25 @@
1
+ 'use client';
2
+
3
+ import * as React from 'react';
4
+ import * as ProgressPrimitive from '@radix-ui/react-progress';
5
+
6
+ import { cn } from '@/lib/utils';
7
+
8
+ const Progress = React.forwardRef<
9
+ React.ElementRef<typeof ProgressPrimitive.Root>,
10
+ React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>
11
+ >(({ className, value, ...props }, ref) => (
12
+ <ProgressPrimitive.Root
13
+ ref={ref}
14
+ className={cn('relative h-4 w-full overflow-hidden rounded-full bg-secondary', className)}
15
+ {...props}
16
+ >
17
+ <ProgressPrimitive.Indicator
18
+ className="h-full w-full flex-1 bg-primary transition-all"
19
+ style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
20
+ />
21
+ </ProgressPrimitive.Root>
22
+ ));
23
+ Progress.displayName = ProgressPrimitive.Root.displayName;
24
+
25
+ export { Progress };
@@ -0,0 +1,36 @@
1
+ import * as React from 'react';
2
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
3
+ import { Circle } from 'lucide-react';
4
+
5
+ import { cn } from '@/lib/utils';
6
+
7
+ const RadioGroup = React.forwardRef<
8
+ React.ElementRef<typeof RadioGroupPrimitive.Root>,
9
+ React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>
10
+ >(({ className, ...props }, ref) => {
11
+ return <RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref} />;
12
+ });
13
+ RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
14
+
15
+ const RadioGroupItem = React.forwardRef<
16
+ React.ElementRef<typeof RadioGroupPrimitive.Item>,
17
+ React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>
18
+ >(({ className, ...props }, ref) => {
19
+ return (
20
+ <RadioGroupPrimitive.Item
21
+ ref={ref}
22
+ className={cn(
23
+ 'aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
24
+ className,
25
+ )}
26
+ {...props}
27
+ >
28
+ <RadioGroupPrimitive.Indicator className="flex items-center justify-center">
29
+ <Circle className="h-2.5 w-2.5 fill-current text-current" />
30
+ </RadioGroupPrimitive.Indicator>
31
+ </RadioGroupPrimitive.Item>
32
+ );
33
+ });
34
+ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
35
+
36
+ export { RadioGroup, RadioGroupItem };