Skip to content

Commit 700bb5b

Browse files
Merge remote-tracking branch 'origin/dev' into feat/hero-new-ds
2 parents 7e4793e + cea6462 commit 700bb5b

File tree

37 files changed

+470
-414
lines changed

37 files changed

+470
-414
lines changed

.all-contributorsrc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10577,6 +10577,24 @@
1057710577
"contributions": [
1057810578
"content"
1057910579
]
10580+
},
10581+
{
10582+
"login": "Coderoostr",
10583+
"name": "Marcos González",
10584+
"avatar_url": "https://avatars.githubusercontent.com/u/103231131?v=4",
10585+
"profile": "https://coderoostr.com",
10586+
"contributions": [
10587+
"doc"
10588+
]
10589+
},
10590+
{
10591+
"login": "natpicone",
10592+
"name": "Natalino Picone",
10593+
"avatar_url": "https://avatars.githubusercontent.com/u/4753402?v=4",
10594+
"profile": "http://nozominetworks.com",
10595+
"contributions": [
10596+
"content"
10597+
]
1058010598
}
1058110599
],
1058210600
"contributorsPerLine": 7,

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,6 +1656,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
16561656
<td align="center" valign="top" width="14.28%"><a href="https://mirror.xyz/umede.eth"><img src="https://avatars.githubusercontent.com/u/122288558?v=4?s=100" width="100px;" alt="umede"/><br /><sub><b>umede</b></sub></a><br /><a href="#content-umededoteth" title="Content">🖋</a></td>
16571657
<td align="center" valign="top" width="14.28%"><a href="http://taminobaumann.com"><img src="https://avatars.githubusercontent.com/u/48290617?v=4?s=100" width="100px;" alt="Tamino"/><br /><sub><b>Tamino</b></sub></a><br /><a href="#content-taminobaumann" title="Content">🖋</a></td>
16581658
<td align="center" valign="top" width="14.28%"><a href="https://github.com/keccers"><img src="https://avatars.githubusercontent.com/u/770277?v=4?s=100" width="100px;" alt="Katherine Champagne"/><br /><sub><b>Katherine Champagne</b></sub></a><br /><a href="#content-keccers" title="Content">🖋</a></td>
1659+
<td align="center" valign="top" width="14.28%"><a href="https://coderoostr.com"><img src="https://avatars.githubusercontent.com/u/103231131?v=4?s=100" width="100px;" alt="Marcos González"/><br /><sub><b>Marcos González</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=Coderoostr" title="Documentation">📖</a></td>
1660+
<td align="center" valign="top" width="14.28%"><a href="http://nozominetworks.com"><img src="https://avatars.githubusercontent.com/u/4753402?v=4?s=100" width="100px;" alt="Natalino Picone"/><br /><sub><b>Natalino Picone</b></sub></a><br /><a href="#content-natpicone" title="Content">🖋</a></td>
16591661
</tr>
16601662
</tbody>
16611663
</table>

docs/ds-implementation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ Follow the new component directory structure:
1717
```markdown
1818
src/
1919
└── components/
20-
└── ComponentA/
21-
├── index.tsx
22-
├── ComponentA.stories.tsx
23-
└── // Any other files as applicable (utils, child components, useHook, etc.)
20+
└── ComponentA/
21+
├── index.tsx
22+
├── ComponentA.stories.tsx
23+
└── // Any other files as applicable (utils, child components, useHook, etc.)
2424
```
2525

