Skip to content

Commit 7366940

Browse files
authored
Merge pull request #68 from Logging-Stuff/theme-fix
Theme fix
2 parents 121a18d + a6c7cbb commit 7366940

File tree

17 files changed

+52
-51
lines changed

17 files changed

+52
-51
lines changed

app/global.css

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,25 @@
5353
--border: #000;
5454
--background-image: url("/images/banner_void_2.svg");
5555
}
56+
5657
.dark {
57-
--background: #000000;
58-
--foreground: #eaeaea;
59-
--card: #1e1e1e;
60-
--card-foreground: #eaeaea;
61-
--primary: #ffcc00;
62-
--primary-hover: #ffdb33;
58+
--background: #1a1a1a;
59+
--foreground: #f5f5f5;
60+
--card: #242424;
61+
--card-foreground: #f5f5f5;
62+
--primary: #ffdb33;
63+
--primary-hover: #ffcc00;
6364
--primary-foreground: #000;
64-
--secondary: #fff;
65-
--secondary-foreground: #000;
66-
--muted: #5a5a5a;
67-
--muted-foreground: #aeaeae;
68-
--accent: #ffd966;
65+
--secondary: #3a3a3a;
66+
--secondary-foreground: #f5f5f5;
67+
--muted: #3f3f46;
68+
--muted-foreground: #a0a0a0;
69+
--accent: #fae583;
6970
--accent-foreground: #000;
7071
--destructive: #e63946;
7172
--destructive-foreground: #fff;
72-
--border: #eee;
73-
--background-image: url("/images/bg_void_3.png");
73+
--border: #3a3a3a;
74+
--background-image: url("/images/bg_void_3.svg"); /* Optional: A different image for dark mode */
7475
}
7576

