sbwb-ds 1.0.18 → 1.0.21
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/index.d.ts +1 -1
- package/dist/sbwb-ds.js +5114 -5097
- package/dist/sbwb-ds.umd.cjs +236 -235
- package/dist/src/main/helpers/functions/icons.d.ts +2 -0
- package/dist/src/presentation/components/atoms/Charts/styles.d.ts +9 -0
- package/dist/src/presentation/components/atoms/Loading/index.d.ts +8 -0
- package/dist/src/presentation/components/atoms/Loading/index.spec.d.ts +1 -0
- package/dist/src/presentation/components/atoms/Loading/styles.d.ts +3 -0
- package/dist/src/presentation/components/atoms/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/main/assets/icons/blueLogo.svg +9 -0
- package/src/main/assets/icons/grayLogo.svg +9 -0
- package/src/main/helpers/functions/icons.ts +4 -0
- package/src/presentation/components/atoms/{ChartPie → Charts}/index.tsx +47 -37
- package/src/presentation/components/atoms/Charts/styles.tsx +77 -0
- package/src/presentation/components/atoms/Loading/Loading.stories.tsx +28 -0
- package/src/presentation/components/atoms/Loading/index.spec.tsx +22 -0
- package/src/presentation/components/atoms/Loading/index.tsx +34 -0
- package/src/presentation/components/atoms/Loading/styles.ts +115 -0
- package/src/presentation/components/atoms/index.ts +1 -1
- package/src/presentation/components/molecules/Table/styles.ts +3 -1
- package/dist/src/presentation/components/atoms/ChartPie/styles.d.ts +0 -4
- package/src/presentation/components/atoms/ChartPie/styles.tsx +0 -65
- /package/dist/src/presentation/components/atoms/{ChartPie → Charts}/hooks/useChartPie.d.ts +0 -0
- /package/dist/src/presentation/components/atoms/{ChartPie → Charts}/index.d.ts +0 -0
- /package/src/presentation/components/atoms/{ChartPie → Charts}/ChartPie.stories.tsx +0 -0
- /package/src/presentation/components/atoms/{ChartPie → Charts}/hooks/useChartPie.tsx +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const Icons: {
|
|
3
|
+
GrayLogo: import("react").FC<import("react").SVGProps<SVGSVGElement>>;
|
|
4
|
+
BlueLogo: import("react").FC<import("react").SVGProps<SVGSVGElement>>;
|
|
3
5
|
React: import("react").FC<import("react").SVGProps<SVGSVGElement>>;
|
|
4
6
|
AccountCicleAnt: import("react").FC<import("react").SVGProps<SVGSVGElement>>;
|
|
5
7
|
AccountCicleSm: import("react").FC<import("react").SVGProps<SVGSVGElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const ChartDom: any;
|
|
2
|
+
export declare const PieChart: any;
|
|
3
|
+
export declare const RefreshButton: any;
|
|
4
|
+
export declare const ChartInfo: any;
|
|
5
|
+
export declare const ChartContent: any;
|
|
6
|
+
export declare const ActionButtonContainer: any;
|
|
7
|
+
export declare const ChartTextContainer: any;
|
|
8
|
+
export declare const Description: any;
|
|
9
|
+
export declare const Title: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -5,7 +5,7 @@ export { default as Autocomplete } from '../atoms/Autocomplete';
|
|
|
5
5
|
export { default as BackgroundSection } from '../atoms/BackgroundSection';
|
|
6
6
|
export { default as Breadcrumb } from '../atoms/Breadcrumb';
|
|
7
7
|
export { default as Button } from '../atoms/Button';
|
|
8
|
-
export { default as ChartPie } from '
|
|
8
|
+
export { default as ChartPie } from './Charts';
|
|
9
9
|
export { default as Checkbox } from '../atoms/Checkbox';
|
|
10
10
|
export { default as Column } from '../atoms/Column';
|
|
11
11
|
export { default as Container } from '../atoms/Container';
|
package/package.json
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg width="747" height="394" viewBox="0 0 747 394" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M747 2.05438V48.4735H578.603L545.311 48.6202C496.332 46.7615 472.285 56.691 467.368 76.7945C461.122 101.789 465.696 135.442 470.613 171.051C479.514 236.009 489.546 309.184 438.55 362.5C419.126 382.799 394.341 394 368.918 394C345.067 394 322.397 384.511 303.169 366.608C269.877 335.401 267.025 260.025 264.025 180.247V179.073C262.698 146.252 259.698 69.2618 249.666 59.7237C243.273 56.3486 234.471 61.3867 234.421 61.4356C218.488 71.5608 215.833 149.969 214.309 196.78C211.751 271.862 209.243 342.347 175.41 369.005C146.151 392.043 100.516 394.147 66.8792 373.896C-8.65492 328.456 -1.18022 214.34 4.22913 130.893L4.37665 128.692C6.09781 102.132 7.81901 26.4134 5.11433 13.7448C4.47505 10.761 3.93409 7.53271 3.93409 7.53271C3.78656 6.70118 3.5899 6.01639 3.44237 5.52725C3.29484 5.13594 3.14731 4.6468 2.90143 3.96201C2.60638 3.42396 2.36051 3.08156 2.06545 2.4946C1.22946 1.17393 0.59011 0.489137 0 0H51.8806L52.6182 4.01092C56.7982 23.5764 54.8311 100.664 52.6674 134.024C47.9957 205.046 41.7012 302.482 92.0081 332.662C108.334 342.445 131.742 341.809 145.266 331.146C161.494 318.428 164.149 241.585 165.723 195.655V194.677C168.477 114.116 170.837 44.5604 208.604 20.5438C216.915 14.8209 245.388 2.78808 273.025 17.4622C305.481 34.5331 309.021 87.0664 312.562 178.339C314.578 232.438 317.676 313.879 336.51 331.488C357.509 351.2 383.129 350.369 403.291 329.287C438.305 292.651 430.289 234.248 422.421 177.801C416.962 137.448 411.651 99.3438 420.06 65.2509C431.076 20.7883 473.613 -0.440224 546.59 2.05438H746.951H747Z" fill="url(#paint0_linear_20920_16641)"/>
|
|
3
|
+
<defs>
|
|
4
|
+
<linearGradient id="paint0_linear_20920_16641" x1="1023.39" y1="-8.92284e-06" x2="747" y2="-6.52006e-06" gradientUnits="userSpaceOnUse">
|
|
5
|
+
<stop stop-color="#F4F6F8"/>
|
|
6
|
+
<stop offset="1" stop-color="#0C3C7A"/>
|
|
7
|
+
</linearGradient>
|
|
8
|
+
</defs>
|
|
9
|
+
</svg>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg width="747" height="394" viewBox="0 0 747 394" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M747 2.05438V48.4735H578.603L545.311 48.6202C496.332 46.7615 472.285 56.691 467.368 76.7945C461.122 101.789 465.696 135.442 470.613 171.051C479.514 236.009 489.546 309.184 438.55 362.5C419.126 382.799 394.341 394 368.918 394C345.067 394 322.397 384.511 303.169 366.608C269.877 335.401 267.025 260.025 264.025 180.247V179.073C262.698 146.252 259.698 69.2618 249.666 59.7237C243.273 56.3486 234.471 61.3867 234.421 61.4356C218.488 71.5608 215.833 149.969 214.309 196.78C211.751 271.862 209.243 342.347 175.41 369.005C146.151 392.043 100.516 394.147 66.8792 373.896C-8.65492 328.456 -1.18022 214.34 4.22913 130.893L4.37665 128.692C6.09781 102.132 7.81901 26.4134 5.11433 13.7448C4.47505 10.761 3.93409 7.53271 3.93409 7.53271C3.78656 6.70118 3.5899 6.01639 3.44237 5.52725C3.29484 5.13594 3.14731 4.6468 2.90143 3.96201C2.60638 3.42396 2.36051 3.08156 2.06545 2.4946C1.22946 1.17393 0.59011 0.489137 0 0H51.8806L52.6182 4.01092C56.7982 23.5764 54.8311 100.664 52.6674 134.024C47.9957 205.046 41.7012 302.482 92.0081 332.662C108.334 342.445 131.742 341.809 145.266 331.146C161.494 318.428 164.149 241.585 165.723 195.655V194.677C168.477 114.116 170.837 44.5604 208.604 20.5438C216.915 14.8209 245.388 2.78808 273.025 17.4622C305.481 34.5331 309.021 87.0664 312.562 178.339C314.578 232.438 317.676 313.879 336.51 331.488C357.509 351.2 383.129 350.369 403.291 329.287C438.305 292.651 430.289 234.248 422.421 177.801C416.962 137.448 411.651 99.3438 420.06 65.2509C431.076 20.7883 473.613 -0.440224 546.59 2.05438H746.951H747Z" fill="url(#paint0_linear_20920_16628)"/>
|
|
3
|
+
<defs>
|
|
4
|
+
<linearGradient id="paint0_linear_20920_16628" x1="-29.88" y1="0" x2="-179.28" y2="0" gradientUnits="userSpaceOnUse">
|
|
5
|
+
<stop stop-color="#F4F6F8"/>
|
|
6
|
+
<stop offset="1" stop-color="#0C3C7A"/>
|
|
7
|
+
</linearGradient>
|
|
8
|
+
</defs>
|
|
9
|
+
</svg>
|
|
@@ -233,8 +233,12 @@ import { ReactComponent as DownloadSm } from '../../assets/icons/small/Download.
|
|
|
233
233
|
import { ReactComponent as DownloadMd } from '../../assets/icons/medium/Download.svg';
|
|
234
234
|
import { ReactComponent as DownloadLg } from '../../assets/icons/large/Download.svg';
|
|
235
235
|
import { ReactComponent as DownloadXl } from '../../assets/icons/extraLarge/Download.svg';
|
|
236
|
+
import { ReactComponent as BlueLogo } from '../../assets/icons/blueLogo.svg';
|
|
237
|
+
import { ReactComponent as GrayLogo } from '../../assets/icons/grayLogo.svg';
|
|
236
238
|
|
|
237
239
|
export const Icons = {
|
|
240
|
+
GrayLogo,
|
|
241
|
+
BlueLogo,
|
|
238
242
|
React,
|
|
239
243
|
AccountCicleAnt,
|
|
240
244
|
AccountCicleSm,
|
|
@@ -41,16 +41,7 @@ const ChartPie = ({
|
|
|
41
41
|
|
|
42
42
|
const option = {
|
|
43
43
|
title: {
|
|
44
|
-
|
|
45
|
-
left: -4,
|
|
46
|
-
textStyle: {
|
|
47
|
-
color: sg.colors.neutralColors.colorNeutralDarkest,
|
|
48
|
-
fontFamily: sg.fonts.fontFamily.fontFamilyPrimary,
|
|
49
|
-
fontSize: sg.fonts.fontSize.fontSizeTitleMd,
|
|
50
|
-
fontWeight: sg.fonts.fontWeight.fontWeightSemiBold,
|
|
51
|
-
lineHeight: 22,
|
|
52
|
-
},
|
|
53
|
-
marginBottom: 10,
|
|
44
|
+
show: false,
|
|
54
45
|
},
|
|
55
46
|
tooltip: {
|
|
56
47
|
show: false,
|
|
@@ -64,12 +55,21 @@ const ChartPie = ({
|
|
|
64
55
|
icon: 'circle',
|
|
65
56
|
height: 74,
|
|
66
57
|
itemGap: 16,
|
|
58
|
+
formatter: function (name) {
|
|
59
|
+
return name + ' '; // Adiciona espaços (ou qualquer outro caractere) para simular margem
|
|
60
|
+
},
|
|
61
|
+
textStyle: {
|
|
62
|
+
fontFamily: sg.fonts.fontFamily.fontFamilyPrimary,
|
|
63
|
+
fontSize: 10,
|
|
64
|
+
fontWeight: 400,
|
|
65
|
+
lineHeight: 14,
|
|
66
|
+
},
|
|
67
67
|
},
|
|
68
68
|
series: [
|
|
69
69
|
{
|
|
70
70
|
name: seriesName,
|
|
71
71
|
type: 'pie',
|
|
72
|
-
radius: '
|
|
72
|
+
radius: '50%',
|
|
73
73
|
center: ['50%', '50%'],
|
|
74
74
|
data: chartData,
|
|
75
75
|
emphasis: false,
|
|
@@ -99,36 +99,46 @@ const ChartPie = ({
|
|
|
99
99
|
|
|
100
100
|
return (
|
|
101
101
|
<C.ChartDom id={id} data-testid="chart-pie">
|
|
102
|
-
<
|
|
102
|
+
<C.PieChart id="pie-chart" />
|
|
103
103
|
|
|
104
104
|
<C.ChartInfo data-testid="chart-pie-description">
|
|
105
|
-
|
|
105
|
+
<C.ChartTextContainer>
|
|
106
|
+
<C.Title title={title}>{title}</C.Title>
|
|
107
|
+
<C.Description>{description}</C.Description>
|
|
108
|
+
</C.ChartTextContainer>
|
|
106
109
|
|
|
107
|
-
<
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
110
|
+
<C.ChartContent>
|
|
111
|
+
<C.RefreshButton
|
|
112
|
+
name="Atualizar"
|
|
113
|
+
size="Small"
|
|
114
|
+
iconName="Sync"
|
|
115
|
+
variant="tertiary"
|
|
116
|
+
onClick={getData}
|
|
117
|
+
data-testid="reload-button"
|
|
118
|
+
width="117px"
|
|
119
|
+
/>
|
|
120
|
+
<C.ActionButtonContainer>
|
|
121
|
+
{prevChart && (
|
|
122
|
+
<ActionButton
|
|
123
|
+
variant="prev"
|
|
124
|
+
size="Small"
|
|
125
|
+
data-testid="prev-button"
|
|
126
|
+
id="prev"
|
|
127
|
+
onClick={prevChart}
|
|
128
|
+
/>
|
|
129
|
+
)}
|
|
130
|
+
{nextChart && (
|
|
131
|
+
<ActionButton
|
|
132
|
+
variant="next"
|
|
133
|
+
size="Small"
|
|
134
|
+
data-testid="next-button"
|
|
135
|
+
id="next"
|
|
136
|
+
onClick={nextChart}
|
|
137
|
+
/>
|
|
138
|
+
)}
|
|
139
|
+
</C.ActionButtonContainer>
|
|
140
|
+
</C.ChartContent>
|
|
127
141
|
</C.ChartInfo>
|
|
128
|
-
|
|
129
|
-
<C.RefreshButton onClick={getData} data-testid="reload-button">
|
|
130
|
-
<Sync /> Atualizar
|
|
131
|
-
</C.RefreshButton>
|
|
132
142
|
</C.ChartDom>
|
|
133
143
|
);
|
|
134
144
|
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { sg } from '../../../styles';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import Button from '../Button';
|
|
4
|
+
|
|
5
|
+
export const ChartDom = styled.main`
|
|
6
|
+
position: relative;
|
|
7
|
+
min-width: 441px;
|
|
8
|
+
height: 431px;
|
|
9
|
+
border-radius: ${sg.borders.borderRadius.borderRadiusSm};
|
|
10
|
+
`;
|
|
11
|
+
|
|
12
|
+
export const PieChart = styled.div`
|
|
13
|
+
background-color: ${sg.colors.neutralColors.colorNeutralSnow};
|
|
14
|
+
/* background-color: red; */
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 431px;
|
|
17
|
+
padding: ${sg.spacings.spacingInset.spacingInsetMd};
|
|
18
|
+
border-radius: ${sg.borders.borderRadius.borderRadiusSm};
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
export const RefreshButton = styled(Button)``;
|
|
22
|
+
|
|
23
|
+
export const ChartInfo = styled.div`
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: 24px;
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: auto;
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: row;
|
|
30
|
+
align-items: flex-end;
|
|
31
|
+
justify-content: space-between;
|
|
32
|
+
`;
|
|
33
|
+
|
|
34
|
+
export const ChartContent = styled.div`
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
align-items: center;
|
|
38
|
+
padding-right: ${sg.spacings.spacingInset.spacingInsetMd};
|
|
39
|
+
gap: 4px;
|
|
40
|
+
`;
|
|
41
|
+
|
|
42
|
+
export const ActionButtonContainer = styled.div`
|
|
43
|
+
display: flex;
|
|
44
|
+
justify-content: flex-end;
|
|
45
|
+
flex: 1;
|
|
46
|
+
button {
|
|
47
|
+
margin-left: 8px;
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
|
|
51
|
+
export const ChartTextContainer = styled.div`
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
`;
|
|
55
|
+
|
|
56
|
+
export const Description = styled.p`
|
|
57
|
+
padding-left: 24px;
|
|
58
|
+
font-family: ${sg.fonts.fontFamily.fontFamilyPrimary};
|
|
59
|
+
font-size: ${sg.fonts.fontSize.fontSizeBodyLg};
|
|
60
|
+
font-weight: ${sg.fonts.fontWeight.fontWeightRegular};
|
|
61
|
+
line-height: ${sg.fonts.lineHeight.lineHeightMd(
|
|
62
|
+
sg.fonts.fontSize.fontSizeBodyLg
|
|
63
|
+
)};
|
|
64
|
+
color: ${sg.colors.neutralColors.colorNeutralCloudy};
|
|
65
|
+
`;
|
|
66
|
+
|
|
67
|
+
export const Title = styled.h2`
|
|
68
|
+
padding-left: 24px;
|
|
69
|
+
font-family: ${sg.fonts.fontFamily.fontFamilyPrimary};
|
|
70
|
+
font-size: ${sg.fonts.fontSize.fontSizeTitleMd};
|
|
71
|
+
font-weight: ${sg.fonts.fontWeight.fontWeightSemiBold};
|
|
72
|
+
line-height: ${sg.fonts.lineHeight.lineHeightMd(
|
|
73
|
+
sg.fonts.fontSize.fontSizeTitleMd
|
|
74
|
+
)};
|
|
75
|
+
color: ${sg.colors.neutralColors.colorNeutralDarkest};
|
|
76
|
+
margin-bottom: 16px;
|
|
77
|
+
`;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Loading from './index';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Components/Loading',
|
|
6
|
+
component: Loading,
|
|
7
|
+
argTypes: {
|
|
8
|
+
width: { control: 'number' },
|
|
9
|
+
height: { control: 'number' },
|
|
10
|
+
animationSpeed: { control: 'number' },
|
|
11
|
+
},
|
|
12
|
+
tags: ['autodocs'],
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const Template = (args) => <Loading {...args} />;
|
|
16
|
+
|
|
17
|
+
export const Default = Template.bind({});
|
|
18
|
+
Default.args = {
|
|
19
|
+
width: 146,
|
|
20
|
+
height: 77,
|
|
21
|
+
animationSpeed: 6,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const FastAnimation = Template.bind({});
|
|
25
|
+
FastAnimation.args = {
|
|
26
|
+
...Default.args,
|
|
27
|
+
animationSpeed: 3,
|
|
28
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { render } from '@testing-library/react';
|
|
2
|
+
import '@testing-library/jest-dom';
|
|
3
|
+
import Loading from './index';
|
|
4
|
+
|
|
5
|
+
describe('Loading Component', () => {
|
|
6
|
+
test('renders correctly with default props', () => {
|
|
7
|
+
const { getByText } = render(<Loading />);
|
|
8
|
+
expect(getByText(/carregando.../i)).toBeInTheDocument();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
test('renders with custom width and height', () => {
|
|
12
|
+
const customWidth = 200;
|
|
13
|
+
const customHeight = 100;
|
|
14
|
+
const { container } = render(
|
|
15
|
+
<Loading width={customWidth} height={customHeight} />
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
const loadingSymbol = container.firstChild;
|
|
19
|
+
expect(loadingSymbol).toHaveStyle(`width: ${customWidth}px`);
|
|
20
|
+
expect(loadingSymbol).toHaveStyle(`height: ${customHeight}px`);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as C from './styles';
|
|
3
|
+
import { Icons } from '../../../../main/helpers/functions/icons';
|
|
4
|
+
|
|
5
|
+
const BlueLogo = Icons[`BlueLogo`];
|
|
6
|
+
const GrayLogo = Icons[`GrayLogo`];
|
|
7
|
+
|
|
8
|
+
interface LoadingProps {
|
|
9
|
+
width?: number;
|
|
10
|
+
height?: number;
|
|
11
|
+
animationSpeed?: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const Loading: React.FC<LoadingProps> = ({
|
|
15
|
+
width = 146,
|
|
16
|
+
height = 77,
|
|
17
|
+
animationSpeed = 6,
|
|
18
|
+
}: LoadingProps) => {
|
|
19
|
+
return (
|
|
20
|
+
<C.LoadingSymbol
|
|
21
|
+
width={width}
|
|
22
|
+
height={height}
|
|
23
|
+
animationSpeed={animationSpeed}
|
|
24
|
+
>
|
|
25
|
+
<GrayLogo />
|
|
26
|
+
<C.SvgClipContainer animationSpeed={animationSpeed}>
|
|
27
|
+
<BlueLogo />
|
|
28
|
+
</C.SvgClipContainer>
|
|
29
|
+
<C.Title animationSpeed={animationSpeed}>Carregando...</C.Title>
|
|
30
|
+
</C.LoadingSymbol>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default Loading;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { sg } from '../../../styles/styleGuide';
|
|
2
|
+
import styled, { keyframes } from 'styled-components';
|
|
3
|
+
|
|
4
|
+
// Animação para o preenchimento e esvaziamento do logo
|
|
5
|
+
const fillAndEmptyAnimation = keyframes`
|
|
6
|
+
0%, 100% {
|
|
7
|
+
clip-path: inset(0 100% 0 0); // Logo começa e termina escondido
|
|
8
|
+
}
|
|
9
|
+
49% {
|
|
10
|
+
clip-path: inset(0 0 0 0); // No meio da animação, o logo é totalmente revelado
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
// Animação para o gradiente acompanhar o preenchimento
|
|
15
|
+
const fillGradientAnimation = keyframes`
|
|
16
|
+
0%, 48.3% {
|
|
17
|
+
right: 100%; // Mantém o gradiente fora de vista durante o preenchimento
|
|
18
|
+
width: 0%; // Gradiente não é visível durante o preenchimento
|
|
19
|
+
}
|
|
20
|
+
48.3% {
|
|
21
|
+
right: 0%; // Começa a acompanhar o esvaziamento
|
|
22
|
+
width: 30%; // O tamanho do gradiente é o mesmo do final do preenchimento
|
|
23
|
+
}
|
|
24
|
+
70%, 100% {
|
|
25
|
+
right: -100%; // O gradiente continua a se mover para a direita e desaparece
|
|
26
|
+
width: 10%; // O gradiente reduz o tamanho até desaparecer
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
// Animação para o gradiente acompanhar o esvaziamento
|
|
31
|
+
const emptyGradientFollowAnimation = keyframes`
|
|
32
|
+
0%, 50.2% {
|
|
33
|
+
right: -10%; // Fica fora de vista durante o preenchimento
|
|
34
|
+
width: 0%; // Gradiente não é visível durante o preenchimento
|
|
35
|
+
}
|
|
36
|
+
50.2% {
|
|
37
|
+
right: 0%; // Começa no final do preenchimento
|
|
38
|
+
width: 0%; // Tamanho inicial do gradiente
|
|
39
|
+
}
|
|
40
|
+
100% {
|
|
41
|
+
right: 99.8%; // Termina acompanhando o esvaziamento
|
|
42
|
+
width: 20%; // Gradiente reduz o tamanho até desaparecer
|
|
43
|
+
}
|
|
44
|
+
`;
|
|
45
|
+
|
|
46
|
+
// Animação para o gradiente do título
|
|
47
|
+
const titleGradientAnimation = keyframes`
|
|
48
|
+
0%, 100% {
|
|
49
|
+
background-position: 200% center;
|
|
50
|
+
}
|
|
51
|
+
50% {
|
|
52
|
+
background-position: -100% center;
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
|
|
56
|
+
export const LoadingSymbol = styled.div`
|
|
57
|
+
position: relative;
|
|
58
|
+
width: ${(props) => props.width}px;
|
|
59
|
+
height: ${(props) => props.height}px;
|
|
60
|
+
|
|
61
|
+
svg {
|
|
62
|
+
width: 100%;
|
|
63
|
+
height: 100%;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&::after,
|
|
67
|
+
&::before {
|
|
68
|
+
content: '';
|
|
69
|
+
position: absolute;
|
|
70
|
+
top: 0;
|
|
71
|
+
bottom: 0;
|
|
72
|
+
background: linear-gradient(to left, rgba(255, 255, 255, 0.5), transparent);
|
|
73
|
+
z-index: 1;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&::after {
|
|
77
|
+
right: 0;
|
|
78
|
+
animation: ${fillGradientAnimation} ${(props) => props.animationSpeed}s
|
|
79
|
+
ease-in-out infinite;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&::before {
|
|
83
|
+
right: 0;
|
|
84
|
+
animation: ${emptyGradientFollowAnimation}
|
|
85
|
+
${(props) => props.animationSpeed}s ease-in-out infinite;
|
|
86
|
+
}
|
|
87
|
+
`;
|
|
88
|
+
|
|
89
|
+
export const SvgClipContainer = styled.div`
|
|
90
|
+
position: absolute;
|
|
91
|
+
top: 0;
|
|
92
|
+
left: 0;
|
|
93
|
+
width: 100%;
|
|
94
|
+
height: 100%;
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
animation: ${fillAndEmptyAnimation} ${(props) => props.animationSpeed}s
|
|
97
|
+
ease-in-out infinite;
|
|
98
|
+
`;
|
|
99
|
+
|
|
100
|
+
export const Title = styled.h2`
|
|
101
|
+
font-family: ${sg.fonts.fontFamily.fontFamilySecondary};
|
|
102
|
+
font-size: ${sg.fonts.fontSize.fontSizeBodyLg};
|
|
103
|
+
font-weight: ${sg.fonts.fontWeight.fontWeightSemiBold};
|
|
104
|
+
padding: 0 ${sg.spacings.spacingInline.spacingInlineLg};
|
|
105
|
+
color: #3b414d;
|
|
106
|
+
align-items: center;
|
|
107
|
+
background: linear-gradient(to left, #f9f9f9, #a6b0c4, #f9f9f9);
|
|
108
|
+
background-size: 200% auto;
|
|
109
|
+
background-clip: text;
|
|
110
|
+
-webkit-background-clip: text;
|
|
111
|
+
-webkit-text-fill-color: transparent;
|
|
112
|
+
animation: ${titleGradientAnimation} ${(props) => props.animationSpeed}s
|
|
113
|
+
linear infinite;
|
|
114
|
+
display: inline;
|
|
115
|
+
`;
|
|
@@ -5,7 +5,7 @@ export { default as Autocomplete } from '../atoms/Autocomplete';
|
|
|
5
5
|
export { default as BackgroundSection } from '../atoms/BackgroundSection';
|
|
6
6
|
export { default as Breadcrumb } from '../atoms/Breadcrumb';
|
|
7
7
|
export { default as Button } from '../atoms/Button';
|
|
8
|
-
export { default as ChartPie } from '
|
|
8
|
+
export { default as ChartPie } from './Charts';
|
|
9
9
|
export { default as Checkbox } from '../atoms/Checkbox';
|
|
10
10
|
export { default as Column } from '../atoms/Column';
|
|
11
11
|
export { default as Container } from '../atoms/Container';
|
|
@@ -137,7 +137,9 @@ export const DynamicTableTd = styled.td<{ DynamicTableProps }>`
|
|
|
137
137
|
isComponentRendered && 'center'};
|
|
138
138
|
width: 100%;
|
|
139
139
|
max-width: ${({ maxWidth }) => maxWidth};
|
|
140
|
-
height:
|
|
140
|
+
height: auto;
|
|
141
|
+
min-height: ${({ size }) => (size === 'Large' ? '4rem' : '3.2rem')};
|
|
142
|
+
|
|
141
143
|
padding: ${({ hasSubText, size, isComponentRendered }) => {
|
|
142
144
|
if (size === 'Large') {
|
|
143
145
|
return hasSubText || isComponentRendered
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { sg } from '../../../styles';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
|
|
4
|
-
export const ChartDom = styled.main`
|
|
5
|
-
position: relative;
|
|
6
|
-
min-width: 441px;
|
|
7
|
-
height: 431px;
|
|
8
|
-
border-radius: ${sg.borders.borderRadius.borderRadiusSm};
|
|
9
|
-
margin: ${sg.spacings.spacingInset.spacingInsetMd};
|
|
10
|
-
overflow: hidden;
|
|
11
|
-
|
|
12
|
-
& #pie-chart {
|
|
13
|
-
background-color: ${sg.colors.neutralColors.colorNeutralSnow};
|
|
14
|
-
}
|
|
15
|
-
`;
|
|
16
|
-
|
|
17
|
-
export const RefreshButton = styled.button`
|
|
18
|
-
position: absolute;
|
|
19
|
-
right: 0;
|
|
20
|
-
top: 8px;
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: row;
|
|
23
|
-
align-items: center;
|
|
24
|
-
font-family: ${sg.fonts.fontFamily.fontFamilyPrimary};
|
|
25
|
-
color: ${sg.colors.neutralColors.colorNeutralDark};
|
|
26
|
-
font-size: ${sg.fonts.fontSize.fontSizeBodyMd};
|
|
27
|
-
font-weight: ${sg.fonts.fontWeight.fontWeightRegular};
|
|
28
|
-
padding: ${sg.spacings.spacingStack.spacingStackNano};
|
|
29
|
-
background-color: ${sg.colors.neutralColors.colorNeutralSnow};
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
`;
|
|
32
|
-
|
|
33
|
-
export const ChartInfo = styled.div`
|
|
34
|
-
position: absolute;
|
|
35
|
-
top: calc(
|
|
36
|
-
${sg.spacings.spacingStack.spacingStackLg} +
|
|
37
|
-
${sg.spacings.spacingStack.spacingStackNano}
|
|
38
|
-
);
|
|
39
|
-
width: 100%;
|
|
40
|
-
height: 32px;
|
|
41
|
-
display: flex;
|
|
42
|
-
flex-direction: row;
|
|
43
|
-
align-items: flex-end;
|
|
44
|
-
justify-content: space-between;
|
|
45
|
-
|
|
46
|
-
& div {
|
|
47
|
-
display: flex;
|
|
48
|
-
justify-content: flex-end;
|
|
49
|
-
flex: 1;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
& div > button {
|
|
53
|
-
margin-left: 8px;
|
|
54
|
-
}
|
|
55
|
-
`;
|
|
56
|
-
|
|
57
|
-
export const Description = styled.div`
|
|
58
|
-
font-family: ${sg.fonts.fontFamily.fontFamilyPrimary};
|
|
59
|
-
font-size: ${sg.fonts.fontSize.fontSizeBodyLg};
|
|
60
|
-
font-weight: ${sg.fonts.fontWeight.fontWeightRegular};
|
|
61
|
-
line-height: ${sg.fonts.lineHeight.lineHeightMd(
|
|
62
|
-
sg.fonts.fontSize.fontSizeBodyLg
|
|
63
|
-
)};
|
|
64
|
-
color: ${sg.colors.neutralColors.colorNeutralCloudy};
|
|
65
|
-
`;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|