@vendure/dashboard 3.3.6-master-202507030835 → 3.3.6-master-202507031258

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 (53) hide show
  1. package/package.json +26 -39
  2. package/src/app/routes/_authenticated/_collections/components/move-collections-dialog.tsx +7 -7
  3. package/src/app/routes/_authenticated/_customers/components/customer-address-card.tsx +3 -8
  4. package/src/lib/components/data-table/data-table-bulk-actions.tsx +9 -3
  5. package/src/lib/components/data-table/data-table.tsx +3 -2
  6. package/src/lib/components/shared/translatable-form-field.tsx +2 -1
  7. package/src/lib/components/ui/accordion.tsx +45 -50
  8. package/src/lib/components/ui/alert-dialog.tsx +93 -122
  9. package/src/lib/components/ui/alert.tsx +48 -54
  10. package/src/lib/components/ui/badge.tsx +29 -37
  11. package/src/lib/components/ui/breadcrumb.tsx +82 -89
  12. package/src/lib/components/ui/button.tsx +51 -52
  13. package/src/lib/components/ui/calendar.tsx +435 -196
  14. package/src/lib/components/ui/card.tsx +33 -78
  15. package/src/lib/components/ui/checkbox.tsx +23 -28
  16. package/src/lib/components/ui/collapsible.tsx +2 -0
  17. package/src/lib/components/ui/command.tsx +114 -159
  18. package/src/lib/components/ui/dialog.tsx +90 -115
  19. package/src/lib/components/ui/dropdown-menu.tsx +170 -207
  20. package/src/lib/components/ui/form.tsx +114 -138
  21. package/src/lib/components/ui/hover-card.tsx +26 -32
  22. package/src/lib/components/ui/input.tsx +15 -17
  23. package/src/lib/components/ui/label.tsx +16 -19
  24. package/src/lib/components/ui/pagination.tsx +87 -108
  25. package/src/lib/components/ui/popover.tsx +28 -36
  26. package/src/lib/components/ui/scroll-area.tsx +40 -48
  27. package/src/lib/components/ui/separator.tsx +20 -22
  28. package/src/lib/components/ui/sheet.tsx +91 -110
  29. package/src/lib/components/ui/sidebar.tsx +622 -652
  30. package/src/lib/components/ui/skeleton.tsx +10 -10
  31. package/src/lib/components/ui/sonner.tsx +11 -7
  32. package/src/lib/components/ui/switch.tsx +22 -27
  33. package/src/lib/components/ui/table.tsx +64 -96
  34. package/src/lib/components/ui/tabs.tsx +38 -56
  35. package/src/lib/components/ui/textarea.tsx +14 -14
  36. package/src/lib/components/ui/tooltip.tsx +37 -45
  37. package/src/lib/framework/page/detail-page.tsx +26 -20
  38. package/src/lib/graphql/graphql-env.d.ts +1 -1
  39. package/src/lib/components/ui/aspect-ratio.tsx +0 -9
  40. package/src/lib/components/ui/avatar.tsx +0 -53
  41. package/src/lib/components/ui/carousel.tsx +0 -241
  42. package/src/lib/components/ui/chart.tsx +0 -351
  43. package/src/lib/components/ui/context-menu.tsx +0 -252
  44. package/src/lib/components/ui/drawer.tsx +0 -133
  45. package/src/lib/components/ui/input-otp.tsx +0 -77
  46. package/src/lib/components/ui/menubar.tsx +0 -274
  47. package/src/lib/components/ui/navigation-menu.tsx +0 -168
  48. package/src/lib/components/ui/progress.tsx +0 -29
  49. package/src/lib/components/ui/radio-group.tsx +0 -45
  50. package/src/lib/components/ui/resizable.tsx +0 -54
  51. package/src/lib/components/ui/slider.tsx +0 -63
  52. package/src/lib/components/ui/toggle-group.tsx +0 -73
  53. package/src/lib/components/ui/toggle.tsx +0 -45
