Skip to content

Commit

Permalink
Merge branch 'main' into gj-splitbutton-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gjones authored Sep 13, 2023
2 parents 117eb9c + 730541d commit be5d52d
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/components/Accordion/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const Accordion = ({
<Icon
name="chevron-right"
size={iconSize || size}
aria-label="accordion icon"
/>
</AccordionIconWrapper>
{icon ? (
Expand Down
6 changes: 5 additions & 1 deletion src/components/Alert/Alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const Alert = ({
<StyledIcon
$size={size}
size="sm"
aria-hidden
name={stateIconMap[state]}
/>
</IconWrapper>
Expand All @@ -63,7 +64,10 @@ const Alert = ({
data-testid="click-alert-dismiss-button"
onClick={() => setIsVisible(false)}
>
<Icon name="cross" />
<Icon
name="cross"
aria-label="close"
/>
</DismissWrapper>
)}
</Wrapper>
Expand Down
1 change: 1 addition & 0 deletions src/components/Badge/Badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const Badge = ({
$state={state}
as={Icon}
onClick={onClose}
aria-label="close"
/>
)}
</Content>
Expand Down
3 changes: 3 additions & 0 deletions src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const Button = ({
{iconLeft && (
<ButtonIcon
name={iconLeft}
aria-hidden
size="sm"
/>
)}
Expand All @@ -48,6 +49,7 @@ export const Button = ({
{iconRight && (
<ButtonIcon
name={iconRight}
aria-hidden
size="sm"
/>
)}
Expand All @@ -56,6 +58,7 @@ export const Button = ({
<Icon
name="loading-animated"
data-testid="click-ui-loading-icon"
aria-label="loading"
/>
</LoadingIconWrapper>
)}
Expand Down
5 changes: 4 additions & 1 deletion src/components/CardPrimary/CardPrimary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ export const CardPrimary = ({
$size={size}
$disabled={disabled}
>
<Icon name={icon} />
<Icon
name={icon}
aria-hidden
/>
<Title type="h3">{title}</Title>
</Header>

Expand Down
1 change: 1 addition & 0 deletions src/components/CardSecondary/CardSecondary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export const CardSecondary = ({
<Icon
name={icon}
size="lg"
area-hidden
/>
<Title type="h3">{title}</Title>
</HeaderLeft>
Expand Down
2 changes: 2 additions & 0 deletions src/components/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ const SvgImage = ({ name, size, theme, ...props }: ImageType) => {
<SVGIcon
name={name as IconName}
size={size}
role="img"
aria-label={name}
{...props}
/>
);
Expand Down
5 changes: 5 additions & 0 deletions src/components/IconButton/IconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ export interface IconButtonProps extends HTMLAttributes<HTMLButtonElement> {

export const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(
({ type = "primary", icon, size, ...props }, ref) => {
const iconName = icon ? icon.toString() : "unknown icon";

return (
<Button
{...props}
$styleType={type}
$size={size}
ref={ref}
role="button"
aria-label={iconName}
>
<Icon
name={icon}
Expand All @@ -38,6 +42,7 @@ const Button = styled.button<{
border: ${theme.click.button.stroke} solid ${
theme.click.button.iconButton.color.primary.stroke.default
};
cursor: pointer;
padding: ${
$size
? `${theme.click.button.iconButton[$size].space.y} ${theme.click.button.iconButton[$size].space.x}`
Expand Down
1 change: 1 addition & 0 deletions src/components/Input/SearchField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export const SearchField = forwardRef<HTMLInputElement, SearchFieldProps>(
disabled={disabled}
onClick={clearInput}
$show={value.length > 0}
aria-label="clear input"
>
<Icon
name="cross"
Expand Down
1 change: 1 addition & 0 deletions src/components/Input/TextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export const TextField = forwardRef<HTMLInputElement, TextFieldProps>(
disabled={disabled}
onClick={clearInput}
$show={value.length > 0}
aria-label="clear input"
>
<Icon
name="cross"
Expand Down
2 changes: 2 additions & 0 deletions src/components/Logos/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ const Logo = ({ name, theme, size, ...props }: LogoProps) => {
<SvgImageElement
as={Component}
$size={size}
role="img"
aria-label={name}
{...props}
/>
);
Expand Down
2 changes: 1 addition & 1 deletion tokens/themes/light.json
Original file line number Diff line number Diff line change
Expand Up @@ -1708,7 +1708,7 @@
"type": "color"
},
"foreground": {
"value": "{palette.success.600}",
"value": "{palette.success.700}",
"type": "color"
}
},
Expand Down

0 comments on commit be5d52d

Please sign in to comment.