@salesforce/webapp-template-feature-react-chart-experimental 1.44.0 → 1.45.1

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 (20) hide show
  1. package/dist/CHANGELOG.md +16 -0
  2. package/dist/force-app/main/default/webapplications/feature-react-chart/package-lock.json +1183 -402
  3. package/dist/force-app/main/default/webapplications/feature-react-chart/package.json +1 -3
  4. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/alert.tsx +17 -13
  5. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/button.tsx +35 -22
  6. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/card.tsx +27 -12
  7. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/dialog.tsx +143 -0
  8. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/field.tsx +157 -46
  9. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/index.ts +1 -0
  10. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/input.tsx +3 -3
  11. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/label.tsx +2 -2
  12. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/pagination.tsx +87 -74
  13. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/select.tsx +156 -124
  14. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/separator.tsx +26 -0
  15. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/skeleton.tsx +1 -0
  16. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/spinner.tsx +5 -16
  17. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/table.tsx +68 -95
  18. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/ui/tabs.tsx +47 -84
  19. package/dist/package.json +1 -1
  20. package/package.json +3 -3
@@ -1,3 +1,5 @@
1
+ import * as React from "react";
2
+
1
3
  import { cn } from "../../lib/utils";
2
4
 
3
5
  function Input({ className, type, ...props }: React.ComponentProps<"input">) {
@@ -6,9 +8,7 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
6
8
  type={type}
7
9
  data-slot="input"
8
10
  className={cn(
9
- "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",
10
- "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
11
- "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
11
+ "dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 h-8 rounded-lg border bg-transparent px-2.5 py-1 text-base transition-colors file:h-6 file:text-sm file:font-medium focus-visible:ring-3 aria-invalid:ring-3 md:text-sm file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
12
12
  className,
13
13
  )}
14
14
  {...props}
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import * as LabelPrimitive from "@radix-ui/react-label";
2
+ import { Label as LabelPrimitive } from "radix-ui";
3
3
 
4
4
  import { cn } from "../../lib/utils";
5
5
 
@@ -8,7 +8,7 @@ function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimiti
8
8
  <LabelPrimitive.Root
9
9
  data-slot="label"
10
10
  className={cn(
11
- "flex items-center gap-2 text-sm font-medium leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
11
+ "gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",
12
12
  className,
13
13
  )}
14
14
  {...props}
@@ -1,92 +1,105 @@
1
1
  import * as React from "react";
2
- import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";
3
2
 
4
3
  import { cn } from "../../lib/utils";
5
- import { Button, buttonVariants } from "./button";
4
+ import { Button } from "./button";
5
+ import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
6
6
 
7
- const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (
8
- <nav
9
- role="navigation"
10
- aria-label="pagination"
11
- className={cn("flex justify-center", className)}
12
- {...props}
13
- />
14
- );
15
- Pagination.displayName = "Pagination";
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
+ );
17
+ }
16
18
 
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";
19
+ function PaginationContent({ className, ...props }: React.ComponentProps<"ul">) {
20
+ return (
21
+ <ul
22
+ data-slot="pagination-content"
23
+ className={cn("gap-0.5 flex items-center", className)}
24
+ {...props}
25
+ />
26
+ );
27
+ }
23
28
 
24
- const PaginationItem = React.forwardRef<HTMLLIElement, React.ComponentProps<"li">>(
25
- ({ className, ...props }, ref) => <li ref={ref} className={cn("", className)} {...props} />,
26
- );
27
- PaginationItem.displayName = "PaginationItem";
29
+ function PaginationItem({ ...props }: React.ComponentProps<"li">) {
30
+ return <li data-slot="pagination-item" {...props} />;
31
+ }
28
32
 
29
33
  type PaginationLinkProps = {
30
34
  isActive?: boolean;
31
- } & React.ComponentProps<"button">;
35
+ } & Pick<React.ComponentProps<typeof Button>, "size"> &
36
+ React.ComponentProps<"a">;
32
37
 
