-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10567 from ethereum/dev
Release candidate v7.15.0
- Loading branch information
Showing
346 changed files
with
18,539 additions
and
5,372 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "ethereum-org-website", | ||
"version": "7.14.2", | ||
"version": "7.15.0", | ||
"description": "Website of ethereum.org", | ||
"main": "index.js", | ||
"repository": "[email protected]:ethereum/ethereum-org-website.git", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,45 @@ | ||
import { createMultiStyleConfigHelpers, defineStyle } from "@chakra-ui/react" | ||
import { checkboxAnatomy } from "@chakra-ui/anatomy" | ||
import { checkboxDefaultTheme, defineMergeStyles } from "./components.utils" | ||
import { | ||
checkboxDefaultTheme, | ||
commonInputTriggerStyles, | ||
defineMergeStyles, | ||
} from "./components.utils" | ||
|
||
const { baseStyle: defaultBaseStyle } = checkboxDefaultTheme | ||
const { sizes: defaultSizes } = checkboxDefaultTheme | ||
|
||
const { definePartsStyle, defineMultiStyleConfig } = | ||
createMultiStyleConfigHelpers(checkboxAnatomy.keys) | ||
|
||
const baseStyleControl = defineStyle((props) => | ||
defineMergeStyles(defaultBaseStyle?.(props).control, { | ||
bg: "background.base", | ||
_checked: { | ||
bg: "primary400", | ||
_hover: { | ||
bg: "primary400", | ||
borderColor: "primary600", | ||
}, | ||
borderColor: "black50", | ||
}, | ||
border: "1px", | ||
borderColor: "black50", | ||
borderRadius: "3px", | ||
transition: "all 150ms", | ||
_focusVisible: { | ||
boxShadow: "none", | ||
}, | ||
_hover: { | ||
boxShadow: "tableItemBoxShadow", | ||
border: "1px", | ||
borderStyle: "solid", | ||
borderColor: "primary600", | ||
transition: "transform 0.1s", | ||
transform: "scale(1.02)", | ||
}, | ||
}) | ||
const { commonContainerProps, commonControlProps, commonLabelProps } = | ||
commonInputTriggerStyles | ||
|
||
const checkboxMdSize = defaultSizes?.md | ||
|
||
const baseStyleControl = defineMergeStyles( | ||
checkboxMdSize?.control, | ||
commonControlProps, | ||
{ | ||
boxSize: "var(--checkbox-size)", // Comes from default theme | ||
borderRadius: "sm", | ||
} | ||
) | ||
|
||
const sizes = { | ||
md: defineStyle({ | ||
control: { | ||
h: "1.5rem", | ||
w: "1.5rem", | ||
}, | ||
icon: { | ||
fontSize: "md", | ||
}, | ||
}), | ||
} | ||
const baseStyleLabel = defineStyle({ ...commonLabelProps }) | ||
|
||
const baseStyleContainer = defineStyle({ ...commonContainerProps }) | ||
|
||
const baseStyleIcon = defineStyle({ | ||
boxSize: 2, | ||
}) | ||
|
||
const variantAlignTop = definePartsStyle({ | ||
control: { | ||
mt: "0.25rem", | ||
}, | ||
const baseStyle = definePartsStyle({ | ||
container: baseStyleContainer, | ||
control: baseStyleControl, | ||
label: baseStyleLabel, | ||
icon: baseStyleIcon, | ||
}) | ||
|
||
export const Checkbox = defineMultiStyleConfig({ | ||
baseStyle: definePartsStyle((props) => ({ | ||
...defaultBaseStyle?.(props), | ||
control: baseStyleControl(props), | ||
})), | ||
sizes, | ||
variants: { | ||
// TODO: remove this variant | ||
alignTop: variantAlignTop, | ||
}, | ||
defaultProps: { | ||
size: "md", | ||
}, | ||
baseStyle, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
import { inputAnatomy } from "@chakra-ui/anatomy" | ||
import { | ||
createMultiStyleConfigHelpers, | ||
defineStyle, | ||
} from "@chakra-ui/styled-system" | ||
import { defineMergeStyles, inputDefaultTheme } from "./components.utils" | ||
|
||
const { defineMultiStyleConfig, definePartsStyle } = | ||
createMultiStyleConfigHelpers(inputAnatomy.keys) | ||
|
||
const baseStyle = definePartsStyle((props) => { | ||
const { | ||
focusBorderColor: fc = "primaryHover", | ||
errorBorderColor: ec = "errorOutline", | ||
} = props | ||
|
||
return defineMergeStyles( | ||
inputDefaultTheme.baseStyle, | ||
inputDefaultTheme.variants?.outline(props), | ||
{ | ||
field: { | ||
borderColor: "currentColor", | ||
borderRadius: "base", | ||
outline: "3px solid transparent", | ||
lineHeight: 1, | ||
_placeholder: { | ||
color: "disabled", | ||
opacity: 1, | ||
}, | ||
_focusVisible: { | ||
outlineColor: fc, | ||
outlineOffset: "-1px", | ||
borderColor: "transparent", | ||
boxShadow: "none", | ||
}, | ||
_hover: null, // override default | ||
_groupHover: { | ||
borderColor: "primary.hover", | ||
}, | ||
_invalid: { | ||
borderColor: ec, | ||
boxShadow: "none", | ||
}, | ||
_disabled: { | ||
borderColor: "disabled", | ||
opacity: 1, | ||
}, | ||
"&:not(:disabled)": { | ||
_active: { | ||
bg: "background.highlight", | ||
borderColor: "primary.highContrast", | ||
}, | ||
}, | ||
}, | ||
element: { | ||
fontSize: "2xl", | ||
transitionProperty: "common", | ||
transitionDuration: "normal", | ||
_groupHover: { | ||
color: "primary.hover", | ||
}, | ||
_peerFocusVisible: { | ||
color: fc, | ||
_peerInvalid: { | ||
color: ec, | ||
}, | ||
_peerDisabled: { | ||
color: "disabled", | ||
}, | ||
}, | ||
_peerDisabled: { | ||
color: "disabled", | ||
}, | ||
"[data-peer]:not(:disabled):active ~ &": { | ||
color: "primary.dark", | ||
_dark: { | ||
color: "primary.highContrast", | ||
}, | ||
}, | ||
}, | ||
} | ||
) | ||
}) | ||
|
||
const size = { | ||
md: defineStyle({ | ||
h: 10.5, | ||
px: 2, | ||
}), | ||
sm: defineStyle({ | ||
h: 8, | ||
px: 1, | ||
}), | ||
} | ||
|
||
const sizes = { | ||
md: definePartsStyle({ | ||
field: size.md, | ||
element: size.md, | ||
}), | ||
sm: definePartsStyle({ | ||
field: { ...size.sm, fontSize: "sm" }, | ||
element: { | ||
...size.sm, | ||
fontSize: "xl", | ||
}, | ||
}), | ||
} | ||
|
||
export const Input = defineMultiStyleConfig({ | ||
baseStyle, | ||
sizes, | ||
defaultProps: { | ||
variant: "outline", | ||
size: "md", | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { | ||
createMultiStyleConfigHelpers, | ||
cssVar, | ||
defineStyle, | ||
} from "@chakra-ui/react" | ||
import { radioAnatomy } from "@chakra-ui/anatomy" | ||
import { | ||
commonInputTriggerStyles, | ||
defineMergeStyles, | ||
radioDefaultTheme, | ||
} from "./components.utils" | ||
|
||
const { defineMultiStyleConfig, definePartsStyle } = | ||
createMultiStyleConfigHelpers(radioAnatomy.keys) | ||
|
||
export const $radioDisableColor = cssVar("radio-disable-color") | ||
|
||
const { commonContainerProps, commonControlProps, commonLabelProps } = | ||
commonInputTriggerStyles | ||
|
||
const baseStyleContainer = defineStyle({ ...commonContainerProps }) | ||
|
||
const baseStyleControl = defineMergeStyles( | ||
radioDefaultTheme.baseStyle?.({} as never).control, | ||
commonControlProps, | ||
{ | ||
boxSize: 4, | ||
fontSize: "md", | ||
"*:hover > &": { | ||
outlineOffset: "-1px", | ||
}, | ||
_checked: { | ||
_before: { | ||
// Force half the size, as '50%' value not reliable. | ||
boxSize: 2, | ||
}, | ||
}, | ||
} | ||
) | ||
|
||
const baseStyleLabel = defineStyle({ ...commonLabelProps }) | ||
|
||
const baseStyle = definePartsStyle({ | ||
container: baseStyleContainer, | ||
control: baseStyleControl, | ||
label: baseStyleLabel, | ||
}) | ||
|
||
export const Radio = defineMultiStyleConfig({ | ||
baseStyle, | ||
}) |
Oops, something went wrong.