@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.
- package/README.md +165 -27
- package/dist/umbrella-components.css +1 -1
- package/dist/umbrella-components.es.js +28129 -29249
- package/dist/umbrella-components.umd.js +1234 -2181
- package/package.json +135 -106
- package/src/assets.d.ts +19 -19
- package/src/components/atoms/Badge/Badge.styles.ts +88 -86
- package/src/components/atoms/Badge/Badge.tsx +42 -44
- package/src/components/atoms/Badge/Badge.types.ts +15 -15
- package/src/components/atoms/Breadcrumb/Breadcrumb.styles.ts +43 -43
- package/src/components/atoms/Breadcrumb/Breadcrumb.tsx +46 -48
- package/src/components/atoms/Breadcrumb/Breadcrumb.types.ts +12 -12
- package/src/components/atoms/Button/Button.styles.ts +279 -280
- package/src/components/atoms/Button/Button.tsx +76 -76
- package/src/components/atoms/Button/Button.types.ts +28 -28
- package/src/components/atoms/Button/index.ts +1 -1
- package/src/components/atoms/Checkbox/Checkbox.styles.ts +72 -72
- package/src/components/atoms/Checkbox/Checkbox.tsx +36 -36
- package/src/components/atoms/Checkbox/Checkbox.types.ts +14 -14
- package/src/components/atoms/Checkbox/CheckboxGroup.tsx +30 -30
- package/src/components/atoms/Checkbox/CheckboxSelectAll.tsx +32 -32
- package/src/components/atoms/CodeInput/CodeInput.styles.tsx +38 -39
- package/src/components/atoms/CodeInput/CodeInput.tsx +13 -19
- package/src/components/atoms/CodeInput/CodeInput.types.ts +3 -3
- package/src/components/atoms/CodeInput/index.tsx +1 -1
- package/src/components/atoms/DropDownMenu/DropdownMenu.tsx +48 -48
- package/src/components/atoms/DropDownMenu/DropdownMenu.types.ts +15 -15
- package/src/components/atoms/DropDownMenu/index.tsx +5 -2
- package/src/components/atoms/ErrorMessage/ErrorMessage.styles.tsx +28 -28
- package/src/components/atoms/ErrorMessage/ErrorMessage.tsx +12 -12
- package/src/components/atoms/ErrorMessage/ErrorMessage.types.ts +6 -6
- package/src/components/atoms/ErrorMessage/index.tsx +1 -1
- package/src/components/atoms/Footer/Footer.styles.tsx +22 -22
- package/src/components/atoms/Footer/Footer.tsx +9 -9
- package/src/components/atoms/Footer/Footer.types.tsx +5 -5
- package/src/components/atoms/Footer/index.tsx +1 -1
- package/src/components/atoms/GenericContainer/GenericContainer.styles.tsx +21 -21
- package/src/components/atoms/GenericContainer/GenericContainer.tsx +9 -9
- package/src/components/atoms/GenericContainer/GenericContainer.types.ts +5 -5
- package/src/components/atoms/GenericContainer/index.tsx +1 -1
- package/src/components/atoms/Icon/Icon.styles.ts +11 -11
- package/src/components/atoms/Icon/Icon.tsx +22 -22
- package/src/components/atoms/Icon/Icon.types.ts +6 -6
- package/src/components/atoms/Icon/index.ts +1 -1
- package/src/components/atoms/Input/Input.styles.ts +106 -101
- package/src/components/atoms/Input/index.ts +1 -1
- package/src/components/atoms/Label/Label.tsx +16 -16
- package/src/components/atoms/Loading/Loading.styles.tsx +25 -25
- package/src/components/atoms/Loading/Loading.tsx +8 -8
- package/src/components/atoms/LogoContainer/LogoContainer.Types.tsx +5 -5
- package/src/components/atoms/LogoContainer/LogoContainer.styles.tsx +11 -11
- package/src/components/atoms/LogoContainer/LogoContainer.tsx +11 -11
- package/src/components/atoms/LogoContainer/index.tsx +1 -1
- package/src/components/atoms/ModalAviso/ModalAviso.styles.tsx +56 -56
- package/src/components/atoms/ModalAviso/ModalAviso.tsx +43 -37
- package/src/components/atoms/ModalAviso/ModalAviso.types.ts +5 -5
- package/src/components/atoms/ModalAviso/index.tsx +1 -1
- package/src/components/atoms/MultiSelect/MultiSelect.styles.tsx +100 -92
- package/src/components/atoms/MultiSelect/MultiSelect.tsx +346 -346
- package/src/components/atoms/MultiSelect/MultiSelect.types.ts +38 -38
- package/src/components/atoms/Pill/Pill.styles.ts +46 -46
- package/src/components/atoms/Pill/Pill.tsx +35 -36
- package/src/components/atoms/Pill/Pill.types.ts +14 -18
- package/src/components/atoms/RadioButton/RadioButton.styles.ts +44 -43
- package/src/components/atoms/RadioButton/RadioButton.tsx +31 -31
- package/src/components/atoms/ResendLink/ResendLink.styles.tsx +19 -20
- package/src/components/atoms/ResendLink/ResendLink.tsx +21 -21
- package/src/components/atoms/ResendLink/ResendLink.types.ts +8 -9
- package/src/components/atoms/ResendLink/index.tsx +1 -2
- package/src/components/atoms/Select/Select.styles.ts +153 -149
- package/src/components/atoms/Select/Select.tsx +52 -43
- package/src/components/atoms/Select/index.tsx +1 -1
- package/src/components/atoms/Subtitle/Subtitle.tsx +7 -7
- package/src/components/atoms/Subtitle/Subtitle.types.ts +5 -5
- package/src/components/atoms/Subtitle/index.tsx +1 -1
- package/src/components/atoms/Switch/Switch.tsx +25 -25
- package/src/components/atoms/TabBar/TabBar.styles.tsx +64 -57
- package/src/components/atoms/TabBar/index.tsx +2 -2
- package/src/components/atoms/Text/Text.styles.tsx +35 -35
- package/src/components/atoms/Text/Text.tsx +32 -31
- package/src/components/atoms/Text/Text.types.ts +8 -8
- package/src/components/atoms/Text/index.ts +1 -1
- package/src/components/atoms/Textarea/Textarea.styles.ts +52 -52
- package/src/components/atoms/Textarea/Textarea.tsx +31 -31
- package/src/components/atoms/Title/Title.tsx +7 -7
- package/src/components/atoms/Title/Title.types.ts +5 -5
- package/src/components/atoms/Title/index.tsx +1 -1
- package/src/components/molecules/BannerAjuda/BannerAjuda.styles.tsx +9 -9
- package/src/components/molecules/BannerAjuda/BannerAjuda.tsx +18 -19
- package/src/components/molecules/BannerAjuda/index.tsx +1 -1
- package/src/components/molecules/ButtonGroup/ButtonGroup.styles.ts +10 -10
- package/src/components/molecules/ButtonGroup/ButtonGroup.types.ts +22 -22
- package/src/components/molecules/Calendar/Calendar.styles.ts +143 -143
- package/src/components/molecules/Calendar/Calendar.tsx +31 -31
- package/src/components/molecules/CodeInputContainer/CodeInputContainer.styles.tsx +7 -7
- package/src/components/molecules/CodeInputContainer/CodeInputContainer.types.ts +13 -13
- package/src/components/molecules/CodeInputContainer/index.tsx +1 -3
- package/src/components/molecules/ExcludeModal/ExcludeModal.styles.tsx +123 -118
- package/src/components/molecules/ExcludeModal/ExcludeModal.tsx +48 -48
- package/src/components/molecules/ExcludeModal/ExcludeModal.types.ts +10 -10
- package/src/components/molecules/ExcludeModal/index.tsx +1 -1
- package/src/components/molecules/FieldSelector/FieldSelector.styles.ts +59 -0
- package/src/components/molecules/FieldSelector/FieldSelector.tsx +167 -0
- package/src/components/molecules/HighlightsCard/HighlightsCard.styles.tsx +67 -68
- package/src/components/molecules/HighlightsCard/HighlightsCard.tsx +35 -26
- package/src/components/molecules/HighlightsCard/HighlightsCard.types.ts +10 -10
- package/src/components/molecules/HighlightsCard/index.tsx +1 -1
- package/src/components/molecules/InsuranceCard/InsuranceCard.styles.tsx +237 -237
- package/src/components/molecules/InsuranceCard/index.tsx +1 -1
- package/src/components/molecules/PieChartComponent/PieChartComponent.styles.tsx +7 -8
- package/src/components/molecules/PieChartComponent/PieChartComponent.tsx +70 -73
- package/src/components/molecules/PieChartComponent/PieChartComponent.types.ts +11 -11
- package/src/components/molecules/PieChartComponent/index.tsx +1 -1
- package/src/components/molecules/Popover/Popover.styles.ts +66 -65
- package/src/components/molecules/Popover/Popover.tsx +23 -23
- package/src/components/molecules/RadioBoxGroup/RadioBoxGroup.styles.ts +11 -11
- package/src/components/molecules/RadioBoxGroup/RadioBoxGroup.tsx +43 -43
- package/src/components/molecules/RadioGroupField/RadioGroupField.styles.tsx +65 -64
- package/src/components/molecules/RadioGroupField/RadioGroupField.tsx +69 -69
- package/src/components/molecules/RadioGroupField/RadioGroupField.types.ts +17 -17
- package/src/components/molecules/RadioGroupField/index.tsx +1 -1
- package/src/components/molecules/RefuseModal/RefuseModal.styles.tsx +139 -139
- package/src/components/molecules/RefuseModal/RefuseModal.tsx +92 -76
- package/src/components/molecules/RefuseModal/RefuseModal.types.ts +15 -15
- package/src/components/molecules/RefuseModal/index.tsx +2 -2
- package/src/components/molecules/ResultsChart/ResultsChart.tsx +23 -19
- package/src/components/molecules/ResultsChart/ResultsChart.types.ts +3 -3
- package/src/components/molecules/ResultsChart/index.tsx +2 -2
- package/src/components/molecules/TabToggle/TabToggle.styles.ts +54 -54
- package/src/components/molecules/TabToggle/TabToggle.tsx +35 -35
- package/src/components/organisms/AlertDialog/AlertDialog.styles.tsx +61 -61
- package/src/components/organisms/AlertDialog/AlertDialog.tsx +70 -70
- package/src/components/organisms/Dialog/Dialog.styles.ts +107 -106
- package/src/components/organisms/Dialog/Dialog.tsx +69 -69
- package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.styles.tsx +113 -113
- package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.tsx +75 -71
- package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.types.ts +9 -9
- package/src/components/organisms/DonutEmissionsChart/index.tsx +5 -2
- package/src/components/organisms/Form/Form.styles.ts +35 -35
- package/src/components/organisms/Form/Form.tsx +160 -160
- package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.styles.tsx +115 -114
- package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.tsx +89 -89
- package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.types.ts +16 -16
- package/src/components/organisms/ListagemUltimasEmissoes/index.tsx +1 -1
- package/src/components/organisms/Navbar/Navbar.styles.tsx +243 -243
- package/src/global.d.ts +9 -9
- package/src/index.ts +2 -0
- package/src/lib/utils.ts +6 -6
- package/src/styles/tokens/borders.ts +17 -17
- package/src/styles/tokens/index.tsx +6 -6
- package/src/styles/tokens/radius.ts +22 -22
- package/src/styles/tokens/shadows.ts +22 -22
- package/src/styles/tokens/sizes.ts +60 -64
- package/src/types/radius.types.ts +1 -1
- package/src/types/shadows.types.ts +1 -1
- package/src/utils/renderHighlightsCard.tsx +21 -0
|
@@ -1,149 +1,153 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import Select from 'react-select';
|
|
3
|
-
import {
|
|
4
|
-
semanticSizes,
|
|
5
|
-
semanticShadows,
|
|
6
|
-
primitiveSizes,
|
|
7
|
-
typographyTokens,
|
|
8
|
-
semanticBorders,
|
|
9
|
-
semanticColors,
|
|
10
|
-
semanticRadius,
|
|
11
|
-
} from '../../../styles/tokens/index';
|
|
12
|
-
|
|
13
|
-
export const Container = styled.div`
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
gap: ${primitiveSizes.size.x1};
|
|
17
|
-
width: 100%;
|
|
18
|
-
`;
|
|
19
|
-
|
|
20
|
-
export const Label = styled.label`
|
|
21
|
-
display: flex;
|
|
22
|
-
justify-content: space-between;
|
|
23
|
-
align-items: center;
|
|
24
|
-
font-size: ${typographyTokens.fontSizes.labelS};
|
|
25
|
-
color: ${semanticColors.global.text.subtitle.enabled};
|
|
26
|
-
font-weight: ${typographyTokens.fontWeights.medium};
|
|
27
|
-
`;
|
|
28
|
-
|
|
29
|
-
export const SupportingText = styled.span<{ $error?: boolean }>`
|
|
30
|
-
font-size: ${typographyTokens.fontSizes.captionM};
|
|
31
|
-
color: ${({ $error }) =>
|
|
32
|
-
$error
|
|
33
|
-
? semanticColors.global.text.feedback.strong.error
|
|
34
|
-
: semanticColors.global.text.subtitle.enabled};
|
|
35
|
-
`;
|
|
36
|
-
|
|
37
|
-
export const CustomSelect = styled(Select).attrs({
|
|
38
|
-
classNamePrefix: 'react-select',
|
|
39
|
-
})<{
|
|
40
|
-
$size?: keyof typeof semanticSizes.global.padding;
|
|
41
|
-
$error?: boolean;
|
|
42
|
-
}>`
|
|
43
|
-
.react-select__control {
|
|
44
|
-
background: ${semanticColors.base.background};
|
|
45
|
-
border: ${semanticBorders.global.sm} solid
|
|
46
|
-
${({ $error }) =>
|
|
47
|
-
$error
|
|
48
|
-
? semanticColors.global.border.danger.enabled
|
|
49
|
-
: semanticColors.global.border.medium};
|
|
50
|
-
border-radius: ${semanticRadius.global.radius.md};
|
|
51
|
-
transition:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
border: ${
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.react-
|
|
135
|
-
color: ${semanticColors.global.
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import Select from 'react-select';
|
|
3
|
+
import {
|
|
4
|
+
semanticSizes,
|
|
5
|
+
semanticShadows,
|
|
6
|
+
primitiveSizes,
|
|
7
|
+
typographyTokens,
|
|
8
|
+
semanticBorders,
|
|
9
|
+
semanticColors,
|
|
10
|
+
semanticRadius,
|
|
11
|
+
} from '../../../styles/tokens/index';
|
|
12
|
+
|
|
13
|
+
export const Container = styled.div`
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: ${primitiveSizes.size.x1};
|
|
17
|
+
width: 100%;
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
export const Label = styled.label`
|
|
21
|
+
display: flex;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
align-items: center;
|
|
24
|
+
font-size: ${typographyTokens.fontSizes.labelS};
|
|
25
|
+
color: ${semanticColors.global.text.subtitle.enabled};
|
|
26
|
+
font-weight: ${typographyTokens.fontWeights.medium};
|
|
27
|
+
`;
|
|
28
|
+
|
|
29
|
+
export const SupportingText = styled.span<{ $error?: boolean }>`
|
|
30
|
+
font-size: ${typographyTokens.fontSizes.captionM};
|
|
31
|
+
color: ${({ $error }) =>
|
|
32
|
+
$error
|
|
33
|
+
? semanticColors.global.text.feedback.strong.error
|
|
34
|
+
: semanticColors.global.text.subtitle.enabled};
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
export const CustomSelect = styled(Select).attrs({
|
|
38
|
+
classNamePrefix: 'react-select',
|
|
39
|
+
})<{
|
|
40
|
+
$size?: keyof typeof semanticSizes.global.padding;
|
|
41
|
+
$error?: boolean;
|
|
42
|
+
}>`
|
|
43
|
+
.react-select__control {
|
|
44
|
+
background: ${semanticColors.base.background};
|
|
45
|
+
border: ${semanticBorders.global.sm} solid
|
|
46
|
+
${({ $error }) =>
|
|
47
|
+
$error
|
|
48
|
+
? semanticColors.global.border.danger.enabled
|
|
49
|
+
: semanticColors.global.border.medium};
|
|
50
|
+
border-radius: ${semanticRadius.global.radius.md};
|
|
51
|
+
transition:
|
|
52
|
+
border-color 0.2s,
|
|
53
|
+
box-shadow 0.2s;
|
|
54
|
+
min-height: ${primitiveSizes.size.x12};
|
|
55
|
+
|
|
56
|
+
&:hover {
|
|
57
|
+
border-color: ${({ $error }) =>
|
|
58
|
+
$error
|
|
59
|
+
? semanticColors.danger.border.hover
|
|
60
|
+
: semanticColors.branding.border.hover};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&:focus-within {
|
|
64
|
+
border-color: ${({ $error }) =>
|
|
65
|
+
$error
|
|
66
|
+
? semanticColors.danger.border.enabled
|
|
67
|
+
: semanticColors.branding.border.enabled};
|
|
68
|
+
box-shadow: ${semanticShadows.shadow.md};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&.react-select__control--is-disabled {
|
|
72
|
+
background: ${semanticColors.global.surface.disabled};
|
|
73
|
+
border-color: ${semanticColors.global.border.strong};
|
|
74
|
+
color: ${semanticColors.global.text.onSurface.enabled};
|
|
75
|
+
cursor: not-allowed;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.react-select__value-container {
|
|
80
|
+
padding: ${({ $size = 'md' }) => semanticSizes.global.padding[$size]};
|
|
81
|
+
font-size: ${typographyTokens.fontSizes.labelM};
|
|
82
|
+
color: ${semanticColors.base.text};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.react-select__placeholder {
|
|
86
|
+
color: ${semanticColors.global.text.onSurface.subtitle};
|
|
87
|
+
font-size: ${typographyTokens.fontSizes.labelM};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.react-select__menu {
|
|
91
|
+
background: ${semanticColors.base.background};
|
|
92
|
+
border-radius: ${semanticRadius.global.radius.md};
|
|
93
|
+
box-shadow: ${semanticShadows.shadow.lg};
|
|
94
|
+
border: ${semanticBorders.global.sm} solid
|
|
95
|
+
${semanticColors.global.border.default};
|
|
96
|
+
z-index: 1000;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.react-select__option {
|
|
100
|
+
padding: ${({ $size = 'md' }) => semanticSizes.global.padding[$size]};
|
|
101
|
+
font-size: ${typographyTokens.fontSizes.labelM};
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
transition:
|
|
104
|
+
background 0.2s,
|
|
105
|
+
color 0.2s;
|
|
106
|
+
color: ${semanticColors.base.text};
|
|
107
|
+
|
|
108
|
+
&:hover {
|
|
109
|
+
background: ${semanticColors.branding.surface.hover};
|
|
110
|
+
color: ${semanticColors.branding.text.onSurfaceAccent.enabled};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&:active {
|
|
114
|
+
background: ${semanticColors.branding.surface.pressed};
|
|
115
|
+
color: ${semanticColors.branding.text.onSurfaceAccent.enabled};
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.react-select__option--is-selected {
|
|
120
|
+
background: ${semanticColors.branding.surface.enabled};
|
|
121
|
+
color: ${semanticColors.branding.text.onSurfaceAccent.enabled};
|
|
122
|
+
font-weight: ${typographyTokens.fontWeights.semibold};
|
|
123
|
+
|
|
124
|
+
&:hover {
|
|
125
|
+
background: ${semanticColors.branding.surface.hover};
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.react-select__option--is-focused {
|
|
130
|
+
background: ${semanticColors.neutral[100]};
|
|
131
|
+
color: ${semanticColors.base.text};
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.react-select__indicator-separator {
|
|
135
|
+
background-color: ${semanticColors.global.border.medium};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.react-select__dropdown-indicator {
|
|
139
|
+
color: ${semanticColors.global.text.onSurface.enabled};
|
|
140
|
+
|
|
141
|
+
&:hover {
|
|
142
|
+
color: ${semanticColors.branding.text.accent.enabled};
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.react-select__clear-indicator {
|
|
147
|
+
color: ${semanticColors.global.text.onSurface.enabled};
|
|
148
|
+
|
|
149
|
+
&:hover {
|
|
150
|
+
color: ${semanticColors.danger.text.enabled};
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
`;
|
|
@@ -1,43 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import type React from
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
label
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type React from 'react';
|
|
4
|
+
import {
|
|
5
|
+
Container,
|
|
6
|
+
Label,
|
|
7
|
+
SupportingText,
|
|
8
|
+
CustomSelect,
|
|
9
|
+
} from './Select.styles';
|
|
10
|
+
import type { SelectProps } from './Select.types';
|
|
11
|
+
|
|
12
|
+
interface Option {
|
|
13
|
+
label: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const Select: React.FC<SelectProps> = ({
|
|
18
|
+
label,
|
|
19
|
+
supportingText,
|
|
20
|
+
options,
|
|
21
|
+
placeholder,
|
|
22
|
+
onChange,
|
|
23
|
+
value,
|
|
24
|
+
testId,
|
|
25
|
+
size = 'md',
|
|
26
|
+
disabled = false,
|
|
27
|
+
error = false,
|
|
28
|
+
}) => {
|
|
29
|
+
return (
|
|
30
|
+
<Container data-testid={testId} id={testId}>
|
|
31
|
+
{label && <Label>{label}</Label>}
|
|
32
|
+
<CustomSelect
|
|
33
|
+
$size={size}
|
|
34
|
+
$error={error}
|
|
35
|
+
classNamePrefix="react-select"
|
|
36
|
+
options={options}
|
|
37
|
+
placeholder={placeholder || 'Selecione'}
|
|
38
|
+
onChange={(newValue, actionMeta) =>
|
|
39
|
+
onChange && onChange(newValue as Option | null, actionMeta)
|
|
40
|
+
}
|
|
41
|
+
value={value}
|
|
42
|
+
isSearchable
|
|
43
|
+
isDisabled={disabled}
|
|
44
|
+
/>
|
|
45
|
+
{supportingText && (
|
|
46
|
+
<SupportingText $error={error}>{supportingText}</SupportingText>
|
|
47
|
+
)}
|
|
48
|
+
</Container>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export default Select;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from './Select';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { Container } from
|
|
3
|
-
import { SubtitleProps } from
|
|
4
|
-
|
|
5
|
-
export const Subtitle: React.FC<SubtitleProps> = ({ children }) => {
|
|
6
|
-
return <Container>{children}</Container>;
|
|
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
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
|
|
3
|
-
export interface SubtitleProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
}
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
export interface SubtitleProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Subtitle } from
|
|
1
|
+
export { Subtitle } from './Subtitle';
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { SwitchWrapper, SwitchInput, SwitchLabel } from
|
|
3
|
-
|
|
4
|
-
interface SwitchProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
5
|
-
label?: string;
|
|
6
|
-
testId?: string;
|
|
7
|
-
text?: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const Switch: React.FC<SwitchProps> = ({
|
|
11
|
-
label,
|
|
12
|
-
text,
|
|
13
|
-
testId,
|
|
14
|
-
...props
|
|
15
|
-
}) => {
|
|
16
|
-
return (
|
|
17
|
-
<SwitchWrapper>
|
|
18
|
-
{label && <SwitchLabel>{label}</SwitchLabel>}
|
|
19
|
-
<SwitchInput data-testid={testId} id={testId} {...props} />
|
|
20
|
-
{text && <SwitchLabel>{text}</SwitchLabel>}
|
|
21
|
-
</SwitchWrapper>
|
|
22
|
-
);
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export default Switch;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SwitchWrapper, SwitchInput, SwitchLabel } from './Switch.styles';
|
|
3
|
+
|
|
4
|
+
interface SwitchProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
5
|
+
label?: string;
|
|
6
|
+
testId?: string;
|
|
7
|
+
text?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const Switch: React.FC<SwitchProps> = ({
|
|
11
|
+
label,
|
|
12
|
+
text,
|
|
13
|
+
testId,
|
|
14
|
+
...props
|
|
15
|
+
}) => {
|
|
16
|
+
return (
|
|
17
|
+
<SwitchWrapper>
|
|
18
|
+
{label && <SwitchLabel>{label}</SwitchLabel>}
|
|
19
|
+
<SwitchInput data-testid={testId} id={testId} {...props} />
|
|
20
|
+
{text && <SwitchLabel>{text}</SwitchLabel>}
|
|
21
|
+
</SwitchWrapper>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default Switch;
|
|
@@ -1,57 +1,64 @@
|
|
|
1
|
-
import styled, { css } from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
`
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
${
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import {
|
|
3
|
+
semanticColors,
|
|
4
|
+
semanticSizes,
|
|
5
|
+
semanticBorders,
|
|
6
|
+
typographyTokens,
|
|
7
|
+
} from '../../../styles/tokens';
|
|
8
|
+
|
|
9
|
+
export const Wrapper = styled.nav`
|
|
10
|
+
display: flex;
|
|
11
|
+
width: 100%;
|
|
12
|
+
align-items: center;
|
|
13
|
+
border-bottom: ${semanticBorders.global.lg} solid
|
|
14
|
+
${semanticColors.global.border.medium};
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
export const Tab = styled.button<{ $active: boolean }>`
|
|
18
|
+
display: flex;
|
|
19
|
+
height: ${semanticSizes.global.spacings.lg};
|
|
20
|
+
padding: ${semanticSizes.global.padding.lg}
|
|
21
|
+
${semanticSizes.global.padding['3xl']};
|
|
22
|
+
justify-content: center;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: ${semanticSizes.global.gap.sm};
|
|
25
|
+
background: none;
|
|
26
|
+
border: none;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
font-family: ${typographyTokens.fontFamily.base};
|
|
29
|
+
font-size: ${typographyTokens.fontSizes.bodyM};
|
|
30
|
+
font-weight: ${typographyTokens.fontWeights.regular};
|
|
31
|
+
line-height: ${typographyTokens.lineHeights.bodyM};
|
|
32
|
+
color: ${semanticColors.global.text.onSurface.subtitle};
|
|
33
|
+
margin-bottom: calc(-1 * ${semanticBorders.global.lg});
|
|
34
|
+
border-bottom: ${semanticBorders.global.lg} solid transparent;
|
|
35
|
+
|
|
36
|
+
& + & {
|
|
37
|
+
margin-left: ${semanticSizes.global.padding.lg};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
${(p) =>
|
|
41
|
+
p.$active &&
|
|
42
|
+
css`
|
|
43
|
+
border-bottom-color: ${semanticColors.branding.border.enabled};
|
|
44
|
+
color: ${semanticColors.branding.text.accent.enabled};
|
|
45
|
+
`}
|
|
46
|
+
|
|
47
|
+
&:hover:not(:disabled) {
|
|
48
|
+
color: ${semanticColors.branding.text.accent.hover};
|
|
49
|
+
${(p) =>
|
|
50
|
+
p.$active &&
|
|
51
|
+
css`
|
|
52
|
+
border-bottom-color: ${semanticColors.branding.border.hover};
|
|
53
|
+
`}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:focus {
|
|
57
|
+
outline: none;
|
|
58
|
+
}
|
|
59
|
+
`;
|
|
60
|
+
|
|
61
|
+
export const Count = styled.span`
|
|
62
|
+
font-weight: ${typographyTokens.fontWeights.medium};
|
|
63
|
+
color: inherit;
|
|
64
|
+
`;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { TabBar } from './TabBar';
|
|
2
|
-
export type {
|
|
1
|
+
export { TabBar } from './TabBar';
|
|
2
|
+
export type { TabBarProps, TabItem } from './TabBar.types';
|