@granto-umbrella/umbrella-components 3.0.34 → 3.0.36

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.
Files changed (156) hide show
  1. package/README.md +165 -27
  2. package/dist/umbrella-components.css +1 -1
  3. package/dist/umbrella-components.es.js +28129 -29249
  4. package/dist/umbrella-components.umd.js +1234 -2181
  5. package/package.json +135 -106
  6. package/src/assets.d.ts +19 -19
  7. package/src/components/atoms/Badge/Badge.styles.ts +88 -86
  8. package/src/components/atoms/Badge/Badge.tsx +42 -44
  9. package/src/components/atoms/Badge/Badge.types.ts +15 -15
  10. package/src/components/atoms/Breadcrumb/Breadcrumb.styles.ts +43 -43
  11. package/src/components/atoms/Breadcrumb/Breadcrumb.tsx +46 -48
  12. package/src/components/atoms/Breadcrumb/Breadcrumb.types.ts +12 -12
  13. package/src/components/atoms/Button/Button.styles.ts +279 -280
  14. package/src/components/atoms/Button/Button.tsx +76 -76
  15. package/src/components/atoms/Button/Button.types.ts +28 -28
  16. package/src/components/atoms/Button/index.ts +1 -1
  17. package/src/components/atoms/Checkbox/Checkbox.styles.ts +72 -72
  18. package/src/components/atoms/Checkbox/Checkbox.tsx +36 -36
  19. package/src/components/atoms/Checkbox/Checkbox.types.ts +14 -14
  20. package/src/components/atoms/Checkbox/CheckboxGroup.tsx +30 -30
  21. package/src/components/atoms/Checkbox/CheckboxSelectAll.tsx +32 -32
  22. package/src/components/atoms/CodeInput/CodeInput.styles.tsx +38 -39
  23. package/src/components/atoms/CodeInput/CodeInput.tsx +13 -19
  24. package/src/components/atoms/CodeInput/CodeInput.types.ts +3 -3
  25. package/src/components/atoms/CodeInput/index.tsx +1 -1
  26. package/src/components/atoms/DropDownMenu/DropdownMenu.tsx +48 -48
  27. package/src/components/atoms/DropDownMenu/DropdownMenu.types.ts +15 -15
  28. package/src/components/atoms/DropDownMenu/index.tsx +5 -2
  29. package/src/components/atoms/ErrorMessage/ErrorMessage.styles.tsx +28 -28
  30. package/src/components/atoms/ErrorMessage/ErrorMessage.tsx +12 -12
  31. package/src/components/atoms/ErrorMessage/ErrorMessage.types.ts +6 -6
  32. package/src/components/atoms/ErrorMessage/index.tsx +1 -1
  33. package/src/components/atoms/Footer/Footer.styles.tsx +22 -22
  34. package/src/components/atoms/Footer/Footer.tsx +9 -9
  35. package/src/components/atoms/Footer/Footer.types.tsx +5 -5
  36. package/src/components/atoms/Footer/index.tsx +1 -1
  37. package/src/components/atoms/GenericContainer/GenericContainer.styles.tsx +21 -21
  38. package/src/components/atoms/GenericContainer/GenericContainer.tsx +9 -9
  39. package/src/components/atoms/GenericContainer/GenericContainer.types.ts +5 -5
  40. package/src/components/atoms/GenericContainer/index.tsx +1 -1
  41. package/src/components/atoms/Icon/Icon.styles.ts +11 -11
  42. package/src/components/atoms/Icon/Icon.tsx +22 -22
  43. package/src/components/atoms/Icon/Icon.types.ts +6 -6
  44. package/src/components/atoms/Icon/index.ts +1 -1
  45. package/src/components/atoms/Input/Input.styles.ts +106 -101
  46. package/src/components/atoms/Input/index.ts +1 -1
  47. package/src/components/atoms/Label/Label.tsx +16 -16
  48. package/src/components/atoms/Loading/Loading.styles.tsx +25 -25
  49. package/src/components/atoms/Loading/Loading.tsx +8 -8
  50. package/src/components/atoms/LogoContainer/LogoContainer.Types.tsx +5 -5
  51. package/src/components/atoms/LogoContainer/LogoContainer.styles.tsx +11 -11
  52. package/src/components/atoms/LogoContainer/LogoContainer.tsx +11 -11
  53. package/src/components/atoms/LogoContainer/index.tsx +1 -1
  54. package/src/components/atoms/ModalAviso/ModalAviso.styles.tsx +56 -56
  55. package/src/components/atoms/ModalAviso/ModalAviso.tsx +43 -37
  56. package/src/components/atoms/ModalAviso/ModalAviso.types.ts +5 -5
  57. package/src/components/atoms/ModalAviso/index.tsx +1 -1
  58. package/src/components/atoms/MultiSelect/MultiSelect.styles.tsx +100 -92
  59. package/src/components/atoms/MultiSelect/MultiSelect.tsx +346 -346
  60. package/src/components/atoms/MultiSelect/MultiSelect.types.ts +38 -38
  61. package/src/components/atoms/Pill/Pill.styles.ts +46 -46
  62. package/src/components/atoms/Pill/Pill.tsx +35 -36
  63. package/src/components/atoms/Pill/Pill.types.ts +14 -18
  64. package/src/components/atoms/RadioButton/RadioButton.styles.ts +44 -43
  65. package/src/components/atoms/RadioButton/RadioButton.tsx +31 -31
  66. package/src/components/atoms/ResendLink/ResendLink.styles.tsx +19 -20
  67. package/src/components/atoms/ResendLink/ResendLink.tsx +21 -21
  68. package/src/components/atoms/ResendLink/ResendLink.types.ts +8 -9
  69. package/src/components/atoms/ResendLink/index.tsx +1 -2
  70. package/src/components/atoms/Select/Select.styles.ts +153 -149
  71. package/src/components/atoms/Select/Select.tsx +52 -43
  72. package/src/components/atoms/Select/index.tsx +1 -1
  73. package/src/components/atoms/Subtitle/Subtitle.tsx +7 -7
  74. package/src/components/atoms/Subtitle/Subtitle.types.ts +5 -5
  75. package/src/components/atoms/Subtitle/index.tsx +1 -1
  76. package/src/components/atoms/Switch/Switch.tsx +25 -25
  77. package/src/components/atoms/TabBar/TabBar.styles.tsx +64 -57
  78. package/src/components/atoms/TabBar/index.tsx +2 -2
  79. package/src/components/atoms/Text/Text.styles.tsx +35 -35
  80. package/src/components/atoms/Text/Text.tsx +32 -31
  81. package/src/components/atoms/Text/Text.types.ts +8 -8
  82. package/src/components/atoms/Text/index.ts +1 -1
  83. package/src/components/atoms/Textarea/Textarea.styles.ts +52 -52
  84. package/src/components/atoms/Textarea/Textarea.tsx +31 -31
  85. package/src/components/atoms/Title/Title.tsx +7 -7
  86. package/src/components/atoms/Title/Title.types.ts +5 -5
  87. package/src/components/atoms/Title/index.tsx +1 -1
  88. package/src/components/molecules/BannerAjuda/BannerAjuda.styles.tsx +9 -9
  89. package/src/components/molecules/BannerAjuda/BannerAjuda.tsx +18 -19
  90. package/src/components/molecules/BannerAjuda/index.tsx +1 -1
  91. package/src/components/molecules/ButtonGroup/ButtonGroup.styles.ts +10 -10
  92. package/src/components/molecules/ButtonGroup/ButtonGroup.types.ts +22 -22
  93. package/src/components/molecules/Calendar/Calendar.styles.ts +143 -143
  94. package/src/components/molecules/Calendar/Calendar.tsx +31 -31
  95. package/src/components/molecules/CodeInputContainer/CodeInputContainer.styles.tsx +7 -7
  96. package/src/components/molecules/CodeInputContainer/CodeInputContainer.types.ts +13 -13
  97. package/src/components/molecules/CodeInputContainer/index.tsx +1 -3
  98. package/src/components/molecules/ExcludeModal/ExcludeModal.styles.tsx +123 -118
  99. package/src/components/molecules/ExcludeModal/ExcludeModal.tsx +48 -48
  100. package/src/components/molecules/ExcludeModal/ExcludeModal.types.ts +10 -10
  101. package/src/components/molecules/ExcludeModal/index.tsx +1 -1
  102. package/src/components/molecules/FieldSelector/FieldSelector.styles.ts +59 -0
  103. package/src/components/molecules/FieldSelector/FieldSelector.tsx +167 -0
  104. package/src/components/molecules/HighlightsCard/HighlightsCard.styles.tsx +67 -68
  105. package/src/components/molecules/HighlightsCard/HighlightsCard.tsx +35 -26
  106. package/src/components/molecules/HighlightsCard/HighlightsCard.types.ts +10 -10
  107. package/src/components/molecules/HighlightsCard/index.tsx +1 -1
  108. package/src/components/molecules/InsuranceCard/InsuranceCard.styles.tsx +237 -237
  109. package/src/components/molecules/InsuranceCard/index.tsx +1 -1
  110. package/src/components/molecules/PieChartComponent/PieChartComponent.styles.tsx +7 -8
  111. package/src/components/molecules/PieChartComponent/PieChartComponent.tsx +70 -73
  112. package/src/components/molecules/PieChartComponent/PieChartComponent.types.ts +11 -11
  113. package/src/components/molecules/PieChartComponent/index.tsx +1 -1
  114. package/src/components/molecules/Popover/Popover.styles.ts +66 -65
  115. package/src/components/molecules/Popover/Popover.tsx +23 -23
  116. package/src/components/molecules/RadioBoxGroup/RadioBoxGroup.styles.ts +11 -11
  117. package/src/components/molecules/RadioBoxGroup/RadioBoxGroup.tsx +43 -43
  118. package/src/components/molecules/RadioGroupField/RadioGroupField.styles.tsx +65 -64
  119. package/src/components/molecules/RadioGroupField/RadioGroupField.tsx +69 -69
  120. package/src/components/molecules/RadioGroupField/RadioGroupField.types.ts +17 -17
  121. package/src/components/molecules/RadioGroupField/index.tsx +1 -1
  122. package/src/components/molecules/RefuseModal/RefuseModal.styles.tsx +139 -139
  123. package/src/components/molecules/RefuseModal/RefuseModal.tsx +92 -76
  124. package/src/components/molecules/RefuseModal/RefuseModal.types.ts +15 -15
  125. package/src/components/molecules/RefuseModal/index.tsx +2 -2
  126. package/src/components/molecules/ResultsChart/ResultsChart.tsx +23 -19
  127. package/src/components/molecules/ResultsChart/ResultsChart.types.ts +3 -3
  128. package/src/components/molecules/ResultsChart/index.tsx +2 -2
  129. package/src/components/molecules/TabToggle/TabToggle.styles.ts +54 -54
  130. package/src/components/molecules/TabToggle/TabToggle.tsx +35 -35
  131. package/src/components/organisms/AlertDialog/AlertDialog.styles.tsx +61 -61
  132. package/src/components/organisms/AlertDialog/AlertDialog.tsx +70 -70
  133. package/src/components/organisms/Dialog/Dialog.styles.ts +107 -106
  134. package/src/components/organisms/Dialog/Dialog.tsx +69 -69
  135. package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.styles.tsx +113 -113
  136. package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.tsx +75 -71
  137. package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.types.ts +9 -9
  138. package/src/components/organisms/DonutEmissionsChart/index.tsx +5 -2
  139. package/src/components/organisms/Form/Form.styles.ts +35 -35
  140. package/src/components/organisms/Form/Form.tsx +160 -160
  141. package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.styles.tsx +115 -114
  142. package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.tsx +89 -89
  143. package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.types.ts +16 -16
  144. package/src/components/organisms/ListagemUltimasEmissoes/index.tsx +1 -1
  145. package/src/components/organisms/Navbar/Navbar.styles.tsx +243 -243
  146. package/src/global.d.ts +9 -9
  147. package/src/index.ts +2 -0
  148. package/src/lib/utils.ts +6 -6
  149. package/src/styles/tokens/borders.ts +17 -17
  150. package/src/styles/tokens/index.tsx +6 -6
  151. package/src/styles/tokens/radius.ts +22 -22
  152. package/src/styles/tokens/shadows.ts +22 -22
  153. package/src/styles/tokens/sizes.ts +60 -64
  154. package/src/types/radius.types.ts +1 -1
  155. package/src/types/shadows.types.ts +1 -1
  156. package/src/utils/renderHighlightsCard.tsx +21 -0
