Skip to content

Commit b6a4c51

Browse files
committed
lfg
1 parent 923fbe5 commit b6a4c51

18 files changed

+226
-228
lines changed

.idea/workspace.xml

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/globals.css

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
@layer base {
6+
:root {
7+
--light: 223.81 0% 98%;
8+
--dark: 239.95 9% 6%;
9+
--bg: 0 0% 100%;
10+
--fg: 239.93 9% 4%;
11+
--primary: 216.77 100% 50%;
12+
--primary-fg: 0 0% 100%;
13+
--secondary: 240 4% 96%;
14+
--secondary-fg: 240.01 6% 10%;
15+
--tertiary: 0 0% 100%;
16+
--tertiary-fg: 240 4% 16%;
17+
--overlay: 0 0% 100%;
18+
--overlay-fg: 239.93 9% 4%;
19+
--muted: 240 4% 96%;
20+
--muted-fg: 240.01 4% 46%;
21+
--accent: 216.77 100% 50%;
22+
--accent-fg: 0 0% 100%;
23+
--accent-subtle: 216.92 99% 97%;
24+
--accent-subtle-fg: 216.74 100% 40%;
25+
--success: 161.17 91% 31%;
26+
--success-fg: 151.77 82% 96%;
27+
--info: 205.77 100% 50%;
28+
--info-fg: 0 0% 100%;
29+
--danger: 0.01 72% 51%;
30+
--danger-fg: 360 86% 97%;
31+
--warning: 43.2 96% 56.99%;
32+
--warning-fg: 20.91 91% 14.1%;
33+
--border: 240 6% 90%;
34+
--input: 240 6% 90%;
35+
--ring: var(--primary);
36+
--toggle: 240.01 5% 84%;
37+
--radius: 0.5rem;
38+
--primary-chart: 216.74 100% 45%;
39+
--secondary-chart: 219.83 100% 77%;
40+
--tertiary-chart: 216.01 92% 60%;
41+
--highlight-chart: 210 98% 78%;
42+
--accent-chart: 210 98% 78%
43+
}
44+
45+
.dark {
46+
--bg: 0 0% 0%;
47+
--fg: 223.81 0% 98%;
48+
--primary: 216.04 98% 52%;
49+
--primary-fg: 0 0% 100%;
50+
--secondary: 239.99 6% 11%;
51+
--secondary-fg: 223.81 0% 98%;
52+
--tertiary: 240.02 10% 6%;
53+
--tertiary-fg: 239.99 4% 96%;
54+
--accent: 216.04 98% 52%;
55+
--accent-fg: 0 0% 100%;
56+
--accent-subtle: 215.99 94% 6%;
57+
--accent-subtle-fg: 204.92 100% 77%;
58+
--overlay: 240.03 6% 6%;
59+
--overlay-fg: 223.81 0% 98%;
60+
--muted: 239.95 3% 16%;
61+
--muted-fg: 240.01 5% 65%;
62+
--info: 205.77 100% 50%;
63+
--info-fg: 0 0% 100%;
64+
--success: 161.17 91% 31%;
65+
--success-fg: 151.77 82% 96%;
66+
--ring: var(--primary);
67+
--toggle: 239.99 5% 26%;
68+
--border: 240.01 7.1% 15%;
69+
--input: 239.95 3% 16%;
70+
--primary-chart: 221.19 83% 53%;
71+
--secondary-chart: 211.99 95% 68%;
72+
--tertiary-chart: 216.01 92% 60%;
73+
--highlight-chart: 210 98% 78%;
74+
--accent-chart: 212 96% 87%
75+
}
76+
}
77+
78+
@layer base {
79+
html {
80+
@apply scroll-smooth;
81+
}
82+
83+
* {
84+
@apply border-border;
85+
font-feature-settings: 'cv11', 'ss01';
86+
font-variation-settings: 'opsz' 850;
87+
text-rendering: optimizeLegibility;
88+
scrollbar-width: thin;
89+
}
90+
91+
body {
92+
@apply bg-bg text-fg;
93+
}
94+
95+
/* dark mode */
96+
.dark {
97+
scrollbar-width: thin;
98+
99+
@media (prefers-color-scheme: dark) {
100+
* {
101+
scrollbar-width: thin;
102+
}
103+
}
104+
}
105+
106+
/* Chrome, Edge, and Safari */
107+
*::-webkit-scrollbar {
108+
width: 8px;
109+
height: 8px;
110+
}
111+
112+
*::-webkit-scrollbar-track {
113+
background: transparent;
114+
border-radius: 5px;
115+
}
116+
117+
*::-webkit-scrollbar-thumb {
118+
@apply bg-muted;
119+
border-radius: 14px;
120+
border: 3px solid transparent;
121+
}
122+
}

app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Metadata } from 'next'
33
import localFont from 'next/font/local'
44
import { Toast } from 'ui'
55

