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

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 (67) hide show
  1. package/dist/plugin/vite-plugin-vendure-dashboard.js +1 -1
  2. package/package.json +40 -27
  3. package/src/app/routes/_authenticated/_collections/collections.graphql.ts +32 -0
  4. package/src/app/routes/_authenticated/_collections/collections.tsx +153 -133
  5. package/src/app/routes/_authenticated/_collections/collections_.$id.tsx +1 -1
  6. package/src/app/routes/_authenticated/_collections/components/collection-bulk-actions.tsx +34 -1
  7. package/src/app/routes/_authenticated/_collections/components/move-collections-dialog.tsx +430 -0
  8. package/src/app/routes/_authenticated/_collections/components/move-single-collection.tsx +33 -0
  9. package/src/app/routes/_authenticated/_customers/components/customer-address-card.tsx +8 -3
  10. package/src/app/routes/_authenticated/_payment-methods/payment-methods_.$id.tsx +1 -1
  11. package/src/app/routes/_authenticated/_products/products_.$id.tsx +1 -1
  12. package/src/app/routes/_authenticated/_promotions/promotions_.$id.tsx +1 -1
  13. package/src/lib/components/data-input/money-input.tsx +2 -9
  14. package/src/lib/components/data-table/data-table.tsx +1 -1
  15. package/src/lib/components/shared/form-field-wrapper.tsx +22 -13
  16. package/src/lib/components/shared/paginated-list-data-table.tsx +1 -1
  17. package/src/lib/components/ui/accordion.tsx +50 -45
  18. package/src/lib/components/ui/alert-dialog.tsx +122 -93
  19. package/src/lib/components/ui/alert.tsx +54 -48
  20. package/src/lib/components/ui/aspect-ratio.tsx +9 -0
  21. package/src/lib/components/ui/avatar.tsx +53 -0
  22. package/src/lib/components/ui/badge.tsx +37 -29
  23. package/src/lib/components/ui/breadcrumb.tsx +89 -82
  24. package/src/lib/components/ui/button.tsx +52 -51
  25. package/src/lib/components/ui/calendar.tsx +196 -435
  26. package/src/lib/components/ui/card.tsx +78 -33
  27. package/src/lib/components/ui/carousel.tsx +241 -0
  28. package/src/lib/components/ui/chart.tsx +351 -0
  29. package/src/lib/components/ui/checkbox.tsx +28 -23
  30. package/src/lib/components/ui/collapsible.tsx +0 -2
  31. package/src/lib/components/ui/command.tsx +159 -114
  32. package/src/lib/components/ui/context-menu.tsx +252 -0
  33. package/src/lib/components/ui/dialog.tsx +115 -90
  34. package/src/lib/components/ui/drawer.tsx +133 -0
  35. package/src/lib/components/ui/dropdown-menu.tsx +207 -170
  36. package/src/lib/components/ui/form.tsx +138 -114
  37. package/src/lib/components/ui/hover-card.tsx +32 -26
  38. package/src/lib/components/ui/input-otp.tsx +77 -0
  39. package/src/lib/components/ui/input.tsx +17 -15
  40. package/src/lib/components/ui/label.tsx +19 -16
  41. package/src/lib/components/ui/menubar.tsx +274 -0
  42. package/src/lib/components/ui/navigation-menu.tsx +168 -0
  43. package/src/lib/components/ui/pagination.tsx +108 -87
  44. package/src/lib/components/ui/popover.tsx +36 -28
  45. package/src/lib/components/ui/progress.tsx +29 -0
  46. package/src/lib/components/ui/radio-group.tsx +45 -0
  47. package/src/lib/components/ui/resizable.tsx +54 -0
  48. package/src/lib/components/ui/scroll-area.tsx +48 -40
  49. package/src/lib/components/ui/select.tsx +151 -129
  50. package/src/lib/components/ui/separator.tsx +22 -20
  51. package/src/lib/components/ui/sheet.tsx +110 -91
  52. package/src/lib/components/ui/sidebar.tsx +652 -622
  53. package/src/lib/components/ui/skeleton.tsx +10 -10
  54. package/src/lib/components/ui/slider.tsx +63 -0
  55. package/src/lib/components/ui/sonner.tsx +7 -11
  56. package/src/lib/components/ui/switch.tsx +27 -22
  57. package/src/lib/components/ui/table.tsx +96 -64
  58. package/src/lib/components/ui/tabs.tsx +56 -38
  59. package/src/lib/components/ui/textarea.tsx +14 -14
  60. package/src/lib/components/ui/toggle-group.tsx +73 -0
  61. package/src/lib/components/ui/toggle.tsx +45 -0
  62. package/src/lib/components/ui/tooltip.tsx +45 -37
  63. package/src/lib/framework/component-registry/component-registry.tsx +5 -3
  64. package/src/lib/framework/page/detail-page.tsx +28 -17
  65. package/src/lib/framework/page/list-page.tsx +1 -1
  66. package/src/lib/index.ts +5 -6
  67. package/vite/vite-plugin-vendure-dashboard.ts +1 -1
