@granto-umbrella/umbrella-components 2.3.23 → 3.0.1

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 (110) hide show
  1. package/dist/umbrella-components.css +1 -1
  2. package/dist/umbrella-components.es.js +42753 -63037
  3. package/dist/umbrella-components.umd.js +2038 -581
  4. package/package.json +9 -4
  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/DropDownMenu/DropdownMenu.styles.tsx +106 -0
  9. package/src/components/atoms/DropDownMenu/DropdownMenu.tsx +48 -0
  10. package/src/components/atoms/DropDownMenu/DropdownMenu.types.ts +15 -0
  11. package/src/components/atoms/DropDownMenu/index.tsx +2 -0
  12. package/src/components/atoms/ErrorMessage/ErrorMessage.styles.tsx +28 -0
  13. package/src/components/atoms/ErrorMessage/ErrorMessage.tsx +12 -0
  14. package/src/components/atoms/ErrorMessage/ErrorMessage.types.ts +6 -0
  15. package/src/components/atoms/ErrorMessage/index.tsx +1 -0
  16. package/src/components/atoms/Footer/Footer.styles.tsx +22 -0
  17. package/src/components/atoms/Footer/Footer.tsx +9 -0
  18. package/src/components/atoms/Footer/Footer.types.tsx +5 -0
  19. package/src/components/atoms/Footer/index.tsx +1 -0
  20. package/src/components/atoms/GenericContainer/GenericContainer.styles.tsx +21 -0
  21. package/src/components/atoms/GenericContainer/GenericContainer.tsx +9 -0
  22. package/src/components/atoms/GenericContainer/GenericContainer.types.ts +5 -0
  23. package/src/components/atoms/GenericContainer/index.tsx +1 -0
  24. package/src/components/atoms/Loading/Loading.styles.tsx +23 -0
  25. package/src/components/atoms/Loading/Loading.tsx +8 -0
  26. package/src/components/atoms/Loading/index.tsx +1 -0
  27. package/src/components/atoms/LogoContainer/LogoContainer.Types.tsx +5 -0
  28. package/src/components/atoms/LogoContainer/LogoContainer.styles.tsx +11 -0
  29. package/src/components/atoms/LogoContainer/LogoContainer.tsx +11 -0
  30. package/src/components/atoms/LogoContainer/index.tsx +1 -0
  31. package/src/components/atoms/ModalAviso/ModalAviso.styles.tsx +54 -0
  32. package/src/components/atoms/ModalAviso/ModalAviso.tsx +37 -0
  33. package/src/components/atoms/ModalAviso/ModalAviso.types.ts +5 -0
  34. package/src/components/atoms/ModalAviso/index.tsx +1 -0
  35. package/src/components/atoms/MultiSelect/MultiSelect.styles.tsx +92 -0
  36. package/src/components/atoms/MultiSelect/MultiSelect.tsx +346 -0
  37. package/src/components/atoms/MultiSelect/MultiSelect.types.ts +38 -0
  38. package/src/components/atoms/MultiSelect/index.tsx +1 -0
  39. package/src/components/atoms/ResendLink/ResendLink.styles.tsx +20 -0
  40. package/src/components/atoms/ResendLink/ResendLink.tsx +16 -0
  41. package/src/components/atoms/ResendLink/ResendLink.types.ts +9 -0
  42. package/src/components/atoms/ResendLink/index.tsx +1 -0
  43. package/src/components/atoms/Subtitle/Subtitle.styles.tsx +21 -0
  44. package/src/components/atoms/Subtitle/Subtitle.tsx +7 -0
  45. package/src/components/atoms/Subtitle/Subtitle.types.ts +5 -0
  46. package/src/components/atoms/Subtitle/index.tsx +1 -0
  47. package/src/components/atoms/Tapbar/Tapbar.styles.tsx +57 -0
  48. package/src/components/atoms/Tapbar/Tapbar.tsx +24 -0
  49. package/src/components/atoms/Tapbar/Tapbar.types.ts +11 -0
  50. package/src/components/atoms/Tapbar/index.tsx +2 -0
  51. package/src/components/atoms/Text/Text.styles.tsx +8 -5
  52. package/src/components/atoms/Text/Text.tsx +1 -0
  53. package/src/components/atoms/Title/Title.styles.tsx +17 -0
  54. package/src/components/atoms/Title/Title.tsx +7 -0
  55. package/src/components/atoms/Title/Title.types.ts +5 -0
  56. package/src/components/atoms/Title/index.tsx +1 -0
  57. package/src/components/molecules/BannerAjuda/BannerAjuda.styles.tsx +9 -0
  58. package/src/components/molecules/BannerAjuda/BannerAjuda.tsx +19 -0
  59. package/src/components/molecules/BannerAjuda/BannerAjuda.types.ts +5 -0
  60. package/src/components/molecules/BannerAjuda/index.tsx +1 -0
  61. package/src/components/molecules/CodeInputContainer/CodeInputContainer.styles.tsx +7 -0
  62. package/src/components/molecules/CodeInputContainer/CodeInputContainer.tsx +32 -0
  63. package/src/components/molecules/CodeInputContainer/CodeInputContainer.types.ts +13 -0
  64. package/src/components/molecules/CodeInputContainer/index.tsx +3 -0
  65. package/src/components/molecules/ExcludeModal/ExcludeModal.styles.tsx +118 -0
  66. package/src/components/molecules/ExcludeModal/ExcludeModal.tsx +48 -0
  67. package/src/components/molecules/ExcludeModal/ExcludeModal.types.ts +10 -0
  68. package/src/components/molecules/ExcludeModal/index.tsx +1 -0
  69. package/src/components/molecules/HighlightsCard/HighlightsCard.styles.tsx +68 -0
  70. package/src/components/molecules/HighlightsCard/HighlightsCard.tsx +26 -0
  71. package/src/components/molecules/HighlightsCard/HighlightsCard.types.ts +10 -0
  72. package/src/components/molecules/HighlightsCard/index.tsx +1 -0
  73. package/src/components/molecules/InsuranceCard/InsuranceCard.styles.tsx +174 -0
  74. package/src/components/molecules/InsuranceCard/InsuranceCard.tsx +418 -0
  75. package/src/components/molecules/InsuranceCard/InsuranceCard.types.ts +32 -0
  76. package/src/components/molecules/InsuranceCard/index.tsx +1 -0
  77. package/src/components/molecules/PieChartComponent/PieChartComponent.styles.tsx +8 -0
  78. package/src/components/molecules/PieChartComponent/PieChartComponent.tsx +73 -0
  79. package/src/components/molecules/PieChartComponent/PieChartComponent.types.ts +11 -0
  80. package/src/components/molecules/PieChartComponent/index.tsx +1 -0
  81. package/src/components/molecules/RadioGroupField/RadioGroupField.styles.tsx +64 -0
  82. package/src/components/molecules/RadioGroupField/RadioGroupField.tsx +69 -0
  83. package/src/components/molecules/RadioGroupField/RadioGroupField.types.ts +17 -0
  84. package/src/components/molecules/RadioGroupField/index.tsx +1 -0
  85. package/src/components/molecules/RefuseModal/RefuseModal.styles.tsx +139 -0
  86. package/src/components/molecules/RefuseModal/RefuseModal.tsx +76 -0
  87. package/src/components/molecules/RefuseModal/RefuseModal.types.ts +15 -0
  88. package/src/components/molecules/RefuseModal/index.tsx +2 -0
  89. package/src/components/molecules/ResultsChart/ResultsChart.styles.tsx +22 -0
  90. package/src/components/molecules/ResultsChart/ResultsChart.tsx +19 -0
  91. package/src/components/molecules/ResultsChart/ResultsChart.types.ts +3 -0
  92. package/src/components/molecules/ResultsChart/index.tsx +2 -0
  93. package/src/components/molecules/TimeLine/TimeLine.styles.ts +118 -0
  94. package/src/components/molecules/TimeLine/TimeLine.tsx +38 -0
  95. package/src/components/molecules/TimeLine/TimeLine.types.ts +35 -0
  96. package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.styles.tsx +113 -0
  97. package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.tsx +71 -0
  98. package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.types.ts +9 -0
  99. package/src/components/organisms/DonutEmissionsChart/index.tsx +2 -0
  100. package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.styles.tsx +114 -0
  101. package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.tsx +89 -0
  102. package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.types.ts +16 -0
  103. package/src/components/organisms/ListagemUltimasEmissoes/index.tsx +1 -0
  104. package/src/components/organisms/TimelineModal/TimelineModal.styles.ts +49 -0
  105. package/src/components/organisms/TimelineModal/TimelineModal.tsx +37 -0
  106. package/src/global.d.ts +6 -0
  107. package/src/index.ts +68 -37
  108. package/src/lib/helpers.ts +17 -0
  109. package/src/styles/tokens/sizes.ts +12 -1
  110. package/src/styles/tokens/typography.ts +1 -1
