@c-rex/ui 0.3.0-build.18 → 0.3.0-build.22

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c-rex/ui",
3
- "version": "0.3.0-build.18",
3
+ "version": "0.3.0-build.22",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src"
package/src/button.tsx CHANGED
@@ -7,7 +7,7 @@ import { cva, type VariantProps } from "class-variance-authority";
7
7
  import { cn } from "@c-rex/utils";
8
8
 
9
9
  const buttonVariants = cva(
10
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
10
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-5 [&_svg]:shrink-0",
11
11
  {
12
12
  variants: {
13
13
  variant: {
package/src/card.tsx CHANGED
@@ -7,7 +7,7 @@ function Card({ className, ...props }: React.ComponentProps<"div">) {
7
7
  <div
8
8
  data-slot="card"
9
9
  className={cn(
10
- "bg-card text-card-foreground flex flex-col gap-4 rounded-xl border py-4 shadow-sm",
10
+ "bg-card text-card-foreground flex flex-col gap-4 rounded-xl border shadow-sm",
11
11
  className
12
12
  )}
13
13
  {...props}
@@ -20,7 +20,7 @@ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
20
20
  <div
21
21
  data-slot="card-header"
22
22
  className={cn(
23
- "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
23
+ "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start p-4 has-data-[slot=card-action]:grid-cols-[1fr_auto]",
24
24
  className
25
25
  )}
26
26
  {...props}
package/src/sidebar.tsx CHANGED
@@ -3,7 +3,7 @@
3
3
  import * as React from "react";
4
4
  import { Slot } from "@radix-ui/react-slot";
5
5
  import { VariantProps, cva } from "class-variance-authority";
6
- import { Info, PanelLeft } from "lucide-react";
6
+ import { PanelLeft, PanelRight } from "lucide-react";
7
7
  import { cn } from "@c-rex/utils";
8
8
  import { useBreakpoint } from "./hooks";
9
9
  import { Button } from "./button";
@@ -180,7 +180,7 @@ const MultiSidebarProvider = React.forwardRef<
180
180
  } as React.CSSProperties
181
181
  }
182
182
  className={cn(
183
- "min-h-screen items-center flex flex-col overflow-x-hidden",
183
+ "min-h-screen items-center flex flex-col",
184
184
  className,
185
185
  )}
186
186
  ref={ref}
@@ -325,14 +325,14 @@ const SidebarTrigger = React.forwardRef<
325
325
  data-sidebar="trigger"
326
326
  variant={variant}
327
327
  size={size}
328
- className={cn("h-8 w-8", className)}
328
+ className={className}
329
329
  onClick={(event) => {
330
330
  onClick?.(event);
331
331
  toggleSidebar();
332
332
  }}
333
333
  {...props}
334
334
  >
335
- {side === "left" ? <PanelLeft className="!h-5 !w-5" /> : <Info className="!h-5 !w-5" />}
335
+ {side === "left" ? <PanelLeft /> : <PanelRight />}
336
336
  <span className="sr-only">
337
337
  Toggle {side === "left" ? "Left" : "Right"} Sidebar
338
338
  </span>
package/src/tabs.tsx CHANGED
@@ -4,61 +4,61 @@ import * as TabsPrimitive from "@radix-ui/react-tabs"
4
4
  import { cn } from "@c-rex/utils"
5
5
 
6
6
  function Tabs({
7
- className,
8
- ...props
7
+ className,
8
+ ...props
9
9
  }: React.ComponentProps<typeof TabsPrimitive.Root>) {
10
- return (
11
- <TabsPrimitive.Root
12
- data-slot="tabs"
13
- className={cn("flex flex-col gap-2", className)}
14
- {...props}
15
- />
16
- )
10
+ return (
11
+ <TabsPrimitive.Root
12
+ data-slot="tabs"
13
+ className={cn("flex flex-col", className)}
14
+ {...props}
15
+ />
16
+ )
17
17
  }
18
18
 
19
19
  function TabsList({
20
- className,
21
- ...props
20
+ className,
21
+ ...props
22
22
  }: React.ComponentProps<typeof TabsPrimitive.List>) {
23
- return (
24
- <TabsPrimitive.List
25
- data-slot="tabs-list"
26
- className={cn(
27
- "bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
28
- className
29
- )}
30
- {...props}
31
- />
32
- )
23
+ return (
24
+ <TabsPrimitive.List
25
+ data-slot="tabs-list"
26
+ className={cn(
27
+ "inline-flex h-9 w-full items-center justify-center rounded-lg p-[3px]",
28
+ className
29
+ )}
30
+ {...props}
31
+ />
32
+ )
33
33
  }
34
34
 
35
35
  function TabsTrigger({
36
- className,
37
- ...props
36
+ className,
37
+ ...props
38
38
  }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {
39
- return (
40
- <TabsPrimitive.Trigger
41
- data-slot="tabs-trigger"
42
- className={cn(
43
- "data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
44
- className
45
- )}
46
- {...props}
47
- />
48
- )
39
+ return (
40
+ <TabsPrimitive.Trigger
41
+ data-slot="tabs-trigger"
42
+ className={cn(
43
+ "data-[state=active]:text-foreground hover:text-foreground text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 whitespace-nowrap transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
44
+ className
45
+ )}
46
+ {...props}
47
+ />
48
+ )
49
49
  }
50
50
 
51
51
  function TabsContent({
52
- className,
53
- ...props
52
+ className,
53
+ ...props
54
54
  }: React.ComponentProps<typeof TabsPrimitive.Content>) {
55
- return (
56
- <TabsPrimitive.Content
57
- data-slot="tabs-content"
58
- className={cn("flex-1 outline-none", className)}
59
- {...props}
60
- />
61
- )
55
+ return (
56
+ <TabsPrimitive.Content
57
+ data-slot="tabs-content"
58
+ className={cn("flex-1 outline-none", className)}
59
+ {...props}
60
+ />
61
+ )
62
62
  }
63
63
 
64
64
  export { Tabs, TabsList, TabsTrigger, TabsContent }