@@ -1,141 +1,165 @@
1
- import * as LabelPrimitive from '@radix-ui/react-label';
2
- import { Slot } from '@radix-ui/react-slot';
3
- import * as React from 'react';
1
+ import * as React from "react"
2
+ import * as LabelPrimitive from "@radix-ui/react-label"
3
+ import { Slot } from "@radix-ui/react-slot"
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 { Label } from '@/vdb/components/ui/label.js';
15
- import { cn } from '@/vdb/lib/utils.js';
14
+ import { cn } from "@/vdb/lib/utils"
15
+ import { Label } from "@/vdb/components/ui/label"
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>({} as FormFieldContextValue);
26
+ const FormFieldContext = React.createContext<FormFieldContextValue>(
27
+ {} as FormFieldContextValue
28
+ )
27
29
 
28
30
  const FormField = <
29
- TFieldValues extends FieldValues = FieldValues,
30
- TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
31
+ TFieldValues extends FieldValues = FieldValues,
32
+ TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
31
33
  >({
32
- ...props
34
+ ...props
33
35
  }: ControllerProps<TFieldValues, TName>) => {
34
- return (
35
- <FormFieldContext.Provider value={{ name: props.name }}>
36
- <Controller {...props} />
37
- </FormFieldContext.Provider>
38
- );
39
- };
36
+ return (
37
+ <FormFieldContext.Provider value={{ name: props.name }}>
38
+ <Controller {...props} />
39
+ </FormFieldContext.Provider>
40
+ )
41
+ }
40
42
 
41
43
  const useFormField = () => {
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
- };
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
+ }
63
65
 
64
66
  type FormItemContextValue = {
65
- id: string;
66
- };
67
-
68
- const FormItemContext = React.createContext<FormItemContextValue>({} as FormItemContextValue);
69
-
70
- function FormItem({ className, ...props }: React.ComponentProps<'div'>) {
71
- const id = React.useId();
67
+ id: string
68
+ }
72
69
 
73
- return (
74
- <FormItemContext.Provider value={{ id }}>
75
- <div data-slot="form-item" className={cn('grid gap-2', className)} {...props} />
76
- </FormItemContext.Provider>
77
- );
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
+ )
78
86
  }
79
87
 
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
- );
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
+ )
92
103
  }
93
104
 
94
105
  function FormControl({ ...props }: React.ComponentProps<typeof Slot>) {
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
- );
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
+ )
106
121
  }
107
122
 
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
- );
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
+ )
119
134
  }
120
135
 
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
- );
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
+ )
139
154
  }
140
155
 
141
- export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
156
+ export {
157
+ useFormField,
158
+ Form,
159
+ FormItem,
160
+ FormLabel,
161
+ FormControl,
162
+ FormDescription,
163
+ FormMessage,
164
+ FormField,
165
+ }
@@ -1,36 +1,42 @@
1
- import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
2
- import * as React from 'react';
1
+ import * as React from "react"
2
+ import * as HoverCardPrimitive from "@radix-ui/react-hover-card"
3
3
 
4
- import { cn } from '@/vdb/lib/utils.js';
4
+ import { cn } from "@/vdb/lib/utils"
5
5
 
