Skip to content

Commit 9c10c2e

Browse files
authored
fix: remove forwardRef (#255)
- did quick run through with `playground` and didn't notice any glaring issues - aligned pnpm and node versions with what we use on fe-monorepo - updated prettier config to match what we use on fe-monorepo and ran on `packages/frosted-ui`
1 parent d0ad6f4 commit 9c10c2e

File tree

157 files changed

+12145
-12259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+12145
-12259
lines changed

.eslintrc.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module.exports = {
22
root: true,
33
// This tells ESLint to load the config from the package `eslint-config-custom`
4-
extends: ["custom"],
4+
extends: ['custom'],
55
settings: {
66
next: {
7-
rootDir: ["apps/*/"],
7+
rootDir: ['apps/*/'],
88
},
99
},
1010
};

.github/workflows/pull-comment.yml

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323
pull-requests: write
2424
steps:
2525
- uses: actions/checkout@v3
26+
with:
27+
ref: ${{ github.head_ref }}
2628
- name: Update package.json version number
2729
uses: whopio/[email protected]
2830
with:

.github/workflows/pull.yml

+10-8
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: actions/checkout@v3
19+
with:
20+
ref: ${{ github.head_ref }}
1921
- uses: pnpm/action-setup@v4
2022
with:
21-
version: 8.6.9
23+
version: 9.15.4
2224
- name: Setup node
2325
uses: actions/setup-node@v3
2426
with:
25-
node-version: 18.x
27+
node-version: 22.x
2628
check-latest: true
2729
cache: pnpm
2830
- name: Install all packages
@@ -36,11 +38,11 @@ jobs:
3638
- uses: actions/checkout@v3
3739
- uses: pnpm/action-setup@v4
3840
with:
39-
version: 8.6.9
41+
version: 9.15.4
4042
- name: Setup node
4143
uses: actions/setup-node@v3
4244
with:
43-
node-version: 18.x
45+
node-version: 22.x
4446
check-latest: true
4547
cache: pnpm
4648
- name: Install all packages
@@ -58,11 +60,11 @@ jobs:
5860
- uses: actions/checkout@v3
5961
- uses: pnpm/action-setup@v4
6062
with:
61-
version: 8.6.9
63+
version: 9.15.4
6264
- name: Setup node
6365
uses: actions/setup-node@v3
6466
with:
65-
node-version: 18.x
67+
node-version: 22.x
6668
check-latest: true
6769
cache: pnpm
6870
- name: Install all packages
@@ -78,11 +80,11 @@ jobs:
7880
- uses: actions/checkout@v3
7981
- uses: pnpm/action-setup@v4
8082
with:
81-
version: 8.6.9
83+
version: 9.15.4
8284
- name: Setup node
8385
uses: actions/setup-node@v3
8486
with:
85-
node-version: 18.x
87+
node-version: 22.x
8688
check-latest: true
8789
cache: pnpm
8890
- name: Install all packages

.github/workflows/release-icons.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ jobs:
1515
- uses: actions/checkout@v3
1616
with:
1717
fetch-depth: 0
18+
ref: ${{ github.head_ref }}
1819
- uses: pnpm/action-setup@v4
1920
with:
20-
version: 8.6.9
21+
version: 9.15.4
2122
- name: Setup node
2223
uses: actions/setup-node@v3
2324
with:
24-
node-version: 18.x
25+
node-version: 22.x
2526
check-latest: true
2627
cache: pnpm
2728
- name: Install all packages

.github/workflows/release.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ jobs:
2626
- uses: actions/checkout@v3
2727
with:
2828
fetch-depth: 0
29+
ref: ${{ github.head_ref }}
2930
- uses: pnpm/action-setup@v4
3031
with:
31-
version: 8.6.9
32+
version: 9.15.4
3233
- name: Setup node
3334
uses: actions/setup-node@v3
3435
with:
35-
node-version: 18.x
36+
node-version: 22.x
3637
check-latest: true
3738
cache: pnpm
3839
- name: Install all packages

.prettierrc.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
2-
"trailingComma": "all",
3-
"tabWidth": 2,
2+
"arrowParens": "always",
3+
"bracketSameLine": false,
4+
"printWidth": 120,
45
"semi": true,
5-
"singleQuote": true
6+
"singleQuote": true,
7+
"tabWidth": 2,
8+
"trailingComma": "all"
69
}

