@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
@@ -1,13 +1,14 @@
1
- import styled from "styled-components";
2
- import Select from "react-select";
1
+ import styled from 'styled-components';
2
+ import Select from 'react-select';
3
3
  import {
4
- semanticColors,
5
- semanticRadius,
6
4
  semanticSizes,
7
5
  semanticShadows,
8
6
  primitiveSizes,
9
7
  typographyTokens,
10
- } from "../../../styles/tokens";
8
+ semanticBorders,
9
+ semanticColors,
10
+ semanticRadius,
11
+ } from '../../../styles/tokens/index';
11
12
 
12
13
  export const Container = styled.div`
13
14
  display: flex;
@@ -25,68 +26,125 @@ export const Label = styled.label`
25
26
  font-weight: ${typographyTokens.fontWeights.medium};
26
27
  `;
27
28
 
28
- export const SupportingText = styled.span`
29
+ export const SupportingText = styled.span<{ $error?: boolean }>`
29
30
  font-size: ${typographyTokens.fontSizes.captionM};
30
- color: ${semanticColors.global.text.subtitle.enabled};
31
+ color: ${({ $error }) =>
32
+ $error
33
+ ? semanticColors.global.text.feedback.strong.error
34
+ : semanticColors.global.text.subtitle.enabled};
31
35
  `;
32
36
 
33
37
  export const CustomSelect = styled(Select).attrs({
34
- classNamePrefix: "react-select",
35
- })<{ $size?: keyof typeof semanticSizes.global.padding }>`
38
+ classNamePrefix: 'react-select',
39
+ })<{
40
+ $size?: keyof typeof semanticSizes.global.padding;
41
+ $error?: boolean;
42
+ }>`
36
43
  .react-select__control {
37
44
  background: ${semanticColors.base.background};
38
- border: 1px solid ${semanticColors.neutral[300]};
45
+ border: ${semanticBorders.global.sm} solid
46
+ ${({ $error }) =>
47
+ $error
48
+ ? semanticColors.global.border.danger.enabled
49
+ : semanticColors.global.border.medium};
39
50
  border-radius: ${semanticRadius.global.radius.md};
40
- box-shadow: ${semanticShadows.shadow};
51
+ box-shadow: ${semanticShadows.shadow.default};
41
52
  transition: border-color 0.2s, box-shadow 0.2s;
42
- min-height: ${primitiveSizes.size.x4};
53
+ min-height: ${primitiveSizes.size.x12};
43
54
 
44
55
  &:hover {
45
- border-color: ${semanticColors.branding.border.hover};
56
+ border-color: ${({ $error }) =>
57
+ $error
58
+ ? semanticColors.danger.border.hover
59
+ : semanticColors.branding.border.hover};
46
60
  }
47
61
 
48
62
  &:focus-within {
49
- border-color: ${semanticColors.branding.border.enabled};
50
- box-shadow: ${semanticShadows.shadow};
63
+ border-color: ${({ $error }) =>
64
+ $error
65
+ ? semanticColors.danger.border.enabled
66
+ : semanticColors.branding.border.enabled};
67
+ box-shadow: ${semanticShadows.shadow.md};
68
+ }
69
+
70
+ &.react-select__control--is-disabled {
71
+ background: ${semanticColors.global.surface.disabled};
72
+ border-color: ${semanticColors.global.border.strong};
73
+ color: ${semanticColors.global.text.onSurface.enabled};
74
+ cursor: not-allowed;
51
75
  }
52
76
  }
53
77
 
54
78
  .react-select__value-container {
55
- padding: ${({ $size = "sm" }) => semanticSizes.global.padding[$size]};
79
+ padding: ${({ $size = 'md' }) => semanticSizes.global.padding[$size]};
56
80
  font-size: ${typographyTokens.fontSizes.labelM};
57
81
  color: ${semanticColors.base.text};
58
82
  }
59
83
 
84
+ .react-select__placeholder {
85
+ color: ${semanticColors.global.text.onSurface.subtitle};
86
+ font-size: ${typographyTokens.fontSizes.labelM};
87
+ }
88
+
60
89
  .react-select__menu {
61
90
  background: ${semanticColors.base.background};
62
91
  border-radius: ${semanticRadius.global.radius.md};
63
- box-shadow: ${semanticShadows.shadow};
92
+ box-shadow: ${semanticShadows.shadow.lg};
93
+ border: ${semanticBorders.global.sm} solid
94
+ ${semanticColors.global.border.default};
95
+ z-index: 1000;
64
96
  }
