Skip to content

Commit 5f7ac46

Browse files
committed
Merge branch 'main' into fix-landing
2 parents 96f11db + 02882fd commit 5f7ac46

File tree

72 files changed

+4398
-2456
lines changed

Some content is hidden

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

72 files changed

+4398
-2456
lines changed

Cargo.lock

Lines changed: 72 additions & 103 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/landing/next.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ export default withMDX(
88
{
99
pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
1010
output: 'export',
11-
assetPrefix: '/devup-ui',
1211
},
1312
{},
1413
),

apps/landing/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
"@devup-ui/react": "workspace:*",
1616
"@mdx-js/loader": "^3.1.0",
1717
"@mdx-js/react": "^3.1.0",
18-
"@next/mdx": "^15.2.4",
18+
"@next/mdx": "^15.3.2",
1919
"@types/mdx": "^2.0.13",
20-
"next": "^15.2.4",
20+
"next": "^15.3.2",
2121
"react": "^19.1.0",
2222
"react-dom": "^19.1.0",
2323
"react-syntax-highlighter": "^15.6.1",
@@ -31,7 +31,7 @@
3131
"@types/react-dom": "^19",
3232
"@types/react-syntax-highlighter": "^15.5.13",
3333
"typescript": "^5",
34-
"glob": "^11.0.1",
34+
"glob": "^11.0.2",
3535
"remark": "^15.0.1"
3636
}
3737
}

apps/landing/src/app/(detail)/docs/MenuItem.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { Box, css, Flex, Text } from '@devup-ui/react'
33
import Link from 'next/link'
44
import { usePathname } from 'next/navigation'
55

6-
import { URL_PREFIX } from '../../../constants'
76
import { OpenMenuItem } from './OpenMenuItem'
87

