sbwb-ds 2.2.2 → 2.3.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 (24) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/sbwb-ds.js +12967 -13114
  3. package/dist/sbwb-ds.umd.cjs +1907 -2024
  4. package/dist/src/presentation/components/atoms/ActionButton/index.d.ts +3 -7
  5. package/dist/src/presentation/components/atoms/ActionButton/styles.d.ts +15 -4
  6. package/dist/src/presentation/components/atoms/ProgresBar/index.d.ts +11 -0
  7. package/dist/src/presentation/components/atoms/ProgresBar/styles.d.ts +14 -0
  8. package/dist/src/presentation/components/atoms/Tag/index.d.ts +3 -1
  9. package/package.json +1 -1
  10. package/src/presentation/components/atoms/ActionButton/ActionButton.stories.tsx +8 -8
  11. package/src/presentation/components/atoms/ActionButton/index.tsx +82 -75
  12. package/src/presentation/components/atoms/ActionButton/styles.ts +95 -192
  13. package/src/presentation/components/atoms/ProgresBar/Progressbar.stories.tsx +37 -0
  14. package/src/presentation/components/atoms/ProgresBar/index.tsx +63 -0
  15. package/src/presentation/components/atoms/ProgresBar/styles.ts +91 -0
  16. package/src/presentation/components/atoms/{Progressbar → ProgressbarDepreciated}/Progressbar.stories.tsx +2 -1
  17. package/src/presentation/components/atoms/Tag/index.tsx +33 -26
  18. package/src/presentation/components/atoms/Tag/styles.ts +1 -0
  19. package/src/presentation/components/atoms/Tooltip/index.tsx +24 -19
  20. package/src/presentation/components/molecules/DataTable/Components/ActionButtonCell/index.tsx +2 -2
  21. /package/dist/src/presentation/components/atoms/{Progressbar → ProgressbarDepreciated}/index.d.ts +0 -0
  22. /package/dist/src/presentation/components/atoms/{Progressbar → ProgressbarDepreciated}/styles.d.ts +0 -0
  23. /package/src/presentation/components/atoms/{Progressbar → ProgressbarDepreciated}/index.tsx +0 -0
  24. /package/src/presentation/components/atoms/{Progressbar → ProgressbarDepreciated}/styles.ts +0 -0
@@ -1,20 +1,18 @@
1
- import { convertHexToRGB } from '../../../../main/helpers/functions/convertHexToRGB';
2
1
  import { sg, resetStyles } from '../../../styles';
3
- import styled, { css, keyframes } from 'styled-components';
2
+ import styled, { css } from 'styled-components';
4
3
 
5
- const rotate = keyframes`
6
- from {
7
- transform: rotate(0deg);
8
- }
9
- to {
10
- transform: rotate(360deg);
11
- }
12
- `;
4
+ interface ActionButtonStyleProps {
5
+ sizeProp: 'Small' | 'Large';
6
+ buttonType: 'primary' | 'secondary';
7
+ disabled?: boolean;
8
+ iconColor?: string;
9
+ isSelected: boolean;
10
+ }
13
11
 
14
- export const ActionButton = styled.button<any>`
12
+ export const ActionButton = styled.button<ActionButtonStyleProps>`
15
13
  ${resetStyles}
16
- height: ${({ size }) => (size === 'Small' ? '32px' : '40px')};
17
- width: ${({ size }) => (size === 'Small' ? '32px' : '40px')};
14
+ height: ${({ sizeProp }) => (sizeProp === 'Small' ? '32px' : '40px')};
15
+ width: ${({ sizeProp }) => (sizeProp === 'Small' ? '32px' : '40px')};
18
16
  display: flex;
19
17
  align-items: center;
20
18
  justify-content: center;