@@ -1,101 +1,106 @@
1
- import styled, { css } from 'styled-components';
2
- import {
3
- semanticColors,
4
- semanticShadows,
5
- semanticRadius,
6
- primitiveSizes,
7
- semanticSizes,
8
- semanticBorders,
9
- typographyTokens,
10
- } from '../../../styles/tokens';
11
-
12
- const inputSizes = {
13
- sm: css`
14
- padding: ${semanticSizes.global.padding.md} ${semanticSizes.global.padding.lg};
15
- gap: ${semanticSizes.global.gap.sm};
16
- `,
17
- md: css`
18
- padding: ${semanticSizes.global.padding.lg} ${semanticSizes.global.padding.xl};
19
- gap: ${semanticSizes.global.gap.md};
20
- `,
21
- lg: css`
22
- padding: ${semanticSizes.global.padding['2xl']} ${semanticSizes.global.padding['3xl']};
23
- gap: ${semanticSizes.global.gap.lg};
24
- `,
25
- };
26
-
27
- export const Container = styled.div`
28
- display: flex;
29
- flex-direction: column;
30
- gap: ${primitiveSizes.size.x1};
31
- `;
32
-
33
- export const Label = styled.label`
34
- font-size: ${typographyTokens.fontSizes.labelS};
35
- color: ${semanticColors.global.text.subtitle.enabled};
36
- font-weight: ${typographyTokens.fontWeights.medium};
37
- `;
38
-
39
- export const SupportText = styled.span<{ $error?: boolean }>`
40
- font-size: ${typographyTokens.fontSizes.captionM};
41
- color: ${({ $error }) =>
42
- $error
43
- ? semanticColors.danger.text.enabled
44
- : semanticColors.global.text.subtitle.enabled};
45
- `;
46
-
47
- export const InputWrapper = styled.div<{
48
- $error?: boolean;
49
- $disabled?: boolean;
50
- $radius?: keyof typeof semanticRadius.global.radius;
51
- $shadow?: keyof typeof semanticShadows.shadow;
52
- $size: keyof typeof inputSizes;
53
- }>`
54
- display: flex;
55
- align-items: center;
56
-
57
- ${({ $size }) => inputSizes[$size]}
58
-
59
- box-shadow: ${({ $shadow }) => semanticShadows.shadow[$shadow || 'default']};
60
- border-radius: ${semanticBorders.global.lg};
61
- border: 1px solid
62
- ${({ $error }) =>
63
- $error
64
- ? semanticColors.danger.border.enabled
65
- : semanticColors.global.border.medium};
66
- background-color: ${({ $disabled }) =>
67
- $disabled ? semanticColors.neutral[100] : semanticColors.base.background};
68
- transition: border-color 0.2s, box-shadow 0.2s;
69
-
70
- &:focus-within {
71
- border-color: ${({ $error }) =>
72
- $error
73
- ? semanticColors.danger.border.enabled
74
- : semanticColors.branding.border.enabled};
75
- }
76
- `;
77
-
78
- export const StyledInput = styled.input`
79
- display: flex;
80
- width: 100%;
81
- border: none;
82
- outline: none;
83
- font-size: ${typographyTokens.fontSizes.labelM};
84
- color: ${semanticColors.global.text.default.enabled};
85
-
86
- &::placeholder {
87
- color: ${semanticColors.global.text.onSurface.enabled};
88
- }
89
-
90
- &:disabled {
91
- background-color: transparent;
92
- cursor: not-allowed;
93
- }
94
- `;
95
-
96
- export const Icon = styled.div`
97
- display: flex;
98
- align-items: center;
99
- justify-content: center;
100
- color: ${semanticColors.neutral[400]};
101
- `;
1
+ import styled, { css } from 'styled-components';
2
+ import {
3
+ semanticColors,
4
+ semanticShadows,
5
+ semanticRadius,
6
+ primitiveSizes,
7
+ semanticSizes,
8
+ semanticBorders,
9
+ typographyTokens,
10
+ } from '../../../styles/tokens';
11
+
12
+ const inputSizes = {
13
+ sm: css`
14
+ padding: ${semanticSizes.global.padding.md}
15
+ ${semanticSizes.global.padding.lg};
16
+ gap: ${semanticSizes.global.gap.sm};
17
+ `,
18
+ md: css`
19
+ padding: ${semanticSizes.global.padding.lg}
20
+ ${semanticSizes.global.padding.xl};
21
+ gap: ${semanticSizes.global.gap.md};
22
+ `,
23
+ lg: css`
24
+ padding: ${semanticSizes.global.padding['2xl']}
25
+ ${semanticSizes.global.padding['3xl']};
26
+ gap: ${semanticSizes.global.gap.lg};
27
+ `,
28
+ };
29
+
30
+ export const Container = styled.div`
31
+ display: flex;
32
+ flex-direction: column;
33
+ gap: ${primitiveSizes.size.x1};
34
+ `;
35
+
36
+ export const Label = styled.label`
37
+ font-size: ${typographyTokens.fontSizes.labelS};
38
+ color: ${semanticColors.global.text.subtitle.enabled};
39
+ font-weight: ${typographyTokens.fontWeights.medium};
40
+ `;
41
+
42
+ export const SupportText = styled.span<{ $error?: boolean }>`
43
+ font-size: ${typographyTokens.fontSizes.captionM};
44
+ color: ${({ $error }) =>
45
+ $error
46
+ ? semanticColors.danger.text.enabled
47
+ : semanticColors.global.text.subtitle.enabled};
48
+ `;
49
+
50
+ export const InputWrapper = styled.div<{
51
+ $error?: boolean;
52
+ $disabled?: boolean;
53
+ $radius?: keyof typeof semanticRadius.global.radius;
54
+ $shadow?: keyof typeof semanticShadows.shadow;
55
+ $size: keyof typeof inputSizes;
56
+ }>`
57
+ display: flex;
58
+ align-items: center;
59
+
60
+ ${({ $size }) => inputSizes[$size]}
61
+
62
+ box-shadow: ${({ $shadow }) => semanticShadows.shadow[$shadow || 'default']};
63
+ border-radius: ${semanticBorders.global.lg};
64
+ border: 1px solid
65
+ ${({ $error }) =>
66
+ $error
67
+ ? semanticColors.danger.border.enabled
68
+ : semanticColors.global.border.medium};
69
+ background-color: ${({ $disabled }) =>
70
+ $disabled ? semanticColors.neutral[100] : semanticColors.base.background};
71
+ transition:
72
+ border-color 0.2s,
73
+ box-shadow 0.2s;
74
+
75
+ &:focus-within {
76
+ border-color: ${({ $error }) =>
77
+ $error
78
+ ? semanticColors.danger.border.enabled
79
+ : semanticColors.branding.border.enabled};
80
+ }
81
+ `;
82
+
83
+ export const StyledInput = styled.input`
84
+ display: flex;
85
+ width: 100%;
86
+ border: none;
87
+ outline: none;
88
+ font-size: ${typographyTokens.fontSizes.labelM};
89
+ color: ${semanticColors.global.text.default.enabled};
90
+
91
+ &::placeholder {
92
+ color: ${semanticColors.global.text.onSurface.enabled};
93
+ }
94
+
95
+ &:disabled {
96
+ background-color: transparent;
97
+ cursor: not-allowed;
98
+ }
99
+ `;
100
+
101
+ export const Icon = styled.div`
102
+ display: flex;
103
+ align-items: center;
104
+ justify-content: center;
105
+ color: ${semanticColors.neutral[400]};
106
+ `;
@@ -1 +1 @@
1
- export { default } from "./Input";
1
+ export { default } from './Input';
@@ -1,16 +1,16 @@
1
- // Label.tsx
2
- import * as React from "react";
3
- import { StyledLabel } from "./Label.styles";
4
-
5
- export type LabelProps = React.ComponentProps<typeof StyledLabel>;
6
-
7
- export const Label = React.forwardRef<HTMLLabelElement, LabelProps>(
8
- ({ children, ...props }, ref) => {
9
- return (
10
- <StyledLabel ref={ref} {...props}>
11
- {children}
12
- </StyledLabel>
13
- );
14
- }
15
- );
16
- Label.displayName = "Label";
1
+ // Label.tsx
2
+ import * as React from 'react';
3
+ import { StyledLabel } from './Label.styles';
4
+
5
+ export type LabelProps = React.ComponentProps<typeof StyledLabel>;
6
+
7
+ export const Label = React.forwardRef<HTMLLabelElement, LabelProps>(
8
+ ({ children, ...props }, ref) => {
9
+ return (
10
+ <StyledLabel ref={ref} {...props}>
11
+ {children}
12
+ </StyledLabel>
13
+ );
14
+ }
15
+ );
16
+ Label.displayName = 'Label';
@@ -1,25 +1,25 @@
1
- import styled, { keyframes } from 'styled-components';
2
- import {
3
- semanticBorders,
4
- semanticColors,
5
- semanticRadius,
6
- semanticSizes,
7
- } from '../../../styles/tokens';
8
-
9
- const spin = keyframes`
10
- to {
11
- transform: rotate(360deg);
12
- }
13
- `;
14
-
15
- export const StyledLoader = styled.div`
16
- margin: ${semanticSizes.global.spacings.lg} auto;
17
- border: ${semanticBorders.global.lg} solid
18
- ${semanticColors.global.border.default};
19
- border-top: ${semanticBorders.global.lg} solid
20
- ${semanticColors.info.border.feedback};
21
- border-radius: ${semanticRadius.global.radius.full};
22
- width: ${semanticSizes.global.spacings.md};
23
- height: ${semanticSizes.global.spacings.md};
24
- animation: ${spin} 1s linear infinite;
25
- `;
1
+ import styled, { keyframes } from 'styled-components';
2
+ import {
3
+ semanticBorders,
4
+ semanticColors,
5
+ semanticRadius,
6
+ semanticSizes,
7
+ } from '../../../styles/tokens';
8
+
9
+ const spin = keyframes`
10
+ to {
11
+ transform: rotate(360deg);
12
+ }
13
+ `;
14
+
15
+ export const StyledLoader = styled.div`
16
+ margin: ${semanticSizes.global.spacings.lg} auto;
17
+ border: ${semanticBorders.global.lg} solid
18
+ ${semanticColors.global.border.default};
19
+ border-top: ${semanticBorders.global.lg} solid
20
+ ${semanticColors.info.border.feedback};
21
+ border-radius: ${semanticRadius.global.radius.full};
22
+ width: ${semanticSizes.global.spacings.md};
23
+ height: ${semanticSizes.global.spacings.md};
24
+ animation: ${spin} 1s linear infinite;
25
+ `;
@@ -1,8 +1,8 @@
1
- import React from "react";
2
- import { StyledLoader } from "./Loading.styles";
3
-
4
- const Loader: React.FC = () => {
5
- return <StyledLoader />;
6
- };
7
-
8
- export default Loader;
1
+ import React from 'react';
2
+ import { StyledLoader } from './Loading.styles';
3
+
4
+ const Loader: React.FC = () => {
5
+ return <StyledLoader />;
6
+ };
7
+
8
+ export default Loader;
@@ -1,5 +1,5 @@
1
- export interface LogoContainerProps {
2
- src: string;
3
- alt?: string;
4
- margintBottom?: string;
5
- }
1
+ export interface LogoContainerProps {
2
+ src: string;
3
+ alt?: string;
4
+ margintBottom?: string;
5
+ }
@@ -1,11 +1,11 @@
1
- import styled from 'styled-components';
2
- import { primitiveSizes } from '../../../styles/tokens';
3
-
4
- export const Logo = styled.img<{ marginBottom?: string }>`
5
- margin-bottom: ${(props) => props.marginBottom || primitiveSizes.size.x6};
6
- width: 112px;
7
-
8
- @media (max-width: 768px) {
9
- width: 114.12px;
10
- }
11
- `;
1
+ import styled from 'styled-components';
2
+ import { primitiveSizes } from '../../../styles/tokens';
3
+
4
+ export const Logo = styled.img<{ marginBottom?: string }>`
5
+ margin-bottom: ${(props) => props.marginBottom || primitiveSizes.size.x6};
6
+ width: 112px;
7
+
8
+ @media (max-width: 768px) {
9
+ width: 114.12px;
10
+ }
11
+ `;
@@ -1,11 +1,11 @@
1
- import React from "react";
2
- import { Logo } from "./LogoContainer.styles";
3
- import { LogoContainerProps } from "./LogoContainer.Types";
4
-
5
- export const LogoContainer: React.FC<LogoContainerProps> = ({
6
- src,
7
- alt,
8
- margintBottom
9
- }) => {
10
- return <Logo src={src} alt={alt} marginBottom={margintBottom} />;
11
- };
1
+ import React from 'react';
2
+ import { Logo } from './LogoContainer.styles';
3
+ import { LogoContainerProps } from './LogoContainer.Types';
4
+
5
+ export const LogoContainer: React.FC<LogoContainerProps> = ({
6
+ src,
7
+ alt,
8
+ margintBottom,
9
+ }) => {
10
+ return <Logo src={src} alt={alt} marginBottom={margintBottom} />;
11
+ };
@@ -1 +1 @@
1
- export { LogoContainer } from "./LogoContainer";
1
+ export { LogoContainer } from './LogoContainer';
@@ -1,56 +1,56 @@
1
- // ModalAviso.styles.tsx
2
- import styled from 'styled-components';
3
- import {
4
- primitiveColors,
5
- semanticSizes,
6
- semanticRadius,
7
- typographyTokens,
8
- semanticBorders,
9
- } from '../../../styles/tokens';
10
- import { semanticColors } from '../../../styles/tokens';
11
-
12
- export const Wrapper = styled.div`
13
- position: fixed;
14
- bottom: calc(${semanticSizes.global.spacings.lg} + 10px);
15
- right: ${semanticSizes.global.padding.lg};
16
- z-index: 9999;
17
- `;
18
-
19
- export const Container = styled.div`
20
- background-color: ${semanticColors.info.surface.feedback};
21
- border-radius: ${semanticRadius.global.radius.md2};
22
- border: ${semanticBorders.global.md} solid
23
- ${semanticColors.info.border.feedback};
24
- padding: ${semanticSizes.global.padding.md} ${semanticSizes.global.padding.lg};
25
- display: flex;
26
- align-items: start;
27
- justify-content: space-between;
28
- gap: ${semanticSizes.global.gap.md};
29
- max-width: 600px;
30
- `;
31
-
32
- export const Content = styled.div`
33
- flex: 1;
34
- `;
35
-
36
- export const Title = styled.p`
37
- color: ${semanticColors.info.text.feedback.strong};
38
- font-weight: ${typographyTokens.fontWeights.semibold};
39
- font-size: ${typographyTokens.fontSizes.bodyM};
40
- margin: 0 0 ${semanticSizes.global.gap.xs} 0;
41
- `;
42
-
43
- export const Description = styled.p`
44
- color: ${primitiveColors.gray[800]};
45
- font-size: ${typographyTokens.fontSizes.bodyS};
46
- margin: 0;
47
- `;
48
-
49
- export const CloseButton = styled.button`
50
- background: transparent;
51
- border: none;
52
- padding: 0;
53
- cursor: pointer;
54
- color: ${primitiveColors.gray[600]};
55
- line-height: 0;
56
- `;
1
+ // ModalAviso.styles.tsx
2
+ import styled from 'styled-components';
3
+ import {
4
+ primitiveColors,
5
+ semanticSizes,
6
+ semanticRadius,
7
+ typographyTokens,
8
+ semanticBorders,
9
+ } from '../../../styles/tokens';
10
+ import { semanticColors } from '../../../styles/tokens';
11
+
12
+ export const Wrapper = styled.div`
13
+ position: fixed;
14
+ bottom: calc(${semanticSizes.global.spacings.lg} + 10px);
15
+ right: ${semanticSizes.global.padding.lg};
16
+ z-index: 9999;
17
+ `;
18
+
19
+ export const Container = styled.div`
20
+ background-color: ${semanticColors.info.surface.feedback};
21
+ border-radius: ${semanticRadius.global.radius.md2};
22
+ border: ${semanticBorders.global.md} solid
23
+ ${semanticColors.info.border.feedback};
24
+ padding: ${semanticSizes.global.padding.md} ${semanticSizes.global.padding.lg};
25
+ display: flex;
26
+ align-items: start;
27
+ justify-content: space-between;
28
+ gap: ${semanticSizes.global.gap.md};
29
+ max-width: 600px;
30
+ `;
31
+
32
+ export const Content = styled.div`
33
+ flex: 1;
34
+ `;
35
+
36
+ export const Title = styled.p`
37
+ color: ${semanticColors.info.text.feedback.strong};
38
+ font-weight: ${typographyTokens.fontWeights.semibold};
39
+ font-size: ${typographyTokens.fontSizes.bodyM};
40
+ margin: 0 0 ${semanticSizes.global.gap.xs} 0;
41
+ `;
42
+
43
+ export const Description = styled.p`
44
+ color: ${primitiveColors.gray[800]};
45
+ font-size: ${typographyTokens.fontSizes.bodyS};
46
+ margin: 0;
47
+ `;
48
+
49
+ export const CloseButton = styled.button`
50
+ background: transparent;
51
+ border: none;
52
+ padding: 0;
53
+ cursor: pointer;
54
+ color: ${primitiveColors.gray[600]};
55
+ line-height: 0;
56
+ `;
@@ -1,37 +1,43 @@
1
- import React, { useEffect } from "react";
2
- import { X } from "lucide-react";
3
- import { CloseButton, Container, Content, Description, Title, Wrapper } from "./ModalAviso.styles";
4
- import { ModalAvisoProps } from "./ModalAviso.types";
5
-
6
- export const ModalAviso: React.FC<ModalAvisoProps> = ({
7
- title,
8
- description,
9
- onClose,
10
- }) => {
11
-
12
- useEffect(() => {
13
- if (onClose) {
14
- const timer = setTimeout(() => {
15
- onClose();
16
- }, 3000);
17
-
18
- return () => clearTimeout(timer);
19
- }
20
- }, [onClose]);
21
-
22
- return (
23
- <Wrapper>
24
- <Container>
25
- <Content>
26
- <Title>{title}</Title>
27
- <Description>{description}</Description>
28
- </Content>
29
- {onClose && (
30
- <CloseButton onClick={onClose}>
31
- <X size={22} />
32
- </CloseButton>
33
- )}
34
- </Container>
35
- </Wrapper>
36
- );
37
- };
1
+ import React, { useEffect } from 'react';
2
+ import { X } from 'lucide-react';
3
+ import {
4
+ CloseButton,
5
+ Container,
6
+ Content,
7
+ Description,
8
+ Title,
9
+ Wrapper,
10
+ } from './ModalAviso.styles';
11
+ import { ModalAvisoProps } from './ModalAviso.types';
12
+
13
+ export const ModalAviso: React.FC<ModalAvisoProps> = ({
14
+ title,
15
+ description,
16
+ onClose,
17
+ }) => {
18
+ useEffect(() => {
19
+ if (onClose) {
20
+ const timer = setTimeout(() => {
21
+ onClose();
22
+ }, 3000);
23
+
24
+ return () => clearTimeout(timer);
25
+ }
26
+ }, [onClose]);
27
+
28
+ return (
29
+ <Wrapper>
30
+ <Container>
31
+ <Content>
32
+ <Title>{title}</Title>
33
+ <Description>{description}</Description>
34
+ </Content>
35
+ {onClose && (
36
+ <CloseButton onClick={onClose}>
37
+ <X size={22} />
38
+ </CloseButton>
39
+ )}
40
+ </Container>
41
+ </Wrapper>
42
+ );
43
+ };
@@ -1,5 +1,5 @@
1
- export interface ModalAvisoProps {
2
- title: string;
3
- description: string;
4
- onClose?: () => void;
5
- }
1
+ export interface ModalAvisoProps {
2
+ title: string;
3
+ description: string;
4
+ onClose?: () => void;
5
+ }
@@ -1 +1 @@
1
- export { ModalAviso } from "./ModalAviso";
1
+ export { ModalAviso } from './ModalAviso';