@granto-umbrella/umbrella-components 2.3.22 → 3.0.0

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 (140) hide show
  1. package/dist/umbrella-components.css +1 -1
  2. package/dist/umbrella-components.es.js +42830 -62989
  3. package/dist/umbrella-components.umd.js +2104 -548
  4. package/package.json +10 -5
  5. package/src/assets/_banner_contato.png +0 -0
  6. package/src/assets/_logoUmbrella.svg +34 -0
  7. package/src/assets.d.ts +19 -0
  8. package/src/components/atoms/Badge/Badge.styles.ts +24 -17
  9. package/src/components/atoms/Badge/Badge.tsx +19 -11
  10. package/src/components/atoms/Badge/Badge.types.ts +3 -2
  11. package/src/components/atoms/Breadcrumb/Breadcrumb.styles.ts +18 -11
  12. package/src/components/atoms/Breadcrumb/Breadcrumb.tsx +11 -3
  13. package/src/components/atoms/Button/Button.styles.ts +86 -12
  14. package/src/components/atoms/Button/Button.types.ts +6 -1
  15. package/src/components/atoms/Checkbox/Checkbox.styles.ts +4 -4
  16. package/src/components/atoms/Checkbox/Checkbox.tsx +2 -1
  17. package/src/components/atoms/CodeInput/CodeInput.styles.tsx +39 -0
  18. package/src/components/atoms/CodeInput/CodeInput.tsx +19 -0
  19. package/src/components/atoms/CodeInput/CodeInput.types.ts +3 -0
  20. package/src/components/atoms/CodeInput/index.tsx +1 -0
  21. package/src/components/atoms/DropDownMenu/DropdownMenu.styles.tsx +106 -0
  22. package/src/components/atoms/DropDownMenu/DropdownMenu.tsx +48 -0
  23. package/src/components/atoms/DropDownMenu/DropdownMenu.types.ts +15 -0
  24. package/src/components/atoms/DropDownMenu/index.tsx +2 -0
  25. package/src/components/atoms/ErrorMessage/ErrorMessage.styles.tsx +28 -0
  26. package/src/components/atoms/ErrorMessage/ErrorMessage.tsx +12 -0
  27. package/src/components/atoms/ErrorMessage/ErrorMessage.types.ts +6 -0
  28. package/src/components/atoms/ErrorMessage/index.tsx +1 -0
  29. package/src/components/atoms/Footer/Footer.styles.tsx +22 -0
  30. package/src/components/atoms/Footer/Footer.tsx +9 -0
  31. package/src/components/atoms/Footer/Footer.types.tsx +5 -0
  32. package/src/components/atoms/Footer/index.tsx +1 -0
  33. package/src/components/atoms/GenericContainer/GenericContainer.styles.tsx +21 -0
  34. package/src/components/atoms/GenericContainer/GenericContainer.tsx +9 -0
  35. package/src/components/atoms/GenericContainer/GenericContainer.types.ts +5 -0
  36. package/src/components/atoms/GenericContainer/index.tsx +1 -0
  37. package/src/components/atoms/Input/Input.styles.ts +24 -8
  38. package/src/components/atoms/Input/Input.tsx +10 -9
  39. package/src/components/atoms/Input/Input.types.ts +4 -25
  40. package/src/components/atoms/Label/Label.styles.ts +8 -7
  41. package/src/components/atoms/Loading/Loading.styles.tsx +23 -0
  42. package/src/components/atoms/Loading/Loading.tsx +8 -0
  43. package/src/components/atoms/Loading/index.tsx +1 -0
  44. package/src/components/atoms/LogoContainer/LogoContainer.Types.tsx +5 -0
  45. package/src/components/atoms/LogoContainer/LogoContainer.styles.tsx +11 -0
  46. package/src/components/atoms/LogoContainer/LogoContainer.tsx +11 -0
  47. package/src/components/atoms/LogoContainer/index.tsx +1 -0
  48. package/src/components/atoms/ModalAviso/ModalAviso.styles.tsx +54 -0
  49. package/src/components/atoms/ModalAviso/ModalAviso.tsx +37 -0
  50. package/src/components/atoms/ModalAviso/ModalAviso.types.ts +5 -0
  51. package/src/components/atoms/ModalAviso/index.tsx +1 -0
  52. package/src/components/atoms/MultiSelect/MultiSelect.styles.tsx +92 -0
  53. package/src/components/atoms/MultiSelect/MultiSelect.tsx +346 -0
  54. package/src/components/atoms/MultiSelect/MultiSelect.types.ts +38 -0
  55. package/src/components/atoms/MultiSelect/index.tsx +1 -0
  56. package/src/components/atoms/RadioButton/RadioButton.styles.ts +3 -2
  57. package/src/components/atoms/RadioButton/RadioButton.tsx +1 -0
  58. package/src/components/atoms/ResendLink/ResendLink.styles.tsx +20 -0
  59. package/src/components/atoms/ResendLink/ResendLink.tsx +16 -0
  60. package/src/components/atoms/ResendLink/ResendLink.types.ts +9 -0
  61. package/src/components/atoms/ResendLink/index.tsx +1 -0
  62. package/src/components/atoms/Select/Select.styles.ts +81 -23
  63. package/src/components/atoms/Select/Select.tsx +17 -30
  64. package/src/components/atoms/Select/Select.types.ts +17 -9
  65. package/src/components/atoms/Subtitle/Subtitle.styles.tsx +21 -0
  66. package/src/components/atoms/Subtitle/Subtitle.tsx +7 -0
  67. package/src/components/atoms/Subtitle/Subtitle.types.ts +5 -0
  68. package/src/components/atoms/Subtitle/index.tsx +1 -0
  69. package/src/components/atoms/Switch/Switch.styles.ts +13 -8
  70. package/src/components/atoms/Switch/Switch.tsx +1 -1
  71. package/src/components/atoms/Tapbar/Tapbar.styles.tsx +57 -0
  72. package/src/components/atoms/Tapbar/Tapbar.tsx +24 -0
  73. package/src/components/atoms/Tapbar/Tapbar.types.ts +11 -0
  74. package/src/components/atoms/Tapbar/index.tsx +2 -0
  75. package/src/components/atoms/Text/Text.styles.tsx +8 -5
  76. package/src/components/atoms/Text/Text.tsx +2 -0
  77. package/src/components/atoms/Textarea/Textarea.styles.ts +7 -8
  78. package/src/components/atoms/Textarea/Textarea.tsx +1 -1
  79. package/src/components/atoms/Title/Title.styles.tsx +17 -0
  80. package/src/components/atoms/Title/Title.tsx +7 -0
  81. package/src/components/atoms/Title/Title.types.ts +5 -0
  82. package/src/components/atoms/Title/index.tsx +1 -0
  83. package/src/components/molecules/BannerAjuda/BannerAjuda.styles.tsx +9 -0
  84. package/src/components/molecules/BannerAjuda/BannerAjuda.tsx +19 -0
  85. package/src/components/molecules/BannerAjuda/BannerAjuda.types.ts +5 -0
  86. package/src/components/molecules/BannerAjuda/index.tsx +1 -0
  87. package/src/components/molecules/ButtonGroup/ButtonGroup.tsx +12 -6
  88. package/src/components/molecules/ButtonGroup/ButtonGroup.types.ts +16 -2
  89. package/src/components/molecules/CodeInputContainer/CodeInputContainer.styles.tsx +7 -0
  90. package/src/components/molecules/CodeInputContainer/CodeInputContainer.tsx +32 -0
  91. package/src/components/molecules/CodeInputContainer/CodeInputContainer.types.ts +13 -0
  92. package/src/components/molecules/CodeInputContainer/index.tsx +3 -0
  93. package/src/components/molecules/ExcludeModal/ExcludeModal.styles.tsx +118 -0
  94. package/src/components/molecules/ExcludeModal/ExcludeModal.tsx +48 -0
  95. package/src/components/molecules/ExcludeModal/ExcludeModal.types.ts +10 -0
  96. package/src/components/molecules/ExcludeModal/index.tsx +1 -0
  97. package/src/components/molecules/HighlightsCard/HighlightsCard.styles.tsx +68 -0
  98. package/src/components/molecules/HighlightsCard/HighlightsCard.tsx +26 -0
  99. package/src/components/molecules/HighlightsCard/HighlightsCard.types.ts +10 -0
  100. package/src/components/molecules/HighlightsCard/index.tsx +1 -0
  101. package/src/components/molecules/InsuranceCard/InsuranceCard.styles.tsx +174 -0
  102. package/src/components/molecules/InsuranceCard/InsuranceCard.tsx +418 -0
  103. package/src/components/molecules/InsuranceCard/InsuranceCard.types.ts +32 -0
  104. package/src/components/molecules/InsuranceCard/index.tsx +1 -0
  105. package/src/components/molecules/PieChartComponent/PieChartComponent.styles.tsx +8 -0
  106. package/src/components/molecules/PieChartComponent/PieChartComponent.tsx +73 -0
  107. package/src/components/molecules/PieChartComponent/PieChartComponent.types.ts +11 -0
  108. package/src/components/molecules/PieChartComponent/index.tsx +1 -0
  109. package/src/components/molecules/RadioGroupField/RadioGroupField.styles.tsx +64 -0
  110. package/src/components/molecules/RadioGroupField/RadioGroupField.tsx +69 -0
  111. package/src/components/molecules/RadioGroupField/RadioGroupField.types.ts +17 -0
  112. package/src/components/molecules/RadioGroupField/index.tsx +1 -0
  113. package/src/components/molecules/RefuseModal/RefuseModal.styles.tsx +139 -0
  114. package/src/components/molecules/RefuseModal/RefuseModal.tsx +76 -0
  115. package/src/components/molecules/RefuseModal/RefuseModal.types.ts +15 -0
  116. package/src/components/molecules/RefuseModal/index.tsx +2 -0
  117. package/src/components/molecules/ResultsChart/ResultsChart.styles.tsx +22 -0
  118. package/src/components/molecules/ResultsChart/ResultsChart.tsx +19 -0
  119. package/src/components/molecules/ResultsChart/ResultsChart.types.ts +3 -0
  120. package/src/components/molecules/ResultsChart/index.tsx +2 -0
  121. package/src/components/molecules/TimeLine/TimeLine.styles.ts +118 -0
  122. package/src/components/molecules/TimeLine/TimeLine.tsx +38 -0
  123. package/src/components/molecules/TimeLine/TimeLine.types.ts +35 -0
  124. package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.styles.tsx +113 -0
  125. package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.tsx +71 -0
  126. package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.types.ts +9 -0
  127. package/src/components/organisms/DonutEmissionsChart/index.tsx +2 -0
  128. package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.styles.tsx +114 -0
  129. package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.tsx +89 -0
  130. package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.types.ts +16 -0
  131. package/src/components/organisms/ListagemUltimasEmissoes/index.tsx +1 -0
  132. package/src/components/organisms/TimelineModal/TimelineModal.styles.ts +49 -0
  133. package/src/components/organisms/TimelineModal/TimelineModal.tsx +37 -0
  134. package/src/global.d.ts +6 -0
  135. package/src/index.ts +69 -36
  136. package/src/lib/helpers.ts +17 -0
  137. package/src/styles/tokens/colors.ts +102 -96
  138. package/src/styles/tokens/shadows.ts +3 -3
  139. package/src/styles/tokens/sizes.ts +12 -1
  140. package/src/styles/tokens/typography.ts +148 -123
