@capillarytech/blaze-ui 0.1.6-alpha.39 → 0.1.6-alpha.4
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/loadable.js +9 -0
- package/CapLabel/CapLabel.js +106 -0
- package/CapLabel/index.js +1 -0
- package/CapLabel/styles.js +221 -0
- package/CapRow/CapRow.js +22 -0
- package/CapRow/index.js +1 -0
- package/CapRow/styles.js +9 -0
- package/CapTable/loadable.js +4 -4
- package/CapTooltip/CapTooltip.js +36 -0
- package/CapTooltip/index.js +1 -0
- package/CapTooltip/styles.js +42 -0
- package/CapUnifiedSelect/CapUnifiedSelect.js +59 -249
- package/CapUnifiedSelect/index.js +4 -1
- package/CapUnifiedSelect/loadable.js +3 -0
- package/CapUnifiedSelect/styles.js +26 -272
- 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 +148 -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 +140 -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 -7
- package/package.json +10 -6
- package/.DS_Store +0 -0
- 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/assets/upload.svg +0 -3
- package/utils/index.js +0 -1
- package/utils/withStyles.js +0 -24
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { HeadingWrapper, HeadingSpan } from './styles';
|
|
4
|
+
|
|
5
|
+
const CapHeading = ({ type = 'h5', children, as, ...rest }) => {
|
|
6
|
+
return (
|
|
7
|
+
<HeadingWrapper type={type} as={as || 'div'} {...rest}>
|
|
8
|
+
{children}
|
|
9
|
+
</HeadingWrapper>
|
|
10
|
+
);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
CapHeading.propTypes = {
|
|
14
|
+
type: PropTypes.oneOf([
|
|
15
|
+
'h0',
|
|
16
|
+
'h1',
|
|
17
|
+
'h2',
|
|
18
|
+
'h3',
|
|
19
|
+
'h4',
|
|
20
|
+
'h5',
|
|
21
|
+
'h6',
|
|
22
|
+
'h7',
|
|
23
|
+
'h8',
|
|
24
|
+
'h9',
|
|
25
|
+
'h10',
|
|
26
|
+
'label1',
|
|
27
|
+
'label2',
|
|
28
|
+
'label3',
|
|
29
|
+
'label4',
|
|
30
|
+
'label5',
|
|
31
|
+
'label6',
|
|
32
|
+
]),
|
|
33
|
+
children: PropTypes.node,
|
|
34
|
+
as: PropTypes.string,
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
// Inline span version
|
|
38
|
+
const CapHeadingSpan = ({ type = 'h5', children, ...rest }) => {
|
|
39
|
+
return (
|
|
40
|
+
<HeadingSpan type={type} {...rest}>
|
|
41
|
+
{children}
|
|
42
|
+
</HeadingSpan>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
CapHeadingSpan.propTypes = {
|
|
47
|
+
type: PropTypes.oneOf([
|
|
48
|
+
'h0',
|
|
49
|
+
'h1',
|
|
50
|
+
'h2',
|
|
51
|
+
'h3',
|
|
52
|
+
'h4',
|
|
53
|
+
'h5',
|
|
54
|
+
'h6',
|
|
55
|
+
'h7',
|
|
56
|
+
'h8',
|
|
57
|
+
'h9',
|
|
58
|
+
'h10',
|
|
59
|
+
'label1',
|
|
60
|
+
'label2',
|
|
61
|
+
'label3',
|
|
62
|
+
'label4',
|
|
63
|
+
'label5',
|
|
64
|
+
'label6',
|
|
65
|
+
]),
|
|
66
|
+
children: PropTypes.node,
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
CapHeading.Span = CapHeadingSpan;
|
|
70
|
+
|
|
71
|
+
export default CapHeading;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CapHeading';
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import * as styledVars from '../styled/variables';
|
|
3
|
+
|
|
4
|
+
const headings = {
|
|
5
|
+
h0: {
|
|
6
|
+
fontSize: '28px',
|
|
7
|
+
fontWeight: '500',
|
|
8
|
+
color: styledVars.CAP_G01,
|
|
9
|
+
lineHeight: '36px',
|
|
10
|
+
},
|
|
11
|
+
h1: {
|
|
12
|
+
fontSize: '24px',
|
|
13
|
+
fontWeight: '500',
|
|
14
|
+
color: styledVars.CAP_G01,
|
|
15
|
+
lineHeight: '32px',
|
|
16
|
+
},
|
|
17
|
+
h2: {
|
|
18
|
+
fontSize: '20px',
|
|
19
|
+
fontWeight: '500',
|
|
20
|
+
color: styledVars.CAP_G01,
|
|
21
|
+
lineHeight: '28px',
|
|
22
|
+
},
|
|
23
|
+
h3: {
|
|
24
|
+
fontSize: '16px',
|
|
25
|
+
fontWeight: '500',
|
|
26
|
+
color: styledVars.CAP_G01,
|
|
27
|
+
lineHeight: '24px',
|
|
28
|
+
},
|
|
29
|
+
h4: {
|
|
30
|
+
fontSize: '14px',
|
|
31
|
+
fontWeight: '500',
|
|
32
|
+
color: styledVars.CAP_G01,
|
|
33
|
+
lineHeight: '20px',
|
|
34
|
+
},
|
|
35
|
+
h5: {
|
|
36
|
+
fontSize: '14px',
|
|
37
|
+
fontWeight: 'normal',
|
|
38
|
+
color: styledVars.CAP_G01,
|
|
39
|
+
lineHeight: '20px',
|
|
40
|
+
},
|
|
41
|
+
h6: {
|
|
42
|
+
color: styledVars.CAP_G04,
|
|
43
|
+
fontSize: '14px',
|
|
44
|
+
fontWeight: 'normal',
|
|
45
|
+
lineHeight: '20px',
|
|
46
|
+
},
|
|
47
|
+
h7: {
|
|
48
|
+
fontSize: '20px',
|
|
49
|
+
fontWeight: '500',
|
|
50
|
+
color: styledVars.CAP_G04,
|
|
51
|
+
lineHeight: '28px',
|
|
52
|
+
},
|
|
53
|
+
h8: {
|
|
54
|
+
fontSize: '14px',
|
|
55
|
+
fontWeight: '400',
|
|
56
|
+
color: styledVars.CAP_G01,
|
|
57
|
+
lineHeight: '20px',
|
|
58
|
+
},
|
|
59
|
+
h9: {
|
|
60
|
+
fontSize: '14px',
|
|
61
|
+
fontWeight: '500',
|
|
62
|
+
color: styledVars.CAP_WHITE,
|
|
63
|
+
lineHeight: '20px',
|
|
64
|
+
},
|
|
65
|
+
h10: {
|
|
66
|
+
fontSize: '12px',
|
|
67
|
+
fontWeight: '500',
|
|
68
|
+
color: styledVars.CAP_G01,
|
|
69
|
+
lineHeight: '16px',
|
|
70
|
+
},
|
|
71
|
+
label1: {
|
|
72
|
+
color: styledVars.CAP_G04,
|
|
73
|
+
fontSize: '12px',
|
|
74
|
+
fontWeight: 'normal',
|
|
75
|
+
lineHeight: '20px',
|
|
76
|
+
},
|
|
77
|
+
label2: {
|
|
78
|
+
color: styledVars.CAP_G01,
|
|
79
|
+
fontSize: '12px',
|
|
80
|
+
fontWeight: 'normal',
|
|
81
|
+
lineHeight: '20px',
|
|
82
|
+
},
|
|
83
|
+
label3: {
|
|
84
|
+
color: styledVars.CAP_G05,
|
|
85
|
+
fontSize: '12px',
|
|
86
|
+
fontWeight: 'normal',
|
|
87
|
+
lineHeight: '20px',
|
|
88
|
+
},
|
|
89
|
+
label4: {
|
|
90
|
+
color: styledVars.CAP_G04,
|
|
91
|
+
fontSize: '12px',
|
|
92
|
+
fontWeight: 'normal',
|
|
93
|
+
lineHeight: '16px',
|
|
94
|
+
},
|
|
95
|
+
label5: {
|
|
96
|
+
color: styledVars.CAP_G04,
|
|
97
|
+
fontSize: '16px',
|
|
98
|
+
fontWeight: 'normal',
|
|
99
|
+
lineHeight: '24px',
|
|
100
|
+
},
|
|
101
|
+
label6: {
|
|
102
|
+
color: styledVars.CAP_G01,
|
|
103
|
+
fontSize: '16px',
|
|
104
|
+
fontWeight: 'normal',
|
|
105
|
+
lineHeight: '24px',
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const headingStyles = css`
|
|
110
|
+
font-size: ${props => headings[props.type].fontSize};
|
|
111
|
+
font-weight: ${props => headings[props.type].fontWeight};
|
|
112
|
+
color: ${props => headings[props.type].color};
|
|
113
|
+
line-height: ${props => headings[props.type].lineHeight};
|
|
114
|
+
margin: 0;
|
|
115
|
+
padding: 0;
|
|
116
|
+
`;
|
|
117
|
+
|
|
118
|
+
export const HeadingWrapper = styled.div`
|
|
119
|
+
${headingStyles}
|
|
120
|
+
`;
|
|
121
|
+
|
|
122
|
+
export const HeadingSpan = styled.span`
|
|
123
|
+
${headingStyles}
|
|
124
|
+
display: inline-block;
|
|
125
|
+
`;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { Alert } from 'antd';
|
|
4
|
+
import { InfoNoteWrapper } from './styles';
|
|
5
|
+
import CapLabel from '../CapLabel';
|
|
6
|
+
import CapRow from '../CapRow';
|
|
7
|
+
|
|
8
|
+
const Note = ({ noteText }) => (
|
|
9
|
+
<CapLabel.Inline type="label4" className="note-text">
|
|
10
|
+
{noteText}
|
|
11
|
+
</CapLabel.Inline>
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
Note.propTypes = {
|
|
15
|
+
noteText: PropTypes.string,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const CapInfoNote = ({ message, style, noteText, type = 'info', className, ...rest }) => {
|
|
19
|
+
return (
|
|
20
|
+
<InfoNoteWrapper>
|
|
21
|
+
<Alert
|
|
22
|
+
message={(
|
|
23
|
+
<CapRow className="note-message-container">
|
|
24
|
+
<Note noteText={noteText} />:
|
|
25
|
+
<CapRow className="message-text">{message}</CapRow>
|
|
26
|
+
</CapRow>
|
|
27
|
+
)}
|
|
28
|
+
className={className}
|
|
29
|
+
type={type}
|
|
30
|
+
showIcon
|
|
31
|
+
style={{
|
|
32
|
+
marginTop: '0.857rem',
|
|
33
|
+
marginBottom: '0.857rem',
|
|
34
|
+
...style,
|
|
35
|
+
}}
|
|
36
|
+
{...rest}
|
|
37
|
+
/>
|
|
38
|
+
</InfoNoteWrapper>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
CapInfoNote.propTypes = {
|
|
43
|
+
message: PropTypes.node,
|
|
44
|
+
style: PropTypes.object,
|
|
45
|
+
noteText: PropTypes.string,
|
|
46
|
+
type: PropTypes.string,
|
|
47
|
+
className: PropTypes.string,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
CapInfoNote.defaultProps = {
|
|
51
|
+
type: 'info',
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export default CapInfoNote;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CapInfoNote';
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import * as styledVars from '../styled/variables';
|
|
3
|
+
|
|
4
|
+
export const InfoNoteWrapper = styled.div`
|
|
5
|
+
.note-text {
|
|
6
|
+
padding-left: ${styledVars.CAP_SPACE_24};
|
|
7
|
+
white-space: nowrap;
|
|
8
|
+
line-height: inherit;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.note-message-container {
|
|
12
|
+
display: flex;
|
|
13
|
+
.message-text {
|
|
14
|
+
margin-left: 0.22rem;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ant-alert {
|
|
19
|
+
padding: 8px 12px;
|
|
20
|
+
border-radius: ${styledVars.RADIUS_04};
|
|
21
|
+
|
|
22
|
+
.ant-alert-icon {
|
|
23
|
+
font-size: ${styledVars.ICON_SIZE_S};
|
|
24
|
+
top: 9px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.ant-alert-info {
|
|
28
|
+
background-color: ${styledVars.CAP_G09};
|
|
29
|
+
border: 1px solid ${styledVars.CAP_G07};
|
|
30
|
+
|
|
31
|
+
.ant-alert-icon {
|
|
32
|
+
color: ${styledVars.CAP_G01};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.ant-alert-success {
|
|
37
|
+
background-color: ${styledVars.CAP_COLOR_01};
|
|
38
|
+
border: 1px solid ${styledVars.CAP_PRIMARY.base};
|
|
39
|
+
|
|
40
|
+
.ant-alert-icon {
|
|
41
|
+
color: ${styledVars.CAP_PRIMARY.base};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&.ant-alert-warning {
|
|
46
|
+
background-color: ${styledVars.CAP_COLOR_02};
|
|
47
|
+
border: 1px solid ${styledVars.CAP_ORANGE};
|
|
48
|
+
|
|
49
|
+
.ant-alert-icon {
|
|
50
|
+
color: ${styledVars.CAP_ORANGE};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&.ant-alert-error {
|
|
55
|
+
background-color: ${styledVars.CAP_COLOR_05};
|
|
56
|
+
border: 1px solid ${styledVars.CAP_RED};
|
|
57
|
+
|
|
58
|
+
.ant-alert-icon {
|
|
59
|
+
color: ${styledVars.CAP_RED};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
`;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { LabelWrapper, LabelInline } from './styles';
|
|
4
|
+
|
|
5
|
+
const CapLabel = ({ type = 'label1', children, fontWeight, lineHeight, ...rest }) => {
|
|
6
|
+
return (
|
|
7
|
+
<LabelWrapper type={type} fontWeight={fontWeight} lineHeight={lineHeight} {...rest}>
|
|
8
|
+
{children}
|
|
9
|
+
</LabelWrapper>
|
|
10
|
+
);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
CapLabel.propTypes = {
|
|
14
|
+
type: PropTypes.oneOf([
|
|
15
|
+
'label1',
|
|
16
|
+
'label2',
|
|
17
|
+
'label3',
|
|
18
|
+
'label4',
|
|
19
|
+
'label5',
|
|
20
|
+
'label6',
|
|
21
|
+
'label7',
|
|
22
|
+
'label8',
|
|
23
|
+
'label9',
|
|
24
|
+
'label10',
|
|
25
|
+
'label11',
|
|
26
|
+
'label12',
|
|
27
|
+
'label13',
|
|
28
|
+
'label14',
|
|
29
|
+
'label15',
|
|
30
|
+
'label16',
|
|
31
|
+
'label17',
|
|
32
|
+
'label18',
|
|
33
|
+
'label19',
|
|
34
|
+
'label20',
|
|
35
|
+
'label21',
|
|
36
|
+
'label22',
|
|
37
|
+
'label23',
|
|
38
|
+
'label24',
|
|
39
|
+
'label25',
|
|
40
|
+
'label26',
|
|
41
|
+
'label27',
|
|
42
|
+
'label28',
|
|
43
|
+
'label29',
|
|
44
|
+
'label30',
|
|
45
|
+
'label31',
|
|
46
|
+
'label32',
|
|
47
|
+
'label33',
|
|
48
|
+
]),
|
|
49
|
+
children: PropTypes.node,
|
|
50
|
+
fontWeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
51
|
+
lineHeight: PropTypes.string,
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// Inline span version
|
|
55
|
+
const CapLabelInline = ({ type = 'label1', children, fontWeight, lineHeight, ...rest }) => {
|
|
56
|
+
return (
|
|
57
|
+
<LabelInline type={type} fontWeight={fontWeight} lineHeight={lineHeight} {...rest}>
|
|
58
|
+
{children}
|
|
59
|
+
</LabelInline>
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
CapLabelInline.propTypes = {
|
|
64
|
+
type: PropTypes.oneOf([
|
|
65
|
+
'label1',
|
|
66
|
+
'label2',
|
|
67
|
+
'label3',
|
|
68
|
+
'label4',
|
|
69
|
+
'label5',
|
|
70
|
+
'label6',
|
|
71
|
+
'label7',
|
|
72
|
+
'label8',
|
|
73
|
+
'label9',
|
|
74
|
+
'label10',
|
|
75
|
+
'label11',
|
|
76
|
+
'label12',
|
|
77
|
+
'label13',
|
|
78
|
+
'label14',
|
|
79
|
+
'label15',
|
|
80
|
+
'label16',
|
|
81
|
+
'label17',
|
|
82
|
+
'label18',
|
|
83
|
+
'label19',
|
|
84
|
+
'label20',
|
|
85
|
+
'label21',
|
|
86
|
+
'label22',
|
|
87
|
+
'label23',
|
|
88
|
+
'label24',
|
|
89
|
+
'label25',
|
|
90
|
+
'label26',
|
|
91
|
+
'label27',
|
|
92
|
+
'label28',
|
|
93
|
+
'label29',
|
|
94
|
+
'label30',
|
|
95
|
+
'label31',
|
|
96
|
+
'label32',
|
|
97
|
+
'label33',
|
|
98
|
+
]),
|
|
99
|
+
children: PropTypes.node,
|
|
100
|
+
fontWeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
101
|
+
lineHeight: PropTypes.string,
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
CapLabel.Inline = CapLabelInline;
|
|
105
|
+
|
|
106
|
+
export default CapLabel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CapLabel';
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import * as styledVars from '../styled/variables';
|
|
3
|
+
|
|
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
|
+
};
|
|
204
|
+
|
|
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'};
|
|
210
|
+
margin: 0;
|
|
211
|
+
padding: 0;
|
|
212
|
+
`;
|
|
213
|
+
|
|
214
|
+
export const LabelWrapper = styled.div`
|
|
215
|
+
${labelStyles}
|
|
216
|
+
`;
|
|
217
|
+
|
|
218
|
+
export const LabelInline = styled.span`
|
|
219
|
+
${labelStyles}
|
|
220
|
+
display: inline-block;
|
|
221
|
+
`;
|
package/CapRow/CapRow.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { Row } from 'antd';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import { RowWrapper } from './styles';
|
|
6
|
+
|
|
7
|
+
const CapRow = ({ className, children, ...rest }) => {
|
|
8
|
+
return (
|
|
9
|
+
<RowWrapper>
|
|
10
|
+
<Row {...rest} className={classNames('cap-row', className)}>
|
|
11
|
+
{React.Children.toArray(children)}
|
|
12
|
+
</Row>
|
|
13
|
+
</RowWrapper>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
CapRow.propTypes = {
|
|
18
|
+
children: PropTypes.node,
|
|
19
|
+
className: PropTypes.string,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default CapRow;
|
package/CapRow/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CapRow';
|