2626
## Components creation/modification from the DS

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ethereum-org-website",
3-
"version": "7.22.0",
3+
"version": "7.22.1",
44
"description": "Website of ethereum.org",
55
"main": "index.js",
66
"repository": "git@github.com:ethereum/ethereum-org-website.git",
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { createMultiStyleConfigHelpers } from "@chakra-ui/react"
2+
import { breadcrumbAnatomy } from "@chakra-ui/anatomy"
3+
import { breadcrumbDefaultTheme, defineMergeStyles } from "./components.utils"
4+
5+
const { defineMultiStyleConfig } = createMultiStyleConfigHelpers(
6+
breadcrumbAnatomy.keys
7+
)
8+
9+
const baseStyle = defineMergeStyles(breadcrumbDefaultTheme.baseStyle, {
10+
list: {
11+
m: 0,
12+
lineHeight: "base",
13+
flexWrap: "wrap",
14+
},
15+
item: {
16+
color: "body.medium",
17+
letterSpacing: "wider",
18+
m: 0,
19+
},
20+
link: {
21+
fontWeight: "normal",
22+
_hover: {
23+
color: "primary.base",
24+
textDecor: "none",
25+
},
26+
_active: {
27+
color: "primary.base",
28+
},
29+
/*
30+
* `&[aria-current="page"]`
31+
* Redundancy to ensure styling on the active
32+
* link is applied.
33+
*/
34+
_activeLink: {
35+
color: "primary.base",
36+
},
37+
},
38+
separator: {
39+
mx: "2.5",
40+
},
41+
})
42+
43+
export const Breadcrumb = defineMultiStyleConfig({
44+
baseStyle,
45+
})