@@ -1,165 +1,141 @@
1
- import * as React from "react"
2
- import * as LabelPrimitive from "@radix-ui/react-label"
3
- import { Slot } from "@radix-ui/react-slot"
1
+ import * as LabelPrimitive from '@radix-ui/react-label';
2
+ import { Slot } from '@radix-ui/react-slot';
3
+ import * as React from 'react';
4
4
  import {
5
- Controller,
6
- FormProvider,
7
- useFormContext,
8
- useFormState,
9
- type ControllerProps,
10
- type FieldPath,
11
- type FieldValues,
12
- } from "react-hook-form"
5
+ Controller,
6
+ FormProvider,
7
+ useFormContext,
8
+ useFormState,
9
+ type ControllerProps,
10
+ type FieldPath,
11
+ type FieldValues,
12
+ } from 'react-hook-form';
13
13
 
14
- import { cn } from "@/vdb/lib/utils"
15
- import { Label } from "@/vdb/components/ui/label"
14
+ import { Label } from '@/vdb/components/ui/label.js';
15
+ import { cn } from '@/vdb/lib/utils.js';
16
16
 
17
- const Form = FormProvider
17
+ const Form = FormProvider;
18
18
 
19
19
  type FormFieldContextValue<
20
- TFieldValues extends FieldValues = FieldValues,
21
- TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
20
+ TFieldValues extends FieldValues = FieldValues,
21
+ TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
22
22
  > = {
23
- name: TName
24
- }
23
+ name: TName;
24
+ };
25
25
 
26
- const FormFieldContext = React.createContext<FormFieldContextValue>(
27
- {} as FormFieldContextValue
28
- )
26
+ const FormFieldContext = React.createContext<FormFieldContextValue>({} as FormFieldContextValue);
29
27
 
30
28
  const FormField = <
31
- TFieldValues extends FieldValues = FieldValues,
32
- TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
29
+ TFieldValues extends FieldValues = FieldValues,
30
+ TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
33
31
  >({
34
- ...props
32
+ ...props
35
33
  }: ControllerProps<TFieldValues, TName>) => {
36
- return (
37
- <FormFieldContext.Provider value={{ name: props.name }}>
38
- <Controller {...props} />
39
- </FormFieldContext.Provider>
40
- )
41
- }
34
+ return (
35
+ <FormFieldContext.Provider value={{ name: props.name }}>
36
+ <Controller {...props} />
37
+ </FormFieldContext.Provider>
38
+ );
39
+ };
42
40
 
43
41
  const useFormField = () => {
44
- const fieldContext = React.useContext(FormFieldContext)
45
- const itemContext = React.useContext(FormItemContext)
46
- const { getFieldState } = useFormContext()
47
- const formState = useFormState({ name: fieldContext.name })
48
- const fieldState = getFieldState(fieldContext.name, formState)
49
-
50
- if (!fieldContext) {
51
- throw new Error("useFormField should be used within <FormField>")
52
- }
53
-
54
- const { id } = itemContext
55
-
56
- return {
57
- id,
58
- name: fieldContext.name,
59
- formItemId: `${id}-form-item`,
60
- formDescriptionId: `${id}-form-item-description`,
61
- formMessageId: `${id}-form-item-message`,
62
- ...fieldState,
63
- }
64
- }
42
+ const fieldContext = React.useContext(FormFieldContext);
43
+ const itemContext = React.useContext(FormItemContext);
44
+ const { getFieldState } = useFormContext();
45
+ const formState = useFormState({ name: fieldContext.name });
46
+ const fieldState = getFieldState(fieldContext.name, formState);
47
+
48
+ if (!fieldContext) {
49
+ throw new Error('useFormField should be used within <FormField>');
50
+ }
51
+
52
+ const { id } = itemContext;
53
+
54
+ return {
55
+ id,
56
+ name: fieldContext.name,
57
+ formItemId: `${id}-form-item`,
58
+ formDescriptionId: `${id}-form-item-description`,
59
+ formMessageId: `${id}-form-item-message`,
60
+ ...fieldState,
61
+ };
62
+ };
65
63
 
66
64
  type FormItemContextValue = {
67
- id: string
68
- }
65
+ id: string;
66
+ };
69
67
 