98
export interface MenuItemProps {
@@ -19,12 +18,8 @@ export function MenuItem(props: MenuItemProps) {
1918
const { children, to, subMenu } = props
2019
const path = usePathname()
2120
const selected = to
22-
? path.startsWith(to) || path.startsWith(URL_PREFIX + to)
23-
: !!subMenu?.some((item) =>
24-
item.to
25-
? path.startsWith(URL_PREFIX + item.to) || path.startsWith(item.to)
26-
: false,
27-
)
21+
? path.startsWith(to)
22+
: !!subMenu?.some((item) => (item.to ? path.startsWith(item.to) : false))
2823

2924
if (subMenu) return <OpenMenuItem {...props} subMenu={subMenu} />
3025
const inner = (
@@ -61,7 +56,7 @@ export function MenuItem(props: MenuItemProps) {
6156
className={css({
6257
textDecoration: 'none',
6358
})}
64-
href={URL_PREFIX + to}
59+
href={to}
6560
>
6661
{inner}
6762
</Link>

apps/landing/src/app/(detail)/docs/OpenMenuItem.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import Link from 'next/link'
44
import { usePathname } from 'next/navigation'
55
import { Fragment, useReducer } from 'react'
66

7-
import { URL_PREFIX } from '../../../constants'
87
import { MenuItemProps } from './MenuItem'
98

109
export function OpenMenuItem({
@@ -14,9 +13,7 @@ export function OpenMenuItem({
1413
Required<Pick<MenuItemProps, 'subMenu'>>) {
1514
const path = usePathname()
1615
const selected = subMenu.some((item) =>
17-
item.to
18-
? path.startsWith(URL_PREFIX + item.to) || path.startsWith(item.to)
19-
: false,
16+
item.to ? path.startsWith(item.to) : false,
2017
)
2118
const [open, handleOpen] = useReducer((state) => !state, selected)
2219
return (
@@ -45,7 +42,7 @@ export function OpenMenuItem({
4542
{subMenu && (
4643
<Image
4744
boxSize="16px"
48-
src={URL_PREFIX + '/menu-arrow.svg'}
45+
src="/menu-arrow.svg"
4946
transform={open ? 'rotate(0deg)' : 'rotate(-90deg)'}
5047
transition="transform 0.2s"
5148
/>
@@ -56,9 +53,7 @@ export function OpenMenuItem({
5653
<Box borderRight="1px solid var(--border, #E0E0E0)" w="10px" />
5754
<VStack flex="1" gap="4px">
5855
{subMenu.map(({ children, to }, idx) => {
59-
const selected = to
60-
? path.startsWith(to) || path.startsWith(URL_PREFIX + to)
61-
: false
56+
const selected = to ? path.startsWith(to) : false
6257
const inner = (
6358
<Flex
6459
_hover={{
@@ -90,7 +85,7 @@ export function OpenMenuItem({
9085
className={css({
9186
textDecoration: 'none',
9287
})}
93-
href={URL_PREFIX + to}
88+
href={to}
9489
>
9590
{inner}
9691
</Link>
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const metadata = {
2-
title: "Box",
2+
title: 'Box',
33
}
44

55
# Box
@@ -8,23 +8,22 @@ The `Box` component is a layout primitive that can be used to create any kind of
88

99
It is just a `div` with some styles.
1010

11-
1211
## How to use
1312

1413
```jsx
1514
// Before
16-
<Box bg={"red"}/>
15+
<Box bg={"red"} />
1716

1817
// After
19-
<div className="d0"/>
18+
<div className="d0" />
2019
```
2120

22-
You can use the as prop to change the element type.
21+
You can use the `as` prop to change the element type.
2322

2423
```jsx
2524
// Before
26-
<Box as="span"/>
25+
<Box as={"span"} />
2726

2827
// After
29-
<span class="d0"/>
28+
<span className="d0" />
3029
```
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
export const metadata = {
2-
title: "Button",
2+
title: 'Button',
33
}
44

55
# Button
66

7-
The Button component is a simple button component that can be used to trigger actions.
7+
The `Button` component is a simple button component that can be used to trigger actions.
88

9+
## How to use
910

1011
```jsx
1112
// Before
12-
<Button bg={"red"}/>
13+
<Button bg={"red"} />
1314

1415
// After
15-
<button className="d0"/>
16+
<button className="d0" />
1617
```
Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const metadata = {
2-
title: "Center",
2+
title: 'Center',
33
}
44

55
# Center
@@ -10,10 +10,18 @@ It has a `display: flex` style with `justify-content: center` and `align-items:
1010

1111
## How to use
1212

13-
```jsx
13+
````jsx
1414
// Before
15-
<Center/>
15+
<Center>
16+
<Box bg="blue" w={25} h={25} />
17+
<Box bg="blue" w={25} h={25} />
18+
<Box bg="blue" w={25} h={25} />
19+
</Center>
1620

1721
// After, It has 3 classes on default
18-
<div className="d0 d1 d2"/>
19-
```
22+
<div className="d3 d4 d5">
23+
<div className="d0 d1 d2"></div>
24+
<div className="d0 d1 d2"></div>
25+
<div className="d0 d1 d2"></div>
26+
</div>```
27+
````
Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,38 @@
11
export const metadata = {
2-
title: "css",
2+
title: 'css',
33
}
44

55
# css
66

7-
css function is a function that returns a string.
7+
`css` function is a function that returns a string.
88

9-
## Usage
9+
## How to use
1010

1111
### CSS Literal
12-
You can use the css function to create a css string.
12+
13+
You can use `css` as a tag function to create a css string. Pass in a string of css properties as an argument, ans it will be converted
14+
into a class list.
15+
1316
```jsx
14-
<any css={css`
17+
// Before
18+
<any className={css`
1519
color: red;
1620
`}/>
1721

18-
<any className={"d0"}/>
22+
// After
23+
<any className="d0"/>
1924
```
2025

2126
### CSS Object
22-
You can use the css function to create a css object.
27+
28+
You can also use the css function by passing in a css object as an argument.
29+
2330
```jsx
31+
// Before
2432
<any className={css({
2533
color: "red"
2634
})}/>
2735

28-
<any className={"d0"}/>
29-
```
30-
31-
Also, css function can be used in the style prop. (responsive, pseudo-class, etc.)
32-
```jsx
33-
// It works like this
34-
<any style={css({
35-
color: ["red", "blue"],
36-
_hover: {
37-
color: "green"
38-
}
39-
})}/>
36+
// After
37+
<any className="d0" />
4038
```
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const metadata = {
2-
title: "Flex",
2+
title: 'Flex',
33
}
44

55
# Flex
@@ -12,9 +12,8 @@ It has a `display: flex` style by default.
1212

1313
```jsx
1414
// Before
15-
<Flex/>
15+
<Flex />
1616

17-
// After, It has a class on default
18-
<div className="d0"/>
17+
// After, it has a class on default
18+
<div className="d0" />
1919
```
20-

0 commit comments

Comments
 (0)