src/@chakra-ui/gatsby-plugin/components/Input.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { inputAnatomy } from "@chakra-ui/anatomy"
2+
import { cssVar } from "@chakra-ui/react"
23
import {
34
createMultiStyleConfigHelpers,
45
defineStyle,
@@ -8,6 +9,9 @@ import { defineMergeStyles, inputDefaultTheme } from "./components.utils"
89
const { defineMultiStyleConfig, definePartsStyle } =
910
createMultiStyleConfigHelpers(inputAnatomy.keys)
1011

12+
// From the default theme
13+
const $height = cssVar("input-height")
14+
1115
const baseStyle = definePartsStyle((props) => {
1216
const {
1317
focusBorderColor: fc = "primaryHover",
@@ -19,10 +23,10 @@ const baseStyle = definePartsStyle((props) => {
1923
inputDefaultTheme.variants?.outline(props),
2024
{
2125
field: {
22-
borderColor: "currentColor",
2326
borderRadius: "base",
2427
outline: "3px solid transparent",
2528
lineHeight: 1,
29+
px: "2",
2630
_placeholder: {
2731
color: "disabled",
2832
opacity: 1,
@@ -34,9 +38,6 @@ const baseStyle = definePartsStyle((props) => {
3438
boxShadow: "none",
3539
},
3640
_hover: null, // override default
37-
_groupHover: {
38-
borderColor: "primary.hover",
39-
},
4041
_invalid: {
4142
borderColor: ec,
4243
boxShadow: "none",
@@ -46,10 +47,14 @@ const baseStyle = definePartsStyle((props) => {
4647
opacity: 1,
4748
},
4849
"&:not(:disabled)": {
50+
borderColor: "body.base",
4951
_active: {
5052
bg: "background.highlight",
5153
borderColor: "primary.highContrast",
5254
},
55+
"[data-group] &:hover, &:hover": {
56+
borderColor: "primary.hover",
57+
},
5358
},
5459
},
5560
element: {
@@ -84,12 +89,10 @@ const baseStyle = definePartsStyle((props) => {
8489

8590
const size = {
8691
md: defineStyle({
87-
h: 10.5,
88-
px: 2,
92+
[$height.variable]: "sizes.10.5",
8993
}),
9094
sm: defineStyle({
91-
h: 8,
92-
px: 1,
95+
[$height.variable]: "sizes.8",
9396
}),
9497
}
9598

src/@chakra-ui/gatsby-plugin/components/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Alert } from "./Alert"
22
import { Avatar } from "./Avatar"
33
import { Badge } from "./Badge"
44
import { Button } from "./Button"
5+
import { Breadcrumb } from "./Breadcrumb"
56
import { Heading } from "./Heading"
67
import { Link } from "./Link"
78
import { Tag } from "./Tag"
@@ -17,7 +18,6 @@ import { Switch } from "./Switch"
1718
import { Input } from "./Input"
1819
import {
1920
accordionDefaultTheme,
20-
breadcrumbDefaultTheme,
2121
closeButtonDefaultTheme,
2222
codeDefaultTheme,
2323
dividerDefaultTheme,
@@ -34,7 +34,7 @@ export default {
3434
Alert,
3535
Avatar,
3636
Badge,
37-
Breadcrumb: breadcrumbDefaultTheme,
37+
Breadcrumb,
3838
Button,
3939
Checkbox,
4040
CloseButton: closeButtonDefaultTheme,

src/components/Breadcrumbs/Breadcrumbs.stories.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from "react"
22
import { Meta, StoryObj } from "@storybook/react"
3+
import { Stack } from "@chakra-ui/react"
34
import BreadcrumbsComponent from "."
45

56
type BreadcumbsType = typeof BreadcrumbsComponent
@@ -15,10 +16,10 @@ type Story = StoryObj<typeof meta>
1516

1617
export const Breadcrumbs: Story = {
1718
render: () => (
18-
<>
19+
<Stack spacing="8">
1920
<BreadcrumbsComponent slug="/en/staking/" />
2021
<BreadcrumbsComponent slug="/en/staking/solo/" />
2122
<BreadcrumbsComponent slug="/en/roadmap/merge/issuance/" />
22-
</>
23+
</Stack>
2324
),
2425
}

src/components/Breadcrumbs/index.tsx

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -68,45 +68,15 @@ const Breadcrumbs: React.FC<IProps> = ({
6868
.slice(startDepth)
6969

7070
return (
71-
<Breadcrumb
72-
dir="auto"
73-
position="relative"
74-
zIndex="1"
75-
mb={8}
76-
spacing="2.5"
77-
listProps={{
78-
m: 0,
79-
lineHeight: 1.6,
80-
flexWrap: "wrap",
81-
}}
82-
{...restProps}
83-
>
71+
<Breadcrumb dir="auto" {...restProps}>
8472
{crumbs.map((crumb, idx) => {
8573
const isCurrentPage = slug === crumb.fullPath
8674
return (
87-
<BreadcrumbItem
88-
key={idx}
89-
isCurrentPage={isCurrentPage}
90-
color="body.medium"
91-
letterSpacing="wider"
92-
m={0}
93-
>
75+
<BreadcrumbItem key={idx} isCurrentPage={isCurrentPage}>
9476
<BreadcrumbLink
9577
as={BaseLink}
9678
to={crumb.fullPath}
9779
isPartiallyActive={isCurrentPage}
98-
fontWeight="normal"
99-
_hover={{ color: "primary.base", textDecor: "none" }}
100-
_active={{ color: "primary.base" }}
101-
sx={{
102-
/*
103-
* Redundancy to ensure styling on the active
104-
* link is applied.
105-
*/
106-
'&[aria-current="page"]': {
107-
color: "primary.base",
108-
},
109-
}}
11080
>
11181
{crumb.text.toUpperCase()}
11282
</BreadcrumbLink>

src/components/Buttons/ButtonTwoLines/index.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,20 @@ const ButtonTwoLines = (props: ButtonTwoLinesProps) => {
8787
>
8888
<Text
8989
as="span"
90-
fontSize="md"
90+
size="md"
9191
fontWeight={size === "md" ? "bold" : "normal"}
9292
>
9393
{mainText}
9494
</Text>
95-
{/* TODO: use `size='xs'` instead when the Text theme is added */}
96-
<Text as="span" fontSize="xs">
95+
<Text
96+
as="span"
97+
size="xs"
98+
color={
99+
rest.variant === "outline" || rest.isSecondary
100+
? "body.medium"
101+
: undefined
102+
}
103+
>
97104
{helperText}
98105
</Text>
99106
</Stack>

0 commit comments

Comments
 (0)