70
- const FormItemContext = React.createContext<FormItemContextValue>(
71
- {} as FormItemContextValue
72
- )
73
-
74
- function FormItem({ className, ...props }: React.ComponentProps<"div">) {
75
- const id = React.useId()
76
-
77
- return (
78
- <FormItemContext.Provider value={{ id }}>
79
- <div
80
- data-slot="form-item"
81
- className={cn("grid gap-2", className)}
82
- {...props}
83
- />
84
- </FormItemContext.Provider>
85
- )
68
+ const FormItemContext = React.createContext<FormItemContextValue>({} as FormItemContextValue);
69
+
70
+ function FormItem({ className, ...props }: React.ComponentProps<'div'>) {
71
+ const id = React.useId();
72
+
73
+ return (
74
+ <FormItemContext.Provider value={{ id }}>
75
+ <div data-slot="form-item" className={cn('grid gap-2', className)} {...props} />
76
+ </FormItemContext.Provider>
77
+ );
86
78
  }
87
79
 
88
- function FormLabel({
89
- className,
90
- ...props
91
- }: React.ComponentProps<typeof LabelPrimitive.Root>) {
92
- const { error, formItemId } = useFormField()
93
-
94
- return (
95
- <Label
96
- data-slot="form-label"
97
- data-error={!!error}
98
- className={cn("data-[error=true]:text-destructive", className)}
99
- htmlFor={formItemId}
100
- {...props}
101
- />
102
- )
80
+ function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {
81
+ const { error, formItemId } = useFormField();
82
+
83
+ return (
84
+ <Label
85
+ data-slot="form-label"
86
+ data-error={!!error}
87
+ className={cn('data-[error=true]:text-destructive', className)}
88
+ htmlFor={formItemId}
89
+ {...props}
90
+ />
91
+ );
103
92
  }
104
93
 
105
94
  function FormControl({ ...props }: React.ComponentProps<typeof Slot>) {
106
- const { error, formItemId, formDescriptionId, formMessageId } = useFormField()
107
-
108
- return (
109
- <Slot
110
- data-slot="form-control"
111
- id={formItemId}
112
- aria-describedby={
113
- !error
114
- ? `${formDescriptionId}`
115
- : `${formDescriptionId} ${formMessageId}`
116
- }
117
- aria-invalid={!!error}
118
- {...props}
119
- />
120
- )
95
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
96
+
97
+ return (
98
+ <Slot
99
+ data-slot="form-control"
100
+ id={formItemId}
101
+ aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}
102
+ aria-invalid={!!error}
103
+ {...props}
104
+ />
105
+ );
121
106
  }
122
107
 
123
- function FormDescription({ className, ...props }: React.ComponentProps<"p">) {
124
- const { formDescriptionId } = useFormField()
125
-
126
- return (
127
- <p
128
- data-slot="form-description"
129
- id={formDescriptionId}
130
- className={cn("text-muted-foreground text-sm", className)}
131
- {...props}
132
- />
133
- )
108
+ function FormDescription({ className, ...props }: React.ComponentProps<'p'>) {
109
+ const { formDescriptionId } = useFormField();
110
+
111
+ return (
112
+ <p
113
+ data-slot="form-description"
114
+ id={formDescriptionId}
115
+ className={cn('text-muted-foreground text-sm', className)}
116
+ {...props}
117
+ />
118
+ );
134
119
  }
135
120
 
136
- function FormMessage({ className, ...props }: React.ComponentProps<"p">) {
137
- const { error, formMessageId } = useFormField()
138
- const body = error ? String(error?.message ?? "") : props.children
139
-
140
- if (!body) {
141
- return null
142
- }
143
-
144
- return (
145
- <p
146
- data-slot="form-message"
147
- id={formMessageId}
148
- className={cn("text-destructive text-sm", className)}
149
- {...props}
150
- >
151
- {body}
152
- </p>
153
- )
121
+ function FormMessage({ className, ...props }: React.ComponentProps<'p'>) {
122
+ const { error, formMessageId } = useFormField();
123
+ const body = error ? String(error?.message ?? '') : props.children;
124
+
125
+ if (!body) {
126
+ return null;
127
+ }
128
+
129
+ return (
130
+ <p
131
+ data-slot="form-message"
132
+ id={formMessageId}
133
+ className={cn('text-destructive text-sm', className)}
134
+ {...props}
135
+ >
136
+ {body}
137
+ </p>
138
+ );
154
139
  }
155
140
 
156
- export {
157
- useFormField,
158
- Form,
159
- FormItem,
160
- FormLabel,
161
- FormControl,
162
- FormDescription,
163
- FormMessage,
164
- FormField,
165
- }
141
+ export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
@@ -1,42 +1,36 @@
1
- import * as React from "react"
2
- import * as HoverCardPrimitive from "@radix-ui/react-hover-card"
1
+ import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
2
+ import * as React from 'react';
3
3
 
4
- import { cn } from "@/vdb/lib/utils"
4
+ import { cn } from '@/vdb/lib/utils.js';
5
5
 
6
- function HoverCard({
7
- ...props
8
- }: React.ComponentProps<typeof HoverCardPrimitive.Root>) {
9
- return <HoverCardPrimitive.Root data-slot="hover-card" {...props} />
6
+ function HoverCard({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Root>) {
7
+ return <HoverCardPrimitive.Root data-slot="hover-card" {...props} />;
10
8
  }
11
9
 
12
- function HoverCardTrigger({
13
- ...props
14
- }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) {
15
- return (
16
- <HoverCardPrimitive.Trigger data-slot="hover-card-trigger" {...props} />
17
- )
10
+ function HoverCardTrigger({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) {
11
+ return <HoverCardPrimitive.Trigger data-slot="hover-card-trigger" {...props} />;
18
12
  }
19
13
 
20
14
  function HoverCardContent({
21
- className,
22
- align = "center",
23
- sideOffset = 4,
24
- ...props
15
+ className,
16
+ align = 'center',
17
+ sideOffset = 4,
18
+ ...props
25
19
  }: React.ComponentProps<typeof HoverCardPrimitive.Content>) {
26
- return (
27
- <HoverCardPrimitive.Portal data-slot="hover-card-portal">
28
- <HoverCardPrimitive.Content
29
- data-slot="hover-card-content"
30
- align={align}
31
- sideOffset={sideOffset}
32
- className={cn(
33
- "bg-popover 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 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
34
- className
35
- )}
36
- {...props}
37
- />
38
- </HoverCardPrimitive.Portal>
39
- )
20
+ return (
21
+ <HoverCardPrimitive.Portal data-slot="hover-card-portal">
22
+ <HoverCardPrimitive.Content
23
+ data-slot="hover-card-content"
24
+ align={align}
25
+ sideOffset={sideOffset}
26
+ className={cn(
27
+ 'bg-popover 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 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',
28
+ className,
29
+ )}
30
+ {...props}
31
+ />
32
+ </HoverCardPrimitive.Portal>
33
+ );
40
34
  }
41
35
 
42
- export { HoverCard, HoverCardTrigger, HoverCardContent }
36
+ export { HoverCard, HoverCardContent, HoverCardTrigger };
@@ -1,21 +1,19 @@
1
- import * as React from "react"
1
+ import * as React from 'react';
2
2
 
3
- import { cn } from "@/vdb/lib/utils"
3
+ import { cn } from '@/vdb/lib/utils.js';
4
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 selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] 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-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
13
- "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
14
- className
15
- )}
16
- {...props}
17
- />
18
- )
5
+ function Input({ className, type, ...props }: React.ComponentProps<'input'>) {
6
+ return (
7
+ <input
8
+ type={type}
9
+ data-slot="input"
10
+ className={cn(
11
+ 'border-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground aria-invalid:outline-destructive/60 aria-invalid:ring-destructive/20 dark:aria-invalid:outline-destructive dark:aria-invalid:ring-destructive/50 ring-ring/10 dark:ring-ring/20 dark:outline-ring/40 outline-ring/50 aria-invalid:outline-destructive/60 dark:aria-invalid:outline-destructive dark:aria-invalid:ring-destructive/40 aria-invalid:ring-destructive/20 aria-invalid:border-destructive/60 dark:aria-invalid:border-destructive flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-4 focus-visible:outline-1 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:focus-visible:ring-[3px] aria-invalid:focus-visible:outline-none md:text-sm dark:aria-invalid:focus-visible:ring-4',
12
+ className,
13
+ )}
14
+ {...props}
15
+ />
16
+ );
19
17
  }
20
18
 
21
- export { Input }
19
+ export { Input };
@@ -1,24 +1,21 @@
1
- "use client"
1
+ 'use client';
2
2
 
3
- import * as React from "react"
4
- import * as LabelPrimitive from "@radix-ui/react-label"
3
+ import * as LabelPrimitive from '@radix-ui/react-label';
4
+ import * as React from 'react';
5
5
 
6
- import { cn } from "@/vdb/lib/utils"
6
+ import { cn } from '@/vdb/lib/utils.js';
7
7
 
8
- function Label({
9
- className,
10
- ...props
11
- }: React.ComponentProps<typeof LabelPrimitive.Root>) {
12
- return (
13
- <LabelPrimitive.Root
14
- data-slot="label"
15
- className={cn(
16
- "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
17
- className
18
- )}
19
- {...props}
20
- />
21
- )
8
+ function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {
9
+ return (
10
+ <LabelPrimitive.Root
11
+ data-slot="label"
12
+ className={cn(
13
+ 'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
14
+ className,
15
+ )}
16
+ {...props}
17
+ />
18
+ );
22
19
  }
23
20
 
24
- export { Label }
21
+ export { Label };
@@ -1,127 +1,106 @@
1
- import * as React from "react"
2
- import {
3
- ChevronLeftIcon,
4
- ChevronRightIcon,
5
- MoreHorizontalIcon,
6
- } from "lucide-react"
1
+ import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';
2
+ import * as React from 'react';
7
3
 
8
- import { cn } from "@/vdb/lib/utils"
9
- import { Button, buttonVariants } from "@/vdb/components/ui/button"
4
+ import { Button, buttonVariants } from '@/vdb/components/ui/button.js';
5
+ import { cn } from '@/vdb/lib/utils.js';
10
6
 
11
- function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
12
- return (
13
- <nav
14
- role="navigation"
15
- aria-label="pagination"
16
- data-slot="pagination"
17
- className={cn("mx-auto flex w-full justify-center", className)}
18
- {...props}
19
- />
20
- )
7
+ function Pagination({ className, ...props }: React.ComponentProps<'nav'>) {
8
+ return (
9
+ <nav
10
+ role="navigation"
11
+ aria-label="pagination"
12
+ data-slot="pagination"
13
+ className={cn('mx-auto flex w-full justify-center', className)}
14
+ {...props}
15
+ />
16
+ );
21
17
  }
22
18
 
23
- function PaginationContent({
24
- className,
25
- ...props
26
- }: React.ComponentProps<"ul">) {
27
- return (
28
- <ul
29
- data-slot="pagination-content"
30
- className={cn("flex flex-row items-center gap-1", className)}
31
- {...props}
32
- />
33
- )
19
+ function PaginationContent({ className, ...props }: React.ComponentProps<'ul'>) {
20
+ return (
21
+ <ul
22
+ data-slot="pagination-content"
23
+ className={cn('flex flex-row items-center gap-1', className)}
24
+ {...props}
25
+ />
26
+ );
34
27
  }
35
28
 
36
- function PaginationItem({ ...props }: React.ComponentProps<"li">) {
37
- return <li data-slot="pagination-item" {...props} />
29
+ function PaginationItem({ ...props }: React.ComponentProps<'li'>) {
30
+ return <li data-slot="pagination-item" {...props} />;
38
31
  }
39
32
 
40
33
  type PaginationLinkProps = {
41
- isActive?: boolean
42
- } & Pick<React.ComponentProps<typeof Button>, "size"> &
43
- React.ComponentProps<"a">
34
+ isActive?: boolean;
35
+ } & Pick<React.ComponentProps<typeof Button>, 'size'> &
36
+ React.ComponentProps<'a'>;
44
37
 
45
- function PaginationLink({
46
- className,
47
- isActive,
48
- size = "icon",
49
- ...props
50
- }: PaginationLinkProps) {
51
- return (
52
- <a
53
- aria-current={isActive ? "page" : undefined}
54
- data-slot="pagination-link"
55
- data-active={isActive}
56
- className={cn(
57
- buttonVariants({
58
- variant: isActive ? "outline" : "ghost",
59
- size,
60
- }),
61
- className
62
- )}
63
- {...props}
64
- />
65
- )
38
+ function PaginationLink({ className, isActive, size = 'icon', ...props }: PaginationLinkProps) {
39
+ return (
40
+ <a
41
+ aria-current={isActive ? 'page' : undefined}
42
+ data-slot="pagination-link"
43
+ data-active={isActive}
44
+ className={cn(
45
+ buttonVariants({
46
+ variant: isActive ? 'outline' : 'ghost',
47
+ size,
48
+ }),
49
+ className,
50
+ )}
51
+ {...props}
52
+ />
53
+ );
66
54
  }
67
55
 
68
- function PaginationPrevious({
69
- className,
70
- ...props
71
- }: React.ComponentProps<typeof PaginationLink>) {
72
- return (
73
- <PaginationLink
74
- aria-label="Go to previous page"
75
- size="default"
76
- className={cn("gap-1 px-2.5 sm:pl-2.5", className)}
77
- {...props}
78
- >
79
- <ChevronLeftIcon />
80
- <span className="hidden sm:block">Previous</span>
81
- </PaginationLink>
82
- )
56
+ function PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {
57
+ return (
58
+ <PaginationLink
59
+ aria-label="Go to previous page"
60
+ size="default"
61
+ className={cn('gap-1 px-2.5 sm:pl-2.5', className)}
62
+ {...props}
63
+ >
64
+ <ChevronLeftIcon />
65
+ <span className="hidden sm:block">Previous</span>
66
+ </PaginationLink>
67
+ );
83
68
  }
84
69
 
85
- function PaginationNext({
86
- className,
87
- ...props
88
- }: React.ComponentProps<typeof PaginationLink>) {
89
- return (
90
- <PaginationLink
91
- aria-label="Go to next page"
92
- size="default"
93
- className={cn("gap-1 px-2.5 sm:pr-2.5", className)}
94
- {...props}
95
- >
96
- <span className="hidden sm:block">Next</span>
97
- <ChevronRightIcon />
98
- </PaginationLink>
99
- )
70
+ function PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {
71
+ return (
72
+ <PaginationLink
73
+ aria-label="Go to next page"
74
+ size="default"
75
+ className={cn('gap-1 px-2.5 sm:pr-2.5', className)}
76
+ {...props}
77
+ >
78
+ <span className="hidden sm:block">Next</span>
79
+ <ChevronRightIcon />
80
+ </PaginationLink>
81
+ );
100
82
  }
101
83
 
102
- function PaginationEllipsis({
103
- className,
104
- ...props
105
- }: React.ComponentProps<"span">) {
106
- return (
107
- <span
108
- aria-hidden
109
- data-slot="pagination-ellipsis"
110
- className={cn("flex size-9 items-center justify-center", className)}
111
- {...props}
112
- >
113
- <MoreHorizontalIcon className="size-4" />
114
- <span className="sr-only">More pages</span>
115
- </span>
116
- )
84
+ function PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>) {
85
+ return (
86
+ <span
87
+ aria-hidden
88
+ data-slot="pagination-ellipsis"
89
+ className={cn('flex size-9 items-center justify-center', className)}
90
+ {...props}
91
+ >
92
+ <MoreHorizontalIcon className="size-4" />
93
+ <span className="sr-only">More pages</span>
94
+ </span>
95
+ );
117
96
  }
118
97
 
119
98
  export {
120
- Pagination,
121
- PaginationContent,
122
- PaginationLink,
123
- PaginationItem,
124
- PaginationPrevious,
125
- PaginationNext,
126
- PaginationEllipsis,
127
- }
99
+ Pagination,
100
+ PaginationContent,
101
+ PaginationEllipsis,
102
+ PaginationItem,
103
+ PaginationLink,
104
+ PaginationNext,
105
+ PaginationPrevious,
106
+ };