@camox/ui 0.32.0 → 0.33.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camox/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"src"
|
|
@@ -27,10 +27,6 @@
|
|
|
27
27
|
"types": "./src/components/badge.tsx",
|
|
28
28
|
"default": "./src/components/badge.tsx"
|
|
29
29
|
},
|
|
30
|
-
"./breadcrumb": {
|
|
31
|
-
"types": "./src/components/breadcrumb.tsx",
|
|
32
|
-
"default": "./src/components/breadcrumb.tsx"
|
|
33
|
-
},
|
|
34
30
|
"./button-group": {
|
|
35
31
|
"types": "./src/components/button-group.tsx",
|
|
36
32
|
"default": "./src/components/button-group.tsx"
|
|
@@ -6,7 +6,7 @@ function FloatingToolbar({ className, ...props }: React.ComponentProps<"menu">)
|
|
|
6
6
|
role="toolbar"
|
|
7
7
|
data-slot="floating-toolbar"
|
|
8
8
|
className={cn(
|
|
9
|
-
"absolute left-[50%] z-30 flex translate-x-[-50%] items-center rounded-xl border-1 bg-background
|
|
9
|
+
"absolute left-[50%] z-30 flex translate-x-[-50%] items-center rounded-xl border-1 bg-background p-2 shadow-2xl transition-all duration-200",
|
|
10
10
|
className,
|
|
11
11
|
)}
|
|
12
12
|
{...props}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { ToasterProps } from "sonner";
|
|
2
2
|
import { Toaster as Sonner, toast } from "sonner";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
import { cn } from "../lib/utils";
|
|
5
|
+
|
|
6
|
+
const Toaster = ({ theme = "system", className, ...props }: ToasterProps) => {
|
|
5
7
|
return (
|
|
6
8
|
<Sonner
|
|
7
9
|
theme={theme as ToasterProps["theme"]}
|
|
8
|
-
className="toaster group"
|
|
10
|
+
className={cn("toaster group camox-studio-theme", theme === "dark" && "dark", className)}
|
|
9
11
|
style={
|
|
10
12
|
{
|
|
11
13
|
"--normal-bg": "var(--popover)",
|
package/src/styles/globals.css
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
@custom-variant dark (&:is(.dark *));
|
|
2
2
|
@source "../";
|
|
3
3
|
|
|
4
|
-
:root
|
|
4
|
+
:root,
|
|
5
|
+
.camox-studio-theme {
|
|
5
6
|
--background: oklch(1 0 0);
|
|
6
7
|
--foreground: theme(--color-zinc-950);
|
|
7
8
|
--card: oklch(1 0 0);
|
|
@@ -37,7 +38,8 @@
|
|
|
37
38
|
--sidebar-ring: theme(--color-zinc-400);
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
.dark
|
|
41
|
+
.dark,
|
|
42
|
+
.camox-studio-theme.dark {
|
|
41
43
|
--background: theme(--color-zinc-950);
|
|
42
44
|
--foreground: theme(--color-zinc-50);
|
|
43
45
|
--card: theme(--color-zinc-900);
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { mergeProps } from "@base-ui/react/merge-props";
|
|
2
|
-
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
-
import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
|
|
6
|
-
import { cn } from "../lib/utils";
|
|
7
|
-
|
|
8
|
-
function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">) {
|
|
9
|
-
return (
|
|
10
|
-
<nav aria-label="breadcrumb" data-slot="breadcrumb" className={cn(className)} {...props} />
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
|
|
15
|
-
return (
|
|
16
|
-
<ol
|
|
17
|
-
data-slot="breadcrumb-list"
|
|
18
|
-
className={cn(
|
|
19
|
-
"flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground sm:gap-2.5",
|
|
20
|
-
className,
|
|
21
|
-
)}
|
|
22
|
-
{...props}
|
|
23
|
-
/>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) {
|
|
28
|
-
return (
|
|
29
|
-
<li
|
|
30
|
-
data-slot="breadcrumb-item"
|
|
31
|
-
className={cn("inline-flex items-center gap-1.5", className)}
|
|
32
|
-
{...props}
|
|
33
|
-
/>
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function BreadcrumbLink({ className, render, ...props }: useRender.ComponentProps<"a">) {
|
|
38
|
-
return useRender({
|
|
39
|
-
defaultTagName: "a",
|
|
40
|
-
props: mergeProps<"a">(
|
|
41
|
-
{
|
|
42
|
-
className: cn("transition-colors hover:text-foreground", className),
|
|
43
|
-
},
|
|
44
|
-
props,
|
|
45
|
-
),
|
|
46
|
-
render,
|
|
47
|
-
state: {
|
|
48
|
-
slot: "breadcrumb-link",
|
|
49
|
-
},
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
|
|
54
|
-
return (
|
|
55
|
-
<span
|
|
56
|
-
data-slot="breadcrumb-page"
|
|
57
|
-
role="link"
|
|
58
|
-
aria-disabled="true"
|
|
59
|
-
aria-current="page"
|
|
60
|
-
className={cn("font-normal text-foreground", className)}
|
|
61
|
-
{...props}
|
|
62
|
-
/>
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"li">) {
|
|
67
|
-
return (
|
|
68
|
-
<li
|
|
69
|
-
data-slot="breadcrumb-separator"
|
|
70
|
-
role="presentation"
|
|
71
|
-
aria-hidden="true"
|
|
72
|
-
className={cn("[&>svg]:size-3.5", className)}
|
|
73
|
-
{...props}
|
|
74
|
-
>
|
|
75
|
-
{children ?? <ChevronRightIcon />}
|
|
76
|
-
</li>
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span">) {
|
|
81
|
-
return (
|
|
82
|
-
<span
|
|
83
|
-
data-slot="breadcrumb-ellipsis"
|
|
84
|
-
role="presentation"
|
|
85
|
-
aria-hidden="true"
|
|
86
|
-
className={cn("flex size-5 items-center justify-center [&>svg]:size-4", className)}
|
|
87
|
-
{...props}
|
|
88
|
-
>
|
|
89
|
-
<MoreHorizontalIcon />
|
|
90
|
-
<span className="sr-only">More</span>
|
|
91
|
-
</span>
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export {
|
|
96
|
-
Breadcrumb,
|
|
97
|
-
BreadcrumbList,
|
|
98
|
-
BreadcrumbItem,
|
|
99
|
-
BreadcrumbLink,
|
|
100
|
-
BreadcrumbPage,
|
|
101
|
-
BreadcrumbSeparator,
|
|
102
|
-
BreadcrumbEllipsis,
|
|
103
|
-
};
|