65
97
 
66
98
  .react-select__option {
67
- padding: ${({ $size = "sm" }) => semanticSizes.global.padding[$size]};
99
+ padding: ${({ $size = 'md' }) => semanticSizes.global.padding[$size]};
68
100
  font-size: ${typographyTokens.fontSizes.labelM};
69
101
  cursor: pointer;
70
102
  transition: background 0.2s, color 0.2s;
103
+ color: ${semanticColors.base.text};
71
104
 
72
105
  &:hover {
73
106
  background: ${semanticColors.branding.surface.hover};
74
- color: ${semanticColors.base.background};
107
+ color: ${semanticColors.branding.text.onSurfaceAccent.enabled};
75
108
  }
76
109
 
77
110
  &:active {
78
111
  background: ${semanticColors.branding.surface.pressed};
79
- color: ${semanticColors.base.background};
112
+ color: ${semanticColors.branding.text.onSurfaceAccent.enabled};
80
113
  }
81
114
  }
82
115
 
83
116
  .react-select__option--is-selected {
84
117
  background: ${semanticColors.branding.surface.enabled};
85
- color: ${semanticColors.base.background};
86
- font-weight: bold;
118
+ color: ${semanticColors.branding.text.onSurfaceAccent.enabled};
119
+ font-weight: ${typographyTokens.fontWeights.semibold};
120
+
121
+ &:hover {
122
+ background: ${semanticColors.branding.surface.hover};
123
+ }
124
+ }
125
+
126
+ .react-select__option--is-focused {
127
+ background: ${semanticColors.neutral[100]};
128
+ color: ${semanticColors.base.text};
87
129
  }
88
130
 
89
131
  .react-select__indicator-separator {
90
- background-color: ${semanticColors.base.background};
132
+ background-color: ${semanticColors.global.border.medium};
133
+ }
134
+
135
+ .react-select__dropdown-indicator {
136
+ color: ${semanticColors.global.text.onSurface.enabled};
137
+
138
+ &:hover {
139
+ color: ${semanticColors.branding.text.accent.enabled};
140
+ }
141
+ }
142
+
143
+ .react-select__clear-indicator {
144
+ color: ${semanticColors.global.text.onSurface.enabled};
145
+
146
+ &:hover {
147
+ color: ${semanticColors.danger.text.enabled};
148
+ }
91
149
  }
