Skip to content

Commit

Permalink
chore: loreinas fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nkrantz committed Mar 14, 2023
1 parent cd3d613 commit 6c6ee9a
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 13 deletions.
5 changes: 2 additions & 3 deletions packages/paste-core/components/file-picker/src/FilePicker.tsx
Expand Up @@ -88,7 +88,7 @@ const FilePicker = React.forwardRef<HTMLInputElement, FilePickerProps>(
boxShadow="shadowBorder"
backgroundColor="colorBackgroundBody"
_focusSibling={{
borderRadius: 'borderRadius10',
borderRadius: 'borderRadius30',
padding: 'space20',
boxShadow: 'shadowFocus',
backgroundColor: 'colorBackgroundBody',
Expand All @@ -102,8 +102,7 @@ const FilePicker = React.forwardRef<HTMLInputElement, FilePickerProps>(
<Text
id={textId}
as="span"
marginRight="space40"
paddingLeft="space30"
paddingX="space30"
color={getTextColor(disabled, fileDescription, i18nNoSelectionText)}
fontWeight={fileDescription === i18nNoSelectionText ? 'fontWeightNormal' : 'fontWeightMedium'}
fontStyle={fileDescription === i18nNoSelectionText ? 'italic' : 'none'}
Expand Down
Expand Up @@ -14,8 +14,8 @@ const PaginationArrowButton = React.forwardRef<HTMLButtonElement, PaginationArro
aria-hidden={disabled}
alignItems="center"
appearance="none"
background="none"
border="none"
backgroundColor="colorBackgroundBody"
borderColor="colorBorder"
borderRadius={visibleLabel ? 'borderRadius10' : 'borderRadiusCircle'}
color="colorText"
Expand All @@ -27,7 +27,14 @@ const PaginationArrowButton = React.forwardRef<HTMLButtonElement, PaginationArro
margin="space0"
outline="none"
opacity={disabled ? '0' : '1'}
padding="space0"
/*
* make a loom tomorrow
* issue: the current focus state uses 2 box shadows, one on the icon wrapper and one on the arrow button
* on button focus, the inner gray box shadow is too close to the outer blue box shadow and it doesn't accurately resemble the shadowFocusShadowBorder token
* adding 1px padding to the button fixes it... but is janky
* semi-related: having enough padding on the button on background colors
*/
padding="1px"
position="relative"
textDecoration="none"
transition="border-color 100ms ease-in, box-shadow 100ms ease-in, color 100ms ease-in, opacity 150ms ease-in, visibility 150ms ease-in"
Expand Down
Expand Up @@ -14,8 +14,8 @@ const PaginationArrowIconWrapper: React.FC<React.PropsWithChildren<PaginationArr
<Box
element={element}
alignItems="center"
backgroundColor={isHovered || isFocused ? 'colorBackgroundPrimaryWeakest' : 'none'}
boxShadow="shadowBorderWeak"
backgroundColor="colorBackgroundBody"
boxShadow={isHovered && !isFocused ? 'shadowBorderPrimary' : 'shadowBorderWeak'}
borderRadius="borderRadiusCircle"
display="flex"
height="sizeSquare80"
Expand Down
Expand Up @@ -22,7 +22,13 @@ const PaginationBackArrow = React.forwardRef<HTMLButtonElement, PaginationArrowP
element={`${element}_BUTTON`}
>
<PaginationArrowIconWrapper isFocused={isFocused} isHovered={isHovered} element={`${element}_ICON_WRAPPER`}>
<ArrowBackIcon decorative={false} display="block" title={label} element={`${element}_ICON`} />
<ArrowBackIcon
decorative={false}
color={isHovered ? 'colorTextPrimary' : 'colorText'}
display="block"
title={label}
element={`${element}_ICON`}
/>
</PaginationArrowIconWrapper>
{visibleLabel ? (
<Text
Expand Down
Expand Up @@ -34,7 +34,13 @@ const PaginationForwardArrow = React.forwardRef<HTMLButtonElement, PaginationArr
</Text>
) : null}
<PaginationArrowIconWrapper isFocused={isFocused} isHovered={isHovered} element={`${element}_ICON_WRAPPER`}>
<ArrowForwardIcon decorative={false} display="block" title={label} element={`${element}_ICON`} />
<ArrowForwardIcon
decorative={false}
color={isHovered ? 'colorTextPrimary' : 'colorText'}
display="block"
title={label}
element={`${element}_ICON`}
/>
</PaginationArrowIconWrapper>
</PaginationArrowButton>
);
Expand Down
Expand Up @@ -13,8 +13,6 @@ const PaginationLabel = React.forwardRef<HTMLDivElement, PaginationLabelProps>(
element={element}
as="div"
color="colorTextWeak"
paddingBottom="space20"
paddingTop="space20"
textAlign="center"
fontWeight="fontWeightNormal"
>
Expand Down
Expand Up @@ -45,14 +45,15 @@ const PaginationNumber = React.forwardRef<HTMLButtonElement, PaginationNumberPro
backgroundColor: 'colorBackgroundPrimaryWeakest',
borderColor: isCurrent ? 'colorBorderPrimaryStronger' : 'transparent',
boxShadow: isCurrent ? 'none' : 'shadowBorderPrimaryStronger',
color: isCurrent ? 'colorTextLinkStronger' : 'colorTextLink',
color: 'colorTextLinkStronger',
cursor: 'pointer',
textDecoration: 'none',
}}
_focus={{
boxShadow: 'shadowFocus',
borderColor: 'transparent',
textDecoration: 'none',
color: 'colorTextLink',
}}
_active={{textDecoration: 'none'}}
>
Expand Down
Expand Up @@ -26,6 +26,7 @@ const PaginationNumbers = React.forwardRef<HTMLUListElement, PaginationNumbersPr
justifyContent="center"
paddingLeft="space40"
paddingRight="space40"
paddingBottom="space30"
width="100%"
>
{validChildren.map((child, index) => {
Expand Down
Expand Up @@ -284,7 +284,7 @@ export const ArrowAsAnchorLabels = (): React.ReactNode => {
return <ArrowAsAnchorLabelsExample />;
};

ArrowAsAnchorLabels.storyName = 'Arrows as anchors with visbile labels';
ArrowAsAnchorLabels.storyName = 'Arrows as anchors with visible labels';

export const ArrowsPageLabel = (): React.ReactNode => {
return <ArrowsPageLabelExample />;
Expand Down

0 comments on commit 6c6ee9a

Please sign in to comment.