6
- function HoverCard({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Root>) {
7
- return <HoverCardPrimitive.Root data-slot="hover-card" {...props} />;
6
+ function HoverCard({
7
+ ...props
8
+ }: React.ComponentProps<typeof HoverCardPrimitive.Root>) {
9
+ return <HoverCardPrimitive.Root data-slot="hover-card" {...props} />
8
10
  }
9
11
 
10
- function HoverCardTrigger({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) {
11
- return <HoverCardPrimitive.Trigger data-slot="hover-card-trigger" {...props} />;
12
+ function HoverCardTrigger({
13
+ ...props
14
+ }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) {
15
+ return (
16
+ <HoverCardPrimitive.Trigger data-slot="hover-card-trigger" {...props} />
17
+ )
12
18
  }
13
19
 
14
20
  function HoverCardContent({
15
- className,
16
- align = 'center',
17
- sideOffset = 4,
18
- ...props
21
+ className,
22
+ align = "center",
23
+ sideOffset = 4,
24
+ ...props
19
25
  }: React.ComponentProps<typeof HoverCardPrimitive.Content>) {
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
- );
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
+ )
34
40
  }
35
41
 
36
- export { HoverCard, HoverCardContent, HoverCardTrigger };
42
+ export { HoverCard, HoverCardTrigger, HoverCardContent }
@@ -0,0 +1,77 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { OTPInput, OTPInputContext } from "input-otp"
5
+ import { MinusIcon } from "lucide-react"
6
+
7
+ import { cn } from "@/vdb/lib/utils"
8
+
9
+ function InputOTP({
10
+ className,
11
+ containerClassName,
12
+ ...props
13
+ }: React.ComponentProps<typeof OTPInput> & {
14
+ containerClassName?: string
15
+ }) {
16
+ return (
17
+ <OTPInput
18
+ data-slot="input-otp"
19
+ containerClassName={cn(
20
+ "flex items-center gap-2 has-disabled:opacity-50",
21
+ containerClassName
22
+ )}
23
+ className={cn("disabled:cursor-not-allowed", className)}
24
+ {...props}
25
+ />
26
+ )
27
+ }
28
+
29
+ function InputOTPGroup({ className, ...props }: React.ComponentProps<"div">) {
30
+ return (
31
+ <div
32
+ data-slot="input-otp-group"
33
+ className={cn("flex items-center", className)}
34
+ {...props}
35
+ />
36
+ )
37
+ }
38
+
39
+ function InputOTPSlot({
40
+ index,
41
+ className,
42
+ ...props
43
+ }: React.ComponentProps<"div"> & {
44
+ index: number
45
+ }) {
46
+ const inputOTPContext = React.useContext(OTPInputContext)
47
+ const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}
48
+
49
+ return (
50
+ <div
51
+ data-slot="input-otp-slot"
52
+ data-active={isActive}
53
+ className={cn(
54
+ "data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",
55
+ className
56
+ )}
57
+ {...props}
58
+ >
59
+ {char}
60
+ {hasFakeCaret && (
61
+ <div className="pointer-events-none absolute inset-0 flex items-center justify-center">
62
+ <div className="animate-caret-blink bg-foreground h-4 w-px duration-1000" />
63
+ </div>
64
+ )}
65
+ </div>
66
+ )
67
+ }
68
+
69
+ function InputOTPSeparator({ ...props }: React.ComponentProps<"div">) {
70
+ return (
71
+ <div data-slot="input-otp-separator" role="separator" {...props}>
72
+ <MinusIcon />
73
+ </div>
74
+ )
75
+ }
76
+
77
+ export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }
@@ -1,19 +1,21 @@
1
- import * as React from 'react';
1
+ import * as React from "react"
2
2
 
3
- import { cn } from '@/vdb/lib/utils.js';
3
+ import { cn } from "@/vdb/lib/utils"
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
- '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
- );
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
+ )
17
19
  }
18
20
 
19
- export { Input };
21
+ export { Input }
@@ -1,21 +1,24 @@
1
- 'use client';
1
+ "use client"
2
2
 
3
- import * as LabelPrimitive from '@radix-ui/react-label';
4
- import * as React from 'react';
3
+ import * as React from "react"
4
+ import * as LabelPrimitive from "@radix-ui/react-label"
5
5
 
6
- import { cn } from '@/vdb/lib/utils.js';
6
+ import { cn } from "@/vdb/lib/utils"
7
7
 
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
- );
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
+ )
19
22
  }
20
23
 
21
- export { Label };
24
+ export { Label }