Skip to content

Commit e2553a6

Browse files
committed
Merge branch 'dev' into shadcn-get-eth
2 parents 61a7fbd + 2e64e47 commit e2553a6

File tree

91 files changed

+1758
-1670
lines changed

Some content is hidden

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

91 files changed

+1758
-1670
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
"remark-gfm": "^3.0.1",
8585
"swiper": "^11.1.10",
8686
"tailwind-merge": "^2.3.0",
87+
"tailwind-variants": "^0.2.1",
8788
"tailwindcss-animate": "^1.0.7",
8889
"usehooks-ts": "^3.1.0",
8990
"yaml-loader": "^0.8.0"

public/content/contributing/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Before contributing, make sure you're familiar with:
6868
- our [style guide](/contributing/style-guide/)
6969
- our [code of conduct](/community/code-of-conduct)
7070

71-
<ContributorsQuizBanner mt={16} mb={8} />
71+
<ContributorsQuizBanner className="mt-16 mb-8" />
7272

7373
## How decisions about the site are made {#how-decisions-about-the-site-are-made}
7474

public/content/translations/it/contributing/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Prima di contribuire, assicurati di avere familiarità con:
6868
- la nostra [guida di stile](/contributing/style-guide/)
6969
- il nostro [codice di condotta](/community/code-of-conduct)
7070

71-
<ContributorsQuizBanner mt={16} mb={8} />
71+
<ContributorsQuizBanner className="mt-16 mb-8" />
7272

7373
## Come vengono prese le decisioni sul sito {#how-decisions-about-the-site-are-made}
7474

public/content/translations/ja/contributing/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ ethereum.orgは、オープンソースで運営されているプロジェク
6868
- [スタイルガイド](/contributing/style-guide/)
6969
- [行動規範](/community/code-of-conduct)
7070

71-
<ContributorsQuizBanner mt={16} mb={8} />
71+
<ContributorsQuizBanner className="mt-16 mb-8" />
7272

7373
## サイトに関する決定 {#how-decisions-about-the-site-are-made}
7474

public/content/translations/zh-tw/contributing/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Ethereum.org 是一個開源專案,擁有超過 **12000 名**貢獻者,幫
6868
- 我們的[風格指南](/contributing/style-guide/)
6969
- 我們的[行為準則](/community/code-of-conduct)
7070

71-
<ContributorsQuizBanner mt={16} mb={8} />
71+
<ContributorsQuizBanner className="mt-16 mb-8" />
7272

7373
## 如何做出有關網站的決定 {#how-decisions-about-the-site-are-made}
7474

src/@chakra-ui/components/Button.ts

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,40 @@ import { defineStyle, defineStyleConfig } from "@chakra-ui/react"
1111
const ICON_SELECTOR = "& svg"
1212

1313
const baseStyle = defineStyle({
14+
// Sizing and positioning classes:
1415
borderRadius: "base",
1516
border: "1px",
16-
color: "primary.base",
1717
fontWeight: "normal",
1818
lineHeight: "1.6",
1919
transitionProperty: "common",
2020
transitionDuration: "normal",
2121
whiteSpace: "normal",
2222
p: "unset",
23+
// Base default styling is "outline" pattern, primary color for text, border matches, no bg
24+
borderColor: "currentColor",
25+
color: "primary.base",
26+
// Hover: Default hover adds box-shadow, text (border) to --primary-hover
27+
_hover: {
28+
color: "primary.hover",
29+
boxShadow: "buttonHover",
30+
},
31+
// Focus: Add 4px outline to all buttons, --primary-hover
2332
_focusVisible: {
2433
outline: "4px solid",
2534
outlineColor: "primary.hover",
2635
outlineOffset: -1,
2736
},
37+
// Active: text (border) to --primary-hover instead of primary, hide shadow
38+
_active: {
39+
color: "primary.hover",
40+
boxShadow: "none",
41+
},
42+
// Disabled: Pointer events none, text (border) to --disabled
2843
_disabled: {
2944
color: "disabled",
3045
pointerEvents: "none",
3146
},
32-
_hover: {
33-
color: "primary.hover",
34-
},
47+
// isSecondary: Switch text (border) to --body instead of --primary
3548
"&[data-secondary='true']": {
3649
color: "body.base",
3750
},
@@ -41,42 +54,39 @@ const baseStyle = defineStyle({
4154
textDecoration: "none",
4255
},
4356
},
57+
[ICON_SELECTOR]: {
58+
flexShrink: 0,
59+
},
4460
})
4561

