@capillarytech/blaze-ui 0.1.6-alpha.62 → 0.1.6-alpha.64
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/CapIcon/styles.js +15 -15
- package/CapInput/styles.js +2 -2
- package/CapLabel/CapLabel.js +0 -43
- package/CapLabel/styles.js +84 -84
- package/CapTable/styles.js +9 -9
- package/CapTooltip/CapTooltip.js +10 -10
- package/CapTooltip/styles.js +4 -4
- package/CapTooltipWithInfo/styles.js +1 -1
- package/CapUnifiedSelect/CapUnifiedSelect.js +74 -44
- package/CapUnifiedSelect/styles.js +136 -103
- package/package.json +1 -1
package/CapIcon/styles.js
CHANGED
|
@@ -9,33 +9,33 @@ export const IconWrapper = styled.span`
|
|
|
9
9
|
opacity: ${({ disabled }) => (disabled ? 0.5 : 1)};
|
|
10
10
|
|
|
11
11
|
&.xs {
|
|
12
|
-
font-size:
|
|
13
|
-
width:
|
|
14
|
-
height:
|
|
12
|
+
font-size: 0.75rem;
|
|
13
|
+
width: 0.75rem;
|
|
14
|
+
height: 0.75rem;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
&.s {
|
|
18
|
-
font-size:
|
|
19
|
-
width:
|
|
20
|
-
height:
|
|
18
|
+
font-size: 1rem;
|
|
19
|
+
width: 1rem;
|
|
20
|
+
height: 1rem;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
&.m {
|
|
24
|
-
font-size:
|
|
25
|
-
width:
|
|
26
|
-
height:
|
|
24
|
+
font-size: 1.5rem;
|
|
25
|
+
width: 1.5rem;
|
|
26
|
+
height: 1.5rem;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
&.l {
|
|
30
|
-
font-size:
|
|
31
|
-
width:
|
|
32
|
-
height:
|
|
30
|
+
font-size: 2rem;
|
|
31
|
+
width: 2rem;
|
|
32
|
+
height: 2rem;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
&.with-text-label {
|
|
36
36
|
display: inline-flex;
|
|
37
37
|
align-items: center;
|
|
38
|
-
gap:
|
|
38
|
+
gap: ${styledVars.SPACING_08};
|
|
39
39
|
}
|
|
40
40
|
`;
|
|
41
41
|
|
|
@@ -45,8 +45,8 @@ export const BackgroundWrapper = styled.span`
|
|
|
45
45
|
justify-content: center;
|
|
46
46
|
border-radius: 50%;
|
|
47
47
|
background-color: ${({ bgColor }) => bgColor || styledVars.CAP_G09};
|
|
48
|
-
width: ${({ size }) => (size === 'xs' ? '
|
|
49
|
-
height: ${({ size }) => (size === 'xs' ? '
|
|
48
|
+
width: ${({ size }) => (size === 'xs' ? '1.25rem' : size === 's' ? '1.5rem' : size === 'l' ? '3rem' : '2.25rem')};
|
|
49
|
+
height: ${({ size }) => (size === 'xs' ? '1.25rem' : size === 's' ? '1.5rem' : size === 'l' ? '3rem' : '2.25rem')};
|
|
50
50
|
`;
|
|
51
51
|
|
|
52
52
|
export const iconStyles = css`
|
package/CapInput/styles.js
CHANGED
package/CapLabel/CapLabel.js
CHANGED
|
@@ -5,45 +5,6 @@ import styled from 'styled-components';
|
|
|
5
5
|
import { StyledLabelDiv, StyledLabelSpan, labelStyles } from './styles';
|
|
6
6
|
import withStyles from '../utils/withStyles';
|
|
7
7
|
|
|
8
|
-
const getLabelTypeStyles = (type) => {
|
|
9
|
-
const types = {
|
|
10
|
-
label1: { fontSize: '12px', color: '#5e6c84', fontWeight: 'normal', lineHeight: 'normal' },
|
|
11
|
-
label2: { fontSize: '12px', color: '#091e42', fontWeight: 'normal', lineHeight: 'normal' },
|
|
12
|
-
label3: { fontSize: '12px', color: '#97a0af', fontWeight: 'normal', lineHeight: 'normal' },
|
|
13
|
-
label4: { fontSize: '12px', color: '#091e42', fontWeight: '500', lineHeight: 'normal' },
|
|
14
|
-
label5: { fontSize: '10px', color: '#091e42', fontWeight: 'normal', lineHeight: 'normal' },
|
|
15
|
-
label6: { fontSize: '12px', color: '#b3bac5', fontWeight: 'normal', lineHeight: 'normal' },
|
|
16
|
-
label7: { fontSize: '14px', color: '#5e6c84', fontWeight: '500', lineHeight: 'normal' },
|
|
17
|
-
label8: { fontSize: '12px', color: '#091e42', fontWeight: '500', lineHeight: 'normal' },
|
|
18
|
-
label9: { fontSize: '12px', color: '#091e42', lineHeight: '16px', fontWeight: 'normal' },
|
|
19
|
-
label10: { fontSize: '12px', color: '#ffffff', lineHeight: '16px', fontWeight: 'normal' },
|
|
20
|
-
label11: { fontSize: '10px', color: '#5e6c84', fontWeight: 'normal', lineHeight: 'normal' },
|
|
21
|
-
label12: { fontSize: '12px', color: '#ffffff', fontWeight: 'normal', lineHeight: 'normal' },
|
|
22
|
-
label13: { fontSize: '10px', color: '#97a0af', fontWeight: 'normal', lineHeight: 'normal' },
|
|
23
|
-
label14: { fontSize: '14px', color: '#676e7c', fontWeight: 'normal', lineHeight: 'normal' },
|
|
24
|
-
label15: { fontSize: '14px', color: '#091e42', fontWeight: 'normal', lineHeight: 'normal' },
|
|
25
|
-
label16: { fontSize: '14px', color: '#091e42', fontWeight: '500', lineHeight: 'normal' },
|
|
26
|
-
label17: { fontSize: '16px', color: '#091e42', fontWeight: '500', lineHeight: 'normal' },
|
|
27
|
-
label18: { fontSize: '14px', color: '#5e6c84', fontWeight: 'normal', lineHeight: 'normal' },
|
|
28
|
-
label19: { fontSize: '12px', lineHeight: '16px', fontWeight: 'normal', color: 'rgba(0, 0, 0, 0.87)' },
|
|
29
|
-
label20: { fontSize: '14px', color: '#2466ea', fontWeight: '500', lineHeight: 'normal' },
|
|
30
|
-
label21: { fontSize: '12px', color: '#2466ea', fontWeight: 'normal', lineHeight: 'normal' },
|
|
31
|
-
label22: { fontSize: '24px', color: '#5f6d85', lineHeight: '28px', fontWeight: 'normal' },
|
|
32
|
-
label23: { fontSize: '14px', color: '#ffffff', fontWeight: 'normal', lineHeight: 'normal' },
|
|
33
|
-
label24: { fontSize: '14px', color: '#5e6c84', fontWeight: '400', lineHeight: '20px' },
|
|
34
|
-
label25: { fontSize: '14px', color: '#5e6c84', fontWeight: '500', lineHeight: '20px' },
|
|
35
|
-
label26: { fontSize: '10px', color: '#091E42', fontWeight: '400', lineHeight: '12px' },
|
|
36
|
-
label27: { fontSize: '12px', color: '#2466EA', fontWeight: '500', lineHeight: '16px' },
|
|
37
|
-
label28: { color: '#FFF', fontSize: '12px', fontWeight: '500', lineHeight: '16px' },
|
|
38
|
-
label29: { color: '#FFF', fontSize: '10px', fontWeight: '400', lineHeight: '12px' },
|
|
39
|
-
label30: { color: '#FFF', fontSize: '10px', fontWeight: '400', lineHeight: '12px' },
|
|
40
|
-
label31: { fontSize: '12px', color: '#091E42', fontWeight: '400', lineHeight: '16px' },
|
|
41
|
-
label32: { lineHeight: '20px', fontSize: '14px', color: '#ffffff', fontWeight: '500' },
|
|
42
|
-
label33: { fontSize: '14px', color: '#2466EA', fontWeight: '500', lineHeight: '20px' },
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
return types[type] || types.label1;
|
|
46
|
-
};
|
|
47
8
|
|
|
48
9
|
const CapLabel = ({
|
|
49
10
|
children,
|
|
@@ -54,13 +15,11 @@ const CapLabel = ({
|
|
|
54
15
|
lineHeight,
|
|
55
16
|
...rest
|
|
56
17
|
}) => {
|
|
57
|
-
const typeStyles = getLabelTypeStyles(type);
|
|
58
18
|
|
|
59
19
|
return (
|
|
60
20
|
<StyledLabelDiv
|
|
61
21
|
className={classnames('cap-label', type, className)}
|
|
62
22
|
style={style}
|
|
63
|
-
typeStyles={typeStyles}
|
|
64
23
|
fontWeight={fontWeight}
|
|
65
24
|
lineHeight={lineHeight}
|
|
66
25
|
{...rest}
|
|
@@ -87,13 +46,11 @@ CapLabel.defaultProps = {
|
|
|
87
46
|
|
|
88
47
|
// Static method for inline label
|
|
89
48
|
const CapLabelInline = styled(({ children, type = 'label1', className = '', style = {}, fontWeight, lineHeight, ...rest }) => {
|
|
90
|
-
const typeStyles = getLabelTypeStyles(type);
|
|
91
49
|
|
|
92
50
|
return (
|
|
93
51
|
<StyledLabelSpan
|
|
94
52
|
className={classnames('cap-label', type, className)}
|
|
95
53
|
style={style}
|
|
96
|
-
typeStyles={typeStyles}
|
|
97
54
|
fontWeight={fontWeight}
|
|
98
55
|
lineHeight={lineHeight}
|
|
99
56
|
{...rest}
|
package/CapLabel/styles.js
CHANGED
|
@@ -3,8 +3,8 @@ import * as styledVars from '../styled/variables';
|
|
|
3
3
|
|
|
4
4
|
export const StyledLabelDiv = styled.div`
|
|
5
5
|
font-family: ${styledVars.FONT_FAMILY};
|
|
6
|
-
font-size: ${({ typeStyles }) => typeStyles?.fontSize || '
|
|
7
|
-
font-weight: ${({ typeStyles, fontWeight }) => fontWeight || typeStyles?.fontWeight ||
|
|
6
|
+
font-size: ${({ typeStyles }) => typeStyles?.fontSize || '0.75rem'};
|
|
7
|
+
font-weight: ${({ typeStyles, fontWeight }) => fontWeight || typeStyles?.fontWeight || styledVars.FONT_WEIGHT_REGULAR};
|
|
8
8
|
color: ${({ typeStyles }) => typeStyles?.color || styledVars.CAP_G04};
|
|
9
9
|
line-height: ${({ typeStyles, lineHeight }) => lineHeight || typeStyles?.lineHeight || 'normal'};
|
|
10
10
|
margin: 0;
|
|
@@ -13,8 +13,8 @@ export const StyledLabelDiv = styled.div`
|
|
|
13
13
|
|
|
14
14
|
export const StyledLabelSpan = styled.span`
|
|
15
15
|
font-family: ${styledVars.FONT_FAMILY};
|
|
16
|
-
font-size: ${({ typeStyles }) => typeStyles?.fontSize || '
|
|
17
|
-
font-weight: ${({ typeStyles, fontWeight }) => fontWeight || typeStyles?.fontWeight ||
|
|
16
|
+
font-size: ${({ typeStyles }) => typeStyles?.fontSize || '0.75rem'};
|
|
17
|
+
font-weight: ${({ typeStyles, fontWeight }) => fontWeight || typeStyles?.fontWeight || styledVars.FONT_WEIGHT_REGULAR};
|
|
18
18
|
color: ${({ typeStyles }) => typeStyles?.color || styledVars.CAP_G04};
|
|
19
19
|
line-height: ${({ typeStyles, lineHeight }) => lineHeight || typeStyles?.lineHeight || 'normal'};
|
|
20
20
|
margin: 0;
|
|
@@ -26,234 +26,234 @@ export const labelStyles = css`
|
|
|
26
26
|
font-family: ${styledVars.FONT_FAMILY};
|
|
27
27
|
|
|
28
28
|
&.label1 {
|
|
29
|
-
font-size:
|
|
29
|
+
font-size: 0.75rem;
|
|
30
30
|
color: ${styledVars.CAP_G04};
|
|
31
|
-
font-weight:
|
|
31
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
32
32
|
line-height: normal;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
&.label2 {
|
|
36
|
-
font-size:
|
|
36
|
+
font-size: 0.75rem;
|
|
37
37
|
color: ${styledVars.CAP_G01};
|
|
38
|
-
font-weight:
|
|
38
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
39
39
|
line-height: normal;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
&.label3 {
|
|
43
|
-
font-size:
|
|
43
|
+
font-size: 0.75rem;
|
|
44
44
|
color: ${styledVars.CAP_G05};
|
|
45
|
-
font-weight:
|
|
45
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
46
46
|
line-height: normal;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
&.label4 {
|
|
50
|
-
font-size:
|
|
50
|
+
font-size: 0.75rem;
|
|
51
51
|
color: ${styledVars.CAP_G01};
|
|
52
|
-
font-weight:
|
|
52
|
+
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
53
53
|
line-height: normal;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
&.label5 {
|
|
57
|
-
font-size:
|
|
57
|
+
font-size: 0.625rem;
|
|
58
58
|
color: ${styledVars.CAP_G01};
|
|
59
|
-
font-weight:
|
|
59
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
60
60
|
line-height: normal;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
&.label6 {
|
|
64
|
-
font-size:
|
|
64
|
+
font-size: 0.75rem;
|
|
65
65
|
color: ${styledVars.CAP_G06};
|
|
66
|
-
font-weight:
|
|
66
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
67
67
|
line-height: normal;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
&.label7 {
|
|
71
|
-
font-size:
|
|
71
|
+
font-size: 0.875rem;
|
|
72
72
|
color: ${styledVars.CAP_G04};
|
|
73
|
-
font-weight:
|
|
73
|
+
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
74
74
|
line-height: normal;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
&.label8 {
|
|
78
|
-
font-size:
|
|
78
|
+
font-size: 0.75rem;
|
|
79
79
|
color: ${styledVars.CAP_G01};
|
|
80
|
-
font-weight:
|
|
80
|
+
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
81
81
|
line-height: normal;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
&.label9 {
|
|
85
|
-
font-size:
|
|
85
|
+
font-size: 0.75rem;
|
|
86
86
|
color: ${styledVars.CAP_G01};
|
|
87
|
-
line-height:
|
|
88
|
-
font-weight:
|
|
87
|
+
line-height: 1rem;
|
|
88
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
&.label10 {
|
|
92
|
-
font-size:
|
|
92
|
+
font-size: 0.75rem;
|
|
93
93
|
color: ${styledVars.CAP_WHITE};
|
|
94
|
-
line-height:
|
|
95
|
-
font-weight:
|
|
94
|
+
line-height: 1rem;
|
|
95
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
&.label11 {
|
|
99
|
-
font-size:
|
|
99
|
+
font-size: 0.625rem;
|
|
100
100
|
color: ${styledVars.CAP_G04};
|
|
101
|
-
font-weight:
|
|
101
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
102
102
|
line-height: normal;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
&.label12 {
|
|
106
|
-
font-size:
|
|
106
|
+
font-size: 0.75rem;
|
|
107
107
|
color: ${styledVars.CAP_WHITE};
|
|
108
|
-
font-weight:
|
|
108
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
109
109
|
line-height: normal;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
&.label13 {
|
|
113
|
-
font-size:
|
|
113
|
+
font-size: 0.625rem;
|
|
114
114
|
color: ${styledVars.CAP_G05};
|
|
115
|
-
font-weight:
|
|
115
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
116
116
|
line-height: normal;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
&.label14 {
|
|
120
|
-
font-size:
|
|
120
|
+
font-size: 0.875rem;
|
|
121
121
|
color: #676e7c;
|
|
122
|
-
font-weight:
|
|
122
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
123
123
|
line-height: normal;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
&.label15 {
|
|
127
|
-
font-size:
|
|
127
|
+
font-size: 0.875rem;
|
|
128
128
|
color: ${styledVars.CAP_G01};
|
|
129
|
-
font-weight:
|
|
129
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
130
130
|
line-height: normal;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
&.label16 {
|
|
134
|
-
font-size:
|
|
134
|
+
font-size: 0.875rem;
|
|
135
135
|
color: ${styledVars.CAP_G01};
|
|
136
|
-
font-weight:
|
|
136
|
+
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
137
137
|
line-height: normal;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
&.label17 {
|
|
141
|
-
font-size:
|
|
141
|
+
font-size: 1rem;
|
|
142
142
|
color: ${styledVars.CAP_G01};
|
|
143
|
-
font-weight:
|
|
143
|
+
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
144
144
|
line-height: normal;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
&.label18 {
|
|
148
|
-
font-size:
|
|
148
|
+
font-size: 0.875rem;
|
|
149
149
|
color: ${styledVars.CAP_G04};
|
|
150
|
-
font-weight:
|
|
150
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
151
151
|
line-height: normal;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
&.label19 {
|
|
155
|
-
font-size:
|
|
156
|
-
line-height:
|
|
157
|
-
font-weight:
|
|
155
|
+
font-size: 0.75rem;
|
|
156
|
+
line-height: 1rem;
|
|
157
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
158
158
|
color: rgba(0, 0, 0, 0.87);
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
&.label20 {
|
|
162
|
-
font-size:
|
|
162
|
+
font-size: 0.875rem;
|
|
163
163
|
color: ${styledVars.CAP_BLUE01};
|
|
164
|
-
font-weight:
|
|
164
|
+
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
165
165
|
line-height: normal;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
&.label21 {
|
|
169
|
-
font-size:
|
|
169
|
+
font-size: 0.75rem;
|
|
170
170
|
color: ${styledVars.CAP_BLUE01};
|
|
171
|
-
font-weight:
|
|
171
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
172
172
|
line-height: normal;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
&.label22 {
|
|
176
|
-
font-size:
|
|
176
|
+
font-size: 1.5rem;
|
|
177
177
|
color: ${styledVars.CAP_G04};
|
|
178
|
-
line-height:
|
|
179
|
-
font-weight:
|
|
178
|
+
line-height: 1.75rem;
|
|
179
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
&.label23 {
|
|
183
|
-
font-size:
|
|
183
|
+
font-size: 0.875rem;
|
|
184
184
|
color: ${styledVars.CAP_WHITE};
|
|
185
|
-
font-weight:
|
|
185
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
186
186
|
line-height: normal;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
&.label24 {
|
|
190
|
-
font-size:
|
|
190
|
+
font-size: 0.875rem;
|
|
191
191
|
color: ${styledVars.CAP_G04};
|
|
192
|
-
font-weight:
|
|
193
|
-
line-height:
|
|
192
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
193
|
+
line-height: 1.25rem;
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
&.label25 {
|
|
197
|
-
font-size:
|
|
197
|
+
font-size: 0.875rem;
|
|
198
198
|
color: ${styledVars.CAP_G04};
|
|
199
|
-
font-weight:
|
|
200
|
-
line-height:
|
|
199
|
+
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
200
|
+
line-height: 1.25rem;
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
&.label26 {
|
|
204
|
-
font-size:
|
|
204
|
+
font-size: 0.625rem;
|
|
205
205
|
color: ${styledVars.CAP_G01};
|
|
206
|
-
font-weight:
|
|
207
|
-
line-height:
|
|
206
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
207
|
+
line-height: 0.75rem;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
&.label27 {
|
|
211
|
-
font-size:
|
|
211
|
+
font-size: 0.75rem;
|
|
212
212
|
color: ${styledVars.CAP_BLUE01};
|
|
213
|
-
font-weight:
|
|
214
|
-
line-height:
|
|
213
|
+
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
214
|
+
line-height: 1rem;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
&.label28 {
|
|
218
218
|
color: ${styledVars.CAP_WHITE};
|
|
219
|
-
font-size:
|
|
220
|
-
font-weight:
|
|
221
|
-
line-height:
|
|
219
|
+
font-size: 0.75rem;
|
|
220
|
+
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
221
|
+
line-height: 1rem;
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
&.label29 {
|
|
225
225
|
color: ${styledVars.CAP_WHITE};
|
|
226
|
-
font-size:
|
|
227
|
-
font-weight:
|
|
228
|
-
line-height:
|
|
226
|
+
font-size: 0.625rem;
|
|
227
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
228
|
+
line-height: 0.75rem;
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
&.label30 {
|
|
232
232
|
color: ${styledVars.CAP_WHITE};
|
|
233
|
-
font-size:
|
|
234
|
-
font-weight:
|
|
235
|
-
line-height:
|
|
233
|
+
font-size: 0.625rem;
|
|
234
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
235
|
+
line-height: 0.75rem;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
&.label31 {
|
|
239
|
-
font-size:
|
|
239
|
+
font-size: 0.75rem;
|
|
240
240
|
color: ${styledVars.CAP_G01};
|
|
241
|
-
font-weight:
|
|
242
|
-
line-height:
|
|
241
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
242
|
+
line-height: 1rem;
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
&.label32 {
|
|
246
|
-
line-height:
|
|
247
|
-
font-size:
|
|
246
|
+
line-height: 1.25rem;
|
|
247
|
+
font-size: 0.875rem;
|
|
248
248
|
color: ${styledVars.CAP_WHITE};
|
|
249
|
-
font-weight:
|
|
249
|
+
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
&.label33 {
|
|
253
|
-
font-size:
|
|
253
|
+
font-size: 0.875rem;
|
|
254
254
|
color: ${styledVars.CAP_BLUE01};
|
|
255
|
-
font-weight:
|
|
256
|
-
line-height:
|
|
255
|
+
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
256
|
+
line-height: 1.25rem;
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
`;
|
package/CapTable/styles.js
CHANGED
|
@@ -16,7 +16,7 @@ const {
|
|
|
16
16
|
export const StyledTable = styled(Table)`
|
|
17
17
|
&.cap-table-v2 {
|
|
18
18
|
.ant-table {
|
|
19
|
-
border:
|
|
19
|
+
border: 0.0625rem solid ${CAP_G07};
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -28,16 +28,16 @@ export const StyledTable = styled(Table)`
|
|
|
28
28
|
position: absolute;
|
|
29
29
|
width: 100%;
|
|
30
30
|
align-items: center;
|
|
31
|
-
height:
|
|
31
|
+
height: 3.75rem;
|
|
32
32
|
text-align: center;
|
|
33
|
-
font-size:
|
|
33
|
+
font-size: 1rem;
|
|
34
34
|
color: gray;
|
|
35
|
-
border-top:
|
|
35
|
+
border-top: 0.0625rem solid ${CAP_G07};
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.ant-table {
|
|
40
|
-
border:
|
|
40
|
+
border: 0.0625rem solid ${CAP_G07};
|
|
41
41
|
|
|
42
42
|
.ant-table-thead > tr > th {
|
|
43
43
|
color: ${CAP_G01};
|
|
@@ -53,7 +53,7 @@ export const StyledTable = styled(Table)`
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.ant-table-tbody > tr > td {
|
|
56
|
-
border-bottom:
|
|
56
|
+
border-bottom: 0.0625rem solid ${CAP_G07};
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.ant-table-tbody > tr:last-child > td {
|
|
@@ -79,7 +79,7 @@ export const StyledTable = styled(Table)`
|
|
|
79
79
|
|
|
80
80
|
.ant-table-thead {
|
|
81
81
|
.table-children {
|
|
82
|
-
padding:
|
|
82
|
+
padding: 0.375rem ${SPACING_24} 1rem;
|
|
83
83
|
position: relative;
|
|
84
84
|
}
|
|
85
85
|
|
|
@@ -90,8 +90,8 @@ export const StyledTable = styled(Table)`
|
|
|
90
90
|
|
|
91
91
|
.table-children.show-separator:not(:last-child)::after {
|
|
92
92
|
content: '';
|
|
93
|
-
height:
|
|
94
|
-
width:
|
|
93
|
+
height: 0.5rem;
|
|
94
|
+
width: 0.0625rem;
|
|
95
95
|
right: 0;
|
|
96
96
|
top: 30%;
|
|
97
97
|
background-color: ${CAP_G07};
|
package/CapTooltip/CapTooltip.js
CHANGED
|
@@ -13,21 +13,21 @@ const StyledTooltip = styled(Tooltip)`
|
|
|
13
13
|
const CapTooltip = ({
|
|
14
14
|
title,
|
|
15
15
|
children,
|
|
16
|
-
placement
|
|
16
|
+
placement,
|
|
17
17
|
visible,
|
|
18
|
-
defaultVisible
|
|
19
|
-
trigger
|
|
20
|
-
destroyTooltipOnHide
|
|
21
|
-
mouseEnterDelay
|
|
22
|
-
mouseLeaveDelay
|
|
23
|
-
overlayClassName
|
|
18
|
+
defaultVisible,
|
|
19
|
+
trigger,
|
|
20
|
+
destroyTooltipOnHide,
|
|
21
|
+
mouseEnterDelay,
|
|
22
|
+
mouseLeaveDelay,
|
|
23
|
+
overlayClassName,
|
|
24
24
|
overlayStyle,
|
|
25
25
|
onVisibleChange,
|
|
26
26
|
align,
|
|
27
|
-
arrowPointAtCenter
|
|
28
|
-
autoAdjustOverflow
|
|
27
|
+
arrowPointAtCenter,
|
|
28
|
+
autoAdjustOverflow,
|
|
29
29
|
getPopupContainer,
|
|
30
|
-
className
|
|
30
|
+
className,
|
|
31
31
|
...rest
|
|
32
32
|
}) => {
|
|
33
33
|
return (
|
package/CapTooltip/styles.js
CHANGED
|
@@ -6,11 +6,11 @@ export const tooltipStyles = css`
|
|
|
6
6
|
.ant-tooltip-inner {
|
|
7
7
|
background-color: ${styledVars.CAP_G01};
|
|
8
8
|
color: ${styledVars.CAP_WHITE};
|
|
9
|
-
padding:
|
|
10
|
-
font-size:
|
|
11
|
-
line-height:
|
|
9
|
+
padding: ${styledVars.SPACING_08} ${styledVars.SPACING_12};
|
|
10
|
+
font-size: 0.875rem;
|
|
11
|
+
line-height: 1.25rem;
|
|
12
12
|
border-radius: ${styledVars.RADIUS_04};
|
|
13
|
-
max-width:
|
|
13
|
+
max-width: 18.75rem;
|
|
14
14
|
word-wrap: break-word;
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -29,7 +29,7 @@ const NoResult = memo(({ noResultCustomText, className, showUpload, options, noR
|
|
|
29
29
|
));
|
|
30
30
|
|
|
31
31
|
const SelectAllCheckbox = memo(({ currentItems, tempValue, setTempValue, processTreeData }) => {
|
|
32
|
-
const { leafValues } = processTreeData(currentItems);
|
|
32
|
+
const { leafValues = [] } = processTreeData ? processTreeData(currentItems) : {};
|
|
33
33
|
const totalAvailable = leafValues.length;
|
|
34
34
|
const leafSet = new Set(leafValues);
|
|
35
35
|
const selectedInScope = Array.isArray(tempValue)
|
|
@@ -76,10 +76,10 @@ const buildTreeMaps = (nodes) => {
|
|
|
76
76
|
if (!nodes) return result;
|
|
77
77
|
|
|
78
78
|
const traverse = (items) => {
|
|
79
|
-
items
|
|
79
|
+
items?.forEach((item) => {
|
|
80
80
|
result.nodeMap[item.value] = item;
|
|
81
|
-
if (item
|
|
82
|
-
result.parentChildMap[item.value] = item.children.map(child => child
|
|
81
|
+
if (item?.children && item.children.length > 0) {
|
|
82
|
+
result.parentChildMap[item.value] = item.children.map(child => child?.value);
|
|
83
83
|
traverse(item.children);
|
|
84
84
|
} else {
|
|
85
85
|
result.leafValues.push(item.value);
|
|
@@ -91,18 +91,18 @@ const buildTreeMaps = (nodes) => {
|
|
|
91
91
|
};
|
|
92
92
|
|
|
93
93
|
const countSelectedLeaves = (treeMaps, selectedValues) => {
|
|
94
|
-
if (!Array.isArray(selectedValues) || !selectedValues
|
|
94
|
+
if (!Array.isArray(selectedValues) || !selectedValues?.length) return 0;
|
|
95
95
|
const expandedSet = new Set(selectedValues);
|
|
96
96
|
const processNode = (value) => {
|
|
97
|
-
const children = treeMaps
|
|
97
|
+
const children = treeMaps?.parentChildMap?.[value];
|
|
98
98
|
if (!children) return;
|
|
99
|
-
children
|
|
99
|
+
children?.forEach(childValue => {
|
|
100
100
|
expandedSet.add(childValue);
|
|
101
101
|
processNode(childValue);
|
|
102
102
|
});
|
|
103
103
|
};
|
|
104
|
-
selectedValues
|
|
105
|
-
return treeMaps
|
|
104
|
+
selectedValues?.forEach(processNode);
|
|
105
|
+
return treeMaps?.leafValues?.reduce((count, leaf) => expandedSet.has(leaf) ? count + 1 : count, 0) || 0;
|
|
106
106
|
};
|
|
107
107
|
|
|
108
108
|
const filterTreeData = (data, search, searchBasedOn) => {
|
|
@@ -110,16 +110,16 @@ const filterTreeData = (data, search, searchBasedOn) => {
|
|
|
110
110
|
const searchLower = search.toLowerCase();
|
|
111
111
|
const nodeMatchesSearch = (node) => {
|
|
112
112
|
const target = searchBasedOn === 'value'
|
|
113
|
-
? String(node
|
|
113
|
+
? String(node?.value ?? '')
|
|
114
114
|
: searchBasedOn === 'key'
|
|
115
|
-
? String(node
|
|
116
|
-
: String(node
|
|
115
|
+
? String(node?.key ?? '')
|
|
116
|
+
: String(node?.label ?? node?.title ?? '');
|
|
117
117
|
return target.toLowerCase().includes(searchLower);
|
|
118
118
|
};
|
|
119
119
|
const loop = (items) =>
|
|
120
120
|
items.reduce((acc, item) => {
|
|
121
121
|
if (!item) return acc;
|
|
122
|
-
const children = item
|
|
122
|
+
const children = item?.children?.length ? loop(item.children) : [];
|
|
123
123
|
if (nodeMatchesSearch(item) || children.length) {
|
|
124
124
|
acc.push({ ...item, children });
|
|
125
125
|
}
|
|
@@ -133,27 +133,27 @@ const CapUnifiedSelect = ({
|
|
|
133
133
|
options = [],
|
|
134
134
|
value,
|
|
135
135
|
onChange,
|
|
136
|
-
placeholder
|
|
136
|
+
placeholder,
|
|
137
137
|
className,
|
|
138
138
|
style,
|
|
139
|
-
isError
|
|
139
|
+
isError,
|
|
140
140
|
errorMessage,
|
|
141
141
|
containerClassName,
|
|
142
142
|
popoverClassName,
|
|
143
|
-
allowClear
|
|
143
|
+
allowClear,
|
|
144
144
|
headerLabel,
|
|
145
145
|
onUpload,
|
|
146
146
|
tooltip,
|
|
147
147
|
bylineText,
|
|
148
|
-
disabled
|
|
149
|
-
showUpload
|
|
150
|
-
customPopupRender
|
|
151
|
-
showSearch
|
|
152
|
-
searchBasedOn
|
|
148
|
+
disabled,
|
|
149
|
+
showUpload,
|
|
150
|
+
customPopupRender,
|
|
151
|
+
showSearch,
|
|
152
|
+
searchBasedOn,
|
|
153
153
|
onConfirm,
|
|
154
154
|
clearText,
|
|
155
|
-
noResultCustomText
|
|
156
|
-
noResultCustomIcon
|
|
155
|
+
noResultCustomText,
|
|
156
|
+
noResultCustomIcon,
|
|
157
157
|
...rest
|
|
158
158
|
}) => {
|
|
159
159
|
const [searchText, setSearchText] = useState('');
|
|
@@ -162,7 +162,7 @@ const CapUnifiedSelect = ({
|
|
|
162
162
|
|
|
163
163
|
useEffect(() => {
|
|
164
164
|
const isEqual = Array.isArray(value) && Array.isArray(tempValue)
|
|
165
|
-
? value
|
|
165
|
+
? value?.length === tempValue?.length && value.every((v) => tempValue.includes(v))
|
|
166
166
|
: value === tempValue;
|
|
167
167
|
if (!isEqual) setTempValue(value);
|
|
168
168
|
}, [value]);
|
|
@@ -172,13 +172,39 @@ const CapUnifiedSelect = ({
|
|
|
172
172
|
|
|
173
173
|
const dataSource = useMemo(() => {
|
|
174
174
|
if (!options?.length) return [];
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
175
|
+
const enhanceOptions = (opts) =>
|
|
176
|
+
opts.map((opt) => {
|
|
177
|
+
const decoratedTitle = (
|
|
178
|
+
<CapRow className="cap-unified-select-option-with-suffix">
|
|
179
|
+
<CapLabel type="label14" className="cap-unified-select-option-label">{opt?.label}</CapLabel>
|
|
180
|
+
{opt?.optionSuffix && <div className="cap-unified-select-option-suffix">
|
|
181
|
+
{opt?.optionSuffix} {opt?.optionSuffixInfo && <CapTooltipWithInfo title={opt?.optionSuffixInfo} />}
|
|
182
|
+
</div>}
|
|
183
|
+
{opt?.optionTooltipInfo && <CapTooltipWithInfo title={opt?.optionTooltipInfo} />}
|
|
184
|
+
</CapRow>
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
return {
|
|
188
|
+
...opt,
|
|
189
|
+
title: decoratedTitle,
|
|
190
|
+
label: opt?.label,
|
|
191
|
+
children: opt?.children ? enhanceOptions(opt.children) : [],
|
|
192
|
+
};
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
return isTree ? enhanceOptions(options) : options.map((opt) => ({
|
|
196
|
+
...opt,
|
|
197
|
+
title: (
|
|
198
|
+
<CapRow className="cap-unified-select-option-with-suffix">
|
|
199
|
+
<CapLabel type="label14" className="cap-unified-select-option-label">{opt?.label}</CapLabel>
|
|
200
|
+
{opt?.optionSuffix && <div className="cap-unified-select-option-suffix">
|
|
201
|
+
{opt?.optionSuffix} {opt?.optionSuffixInfo && <CapTooltipWithInfo title={opt?.optionSuffixInfo} />}
|
|
202
|
+
</div>}
|
|
203
|
+
{opt?.optionTooltipInfo && <CapTooltipWithInfo title={opt?.optionTooltipInfo} />}
|
|
204
|
+
</CapRow>
|
|
205
|
+
),
|
|
206
|
+
label: opt?.label,
|
|
207
|
+
}));
|
|
182
208
|
}, [isTree, options]);
|
|
183
209
|
|
|
184
210
|
const filteredTree = useMemo(
|
|
@@ -192,7 +218,7 @@ const CapUnifiedSelect = ({
|
|
|
192
218
|
const displayValue = dropdownOpen ? tempValue : value;
|
|
193
219
|
|
|
194
220
|
const suffix = useMemo(() => {
|
|
195
|
-
const count = Array.isArray(displayValue) ? displayValue
|
|
221
|
+
const count = Array.isArray(displayValue) ? displayValue?.length : (displayValue ? 1 : 0);
|
|
196
222
|
return (
|
|
197
223
|
<>
|
|
198
224
|
{isMulti && count > 1 && <span>+{count - 1} more </span>}
|
|
@@ -206,9 +232,9 @@ const CapUnifiedSelect = ({
|
|
|
206
232
|
}, [isMulti, displayValue, dropdownOpen]);
|
|
207
233
|
|
|
208
234
|
const prefix = useMemo(() => {
|
|
209
|
-
if (isMulti && Array.isArray(displayValue) && displayValue
|
|
210
|
-
const firstLeafValue = displayValue.find(val => treeMaps
|
|
211
|
-
return treeMaps
|
|
235
|
+
if (isMulti && Array.isArray(displayValue) && displayValue?.length > 0) {
|
|
236
|
+
const firstLeafValue = displayValue.find(val => treeMaps?.leafValues?.includes(val));
|
|
237
|
+
return treeMaps?.nodeMap?.[firstLeafValue]?.label || null;
|
|
212
238
|
}
|
|
213
239
|
return null;
|
|
214
240
|
}, [isMulti, displayValue, treeMaps]);
|
|
@@ -221,10 +247,11 @@ const CapUnifiedSelect = ({
|
|
|
221
247
|
}, [onChange, onConfirm, tempValue]);
|
|
222
248
|
|
|
223
249
|
const handleClearAll = useCallback(() => {
|
|
224
|
-
|
|
225
|
-
|
|
250
|
+
const cleared = isMulti ? [] : undefined;
|
|
251
|
+
setTempValue(cleared);
|
|
252
|
+
onChange?.(cleared);
|
|
226
253
|
setDropdownOpen(false);
|
|
227
|
-
}, [onChange]);
|
|
254
|
+
}, [isMulti, onChange]);
|
|
228
255
|
|
|
229
256
|
|
|
230
257
|
const handleDropdownVisibilityChange = useCallback((open) => {
|
|
@@ -335,7 +362,7 @@ const CapUnifiedSelect = ({
|
|
|
335
362
|
size="small"
|
|
336
363
|
onClick={handleClearAll}
|
|
337
364
|
>
|
|
338
|
-
|
|
365
|
+
{clearText}
|
|
339
366
|
</Button>
|
|
340
367
|
<CapLabel className="cap-unified-select-selected-count">
|
|
341
368
|
{selectedLeafCount} selected
|
|
@@ -345,8 +372,8 @@ const CapUnifiedSelect = ({
|
|
|
345
372
|
)}
|
|
346
373
|
|
|
347
374
|
{(type === 'select' || type === 'treeSelect') && (
|
|
348
|
-
<CapRow className="cap-unified-select-tree-clear-container">
|
|
349
|
-
<CapLabel className="cap-unified-select-tree-clear-label"
|
|
375
|
+
<CapRow className="cap-unified-select-tree-clear-container" onClick={handleClearAll}>
|
|
376
|
+
<CapLabel className="cap-unified-select-tree-clear-label">{clearText}</CapLabel>
|
|
350
377
|
</CapRow>
|
|
351
378
|
)}
|
|
352
379
|
</div>
|
|
@@ -384,6 +411,7 @@ const CapUnifiedSelect = ({
|
|
|
384
411
|
type={type}
|
|
385
412
|
treeData={filteredTree}
|
|
386
413
|
value={customPopupRender ? tempValue : value}
|
|
414
|
+
treeNodeLabelProp='label'
|
|
387
415
|
onChange={isMulti ? setTempValue : onChange}
|
|
388
416
|
placeholder={placeholder}
|
|
389
417
|
showSearch={false}
|
|
@@ -425,6 +453,7 @@ CapUnifiedSelect.propTypes = {
|
|
|
425
453
|
type: PropTypes.oneOf(['select', 'multiSelect', 'treeSelect', 'multiTreeSelect']),
|
|
426
454
|
options: PropTypes.array,
|
|
427
455
|
value: PropTypes.any,
|
|
456
|
+
containerClassName: PropTypes.string,
|
|
428
457
|
onChange: PropTypes.func,
|
|
429
458
|
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
430
459
|
className: PropTypes.string,
|
|
@@ -433,16 +462,19 @@ CapUnifiedSelect.propTypes = {
|
|
|
433
462
|
headerLabel: PropTypes.string,
|
|
434
463
|
tooltip: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
435
464
|
disabled: PropTypes.bool,
|
|
465
|
+
bylineText: PropTypes.string,
|
|
436
466
|
customPopupRender: PropTypes.bool,
|
|
437
467
|
showSearch: PropTypes.bool,
|
|
438
468
|
searchBasedOn: PropTypes.oneOf(['label', 'value', 'key']),
|
|
439
469
|
onConfirm: PropTypes.func,
|
|
440
470
|
isError: PropTypes.bool,
|
|
441
471
|
errorMessage: PropTypes.string,
|
|
442
|
-
|
|
472
|
+
popoverClassName: PropTypes.string,
|
|
443
473
|
showUpload: PropTypes.bool,
|
|
444
474
|
onUpload: PropTypes.func,
|
|
445
475
|
clearText: PropTypes.string,
|
|
476
|
+
noResultCustomText: PropTypes.string,
|
|
477
|
+
noResultCustomIcon: PropTypes.string,
|
|
446
478
|
};
|
|
447
479
|
|
|
448
480
|
CapUnifiedSelect.defaultProps = {
|
|
@@ -457,14 +489,12 @@ CapUnifiedSelect.defaultProps = {
|
|
|
457
489
|
customPopupRender: true,
|
|
458
490
|
showSearch: true,
|
|
459
491
|
className: '',
|
|
460
|
-
popupClassName: '',
|
|
461
492
|
disabled: false,
|
|
462
493
|
showUpload: false,
|
|
463
494
|
isError: false,
|
|
464
495
|
onUpload: () => {},
|
|
465
496
|
onChange: () => {},
|
|
466
497
|
onConfirm: () => {},
|
|
467
|
-
onCancel: () => {},
|
|
468
498
|
};
|
|
469
499
|
|
|
470
500
|
export default withMemo(withStyles(CapUnifiedSelect, selectStyles));
|
|
@@ -4,7 +4,7 @@ import * as styledVars from '../styled/variables';
|
|
|
4
4
|
export const HeaderWrapper = styled.div`
|
|
5
5
|
display: flex;
|
|
6
6
|
align-items: center;
|
|
7
|
-
gap:
|
|
7
|
+
gap: ${styledVars.SPACING_04};
|
|
8
8
|
|
|
9
9
|
&.disabled {
|
|
10
10
|
opacity: 0.5;
|
|
@@ -25,7 +25,7 @@ export const selectStyles = css`
|
|
|
25
25
|
&:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer) {
|
|
26
26
|
&:hover {
|
|
27
27
|
.ant-select-selector {
|
|
28
|
-
border-color:
|
|
28
|
+
border-color: ${styledVars.CAP_G11};
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -34,54 +34,53 @@ export const selectStyles = css`
|
|
|
34
34
|
pointer-events: unset;
|
|
35
35
|
}
|
|
36
36
|
.ant-select-prefix {
|
|
37
|
-
font-size:
|
|
38
|
-
font-weight:
|
|
39
|
-
color:
|
|
40
|
-
line-height:
|
|
37
|
+
font-size: 0.875rem;
|
|
38
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
39
|
+
color: ${styledVars.CAP_G01};
|
|
40
|
+
line-height: 1.25rem;
|
|
41
41
|
}
|
|
42
42
|
.cap-unified-select-header-label {
|
|
43
43
|
font-family: ${styledVars.FONT_FAMILY};
|
|
44
|
-
font-weight:
|
|
45
|
-
font-size:
|
|
46
|
-
line-height:
|
|
47
|
-
letter-spacing:
|
|
44
|
+
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
45
|
+
font-size: 0.875rem;
|
|
46
|
+
line-height: 1.25rem;
|
|
47
|
+
letter-spacing: 0;
|
|
48
48
|
}
|
|
49
49
|
.cap-unified-select-header-byline-text {
|
|
50
50
|
font-family: ${styledVars.FONT_FAMILY};
|
|
51
|
-
font-weight:
|
|
52
|
-
font-size:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
color: #97a0af;
|
|
51
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
52
|
+
font-size: 0.75rem;
|
|
53
|
+
letter-spacing: 0;
|
|
54
|
+
color: ${styledVars.CAP_G05};
|
|
56
55
|
}
|
|
57
56
|
.ant-input-affix-wrapper .ant-input-prefix {
|
|
58
|
-
left:
|
|
57
|
+
left: ${styledVars.SPACING_12};
|
|
59
58
|
}
|
|
60
59
|
.cap-tooltip-with-info-icon {
|
|
61
|
-
margin-top:
|
|
60
|
+
margin-top: 0.125rem;
|
|
62
61
|
}
|
|
63
62
|
|
|
64
63
|
.cap-unified-tree-select {
|
|
65
|
-
min-width:
|
|
64
|
+
min-width: 12.5rem;
|
|
66
65
|
}
|
|
67
66
|
|
|
68
67
|
.ant-select.ant-select-focused.ant-select-outlined:not(.ant-select-disabled)
|
|
69
68
|
.ant-select-selector {
|
|
70
|
-
border-color:
|
|
69
|
+
border-color: ${styledVars.CAP_G11} !important;
|
|
71
70
|
box-shadow: none;
|
|
72
71
|
outline: 0;
|
|
73
72
|
}
|
|
74
73
|
|
|
75
74
|
.ant-btn-variant-solid:not(:disabled):not(.ant-btn-disabled):hover {
|
|
76
|
-
background-color:
|
|
75
|
+
background-color: ${styledVars.CAP_PRIMARY.base};
|
|
77
76
|
}
|
|
78
77
|
.ant-select-dropdown {
|
|
79
|
-
margin-top: -
|
|
80
|
-
border-radius:
|
|
78
|
+
margin-top: -0.5rem !important;
|
|
79
|
+
border-radius: ${styledVars.RADIUS_04};
|
|
81
80
|
box-shadow:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
max-height:
|
|
81
|
+
0 0.25rem 0.5rem -0.125rem ${styledVars.CAP_G01},
|
|
82
|
+
0 0 0.0625rem 0 ${styledVars.CAP_G01};
|
|
83
|
+
max-height: 22.5rem;
|
|
85
84
|
overflow: visible;
|
|
86
85
|
}
|
|
87
86
|
|
|
@@ -92,13 +91,13 @@ export const selectStyles = css`
|
|
|
92
91
|
align-self: center;
|
|
93
92
|
}
|
|
94
93
|
.cap-unified-tree-select .ant-select-selector:focus {
|
|
95
|
-
border:
|
|
94
|
+
border: 0.0625rem solid ${styledVars.CAP_G11};
|
|
96
95
|
}
|
|
97
96
|
.cap-unified-tree-select .ant-select-tree-treenode {
|
|
98
|
-
padding-left:
|
|
97
|
+
padding-left: ${styledVars.SPACING_04};
|
|
99
98
|
}
|
|
100
99
|
.cap-unified-select-status {
|
|
101
|
-
color:
|
|
100
|
+
color: ${styledVars.CAP_RED};
|
|
102
101
|
}
|
|
103
102
|
}
|
|
104
103
|
|
|
@@ -109,18 +108,45 @@ export const selectStyles = css`
|
|
|
109
108
|
.ant-select-tree {
|
|
110
109
|
.ant-select-tree-node-content-wrapper {
|
|
111
110
|
background-color: transparent;
|
|
111
|
+
height: 100%;
|
|
112
|
+
.cap-unified-select-option-with-suffix{
|
|
113
|
+
display: flex;
|
|
114
|
+
justify-content: flex-start;
|
|
115
|
+
align-items: center;
|
|
116
|
+
width: 100%;
|
|
117
|
+
height: 100%;
|
|
118
|
+
.cap-unified-select-option-label{
|
|
119
|
+
flex: 1;
|
|
120
|
+
max-width: 8.125rem;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
text-overflow: ellipsis;
|
|
123
|
+
white-space: nowrap;
|
|
124
|
+
display: block;
|
|
125
|
+
}
|
|
126
|
+
.cap-unified-select-option-suffix{
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
padding: 0 ${styledVars.SPACING_08};
|
|
130
|
+
max-height: 1.25rem;
|
|
131
|
+
white-space: nowrap;
|
|
132
|
+
margin-left: ${styledVars.SPACING_08};
|
|
133
|
+
}
|
|
134
|
+
.cap-tooltip-with-info-icon{
|
|
135
|
+
margin-top: 0.3125rem;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
112
138
|
}
|
|
113
139
|
.ant-select-tree-node-content-wrapper:hover {
|
|
114
140
|
background-color: transparent;
|
|
115
141
|
}
|
|
116
142
|
.ant-select-tree-treenode {
|
|
117
|
-
|
|
118
|
-
margin-bottom:
|
|
143
|
+
height: 3rem;
|
|
144
|
+
margin-bottom: 0;
|
|
119
145
|
.ant-select-tree-checkbox .ant-select-tree-checkbox-inner {
|
|
120
|
-
height:
|
|
121
|
-
width:
|
|
122
|
-
border:
|
|
123
|
-
border-radius:
|
|
146
|
+
height: 1.125rem;
|
|
147
|
+
width: 1.125rem;
|
|
148
|
+
border: 0.125rem solid ${styledVars.CAP_G06};
|
|
149
|
+
border-radius: ${styledVars.RADIUS_04};
|
|
124
150
|
}
|
|
125
151
|
&:hover {
|
|
126
152
|
background-color: #fffbe6;
|
|
@@ -131,11 +157,11 @@ export const selectStyles = css`
|
|
|
131
157
|
}
|
|
132
158
|
}
|
|
133
159
|
.ant-select-tree-node-content-wrapper {
|
|
134
|
-
border-radius:
|
|
135
|
-
padding-left:
|
|
160
|
+
border-radius: 0;
|
|
161
|
+
padding-left: 0.1875rem;
|
|
136
162
|
}
|
|
137
163
|
.ant-select-tree-indent {
|
|
138
|
-
margin-left:
|
|
164
|
+
margin-left: ${styledVars.SPACING_12};
|
|
139
165
|
}
|
|
140
166
|
.ant-select-tree-switcher:not(
|
|
141
167
|
.ant-select-tree-switcher-noop
|
|
@@ -143,21 +169,22 @@ export const selectStyles = css`
|
|
|
143
169
|
background-color: transparent;
|
|
144
170
|
}
|
|
145
171
|
.ant-select-tree-checkbox-checked .ant-select-tree-checkbox-inner {
|
|
146
|
-
background-color:
|
|
147
|
-
border:
|
|
172
|
+
background-color: ${styledVars.CAP_PRIMARY.base};
|
|
173
|
+
border: 0.125rem solid ${styledVars.CAP_PRIMARY.base} !important;
|
|
148
174
|
&:hover {
|
|
149
|
-
background-color:
|
|
150
|
-
border:
|
|
175
|
+
background-color: ${styledVars.CAP_PRIMARY.base};
|
|
176
|
+
border: 0.125rem solid ${styledVars.CAP_PRIMARY.base} !important;
|
|
151
177
|
}
|
|
152
178
|
}
|
|
153
179
|
.ant-select-tree-switcher .ant-select-tree-switcher-icon {
|
|
154
|
-
font-size:
|
|
180
|
+
font-size: 0.75rem;
|
|
181
|
+
margin-top: 1.125rem;
|
|
155
182
|
}
|
|
156
183
|
}
|
|
157
184
|
.ant-select-tree-checkbox.ant-select-tree-checkbox-indeterminate
|
|
158
185
|
.ant-select-tree-checkbox-inner {
|
|
159
|
-
background-color:
|
|
160
|
-
border-color:
|
|
186
|
+
background-color: ${styledVars.CAP_PRIMARY.base} !important;
|
|
187
|
+
border-color: ${styledVars.CAP_PRIMARY.base} !important;
|
|
161
188
|
}
|
|
162
189
|
|
|
163
190
|
.ant-select-tree-checkbox.ant-select-tree-checkbox-indeterminate
|
|
@@ -166,65 +193,65 @@ export const selectStyles = css`
|
|
|
166
193
|
position: absolute;
|
|
167
194
|
top: 50%;
|
|
168
195
|
left: 50%;
|
|
169
|
-
width:
|
|
170
|
-
height:
|
|
171
|
-
background-color:
|
|
196
|
+
width: 0.625rem;
|
|
197
|
+
height: 0.125rem;
|
|
198
|
+
background-color: ${styledVars.CAP_WHITE};
|
|
172
199
|
transform: translate(-50%, -50%);
|
|
173
|
-
border-radius:
|
|
200
|
+
border-radius: 0.0625rem;
|
|
174
201
|
}
|
|
175
202
|
.cap-unified-select-upload-container {
|
|
176
203
|
cursor: pointer;
|
|
177
204
|
display: flex;
|
|
178
205
|
align-items: center;
|
|
179
|
-
border-bottom:
|
|
180
|
-
height:
|
|
181
|
-
padding-left:
|
|
206
|
+
border-bottom: 0.0625rem solid ${styledVars.CAP_G08};
|
|
207
|
+
height: 2.5rem;
|
|
208
|
+
padding-left: ${styledVars.SPACING_16};
|
|
182
209
|
|
|
183
210
|
.cap-unified-select-upload-label {
|
|
184
|
-
margin-left:
|
|
185
|
-
color:
|
|
211
|
+
margin-left: ${styledVars.SPACING_12};
|
|
212
|
+
color: ${styledVars.CAP_SECONDARY.base};
|
|
186
213
|
}
|
|
187
214
|
}
|
|
188
215
|
.cap-unified-select-select-all-container {
|
|
189
|
-
padding:
|
|
216
|
+
padding: 0.5625rem 0.9375rem;
|
|
190
217
|
cursor: pointer;
|
|
191
218
|
display: flex;
|
|
192
219
|
align-items: center;
|
|
193
|
-
border-bottom:
|
|
194
|
-
height:
|
|
220
|
+
border-bottom: 0.0625rem solid ${styledVars.CAP_G08};
|
|
221
|
+
height: 2.5rem;
|
|
195
222
|
.cap-unified-select-select-all-checkbox {
|
|
196
223
|
display: contents !important;
|
|
197
224
|
.ant-checkbox-inner {
|
|
198
|
-
height:
|
|
199
|
-
width:
|
|
200
|
-
border:
|
|
201
|
-
border-radius:
|
|
225
|
+
height: 1.125rem;
|
|
226
|
+
width: 1.125rem;
|
|
227
|
+
border: 0.125rem solid ${styledVars.CAP_G06};
|
|
228
|
+
border-radius: ${styledVars.RADIUS_04};
|
|
202
229
|
}
|
|
203
230
|
}
|
|
204
231
|
.ant-checkbox-wrapper:not(.ant-checkbox-wrapper-disabled):hover
|
|
205
232
|
.ant-checkbox-checked:not(.ant-checkbox-disabled)
|
|
206
233
|
.ant-checkbox-inner {
|
|
207
|
-
background-color:
|
|
208
|
-
border:
|
|
234
|
+
background-color: ${styledVars.CAP_PRIMARY.base};
|
|
235
|
+
border: 0.125rem solid ${styledVars.CAP_PRIMARY.base} !important;
|
|
209
236
|
}
|
|
210
237
|
.ant-checkbox-indeterminate .ant-checkbox-inner {
|
|
211
|
-
background-color:
|
|
212
|
-
border-color:
|
|
238
|
+
background-color: ${styledVars.CAP_PRIMARY.base} !important;
|
|
239
|
+
border-color: ${styledVars.CAP_PRIMARY.base} !important;
|
|
213
240
|
}
|
|
214
241
|
.ant-checkbox-indeterminate .ant-checkbox-inner::after {
|
|
215
242
|
content: '';
|
|
216
243
|
position: absolute;
|
|
217
244
|
top: 50%;
|
|
218
245
|
left: 50%;
|
|
219
|
-
width:
|
|
220
|
-
height:
|
|
221
|
-
background-color:
|
|
246
|
+
width: 0.625rem;
|
|
247
|
+
height: 0.125rem;
|
|
248
|
+
background-color: ${styledVars.CAP_WHITE};
|
|
222
249
|
transform: translate(-50%, -50%);
|
|
223
|
-
border-radius:
|
|
250
|
+
border-radius: 0.0625rem;
|
|
224
251
|
}
|
|
225
252
|
}
|
|
226
253
|
.ant-select-tree-treenode.ant-select-tree-treenode-selected {
|
|
227
|
-
background-color:
|
|
254
|
+
background-color: ${styledVars.CAP_PALE_GREY};
|
|
228
255
|
}
|
|
229
256
|
.ant-select-tree-list-holder-inner {
|
|
230
257
|
width: fit-content !important;
|
|
@@ -235,84 +262,84 @@ export const selectStyles = css`
|
|
|
235
262
|
flex-direction: column;
|
|
236
263
|
align-items: center;
|
|
237
264
|
justify-content: center;
|
|
238
|
-
height:
|
|
239
|
-
color:
|
|
240
|
-
font-size:
|
|
265
|
+
height: 12.5rem;
|
|
266
|
+
color: ${styledVars.CAP_G05};
|
|
267
|
+
font-size: 0.875rem;
|
|
241
268
|
}
|
|
242
269
|
.cap-unified-select-no-result-icon {
|
|
243
|
-
font-size:
|
|
244
|
-
margin-bottom:
|
|
245
|
-
color:
|
|
270
|
+
font-size: 2.25rem;
|
|
271
|
+
margin-bottom: ${styledVars.SPACING_08};
|
|
272
|
+
color: ${styledVars.CAP_G06};
|
|
246
273
|
}
|
|
247
274
|
.cap-unified-select-no-result-text {
|
|
248
275
|
font-weight: 500;
|
|
249
276
|
}
|
|
250
277
|
.ant-tree-select:hover .ant-select-selector {
|
|
251
|
-
border-color:
|
|
278
|
+
border-color: ${styledVars.CAP_G11};
|
|
252
279
|
}
|
|
253
280
|
.ant-tree-select-focused .ant-select-selector,
|
|
254
281
|
.ant-tree-select-open .ant-select-selector {
|
|
255
|
-
border-color:
|
|
282
|
+
border-color: ${styledVars.CAP_G11};
|
|
256
283
|
box-shadow: none;
|
|
257
284
|
outline: none;
|
|
258
285
|
}
|
|
259
286
|
.cap-unified-select-search-container {
|
|
260
|
-
border-bottom:
|
|
261
|
-
line-height:
|
|
287
|
+
border-bottom: 0.0625rem solid ${styledVars.CAP_G08} !important;
|
|
288
|
+
line-height: 2.5rem !important;
|
|
262
289
|
.ant-input-affix-wrapper {
|
|
263
|
-
padding-left:
|
|
290
|
+
padding-left: ${styledVars.SPACING_08};
|
|
264
291
|
}
|
|
265
292
|
}
|
|
266
293
|
.cap-unified-select-upload-button {
|
|
267
294
|
border: none;
|
|
268
|
-
padding-left:
|
|
295
|
+
padding-left: 0.9375rem;
|
|
269
296
|
}
|
|
270
297
|
.cap-unified-select-confirm-container {
|
|
271
298
|
display: flex;
|
|
272
299
|
align-items: center;
|
|
273
|
-
height:
|
|
274
|
-
padding:
|
|
275
|
-
border-top:
|
|
300
|
+
height: 3rem;
|
|
301
|
+
padding: 0.4375rem;
|
|
302
|
+
border-top: 0.0625rem solid ${styledVars.CAP_G08};
|
|
276
303
|
}
|
|
277
304
|
.cap-unified-select-confirm-button-group {
|
|
278
305
|
display: flex;
|
|
279
|
-
padding-left:
|
|
306
|
+
padding-left: ${styledVars.SPACING_08};
|
|
280
307
|
align-items: center;
|
|
281
308
|
.cap-unified-select-confirm-button {
|
|
282
|
-
background-color:
|
|
283
|
-
height:
|
|
284
|
-
width:
|
|
309
|
+
background-color: ${styledVars.CAP_GREEN01};
|
|
310
|
+
height: 2rem;
|
|
311
|
+
width: 5.875rem;
|
|
285
312
|
}
|
|
286
313
|
.cap-unified-select-cancel-button {
|
|
287
314
|
border: transparent;
|
|
288
315
|
box-shadow: none;
|
|
289
|
-
width:
|
|
316
|
+
width: 5rem;
|
|
290
317
|
}
|
|
291
318
|
}
|
|
292
319
|
.cap-unified-select-selected-count {
|
|
293
320
|
display: flex;
|
|
294
321
|
margin-left: auto; /* pushes to far right */
|
|
295
|
-
font-size:
|
|
296
|
-
font-weight:
|
|
297
|
-
line-height:
|
|
298
|
-
color:
|
|
322
|
+
font-size: 0.75rem;
|
|
323
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
324
|
+
line-height: 1rem;
|
|
325
|
+
color: ${styledVars.CAP_G04};
|
|
299
326
|
}
|
|
300
327
|
.cap-unified-select-search-container {
|
|
301
328
|
.ant-input-affix-wrapper {
|
|
302
329
|
border: none;
|
|
303
330
|
box-shadow: none;
|
|
304
331
|
border-radius: 0;
|
|
305
|
-
border-bottom:
|
|
332
|
+
border-bottom: 0.0625rem solid transparent;
|
|
306
333
|
transition: border-color 0.2s ease;
|
|
307
334
|
}
|
|
308
335
|
|
|
309
336
|
.ant-input-affix-wrapper:hover {
|
|
310
|
-
border-bottom:
|
|
337
|
+
border-bottom: 0.0625rem solid ${styledVars.CAP_G11} !important;
|
|
311
338
|
box-shadow: none;
|
|
312
339
|
}
|
|
313
340
|
|
|
314
341
|
.ant-input-affix-wrapper:focus-within {
|
|
315
|
-
border-bottom:
|
|
342
|
+
border-bottom: 0.0625rem solid ${styledVars.CAP_G01} !important;
|
|
316
343
|
box-shadow: none;
|
|
317
344
|
outline: none;
|
|
318
345
|
}
|
|
@@ -326,16 +353,16 @@ export const selectStyles = css`
|
|
|
326
353
|
display: flex;
|
|
327
354
|
justify-content: center;
|
|
328
355
|
align-items: center;
|
|
329
|
-
height:
|
|
330
|
-
border-top:
|
|
356
|
+
height: 2.5rem;
|
|
357
|
+
border-top: 0.0625rem solid #EBECF0;
|
|
331
358
|
cursor: pointer;
|
|
332
|
-
color:
|
|
359
|
+
color: ${styledVars.CAP_G01};
|
|
333
360
|
&:hover{
|
|
334
|
-
background-color:
|
|
361
|
+
background-color: ${styledVars.CAP_G08};
|
|
335
362
|
}
|
|
336
363
|
.cap-unified-select-tree-clear-label{
|
|
337
|
-
font-size:
|
|
338
|
-
font-weight:
|
|
364
|
+
font-size: 0.875rem;
|
|
365
|
+
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
339
366
|
}
|
|
340
367
|
}
|
|
341
368
|
}
|
|
@@ -351,9 +378,15 @@ export const selectStyles = css`
|
|
|
351
378
|
}
|
|
352
379
|
}
|
|
353
380
|
.ant-select-tree-indent {
|
|
354
|
-
margin-left:
|
|
381
|
+
margin-left: 0.9375rem;
|
|
355
382
|
}
|
|
356
383
|
}
|
|
384
|
+
.multiTreeSelect-popup-container {
|
|
385
|
+
min-width: 17.5rem;
|
|
386
|
+
}
|
|
387
|
+
.treeSelect-popup-container {
|
|
388
|
+
min-width: 17.5rem;
|
|
389
|
+
}
|
|
357
390
|
|
|
358
391
|
/* Single Select */
|
|
359
392
|
.select-popup-container {
|
package/package.json
CHANGED