@@ -0,0 +1,106 @@
1
+ import styled, { css } from 'styled-components';
2
+ import {
3
+ semanticBorders,
4
+ semanticColors,
5
+ semanticRadius,
6
+ semanticShadows,
7
+ semanticSizes,
8
+ typographyTokens,
9
+ } from '../../../styles/tokens';
10
+ import { Variant } from './DropdownMenu.types';
11
+
12
+ export const Wrapper = styled.div`
13
+ position: relative;
14
+ display: inline-flex;
15
+ justify-content: flex-start;
16
+ `;
17
+
18
+ export const ToggleButton = styled.button<{
19
+ $variant: Variant;
20
+ $open: boolean;
21
+ }>`
22
+ display: flex;
23
+ align-items: center;
24
+ justify-content: space-between;
25
+ gap: ${semanticSizes.global.gap.sm};
26
+ padding: ${semanticSizes.global.padding.lg};
27
+ height: ${semanticSizes.global.spacings.lg};
28
+ font-size: ${typographyTokens.fontSizes.labelS};
29
+ border: none;
30
+ border-radius: ${semanticRadius.global.radius.md};
31
+ cursor: pointer;
32
+ transition: opacity 0.2s;
33
+ min-width: 160px;
34
+
35
+ ${(props) =>
36
+ props.$variant === 'light'
37
+ ? css`
38
+ background-color: ${semanticColors.branding.border.enabled};
39
+ color: ${semanticColors.branding.text.onSurfaceAccent.enabled};
40
+ `
41
+ : css`
42
+ background-color: ${semanticColors.global.surface.default};
43
+ color: ${semanticColors.branding.border.enabled};
44
+ border: ${semanticBorders.global.sm} solid
45
+ ${semanticColors.branding.border.enabled};
46
+ `}
47
+
48
+ &:hover {
49
+ opacity: 0.9;
50
+ }
51
+ `;
52
+
53
+ export const LabelText = styled.span`
54
+ font-weight: ${typographyTokens.fontWeights.medium};
55
+ `;
56
+
57
+ export const Menu = styled.div<{ $variant: Variant }>`
58
+ position: absolute;
59
+ top: calc(100% + ${semanticSizes.global.gap.xs});
60
+ right: 0;
61
+ width: 100%;
62
+ padding: ${semanticSizes.global.padding.sm} 0;
63
+ border-radius: ${semanticRadius.global.radius.md};
64
+ box-shadow: ${semanticShadows.shadow.default};
65
+ display: grid;
66
+ gap: ${semanticSizes.global.gap.xs};
67
+ z-index: 10;
68
+
69
+ ${(props) =>
70
+ props.$variant === 'light'
71
+ ? css`
72
+ background-color: ${semanticColors.global.surface.default};
73
+ color: ${semanticColors.global.text.default.enabled};
74
+ `
75
+ : css`
76
+ background-color: ${semanticColors.branding.surface.enabled};
77
+ color: ${semanticColors.branding.text.onSurfaceAccent.enabled};
78
+ `}
79
+ `;
80
+
81
+ export const Item = styled.div`
82
+ display: inline-grid;
83
+ grid-auto-flow: column;
84
+ align-items: center;
85
+ justify-content: flex-start;
86
+ gap: ${semanticSizes.global.gap.sm};
87
+ padding: ${semanticSizes.global.padding.sm} ${semanticSizes.global.padding.lg};
88
+ font-size: ${typographyTokens.fontSizes.labelS};
89
+ cursor: pointer;
90
+
91
+ &:hover {
92
+ background-color: ${semanticColors.neutral['100']};
93
+ }
94
+ `;
95
+
96
+ export const IconWrapper = styled.span`
97
+ display: flex;
98
+ align-items: center;
99
+ justify-content: center;
100
+ flex-shrink: 0;
101
+ `;
102
+
103
+ export const ItemLabel = styled.span`
104
+ flex: 1;
105
+ text-align: left;
106
+ `;
@@ -0,0 +1,48 @@
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";
@@ -0,0 +1,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
+ }
@@ -0,0 +1,2 @@
1
+ export { DropdownMenu, DropdownMenuItem } from "./DropdownMenu";
2
+ export type { DropdownMenuProps, DropdownMenuItemProps } from "./DropdownMenu.types";
@@ -0,0 +1,28 @@
1
+ import styled, { css } from "styled-components";
2
+ import {
3
+ semanticBorders,
4
+ semanticColors,
5
+ semanticSizes,
6
+ typographyTokens,
7
+ } from "@granto-umbrella/umbrella-components";
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
+ `;
@@ -0,0 +1,12 @@
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;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+
3
+ export interface ErrorMessageProps {
4
+ children: React.ReactNode;
5
+ type?: "error" | "success" ;
6
+ }
@@ -0,0 +1 @@
1
+ export { default } from "./ErrorMessage";
@@ -0,0 +1,22 @@
1
+ import styled from "styled-components";
2
+ import {
3
+ semanticSizes,
4
+ semanticColors,
5
+ primitiveSizes,
6
+ typographyTokens,
7
+ } from "@granto-umbrella/umbrella-components";
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
+ `;
@@ -0,0 +1,9 @@
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;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+
3
+ export interface FooterProps {
4
+ children: React.ReactNode;
5
+ }
@@ -0,0 +1 @@
1
+ export { default } from "./Footer";
@@ -0,0 +1,21 @@
1
+ import styled from "styled-components";
2
+ import {
3
+ semanticColors,
4
+ semanticSizes,
5
+ typographyTokens,
6
+ } from "@granto-umbrella/umbrella-components";
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
+ `;
@@ -0,0 +1,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
+ };
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+
3
+ export interface GenericContainerProps {
4
+ children: React.ReactNode;
5
+ }
@@ -0,0 +1 @@
1
+ export { GenericContainer } from "./GenericContainer";
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import styled, { css } from 'styled-components';
2
2
  import {
3
3
  semanticColors,
4
4
  semanticShadows,
@@ -7,7 +7,22 @@ import {
7
7
  semanticSizes,
8
8
  semanticBorders,
9
9
  typographyTokens,
10
- } from "../../../styles/tokens";
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
+ };
11
26
 
12
27
  export const Container = styled.div`
