@granto-umbrella/umbrella-components 3.0.31 → 3.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/umbrella-components.es.js +11411 -11409
- package/dist/umbrella-components.umd.js +340 -340
- package/package.json +4 -5
- package/src/components/atoms/DatePickerInput/DatePicker.styles.ts +75 -75
- package/src/components/atoms/DatePickerInput/DatePickerInput.tsx +154 -154
- package/src/components/atoms/DropDownMenu/DropdownMenu.styles.tsx +106 -106
- package/src/components/atoms/ErrorMessage/ErrorMessage.styles.tsx +1 -1
- package/src/components/atoms/Footer/Footer.styles.tsx +1 -1
- package/src/components/atoms/GenericContainer/GenericContainer.styles.tsx +1 -1
- package/src/components/atoms/Input/Input.tsx +80 -80
- package/src/components/atoms/Input/Input.types.ts +21 -21
- package/src/components/atoms/Label/Label.styles.ts +16 -16
- package/src/components/atoms/Loading/Loading.styles.tsx +1 -1
- package/src/components/atoms/Loading/index.tsx +1 -1
- package/src/components/atoms/LogoContainer/LogoContainer.styles.tsx +1 -1
- package/src/components/atoms/ModalAviso/ModalAviso.styles.tsx +1 -1
- package/src/components/atoms/MultiSelect/index.tsx +1 -1
- package/src/components/atoms/RadioButton/RadioButton.types.ts +9 -9
- package/src/components/atoms/ResendLink/index.tsx +2 -1
- package/src/components/atoms/Select/Select.types.ts +19 -19
- package/src/components/atoms/Skeleton/Skeleton.styles.ts +32 -32
- package/src/components/atoms/Skeleton/Skeleton.tsx +43 -43
- package/src/components/atoms/Skeleton/Skeleton.types.ts +13 -13
- package/src/components/atoms/Subtitle/Subtitle.styles.tsx +21 -21
- package/src/components/atoms/Switch/Switch.styles.ts +59 -59
- package/src/components/atoms/Switch/Switch.types.ts +7 -7
- package/src/components/atoms/TabBar/TabBar.tsx +24 -24
- package/src/components/atoms/TabBar/TabBar.types.ts +11 -11
- package/src/components/atoms/TabBar/index.tsx +2 -2
- package/src/components/atoms/Text/Text.styles.tsx +18 -6
- package/src/components/atoms/Text/Text.tsx +9 -4
- package/src/components/atoms/Text/Text.types.ts +2 -1
- package/src/components/atoms/Textarea/Textarea.types.ts +7 -7
- package/src/components/atoms/Title/Title.styles.tsx +17 -17
- package/src/components/molecules/BannerAjuda/BannerAjuda.types.ts +5 -5
- package/src/components/molecules/ButtonGroup/ButtonGroup.tsx +27 -27
- package/src/components/molecules/CodeInputContainer/CodeInputContainer.tsx +32 -32
- package/src/components/molecules/HighlightsCard/HighlightsCard.tsx +1 -1
- package/src/components/molecules/InsuranceCard/InsuranceCard.styles.tsx +1 -1
- package/src/components/molecules/InsuranceCard/InsuranceCard.tsx +455 -455
- package/src/components/molecules/InsuranceCard/InsuranceCard.types.ts +41 -41
- package/src/components/molecules/ResultsChart/ResultsChart.styles.tsx +26 -26
- package/src/components/molecules/TimeLine/TimeLine.mapper.ts +69 -69
- package/src/components/molecules/TimeLine/TimeLine.styles.ts +154 -154
- package/src/components/molecules/TimeLine/TimeLine.tsx +96 -96
- package/src/components/molecules/TimeLine/TimeLine.types.ts +124 -124
- package/src/components/organisms/AlertDialog/AlertDialog.types.ts +14 -14
- package/src/components/organisms/Navbar/Navbar.styles.tsx +1 -1
- package/src/components/organisms/Navbar/Navbar.tsx +118 -118
- package/src/components/organisms/Navbar/Navbar.types.ts +34 -34
- package/src/components/organisms/TimelineModal/TimelineModal.styles.ts +49 -49
- package/src/components/organisms/TimelineModal/TimelineModal.tsx +49 -49
- package/src/index.ts +157 -157
- package/src/styles/tokens/colors.ts +296 -296
- package/src/styles/tokens/typography.ts +161 -161
- package/src/types/colors.types.ts +21 -21
- package/src/types/sizes.types.ts +4 -4
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SkeletonBlock, SkeletonWrap } from './Skeleton.styles';
|
|
3
|
-
import { SkeletonProps } from './Skeleton.types';
|
|
4
|
-
|
|
5
|
-
export const Skeleton: React.FC<SkeletonProps> = ({
|
|
6
|
-
width,
|
|
7
|
-
height,
|
|
8
|
-
radius,
|
|
9
|
-
count = 1,
|
|
10
|
-
variant = 'rect',
|
|
11
|
-
animated = true,
|
|
12
|
-
className,
|
|
13
|
-
style,
|
|
14
|
-
ariaLabel = 'Carregando conteúdo',
|
|
15
|
-
}) => {
|
|
16
|
-
const items = Array.from({ length: count });
|
|
17
|
-
return (
|
|
18
|
-
<SkeletonWrap
|
|
19
|
-
role="status"
|
|
20
|
-
aria-live="polite"
|
|
21
|
-
aria-busy="true"
|
|
22
|
-
aria-label={ariaLabel}
|
|
23
|
-
className={className}
|
|
24
|
-
>
|
|
25
|
-
{items.map((_, i) => (
|
|
26
|
-
<SkeletonBlock
|
|
27
|
-
key={i}
|
|
28
|
-
$variant={variant}
|
|
29
|
-
$animated={animated}
|
|
30
|
-
style={{
|
|
31
|
-
width: width ?? (variant === 'text' ? '100%' : undefined),
|
|
32
|
-
height:
|
|
33
|
-
height ??
|
|
34
|
-
(variant === 'text' ? '1em' : variant === 'circle' ? 40 : 16),
|
|
35
|
-
borderRadius:
|
|
36
|
-
variant === 'circle' ? '9999px' : radius != null ? radius : 8,
|
|
37
|
-
...style,
|
|
38
|
-
}}
|
|
39
|
-
/>
|
|
40
|
-
))}
|
|
41
|
-
</SkeletonWrap>
|
|
42
|
-
);
|
|
43
|
-
};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SkeletonBlock, SkeletonWrap } from './Skeleton.styles';
|
|
3
|
+
import { SkeletonProps } from './Skeleton.types';
|
|
4
|
+
|
|
5
|
+
export const Skeleton: React.FC<SkeletonProps> = ({
|
|
6
|
+
width,
|
|
7
|
+
height,
|
|
8
|
+
radius,
|
|
9
|
+
count = 1,
|
|
10
|
+
variant = 'rect',
|
|
11
|
+
animated = true,
|
|
12
|
+
className,
|
|
13
|
+
style,
|
|
14
|
+
ariaLabel = 'Carregando conteúdo',
|
|
15
|
+
}) => {
|
|
16
|
+
const items = Array.from({ length: count });
|
|
17
|
+
return (
|
|
18
|
+
<SkeletonWrap
|
|
19
|
+
role="status"
|
|
20
|
+
aria-live="polite"
|
|
21
|
+
aria-busy="true"
|
|
22
|
+
aria-label={ariaLabel}
|
|
23
|
+
className={className}
|
|
24
|
+
>
|
|
25
|
+
{items.map((_, i) => (
|
|
26
|
+
<SkeletonBlock
|
|
27
|
+
key={i}
|
|
28
|
+
$variant={variant}
|
|
29
|
+
$animated={animated}
|
|
30
|
+
style={{
|
|
31
|
+
width: width ?? (variant === 'text' ? '100%' : undefined),
|
|
32
|
+
height:
|
|
33
|
+
height ??
|
|
34
|
+
(variant === 'text' ? '1em' : variant === 'circle' ? 40 : 16),
|
|
35
|
+
borderRadius:
|
|
36
|
+
variant === 'circle' ? '9999px' : radius != null ? radius : 8,
|
|
37
|
+
...style,
|
|
38
|
+
}}
|
|
39
|
+
/>
|
|
40
|
+
))}
|
|
41
|
+
</SkeletonWrap>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export type SkeletonVariant = 'text' | 'rect' | 'circle';
|
|
2
|
-
|
|
3
|
-
export type SkeletonProps = {
|
|
4
|
-
width?: string | number;
|
|
5
|
-
height?: string | number;
|
|
6
|
-
radius?: number;
|
|
7
|
-
count?: number;
|
|
8
|
-
variant?: SkeletonVariant;
|
|
9
|
-
animated?: boolean;
|
|
10
|
-
className?: string;
|
|
11
|
-
style?: React.CSSProperties;
|
|
12
|
-
ariaLabel?: string;
|
|
13
|
-
};
|
|
1
|
+
export type SkeletonVariant = 'text' | 'rect' | 'circle';
|
|
2
|
+
|
|
3
|
+
export type SkeletonProps = {
|
|
4
|
+
width?: string | number;
|
|
5
|
+
height?: string | number;
|
|
6
|
+
radius?: number;
|
|
7
|
+
count?: number;
|
|
8
|
+
variant?: SkeletonVariant;
|
|
9
|
+
animated?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
ariaLabel?: string;
|
|
13
|
+
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import {
|
|
3
|
-
semanticSizes,
|
|
4
|
-
typographyTokens,
|
|
5
|
-
semanticColors,
|
|
6
|
-
} from '../../../styles/tokens';
|
|
7
|
-
|
|
8
|
-
export const Container = styled.div`
|
|
9
|
-
width: 100%;
|
|
10
|
-
color: ${semanticColors.neutral[700]};
|
|
11
|
-
text-align: center;
|
|
12
|
-
font-family: 'Mulish', sans-serif;
|
|
13
|
-
font-size: ${typographyTokens.fontSizes.bodyM};
|
|
14
|
-
font-weight: 400;
|
|
15
|
-
line-height: 125%;
|
|
16
|
-
|
|
17
|
-
margin-bottom: ${semanticSizes.global.padding.lg};
|
|
18
|
-
@media (max-width: 768px) {
|
|
19
|
-
font-size: ${typographyTokens.fontSizes.bodyS};
|
|
20
|
-
}
|
|
21
|
-
`;
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import {
|
|
3
|
+
semanticSizes,
|
|
4
|
+
typographyTokens,
|
|
5
|
+
semanticColors,
|
|
6
|
+
} from '../../../styles/tokens';
|
|
7
|
+
|
|
8
|
+
export const Container = styled.div`
|
|
9
|
+
width: 100%;
|
|
10
|
+
color: ${semanticColors.neutral[700]};
|
|
11
|
+
text-align: center;
|
|
12
|
+
font-family: 'Mulish', sans-serif;
|
|
13
|
+
font-size: ${typographyTokens.fontSizes.bodyM};
|
|
14
|
+
font-weight: 400;
|
|
15
|
+
line-height: 125%;
|
|
16
|
+
|
|
17
|
+
margin-bottom: ${semanticSizes.global.padding.lg};
|
|
18
|
+
@media (max-width: 768px) {
|
|
19
|
+
font-size: ${typographyTokens.fontSizes.bodyS};
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import {
|
|
3
|
-
semanticColors,
|
|
4
|
-
semanticSizes,
|
|
5
|
-
semanticRadius,
|
|
6
|
-
typographyTokens,
|
|
7
|
-
} from '../../../styles/tokens';
|
|
8
|
-
|
|
9
|
-
export const SwitchWrapper = styled.label`
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: row;
|
|
12
|
-
width: 100%;
|
|
13
|
-
align-items: center;
|
|
14
|
-
gap: ${semanticSizes.global.gap.sm};
|
|
15
|
-
cursor: pointer;
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
export const SwitchInput = styled.input.attrs({ type: 'checkbox' })`
|
|
19
|
-
appearance: none;
|
|
20
|
-
width: ${semanticSizes.global.spacings.lg};
|
|
21
|
-
height: ${semanticSizes.global.padding.xl};
|
|
22
|
-
background: ${semanticColors.neutral[300]};
|
|
23
|
-
border-radius: ${semanticRadius.global.radius.full};
|
|
24
|
-
position: relative;
|
|
25
|
-
transition: background 0.3s ease-out;
|
|
26
|
-
cursor: pointer;
|
|
27
|
-
|
|
28
|
-
&:checked {
|
|
29
|
-
background: ${semanticColors.branding.surface.enabled};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&::after {
|
|
33
|
-
content: '';
|
|
34
|
-
width: ${semanticSizes.global.padding.md}; // 12px circle
|
|
35
|
-
height: ${semanticSizes.global.padding.md}; // 12px circle
|
|
36
|
-
background: ${semanticColors.base.background};
|
|
37
|
-
border-radius: 50%;
|
|
38
|
-
position: absolute;
|
|
39
|
-
top: 50%;
|
|
40
|
-
left: 4px;
|
|
41
|
-
transform: translateY(-50%);
|
|
42
|
-
transition: all 0.3s ease-out;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&:checked::after {
|
|
46
|
-
left: calc(100% - ${semanticSizes.global.padding.md} - 4px);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&:disabled {
|
|
50
|
-
opacity: 0.5;
|
|
51
|
-
cursor: not-allowed;
|
|
52
|
-
}
|
|
53
|
-
`;
|
|
54
|
-
|
|
55
|
-
export const SwitchLabel = styled.span`
|
|
56
|
-
font-size: ${typographyTokens.fontSizes.labelM};
|
|
57
|
-
color: ${semanticColors.base.text};
|
|
58
|
-
user-select: none;
|
|
59
|
-
`;
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import {
|
|
3
|
+
semanticColors,
|
|
4
|
+
semanticSizes,
|
|
5
|
+
semanticRadius,
|
|
6
|
+
typographyTokens,
|
|
7
|
+
} from '../../../styles/tokens';
|
|
8
|
+
|
|
9
|
+
export const SwitchWrapper = styled.label`
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: row;
|
|
12
|
+
width: 100%;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: ${semanticSizes.global.gap.sm};
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
export const SwitchInput = styled.input.attrs({ type: 'checkbox' })`
|
|
19
|
+
appearance: none;
|
|
20
|
+
width: ${semanticSizes.global.spacings.lg};
|
|
21
|
+
height: ${semanticSizes.global.padding.xl};
|
|
22
|
+
background: ${semanticColors.neutral[300]};
|
|
23
|
+
border-radius: ${semanticRadius.global.radius.full};
|
|
24
|
+
position: relative;
|
|
25
|
+
transition: background 0.3s ease-out;
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
|
|
28
|
+
&:checked {
|
|
29
|
+
background: ${semanticColors.branding.surface.enabled};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&::after {
|
|
33
|
+
content: '';
|
|
34
|
+
width: ${semanticSizes.global.padding.md}; // 12px circle
|
|
35
|
+
height: ${semanticSizes.global.padding.md}; // 12px circle
|
|
36
|
+
background: ${semanticColors.base.background};
|
|
37
|
+
border-radius: 50%;
|
|
38
|
+
position: absolute;
|
|
39
|
+
top: 50%;
|
|
40
|
+
left: 4px;
|
|
41
|
+
transform: translateY(-50%);
|
|
42
|
+
transition: all 0.3s ease-out;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:checked::after {
|
|
46
|
+
left: calc(100% - ${semanticSizes.global.padding.md} - 4px);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:disabled {
|
|
50
|
+
opacity: 0.5;
|
|
51
|
+
cursor: not-allowed;
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
54
|
+
|
|
55
|
+
export const SwitchLabel = styled.span`
|
|
56
|
+
font-size: ${typographyTokens.fontSizes.labelM};
|
|
57
|
+
color: ${semanticColors.base.text};
|
|
58
|
+
user-select: none;
|
|
59
|
+
`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export interface SwitchProps {
|
|
2
|
-
checked: boolean;
|
|
3
|
-
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
4
|
-
label?: string;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
testId?: string;
|
|
7
|
-
}
|
|
1
|
+
export interface SwitchProps {
|
|
2
|
+
checked: boolean;
|
|
3
|
+
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
4
|
+
label?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
testId?: string;
|
|
7
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Count, Tab, Wrapper } from './TabBar.styles';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export const
|
|
6
|
-
items,
|
|
7
|
-
activeIndex,
|
|
8
|
-
onChange,
|
|
9
|
-
}) => (
|
|
10
|
-
<Wrapper>
|
|
11
|
-
{items.map((item, idx) => (
|
|
12
|
-
<Tab
|
|
13
|
-
key={idx}
|
|
14
|
-
$active={Boolean(idx === activeIndex)}
|
|
15
|
-
onClick={() => onChange(idx)}
|
|
16
|
-
data-testid={item.testId}
|
|
17
|
-
id={item.testId}
|
|
18
|
-
>
|
|
19
|
-
<span>{item.title}</span>
|
|
20
|
-
{typeof item.quantity === 'number' && <Count>({item.quantity})</Count>}
|
|
21
|
-
</Tab>
|
|
22
|
-
))}
|
|
23
|
-
</Wrapper>
|
|
24
|
-
);
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Count, Tab, Wrapper } from './TabBar.styles';
|
|
3
|
+
import { TabBarProps } from './TabBar.types';
|
|
4
|
+
|
|
5
|
+
export const TabBar: React.FC<TabBarProps> = ({
|
|
6
|
+
items,
|
|
7
|
+
activeIndex,
|
|
8
|
+
onChange,
|
|
9
|
+
}) => (
|
|
10
|
+
<Wrapper>
|
|
11
|
+
{items.map((item, idx) => (
|
|
12
|
+
<Tab
|
|
13
|
+
key={idx}
|
|
14
|
+
$active={Boolean(idx === activeIndex)}
|
|
15
|
+
onClick={() => onChange(idx)}
|
|
16
|
+
data-testid={item.testId}
|
|
17
|
+
id={item.testId}
|
|
18
|
+
>
|
|
19
|
+
<span>{item.title}</span>
|
|
20
|
+
{typeof item.quantity === 'number' && <Count>({item.quantity})</Count>}
|
|
21
|
+
</Tab>
|
|
22
|
+
))}
|
|
23
|
+
</Wrapper>
|
|
24
|
+
);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export interface TabItem {
|
|
2
|
-
title: string;
|
|
3
|
-
quantity?: number;
|
|
4
|
-
testId?: string;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface
|
|
8
|
-
items: TabItem[];
|
|
9
|
-
activeIndex: number;
|
|
10
|
-
onChange: (newIndex: number) => void;
|
|
11
|
-
}
|
|
1
|
+
export interface TabItem {
|
|
2
|
+
title: string;
|
|
3
|
+
quantity?: number;
|
|
4
|
+
testId?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface TabBarProps {
|
|
8
|
+
items: TabItem[];
|
|
9
|
+
activeIndex: number;
|
|
10
|
+
onChange: (newIndex: number) => void;
|
|
11
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type {
|
|
1
|
+
export { TabBar } from './TabBar';
|
|
2
|
+
export type { TabBarProps, TabItem } from './TabBar.types';
|
|
@@ -8,16 +8,28 @@ export const StyledText = styled.p<{
|
|
|
8
8
|
$size: string;
|
|
9
9
|
$weight: string;
|
|
10
10
|
$color: string;
|
|
11
|
+
$variant?: string;
|
|
11
12
|
}>`
|
|
12
|
-
display: flex;
|
|
13
|
-
width: 100%;
|
|
14
13
|
font-size: ${({ $size }) =>
|
|
15
14
|
$size === 'lg'
|
|
16
15
|
? typographyTokens.fontSizes.bodyL
|
|
17
16
|
: $size === 'md'
|
|
18
17
|
? typographyTokens.fontSizes.bodyM
|
|
19
18
|
: typographyTokens.fontSizes.bodyS};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
font-weight: ${({ $weight }) => ($weight === 'bold' ? typographyTokens.fontWeights.bold : typographyTokens.fontWeights.regular)};
|
|
20
|
+
color: ${({ $color, $variant }) => {
|
|
21
|
+
if ($variant) {
|
|
22
|
+
switch ($variant) {
|
|
23
|
+
case 'error':
|
|
24
|
+
return semanticColors.danger.text.enabled;
|
|
25
|
+
case 'success':
|
|
26
|
+
return semanticColors.success.text.feedback.accent;
|
|
27
|
+
case 'warning':
|
|
28
|
+
return semanticColors.warning.text.feedback.strong;
|
|
29
|
+
default:
|
|
30
|
+
return $color;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return $color || semanticColors.base.text;
|
|
34
|
+
}};
|
|
35
|
+
`;
|
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { StyledText } from "./Text.styles";
|
|
3
|
-
|
|
4
3
|
import { TextProps } from "./Text.types";
|
|
4
|
+
import { semanticColors } from "../../../styles/tokens";
|
|
5
5
|
|
|
6
6
|
const Text: React.FC<TextProps> = ({
|
|
7
7
|
children,
|
|
8
8
|
size = "md",
|
|
9
9
|
weight = "normal",
|
|
10
|
-
color
|
|
10
|
+
color,
|
|
11
11
|
testId,
|
|
12
|
+
variant,
|
|
12
13
|
}) => {
|
|
14
|
+
// Define a cor padrão se não for fornecida
|
|
15
|
+
const defaultColor = color || semanticColors.base.text;
|
|
16
|
+
|
|
13
17
|
return (
|
|
14
18
|
<StyledText
|
|
15
19
|
data-testid={testId}
|
|
16
20
|
id={testId}
|
|
17
21
|
$size={size}
|
|
18
22
|
$weight={weight}
|
|
19
|
-
$color={
|
|
23
|
+
$color={defaultColor}
|
|
24
|
+
$variant={variant}
|
|
20
25
|
>
|
|
21
26
|
{children}
|
|
22
27
|
</StyledText>
|
|
23
28
|
);
|
|
24
29
|
};
|
|
25
30
|
|
|
26
|
-
export default Text;
|
|
31
|
+
export default Text;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export interface TextareaProps
|
|
2
|
-
extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
3
|
-
label?: string;
|
|
4
|
-
supportingText?: string;
|
|
5
|
-
testId?: string;
|
|
6
|
-
info?: string;
|
|
7
|
-
}
|
|
1
|
+
export interface TextareaProps
|
|
2
|
+
extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
3
|
+
label?: string;
|
|
4
|
+
supportingText?: string;
|
|
5
|
+
testId?: string;
|
|
6
|
+
info?: string;
|
|
7
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import { typographyTokens, semanticColors } from '../../../styles/tokens';
|
|
3
|
-
|
|
4
|
-
export const Container = styled.div`
|
|
5
|
-
width: 100%;
|
|
6
|
-
font-size: ${typographyTokens.fontSizes.displayM};
|
|
7
|
-
color: ${semanticColors.base.text};
|
|
8
|
-
font-weight: 600;
|
|
9
|
-
line-height: 120%;
|
|
10
|
-
letter-spacing: -0.64px;
|
|
11
|
-
text-align: center;
|
|
12
|
-
|
|
13
|
-
/* Media Query (padrão) */
|
|
14
|
-
@media (max-width: 768px) {
|
|
15
|
-
font-size: ${typographyTokens.fontSizes.displayL};
|
|
16
|
-
}
|
|
17
|
-
`;
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { typographyTokens, semanticColors } from '../../../styles/tokens';
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
width: 100%;
|
|
6
|
+
font-size: ${typographyTokens.fontSizes.displayM};
|
|
7
|
+
color: ${semanticColors.base.text};
|
|
8
|
+
font-weight: 600;
|
|
9
|
+
line-height: 120%;
|
|
10
|
+
letter-spacing: -0.64px;
|
|
11
|
+
text-align: center;
|
|
12
|
+
|
|
13
|
+
/* Media Query (padrão) */
|
|
14
|
+
@media (max-width: 768px) {
|
|
15
|
+
font-size: ${typographyTokens.fontSizes.displayL};
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export interface BannerAjudaProps {
|
|
2
|
-
onClick: () => void;
|
|
3
|
-
imageSrc?: string;
|
|
4
|
-
alt?: string;
|
|
5
|
-
}
|
|
1
|
+
export interface BannerAjudaProps {
|
|
2
|
+
onClick: () => void;
|
|
3
|
+
imageSrc?: string;
|
|
4
|
+
alt?: string;
|
|
5
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ButtonGroupProps } from './ButtonGroup.types';
|
|
3
|
-
import Button from '../../atoms/Button';
|
|
4
|
-
import { ButtonGroupContainer } from './ButtonGroup.styles';
|
|
5
|
-
|
|
6
|
-
const ButtonGroup: React.FC<ButtonGroupProps> = ({
|
|
7
|
-
buttons,
|
|
8
|
-
orientation = 'horizontal',
|
|
9
|
-
}) => {
|
|
10
|
-
return (
|
|
11
|
-
<ButtonGroupContainer $orientation={orientation}>
|
|
12
|
-
{buttons.map((button, index) => (
|
|
13
|
-
<Button
|
|
14
|
-
key={index}
|
|
15
|
-
variant={button.variant}
|
|
16
|
-
onClick={button.onClick}
|
|
17
|
-
leftIcon={button.leftIcon}
|
|
18
|
-
rightIcon={button.rightIcon}
|
|
19
|
-
>
|
|
20
|
-
{button.label}
|
|
21
|
-
</Button>
|
|
22
|
-
))}
|
|
23
|
-
</ButtonGroupContainer>
|
|
24
|
-
);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export default ButtonGroup;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonGroupProps } from './ButtonGroup.types';
|
|
3
|
+
import Button from '../../atoms/Button';
|
|
4
|
+
import { ButtonGroupContainer } from './ButtonGroup.styles';
|
|
5
|
+
|
|
6
|
+
const ButtonGroup: React.FC<ButtonGroupProps> = ({
|
|
7
|
+
buttons,
|
|
8
|
+
orientation = 'horizontal',
|
|
9
|
+
}) => {
|
|
10
|
+
return (
|
|
11
|
+
<ButtonGroupContainer $orientation={orientation}>
|
|
12
|
+
{buttons.map((button, index) => (
|
|
13
|
+
<Button
|
|
14
|
+
key={index}
|
|
15
|
+
variant={button.variant}
|
|
16
|
+
onClick={button.onClick}
|
|
17
|
+
leftIcon={button.leftIcon}
|
|
18
|
+
rightIcon={button.rightIcon}
|
|
19
|
+
>
|
|
20
|
+
{button.label}
|
|
21
|
+
</Button>
|
|
22
|
+
))}
|
|
23
|
+
</ButtonGroupContainer>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default ButtonGroup;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StyledCodeInputContainer } from './CodeInputContainer.styles';
|
|
3
|
-
import { CodeInputContainerProps } from './CodeInputContainer.types';
|
|
4
|
-
import CodeInput from '../../atoms/CodeInput';
|
|
5
|
-
|
|
6
|
-
const CodeInputContainer: React.FC<CodeInputContainerProps> = ({
|
|
7
|
-
code,
|
|
8
|
-
inputRefs,
|
|
9
|
-
handleChange,
|
|
10
|
-
handleKeyDown,
|
|
11
|
-
handlePaste,
|
|
12
|
-
testId,
|
|
13
|
-
}) => {
|
|
14
|
-
return (
|
|
15
|
-
<StyledCodeInputContainer data-testid={testId} id={testId}>
|
|
16
|
-
{code.map((value, index) => (
|
|
17
|
-
<CodeInput
|
|
18
|
-
key={index}
|
|
19
|
-
ref={(el) => (inputRefs.current[index] = el)}
|
|
20
|
-
type="text"
|
|
21
|
-
maxLength={1}
|
|
22
|
-
value={value}
|
|
23
|
-
onChange={(e) => handleChange(e.target.value, index)}
|
|
24
|
-
onKeyDown={(e) => handleKeyDown(e, index)}
|
|
25
|
-
onPaste={handlePaste}
|
|
26
|
-
/>
|
|
27
|
-
))}
|
|
28
|
-
</StyledCodeInputContainer>
|
|
29
|
-
);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export { CodeInputContainer };
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyledCodeInputContainer } from './CodeInputContainer.styles';
|
|
3
|
+
import { CodeInputContainerProps } from './CodeInputContainer.types';
|
|
4
|
+
import CodeInput from '../../atoms/CodeInput';
|
|
5
|
+
|
|
6
|
+
const CodeInputContainer: React.FC<CodeInputContainerProps> = ({
|
|
7
|
+
code,
|
|
8
|
+
inputRefs,
|
|
9
|
+
handleChange,
|
|
10
|
+
handleKeyDown,
|
|
11
|
+
handlePaste,
|
|
12
|
+
testId,
|
|
13
|
+
}) => {
|
|
14
|
+
return (
|
|
15
|
+
<StyledCodeInputContainer data-testid={testId} id={testId}>
|
|
16
|
+
{code.map((value, index) => (
|
|
17
|
+
<CodeInput
|
|
18
|
+
key={index}
|
|
19
|
+
ref={(el) => (inputRefs.current[index] = el)}
|
|
20
|
+
type="text"
|
|
21
|
+
maxLength={1}
|
|
22
|
+
value={value}
|
|
23
|
+
onChange={(e) => handleChange(e.target.value, index)}
|
|
24
|
+
onKeyDown={(e) => handleKeyDown(e, index)}
|
|
25
|
+
onPaste={handlePaste}
|
|
26
|
+
/>
|
|
27
|
+
))}
|
|
28
|
+
</StyledCodeInputContainer>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { CodeInputContainer };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Card, CardWrapper, IconWrapper, CardContent } from "./HighlightsCard.styles";
|
|
3
3
|
import { HighlightsCardProps } from "./HighlightsCard.types";
|
|
4
|
-
import
|
|
4
|
+
import Icon from "../../atoms/Icon";
|
|
5
5
|
|
|
6
6
|
const HighlightsCard: React.FC<HighlightsCardProps> = ({ items }) => {
|
|
7
7
|
return (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable react-refresh/only-export-components */
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import { semanticColors } from
|
|
3
|
+
import { semanticColors } from "@/styles/tokens";
|
|
4
4
|
import { StatusVariant } from './InsuranceCard.types';
|
|
5
5
|
|
|
6
6
|
export const PageContainer = styled.div`
|