@camox/ui 0.7.3 → 0.9.0

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.7.3",
3
+ "version": "0.9.0",
4
4
  "files": [
5
5
  "src"
6
6
  ],
@@ -10,11 +10,11 @@ const buttonVariants = cva(
10
10
  variant: {
11
11
  default: "bg-primary text-primary-foreground hover:bg-primary/80",
12
12
  outline:
13
- "border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
13
+ "border-border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground aria-expanded:bg-accent aria-expanded:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-accent/50",
14
14
  secondary:
15
15
  "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
16
16
  ghost:
17
- "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
17
+ "hover:bg-accent hover:text-accent-foreground aria-expanded:bg-accent aria-expanded:text-accent-foreground dark:hover:bg-accent/50",
18
18
  destructive:
19
19
  "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
20
20
  link: "text-primary underline-offset-4 hover:underline",
@@ -130,8 +130,9 @@ function CommandSeparator({
130
130
  function CommandItem({
131
131
  className,
132
132
  children,
133
+ hideCheck,
133
134
  ...props
134
- }: React.ComponentProps<typeof CommandPrimitive.Item>) {
135
+ }: React.ComponentProps<typeof CommandPrimitive.Item> & { hideCheck?: boolean }) {
135
136
  return (
136
137
  <CommandPrimitive.Item
137
138
  data-slot="command-item"
@@ -142,7 +143,9 @@ function CommandItem({
142
143
  {...props}
143
144
  >
144
145
  {children}
145
- <CheckIcon className="ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" />
146
+ {!hideCheck && (
147
+ <CheckIcon className="ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" />
148
+ )}
146
149
  </CommandPrimitive.Item>
147
150
  );
148
151
  }
@@ -4,12 +4,12 @@ import { cva, type VariantProps } from "class-variance-authority";
4
4
  import { cn } from "../lib/utils";
5
5
 
6
6
  const toggleVariants = cva(
7
- "group/toggle inline-flex items-center justify-center gap-1 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
7
+ "group/toggle inline-flex items-center justify-center gap-1 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-accent hover:text-accent-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-accent dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
8
8
  {
9
9
  variants: {
10
10
  variant: {
11
11
  default: "bg-transparent",
12
- outline: "border border-input bg-transparent shadow-xs hover:bg-muted",
12
+ outline: "border border-input bg-transparent shadow-xs hover:bg-accent",
13
13
  },
14
14
  size: {
15
15
  default:
@@ -14,7 +14,7 @@
14
14
  --secondary-foreground: theme(--color-zinc-900);
15
15
  --muted: theme(--color-zinc-100);
16
16
  --muted-foreground: theme(--color-zinc-500);
17
- --accent: oklch(0.95 0.01 252);
17
+ --accent: oklch(0.95 0.01 190);
18
18
  --accent-foreground: theme(--color-slate-900);
19
19
  --destructive: theme(--color-red-600);
20
20
  --destructive-foreground: theme(--color-red-600);
@@ -50,7 +50,7 @@
50
50
  --secondary-foreground: theme(--color-zinc-50);
51
51
  --muted: theme(--color-zinc-800);
52
52
  --muted-foreground: theme(--color-zinc-400);
53
- --accent: theme(--color-slate-800);
53
+ --accent: oklch(0.27 0.02 182);
54
54
  --accent-foreground: theme(--color-slate-50);
55
55
  --destructive: theme(--color-red-400);
56
56
  --destructive-foreground: theme(--color-red-500);
@@ -118,4 +118,7 @@
118
118
  body {
119
119
  @apply bg-background text-foreground;
120
120
  }
121
+ a:focus-visible {
122
+ @apply border-ring ring-ring/50 rounded-md ring-3 outline-none;
123
+ }
121
124
  }