4662
const variantSolid = defineStyle({
4763
color: "white",
4864
bg: "primary.action",
49-
borderColor: "transparent",
50-
_disabled: {
51-
bg: "disabled",
52-
color: "background.base",
53-
},
65+
borderColor: "transparent !important",
5466
_hover: {
55-
color: "white",
67+
color: "white !important",
5668
bg: "primary.actionHover",
57-
boxShadow: "buttonHover",
5869
},
5970
_active: {
60-
boxShadow: "none",
61-
},
62-
})
63-
64-
const variantOutline = defineStyle({
65-
_hover: {
66-
boxShadow: "buttonHover",
71+
bg: "primary.actionHover",
6772
},
68-
_active: {
69-
boxShadow: "none",
73+
_disabled: {
74+
bg: "disabled",
75+
color: "background.base",
7076
},
7177
})
7278

79+
const variantOutline = defineStyle({}) // "outline" is base styling above
80+
7381
const variantGhost = {
7482
borderColor: "transparent",
83+
_hover: { shadow: "none" },
7584
}
7685

7786
const variantLink = defineStyle({
7887
borderColor: "transparent",
79-
fontWeight: 700,
88+
// fontWeight: 700, // TODO: Not in DS; confirm then remove
89+
_hover: { shadow: "none" },
8090
textDecor: "underline",
8191
py: 0,
8292
px: 1,

src/@chakra-ui/components/ReactSelect.ts

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

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import { Modal } from "./Modal"
2222
import { Popover } from "./Popover"
2323
import { Progress } from "./Progress"
2424
import { Radio } from "./Radio"
25-
import { ReactSelect } from "./ReactSelect"
2625
import { Switch } from "./Switch"
2726
import { Table } from "./Table"
2827
import { Tabs } from "./Tabs"
@@ -52,7 +51,6 @@ export default {
5251
Popover,
5352
Progress,
5453
Radio,
55-
ReactSelect,
5654
Spinner: spinnerDefaultTheme,
5755
Switch,
5856
Table,

src/@chakra-ui/foundations/shadows.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ const shadows = {
2020
gridBlueBowShadow: "8px 8px 0px 0px var(--eth-colors-gridBlue)",
2121

2222
// * Part of new DS
23-
// TODO: From current theme. Deprecate for 'buttonHover'
24-
primary: "4px 4px 0px 0px var(--eth-colors-primary-light)",
23+
// TODO: Deprecate buttonHover when all buttons migrated to tailwind
2524
buttonHover: "4px 4px 0 0 var(--eth-colors-primary-lowContrast)",
2625
tooltip: "0 0 16px var(--eth-colors-tooltipShadow)",
2726
}

src/@chakra-ui/semanticTokens.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const semanticTokens = {
4040
base: { _light: "purple.600", _dark: "purple.400" },
4141
highContrast: { _light: "purple.800", _dark: "purple.200" },
4242
lowContrast: { _light: "purple.100", _dark: "purple.900" },
43-
hover: { _light: "purple.500", _dark: "purple.500" },
43+
hover: { _light: "purple.500", _dark: "purple.300" },
4444
visited: { _light: "purple.700", _dark: "purple.300" },
4545
action: { _light: "purple.600", _dark: "purple.600" },
4646
actionHover: { _light: "purple.500", _dark: "purple.500" },
@@ -55,11 +55,9 @@ const semanticTokens = {
5555
base: { _light: "gray.800", _dark: "gray.100" },
5656
medium: { _light: "gray.500", _dark: "gray.400" },
5757
light: { _light: "gray.200", _dark: "gray.600" },
58-
// ! Deprecating body.inverted
59-
inverted: { _light: "gray.100", _dark: "gray.800" },
6058
},
6159
background: {
62-
base: { _light: "white", _dark: "gray.950" },
60+
base: { _light: "white", _dark: "black" },
6361
highlight: { _light: "gray.100", _dark: "gray.900" },
6462
},
6563
disabled: { _light: "gray.400", _dark: "gray.500" },

0 commit comments

Comments
 (0)