7677
.bg-image {

components/retroui/Checkbox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Check } from "lucide-react";
66
const checkboxVariants = cva("border-2", {
77
variants: {
88
variant: {
9-
default: "data-[state=checked]:bg-primary",
9+
default: "data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground ",
1010
outline: "",
1111
solid:
1212
"data-[state=checked]:bg-foreground data-[state=checked]:text-background",

components/retroui/Select.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const SelectItem = ({
7272
}: SelectPrimitive.SelectItemProps) => (
7373
<SelectPrimitive.Item
7474
className={cn(
75-
"relative flex w-full cursor-default select-none items-center py-1.5 px-2 outline-hidden hover:bg-primary data-disabled:pointer-events-none data-disabled:opacity-50",
75+
"relative flex w-full cursor-default select-none items-center py-1.5 px-2 outline-hidden hover:bg-primary hover:text-primary-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
7676
className,
7777
)}
7878
{...props}

components/retroui/Tab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const TabsTrigger = ({ children, className, ...props }: ITabsTrigger) => {
3535
return (
3636
<Tab
3737
className={cn(
38-
"px-4 py-1 border-2 border-transparent data-selected:border-border data-selected:bg-primary data-selected:font-semibold focus:outline-hidden",
38+
"px-4 py-1 border-2 border-transparent data-selected:border-border data-selected:bg-primary data-selected:text-primary-foreground data-selected:font-semibold focus:outline-hidden",
3939
className,
4040
)}
4141
{...props}

components/retroui/Tooltip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const tooltipContentVariants = cva(
1212
variants: {
1313
variant: {
1414
default: "bg-background text-foreground",
15-
primary: "bg-primary text-foreground",
15+
primary: "bg-primary text-primary-foreground",
1616
solid: "bg-black text-white",
1717
},
1818
},

content/docs/install/nextjs.mdx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -157,22 +157,22 @@ Save your theme as CSS variables in `global.css`:
157157
}
158158

159159
.dark {
160-
--background: #000000;
161-
--foreground: #eaeaea;
162-
--card: #1e1e1e;
163-
--card-foreground: #eaeaea;
164-
--primary: #ffcc00;
165-
--primary-hover: #ffdb33;
160+
--background: #1a1a1a;
161+
--foreground: #f5f5f5;
162+
--card: #242424;
163+
--card-foreground: #f5f5f5;
164+
--primary: #ffdb33;
165+
--primary-hover: #ffcc00;
166166
--primary-foreground: #000;
167-
--secondary: #fff;
168-
--secondary-foreground: #000;
169-
--muted: #5a5a5a;
170-
--muted-foreground: #aeaeae;
171-
--accent: #ffd966;
167+
--secondary: #3a3a3a;
168+
--secondary-foreground: #f5f5f5;
169+
--muted: #3f3f46;
170+
--muted-foreground: #a0a0a0;
171+
--accent: #fae583;
172172
--accent-foreground: #000;
173173
--destructive: #e63946;
174174
--destructive-foreground: #fff;
175-
--border: #eee;
175+
--border: #3a3a3a;
176176
}
177177
```
178178

content/docs/install/vite.mdx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -188,22 +188,22 @@ Save your theme as CSS variables in `styles.css` file:
188188
}
189189

190190
.dark {
191-
--background: #000000;
192-
--foreground: #eaeaea;
193-
--card: #1e1e1e;
194-
--card-foreground: #eaeaea;
195-
--primary: #ffcc00;
196-
--primary-hover: #ffdb33;
191+
--background: #1a1a1a;
192+
--foreground: #f5f5f5;
193+
--card: #242424;
194+
--card-foreground: #f5f5f5;
195+
--primary: #ffdb33;
196+
--primary-hover: #ffcc00;
197197
--primary-foreground: #000;
198-
--secondary: #fff;
199-
--secondary-foreground: #000;
200-
--muted: #5a5a5a;
201-
--muted-foreground: #aeaeae;
202-
--accent: #ffd966;
198+
--secondary: #3a3a3a;
199+
--secondary-foreground: #f5f5f5;
200+
--muted: #3f3f46;
201+
--muted-foreground: #a0a0a0;
202+
--accent: #fae583;
203203
--accent-foreground: #000;
204204
--destructive: #e63946;
205205
--destructive-foreground: #fff;
206-
--border: #eee;
206+
--border: #3a3a3a;
207207
}
208208
```
209209

public/r/checkbox.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"files": [
1313
{
1414
"path": "components/retroui/Checkbox.tsx",
15-
"content": "import { cn } from \"@/lib/utils\";\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { cva, VariantProps } from \"class-variance-authority\";\nimport { Check } from \"lucide-react\";\n\nconst checkboxVariants = cva(\"border-2\", {\n variants: {\n variant: {\n default: \"data-[state=checked]:bg-primary\",\n outline: \"\",\n solid:\n \"data-[state=checked]:bg-foreground data-[state=checked]:text-background\",\n },\n size: {\n sm: \"h-4 w-4\",\n md: \"h-5 w-5\",\n lg: \"h-6 w-6\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n },\n});\n\ninterface CheckboxProps\n extends React.ComponentProps<typeof CheckboxPrimitive.Root>,\n VariantProps<typeof checkboxVariants> {}\n\nexport const Checkbox = ({\n className,\n size,\n variant,\n ...props\n}: CheckboxProps) => (\n <CheckboxPrimitive.Root\n className={cn(\n checkboxVariants({\n size,\n variant,\n }),\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"h-full w-full\">\n <Check className=\"h-full w-full\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n);\n",
15+
"content": "import { cn } from \"@/lib/utils\";\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { cva, VariantProps } from \"class-variance-authority\";\nimport { Check } from \"lucide-react\";\n\nconst checkboxVariants = cva(\"border-2\", {\n variants: {\n variant: {\n default: \"data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground \",\n outline: \"\",\n solid:\n \"data-[state=checked]:bg-foreground data-[state=checked]:text-background\",\n },\n size: {\n sm: \"h-4 w-4\",\n md: \"h-5 w-5\",\n lg: \"h-6 w-6\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n },\n});\n\ninterface CheckboxProps\n extends React.ComponentProps<typeof CheckboxPrimitive.Root>,\n VariantProps<typeof checkboxVariants> {}\n\nexport const Checkbox = ({\n className,\n size,\n variant,\n ...props\n}: CheckboxProps) => (\n <CheckboxPrimitive.Root\n className={cn(\n checkboxVariants({\n size,\n variant,\n }),\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"h-full w-full\">\n <Check className=\"h-full w-full\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n);\n",
1616
"type": "registry:component",
1717
"target": "components/retroui/Checkbox.tsx"
1818
}

public/r/radio.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"files": [
1212
{
1313
"path": "components/retroui/Radio.tsx",
14-
"content": "import { cn } from \"@/lib/utils\";\nimport * as RadioPrimitive from \"@radix-ui/react-radio-group\";\nimport { cva, VariantProps } from \"class-variance-authority\";\n\nconst radioVariants = cva(\"border-black border-2\", {\n variants: {\n variant: {\n default: \"\",\n outline: \"\",\n solid: \"\",\n },\n size: {\n sm: \"h-4 w-4\",\n md: \"h-5 w-5\",\n lg: \"h-6 w-6\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n },\n});\n\nconst radioIndicatorVariants = cva(\"flex \", {\n variants: {\n variant: {\n default: \"bg-primary border-2 border-black\",\n outline: \"border-2 border-black\",\n solid: \"bg-black\",\n },\n size: {\n sm: \"h-2 w-2\",\n md: \"h-2.5 w-2.5\",\n lg: \"h-3.5 w-3.5\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n },\n});\n\ninterface RadioGroupProps\n extends React.ComponentProps<typeof RadioPrimitive.Root> {}\n\nexport const RadioGroupRoot = ({ className, ...props }: RadioGroupProps) => (\n <RadioPrimitive.Root className={cn(\"grid gap-2\", className)} {...props} />\n);\n\ninterface RadioProps\n extends React.ComponentProps<typeof RadioPrimitive.Item>,\n VariantProps<typeof radioVariants> {}\n\nexport const RadioItem = ({\n children,\n className,\n size,\n variant,\n ...props\n}: RadioProps) => (\n <RadioPrimitive.Item\n {...props}\n className={cn(\n radioVariants({\n size,\n variant,\n }),\n className,\n )}\n >\n <RadioPrimitive.Indicator className=\"flex justify-center items-center\">\n <span className={radioIndicatorVariants({ size, variant })}></span>\n </RadioPrimitive.Indicator>\n {children}\n </RadioPrimitive.Item>\n);\n\nconst RadioComponent = Object.assign(RadioGroupRoot, {\n Item: RadioItem,\n});\n\nexport { RadioComponent as RadioGroup };\n",
14+
"content": "import { cn } from \"@/lib/utils\";\nimport * as RadioPrimitive from \"@radix-ui/react-radio-group\";\nimport { cva, VariantProps } from \"class-variance-authority\";\n\nconst radioVariants = cva(\"border-border border-2\", {\n variants: {\n variant: {\n default: \"\",\n outline: \"\",\n solid: \"\",\n },\n size: {\n sm: \"h-4 w-4\",\n md: \"h-5 w-5\",\n lg: \"h-6 w-6\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n },\n});\n\nconst radioIndicatorVariants = cva(\"flex \", {\n variants: {\n variant: {\n default: \"bg-primary border-2 border-border\",\n outline: \"border-2 border-border\",\n solid: \"bg-border\",\n },\n size: {\n sm: \"h-2 w-2\",\n md: \"h-2.5 w-2.5\",\n lg: \"h-3.5 w-3.5\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n },\n});\n\ninterface RadioGroupProps\n extends React.ComponentProps<typeof RadioPrimitive.Root> {}\n\nexport const RadioGroupRoot = ({ className, ...props }: RadioGroupProps) => (\n <RadioPrimitive.Root className={cn(\"grid gap-2\", className)} {...props} />\n);\n\ninterface RadioProps\n extends React.ComponentProps<typeof RadioPrimitive.Item>,\n VariantProps<typeof radioVariants> {}\n\nexport const RadioItem = ({\n children,\n className,\n size,\n variant,\n ...props\n}: RadioProps) => (\n <RadioPrimitive.Item\n {...props}\n className={cn(\n radioVariants({\n size,\n variant,\n }),\n className,\n )}\n >\n <RadioPrimitive.Indicator className=\"flex justify-center items-center\">\n <span className={radioIndicatorVariants({ size, variant })}></span>\n </RadioPrimitive.Indicator>\n {children}\n </RadioPrimitive.Item>\n);\n\nconst RadioComponent = Object.assign(RadioGroupRoot, {\n Item: RadioItem,\n});\n\nexport { RadioComponent as RadioGroup };\n",
1515
"type": "registry:component",
1616
"target": "components/retroui/Radio.tsx"
1717
}

public/r/select.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"files": [
1212
{
1313
"path": "components/retroui/Select.tsx",
14-
"content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Check, ChevronDown } from \"lucide-react\";\nimport React from \"react\";\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectTrigger = ({\n className,\n children,\n ...props\n}: SelectPrimitive.SelectTriggerProps) => {\n return (\n <SelectPrimitive.Trigger\n className={cn(\n \"flex h-10 min-w-40 items-center shadow-md justify-between border-2 border-input border-black bg-transparent px-4 py-2 ring-offset-background placeholder:text-muted-foreground focus:outline-hidden disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"ml-2 h-4 w-4\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n};\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectIcon = SelectPrimitive.Icon;\n\nconst SelectContent = ({\n className,\n children,\n position = \"popper\",\n ...props\n}: SelectPrimitive.SelectContentProps) => {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n className={cn(\n \"relative z-50 min-w-[8rem] overflow-hidden border border-black bg-white text-popover-foreground shadow-md 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\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className,\n )}\n position={position}\n {...props}\n >\n <SelectPrimitive.Viewport\n className={cn(\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\",\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n};\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectItem = ({\n className,\n children,\n ...props\n}: SelectPrimitive.SelectItemProps) => (\n <SelectPrimitive.Item\n className={cn(\n \"relative flex w-full cursor-default select-none items-center py-1.5 px-2 outline-hidden hover:bg-primary data-disabled:pointer-events-none data-disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n\n <span className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4 text-foreground\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n </SelectPrimitive.Item>\n);\nconst SelectLabel = SelectPrimitive.Label;\nconst SelectSeparator = SelectPrimitive.Separator;\n\nconst SelectObj = Object.assign(Select, {\n Trigger: SelectTrigger,\n Value: SelectValue,\n Icon: SelectIcon,\n Content: SelectContent,\n Group: SelectGroup,\n Item: SelectItem,\n Label: SelectLabel,\n Separator: SelectSeparator,\n});\n\nexport { SelectObj as Select };\n",
14+
"content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Check, ChevronDown } from \"lucide-react\";\nimport React from \"react\";\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectTrigger = ({\n className,\n children,\n ...props\n}: SelectPrimitive.SelectTriggerProps) => {\n return (\n <SelectPrimitive.Trigger\n className={cn(\n \"flex h-10 min-w-40 items-center shadow-md justify-between border-2 border-input border-border bg-transparent px-4 py-2 ring-offset-background placeholder:text-muted-foreground focus:outline-hidden disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"ml-2 h-4 w-4\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n};\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectIcon = SelectPrimitive.Icon;\n\nconst SelectContent = ({\n className,\n children,\n position = \"popper\",\n ...props\n}: SelectPrimitive.SelectContentProps) => {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n className={cn(\n \"relative z-50 min-w-[8rem] overflow-hidden border border-border bg-background text-popover-foreground shadow-md 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\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className,\n )}\n position={position}\n {...props}\n >\n <SelectPrimitive.Viewport\n className={cn(\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\",\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n};\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectItem = ({\n className,\n children,\n ...props\n}: SelectPrimitive.SelectItemProps) => (\n <SelectPrimitive.Item\n className={cn(\n \"relative flex w-full cursor-default select-none items-center py-1.5 px-2 outline-hidden hover:bg-primary hover:text-primary-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n\n <span className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4 text-foreground\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n </SelectPrimitive.Item>\n);\nconst SelectLabel = SelectPrimitive.Label;\nconst SelectSeparator = SelectPrimitive.Separator;\n\nconst SelectObj = Object.assign(Select, {\n Trigger: SelectTrigger,\n Value: SelectValue,\n Icon: SelectIcon,\n Content: SelectContent,\n Group: SelectGroup,\n Item: SelectItem,\n Label: SelectLabel,\n Separator: SelectSeparator,\n});\n\nexport { SelectObj as Select };\n",
1515
"type": "registry:component",
1616
"target": "components/retroui/Select.tsx"
1717
}

0 commit comments

Comments
 (0)