@@ -0,0 +1,92 @@
1
+ import styled, { css } from "styled-components"
2
+ import { typographyTokens, semanticSizes, semanticColors } from "../../../styles/tokens"
3
+
4
+ type IContainer = {
5
+ $sizeDisplay?: '100' | '75' | '66' | '50' | '33' | '25';
6
+ height?: string;
7
+ }
8
+
9
+ export const Container = styled.div<IContainer>`
10
+ display: flex;
11
+ flex-direction: column;
12
+ height: ${(props) => props.height || "auto"};
13
+
14
+ /* Aplicando os tamanhos de display corretamente */
15
+ ${({ $sizeDisplay }) =>
16
+ $sizeDisplay === '100'
17
+ ? css`
18
+ width: 100%;
19
+ `
20
+ : $sizeDisplay === '75'
21
+ ? css`
22
+ width: calc(75% - 8px);
23
+ `
24
+ : $sizeDisplay === '66'
25
+ ? css`
26
+ width: calc(66% - 8px);
27
+ `
28
+ : $sizeDisplay === '50'
29
+ ? css`
30
+ width: calc(50% - 8px);
31
+ `
32
+ : $sizeDisplay === '33'
33
+ ? css`
34
+ width: calc(33% - 8px);
35
+ `
36
+ : $sizeDisplay === '25'
37
+ ? css`
38
+ width: calc(25% - 11px);
39
+ `
40
+ : css`
41
+ width: 100%;
42
+ `
43
+ }
44
+
45
+ /* Container interno para posicionamento relativo */
46
+ > div {
47
+ position: relative;
48
+ display: flex;
49
+ flex-direction: column;
50
+ }
51
+ `
52
+
53
+ export const Label = styled.label<{ fontSize?: string; fontWeight?: string }>`
54
+ font-size: ${(props) => props.fontSize || typographyTokens.fontSizes.captionM};
55
+ font-weight: ${(props) => props.fontWeight || typographyTokens.fontWeights.medium};
56
+ color: ${semanticColors.neutral[700]};
57
+ margin-bottom: ${semanticSizes.global.gap.sm};
58
+ font-family: ${typographyTokens.fontFamily.base};
59
+ display: block;
60
+ line-height: 1.4;
61
+ `
62
+
63
+ export const SelectWrapper = styled.div`
64
+ position: relative;
65
+ display: flex;
66
+ align-items: center;
67
+ width: 100%;
68
+ `
69
+
70
+ export const Icon = styled.div<{ $error?: boolean }>`
71
+ position: absolute;
72
+ right: ${semanticSizes.global.padding.sm};
73
+ top: 50%;
74
+ transform: translateY(-50%);
75
+ color: ${(props) => (props.$error ? semanticColors.danger.text.enabled : semanticColors.neutral[400])};
76
+ pointer-events: none;
77
+ z-index: 10;
78
+ display: flex;
79
+ align-items: center;
80
+ justify-content: center;
81
+ `
82
+
83
+ export const Error = styled.div`
84
+ display: flex;
85
+ align-items: center;
86
+ gap: ${semanticSizes.global.gap.xs};
87
+ color: ${semanticColors.danger.text.enabled};
88
+ font-size: ${typographyTokens.fontSizes.captionM};
89
+ margin-top: ${semanticSizes.global.padding.xs};
90
+ font-family: ${typographyTokens.fontFamily.base};
91
+ line-height: 1.4;
92
+ `
@@ -0,0 +1,346 @@
1
+ 'use client';
2
+
3
+ /* eslint-disable @typescript-eslint/no-explicit-any */
4
+ import type React from 'react';
5
+ import Select, {
6
+ type StylesConfig,
7
+ components,
8
+ type GroupBase,
9
+ type MultiValue as ReactSelectMultiValue,
10
+ type SingleValue,
11
+ type ActionMeta,
12
+ } from 'react-select';
13
+ import { WarningCircle } from '@phosphor-icons/react';
14
+ import {
15
+ Container,
16
+ Label,
17
+ Icon,
18
+ Error,
19
+ SelectWrapper,
20
+ } from './MultiSelect.styles';
21
+ import {
22
+ semanticColors,
23
+ semanticRadius,
24
+ typographyTokens,
25
+ } from '../../../styles/tokens';
26
+ import type {
27
+ IStyledBaseProps,
28
+ SelectProps,
29
+ SelectOption,
30
+ } from './MultiSelect.types';
31
+
32
+ const StyledBase: React.FC<IStyledBaseProps> = ({
33
+ children,
34
+ label,
35
+ error,
36
+ errorMessage,
37
+ labelSize,
38
+ labelWeight,
39
+ icon,
40
+ sizeDisplay,
41
+ height,
42
+ }) => {
43
+ return (
44
+ <Container $sizeDisplay={sizeDisplay} height={height}>
45
+ <div>
46
+ {label && (
47
+ <Label fontSize={labelSize} fontWeight={labelWeight}>
48
+ {label}
49
+ </Label>
50
+ )}
51
+ <SelectWrapper>
52
+ {children}
53
+ {icon && <Icon $error={error}>{icon}</Icon>}
54
+ </SelectWrapper>
55
+ {error && errorMessage && (
56
+ <Error>
57
+ <WarningCircle size={14} /> {errorMessage}
58
+ </Error>
59
+ )}
60
+ </div>
61
+ </Container>
62
+ );
63
+ };
64
+
65
+ const NoOptionsMessage = (props: any) => (
66
+ <components.NoOptionsMessage {...props}>
67
+ <span>Sem dados</span>
68
+ </components.NoOptionsMessage>
69
+ );
70
+
71
+ const CustomMultiValue = (props: any) => (
72
+ <components.MultiValue {...props}>
73
+ <Custom {...props} />
74
+ </components.MultiValue>
75
+ );
76
+
77
+ const Option = (props: any) => (
78
+ <components.Option {...props}>
79
+ <Custom {...props} />
80
+ </components.Option>
81
+ );
82
+
83
+ const Custom = (props: any) => (
84
+ <div style={{ display: 'flex', alignItems: 'center' }}>
85
+ {'picture' in props.data &&
86
+ (props.data.picture ? (
87
+ <img
88
+ src={props.data.picture || '/placeholder.svg'}
89
+ alt={props.data.name || props.data.label}
90
+ style={{
91
+ width: '16px',
92
+ height: '16px',
93
+ borderRadius: '50%',
94
+ marginRight: '8px',
95
+ objectFit: 'cover',
96
+ }}
97
+ />
98
+ ) : (
99
+ <div
100
+ style={{
101
+ width: '16px',
102
+ height: '16px',
103
+ borderRadius: '50%',
104
+ backgroundColor: semanticColors.base.text,
105
+ color: semanticColors.base.background,
106
+ fontSize: '10px',
107
+ display: 'flex',
108
+ marginRight: '8px',
109
+ alignItems: 'center',
110
+ justifyContent: 'center',
111
+ flexShrink: 0,
112
+ }}
113
+ >
114
+ {(props.data.label as string).charAt(0).toUpperCase()}
115
+ </div>
116
+ ))}
117
+ <span
118
+ style={{
119
+ fontSize: typographyTokens.fontSizes.bodyS,
120
+ lineHeight: '1.4',
121
+ color: 'inherit',
122
+ }}
123
+ >
124
+ {props.data.label}
125
+ </span>
126
+ </div>
127
+ );
128
+
129
+ const MultiSelect: React.FC<SelectProps> = ({
130
+ options,
131
+ placeholder,
132
+ height = '40px',
133
+ enabledClear = true,
134
+ multiple,
135
+ value,
136
+ disabled,
137
+ menuPlacement = 'auto',
138
+ defaultValue,
139
+ setValue,
140
+ ...props
141
+ }) => {
142
+ const styles: StylesConfig<SelectOption, boolean, GroupBase<SelectOption>> = {
143
+ indicatorSeparator: (base: any) => ({ ...base, display: 'none' }),
144
+ container: (base: any) => ({
145
+ ...base,
146
+ width: '100%',
147
+ border: 'none',
148
+ position: 'relative',
149
+ }),
150
+ control: (base: any, state: any) => ({
151
+ ...base,
152
+ minHeight: `${height}`,
153
+ backgroundColor: semanticColors.base.background,
154
+ padding: '2px 8px',
155
+ borderRadius: semanticRadius.global.radius.md,
156
+ borderColor: state.isFocused
157
+ ? semanticColors.branding.border.enabled
158
+ : semanticColors.global.border.default,
159
+ ':hover': {
160
+ borderColor: semanticColors.branding.border.hover,
161
+ },
162
+ boxShadow: state.isFocused
163
+ ? `0 0 0 1px ${semanticColors.branding.border.enabled}`
164
+ : 'none',
165
+ cursor: disabled ? 'not-allowed' : 'pointer',
166
+ opacity: disabled ? 0.6 : 1,
167
+ }),
168
+ dropdownIndicator: (baseStyles: any) => ({
169
+ ...baseStyles,
170
+ color: semanticColors.branding.surface.enabled,
171
+ padding: '8px',
172
+ ':hover': {
173
+ color: semanticColors.branding.surface.hover,
174
+ },
175
+ }),
176
+ clearIndicator: (baseStyles: any) => ({
177
+ ...baseStyles,
178
+ color: semanticColors.neutral[400],
179
+ padding: '8px',
180
+ ':hover': {
181
+ color: semanticColors.danger.text.enabled,
182
+ },
183
+ }),
184
+ indicatorsContainer: (base: any) => ({
185
+ ...base,
186
+ alignItems: 'center',
187
+ }),
188
+ option: (baseStyle: any, state: any) => ({
189
+ ...baseStyle,
190
+ color: state.isSelected
191
+ ? semanticColors.branding.text.onSurfaceAccent.enabled
192
+ : semanticColors.base.text,
193
+ backgroundColor: state.isSelected
194
+ ? semanticColors.branding.surface.enabled
195
+ : state.isFocused
196
+ ? semanticColors.neutral[100]
197
+ : 'transparent',
198
+ cursor: 'pointer',
199
+ padding: '12px 16px',
200
+ ':active': {
201
+ backgroundColor: state.isSelected
202
+ ? semanticColors.branding.surface.pressed
203
+ : semanticColors.neutral[200],
204
+ },
205
+ }),
206
+ placeholder: (base: any) => ({
207
+ ...base,
208
+ fontSize: typographyTokens.fontSizes.bodyS,
209
+ fontWeight: typographyTokens.fontWeights.regular,
210
+ color: semanticColors.neutral[400],
211
+ margin: 0,
212
+ }),
213
+ singleValue: (base: any) => ({
214
+ ...base,
215
+ fontSize: typographyTokens.fontSizes.bodyS,
216
+ color: semanticColors.base.text,
217
+ margin: 0,
218
+ }),
219
+ multiValue: (base: any, state: any) => ({
220
+ ...base,
221
+ borderRadius: semanticRadius.global.radius.full,
222
+ border: `1px solid ${semanticColors.global.border.default}`,
223
+ backgroundColor: state.data.isFixed
224
+ ? semanticColors.global.surface.disabled
225
+ : semanticColors.base.background,
226
+ margin: '2px',
227
+ display: 'inline-flex',
228
+ alignItems: 'center',
229
+ padding: '0 4px',
230
+ }),
231
+ multiValueLabel: (base: any) => ({
232
+ ...base,
233
+ display: 'flex',
234
+ alignItems: 'center',
235
+ padding: '0 6px',
236
+ fontWeight: typographyTokens.fontWeights.regular,
237
+ fontSize: typographyTokens.fontSizes.captionM,
238
+ color: semanticColors.base.text,
239
+ }),
240
+ multiValueRemove: (base: any, state: any) => {
241
+ return state.data.isFixed
242
+ ? { ...base, display: 'none' }
243
+ : {
244
+ ...base,
245
+ display: 'flex',
246
+ alignItems: 'center',
247
+ justifyContent: 'center',
248
+ marginLeft: '2px',
249
+ padding: '0',
250
+ color: semanticColors.neutral[400],
251
+ cursor: 'pointer',
252
+ ':hover': {
253
+ backgroundColor: semanticColors.danger.surface.enabled,
254
+ color: semanticColors.danger.text.onSurface,
255
+ },
256
+ };
257
+ },
258
+
259
+ valueContainer: (base: any) => ({
260
+ ...base,
261
+ padding: '2px 8px',
262
+ gap: '4px',
263
+ flexWrap: 'wrap',
264
+ }),
265
+ input: (base: any) => ({
266
+ ...base,
267
+ margin: 0,
268
+ padding: 0,
269
+ fontSize: typographyTokens.fontSizes.bodyS,
270
+ }),
271
+ menuList: (base: any) => ({
272
+ ...base,
273
+ padding: 0,
274
+ '::-webkit-scrollbar': {
275
+ width: '6px',
276
+ },
277
+ '::-webkit-scrollbar-track': {
278
+ background: semanticColors.neutral[200],
279
+ },
280
+ '::-webkit-scrollbar-thumb': {
281
+ background: semanticColors.branding.surface.enabled,
282
+ borderRadius: '20px',
283
+ },
284
+ '::-webkit-scrollbar-thumb:hover': {
285
+ background: semanticColors.branding.surface.hover,
286
+ },
287
+ }),
288
+ menu: (base: any) => ({
289
+ ...base,
290
+ borderRadius: semanticRadius.global.radius.md,
291
+ boxShadow:
292
+ '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)',
293
+ border: `1px solid ${semanticColors.global.border.default}`,
294
+ overflow: 'hidden',
295
+ }),
296
+ };
297
+
298
+ const handleChange = (
299
+ newValue: ReactSelectMultiValue<SelectOption> | SingleValue<SelectOption>,
300
+ actionMeta: ActionMeta<SelectOption>
301
+ ) => {
302
+ if (setValue) {
303
+ setValue(newValue, actionMeta);
304
+ }
305
+ };
306
+
307
+ return (
308
+ <StyledBase height={'fit-content'} {...props}>
309
+ <Select<SelectOption, boolean, GroupBase<SelectOption>>
310
+ theme={(selectTheme) => ({
311
+ ...selectTheme,
312
+ colors: {
313
+ ...selectTheme.colors,
314
+ primary: semanticColors.branding.surface.enabled,
315
+ primary75: semanticColors.branding.surface.hover,
316
+ primary50: semanticColors.branding.surface.disabled,
317
+ primary25: semanticColors.neutral[100],
318
+ },
319
+ spacing: {
320
+ baseUnit: 4,
321
+ menuGutter: 8,
322
+ controlHeight: parseInt(height.replace('px', '')) || 40,
323
+ },
324
+ })}
325
+ isClearable={enabledClear}
326
+ isMulti={multiple}
327
+ defaultValue={defaultValue}
328
+ options={options}
329
+ placeholder={placeholder}
330
+ isDisabled={disabled}
331
+ value={value}
332
+ isSearchable
333
+ onChange={handleChange}
334
+ styles={styles}
335
+ menuPlacement={menuPlacement}
336
+ components={{
337
+ NoOptionsMessage,
338
+ MultiValue: CustomMultiValue,
339
+ Option,
340
+ }}
341
+ />
342
+ </StyledBase>
343
+ );
344
+ };
345
+
346
+ export default MultiSelect;
@@ -0,0 +1,38 @@
1
+ import type { ReactNode } from "react"
2
+ import type { MultiValue, SingleValue, ActionMeta } from "react-select"
3
+
4
+ export interface SelectOption {
5
+ label: string
6
+ value: string | number
7
+ picture?: string
8
+ name?: string
9
+ isFixed?: boolean
10
+ }
11
+
12
+ export interface IStyledBaseProps {
13
+ children: ReactNode
14
+ label?: string
15
+ error?: boolean
16
+ errorMessage?: string
17
+ labelSize?: string
18
+ labelWeight?: string
19
+ icon?: ReactNode
20
+ sizeDisplay?: '100' | '75' | '66' | '50' | '33' | '25'
21
+ height?: string
22
+ }
23
+
24
+ export interface SelectProps extends Omit<IStyledBaseProps, "children"> {
25
+ options: SelectOption[]
26
+ placeholder?: string
27
+ height?: string
28
+ enabledClear?: boolean
29
+ multiple?: boolean
30
+ value?: MultiValue<SelectOption> | SingleValue<SelectOption>
31
+ disabled?: boolean
32
+ menuPlacement?: "auto" | "bottom" | "top"
33
+ defaultValue?: MultiValue<SelectOption> | SingleValue<SelectOption>
34
+ setValue?: (
35
+ newValue: MultiValue<SelectOption> | SingleValue<SelectOption>,
36
+ actionMeta: ActionMeta<SelectOption>,
37
+ ) => void
38
+ }
@@ -0,0 +1 @@
1
+ export { default as MultiSelect } from './MultiSelect';
@@ -0,0 +1,20 @@
1
+ import styled from "styled-components";
2
+ import {
3
+ semanticColors,
4
+ typographyTokens,
5
+ } from "../../../styles/tokens";
6
+
7
+ export const StyledText = styled.p<{
8
+ $size: string;
9
+ $weight: string;
10
+ $color: string;
11
+ }>`
12
+ font-size: ${({ $size }) =>
13
+ $size === "lg"
14
+ ? typographyTokens.fontSizes.bodyL
15
+ : $size === "md"
16
+ ? typographyTokens.fontSizes.bodyM
17
+ : typographyTokens.fontSizes.bodyL};
18
+ font-weight: ${({ $weight }) => ($weight === "bold" ? "bold" : "normal")};
19
+ color: ${({ $color }) => $color || semanticColors.base.text};
20
+ `;
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import { StyledText } from "./ResendLink.styles";
3
+ import { ResendLinkProps } from "./ResendLink.types";
4
+
5
+ export const ResendLink: React.FC<ResendLinkProps> = ({
6
+ children,
7
+ size = "md",
8
+ weight = "normal",
9
+ color = "black",
10
+ }) => {
11
+ return (
12
+ <StyledText $size={size} $weight={weight} $color={color}>
13
+ {children}
14
+ </StyledText>
15
+ );
16
+ };
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+
3
+ export interface ResendLinkProps{
4
+ children: React.ReactNode;
5
+ size?: "sm" | "md" | "lg";
6
+ weight?: "normal" | "bold";
7
+ color?: string;
8
+ }
9
+
@@ -0,0 +1 @@
1
+ export { ResendLink } from "./ResendLink";
@@ -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";
@@ -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";