@@ -28,226 +26,138 @@ export const ActionButton = styled.button<any>`
28
26
  ? sg.spacings.spacingInset.spacingInsetNano
29
27
  : 'auto'};
30
28
  cursor: ${({ disabled }) => (disabled ? 'default' : 'pointer')};
29
+ position: relative;
30
+ transition: all 0.3s ease;
31
31
 
32
32
  &:disabled {
33
33
  pointer-events: none;
34
34
  }
35
35
 
36
- /* Estilos para o estado disabled */
37
- ${({ disabled, buttonType }) =>
38
- disabled &&
39
- buttonType === 'primary' &&
36
+ & > .default-icon,
37
+ & > .selected-icon {
38
+ ${({ sizeProp }) => {
39
+ const iconSize =
40
+ sizeProp === 'Small' ? sg.icons.iconSizeSm : sg.icons.iconSizeAnt;
41
+ return css`
42
+ height: ${iconSize};
43
+ width: ${iconSize};
44
+ `;
45
+ }}
46
+ }
47
+
48
+ ${({ disabled, isSelected }) =>
49
+ !disabled &&
50
+ !isSelected &&
40
51
  css`
41
- background-color: ${sg.colors.brandColors.colorBrandSeSoft};
42
- border: none;
52
+ border: ${sg.borders.borderWidth.borderWidthThinner} solid
53
+ ${sg.colors.neutralColors.colorNeutralClean};
54
+
55
+ &:hover {
56
+ border: ${sg.borders.borderWidth.borderWidthThinner} solid
57
+ ${sg.colors.neutralColors.colorNeutralCleanest};
58
+ }
43
59
 
44
60
  & > .default-icon path {
45
- fill: ${sg.colors.neutralColors.colorNeutralCloudy};
61
+ fill: ${({ iconColor }: any) =>
62
+ iconColor || sg.colors.neutralColors.colorNeutralCloudy};
46
63
  }
47
64
  `}
48
65
 
49
- ${({ disabled, buttonType }) =>
50
- disabled &&
66
+ ${({ buttonType, disabled, isSelected, iconColor, sizeProp }) =>
51
67
  buttonType === 'secondary' &&
68
+ !disabled &&
69
+ !isSelected &&
52
70
  css`
53
71
  background-color: transparent;
54
72
  border: none;
55
- height: ${({ size }: any) => (size === 'Small' ? '20px' : '24px')};
56
- width: ${({ size }: any) => (size === 'Small' ? '20px' : '24px')};
73
+ height: ${sizeProp === 'Small' ? '20px' : '24px'};
74
+ width: ${sizeProp === 'Small' ? '20px' : '24px'};
75
+ border-radius: ${sg.borders.borderRadius.borderRadiusXs};
57
76
 
