@granto-umbrella/umbrella-components 3.0.34 → 3.0.37
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/README.md +165 -27
- package/dist/umbrella-components.css +1 -1
- package/dist/umbrella-components.es.js +33627 -28792
- package/dist/umbrella-components.umd.js +1169 -1908
- package/package.json +136 -106
- package/src/assets.d.ts +19 -19
- package/src/components/atoms/Badge/Badge.styles.ts +88 -86
- package/src/components/atoms/Badge/Badge.tsx +42 -44
- package/src/components/atoms/Badge/Badge.types.ts +15 -15
- package/src/components/atoms/Breadcrumb/Breadcrumb.styles.ts +43 -43
- package/src/components/atoms/Breadcrumb/Breadcrumb.tsx +46 -48
- package/src/components/atoms/Breadcrumb/Breadcrumb.types.ts +12 -12
- package/src/components/atoms/Button/Button.styles.ts +279 -280
- package/src/components/atoms/Button/Button.tsx +76 -76
- package/src/components/atoms/Button/Button.types.ts +28 -28
- package/src/components/atoms/Button/index.ts +1 -1
- package/src/components/atoms/Checkbox/Checkbox.styles.ts +72 -72
- package/src/components/atoms/Checkbox/Checkbox.tsx +36 -36
- package/src/components/atoms/Checkbox/Checkbox.types.ts +14 -14
- package/src/components/atoms/Checkbox/CheckboxGroup.tsx +30 -30
- package/src/components/atoms/Checkbox/CheckboxSelectAll.tsx +32 -32
- package/src/components/atoms/CodeInput/CodeInput.styles.tsx +38 -39
- package/src/components/atoms/CodeInput/CodeInput.tsx +13 -19
- package/src/components/atoms/CodeInput/CodeInput.types.ts +3 -3
- package/src/components/atoms/CodeInput/index.tsx +1 -1
- package/src/components/atoms/DropDownMenu/DropdownMenu.tsx +48 -48
- package/src/components/atoms/DropDownMenu/DropdownMenu.types.ts +15 -15
- package/src/components/atoms/DropDownMenu/index.tsx +5 -2
- package/src/components/atoms/ErrorMessage/ErrorMessage.styles.tsx +28 -28
- package/src/components/atoms/ErrorMessage/ErrorMessage.tsx +12 -12
- package/src/components/atoms/ErrorMessage/ErrorMessage.types.ts +6 -6
- package/src/components/atoms/ErrorMessage/index.tsx +1 -1
- package/src/components/atoms/Footer/Footer.styles.tsx +22 -22
- package/src/components/atoms/Footer/Footer.tsx +9 -9
- package/src/components/atoms/Footer/Footer.types.tsx +5 -5
- package/src/components/atoms/Footer/index.tsx +1 -1
- package/src/components/atoms/GenericContainer/GenericContainer.styles.tsx +21 -21
- package/src/components/atoms/GenericContainer/GenericContainer.tsx +9 -9
- package/src/components/atoms/GenericContainer/GenericContainer.types.ts +5 -5
- package/src/components/atoms/GenericContainer/index.tsx +1 -1
- package/src/components/atoms/Icon/Icon.styles.ts +11 -11
- package/src/components/atoms/Icon/Icon.tsx +22 -22
- package/src/components/atoms/Icon/Icon.types.ts +6 -6
- package/src/components/atoms/Icon/index.ts +1 -1
- package/src/components/atoms/Input/Input.styles.ts +106 -101
- package/src/components/atoms/Input/index.ts +1 -1
- package/src/components/atoms/Label/Label.tsx +16 -16
- package/src/components/atoms/Loading/Loading.styles.tsx +25 -25
- package/src/components/atoms/Loading/Loading.tsx +8 -8
- package/src/components/atoms/LogoContainer/LogoContainer.Types.tsx +5 -5
- package/src/components/atoms/LogoContainer/LogoContainer.styles.tsx +11 -11
- package/src/components/atoms/LogoContainer/LogoContainer.tsx +11 -11
- package/src/components/atoms/LogoContainer/index.tsx +1 -1
- package/src/components/atoms/ModalAviso/ModalAviso.styles.tsx +56 -56
- package/src/components/atoms/ModalAviso/ModalAviso.tsx +43 -37
- package/src/components/atoms/ModalAviso/ModalAviso.types.ts +5 -5
- package/src/components/atoms/ModalAviso/index.tsx +1 -1
- package/src/components/atoms/MultiSelect/MultiSelect.styles.tsx +100 -92
- package/src/components/atoms/MultiSelect/MultiSelect.tsx +346 -346
- package/src/components/atoms/MultiSelect/MultiSelect.types.ts +38 -38
- package/src/components/atoms/Pill/Pill.styles.ts +46 -46
- package/src/components/atoms/Pill/Pill.tsx +35 -36
- package/src/components/atoms/Pill/Pill.types.ts +14 -18
- package/src/components/atoms/RadioButton/RadioButton.styles.ts +44 -43
- package/src/components/atoms/RadioButton/RadioButton.tsx +31 -31
- package/src/components/atoms/ResendLink/ResendLink.styles.tsx +19 -20
- package/src/components/atoms/ResendLink/ResendLink.tsx +21 -21
- package/src/components/atoms/ResendLink/ResendLink.types.ts +8 -9
- package/src/components/atoms/ResendLink/index.tsx +1 -2
- package/src/components/atoms/Select/Select.styles.ts +153 -149
- package/src/components/atoms/Select/Select.tsx +52 -43
- package/src/components/atoms/Select/index.tsx +1 -1
- package/src/components/atoms/Subtitle/Subtitle.tsx +7 -7
- package/src/components/atoms/Subtitle/Subtitle.types.ts +5 -5
- package/src/components/atoms/Subtitle/index.tsx +1 -1
- package/src/components/atoms/Switch/Switch.tsx +25 -25
- package/src/components/atoms/TabBar/TabBar.styles.tsx +64 -57
- package/src/components/atoms/TabBar/index.tsx +2 -2
- package/src/components/atoms/Text/Text.styles.tsx +35 -35
- package/src/components/atoms/Text/Text.tsx +32 -31
- package/src/components/atoms/Text/Text.types.ts +8 -8
- package/src/components/atoms/Text/index.ts +1 -1
- package/src/components/atoms/Textarea/Textarea.styles.ts +52 -52
- package/src/components/atoms/Textarea/Textarea.tsx +31 -31
- package/src/components/atoms/Title/Title.tsx +7 -7
- package/src/components/atoms/Title/Title.types.ts +5 -5
- package/src/components/atoms/Title/index.tsx +1 -1
- package/src/components/molecules/BannerAjuda/BannerAjuda.styles.tsx +9 -9
- package/src/components/molecules/BannerAjuda/BannerAjuda.tsx +18 -19
- package/src/components/molecules/BannerAjuda/index.tsx +1 -1
- package/src/components/molecules/ButtonGroup/ButtonGroup.styles.ts +10 -10
- package/src/components/molecules/ButtonGroup/ButtonGroup.types.ts +22 -22
- package/src/components/molecules/Calendar/Calendar.styles.ts +143 -143
- package/src/components/molecules/Calendar/Calendar.tsx +31 -31
- package/src/components/molecules/CodeInputContainer/CodeInputContainer.styles.tsx +7 -7
- package/src/components/molecules/CodeInputContainer/CodeInputContainer.types.ts +13 -13
- package/src/components/molecules/CodeInputContainer/index.tsx +1 -3
- package/src/components/molecules/ExcludeModal/ExcludeModal.styles.tsx +123 -118
- package/src/components/molecules/ExcludeModal/ExcludeModal.tsx +48 -48
- package/src/components/molecules/ExcludeModal/ExcludeModal.types.ts +10 -10
- package/src/components/molecules/ExcludeModal/index.tsx +1 -1
- package/src/components/molecules/FieldSelector/FieldSelector.styles.ts +59 -0
- package/src/components/molecules/FieldSelector/FieldSelector.tsx +167 -0
- package/src/components/molecules/HighlightsCard/HighlightsCard.styles.tsx +67 -68
- package/src/components/molecules/HighlightsCard/HighlightsCard.tsx +35 -26
- package/src/components/molecules/HighlightsCard/HighlightsCard.types.ts +10 -10
- package/src/components/molecules/HighlightsCard/index.tsx +1 -1
- package/src/components/molecules/InsuranceCard/InsuranceCard.styles.tsx +237 -237
- package/src/components/molecules/InsuranceCard/index.tsx +1 -1
- package/src/components/molecules/PieChartComponent/PieChartComponent.styles.tsx +7 -8
- package/src/components/molecules/PieChartComponent/PieChartComponent.tsx +70 -73
- package/src/components/molecules/PieChartComponent/PieChartComponent.types.ts +11 -11
- package/src/components/molecules/PieChartComponent/index.tsx +1 -1
- package/src/components/molecules/Popover/Popover.styles.ts +66 -65
- package/src/components/molecules/Popover/Popover.tsx +23 -23
- package/src/components/molecules/RadioBoxGroup/RadioBoxGroup.styles.ts +11 -11
- package/src/components/molecules/RadioBoxGroup/RadioBoxGroup.tsx +43 -43
- package/src/components/molecules/RadioGroupField/RadioGroupField.styles.tsx +65 -64
- package/src/components/molecules/RadioGroupField/RadioGroupField.tsx +69 -69
- package/src/components/molecules/RadioGroupField/RadioGroupField.types.ts +17 -17
- package/src/components/molecules/RadioGroupField/index.tsx +1 -1
- package/src/components/molecules/RefuseModal/RefuseModal.styles.tsx +139 -139
- package/src/components/molecules/RefuseModal/RefuseModal.tsx +92 -76
- package/src/components/molecules/RefuseModal/RefuseModal.types.ts +15 -15
- package/src/components/molecules/RefuseModal/index.tsx +2 -2
- package/src/components/molecules/ResultsChart/ResultsChart.tsx +23 -19
- package/src/components/molecules/ResultsChart/ResultsChart.types.ts +3 -3
- package/src/components/molecules/ResultsChart/index.tsx +2 -2
- package/src/components/molecules/TabToggle/TabToggle.styles.ts +54 -54
- package/src/components/molecules/TabToggle/TabToggle.tsx +35 -35
- package/src/components/organisms/AlertDialog/AlertDialog.styles.tsx +61 -61
- package/src/components/organisms/AlertDialog/AlertDialog.tsx +70 -70
- package/src/components/organisms/Dialog/Dialog.styles.ts +107 -106
- package/src/components/organisms/Dialog/Dialog.tsx +69 -69
- package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.styles.tsx +113 -113
- package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.tsx +75 -71
- package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.types.ts +9 -9
- package/src/components/organisms/DonutEmissionsChart/index.tsx +5 -2
- package/src/components/organisms/ExportExcelModal/ExportExcelModal.styles.ts +59 -0
- package/src/components/organisms/ExportExcelModal/ExportExcelModal.tsx +80 -0
- package/src/components/organisms/Form/Form.styles.ts +35 -35
- package/src/components/organisms/Form/Form.tsx +160 -160
- package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.styles.tsx +115 -114
- package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.tsx +89 -89
- package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.types.ts +16 -16
- package/src/components/organisms/ListagemUltimasEmissoes/index.tsx +1 -1
- package/src/components/organisms/Navbar/Navbar.styles.tsx +243 -243
- package/src/global.d.ts +9 -9
- package/src/index.ts +4 -0
- package/src/lib/utils.ts +6 -6
- package/src/styles/tokens/borders.ts +17 -17
- package/src/styles/tokens/index.tsx +6 -6
- package/src/styles/tokens/radius.ts +22 -22
- package/src/styles/tokens/shadows.ts +22 -22
- package/src/styles/tokens/sizes.ts +60 -64
- package/src/types/radius.types.ts +1 -1
- package/src/types/shadows.types.ts +1 -1
- package/src/utils/renderHighlightsCard.tsx +21 -0
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { StyledCodeInput } from
|
|
3
|
-
import { CodeInputProps } from
|
|
4
|
-
|
|
5
|
-
const CodeInput = React.forwardRef<HTMLInputElement, CodeInputProps>(
|
|
6
|
-
({ ...props }, ref) => {
|
|
7
|
-
return
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
CodeInput.displayName = "CodeInput";
|
|
18
|
-
|
|
19
|
-
export default CodeInput;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyledCodeInput } from './CodeInput.styles';
|
|
3
|
+
import { CodeInputProps } from './CodeInput.types';
|
|
4
|
+
|
|
5
|
+
const CodeInput = React.forwardRef<HTMLInputElement, CodeInputProps>(
|
|
6
|
+
({ ...props }, ref) => {
|
|
7
|
+
return <StyledCodeInput ref={ref} type="text" {...props} />;
|
|
8
|
+
}
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
CodeInput.displayName = 'CodeInput';
|
|
12
|
+
|
|
13
|
+
export default CodeInput;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { InputHTMLAttributes } from
|
|
2
|
-
|
|
3
|
-
export type CodeInputProps = InputHTMLAttributes<HTMLInputElement>;
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
export type CodeInputProps = InputHTMLAttributes<HTMLInputElement>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from './CodeInput';
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import React, { useState } from
|
|
2
|
-
import { ChevronDown, ChevronUp } from
|
|
3
|
-
import {
|
|
4
|
-
Wrapper,
|
|
5
|
-
ToggleButton,
|
|
6
|
-
LabelText,
|
|
7
|
-
Menu,
|
|
8
|
-
Item,
|
|
9
|
-
IconWrapper,
|
|
10
|
-
ItemLabel,
|
|
11
|
-
} from
|
|
12
|
-
import { DropdownMenuProps, DropdownMenuItemProps } from
|
|
13
|
-
|
|
14
|
-
export const DropdownMenu: React.FC<DropdownMenuProps> = ({
|
|
15
|
-
label,
|
|
16
|
-
variant =
|
|
17
|
-
children,
|
|
18
|
-
}) => {
|
|
19
|
-
const [open, setOpen] = useState(false);
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<Wrapper>
|
|
23
|
-
<ToggleButton
|
|
24
|
-
onClick={() => setOpen((o) => !o)}
|
|
25
|
-
$variant={variant}
|
|
26
|
-
$open={open}
|
|
27
|
-
>
|
|
28
|
-
<LabelText>{label}</LabelText>
|
|
29
|
-
{open ? <ChevronUp size={16} /> : <ChevronDown size={16} />}
|
|
30
|
-
</ToggleButton>
|
|
31
|
-
{open && <Menu $variant={variant}>{children}</Menu>}
|
|
32
|
-
</Wrapper>
|
|
33
|
-
);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export const DropdownMenuItem: React.FC<DropdownMenuItemProps> = ({
|
|
37
|
-
icon,
|
|
38
|
-
onClick,
|
|
39
|
-
children,
|
|
40
|
-
}) => (
|
|
41
|
-
<Item onClick={onClick}>
|
|
42
|
-
{icon && <IconWrapper>{icon}</IconWrapper>}
|
|
43
|
-
<ItemLabel>{children}</ItemLabel>
|
|
44
|
-
</Item>
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
DropdownMenu.displayName =
|
|
48
|
-
DropdownMenuItem.displayName =
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { ChevronDown, ChevronUp } from 'lucide-react';
|
|
3
|
+
import {
|
|
4
|
+
Wrapper,
|
|
5
|
+
ToggleButton,
|
|
6
|
+
LabelText,
|
|
7
|
+
Menu,
|
|
8
|
+
Item,
|
|
9
|
+
IconWrapper,
|
|
10
|
+
ItemLabel,
|
|
11
|
+
} from './DropdownMenu.styles';
|
|
12
|
+
import { DropdownMenuProps, DropdownMenuItemProps } from './DropdownMenu.types';
|
|
13
|
+
|
|
14
|
+
export const DropdownMenu: React.FC<DropdownMenuProps> = ({
|
|
15
|
+
label,
|
|
16
|
+
variant = 'light',
|
|
17
|
+
children,
|
|
18
|
+
}) => {
|
|
19
|
+
const [open, setOpen] = useState(false);
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<Wrapper>
|
|
23
|
+
<ToggleButton
|
|
24
|
+
onClick={() => setOpen((o) => !o)}
|
|
25
|
+
$variant={variant}
|
|
26
|
+
$open={open}
|
|
27
|
+
>
|
|
28
|
+
<LabelText>{label}</LabelText>
|
|
29
|
+
{open ? <ChevronUp size={16} /> : <ChevronDown size={16} />}
|
|
30
|
+
</ToggleButton>
|
|
31
|
+
{open && <Menu $variant={variant}>{children}</Menu>}
|
|
32
|
+
</Wrapper>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const DropdownMenuItem: React.FC<DropdownMenuItemProps> = ({
|
|
37
|
+
icon,
|
|
38
|
+
onClick,
|
|
39
|
+
children,
|
|
40
|
+
}) => (
|
|
41
|
+
<Item onClick={onClick}>
|
|
42
|
+
{icon && <IconWrapper>{icon}</IconWrapper>}
|
|
43
|
+
<ItemLabel>{children}</ItemLabel>
|
|
44
|
+
</Item>
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
DropdownMenu.displayName = 'DropdownMenu';
|
|
48
|
+
DropdownMenuItem.displayName = 'DropdownMenuItem';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
|
|
3
|
-
export type Variant =
|
|
4
|
-
|
|
5
|
-
export interface DropdownMenuProps {
|
|
6
|
-
label: string;
|
|
7
|
-
variant?: Variant;
|
|
8
|
-
children: ReactNode;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface DropdownMenuItemProps {
|
|
12
|
-
icon?: ReactNode;
|
|
13
|
-
onClick?: () => void;
|
|
14
|
-
children: ReactNode;
|
|
15
|
-
}
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export type Variant = 'light' | 'dark';
|
|
4
|
+
|
|
5
|
+
export interface DropdownMenuProps {
|
|
6
|
+
label: string;
|
|
7
|
+
variant?: Variant;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface DropdownMenuItemProps {
|
|
12
|
+
icon?: ReactNode;
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
export { DropdownMenu, DropdownMenuItem } from
|
|
2
|
-
export type {
|
|
1
|
+
export { DropdownMenu, DropdownMenuItem } from './DropdownMenu';
|
|
2
|
+
export type {
|
|
3
|
+
DropdownMenuProps,
|
|
4
|
+
DropdownMenuItemProps,
|
|
5
|
+
} from './DropdownMenu.types';
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import styled, { css } from 'styled-components';
|
|
2
|
-
import {
|
|
3
|
-
semanticBorders,
|
|
4
|
-
semanticColors,
|
|
5
|
-
semanticSizes,
|
|
6
|
-
typographyTokens,
|
|
7
|
-
} from '../../../styles/tokens';
|
|
8
|
-
|
|
9
|
-
const errorMessageVariants = {
|
|
10
|
-
error: css`
|
|
11
|
-
color: ${semanticColors.danger.text.feedback.accent};
|
|
12
|
-
`,
|
|
13
|
-
success: css`
|
|
14
|
-
color: ${semanticColors.success.text.feedback.accent};
|
|
15
|
-
`,
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const ErrorMessage = styled.p<{ $type?: 'error' | 'success' }>`
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: center;
|
|
21
|
-
justify-content: center;
|
|
22
|
-
gap: ${semanticSizes.global.gap.md};
|
|
23
|
-
font-size: ${typographyTokens.fontSizes.labelS};
|
|
24
|
-
margin-top: ${semanticSizes.global.spacings.sm};
|
|
25
|
-
border-radius: ${semanticBorders.global.md};
|
|
26
|
-
|
|
27
|
-
${({ $type = 'error' }) => errorMessageVariants[$type]}
|
|
28
|
-
`;
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import {
|
|
3
|
+
semanticBorders,
|
|
4
|
+
semanticColors,
|
|
5
|
+
semanticSizes,
|
|
6
|
+
typographyTokens,
|
|
7
|
+
} from '../../../styles/tokens';
|
|
8
|
+
|
|
9
|
+
const errorMessageVariants = {
|
|
10
|
+
error: css`
|
|
11
|
+
color: ${semanticColors.danger.text.feedback.accent};
|
|
12
|
+
`,
|
|
13
|
+
success: css`
|
|
14
|
+
color: ${semanticColors.success.text.feedback.accent};
|
|
15
|
+
`,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const ErrorMessage = styled.p<{ $type?: 'error' | 'success' }>`
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
gap: ${semanticSizes.global.gap.md};
|
|
23
|
+
font-size: ${typographyTokens.fontSizes.labelS};
|
|
24
|
+
margin-top: ${semanticSizes.global.spacings.sm};
|
|
25
|
+
border-radius: ${semanticBorders.global.md};
|
|
26
|
+
|
|
27
|
+
${({ $type = 'error' }) => errorMessageVariants[$type]}
|
|
28
|
+
`;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { ErrorMessage as StyledErrorMessage } from
|
|
3
|
-
import { ErrorMessageProps } from
|
|
4
|
-
|
|
5
|
-
const ErrorMessage: React.FC<ErrorMessageProps> = ({
|
|
6
|
-
children,
|
|
7
|
-
type =
|
|
8
|
-
}) => {
|
|
9
|
-
return <StyledErrorMessage $type={type}>{children}</StyledErrorMessage>;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export default ErrorMessage;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ErrorMessage as StyledErrorMessage } from './ErrorMessage.styles';
|
|
3
|
+
import { ErrorMessageProps } from './ErrorMessage.types';
|
|
4
|
+
|
|
5
|
+
const ErrorMessage: React.FC<ErrorMessageProps> = ({
|
|
6
|
+
children,
|
|
7
|
+
type = 'error',
|
|
8
|
+
}) => {
|
|
9
|
+
return <StyledErrorMessage $type={type}>{children}</StyledErrorMessage>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default ErrorMessage;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
export interface ErrorMessageProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ErrorMessageProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
type?: 'error' | 'success';
|
|
6
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from './ErrorMessage';
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import {
|
|
3
|
-
semanticSizes,
|
|
4
|
-
semanticColors,
|
|
5
|
-
primitiveSizes,
|
|
6
|
-
typographyTokens,
|
|
7
|
-
} from '../../../styles/tokens';
|
|
8
|
-
|
|
9
|
-
export const Container = styled.div`
|
|
10
|
-
font-size: ${typographyTokens.fontSizes.bodyM};
|
|
11
|
-
color: ${semanticColors.global.text.default.enabled};
|
|
12
|
-
margin-top: calc(${semanticSizes.global.padding['4xl']} + 111px);
|
|
13
|
-
padding-bottom: ${semanticSizes.global.padding['2xl']};
|
|
14
|
-
text-align: center;
|
|
15
|
-
font-family: ${typographyTokens.fontFamily.base};
|
|
16
|
-
font-weight: ${typographyTokens.fontWeights.regular};
|
|
17
|
-
line-height: ${typographyTokens.lineHeights.bodyM};
|
|
18
|
-
position: fixed;
|
|
19
|
-
bottom: ${primitiveSizes.size.half};
|
|
20
|
-
width: ${semanticSizes.global.full};
|
|
21
|
-
background-color: ${semanticColors.base.background};
|
|
22
|
-
`;
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import {
|
|
3
|
+
semanticSizes,
|
|
4
|
+
semanticColors,
|
|
5
|
+
primitiveSizes,
|
|
6
|
+
typographyTokens,
|
|
7
|
+
} from '../../../styles/tokens';
|
|
8
|
+
|
|
9
|
+
export const Container = styled.div`
|
|
10
|
+
font-size: ${typographyTokens.fontSizes.bodyM};
|
|
11
|
+
color: ${semanticColors.global.text.default.enabled};
|
|
12
|
+
margin-top: calc(${semanticSizes.global.padding['4xl']} + 111px);
|
|
13
|
+
padding-bottom: ${semanticSizes.global.padding['2xl']};
|
|
14
|
+
text-align: center;
|
|
15
|
+
font-family: ${typographyTokens.fontFamily.base};
|
|
16
|
+
font-weight: ${typographyTokens.fontWeights.regular};
|
|
17
|
+
line-height: ${typographyTokens.lineHeights.bodyM};
|
|
18
|
+
position: fixed;
|
|
19
|
+
bottom: ${primitiveSizes.size.half};
|
|
20
|
+
width: ${semanticSizes.global.full};
|
|
21
|
+
background-color: ${semanticColors.base.background};
|
|
22
|
+
`;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { Container } from
|
|
3
|
-
import { FooterProps } from
|
|
4
|
-
|
|
5
|
-
const Footer: React.FC<FooterProps> = ({ children }) => {
|
|
6
|
-
return <Container>{children}</Container>;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export default Footer;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Container } from './Footer.styles';
|
|
3
|
+
import { FooterProps } from './Footer.types';
|
|
4
|
+
|
|
5
|
+
const Footer: React.FC<FooterProps> = ({ children }) => {
|
|
6
|
+
return <Container>{children}</Container>;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default Footer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
|
|
3
|
-
export interface FooterProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
}
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
export interface FooterProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from './Footer';
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import {
|
|
3
|
-
semanticColors,
|
|
4
|
-
semanticSizes,
|
|
5
|
-
typographyTokens,
|
|
6
|
-
} from '../../../styles/tokens';
|
|
7
|
-
|
|
8
|
-
export const Container = styled.div`
|
|
9
|
-
padding: ${semanticSizes.global.padding['2xl']};
|
|
10
|
-
|
|
11
|
-
h1 {
|
|
12
|
-
font-size: ${typographyTokens.fontSizes.displayM};
|
|
13
|
-
font-weight: ${typographyTokens.fontWeights.semibold};
|
|
14
|
-
line-height: ${typographyTokens.lineHeights.displayM};
|
|
15
|
-
margin-top: ${semanticSizes.global.padding.xl};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.text {
|
|
19
|
-
color: ${semanticColors.global.text.default.enabled};
|
|
20
|
-
}
|
|
21
|
-
`;
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import {
|
|
3
|
+
semanticColors,
|
|
4
|
+
semanticSizes,
|
|
5
|
+
typographyTokens,
|
|
6
|
+
} from '../../../styles/tokens';
|
|
7
|
+
|
|
8
|
+
export const Container = styled.div`
|
|
9
|
+
padding: ${semanticSizes.global.padding['2xl']};
|
|
10
|
+
|
|
11
|
+
h1 {
|
|
12
|
+
font-size: ${typographyTokens.fontSizes.displayM};
|
|
13
|
+
font-weight: ${typographyTokens.fontWeights.semibold};
|
|
14
|
+
line-height: ${typographyTokens.lineHeights.displayM};
|
|
15
|
+
margin-top: ${semanticSizes.global.padding.xl};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.text {
|
|
19
|
+
color: ${semanticColors.global.text.default.enabled};
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { Container } from
|
|
3
|
-
import { GenericContainerProps } from
|
|
4
|
-
|
|
5
|
-
export const GenericContainer: React.FC<GenericContainerProps> = ({
|
|
6
|
-
children,
|
|
7
|
-
}) => {
|
|
8
|
-
return <Container>{children}</Container>;
|
|
9
|
-
};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Container } from './GenericContainer.styles';
|
|
3
|
+
import { GenericContainerProps } from './GenericContainer.types';
|
|
4
|
+
|
|
5
|
+
export const GenericContainer: React.FC<GenericContainerProps> = ({
|
|
6
|
+
children,
|
|
7
|
+
}) => {
|
|
8
|
+
return <Container>{children}</Container>;
|
|
9
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
|
|
3
|
-
export interface GenericContainerProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
}
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
export interface GenericContainerProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { GenericContainer } from
|
|
1
|
+
export { GenericContainer } from './GenericContainer';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { semanticSizes } from
|
|
2
|
-
|
|
3
|
-
const iconSizes = {
|
|
4
|
-
xs: semanticSizes.global.padding.xl,
|
|
5
|
-
sm: semanticSizes.global.padding.sm,
|
|
6
|
-
md: semanticSizes.global.padding.md,
|
|
7
|
-
lg: semanticSizes.global.padding.lg,
|
|
8
|
-
xl: semanticSizes.global.padding.xl,
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export default iconSizes;
|
|
1
|
+
import { semanticSizes } from '../../../styles/tokens';
|
|
2
|
+
|
|
3
|
+
const iconSizes = {
|
|
4
|
+
xs: semanticSizes.global.padding.xl,
|
|
5
|
+
sm: semanticSizes.global.padding.sm,
|
|
6
|
+
md: semanticSizes.global.padding.md,
|
|
7
|
+
lg: semanticSizes.global.padding.lg,
|
|
8
|
+
xl: semanticSizes.global.padding.xl,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default iconSizes;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import * as Icons from
|
|
3
|
-
import { IconProps } from
|
|
4
|
-
import iconSizes from
|
|
5
|
-
|
|
6
|
-
const Icon: React.FC<IconProps> = ({
|
|
7
|
-
name,
|
|
8
|
-
size =
|
|
9
|
-
weight =
|
|
10
|
-
...props
|
|
11
|
-
}) => {
|
|
12
|
-
const IconComponent = Icons[name as keyof typeof Icons] as React.ElementType;
|
|
13
|
-
|
|
14
|
-
if (!IconComponent) {
|
|
15
|
-
console.warn(`Ícone "${name}" não encontrado.`);
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return <IconComponent size={iconSizes[size]} weight={weight} {...props} />;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default Icon;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as Icons from '@phosphor-icons/react';
|
|
3
|
+
import { IconProps } from './Icon.types';
|
|
4
|
+
import iconSizes from './Icon.styles';
|
|
5
|
+
|
|
6
|
+
const Icon: React.FC<IconProps> = ({
|
|
7
|
+
name,
|
|
8
|
+
size = 'md',
|
|
9
|
+
weight = 'regular',
|
|
10
|
+
...props
|
|
11
|
+
}) => {
|
|
12
|
+
const IconComponent = Icons[name as keyof typeof Icons] as React.ElementType;
|
|
13
|
+
|
|
14
|
+
if (!IconComponent) {
|
|
15
|
+
console.warn(`Ícone "${name}" não encontrado.`);
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return <IconComponent size={iconSizes[size]} weight={weight} {...props} />;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default Icon;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IconProps as PhosphorIconProps } from
|
|
2
|
-
|
|
3
|
-
export interface IconProps extends PhosphorIconProps {
|
|
4
|
-
name: string;
|
|
5
|
-
size?:
|
|
6
|
-
}
|
|
1
|
+
import { IconProps as PhosphorIconProps } from '@phosphor-icons/react';
|
|
2
|
+
|
|
3
|
+
export interface IconProps extends PhosphorIconProps {
|
|
4
|
+
name: string;
|
|
5
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
6
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from './Icon';
|