@capillarytech/blaze-ui 0.1.6-alpha.67 → 0.1.6-alpha.7
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/CapHeading/CapHeading.js +71 -0
- package/CapHeading/index.js +1 -0
- package/CapHeading/styles.js +125 -0
- package/CapInfoNote/CapInfoNote.js +54 -0
- package/CapInfoNote/index.js +1 -0
- package/CapInfoNote/styles.js +63 -0
- package/CapInput/CapInput.js +2 -2
- package/CapInput/Number.js +1 -1
- package/CapInput/Search.js +1 -1
- package/CapInput/TextArea.js +1 -1
- package/CapInput/loadable.js +9 -0
- package/CapInput/styles.js +2 -2
- package/CapLabel/CapLabel.js +81 -58
- package/CapLabel/index.js +1 -3
- package/CapLabel/styles.js +212 -250
- package/CapRow/CapRow.js +10 -111
- package/CapRow/index.js +1 -3
- package/CapRow/styles.js +6 -47
- package/CapTable/CapTable.js +3 -0
- package/CapTable/loadable.js +4 -4
- package/CapTable/styles.js +26 -6
- package/CapTooltip/CapTooltip.js +25 -87
- package/CapTooltip/index.js +1 -3
- package/CapTooltip/styles.js +27 -19
- package/CapUnifiedSelect/CapUnifiedSelect.js +77 -495
- package/CapUnifiedSelect/index.js +4 -1
- package/CapUnifiedSelect/loadable.js +3 -0
- package/CapUnifiedSelect/styles.js +165 -376
- package/dist/235.index.js +2 -0
- package/dist/235.index.js.LICENSE.txt +29 -0
- package/dist/603.index.js +1 -0
- package/dist/CapInput/CapInput.js +66 -0
- package/dist/CapInput/Number.js +42 -0
- package/dist/CapInput/Search.js +35 -0
- package/dist/CapInput/TextArea.js +42 -0
- package/dist/CapInput/index.js +15 -0
- package/dist/CapInput/messages.js +32 -0
- package/dist/CapInput/styles.js +11 -0
- package/dist/CapTable/CapTable.js +151 -0
- package/dist/CapTable/index.js +9 -0
- package/dist/CapTable/loadable.js +23 -0
- package/dist/CapTable/styles.js +26 -0
- package/dist/LocaleHoc/index.js +40 -0
- package/dist/esm/CapHeading/CapHeading.js +41 -0
- package/dist/esm/CapHeading/index.js +1 -0
- package/dist/esm/CapHeading/styles.js +123 -0
- package/dist/esm/CapInfoNote/CapInfoNote.js +62 -0
- package/dist/esm/CapInfoNote/index.js +1 -0
- package/dist/esm/CapInfoNote/styles.js +6 -0
- package/dist/esm/CapInput/CapInput.js +57 -0
- package/dist/esm/CapInput/Number.js +35 -0
- package/dist/esm/CapInput/Search.js +28 -0
- package/dist/esm/CapInput/TextArea.js +35 -0
- package/dist/esm/CapInput/index.js +8 -0
- package/dist/esm/CapInput/loadable.js +9 -0
- package/dist/esm/CapInput/messages.js +25 -0
- package/dist/esm/CapInput/styles.js +3 -0
- package/dist/esm/CapLabel/CapLabel.js +50 -0
- package/dist/esm/CapLabel/index.js +1 -0
- package/dist/esm/CapLabel/styles.js +219 -0
- package/dist/esm/CapRow/CapRow.js +22 -0
- package/dist/esm/CapRow/index.js +1 -0
- package/dist/esm/CapRow/styles.js +5 -0
- package/dist/esm/CapTable/CapTable.js +143 -0
- package/dist/esm/CapTable/index.js +2 -0
- package/dist/esm/CapTable/loadable.js +12 -0
- package/dist/esm/CapTable/styles.js +17 -0
- package/dist/esm/CapTooltip/CapTooltip.js +34 -0
- package/dist/esm/CapTooltip/index.js +1 -0
- package/dist/esm/CapTooltip/styles.js +6 -0
- package/dist/esm/CapUnifiedSelect/CapUnifiedSelect.js +101 -0
- package/dist/esm/CapUnifiedSelect/index.js +3 -0
- package/dist/esm/CapUnifiedSelect/loadable.js +4 -0
- package/dist/esm/CapUnifiedSelect/messages.js +23 -0
- package/dist/esm/CapUnifiedSelect/styles.js +15 -0
- package/dist/esm/LocaleHoc/index.js +31 -0
- package/dist/esm/index.js +11 -0
- package/dist/esm/styled/index.js +5 -0
- package/dist/esm/styled/variables.js +88 -0
- package/dist/esm/translations/en.js +329 -0
- package/dist/index.js +39 -0
- package/dist/index.js.LICENSE.txt +7 -0
- package/dist/styled/index.js +22 -0
- package/dist/styled/variables.js +94 -0
- package/dist/translations/en.js +335 -0
- package/index.js +1 -12
- package/package.json +12 -6
- package/styled/variables.js +0 -2
- package/.DS_Store +0 -0
- package/CapIcon/CapIcon.js +0 -183
- package/CapIcon/index.js +0 -3
- package/CapIcon/styles.js +0 -76
- package/CapSkeleton/CapSkeleton.js +0 -17
- package/CapSkeleton/index.js +0 -1
- package/CapSpin/CapSpin.js +0 -23
- package/CapSpin/index.js +0 -1
- package/CapTestSelect/CapTestSelect.js +0 -47
- package/CapTestSelect/index.js +0 -1
- package/CapTooltipWithInfo/CapTooltipWithInfo.js +0 -74
- package/CapTooltipWithInfo/index.js +0 -3
- package/CapTooltipWithInfo/styles.js +0 -22
- package/assets/upload.svg +0 -3
- package/utils/index.js +0 -1
- package/utils/withMemo.js +0 -33
- package/utils/withStyles.js +0 -24
package/CapLabel/styles.js
CHANGED
|
@@ -1,259 +1,221 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
2
|
import * as styledVars from '../styled/variables';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
const labels = {
|
|
5
|
+
label1: {
|
|
6
|
+
color: styledVars.CAP_G04,
|
|
7
|
+
fontSize: '12px',
|
|
8
|
+
fontWeight: 'normal',
|
|
9
|
+
lineHeight: 'normal',
|
|
10
|
+
},
|
|
11
|
+
label2: {
|
|
12
|
+
color: styledVars.CAP_G01,
|
|
13
|
+
fontSize: '12px',
|
|
14
|
+
fontWeight: 'normal',
|
|
15
|
+
lineHeight: 'normal',
|
|
16
|
+
},
|
|
17
|
+
label3: {
|
|
18
|
+
color: styledVars.CAP_G05,
|
|
19
|
+
fontSize: '12px',
|
|
20
|
+
fontWeight: 'normal',
|
|
21
|
+
lineHeight: 'normal',
|
|
22
|
+
},
|
|
23
|
+
label4: {
|
|
24
|
+
color: styledVars.CAP_G01,
|
|
25
|
+
fontSize: '12px',
|
|
26
|
+
fontWeight: '500',
|
|
27
|
+
lineHeight: 'normal',
|
|
28
|
+
},
|
|
29
|
+
label5: {
|
|
30
|
+
color: styledVars.CAP_G01,
|
|
31
|
+
fontSize: '10px',
|
|
32
|
+
fontWeight: 'normal',
|
|
33
|
+
lineHeight: 'normal',
|
|
34
|
+
},
|
|
35
|
+
label6: {
|
|
36
|
+
color: styledVars.CAP_G06,
|
|
37
|
+
fontSize: '12px',
|
|
38
|
+
fontWeight: 'normal',
|
|
39
|
+
lineHeight: 'normal',
|
|
40
|
+
},
|
|
41
|
+
label7: {
|
|
42
|
+
color: styledVars.CAP_G04,
|
|
43
|
+
fontSize: '14px',
|
|
44
|
+
fontWeight: '500',
|
|
45
|
+
lineHeight: 'normal',
|
|
46
|
+
},
|
|
47
|
+
label8: {
|
|
48
|
+
color: styledVars.CAP_G01,
|
|
49
|
+
fontSize: '12px',
|
|
50
|
+
fontWeight: '500',
|
|
51
|
+
lineHeight: 'normal',
|
|
52
|
+
},
|
|
53
|
+
label9: {
|
|
54
|
+
color: styledVars.CAP_G01,
|
|
55
|
+
fontSize: '12px',
|
|
56
|
+
fontWeight: 'normal',
|
|
57
|
+
lineHeight: '16px',
|
|
58
|
+
},
|
|
59
|
+
label10: {
|
|
60
|
+
color: styledVars.CAP_WHITE,
|
|
61
|
+
fontSize: '12px',
|
|
62
|
+
fontWeight: 'normal',
|
|
63
|
+
lineHeight: '16px',
|
|
64
|
+
},
|
|
65
|
+
label11: {
|
|
66
|
+
color: styledVars.CAP_G04,
|
|
67
|
+
fontSize: '10px',
|
|
68
|
+
fontWeight: 'normal',
|
|
69
|
+
lineHeight: 'normal',
|
|
70
|
+
},
|
|
71
|
+
label12: {
|
|
72
|
+
color: styledVars.CAP_WHITE,
|
|
73
|
+
fontSize: '12px',
|
|
74
|
+
fontWeight: 'normal',
|
|
75
|
+
lineHeight: 'normal',
|
|
76
|
+
},
|
|
77
|
+
label13: {
|
|
78
|
+
color: styledVars.CAP_G05,
|
|
79
|
+
fontSize: '10px',
|
|
80
|
+
fontWeight: 'normal',
|
|
81
|
+
lineHeight: 'normal',
|
|
82
|
+
},
|
|
83
|
+
label14: {
|
|
84
|
+
color: styledVars.CAP_G03,
|
|
85
|
+
fontSize: '14px',
|
|
86
|
+
fontWeight: 'normal',
|
|
87
|
+
lineHeight: 'normal',
|
|
88
|
+
},
|
|
89
|
+
label15: {
|
|
90
|
+
color: styledVars.CAP_G01,
|
|
91
|
+
fontSize: '14px',
|
|
92
|
+
fontWeight: 'normal',
|
|
93
|
+
lineHeight: 'normal',
|
|
94
|
+
},
|
|
95
|
+
label16: {
|
|
96
|
+
color: styledVars.CAP_G01,
|
|
97
|
+
fontSize: '14px',
|
|
98
|
+
fontWeight: '500',
|
|
99
|
+
lineHeight: 'normal',
|
|
100
|
+
},
|
|
101
|
+
label17: {
|
|
102
|
+
color: styledVars.CAP_G01,
|
|
103
|
+
fontSize: '16px',
|
|
104
|
+
fontWeight: '500',
|
|
105
|
+
lineHeight: 'normal',
|
|
106
|
+
},
|
|
107
|
+
label18: {
|
|
108
|
+
color: styledVars.CAP_G04,
|
|
109
|
+
fontSize: '14px',
|
|
110
|
+
fontWeight: 'normal',
|
|
111
|
+
lineHeight: 'normal',
|
|
112
|
+
},
|
|
113
|
+
label19: {
|
|
114
|
+
color: 'rgba(0, 0, 0, 0.87)',
|
|
115
|
+
fontSize: '12px',
|
|
116
|
+
fontWeight: 'normal',
|
|
117
|
+
lineHeight: '16px',
|
|
118
|
+
},
|
|
119
|
+
label20: {
|
|
120
|
+
color: styledVars.CAP_SECONDARY.base,
|
|
121
|
+
fontSize: '14px',
|
|
122
|
+
fontWeight: '500',
|
|
123
|
+
lineHeight: 'normal',
|
|
124
|
+
},
|
|
125
|
+
label21: {
|
|
126
|
+
color: styledVars.CAP_SECONDARY.base,
|
|
127
|
+
fontSize: '12px',
|
|
128
|
+
fontWeight: 'normal',
|
|
129
|
+
lineHeight: 'normal',
|
|
130
|
+
},
|
|
131
|
+
label22: {
|
|
132
|
+
color: styledVars.CAP_G04,
|
|
133
|
+
fontSize: '24px',
|
|
134
|
+
fontWeight: 'normal',
|
|
135
|
+
lineHeight: '28px',
|
|
136
|
+
},
|
|
137
|
+
label23: {
|
|
138
|
+
color: styledVars.CAP_WHITE,
|
|
139
|
+
fontSize: '14px',
|
|
140
|
+
fontWeight: 'normal',
|
|
141
|
+
lineHeight: 'normal',
|
|
142
|
+
},
|
|
143
|
+
label24: {
|
|
144
|
+
fontSize: '14px',
|
|
145
|
+
fontWeight: '400',
|
|
146
|
+
color: styledVars.CAP_G04,
|
|
147
|
+
lineHeight: '20px',
|
|
148
|
+
},
|
|
149
|
+
label25: {
|
|
150
|
+
fontSize: '14px',
|
|
151
|
+
fontWeight: '500',
|
|
152
|
+
color: styledVars.CAP_G04,
|
|
153
|
+
lineHeight: '20px',
|
|
154
|
+
},
|
|
155
|
+
label26: {
|
|
156
|
+
fontSize: '10px',
|
|
157
|
+
fontWeight: '400',
|
|
158
|
+
color: styledVars.CAP_G01,
|
|
159
|
+
lineHeight: '12px',
|
|
160
|
+
},
|
|
161
|
+
label27: {
|
|
162
|
+
fontSize: '12px',
|
|
163
|
+
fontWeight: '500',
|
|
164
|
+
color: styledVars.CAP_SECONDARY.base,
|
|
165
|
+
lineHeight: '16px',
|
|
166
|
+
},
|
|
167
|
+
label28: {
|
|
168
|
+
fontSize: '12px',
|
|
169
|
+
fontWeight: '500',
|
|
170
|
+
color: styledVars.CAP_WHITE,
|
|
171
|
+
lineHeight: '16px',
|
|
172
|
+
},
|
|
173
|
+
label29: {
|
|
174
|
+
fontSize: '10px',
|
|
175
|
+
fontWeight: '400',
|
|
176
|
+
color: styledVars.CAP_WHITE,
|
|
177
|
+
lineHeight: '12px',
|
|
178
|
+
},
|
|
179
|
+
label30: {
|
|
180
|
+
fontSize: '10px',
|
|
181
|
+
fontWeight: '400',
|
|
182
|
+
color: styledVars.CAP_WHITE,
|
|
183
|
+
lineHeight: '12px',
|
|
184
|
+
},
|
|
185
|
+
label31: {
|
|
186
|
+
color: styledVars.CAP_G01,
|
|
187
|
+
fontSize: '12px',
|
|
188
|
+
fontWeight: '400',
|
|
189
|
+
lineHeight: '16px',
|
|
190
|
+
},
|
|
191
|
+
label32: {
|
|
192
|
+
color: styledVars.CAP_WHITE,
|
|
193
|
+
fontSize: '14px',
|
|
194
|
+
fontWeight: '500',
|
|
195
|
+
lineHeight: '20px',
|
|
196
|
+
},
|
|
197
|
+
label33: {
|
|
198
|
+
color: styledVars.CAP_SECONDARY.base,
|
|
199
|
+
fontSize: '14px',
|
|
200
|
+
fontWeight: '500',
|
|
201
|
+
lineHeight: '20px',
|
|
202
|
+
},
|
|
203
|
+
};
|
|
13
204
|
|
|
14
|
-
|
|
15
|
-
font-
|
|
16
|
-
font-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
line-height: ${({ typeStyles, lineHeight }) => lineHeight || typeStyles?.lineHeight || styledVars.NORMAL_LINE_HEIGHT};
|
|
205
|
+
const labelStyles = css`
|
|
206
|
+
font-size: ${props => labels[props.type].fontSize};
|
|
207
|
+
font-weight: ${props => props.fontWeight || labels[props.type].fontWeight};
|
|
208
|
+
color: ${props => labels[props.type].color};
|
|
209
|
+
line-height: ${props => props.lineHeight || labels[props.type].lineHeight || 'initial'};
|
|
20
210
|
margin: 0;
|
|
21
211
|
padding: 0;
|
|
22
212
|
`;
|
|
23
213
|
|
|
24
|
-
export const
|
|
25
|
-
|
|
26
|
-
font-family: ${styledVars.FONT_FAMILY};
|
|
27
|
-
|
|
28
|
-
&.label1 {
|
|
29
|
-
font-size: 0.857rem;
|
|
30
|
-
color: ${styledVars.CAP_G04};
|
|
31
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
32
|
-
line-height: normal;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
&.label2 {
|
|
36
|
-
font-size: 0.857rem;
|
|
37
|
-
color: ${styledVars.CAP_G01};
|
|
38
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
39
|
-
line-height: normal;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
&.label3 {
|
|
43
|
-
font-size: 0.857rem;
|
|
44
|
-
color: ${styledVars.CAP_G05};
|
|
45
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
46
|
-
line-height: normal;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&.label4 {
|
|
50
|
-
font-size: 0.857rem;
|
|
51
|
-
color: ${styledVars.CAP_G01};
|
|
52
|
-
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
53
|
-
line-height: normal;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&.label5 {
|
|
57
|
-
font-size: 0.714rem;
|
|
58
|
-
color: ${styledVars.CAP_G01};
|
|
59
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
60
|
-
line-height: normal;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&.label6 {
|
|
64
|
-
font-size: 0.857rem;
|
|
65
|
-
color: ${styledVars.CAP_G06};
|
|
66
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
67
|
-
line-height: normal;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
&.label7 {
|
|
71
|
-
font-size: 1rem;
|
|
72
|
-
color: ${styledVars.CAP_G04};
|
|
73
|
-
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
74
|
-
line-height: normal;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
&.label8 {
|
|
78
|
-
font-size: 0.857rem;
|
|
79
|
-
color: ${styledVars.CAP_G01};
|
|
80
|
-
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
81
|
-
line-height: normal;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
&.label9 {
|
|
85
|
-
font-size: 0.857rem;
|
|
86
|
-
color: ${styledVars.CAP_G01};
|
|
87
|
-
line-height: 1.143rem;
|
|
88
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
&.label10 {
|
|
92
|
-
font-size: 0.857rem;
|
|
93
|
-
color: ${styledVars.CAP_WHITE};
|
|
94
|
-
line-height: 1.143rem;
|
|
95
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
&.label11 {
|
|
99
|
-
font-size: 0.714rem;
|
|
100
|
-
color: ${styledVars.CAP_G04};
|
|
101
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
102
|
-
line-height: normal;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
&.label12 {
|
|
106
|
-
font-size: 0.857rem;
|
|
107
|
-
color: ${styledVars.CAP_WHITE};
|
|
108
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
109
|
-
line-height: normal;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
&.label13 {
|
|
113
|
-
font-size: 0.714rem;
|
|
114
|
-
color: ${styledVars.CAP_G05};
|
|
115
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
116
|
-
line-height: normal;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
&.label14 {
|
|
120
|
-
font-size: 1rem;
|
|
121
|
-
color: #676e7c;
|
|
122
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
123
|
-
line-height: normal;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
&.label15 {
|
|
127
|
-
font-size: 1rem;
|
|
128
|
-
color: ${styledVars.CAP_G01};
|
|
129
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
130
|
-
line-height: normal;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
&.label16 {
|
|
134
|
-
font-size: 1rem;
|
|
135
|
-
color: ${styledVars.CAP_G01};
|
|
136
|
-
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
137
|
-
line-height: normal;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
&.label17 {
|
|
141
|
-
font-size: 1.143rem;
|
|
142
|
-
color: ${styledVars.CAP_G01};
|
|
143
|
-
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
144
|
-
line-height: normal;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
&.label18 {
|
|
148
|
-
font-size: 1rem;
|
|
149
|
-
color: ${styledVars.CAP_G04};
|
|
150
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
151
|
-
line-height: normal;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
&.label19 {
|
|
155
|
-
font-size: 0.857rem;
|
|
156
|
-
line-height: 1.143rem;
|
|
157
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
158
|
-
color: rgba(0, 0, 0, 0.87);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
&.label20 {
|
|
162
|
-
font-size: 1rem;
|
|
163
|
-
color: ${styledVars.CAP_BLUE01};
|
|
164
|
-
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
165
|
-
line-height: normal;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
&.label21 {
|
|
169
|
-
font-size: 0.857rem;
|
|
170
|
-
color: ${styledVars.CAP_BLUE01};
|
|
171
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
172
|
-
line-height: normal;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
&.label22 {
|
|
176
|
-
font-size: 1.714rem;
|
|
177
|
-
color: ${styledVars.CAP_G04};
|
|
178
|
-
line-height: 2rem;
|
|
179
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
&.label23 {
|
|
183
|
-
font-size: 1rem;
|
|
184
|
-
color: ${styledVars.CAP_WHITE};
|
|
185
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
186
|
-
line-height: normal;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
&.label24 {
|
|
190
|
-
font-size: 1rem;
|
|
191
|
-
color: ${styledVars.CAP_G04};
|
|
192
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
193
|
-
line-height: 1.429rem;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
&.label25 {
|
|
197
|
-
font-size: 1rem;
|
|
198
|
-
color: ${styledVars.CAP_G04};
|
|
199
|
-
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
200
|
-
line-height: 1.429rem;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
&.label26 {
|
|
204
|
-
font-size: 0.714rem;
|
|
205
|
-
color: ${styledVars.CAP_G01};
|
|
206
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
207
|
-
line-height: 0.857rem;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
&.label27 {
|
|
211
|
-
font-size: 0.857rem;
|
|
212
|
-
color: ${styledVars.CAP_BLUE01};
|
|
213
|
-
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
214
|
-
line-height: 1.143rem;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
&.label28 {
|
|
218
|
-
color: ${styledVars.CAP_WHITE};
|
|
219
|
-
font-size: 0.857rem;
|
|
220
|
-
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
221
|
-
line-height: 1.143rem;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
&.label29 {
|
|
225
|
-
color: ${styledVars.CAP_WHITE};
|
|
226
|
-
font-size: 0.714rem;
|
|
227
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
228
|
-
line-height: 0.857rem;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
&.label30 {
|
|
232
|
-
color: ${styledVars.CAP_WHITE};
|
|
233
|
-
font-size: 0.714rem;
|
|
234
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
235
|
-
line-height: 0.857rem;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
&.label31 {
|
|
239
|
-
font-size: 0.857rem;
|
|
240
|
-
color: ${styledVars.CAP_G01};
|
|
241
|
-
font-weight: ${styledVars.FONT_WEIGHT_REGULAR};
|
|
242
|
-
line-height: 1.143rem;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
&.label32 {
|
|
246
|
-
line-height: 1.429rem;
|
|
247
|
-
font-size: 1rem;
|
|
248
|
-
color: ${styledVars.CAP_WHITE};
|
|
249
|
-
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
&.label33 {
|
|
253
|
-
font-size: 1rem;
|
|
254
|
-
color: ${styledVars.CAP_BLUE01};
|
|
255
|
-
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
256
|
-
line-height: 1.429rem;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
214
|
+
export const LabelWrapper = styled.div`
|
|
215
|
+
${labelStyles}
|
|
259
216
|
`;
|
|
217
|
+
|
|
218
|
+
export const LabelInline = styled.span`
|
|
219
|
+
${labelStyles}
|
|
220
|
+
display: inline-block;
|
|
221
|
+
`;
|
package/CapRow/CapRow.js
CHANGED
|
@@ -1,123 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import withStyles from '../utils/withStyles';
|
|
7
|
-
|
|
8
|
-
const CapRow = ({
|
|
9
|
-
children,
|
|
10
|
-
className = '',
|
|
11
|
-
style = {},
|
|
12
|
-
justify = 'start',
|
|
13
|
-
align = 'top',
|
|
14
|
-
gutter = 0,
|
|
15
|
-
wrap = true,
|
|
16
|
-
type,
|
|
17
|
-
width,
|
|
18
|
-
height,
|
|
19
|
-
margin,
|
|
20
|
-
padding,
|
|
21
|
-
prefixCls = 'ant-row',
|
|
22
|
-
fullWidth = false,
|
|
23
|
-
fullHeight = false,
|
|
24
|
-
fillSpace = false,
|
|
25
|
-
responsive = true,
|
|
26
|
-
vertical = false,
|
|
27
|
-
noWrap = false,
|
|
28
|
-
gap = null,
|
|
29
|
-
...rest
|
|
30
|
-
}) => {
|
|
31
|
-
// Use either the gap property or gutter for spacing
|
|
32
|
-
const gutterValue = gap !== null ? null : gutter;
|
|
33
|
-
const wrapValue = noWrap ? false : wrap;
|
|
3
|
+
import { Row } from 'antd';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import { RowWrapper } from './styles';
|
|
34
6
|
|
|
7
|
+
const CapRow = ({ className, children, ...rest }) => {
|
|
35
8
|
return (
|
|
36
|
-
<
|
|
37
|
-
className={
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
'with-custom-height': height,
|
|
42
|
-
'fill-space': fillSpace,
|
|
43
|
-
'full-width': fullWidth,
|
|
44
|
-
'full-height': fullHeight,
|
|
45
|
-
'ant-row-no-wrap': noWrap,
|
|
46
|
-
'with-gap': gap !== null,
|
|
47
|
-
},
|
|
48
|
-
className
|
|
49
|
-
)}
|
|
50
|
-
style={{
|
|
51
|
-
...(gap !== null ? { gap: typeof gap === 'number' ? `${gap}px` : gap } : {}),
|
|
52
|
-
...style,
|
|
53
|
-
}}
|
|
54
|
-
justify={justify}
|
|
55
|
-
align={align}
|
|
56
|
-
gutter={gutterValue}
|
|
57
|
-
wrap={wrapValue}
|
|
58
|
-
type={type}
|
|
59
|
-
width={width}
|
|
60
|
-
height={height}
|
|
61
|
-
margin={margin}
|
|
62
|
-
padding={padding}
|
|
63
|
-
prefixCls={prefixCls}
|
|
64
|
-
fullWidth={fullWidth}
|
|
65
|
-
fullHeight={fullHeight}
|
|
66
|
-
fillSpace={fillSpace}
|
|
67
|
-
responsive={responsive}
|
|
68
|
-
vertical={vertical}
|
|
69
|
-
{...rest}
|
|
70
|
-
>
|
|
71
|
-
{children}
|
|
72
|
-
</StyledRow>
|
|
9
|
+
<RowWrapper>
|
|
10
|
+
<Row {...rest} className={classNames('cap-row', className)}>
|
|
11
|
+
{React.Children.toArray(children)}
|
|
12
|
+
</Row>
|
|
13
|
+
</RowWrapper>
|
|
73
14
|
);
|
|
74
15
|
};
|
|
75
16
|
|
|
76
17
|
CapRow.propTypes = {
|
|
77
18
|
children: PropTypes.node,
|
|
78
19
|
className: PropTypes.string,
|
|
79
|
-
style: PropTypes.object,
|
|
80
|
-
justify: PropTypes.oneOf(['start', 'end', 'center', 'space-around', 'space-between', 'space-evenly']),
|
|
81
|
-
align: PropTypes.oneOf(['top', 'middle', 'bottom', 'stretch']),
|
|
82
|
-
gutter: PropTypes.oneOfType([
|
|
83
|
-
PropTypes.number,
|
|
84
|
-
PropTypes.object,
|
|
85
|
-
PropTypes.arrayOf(PropTypes.number),
|
|
86
|
-
]),
|
|
87
|
-
wrap: PropTypes.bool,
|
|
88
|
-
type: PropTypes.string,
|
|
89
|
-
width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
90
|
-
height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
91
|
-
margin: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
92
|
-
padding: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
93
|
-
prefixCls: PropTypes.string,
|
|
94
|
-
fullWidth: PropTypes.bool,
|
|
95
|
-
fullHeight: PropTypes.bool,
|
|
96
|
-
fillSpace: PropTypes.bool,
|
|
97
|
-
responsive: PropTypes.bool,
|
|
98
|
-
vertical: PropTypes.bool,
|
|
99
|
-
noWrap: PropTypes.bool,
|
|
100
|
-
gap: PropTypes.oneOfType([
|
|
101
|
-
PropTypes.number,
|
|
102
|
-
PropTypes.arrayOf(PropTypes.number),
|
|
103
|
-
PropTypes.string,
|
|
104
|
-
]),
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
CapRow.defaultProps = {
|
|
108
|
-
className: '',
|
|
109
|
-
style: {},
|
|
110
|
-
justify: 'start',
|
|
111
|
-
align: 'top',
|
|
112
|
-
gutter: 0,
|
|
113
|
-
wrap: true,
|
|
114
|
-
prefixCls: 'ant-row',
|
|
115
|
-
fullWidth: false,
|
|
116
|
-
fullHeight: false,
|
|
117
|
-
fillSpace: false,
|
|
118
|
-
responsive: true,
|
|
119
|
-
vertical: false,
|
|
120
|
-
noWrap: false,
|
|
121
20
|
};
|
|
122
21
|
|
|
123
|
-
export default
|
|
22
|
+
export default CapRow;
|
package/CapRow/index.js
CHANGED
package/CapRow/styles.js
CHANGED
|
@@ -1,50 +1,9 @@
|
|
|
1
|
-
import styled
|
|
2
|
-
import { Row } from 'antd-v5';
|
|
3
|
-
import * as styledVars from '../styled/variables';
|
|
1
|
+
import styled from 'styled-components';
|
|
4
2
|
|
|
5
|
-
export const
|
|
6
|
-
|
|
7
|
-
height: ${({ height, fullHeight }) => (fullHeight ? '100%' : height || 'auto')};
|
|
8
|
-
margin: ${({ margin }) => margin || 'inherit'};
|
|
9
|
-
padding: ${({ padding }) => padding || 'inherit'};
|
|
10
|
-
${({ responsive }) => !responsive && css`
|
|
3
|
+
export const RowWrapper = styled.div`
|
|
4
|
+
.cap-row {
|
|
11
5
|
display: flex;
|
|
12
|
-
flex-
|
|
13
|
-
|
|
14
|
-
${({ fillSpace }) => fillSpace && css`
|
|
15
|
-
flex: 1;
|
|
16
|
-
`};
|
|
17
|
-
`;
|
|
18
|
-
|
|
19
|
-
export const rowStyles = css`
|
|
20
|
-
&.cap-row-v2 {
|
|
21
|
-
&.with-custom-width {
|
|
22
|
-
width: auto;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&.with-custom-height {
|
|
26
|
-
height: auto;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&.fill-space {
|
|
30
|
-
flex: 1;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&.full-width {
|
|
34
|
-
width: 100%;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&.full-height {
|
|
38
|
-
height: 100%;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&.ant-row-no-wrap {
|
|
42
|
-
flex-wrap: nowrap;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&.with-gap {
|
|
46
|
-
display: grid;
|
|
47
|
-
grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
|
|
48
|
-
}
|
|
6
|
+
flex-flow: row wrap;
|
|
7
|
+
min-width: 0;
|
|
49
8
|
}
|
|
50
|
-
`;
|
|
9
|
+
`;
|
package/CapTable/CapTable.js
CHANGED
package/CapTable/loadable.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import CapSpin from '@capillarytech/cap-ui-library/CapSpin';
|
|
2
2
|
import { loadable } from '@capillarytech/cap-ui-utils';
|
|
3
3
|
import React, { Suspense } from 'react';
|
|
4
4
|
|
|
5
5
|
const LoadableComponent = loadable(() => import('./CapTable'));
|
|
6
6
|
|
|
7
|
-
const CapTableLoadable = (
|
|
8
|
-
<Suspense fallback={<
|
|
9
|
-
<LoadableComponent
|
|
7
|
+
const CapTableLoadable = () => (
|
|
8
|
+
<Suspense fallback={<CapSpin />}>
|
|
9
|
+
<LoadableComponent />
|
|
10
10
|
</Suspense>
|
|
11
11
|
);
|
|
12
12
|
|