Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: replace usage of borderRadius with token #235

Merged
merged 2 commits into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion react/src/Calendar/CalendarBase/CalendarHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const MonthYearSelect = ({ children, ...props }: MonthYearSelectProps) => {
// Prevents any parent form control from applying error styles to this select.
isInvalid={false}
variant="flushed"
borderRadius="4px"
borderRadius="base"
color="base.content.strong"
textStyle="subhead-1"
flexBasis="fit-content"
Expand Down
4 changes: 2 additions & 2 deletions react/src/Calendar/CalendarBase/DayOfMonth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ export const DayOfMonth = forwardRef<DayOfMonthProps, 'button'>(
if (isInRange) {
const returnStyles: SystemStyleObject = {}
if (isLastDayOfMonth(date) || isSaturday(date)) {
returnStyles.borderEndRadius = '4px'
returnStyles.borderEndRadius = 'base'
}
if (isFirstDayOfMonth(date) || isSunday(date)) {
returnStyles.borderStartRadius = '4px'
returnStyles.borderStartRadius = 'base'
}
return { bg: selectedBgColor, ...returnStyles }
}
Expand Down
2 changes: 1 addition & 1 deletion react/src/DatePicker/components/DatePickerContentBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const DatePickerContentBase = ({

return (
<Portal>
<PopoverContent borderRadius="4px" w="unset" maxW="100vw" bg="white">
<PopoverContent borderRadius="base" w="unset" maxW="100vw" bg="white">
<ReactFocusLock>
<PopoverHeader
h="3.5rem"
Expand Down
4 changes: 2 additions & 2 deletions react/src/theme/components/Attachment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const baseStyle = definePartsStyle({
transitionDuration: 'normal',
},
fileInfoContainer: {
borderRadius: '4px',
borderRadius: 'base',
border: '1px solid',
borderColor: 'base.divider.medium',
bg: 'interaction.main-subtle.default',
Expand Down Expand Up @@ -130,7 +130,7 @@ const variantOutline = definePartsStyle((props) => {
justifyContent: 'center',
cursor: 'pointer',
border: '1px dashed',
borderRadius: '4px',
borderRadius: 'base',
outline: 'none',
_invalid: {
// Remove extra 1px of outline.
Expand Down
2 changes: 1 addition & 1 deletion react/src/theme/components/Badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const sizes: Record<string, SystemStyleObject> = {
md: {
py: '0.25rem',
px: '0.5rem',
borderRadius: '4px',
borderRadius: 'base',
},
}

Expand Down
4 changes: 2 additions & 2 deletions react/src/theme/components/Button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ const variantInputAttached = defineStyle((props) => {
color: 'interaction.support.disabled-content',
borderColor: 'base.divider.strong',
borderStartRadius: 0,
borderEndRadius: '2px',
borderEndRadius: 'sm',
_hover: {
bg: 'interaction.muted.main.hover',
_disabled: {
Expand Down Expand Up @@ -279,7 +279,7 @@ const variants = {
const baseStyle = defineStyle({
...textStyles['subhead-1'],
whiteSpace: 'pre-wrap',
borderRadius: '0.25rem',
borderRadius: 'base',
border: '1px solid',
flexShrink: 0,
// -1px for border
Expand Down
2 changes: 1 addition & 1 deletion react/src/theme/components/Checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const baseStyle = definePartsStyle((props) => {
// Control is the box containing the check icon
control: {
bg,
borderRadius: '0.25rem',
borderRadius: 'base',
border: '2px solid',
borderColor,
_checked: {
Expand Down
4 changes: 2 additions & 2 deletions react/src/theme/components/Input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ const outlineVariant = definePartsStyle((props) => {

return {
addon: {
borderRadius: '4px',
borderRadius: 'base',
},
field: {
borderRadius: '4px',
borderRadius: 'base',
bg: isPrefilled ? 'utility.input-prefilled' : 'utility.ui',
border: '1px solid',
borderColor: isSuccess
Expand Down
2 changes: 1 addition & 1 deletion react/src/theme/components/Link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const baseStyle = defineStyle((props) => {
color: 'interaction.links.inverse-hover',
},
},
borderRadius: '0.25rem',
borderRadius: 'base',
_hover: {
color: hoverColor,
_disabled: {
Expand Down
2 changes: 1 addition & 1 deletion react/src/theme/components/Modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const baseStyleOverlay = defineStyle({
const baseStyleDialog = defineStyle((props) => {
const { scrollBehavior } = props
return {
borderRadius: '0.25rem',
borderRadius: 'base',
my: '8rem',
maxH: scrollBehavior === 'inside' ? 'calc(100% - 16rem)' : undefined,
boxShadow: 'md',
Expand Down
2 changes: 1 addition & 1 deletion react/src/theme/components/MultiSelect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const variantOutline = definePartsStyle((props) => {
return {
...comboboxVariantOutline,
fieldwrapper: {
borderRadius: '4px',
borderRadius: 'base',
...inputFieldVariantOutline,
_focusWithin: inputFieldVariantOutline?._focusVisible,
...(isFocused ? inputFieldVariantOutline?._focusVisible : {}),
Expand Down
2 changes: 1 addition & 1 deletion react/src/theme/components/Pagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const { definePartsStyle, defineMultiStyleConfig } =
const baseButtonStyling = defineStyle({
h: 'auto',
border: 'none',
borderRadius: '0.25rem',
borderRadius: 'base',
cursor: 'pointer',
alignSelf: 'center',
color: 'base.content.default',
Expand Down
2 changes: 1 addition & 1 deletion react/src/theme/components/Tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const baseStyleContainer = defineStyle({
transitionProperty: 'common',
transitionDuration: 'normal',
_focusWithin: layerStyles.focusRing.default._focusVisible,
borderRadius: '4px',
borderRadius: 'base',
_disabled: {
bg: 'interaction.support.disabled',
color: 'interaction.support.disabled-content',
Expand Down
2 changes: 1 addition & 1 deletion react/src/theme/components/Tile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const baseStyle = definePartsStyle({
transitionProperty: 'common',
transitionDuration: 'normal',
color: 'base.content.strong',
borderRadius: '4px',
borderRadius: 'base',
padding: '1.5rem',
height: 'auto',
_hover: {
Expand Down
4 changes: 2 additions & 2 deletions react/src/theme/components/Toast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ const baseStyle = definePartsStyle({
position: 'absolute',
},
wrapper: {
borderRadius: '4px',
borderRadius: 'base',
boxSizing: 'border-box',
},
container: {
borderRadius: '4px',
borderRadius: 'base',
background: 'inherit',
},
close: {
Expand Down
2 changes: 1 addition & 1 deletion react/src/theme/components/Tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const baseStyle = defineStyle({
[$fg.variable]: 'colors.base.content.inverse',
px: '0.75rem',
py: '0.5rem',
borderRadius: '0.25rem',
borderRadius: 'base',
textAlign: 'left',
margin: '0.25rem',
maxWidth: '19.5rem',
Expand Down