13
28
  display: flex;
@@ -34,19 +49,20 @@ export const InputWrapper = styled.div<{
34
49
  $disabled?: boolean;
35
50
  $radius?: keyof typeof semanticRadius.global.radius;
36
51
  $shadow?: keyof typeof semanticShadows.shadow;
52
+ $size: keyof typeof inputSizes;
37
53
  }>`
38
54
  display: flex;
39
55
  align-items: center;
40
- padding: ${semanticSizes.global.padding.md} ${semanticSizes.global.padding.lg};
41
- gap: ${semanticSizes.global.gap.md};
42
56
 
43
- box-shadow: ${({ $shadow }) => semanticShadows.shadow[$shadow || "default"]};
57
+ ${({ $size }) => inputSizes[$size]}
58
+
59
+ box-shadow: ${({ $shadow }) => semanticShadows.shadow[$shadow || 'default']};
44
60
  border-radius: ${semanticBorders.global.lg};
45
61
  border: 1px solid
46
62
  ${({ $error }) =>
47
63
  $error
48
64
  ? semanticColors.danger.border.enabled
49
- : semanticColors.neutral[300]};
65
+ : semanticColors.global.border.medium};
50
66
  background-color: ${({ $disabled }) =>
51
67
  $disabled ? semanticColors.neutral[100] : semanticColors.base.background};
52
68
  transition: border-color 0.2s, box-shadow 0.2s;
@@ -65,10 +81,10 @@ export const StyledInput = styled.input`
65
81
  border: none;
