Skip to content

Commit 5ba20d9

Browse files
author
Kubit
committed
Add new prop arias and icons to components
1 parent a243df6 commit 5ba20d9

File tree

6 files changed

+20
-11
lines changed

6 files changed

+20
-11
lines changed

src/assets/storybook/videos/videos.ts

Whitespace-only changes.

src/components/carousel/carouselStandAlone.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ const CarouselStandAloneComponent = (
161161
<PageControl
162162
arrowsControlVariant={pageControlArrowsControlVariant}
163163
currentPosition={currentPage}
164-
leftArrowControl={leftArrowControlPageControl}
164+
leftControl={leftArrowControlPageControl}
165165
pages={numPages}
166-
rightArrowControl={rightArrowControlPageControl}
166+
rightControl={rightArrowControlPageControl}
167167
variant={pageControlVariant}
168168
/>
169169
</PageControlContainerStyled>

src/components/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ export * from './tableV2';
8585
export * from './dataTable';
8686
export * from './video';
8787
export * from './progressBar';
88-
8988
export * from './virtualKeyboard';
9089

9190
/**
@@ -111,7 +110,6 @@ export * from './headerStructure';
111110
export * from './footer';
112111
export * from './portal';
113112
export * from './textCount';
114-
115113
export * from './operativeLayout';
116114
export * from './emptyState';
117115
export * from './loadingState';

src/components/link/linkAsButton/linkAsButtonStandAlone.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import React from 'react';
33
import { ButtonStyled } from '@/components/button/button.styled';
44
import { ButtonStandAloneStructure } from '@/components/button/buttonStandAlone';
55
import { Text } from '@/components/text/text';
6+
import { pickAriaProps } from '@/utils/aria/aria';
67

78
import { ButtonStateType } from '../../button/types/state';
89
import { TextDecorationType } from '../../text/types/decoration';
@@ -18,10 +19,12 @@ export const LinkAsButtonStandAloneComponent = (
1819
target,
1920
role,
2021
onClick,
22+
['aria-label']: ariaLabel,
2123
...props
2224
}: ILinkAsButtonStandAlone,
2325
ref: React.ForwardedRef<HTMLElement> | undefined
2426
): JSX.Element => {
27+
const ariaProps = pickAriaProps(props);
2528
return (
2629
// Apply button border radius to the link when focus-visible
2730
<LinkAsButtonWrapperStyled
@@ -33,7 +36,7 @@ export const LinkAsButtonStandAloneComponent = (
3336
>
3437
<Text
3538
ref={ref}
36-
aria-label={props['aria-label']}
39+
aria-label={ariaLabel}
3740
component={component}
3841
decoration={TextDecorationType.NONE}
3942
isDisabled={props.state === ButtonStateType.DISABLED}
@@ -50,7 +53,6 @@ export const LinkAsButtonStandAloneComponent = (
5053
$sizeStyles={props.sizeStyles}
5154
$state={props.state}
5255
$styles={props.styles}
53-
aria-label=""
5456
>
5557
<ButtonStandAloneStructure {...props}>{children}</ButtonStandAloneStructure>
5658
</ButtonStyled>

src/components/popover/popover.styled.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ export const PopoverStyled = styled.div<PopoverVariantStylesProps & PopoverProps
6767
props.align
6868
? alignProps(props.align, props.extraAlignGap)
6969
: alignProps(props[DeviceBreakpointsType.DESKTOP]?.align)};
70-
top: ${props => props.top};
71-
bottom: ${props => props.bottom};
72-
right: ${props => props.right};
73-
left: ${props => props.left};
7470
${({
7571
theme: {
7672
MEDIA_QUERIES: { onlyMobile, onlyTablet, onlyDesktop },
@@ -82,6 +78,11 @@ export const PopoverStyled = styled.div<PopoverVariantStylesProps & PopoverProps
8278
${getWidth(props)}
8379
}
8480
81+
top: ${props.top};
82+
bottom: ${props.bottom};
83+
right: ${props.right};
84+
left: ${props.left};
85+
8586
${onlyTablet} {
8687
position: ${!props[DeviceBreakpointsType.TABLET]
8788
? props.positionVariant
@@ -90,6 +91,10 @@ export const PopoverStyled = styled.div<PopoverVariantStylesProps & PopoverProps
9091
? alignProps(props.align, props.extraAlignGap)
9192
: alignProps(props[DeviceBreakpointsType.TABLET]?.align)};
9293
${getWidth(props)}
94+
top: ${props.top};
95+
bottom: ${props.bottom};
96+
right: ${props.right};
97+
left: ${props.left};
9398
z-index: ${props => props[DeviceBreakpointsType.TABLET]?.zIndex || zIndex || 'auto'};
9499
}
95100
@@ -99,6 +104,10 @@ export const PopoverStyled = styled.div<PopoverVariantStylesProps & PopoverProps
99104
: props[DeviceBreakpointsType.MOBILE]?.positionVariant};
100105
${alignProps(props[DeviceBreakpointsType.MOBILE]?.align)};
101106
${getWidth(props)}
107+
top: ${props.top};
108+
bottom: ${props.bottom};
109+
right: ${props.right};
110+
left: ${props.left};
102111
z-index: ${props => props[DeviceBreakpointsType.MOBILE]?.zIndex || zIndex || 'auto'};
103112
}
104113
`}

src/components/tooltip/tooltipStandAlone.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { useId } from '@/hooks/useId/useId';
77
import { DeviceBreakpointsType } from '../../types/breakpoints/breakpoints';
88
import { ROLES } from '../../types/role/role';
99
import { ElementOrIcon } from '../elementOrIcon/elementOrIcon';
10-
import { IconBasic as Icon } from '../icon/icon';
10+
import { IconHost as Icon } from '../icon/iconHost';
1111
import { PopoverControlled } from '../popover/popoverControlled';
1212
import { PopoverComponentType } from '../popover/types/component';
1313
import { PopoverPositionVariantType } from '../popover/types/positionVariant';

0 commit comments

Comments
 (0)