Skip to content

Commit 01b4523

Browse files
committed
Merge branch 'dev' into gradients
2 parents 757307d + df87cb8 commit 01b4523

Some content is hidden

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

63 files changed

+1401
-1378
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"

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" },

src/@chakra-ui/stories/Colors.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export const SemanticScheme: StoryObj = {
113113
] as const
114114
const deprecatedTokens: Record<(typeof tokenNames)[number], string[]> = {
115115
primary: ["light", "dark", "pressed"],
116-
body: ["inverted"],
116+
body: [],
117117
background: [],
118118
disabled: [],
119119
success: ["neutral", "outline"],

src/components/Banners/DismissableBanner/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { useEffect, useState } from "react"
2+
import { useTranslation } from "next-i18next"
23
import { MdClose } from "react-icons/md"
34

45
import { Button } from "@/components/ui/buttons/Button"
@@ -17,6 +18,7 @@ const DismissableBanner = ({
1718
storageKey,
1819
className,
1920
}: DismissableBannerProps) => {
21+
const { t } = useTranslation("common")
2022
const [show, setShow] = useState<boolean>(false)
2123

2224
useEffect(() => {
@@ -33,10 +35,10 @@ const DismissableBanner = ({
3335
<BannerNotification shouldShow={show} className={cn("gap-8", className)}>
3436
<Center className="ms-auto">{children}</Center>
3537
<Button
36-
className="ms-auto"
38+
className="ms-auto hover:shadow-none"
3739
onClick={onClose}
38-
aria-label="Close Banner"
39-
variant="ghost"
40+
aria-label={t("close")}
41+
size="sm"
4042
>
4143
<MdClose />
4244
</Button>

src/components/CentralizedExchanges/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Emoji from "@/components/Emoji"
99
import InlineLink from "@/components/Link"
1010
import OldHeading from "@/components/OldHeading"
1111
import Text from "@/components/OldText"
12-
import Select from "@/components/Select"
12+
import Select from "@/components/ui/Select"
1313

1414
import { getLocaleTimestamp } from "@/lib/utils/time"
1515

0 commit comments

Comments
 (0)