6-
import './styles/app.css'
6+
import './globals.css'
77

88
const fontSans = localFont({
99
src: './fonts/GeistVF.woff',

app/styles/app.css

Lines changed: 0 additions & 122 deletions
This file was deleted.

bun.lockb

1017 Bytes
Binary file not shown.

components/providers.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function Providers({ children }: { children: React.ReactNode }) {
1616

1717
return (
1818
<RouterProvider navigate={router.push}>
19-
<ThemeProvider>{children}</ThemeProvider>
19+
<ThemeProvider attribute="class">{children}</ThemeProvider>
2020
</RouterProvider>
2121
)
2222
}

components/theme-provider.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ import { ThemeProvider as NextThemesProvider, useTheme } from 'next-themes'
66
import { type ThemeProviderProps } from 'next-themes/dist/types'
77

88
const ThemeProvider = ({ children, ...props }: ThemeProviderProps) => {
9-
return (
10-
<NextThemesProvider disableTransitionOnChange attribute="class" {...props}>
11-
{children}
12-
</NextThemesProvider>
13-
)
9+
return <NextThemesProvider {...props}>{children}</NextThemesProvider>
1410
}
1511

1612
export { ThemeProvider, useTheme }

components/ui/button.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ const buttonStyles = tv(
7171
isDisabled: {
7272
false: 'forced-colors:disabled:text-[GrayText]',
7373
true: 'cursor-default opacity-60 forced-colors:disabled:text-[GrayText]'
74+
},
75+
isPending: {
76+
true: 'cursor-default'
7477
}
7578
},
7679
defaultVariants: {

components/ui/checkbox.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
import { tv } from 'tailwind-variants'
1515

1616
import { Description, FieldError, Label } from './field'
17-
import { cr, ctr } from './primitive'
17+
import { cn, cr, ctr } from './primitive'
1818

1919
interface CheckboxGroupProps extends Omit<CheckboxGroupPrimitiveProps, 'children'> {
2020
label?: string
@@ -25,7 +25,7 @@ interface CheckboxGroupProps extends Omit<CheckboxGroupPrimitiveProps, 'children
2525

2626
const CheckboxGroup = (props: CheckboxGroupProps) => {
2727
return (
28-
<CheckboxGroupPrimitive {...props} className={ctr(props.className, 'flex flex-col gap-2')}>
28+
<CheckboxGroupPrimitive {...props} className={ctr(props.className, 'flex flex-col gap-y-2')}>
2929
<Label>{props.label}</Label>
3030
<>{props.children}</>
3131
{props.description && <Description className="block">{props.description}</Description>}
@@ -71,19 +71,19 @@ interface CheckboxProps extends CheckboxPrimitiveProps {
7171
label?: string
7272
}
7373

74-
const Checkbox = (props: CheckboxProps) => {
74+
const Checkbox = ({ className, ...props }: CheckboxProps) => {
7575
return (
7676
<CheckboxPrimitive
7777
{...props}
78-
className={cr(props.className, (className, renderProps) => checkboxStyles({ ...renderProps, className }))}
78+
className={cr(className, (className, renderProps) => checkboxStyles({ ...renderProps, className }))}
7979
>
8080
{({ isSelected, isIndeterminate, ...renderProps }) => (
81-
<div className="flex gap-2">
81+
<div className={cn('flex gap-x-2', props.description ? 'items-start' : 'items-center')}>
8282
<div
8383
className={boxStyles({
84+
...renderProps,
8485
isSelected: isSelected || isIndeterminate,
85-
className: props.description ? 'mt-1' : 'mt-0.5',
86-
...renderProps
86+
className: props.description ? 'mt-1' : 'mt-px'
8787
})}
8888
>
8989
{isIndeterminate ? <IconMinus /> : isSelected ? <IconCheck /> : null}

components/ui/link.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use client'
22

3+
import * as React from 'react'
4+
35
import { Link as LinkPrimitive, type LinkProps as LinkPrimitiveProps } from 'react-aria-components'
46
import { tv } from 'tailwind-variants'
57

@@ -29,15 +31,14 @@ interface LinkProps extends LinkPrimitiveProps {
2931
const Link = ({ className, ...props }: LinkProps) => {
3032
return (
3133
<LinkPrimitive
32-
aria-label={props['aria-label'] ?? 'Link'}
3334
{...props}
3435
className={cr(className, (className, ...renderProps) =>
3536
linkStyles({ ...renderProps, intent: props.intent, className })
3637
)}
3738
>
38-
<TouchTarget>
39-
<>{props.children}</>
40-
</TouchTarget>
39+
{(values) => (
40+
<TouchTarget>{typeof props.children === 'function' ? props.children(values) : props.children}</TouchTarget>
41+
)}
4142
</LinkPrimitive>
4243
)
4344
}

0 commit comments

Comments
 (0)