33
- const PaginationLink = ({ className, isActive, disabled, ...props }: PaginationLinkProps) => (
34
- <button
35
- aria-current={isActive ? "page" : undefined}
36
- disabled={disabled}
37
- className={cn(
38
- buttonVariants({
39
- variant: isActive ? "default" : "outline",
40
- size: "sm",
41
- }),
42
- className,
43
- )}
44
- {...props}
45
- />
46
- );
47
- PaginationLink.displayName = "PaginationLink";
38
+ function PaginationLink({ className, isActive, size = "icon", ...props }: PaginationLinkProps) {
39
+ return (
40
+ <Button asChild variant={isActive ? "outline" : "ghost"} size={size} className={cn(className)}>
41
+ <a
42
+ aria-current={isActive ? "page" : undefined}
43
+ data-slot="pagination-link"
44
+ data-active={isActive}
45
+ {...props}
46
+ />
47
+ </Button>
48
+ );
49
+ }
48
50
 
49
- const PaginationPrevious = ({
51
+ function PaginationPrevious({
50
52
  className,
51
- disabled,
53
+ text = "Previous",
52
54
  ...props
53
- }: React.ComponentProps<typeof Button>) => (
54
- <PaginationLink
55
- aria-label="Go to previous page"
56
- className={cn("gap-1 pl-2.5", className)}
57
- disabled={disabled}
58
- {...props}
59
- >
60
- <ChevronLeft className="h-4 w-4" />
61
- <span>Previous</span>
62
- </PaginationLink>
63
- );
64
- PaginationPrevious.displayName = "PaginationPrevious";
55
+ }: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
56
+ return (
57
+ <PaginationLink
58
+ aria-label="Go to previous page"
59
+ size="default"
60
+ className={cn("pl-1.5!", className)}
61
+ {...props}
62
+ >
63
+ <ChevronLeftIcon data-icon="inline-start" className="cn-rtl-flip" />
64
+ <span className="hidden sm:block">{text}</span>
65
+ </PaginationLink>
66
+ );
67
+ }
65
68
 
66
- const PaginationNext = ({ className, disabled, ...props }: React.ComponentProps<typeof Button>) => (
67
- <PaginationLink
68
- aria-label="Go to next page"
69
- className={cn("gap-1 pr-2.5", className)}
70
- disabled={disabled}
71
- {...props}
72
- >
73
- <span>Next</span>
74
- <ChevronRight className="h-4 w-4" />
75
- </PaginationLink>
76
- );
77
- PaginationNext.displayName = "PaginationNext";
69
+ function PaginationNext({
70
+ className,
71
+ text = "Next",
72
+ ...props
73
+ }: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
74
+ return (
75
+ <PaginationLink
76
+ aria-label="Go to next page"
77
+ size="default"
78
+ className={cn("pr-1.5!", className)}
79
+ {...props}
80
+ >
81
+ <span className="hidden sm:block">{text}</span>
82
+ <ChevronRightIcon data-icon="inline-end" className="cn-rtl-flip" />
83
+ </PaginationLink>
84
+ );
85
+ }
78
86
 
79
- const PaginationEllipsis = ({ className, ...props }: React.ComponentProps<"span">) => (
80
- <span
81
- aria-hidden
82
- className={cn("flex h-9 w-9 items-center justify-center", className)}
83
- {...props}
84
- >
85
- <MoreHorizontal className="h-4 w-4" />
86
- <span className="sr-only">More pages</span>
87
- </span>
88
- );
89
- PaginationEllipsis.displayName = "PaginationEllipsis";
87
+ function PaginationEllipsis({ className, ...props }: React.ComponentProps<"span">) {
88
+ return (
89
+ <span
90
+ aria-hidden
91
+ data-slot="pagination-ellipsis"
92
+ className={cn(
93
+ "size-8 [&_svg:not([class*='size-'])]:size-4 flex items-center justify-center",
94
+ className,
95
+ )}
96
+ {...props}
97
+ >
98
+ <MoreHorizontalIcon />
99
+ <span className="sr-only">More pages</span>
100
+ </span>
101
+ );
102
+ }
90
103
 
