Skip to content
Draft
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
10 changes: 5 additions & 5 deletions packages/@react-spectrum/s2/src/ActionButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export const btnStyles = style<
},
'--iconWidth': {
type: 'width',
value: fontRelative(20)
value: fontRelative(18)
},
'--badgePosition': {
type: 'width',
Expand Down Expand Up @@ -310,9 +310,9 @@ export const btnStyles = style<
const avatarSize: Record<NonNullable<ActionButtonStyleProps['size']>, number> = {
XS: 14,
S: 16,
M: 20,
L: 22,
XL: 26
M: 18,
L: 20,
XL: 22
} as const;

interface ActionButtonContextProps extends Partial<ActionButtonProps> {
Expand Down Expand Up @@ -402,7 +402,7 @@ export const ActionButton = forwardRef(function ActionButton(
{
render: centerBaseline({slot: 'icon', styles: style({gridArea: 'icon'})}),
styles: style({
size: fontRelative(20),
size: fontRelative(18),
marginStart: '--iconMargin',
visibility: {
isProgressVisible: 'hidden'
Expand Down
2 changes: 1 addition & 1 deletion packages/@react-spectrum/s2/src/Badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export const Badge = forwardRef(function Badge(props: BadgeProps, ref: DOMRef<HT
IconContext,
{
render: centerBaseline({slot: 'icon', styles: style({order: 0})}),
styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})
styles: style({size: fontRelative(18), marginStart: '--iconMargin', flexShrink: 0})
}
]
]}>
Expand Down
4 changes: 2 additions & 2 deletions packages/@react-spectrum/s2/src/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ export const Button = forwardRef(function Button(
{
render: centerBaseline({slot: 'icon', styles: style({order: 0})}),
styles: style({
size: fontRelative(20),
size: fontRelative(18),
marginStart: '--iconMargin',
flexShrink: 0,
visibility: {
Expand Down Expand Up @@ -593,7 +593,7 @@ export const LinkButton = forwardRef(function LinkButton(
{
render: centerBaseline({slot: 'icon', styles: style({order: 0})}),
styles: style({
size: fontRelative(20),
size: fontRelative(18),
marginStart: '--iconMargin',
flexShrink: 0
})
Expand Down
2 changes: 1 addition & 1 deletion packages/@react-spectrum/s2/src/DragPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export let iconCenterWrapper = style({

export let icon = style({
display: 'block',
size: fontRelative(20),
size: fontRelative(18),
marginEnd: 'text-to-visual',
'--iconPrimary': {
type: 'fill',
Expand Down
4 changes: 2 additions & 2 deletions packages/@react-spectrum/s2/src/Field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export const FieldGroup = forwardRef(function FieldGroup(
IconContext,
{
styles: style({
size: fontRelative(20),
size: fontRelative(18),
'--iconPrimary': {type: 'fill', value: 'currentColor'}
})
}
Expand Down Expand Up @@ -490,7 +490,7 @@ export function FieldErrorIcon(props: {isDisabled?: boolean}): ReactNode {
})
}),
styles: style({
size: fontRelative(20),
size: fontRelative(18),
marginStart: 'text-to-visual',
marginEnd: fontRelative(-2),
flexShrink: 0
Expand Down
2 changes: 1 addition & 1 deletion packages/@react-spectrum/s2/src/ListView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ const listView = style<GridListRenderProps & {isQuiet?: boolean; isDropTarget?:
type: 'width',
value: {
default: 'auto',
[hasTrailingIconRows]: fontRelative(20)
[hasTrailingIconRows]: fontRelative(18)
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion packages/@react-spectrum/s2/src/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ export let checkbox = style({

export let icon = style({
display: 'block',
size: fontRelative(20),
size: fontRelative(18),
// too small default icon size is wrong, it's like the icons are 1 tshirt size bigger than the rest of the component? check again after typography changes
// reminder, size of WF is applied via font size
marginEnd: 'text-to-visual',
Expand Down
2 changes: 1 addition & 1 deletion packages/@react-spectrum/s2/src/SearchField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export const SearchField = /*#__PURE__*/ forwardRef(function SearchField(
})
}),
styles: style({
size: fontRelative(20),
size: fontRelative(18),
marginStart: '--iconMargin'
})
}
Expand Down
4 changes: 2 additions & 2 deletions packages/@react-spectrum/s2/src/SideNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ const SideNavItemContentInner = props => {
IconContext,
{
render: centerBaseline({slot: 'icon', styles: treeIcon}),
styles: style({size: fontRelative(20), flexShrink: 0})
styles: style({size: fontRelative(18), flexShrink: 0})
}
],
[ActionButtonGroupContext, {styles: treeActions, isDisabled, size: 'S'}],
Expand Down Expand Up @@ -697,7 +697,7 @@ export const SideNavItemLink = (props: SideNavItemLinkProps): ReactNode => {
IconContext,
{
render: centerBaseline({slot: 'icon', styles: treeIcon}),
styles: style({size: fontRelative(20), flexShrink: 0})
styles: style({size: fontRelative(18), flexShrink: 0})
}
]
]}>
Expand Down
4 changes: 2 additions & 2 deletions packages/@react-spectrum/s2/src/TagGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ function TagWrapper({children, isDisabled, allowsRemoving, isInRealDOM, isEmphas
{
render: centerBaseline({slot: 'icon', styles: style({order: 0})}),
styles: style({
size: fontRelative(20),
size: fontRelative(18),
marginStart: '--iconMargin',
flexShrink: 0
})
Expand All @@ -647,7 +647,7 @@ function TagWrapper({children, isDisabled, allowsRemoving, isInRealDOM, isEmphas
ImageContext,
{
styles: style({
size: fontRelative(20),
size: fontRelative(18),
flexShrink: 0,
order: 0,
aspectRatio: 'square',
Expand Down
2 changes: 1 addition & 1 deletion packages/@react-spectrum/s2/src/ToggleButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export const ToggleButton = forwardRef(function ToggleButton(
IconContext,
{
render: centerBaseline({slot: 'icon', styles: style({order: 0})}),
styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})
styles: style({size: fontRelative(18), marginStart: '--iconMargin', flexShrink: 0})
}
]
]}>
Expand Down
2 changes: 1 addition & 1 deletion packages/@react-spectrum/s2/src/TreeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ export const TreeViewItemContent = (props: TreeViewItemContentProps): ReactNode
IconContext,
{
render: centerBaseline({slot: 'icon', styles: treeIcon}),
styles: style({size: fontRelative(20), flexShrink: 0})
styles: style({size: fontRelative(18), flexShrink: 0})
}
],
[ActionButtonGroupContext, {styles: treeActions, isDisabled}],
Expand Down
6 changes: 3 additions & 3 deletions packages/@react-spectrum/s2/style/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ export interface IconStyle {
const iconSizes = {
XS: 14,
S: 16,
M: 20,
L: 22,
XL: 26
M: 18,
L: 20,
XL: 22
} as const;

/**
Expand Down