58
- & > .default-icon path {
59
- fill: ${sg.colors.neutralColors.colorNeutralCleanest};
77
+ &:hover {
78
+ background-color: ${sg.colors.neutralColors.colorNeutralSoft};
79
+ border-radius: ${sg.borders.borderRadius.borderRadiusXs};
80
+ border: 0;
81
+
82
+ & > .default-icon path {
83
+ fill: ${iconColor || sg.colors.neutralColors.colorNeutralDark};
84
+ }
60
85
  }
61
86
 
62
- /* Mantém o tamanho do ícone adequado para o secondary */
63
- & > .default-icon,
64
- & > .active-icon {
65
- ${({ size }: any) => {
66
- const iconSize =
67
- size === 'Small' ? sg.icons.iconSizeSm : sg.icons.iconSizeAnt;
68
- return css`
69
- height: ${iconSize};
70
- width: ${iconSize};
71
- `;
72
- }}
87
+ & > .default-icon path {
88
+ fill: ${({ iconColor }: any) =>
89
+ iconColor || sg.colors.neutralColors.colorNeutralCloudy};
73
90
  }
74
91
  `}
75
92
 
76
- /* Estilos normais */
77
- ${({ disabled, isSelected }) =>
93
+ ${({ disabled, isSelected, buttonType, sizeProp }) =>
78
94
  !disabled &&
79
- !isSelected &&
95
+ isSelected &&
80
96
  css`
81
- border: ${sg.borders.borderWidth.borderWidthThinner} solid
82
- ${sg.colors.neutralColors.colorNeutralClean};
83
- &:hover {
84
- border: ${sg.borders.borderWidth.borderWidthThinner} solid
85
- ${sg.colors.neutralColors.colorNeutralCleanest};
86
- }
87
- `}
88
-
89
- & > .default-icon path {
90
- fill: ${({ iconColor, disabled }) =>
91
- disabled
92
- ? sg.colors.neutralColors.colorNeutralCloudy
93
- : iconColor || sg.colors.neutralColors.colorNeutralCloudy};
94
- }
97
+ background-color: rgba(12, 60, 122, 0.16);
95
98
 
96
- /* Estilos para o estado :active */
97
- &:active {
98
- background-color: rgba(21, 103, 211, 0.16);
99
- ${({ buttonType }) =>
100
- buttonType === 'primary'
99
+ ${buttonType === 'primary'
101
100
  ? css`
102
101
  border: ${sg.borders.borderWidth.borderWidthThinner} solid
103
102
  ${sg.colors.brandColors.colorBrandPrimary};
104
103
  `
105
104
  : css`
106
105
  border: none;
106
+ height: ${sizeProp === 'Small' ? '20px' : '24px'};
107
+ width: ${sizeProp === 'Small' ? '20px' : '24px'};
107
108
  `}
108
109
 
109
- /* Se houver um selectedIconName, exibe o SelectedIcon no :active */
110
- ${({ selectedIconName }) =>
111
- selectedIconName
112
- ? css`
113
- & > .default-icon {
114
- display: none;
115
- }
116
- & > .active-icon {
117
- display: flex;
118
- & > svg path {
119
- fill: ${sg.colors.brandColors.colorBrandPrimary};
120
- }
121
- }
122
- `
123
- : css`
124
- & > .default-icon path {
125
- fill: ${sg.colors.brandColors.colorBrandPrimary};
126
- }
127
- `}
128
- }
110
+ & > .default-icon {
111
+ display: none;
112
+ }
129
113
 
130
- /* Estilos para o estado isSelected - semelhante ao :active */
131
- ${({ isSelected, buttonType }) =>
132
- isSelected &&
114
+ & > .selected-icon {
115
+ display: flex;
116
+ & > svg path {
117
+ fill: ${sg.colors.brandColors.colorBrandPrimary};
118
+ }
119
+ }
120
+ `}
121
+
122
+ /* Estilos de desabilitado - devem estar após outros estilos para ter precedência */
123
+ ${({ disabled, buttonType, sizeProp }) =>
124
+ disabled &&
125
+ buttonType === 'primary' &&
133
126
  css`
134
- background-color: rgba(21, 103, 211, 0.16);
135
- ${({ buttonType }: any) =>
136
- buttonType === 'primary'
137
- ? css`
138
- border: ${sg.borders.borderWidth.borderWidthThinner} solid
139
- ${sg.colors.brandColors.colorBrandPrimary};
140
- `
141
- : css`
142
- border: none;
143
- height: ${({ size }: any) =>
144
- size === 'Small' ? '20px' : '24px'};
145
- width: ${({ size }: any) => (size === 'Small' ? '20px' : '24px')};
146
- `}
127
+ background-color: ${sg.colors.brandColors.colorBrandSeSoft} !important;
128
+ border: none;
147
129
 
148
- /* Mantém o tamanho do ícone adequado para o isSelected do secondary */
149
- & > .default-icon,
150
- & > .active-icon {
151
- ${({ size }: any) => {
152
- const iconSize =
153
- size === 'Small' ? sg.icons.iconSizeSm : sg.icons.iconSizeAnt;
154
- return css`
155
- height: ${iconSize};
156
- width: ${iconSize};
157
- `;
158
- }}
130
+ & > .default-icon path,
131
+ & > .selected-icon path {
132
+ fill: ${sg.colors.neutralColors.colorNeutralCloudy} !important;
159
133
  }
160
-
161
- /* Exibe o SelectedIcon quando isSelected estiver true */
162
- ${({ selectedIconName }: any) =>
163
- selectedIconName
164
- ? css`
165
- & > .default-icon {
166
- display: none;
167
- }
168
- & > .active-icon {
169
- display: flex;
170
- & > svg path {
171
- fill: ${sg.colors.brandColors.colorBrandPrimary};
172
- }
173
- }
174
- `
175
- : css`
176
- & > .default-icon path {
177
- fill: ${sg.colors.brandColors.colorBrandPrimary};
178
- }
179
- `}
180
134
  `}
181
135
 
182
- /* Estilos do botão "secondary" */
183
- ${({ buttonType, disabled, isSelected }) =>
136
+ ${({ disabled, buttonType, sizeProp }) =>
137
+ disabled &&
184
138
  buttonType === 'secondary' &&
185
- !disabled &&
186
- !isSelected &&
187
139
  css`
188
- background-color: transparent;
140
+ background-color: transparent !important;
189
141
  border: none;
190
- height: ${({ size }: any) => (size === 'Small' ? '20px' : '24px')};
191
- width: ${({ size }: any) => (size === 'Small' ? '20px' : '24px')};
192
- border-radius: ${sg.borders.borderRadius.borderRadiusXs};
193
-
194
- &:hover {
195
- background-color: ${sg.colors.neutralColors.colorNeutralSoft};
196
- border-radius: ${sg.borders.borderRadius.borderRadiusXs};
197
- border: 0;
142
+ height: ${sizeProp === 'Small' ? '20px' : '24px'} !important;
143
+ width: ${sizeProp === 'Small' ? '20px' : '24px'} !important;
198
144
 
199
- & > .default-icon path {
200
- fill: ${({ iconColor }: any) =>
201
- iconColor || sg.colors.neutralColors.colorNeutralDark};
202
- }
145
+ & > .default-icon path,
146
+ & > .selected-icon path {
147
+ fill: ${sg.colors.neutralColors.colorNeutralCleanest} !important;
203
148
  }
204
149
 
205
150
  & > .default-icon,
206
- & > .active-icon {
207
- ${({ size }: any) => {
151
+ & > .selected-icon {
152
+ ${({ sizeProp }: any) => {
208
153
  const iconSize =
209
- size === 'Small' ? sg.icons.iconSizeSm : sg.icons.iconSizeAnt;
154
+ sizeProp === 'Small' ? sg.icons.iconSizeSm : sg.icons.iconSizeAnt;
210
155
  return css`
211
- height: ${iconSize};
212
- width: ${iconSize};
156
+ height: ${iconSize} !important;
157
+ width: ${iconSize} !important;
213
158
  `;
214
159
  }}
215
160
  }
216
-
217
- /* Estilos para o estado :active do botão secondary */
218
- &:active {
219
- background-color: rgba(21, 103, 211, 0.16);
220
-
221
- & > .default-icon path {
222
- fill: ${sg.colors.brandColors.colorBrandPrimary};
223
- }
224
- }
225
-
226
- /* Estilos para o estado isSelected do botão secondary */
227
- ${({ isSelected }: any) =>
228
- isSelected &&
229
- css`
230
- background-color: rgba(21, 103, 211, 0.16);
231
- height: ${({ size }: any) => (size === 'Small' ? '20px' : '24px')};
232
- width: ${({ size }: any) => (size === 'Small' ? '20px' : '24px')};
233
-
234
- /* Mantém o tamanho do ícone adequado para o isSelected do secondary */
235
- & > .default-icon,
236
- & > .active-icon {
237
- ${({ size }: any) => {
238
- const iconSize =
239
- size === 'Small' ? sg.icons.iconSizeSm : sg.icons.iconSizeAnt;
240
- return css`
241
- height: ${iconSize};
242
- width: ${iconSize};
243
- `;
244
- }}
245
- }
246
-
247
- & > .default-icon path {
248
- fill: ${sg.colors.brandColors.colorBrandPrimary};
249
- }
250
- `}
251
161
  `}
252
162
  `;
253
163
 
@@ -258,20 +168,13 @@ export const IconWrapper = styled.div`
258
168
  justify-content: center;
259
169
  `;
260
170
 
261
- export const ActiveIconWrapper = styled.div`
262
- ${resetStyles}
263
- display: none;
264
- align-items: center;
265
- justify-content: center;
266
- `;
267
-
268
- export const SelectVariantLabel = styled.span<any>`
171
+ export const SelectVariantLabel = styled.span<{ size: 'Small' | 'Large' }>`
269
172
  ${resetStyles}
270
173
  margin-left: 8px;
271
174
  font-size: ${({ size }) => (size === 'Small' ? '12px' : '14px')};
272
175
  `;
273
176
 
274
- export const Indicator = styled.div<any>`
177
+ export const Indicator = styled.div<{ indicatorColor?: string }>`
275
178
  ${resetStyles}
276
179
  display: flex;
277
180
  justify-content: center;
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import ProgressBar from './index';
3
+
4
+ export default {
5
+ title: 'Components/ProgressBar',
6
+ component: ProgressBar,
7
+ tags: ['autodocs'],
8
+ argTypes: {
9
+ id: { control: 'text' },
10
+ progress: {
11
+ control: 'number',
12
+ description: 'Progress of the ProgressBar (a number between 0 and 100).',
13
+ },
14
+ title: { control: 'text', description: 'Title of the ProgressBar.' },
15
+ subtitle: {
16
+ control: 'text',
17
+ description: 'Text that appears on `subtitled` variant.',
18
+ },
19
+ size: {
20
+ control: 'select',
21
+ options: ['large', 'medium', 'small'],
22
+ description: 'Size of the ProgressBar.',
23
+ },
24
+ },
25
+ };
26
+
27
+ const Template = (args) => <ProgressBar {...args} />;
28
+
29
+ export const Default = Template.bind({});
30
+
31
+ Default.args = {
32
+ id: 'test-progressbar',
33
+ progress: 50,
34
+ title: 'Title name',
35
+ subtitle: 'Subtitle or description',
36
+ size: 'large',
37
+ };
@@ -0,0 +1,63 @@
1
+ import * as C from './styles';
2
+ import React from 'react';
3
+
4
+ export interface ProgressbarProps extends React.HTMLAttributes<HTMLDivElement> {
5
+ id?: string;
6
+ title: string;
7
+ progress: number;
8
+ subtitle?: string;
9
+ width?: string;
10
+ size?: 'large' | 'medium' | 'small';
11
+ }
12
+
13
+ const Progressbar = ({
14
+ id,
15
+ title,
16
+ progress,
17
+ subtitle,
18
+ width,
19
+ size,
20
+ ...rest
21
+ }: ProgressbarProps) => {
22
+ const validProgress = Math.min(progress, 100);
23
+
24
+ const computedWidth = width
25
+ ? width
26
+ : size === 'large'
27
+ ? '693px'
28
+ : size === 'medium'
29
+ ? '573px'
30
+ : size === 'small'
31
+ ? '481px'
32
+ : undefined;
33
+
34
+ const computedHeight = size === 'large' ? '122px' : '114px';
35
+
36
+ return (
37
+ <C.ProgressbarContainer
38
+ id={`progressbar-${id}`}
39
+ width={computedWidth}
40
+ height={computedHeight}
41
+ {...rest}
42
+ >
43
+ {title && (
44
+ <C.ProgressbarHeader>
45
+ <C.ProgressbarTitle>{title}</C.ProgressbarTitle>
46
+ </C.ProgressbarHeader>
47
+ )}
48
+ <C.ProgressbarBarContainer>
49
+ <C.ProgressbarBar>
50
+ <C.ProgressbarBarInner progress={validProgress} />
51
+ </C.ProgressbarBar>
52
+ <C.ProgressbarPercent>{validProgress}%</C.ProgressbarPercent>
53
+ </C.ProgressbarBarContainer>
54
+ {subtitle && (
55
+ <C.ProgressbarSubtitleSection>
56
+ <C.ProgressbarSubtitle>{subtitle}</C.ProgressbarSubtitle>
57
+ </C.ProgressbarSubtitleSection>
58
+ )}
59
+ </C.ProgressbarContainer>
60
+ );
61
+ };
62
+
63
+ export default Progressbar;
@@ -0,0 +1,91 @@
1
+ import styled from 'styled-components';
2
+ import { sg, resetStyles } from '../../../styles';
3
+
4
+ export const ProgressbarContainer = styled.div<{
5
+ width?: string;
6
+ height?: string;
7
+ }>`
8
+ ${resetStyles}
9
+ width: ${({ width }) => width || '100%'};
10
+ height: ${({ height }) => height || 'auto'};
11
+ background-color: ${sg.colors.backgroundColors.colorBackgroundSnow};
12
+ border-radius: 8px;
13
+ border-radius: ${sg.borders.borderRadius.borderRadiusSm};
14
+ padding: 12px 24px 12px 24px;
15
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
16
+ display: flex;
17
+ flex-direction: column;
18
+ `;
19
+
20
+ export const ProgressbarHeader = styled.div`
21
+ ${resetStyles}
22
+ display: flex;
23
+ justify-content: space-between;
24
+ align-items: center;
25
+ `;
26
+
27
+ export const ProgressbarTitle = styled.h3`
28
+ ${resetStyles}
29
+ font-size: 22px;
30
+ font-weight: 600;
31
+ color: ${sg.colors.neutralColors.colorNeutralDarkest};
32
+ line-height: 30px;
33
+ text-align: left;
34
+ white-space: nowrap;
35
+ overflow: hidden;
36
+ text-overflow: ellipsis;
37
+ max-width: 100%;
38
+ `;
39
+
40
+ export const ProgressbarBarContainer = styled.div`
41
+ ${resetStyles}
42
+ display: flex;
43
+ align-items: center;
44
+ width: 100%;
45
+ `;
46
+
47
+ export const ProgressbarBar = styled.div`
48
+ ${resetStyles}
49
+ height: 22px;
50
+ background-color: #e0e0e0;
51
+ border-radius: 8px;
52
+ width: 100%;
53
+ overflow: hidden;
54
+ position: relative;
55
+ margin-top: 8px;
56
+ margin-bottom: 8px;
57
+ `;
58
+
59
+ export const ProgressbarBarInner = styled.div<{ progress: number }>`
60
+ ${resetStyles}
61
+ height: 100%;
62
+ width: ${({ progress }) => `${progress}%`};
63
+ background-color: #1d4e89;
64
+ transition: width 0.4s ease-in-out;
65
+ `;
66
+
67
+ export const ProgressbarPercent = styled.span`
68
+ ${resetStyles}
69
+ font-size: 14px;
70
+ color: ${sg.colors.neutralColors.colorNeutralDarkest};
71
+ margin-left: 16px;
72
+ font-weight: 600;
73
+ line-height: 22px;
74
+ text-align: left;
75
+ `;
76
+
77
+ export const ProgressbarSubtitleSection = styled.div`
78
+ ${resetStyles}
79
+ display: flex;
80
+ justify-content: space-between;
81
+ align-items: center;
82
+ `;
83
+
84
+ export const ProgressbarSubtitle = styled.span`
85
+ ${resetStyles}
86
+ font-size: 14px;
87
+ color: ${sg.colors.neutralColors.colorNeutralDarkest};
88
+ font-family: Noto Sans;
89
+ line-height: 22px;
90
+ text-align: left;
91
+ `;
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import Progressbar from './index';
2
3
 
3
4
  export default {
4
- title: 'Components/Progressbar',
5
+ title: 'Components/Progressbar [Depreciated]',
5
6
  component: Progressbar,
6
7
  tags: ['autodocs'],
7
8
  argTypes: {
@@ -2,6 +2,7 @@ import * as C from './styles';
2
2
  import { useTag } from './hooks/useTag';
3
3
  import { AvatarProps } from '../Avatar/Avatar.types';
4
4
  import Avatar from '../Avatar/Avatar.view';
5
+ import Tooltip, { TooltipProps } from '../Tooltip';
5
6
 
6
7
  interface TagProps extends React.HTMLAttributes<HTMLDivElement> {
7
8
  label: string;
@@ -15,6 +16,7 @@ interface TagProps extends React.HTMLAttributes<HTMLDivElement> {
15
16
  iconName?: string;
16
17
  tableTag?: boolean;
17
18
  avatarProps?: AvatarProps;
19
+ tooltipProps?: TooltipProps;
18
20
  }
19
21
 
20
22
  const Tag = ({
@@ -29,6 +31,7 @@ const Tag = ({
29
31
  iconName,
30
32
  tableTag,
31
33
  avatarProps,
34
+ tooltipProps,
32
35
  ...rest
33
36
  }: TagProps) => {
34
37
  const {
@@ -42,35 +45,39 @@ const Tag = ({
42
45
  } = useTag(selected, disabled, onClick, onClose, size, iconName);
43
46
 
44
47
  return (
45
- <C.ContainerTag
46
- disabled={disabled}
47
- readOnly={readOnly}
48
- selected={check}
49
- size={size}
50
- onClick={handleContainerClick}
51
- data-testid="container-tag"
52
- tableTag={tableTag}
53
- {...rest}
54
- >
55
- {avatarProps && <Avatar {...avatarProps} size="Extra nano" />}
56
- {iconName && <Icon />}
57
- <C.Label
58
- ref={labelRef}
59
- readOnly={readOnly}
60
- htmlFor={!disabled && `tag-${label}`}
48
+ <Tooltip {...tooltipProps}>
49
+ <C.ContainerTag
61
50
  disabled={disabled}
51
+ readOnly={readOnly}
52
+ selected={check}
62
53
  size={size}
63
- onClick={!disabled ? handleLabelClick : undefined}
54
+ onClick={handleContainerClick}
55
+ data-testid="container-tag"
56
+ tableTag={tableTag}
57
+ {...rest}
64
58
  >
65
- {label}
66
- </C.Label>
67
- {closeButton && !tableTag && (
68
- <Close
69
- onClick={!disabled ? handleLabelClose : undefined}
70
- data-testid="close-button"
71
- />
72
- )}
73
- </C.ContainerTag>
59
+ {avatarProps && <Avatar {...avatarProps} size="Extra nano" />}
60
+ {iconName && <Icon />}
61
+
62
+ <C.Label
63
+ ref={labelRef}
64
+ readOnly={readOnly}
65
+ htmlFor={!disabled && `tag-${label}`}
66
+ disabled={disabled}
67
+ size={size}
68
+ onClick={!disabled ? handleLabelClick : undefined}
69
+ >
70
+ {label}
71
+ </C.Label>
72
+
73
+ {closeButton && !tableTag && (
74
+ <Close
75
+ onClick={!disabled ? handleLabelClose : undefined}
76
+ data-testid="close-button"
77
+ />
78
+ )}
79
+ </C.ContainerTag>
80
+ </Tooltip>
74
81
  );
75
82
  };
76
83
 
@@ -18,6 +18,7 @@ interface LabelProps {
18
18
  export const ContainerTag = styled.div<ContainerTagProps>`
19
19
  ${resetStyles}
20
20
  width: fit-content;
21
+ max-width: 708px;
21
22
  height: ${({ size }) => (size === 'Medium' ? '28px' : '24px')};
22
23
  padding: ${() =>
23
24
  `${sg.spacings.spacingStack.spacingStackNano} ${sg.spacings.spacingInline.spacingInlineAnt}`};