66
82
  outline: none;
67
83
  font-size: ${typographyTokens.fontSizes.labelM};
68
- color: ${semanticColors.global.text.onSurface.enabled};
84
+ color: ${semanticColors.global.text.default.enabled};
69
85
 
70
86
  &::placeholder {
71
- color: ${semanticColors.neutral[300]};
87
+ color: ${semanticColors.global.text.onSurface.enabled};
72
88
  }
73
89
 
74
90
  &:disabled {
@@ -1,5 +1,5 @@
1
- import React, { forwardRef } from "react";
2
- import { InputProps } from "./Input.types";
1
+ import React, { forwardRef } from 'react';
2
+ import { InputProps } from './Input.types';
3
3
  import {
4
4
  Container,
5
5
  Label,
@@ -7,14 +7,14 @@ import {
7
7
  StyledInput,
8
8
  Icon,
9
9
  SupportText,
10
- } from "./Input.styles";
10
+ } from './Input.styles';
11
11
 
12
12
  function mergeRefs<T>(
13
13
  ...refs: (React.Ref<T> | null | undefined)[]
14
14
  ): React.RefCallback<T> {
15
15
  return (value: T) => {
16
16
  refs.forEach((ref) => {
17
- if (typeof ref === "function") {
17
+ if (typeof ref === 'function') {
18
18
  ref(value);
19
19
  } else if (ref != null) {
20
20
  (ref as React.MutableRefObject<T | null>).current = value;
@@ -26,8 +26,8 @@ function mergeRefs<T>(
26
26
  const Input = forwardRef<HTMLInputElement, InputProps>(
27
27
  (
28
28
  {
29
- type = "text",
30
- placeholder = "",
29
+ type = 'text',
30
+ placeholder = '',
31
31
  value,
32
32
  onChange,
33
33
  error = false,
@@ -35,8 +35,9 @@ const Input = forwardRef<HTMLInputElement, InputProps>(
35
35
  icon,
36
36
  label,
37
37
  supportText,
38
- radius = "md" as "md" | "lg" | "sm" | "full",
39
- shadow = "default" as "none" | "default" | "md" | "lg",
38
+ size = 'md',
39
+ radius = 'md' as 'md' | 'lg' | 'sm' | 'full',
40
+ shadow = 'default' as 'none' | 'default' | 'md' | 'lg',
40
41
  style,
41
42
  register,
42
43
  testId,
@@ -53,6 +54,7 @@ const Input = forwardRef<HTMLInputElement, InputProps>(
53
54
  $disabled={disabled}
54
55
  $radius={radius}
55
56
  $shadow={shadow}
57
+ $size={size}
56
58
  >
57
59
  {icon && <Icon>{icon}</Icon>}
58
60
  <StyledInput
@@ -75,5 +77,4 @@ const Input = forwardRef<HTMLInputElement, InputProps>(
75
77
  );
76
78
  }
77
79
  );
78
-
79
80
  export default Input;
@@ -11,31 +11,10 @@ export interface InputProps {
11
11
  icon?: React.ReactNode;
12
12
  label?: string;
13
13
  supportText?: string;
14
- size?:
15
- | "quarter"
16
- | "half"
17
- | "x1"
18
- | "x2"
19
- | "x3"
20
- | "x4"
21
- | "x5"
22
- | "x6"
23
- | "x7"
24
- | "x8"
25
- | "x9"
26
- | "x10"
27
- | "x11"
28
- | "x12"
29
- | "x13"
30
- | "x14"
31
- | "x15"
32
- | "x16"
33
- | "md"
34
- | "lg"
35
- | "sm"
36
- | "full";
37
- radius?: "md" | "lg" | "sm" | "full";
38
- shadow?: "none" | "default" | "md" | "lg";
14
+ size?: 'sm' | 'md' | 'lg';
15
+
16
+ radius?: 'md' | 'lg' | 'sm' | 'full';
17
+ shadow?: 'none' | 'default' | 'md' | 'lg';
39
18
  style?: React.CSSProperties;
40
19
  register?: any;
41
20
  testId?: string;
@@ -1,14 +1,15 @@
1
1
  // Label.styled.tsx
2
- import styled from "styled-components";
3
- import * as LabelPrimitive from "@radix-ui/react-label";
2
+ import styled from 'styled-components';
3
+ import * as LabelPrimitive from '@radix-ui/react-label';
4
+ import { typographyTokens } from '../../../styles/tokens/typography';
4
5
 
5
6
  export const StyledLabel = styled(LabelPrimitive.Root)`
6
- font-size: 0.875rem; /* Equivalente a text-sm */
7
- font-weight: 500; /* Equivalente a font-medium */
8
- line-height: 1; /* Equivalente a leading-none */
7
+ font-size: ${typographyTokens.fontSizes.labelS};
8
+ font-weight: ${typographyTokens.fontWeights.medium};
9
9
 
10
- /* Simula o comportamento de desabilitado */
11
- &[data-disabled="true"] {
10
+ line-height: ${typographyTokens.lineHeights.labelS};
11
+ font-family: ${typographyTokens.fontFamily.base};
12
+ &[data-disabled='true'] {
12
13
  cursor: not-allowed;
13
14
  opacity: 0.7;
14
15
  }
@@ -0,0 +1,23 @@
1
+ import styled, { keyframes } from "styled-components";
2
+ import {
3
+ semanticBorders,
4
+ semanticColors,
5
+ semanticRadius,
6
+ semanticSizes,
7
+ } from "@granto-umbrella/umbrella-components";
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 ${semanticColors.global.border.default};
18
+ border-top: ${semanticBorders.global.lg} solid ${semanticColors.info.border.feedback};
19
+ border-radius: ${semanticRadius.global.radius.full};
20
+ width: ${semanticSizes.global.spacings.md};
21
+ height: ${semanticSizes.global.spacings.md};
22
+ animation: ${spin} 1s linear infinite;
23
+ `;
@@ -0,0 +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;
@@ -0,0 +1 @@
1
+ export { default } from './Loading';
@@ -0,0 +1,5 @@
1
+ export interface LogoContainerProps {
2
+ src: string;
3
+ alt?: string;
4
+ margintBottom?: string;
5
+ }
@@ -0,0 +1,11 @@
1
+ import styled from "styled-components";
2
+ import { primitiveSizes } from "@granto-umbrella/umbrella-components";
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
+ `;
@@ -0,0 +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
+ };
@@ -0,0 +1 @@
1
+ export { LogoContainer } from "./LogoContainer";
@@ -0,0 +1,54 @@
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
+
11
+ export const Wrapper = styled.div`
12
+ position: fixed;
13
+ bottom: calc(${semanticSizes.global.spacings.lg} + 10px);
14
+ right: ${semanticSizes.global.padding.lg};
15
+ z-index: 9999;
16
+ `;
17
+
18
+ export const Container = styled.div`
19
+ background-color: ${primitiveColors.purple[100]};
20
+ border-radius: ${semanticRadius.global.radius.md2};
21
+ border: ${semanticBorders.global.md} solid ${primitiveColors.purple[1200]};
22
+ padding: ${semanticSizes.global.padding.md} ${semanticSizes.global.padding.lg};
23
+ display: flex;
24
+ align-items: start;
25
+ justify-content: space-between;
26
+ gap: ${semanticSizes.global.gap.md};
27
+ max-width: 600px;
28
+ `;
29
+
30
+ export const Content = styled.div`
31
+ flex: 1;
32
+ `;
33
+
34
+ export const Title = styled.p`
35
+ color: ${primitiveColors.gray[1100]};
36
+ font-weight: ${typographyTokens.fontWeights.semibold};
37
+ font-size: ${typographyTokens.fontSizes.bodyM};
38
+ margin: 0 0 ${semanticSizes.global.gap.xs} 0;
39
+ `;
40
+
41
+ export const Description = styled.p`
42
+ color: ${primitiveColors.gray[800]};
43
+ font-size: ${typographyTokens.fontSizes.bodyS};
44
+ margin: 0;
45
+ `;
46
+
47
+ export const CloseButton = styled.button`
48
+ background: transparent;
49
+ border: none;
50
+ padding: 0;
51
+ cursor: pointer;
52
+ color: ${primitiveColors.gray[600]};
53
+ line-height: 0;
54
+ `;
@@ -0,0 +1,37 @@
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
+ };