apps/playground/app/api/avatar/route.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ async function wait(ms: number) {
77
export async function GET() {
88
await wait(1000);
99
return NextResponse.redirect(
10-
'https://images.unsplash.com/photo-1492633423870-43d1cd2775eb?&w=160&h=160&dpr=2&q=80'
10+
'https://images.unsplash.com/photo-1492633423870-43d1cd2775eb?&w=160&h=160&dpr=2&q=80',
1111
);
1212
}

apps/playground/app/demo/users.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ export const users: User[] = [
2323
},
2424
{
2525
id: 'user3',
26-
image: avatar('1632765854612-9b02b6ec2b15', { x: 0.4, y: 0.35, zoom: 1.05 }),
26+
image: avatar('1632765854612-9b02b6ec2b15', {
27+
x: 0.4,
28+
y: 0.35,
29+
zoom: 1.05,
30+
}),
2731
name: 'Zahra Ambessa',
2832
handle: '@zahraambessa',
2933
role: 'viewer',
@@ -63,7 +67,10 @@ export const users: User[] = [
6367
//
6468
//
6569
//
66-
function avatar(id: string, params?: { x?: number; y?: number; zoom?: number }) {
70+
function avatar(
71+
id: string,
72+
params?: { x?: number; y?: number; zoom?: number },
73+
) {
6774
let crop = '';
6875
if (params === undefined) {
6976
crop = 'faces';

apps/playground/app/sink/radix-logo.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ export const RadixLogo = (props: React.ComponentProps<'svg'>) => (
99
fill="none"
1010
{...props}
1111
>
12-
<path d="M12 25C7.58173 25 4 21.4183 4 17C4 12.5817 7.58173 9 12 9V25Z" fill="currentcolor" />
12+
<path
13+
d="M12 25C7.58173 25 4 21.4183 4 17C4 12.5817 7.58173 9 12 9V25Z"
14+
fill="currentcolor"
15+
/>
1316
<path d="M12 0H4V8H12V0Z" fill="currentcolor" />
1417
<path
1518
d="M17 8C19.2091 8 21 6.20914 21 4C21 1.79086 19.2091 0 17 0C14.7909 0 13 1.79086 13 4C13 6.20914 14.7909 8 17 8Z"

apps/playground/components/snapshot-logo.tsx

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
// eslint-disable-next-line @typescript-eslint/no-explicit-any
22
export function SnapshotLogo(props: any) {
33
return (
4-
<svg
5-
width="559"
6-
height="191"
7-
viewBox="0 0 559 191"
8-
fill="none"
9-
xmlns="http://www.w3.org/2000/svg"
10-
{...props}
11-
>
4+
<svg width="559" height="191" viewBox="0 0 559 191" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
125
<path
136
d="M106.396 60H74.3965V50H106.396C117.442 50 126.396 58.9543 126.396 70V102H116.396V70C116.396 64.4772 111.919 60 106.396 60Z"
147
fill="var(--accent-9)"

apps/playground/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"dependencies": {
1313
"@radix-ui/react-icons": "^1.3.0",
14-
"frosted-ui": "workspace*",
14+
"frosted-ui": "workspace:*",
1515
"next": "^14.1.0",
1616
"next-themes": "^0.2.1",
1717
"react": "^18.2.0",
@@ -23,7 +23,7 @@
2323
"@types/node": "^17.0.12",
2424
"@types/react": "^18.2.53",
2525
"@types/react-dom": "^18.2.18",
26-
"eslint-config-custom": "*",
26+
"eslint-config-custom": "workspace:*",
2727
"typescript": "^5.3.3"
2828
}
2929
}

apps/tailwind/app/api/avatar/route.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,5 @@ async function wait(ms: number) {
66

77
export async function GET() {
88
await wait(1000);
9-
return NextResponse.redirect(
10-
'https://images.unsplash.com/photo-1492633423870-43d1cd2775eb?&w=160&h=160&dpr=2&q=80'
11-
);
9+
return NextResponse.redirect('https://images.unsplash.com/photo-1492633423870-43d1cd2775eb?&w=160&h=160&dpr=2&q=80');
1210
}

apps/tailwind/app/dashboard/page.tsx

+9-45
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,8 @@ const DashboardCard = () => {
7676
<div className="flex justify-center gap-1 px-2 py-1 rounded-3 border border-gray-a3">
7777
<NotionLogoIcon width="20" height="20" className="text-blue-9" />
7878
<DiscordLogoIcon width="20" height="20" className="text-lime-9" />
79-
<LinkedInLogoIcon
80-
width="20"
81-
height="20"
82-
className="text-yellow-9"
83-
/>
84-
<GitHubLogoIcon
85-
width="20"
86-
height="20"
87-
className="text-tomato-9"
88-
/>
79+
<LinkedInLogoIcon width="20" height="20" className="text-yellow-9" />
80+
<GitHubLogoIcon width="20" height="20" className="text-tomato-9" />
8981
</div>
9082
</Flex>
9183
</Flex>
@@ -202,17 +194,10 @@ export default function Dashboard() {
202194
<body>
203195
{/* <NextThemeProvider> */}
204196
<Theme asChild appearance="dark" grayColor="gray" accentColor="blue">
205-
<div
206-
id="root"
207-
className="w-full h-[100vh] bg-gray-1 flex flex-no-wrap p-2"
208-
>
197+
<div id="root" className="w-full h-[100vh] bg-gray-1 flex flex-no-wrap p-2">
209198
<ThemePanel />
210199
<aside className="h-full w-[300px] py-2 px-4">
211-
<Flex
212-
direction="column"
213-
justify="between"
214-
style={{ height: '100%' }}
215-
>
200+
<Flex direction="column" justify="between" style={{ height: '100%' }}>
216201
<div>
217202
<Flex px="2" py="4">
218203
<Popover.Root>
@@ -237,11 +222,7 @@ export default function Dashboard() {
237222
fallback="A"
238223
/>
239224
<Box grow="1">
240-
<TextArea
241-
size="2"
242-
placeholder="Write a comment…"
243-
style={{ height: 80 }}
244-
/>
225+
<TextArea size="2" placeholder="Write a comment…" style={{ height: 80 }} />
245226

246227
<Flex gap="3" mt="3" justify="between">
247228
<Flex align="center" gap="2" asChild>
@@ -317,11 +298,7 @@ export default function Dashboard() {
317298
<DropdownMenu.Root>
318299
<DropdownMenu.Trigger>
319300
<IconButton variant="surface" size="3">
320-
<GearIcon
321-
width="20"
322-
height="20"
323-
color="var(--gray-10)"
324-
/>
301+
<GearIcon width="20" height="20" color="var(--gray-10)" />
325302
</IconButton>
326303
</DropdownMenu.Trigger>
327304
<DropdownMenu.Content align="end" size="2">
@@ -333,9 +310,7 @@ export default function Dashboard() {
333310
<DropdownMenu.Item>Air Cover</DropdownMenu.Item>
334311
<DropdownMenu.Item>Cancellations</DropdownMenu.Item>
335312
<DropdownMenu.Sub>
336-
<DropdownMenu.SubTrigger>
337-
Hosting
338-
</DropdownMenu.SubTrigger>
313+
<DropdownMenu.SubTrigger>Hosting</DropdownMenu.SubTrigger>
339314

340315
<DropdownMenu.SubContent>
341316
<DropdownMenu.Item>Resources</DropdownMenu.Item>
@@ -356,13 +331,7 @@ export default function Dashboard() {
356331
</aside>
357332
<main className="h-full flex-1 rounded-5 border border-solid border-gray-a4 dark:bg-[rgba(255,255,255,0.01)]">
358333
<Box pl="7" pr="6">
359-
<Flex
360-
pt="4"
361-
pb="4"
362-
direction="row"
363-
align="center"
364-
justify="between"
365-
>
334+
<Flex pt="4" pb="4" direction="row" align="center" justify="between">
366335
<Box>
367336
<Breadcrumbs.Root>
368337
<Breadcrumbs.Item>PRODUCTS</Breadcrumbs.Item>
@@ -452,12 +421,7 @@ export default function Dashboard() {
452421
</Flex>
453422
</Flex>
454423
<Flex mt="6">
455-
<Button
456-
variant="soft"
457-
color="gray"
458-
style={{ width: '100%' }}
459-
size="4"
460-
>
424+
<Button variant="soft" color="gray" style={{ width: '100%' }} size="4">
461425
Load more
462426
</Button>
463427
</Flex>

apps/tailwind/app/layout.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ export const metadata = {
77
description: 'A playground of Frosted UI components',
88
};
99

10-
export default function RootLayout({
11-
children,
12-
}: {
13-
children: React.ReactNode;
14-
}) {
10+
export default function RootLayout({ children }: { children: React.ReactNode }) {
1511
return children;
1612
}

0 commit comments

Comments
 (0)