92
150
  `;
@@ -1,27 +1,12 @@
1
- import React from "react";
2
- import {
3
- Container,
4
- Label,
5
- SupportingText,
6
- CustomSelect,
7
- } from "./Select.styles";
8
- import { semanticSizes } from "../../../styles/tokens";
1
+ "use client"
2
+
3
+ import type React from "react"
4
+ import { Container, Label, SupportingText, CustomSelect } from "./Select.styles"
5
+ import type { SelectProps } from "./Select.types"
9
6
 
10
7
  interface Option {
11
- label: string;
12
- value: string;
13
- }
14
- interface SelectProps {
15
- label: string;
16
- supportingText?: string;
17
- placeholder?: string;
18
- borderColor?: string;
19
- borderRadius?: string;
20
- size?: keyof typeof semanticSizes.global.padding;
21
- options: { label: string; value: string }[];
22
- onChange?: (newValue: Option | null, actionMeta: { action: string }) => void;
23
- value?: Option | null;
24
- testId?: string;
8
+ label: string
9
+ value: string
25
10
  }
26
11
 
27
12
  const Select: React.FC<SelectProps> = ({
@@ -33,24 +18,26 @@ const Select: React.FC<SelectProps> = ({
33
18
  value,
34
19
  testId,
35
20
  size = "md",
21
+ disabled = false,
22
+ error = false,
36
23
  }) => {
37
24
  return (
38
- <Container data-testid={testId}>
25
+ <Container data-testid={testId} id={testId}>
39
26
  {label && <Label>{label}</Label>}
40
27
  <CustomSelect
41
28
  $size={size}
29
+ $error={error}
42
30
  classNamePrefix="react-select"
43
31
  options={options}
44
32
  placeholder={placeholder || "Selecione"}
45
- onChange={(newValue, actionMeta) =>
46
- onChange && onChange(newValue as Option | null, actionMeta)
47
- }
33
+ onChange={(newValue, actionMeta) => onChange && onChange(newValue as Option | null, actionMeta)}
48
34
  value={value}
49
35
  isSearchable
36
+ isDisabled={disabled}
50
37
  />
51
- {supportingText && <SupportingText>{supportingText}</SupportingText>}
38
+ {supportingText && <SupportingText $error={error}>{supportingText}</SupportingText>}
52
39
  </Container>
53
- );
54
- };
40
+ )
41
+ }
55
42
 
56
- export default Select;
43
+ export default Select
@@ -1,11 +1,19 @@
1
- import React from "react";
1
+ interface Option {
2
+ label: string;
3
+ value: string;
4
+ }
2
5
 
3
- export interface SelectProps
4
- extends React.SelectHTMLAttributes<HTMLSelectElement> {
5
- customSize?: "xs" | "sm" | "md" | "lg";
6
- variant?: "primary" | "outline" | "danger" | "ghost";
7
- radius?: "sm" | "md" | "lg" | "xl" | "2xl" | "full";
8
- isLoading?: boolean;
9
- leftIcon?: React.ReactNode;
10
- rightIcon?: React.ReactNode;
6
+ export interface SelectProps {
7
+ label: string;
8
+ supportingText?: string;
9
+ placeholder?: string;
10
+ borderColor?: string;
11
+ borderRadius?: string;
12
+ size?: 'sm' | 'md' | 'lg';
13
+ options: { label: string; value: string }[];
14
+ onChange?: (newValue: Option | null, actionMeta: { action: string }) => void;
15
+ value?: Option | null;
16
+ testId?: string;
17
+ disabled?: boolean;
18
+ error?: boolean;
11
19
  }
@@ -0,0 +1,21 @@
1
+ import styled from "styled-components";
2
+ import {
3
+ semanticSizes,
4
+ typographyTokens,
5
+ semanticColors,
6
+ } from "../../../styles/tokens";
7
+
8
+ export const Container = styled.div`
9
+ width: 325px;
10
+ color: ${semanticColors.neutral[700]};
11
+ text-align: center;
12
+ font-family: "Mulish", sans-serif;
13
+ font-size: ${typographyTokens.fontSizes.bodyM};
14
+ font-weight: 400;
15
+ line-height: 125%;
16
+
17
+ margin-bottom: ${semanticSizes.global.padding.lg};
18
+ @media (max-width: 768px) {
19
+ font-size: ${typographyTokens.fontSizes.bodyS};
20
+ }
21
+ `;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { Container } from "./Subtitle.styles";
3
+ import { SubtitleProps } from "./Subtitle.types";
4
+
5
+ export const Subtitle: React.FC<SubtitleProps> = ({ children }) => {
6
+ return <Container>{children}</Container>;
7
+ };
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+
3
+ export interface SubtitleProps {
4
+ children: React.ReactNode;
5
+ }
@@ -0,0 +1 @@
1
+ export { Subtitle } from "./Subtitle";
@@ -1,10 +1,10 @@
1
- import styled from "styled-components";
1
+ import styled from 'styled-components';
2
2
  import {
3
3
  semanticColors,
4
4
  semanticSizes,
5
5
  semanticRadius,
6
6
  typographyTokens,
7
- } from "../../../styles/tokens";
7
+ } from '../../../styles/tokens';
8
8
 
9
9
  export const SwitchWrapper = styled.label`
10
10
  display: flex;
@@ -15,14 +15,14 @@ export const SwitchWrapper = styled.label`
15
15
  cursor: pointer;
16
16
  `;
17
17
 
18
- export const SwitchInput = styled.input.attrs({ type: "checkbox" })`
18
+ export const SwitchInput = styled.input.attrs({ type: 'checkbox' })`
19
19
  appearance: none;
20
20
  width: ${semanticSizes.global.spacings.lg};
21
21
  height: ${semanticSizes.global.padding.xl};