91
104
  export {
92
105
  Pagination,
@@ -1,151 +1,183 @@
1
1
  import * as React from "react";
2
- import * as SelectPrimitive from "@radix-ui/react-select";
3
- import { Check, ChevronDown, ChevronUp } from "lucide-react";
2
+ import { Select as SelectPrimitive } from "radix-ui";
4
3
 
5
4
  import { cn } from "../../lib/utils";
5
+ import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
6
6
 
7
- const Select = SelectPrimitive.Root;
7
+ function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {
8
+ return <SelectPrimitive.Root data-slot="select" {...props} />;
9
+ }
8
10
 
9
- const SelectGroup = SelectPrimitive.Group;
10
-
11
- const SelectValue = SelectPrimitive.Value;
12
-
13
- const SelectTrigger = React.forwardRef<
14
- React.ElementRef<typeof SelectPrimitive.Trigger>,
15
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
16
- >(({ className, children, ...props }, ref) => (
17
- <SelectPrimitive.Trigger
18
- ref={ref}
19
- className={cn(
20
- "flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
21
- className,
22
- )}
23
- {...props}
24
- >
25
- {children}
26
- <SelectPrimitive.Icon asChild>
27
- <ChevronDown className="h-4 w-4 opacity-50" />
28
- </SelectPrimitive.Icon>
29
- </SelectPrimitive.Trigger>
30
- ));
31
- SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
32
-
33
- const SelectScrollUpButton = React.forwardRef<
34
- React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
35
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
36
- >(({ className, ...props }, ref) => (
37
- <SelectPrimitive.ScrollUpButton
38
- ref={ref}
39
- className={cn("flex cursor-default items-center justify-center py-1 bg-white", className)}
40
- {...props}
41
- >
42
- <ChevronUp className="h-4 w-4" />
43
- </SelectPrimitive.ScrollUpButton>
44
- ));
45
- SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
11
+ function SelectGroup({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {
12
+ return (
13
+ <SelectPrimitive.Group
14
+ data-slot="select-group"
15
+ className={cn("scroll-my-1 p-1", className)}
16
+ {...props}
17
+ />
18
+ );
19
+ }
46
20
 
47
- const SelectScrollDownButton = React.forwardRef<
48
- React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
49
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
50
- >(({ className, ...props }, ref) => (
51
- <SelectPrimitive.ScrollDownButton
52
- ref={ref}
53
- className={cn("flex cursor-default items-center justify-center py-1 bg-white", className)}
54
- {...props}
55
- >
56
- <ChevronDown className="h-4 w-4" />
57
- </SelectPrimitive.ScrollDownButton>
58
- ));
59
- SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
21
+ function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {
22
+ return <SelectPrimitive.Value data-slot="select-value" {...props} />;
23
+ }
60
24
 
61
- const SelectContent = React.forwardRef<
62
- React.ElementRef<typeof SelectPrimitive.Content>,
63
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
64
- >(({ className, children, position = "popper", ...props }, ref) => (
65
- <SelectPrimitive.Portal>
66
- <SelectPrimitive.Content
67
- ref={ref}
25
+ function SelectTrigger({
26
+ className,
27
+ size = "default",
28
+ children,
29
+ ...props
30
+ }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
31
+ size?: "sm" | "default";
32
+ }) {
33
+ return (
34
+ <SelectPrimitive.Trigger
35
+ data-slot="select-trigger"
36
+ data-size={size}
68
37
  className={cn(
69
- "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-white text-gray-900 shadow-lg 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",
70
- position === "popper" &&
71
- "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
38
+ "border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm transition-colors select-none focus-visible:ring-3 aria-invalid:ring-3 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
72
39
  className,
73
40
  )}
74
- position={position}
75
41
  {...props}
76
42
  >
77
- <SelectScrollUpButton />
78
- <SelectPrimitive.Viewport
43
+ {children}
44
+ <SelectPrimitive.Icon asChild>
45
+ <ChevronDownIcon className="text-muted-foreground size-4 pointer-events-none" />
46
+ </SelectPrimitive.Icon>
47
+ </SelectPrimitive.Trigger>
48
+ );
49
+ }
50
+
51
+ function SelectContent({
52
+ className,
53
+ children,
54
+ position = "item-aligned",
55
+ align = "center",
56
+ ...props
57
+ }: React.ComponentProps<typeof SelectPrimitive.Content>) {
58
+ return (
59
+ <SelectPrimitive.Portal>
60
+ <SelectPrimitive.Content
61
+ data-slot="select-content"
62
+ data-align-trigger={position === "item-aligned"}
79
63
  className={cn(
80
- "p-1 bg-white",
64
+ "bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-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 ring-foreground/10 min-w-36 rounded-lg shadow-md ring-1 duration-100 relative z-50 max-h-(--radix-select-content-available-height) origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto data-[align-trigger=true]:animate-none",
81
65
  position === "popper" &&
82
- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
66
+ "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
67
+ className,
83
68
  )}
69
+ position={position}
70
+ align={align}
71
+ {...props}
84
72
  >
85
- {children}
86
- </SelectPrimitive.Viewport>
87
- <SelectScrollDownButton />
88
- </SelectPrimitive.Content>
89
- </SelectPrimitive.Portal>
90
- ));
91
- SelectContent.displayName = SelectPrimitive.Content.displayName;
73
+ <SelectScrollUpButton />
74
+ <SelectPrimitive.Viewport
75
+ data-position={position}
76
+ className={cn(
77
+ "data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",
78
+ position === "popper" && "",
79
+ )}
80
+ >
81
+ {children}
82
+ </SelectPrimitive.Viewport>
83
+ <SelectScrollDownButton />
84
+ </SelectPrimitive.Content>
85
+ </SelectPrimitive.Portal>
86
+ );
87
+ }
92
88
 
93
- const SelectLabel = React.forwardRef<
94
- React.ElementRef<typeof SelectPrimitive.Label>,
95
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
96
- >(({ className, ...props }, ref) => (
97
- <SelectPrimitive.Label
98
- ref={ref}
99
- className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
100
- {...props}
101
- />
102
- ));
103
- SelectLabel.displayName = SelectPrimitive.Label.displayName;
89
+ function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {
90
+ return (
91
+ <SelectPrimitive.Label
92
+ data-slot="select-label"
93
+ className={cn("text-muted-foreground px-1.5 py-1 text-xs", className)}
94
+ {...props}
95
+ />
96
+ );
97
+ }
104
98
 
105
- const SelectItem = React.forwardRef<
106
- React.ElementRef<typeof SelectPrimitive.Item>,
107
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
108
- >(({ className, children, ...props }, ref) => (
109
- <SelectPrimitive.Item
110
- ref={ref}
111
- className={cn(
112
- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-gray-100 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
113
- className,
114
- )}
115
- {...props}
116
- >
117
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
118
- <SelectPrimitive.ItemIndicator>
119
- <Check className="h-4 w-4" />
120
- </SelectPrimitive.ItemIndicator>
121
- </span>
99
+ function SelectItem({
100
+ className,
101
+ children,
102
+ ...props
103
+ }: React.ComponentProps<typeof SelectPrimitive.Item>) {
104
+ return (
105
+ <SelectPrimitive.Item
106
+ data-slot="select-item"
107
+ className={cn(
108
+ "focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
109
+ className,
110
+ )}
111
+ {...props}
112
+ >
113
+ <span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center">
114
+ <SelectPrimitive.ItemIndicator>
115
+ <CheckIcon className="pointer-events-none" />
116
+ </SelectPrimitive.ItemIndicator>
117
+ </span>
118
+ <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
119
+ </SelectPrimitive.Item>
120
+ );
121
+ }
122
122
 
123
- <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
124
- </SelectPrimitive.Item>
125
- ));
126
- SelectItem.displayName = SelectPrimitive.Item.displayName;
123
+ function SelectSeparator({
124
+ className,
125
+ ...props
126
+ }: React.ComponentProps<typeof SelectPrimitive.Separator>) {
127
+ return (
128
+ <SelectPrimitive.Separator
129
+ data-slot="select-separator"
130
+ className={cn("bg-border -mx-1 my-1 h-px pointer-events-none", className)}
131
+ {...props}
132
+ />
133
+ );
134
+ }
127
135
 
128
- const SelectSeparator = React.forwardRef<
129
- React.ElementRef<typeof SelectPrimitive.Separator>,
130
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
131
- >(({ className, ...props }, ref) => (
132
- <SelectPrimitive.Separator
133
- ref={ref}
134
- className={cn("-mx-1 my-1 h-px bg-muted", className)}
135
- {...props}
136
- />
137
- ));
138
- SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
136
+ function SelectScrollUpButton({
137
+ className,
138
+ ...props
139
+ }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
140
+ return (
141
+ <SelectPrimitive.ScrollUpButton
142
+ data-slot="select-scroll-up-button"
143
+ className={cn(
144
+ "bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4",
145
+ className,
146
+ )}
147
+ {...props}
148
+ >
149
+ <ChevronUpIcon />
150
+ </SelectPrimitive.ScrollUpButton>
151
+ );
152
+ }
153
+
154
+ function SelectScrollDownButton({
155
+ className,
156
+ ...props
157
+ }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
158
+ return (
159
+ <SelectPrimitive.ScrollDownButton
160
+ data-slot="select-scroll-down-button"
161
+ className={cn(
162
+ "bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4",
163
+ className,
164
+ )}
165
+ {...props}
166
+ >
167
+ <ChevronDownIcon />
168
+ </SelectPrimitive.ScrollDownButton>
169
+ );
170
+ }
139
171
 
140
172
  export {
141
173
  Select,
142
- SelectGroup,
143
- SelectValue,
144
- SelectTrigger,
145
174
  SelectContent,
146
- SelectLabel,
175
+ SelectGroup,
147
176
  SelectItem,
148
- SelectSeparator,
149
- SelectScrollUpButton,
177
+ SelectLabel,
150
178
  SelectScrollDownButton,
179
+ SelectScrollUpButton,
180
+ SelectSeparator,
181
+ SelectTrigger,
182
+ SelectValue,
151
183
  };
@@ -0,0 +1,26 @@
1
+ import * as React from "react";
2
+ import { Separator as SeparatorPrimitive } from "radix-ui";
3
+
4
+ import { cn } from "../../lib/utils";
5
+
6
+ function Separator({
7
+ className,
8
+ orientation = "horizontal",
9
+ decorative = true,
10
+ ...props
11
+ }: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
12
+ return (
13
+ <SeparatorPrimitive.Root
14
+ data-slot="separator"
15
+ decorative={decorative}
16
+ orientation={orientation}
17
+ className={cn(
18
+ "bg-border shrink-0 data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
19
+ className,
20
+ )}
21
+ {...props}
22
+ />
23
+ );
24
+ }
25
+
26
+ export { Separator };
@@ -1,3 +1,4 @@
1
+ import * as React from "react";
1
2
  import { cn } from "../../lib/utils";
2
3
 
3
4
  function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
@@ -1,26 +1,15 @@
1
- import * as React from "react";
2
- import { LoaderIcon } from "lucide-react";
3
-
4
1
  import { cn } from "../../lib/utils";
2
+ import { Loader2Icon } from "lucide-react";
5
3
 
6
- const Spinner = React.forwardRef<SVGSVGElement, React.ComponentProps<"svg">>(function Spinner(
7
- { className, ...props },
8
- ref,
9
- ) {
4
+ function Spinner({ className, ...props }: React.ComponentProps<"svg">) {
10
5
  return (
11
- <LoaderIcon
12
- ref={ref}
6
+ <Loader2Icon
13
7
  role="status"
14
8
  aria-label="Loading"
15
- className={cn(
16
- "size-4 animate-spin",
17
- // A11y: Respect user's motion preferences
18
- "motion-reduce:animate-none",
19
- className,
20
- )}
9
+ className={cn("size-4 animate-spin", className)}
21
10
  {...props}
22
11
  />
23
12
  );
24
- });
13
+ }
25
14
 
26
15
  export { Spinner };