22
22
  background: ${semanticColors.neutral[300]};
23
23
  border-radius: ${semanticRadius.global.radius.full};
24
24
  position: relative;
25
- transition: background 0.3s ease-in-out;
25
+ transition: background 0.3s ease-out;
26
26
  cursor: pointer;
27
27
 
28
28
  &:checked {
@@ -30,21 +30,26 @@ export const SwitchInput = styled.input.attrs({ type: "checkbox" })`
30
30
  }
31
31
 
32
32
  &::after {
33
- content: "";
34
- width: ${semanticSizes.global.padding.md};
35
- height: ${semanticSizes.global.padding.md};
33
+ content: '';
34
+ width: ${semanticSizes.global.padding.md}; // 12px circle
35
+ height: ${semanticSizes.global.padding.md}; // 12px circle
36
36
  background: ${semanticColors.base.background};
37
37
  border-radius: 50%;
38
38
  position: absolute;
39
39
  top: 50%;
40
40
  left: 4px;
41
41
  transform: translateY(-50%);
42
- transition: all 0.3s ease-in-out;
42
+ transition: all 0.3s ease-out;
43
43
  }
44
44
 
45
45
  &:checked::after {
46
46
  left: calc(100% - ${semanticSizes.global.padding.md} - 4px);
47
47
  }
48
+
49
+ &:disabled {
50
+ opacity: 0.5;
51
+ cursor: not-allowed;
52
+ }
48
53
  `;
49
54
 
50
55
  export const SwitchLabel = styled.span`
@@ -16,7 +16,7 @@ export const Switch: React.FC<SwitchProps> = ({
16
16
  return (
17
17
  <SwitchWrapper>
18
18
  {label && <SwitchLabel>{label}</SwitchLabel>}
19
- <SwitchInput data-testid={testId} {...props} />
19
+ <SwitchInput data-testid={testId} id={testId} {...props} />
20
20
  {text && <SwitchLabel>{text}</SwitchLabel>}
21
21
  </SwitchWrapper>
22
22
  );
@@ -0,0 +1,57 @@
1
+ import styled, { css } from "styled-components"
2
+ import { semanticColors, semanticSizes, semanticBorders, typographyTokens } from "../../../styles/tokens"
3
+
4
+ export const Wrapper = styled.nav`
5
+ display: flex;
6
+ width: 100%;
7
+ align-items: center;
8
+ border-bottom: ${semanticBorders.global.lg} solid ${semanticColors.global.border.medium};
9
+ `
10
+
11
+ export const Tab = styled.button<{ $active: boolean }>`
12
+ display: flex;
13
+ height: ${semanticSizes.global.spacings.lg};
14
+ padding: ${semanticSizes.global.padding.lg} ${semanticSizes.global.padding["3xl"]};
15
+ justify-content: center;
16
+ align-items: center;
17
+ gap: ${semanticSizes.global.gap.sm};
18
+ background: none;
19
+ border: none;
20
+ cursor: pointer;
21
+ font-family: ${typographyTokens.fontFamily.base};
22
+ font-size: ${typographyTokens.fontSizes.bodyM};
23
+ font-weight: ${typographyTokens.fontWeights.regular};
24
+ line-height: ${typographyTokens.lineHeights.bodyM};
25
+ color: ${semanticColors.global.text.onSurface.subtitle};
26
+ margin-bottom: calc(-1 * ${semanticBorders.global.lg});
27
+ border-bottom: ${semanticBorders.global.lg} solid transparent;
28
+
29
+ & + & {
30
+ margin-left: ${semanticSizes.global.padding.lg};
31
+ }
32
+
33
+ ${(p) =>
34
+ p.$active &&
35
+ css`
36
+ border-bottom-color: ${semanticColors.branding.border.enabled};
37
+ color: ${semanticColors.branding.text.accent.enabled};
38
+ `}
39
+
40
+ &:hover:not(:disabled) {
41
+ color: ${semanticColors.branding.text.accent.hover};
42
+ ${(p) =>
43
+ p.$active &&
44
+ css`
45
+ border-bottom-color: ${semanticColors.branding.border.hover};
46
+ `}
47
+ }
48
+
49
+ &:focus {
50
+ outline: none;
51
+ }
52
+ `
53
+
54
+ export const Count = styled.span`
55
+ font-weight: ${typographyTokens.fontWeights.medium};
56
+ color: inherit;
57
+ `
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ import { Count, Tab, Wrapper } from "./Tapbar.styles";
3
+ import { TapbarProps } from "./Tapbar.types";
4
+
5
+ export const Tapbar: React.FC<TapbarProps> = ({
6
+ items,
7
+ activeIndex,
8
+ onChange,
9
+ }) => (
10
+ <Wrapper>
11
+ {items.map((item, idx) => (
12
+ <Tab
13
+ key={idx}
14
+ $active={Boolean(idx === activeIndex)}
15
+ onClick={() => onChange(idx)}
16
+ data-testid={item.testId}
17
+ id={item.testId}
18
+ >
19
+ <span>{item.title}</span>
20
+ {typeof item.quantity === "number" && <Count>({item.quantity})</Count>}
21
+ </Tab>
22
+ ))}
23
+ </Wrapper>
24
+ );
@@ -0,0 +1,11 @@
1
+ export interface TabItem {
2
+ title: string;
3
+ quantity?: number;
4
+ testId?: string;
5
+ }
6
+
7
+ export interface TapbarProps {
8
+ items: TabItem[];
9
+ activeIndex: number;
10
+ onChange: (newIndex: number) => void;
11
+ }
@@ -0,0 +1,2 @@
1
+ export { Tapbar } from "./Tapbar";
2
+ export type { TapbarProps, TabItem } from "./Tapbar.types";
@@ -1,5 +1,8 @@
1
- import { semanticColors, typographyTokens } from "../../../styles/tokens";
2
- import styled from "styled-components";
1
+ import {
2
+ semanticColors,
3
+ typographyTokens
4
+ } from '../../../styles/tokens';
5
+ import styled from 'styled-components';
3
6
 
4
7
  export const StyledText = styled.p<{
5
8
  $size: string;
@@ -9,12 +12,12 @@ export const StyledText = styled.p<{
9
12
  display: flex;
10
13
  width: 100%;
11
14
  font-size: ${({ $size }) =>
12
- $size === "lg"
15
+ $size === 'lg'
13
16
  ? typographyTokens.fontSizes.bodyL
14
- : $size === "md"
17
+ : $size === 'md'
15
18
  ? typographyTokens.fontSizes.bodyM
16
19
  : typographyTokens.fontSizes.bodyS};
17
20
 
18
- font-weight: ${({ $weight }) => ($weight === "bold" ? "bold" : "normal")};
21
+ font-weight: ${({ $weight }) => ($weight === 'bold' ? 'bold' : 'normal')};
19
22
  color: ${({ $color }) => $color || semanticColors.base.text};
20
23
  `;
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import { StyledText } from "./Text.styles";
3
+
3
4
  import { TextProps } from "./Text.types";
4
5
 
5
6
  const Text: React.FC<TextProps> = ({
@@ -12,6 +13,7 @@ const Text: React.FC<TextProps> = ({
12
13
  return (
13
14
  <StyledText
14
15
  data-testid={testId}
16
+ id={testId}
15
17
  $size={size}
16
18
  $weight={weight}
17
19
  $color={color}
@@ -15,23 +15,23 @@ export const TextareaWrapper = styled.div`
15
15
 
16
16
  export const Label = styled.label`
17
17
  font-size: ${typographyTokens.fontSizes.labelS};
18
- color: ${semanticColors.neutral[500]};
18
+ color: ${semanticColors.global.text.subtitle.enabled};
19
19
  font-weight: 500;
20
20
  `;
21
21
 
22
22
  export const StyledTextarea = styled.textarea`
23
23
  display: flex;
24
- padding: ${semanticSizes.global.padding.md};
24
+ padding: ${semanticSizes.global.padding.lg};
25
25
  font-size: ${typographyTokens.fontSizes.bodyM};
26
26
  color: ${semanticColors.base.text};
27
27
  background: ${semanticColors.base.background};
28
- border: 1px solid ${semanticColors.neutral[300]};
28
+ border: 1px solid ${semanticColors.global.border.medium};
29
29
  border-radius: ${semanticRadius.global.radius.md};
30
30
  resize: vertical;
31
- transition: border-color 0.2s, box-shadow 0.2s;
31
+ transition: border-color 0.2s;
32
32
 
33
33
  &::placeholder {
34
- color: ${semanticColors.neutral[400]};
34
+ color: ${semanticColors.global.text.subtitle.enabled};
35
35
  }
36
36
 
37
37
  &:focus {
@@ -41,13 +41,12 @@ export const StyledTextarea = styled.textarea`
41
41
  }
42
42
 
43
43
  &:disabled {
44
- color: ${semanticColors.global.text.onSurface.enabled};
45
- background-color: ${semanticColors.neutral[200]};
44
+ background-color: ${semanticColors.global.surface.disabled};
46
45
  cursor: not-allowed;
47
46
  }
48
47
  `;
49
48
 
50
49
  export const SupportingText = styled.span`
51
50
  font-size: ${typographyTokens.fontSizes.labelS};
52
- color: ${semanticColors.neutral[400]};
51
+ color: ${semanticColors.global.text.subtitle.enabled};
53
52
  `;
@@ -22,7 +22,7 @@ const Textarea: React.FC<TextareaProps> = ({
22
22
  {info}
23
23
  </Label>
24
24
  )}
25
- <StyledTextarea data-testid={testId} {...props} />
25
+ <StyledTextarea data-testid={testId} id={testId} {...props} />
26
26
  {supportingText && <SupportingText>{supportingText}</SupportingText>}
27
27
  </TextareaWrapper>
28
28
  );
@@ -0,0 +1,17 @@
1
+ import styled from "styled-components"
2
+ import { typographyTokens, semanticColors } from "../../../styles/tokens"
3
+
4
+ export const Container = styled.div`
5
+ width: 505px;
6
+ font-size: ${typographyTokens.fontSizes.displayM};
7
+ color: ${semanticColors.base.text};
8
+ font-weight: 600;
9
+ line-height: 120%;
10
+ letter-spacing: -0.64px;
11
+ text-align: center;
12
+
13
+ /* Media Query (padrão) */
14
+ @media (max-width: 768px) {
15
+ font-size: ${typographyTokens.fontSizes.displayL};
16
+ }
17
+ `
@@ -0,0 +1,7 @@
1
+ import type React from "react"
2
+ import { Container } from "./Title.styles"
3
+ import type { TitleProps } from "./Title.types"
4
+
5
+ export const Title: React.FC<TitleProps> = ({ children }) => {
6
+ return <Container>{children}</Container>
7
+ }
@@ -0,0 +1,5 @@
1
+ import type React from "react"
2
+
3
+ export interface TitleProps {
4
+ children: React.ReactNode
5
+ }
@@ -0,0 +1 @@
1
+ export { Title } from "./Title"
@@ -0,0 +1,9 @@
1
+ import styled from "styled-components";
2
+ import { semanticRadius, semanticColors } from "../../../styles/tokens";
3
+
4
+ export const BannerWrapper = styled.div`
5
+ border-radius: ${semanticRadius.global.radius.md2};
6
+ text-align: center;
7
+ color: ${semanticColors.base.background};
8
+ cursor: pointer;
9
+ `;
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+ import { BannerWrapper } from "./BannerAjuda.styles";
3
+ import { BannerAjudaProps } from "./BannerAjuda.types";
4
+ import banner_contato from "../../../assets/_banner_contato.png";
5
+
6
+
7
+ const BannerAjuda: React.FC<BannerAjudaProps> = ({
8
+ onClick,
9
+ imageSrc = banner_contato,
10
+ alt = "Banner de ajuda e contato"
11
+ }) => {
12
+ return (
13
+ <BannerWrapper onClick={onClick}>
14
+ <img src={imageSrc} alt={alt} />
15
+ </BannerWrapper>
16
+ );
17
+ };
18
+
19
+ export { BannerAjuda };
@@ -0,0 +1,5 @@
1
+ export interface BannerAjudaProps {
2
+ onClick: () => void;
3
+ imageSrc?: string;
4
+ alt?: string;
5
+ }
@@ -0,0 +1 @@
1
+ export { BannerAjuda } from "./BannerAjuda";