@capillarytech/blaze-ui 0.1.6-alpha.4 → 0.1.6-alpha.41
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/.DS_Store +0 -0
- package/CapInput/CapInput.js +1 -1
- package/CapInput/Number.js +1 -1
- package/CapInput/Search.js +1 -1
- package/CapInput/TextArea.js +1 -1
- package/CapSkeleton/CapSkeleton.js +17 -0
- package/CapSkeleton/index.js +1 -0
- package/CapSpin/CapSpin.js +23 -0
- package/CapSpin/index.js +1 -0
- package/CapTable/loadable.js +4 -4
- package/CapTable/styles.js +1 -1
- package/CapTestSelect/CapTestSelect.js +47 -0
- package/CapTestSelect/index.js +1 -0
- package/CapUnifiedSelect/CapUnifiedSelect.js +252 -61
- package/CapUnifiedSelect/index.js +1 -4
- package/CapUnifiedSelect/styles.js +170 -166
- package/assets/upload.svg +3 -0
- package/index.js +7 -1
- package/package.json +7 -11
- package/utils/index.js +1 -0
- package/utils/withStyles.js +24 -0
- package/CapHeading/CapHeading.js +0 -71
- package/CapHeading/index.js +0 -1
- package/CapHeading/styles.js +0 -125
- package/CapInfoNote/CapInfoNote.js +0 -54
- package/CapInfoNote/index.js +0 -1
- package/CapInfoNote/styles.js +0 -63
- package/CapInput/loadable.js +0 -9
- package/CapLabel/CapLabel.js +0 -106
- package/CapLabel/index.js +0 -1
- package/CapLabel/styles.js +0 -221
- package/CapRow/CapRow.js +0 -22
- package/CapRow/index.js +0 -1
- package/CapRow/styles.js +0 -9
- package/CapTooltip/CapTooltip.js +0 -36
- package/CapTooltip/index.js +0 -1
- package/CapTooltip/styles.js +0 -42
- package/CapUnifiedSelect/loadable.js +0 -3
- package/dist/235.index.js +0 -2
- package/dist/235.index.js.LICENSE.txt +0 -29
- package/dist/603.index.js +0 -1
- package/dist/CapInput/CapInput.js +0 -66
- package/dist/CapInput/Number.js +0 -42
- package/dist/CapInput/Search.js +0 -35
- package/dist/CapInput/TextArea.js +0 -42
- package/dist/CapInput/index.js +0 -15
- package/dist/CapInput/messages.js +0 -32
- package/dist/CapInput/styles.js +0 -11
- package/dist/CapTable/CapTable.js +0 -148
- package/dist/CapTable/index.js +0 -9
- package/dist/CapTable/loadable.js +0 -23
- package/dist/CapTable/styles.js +0 -26
- package/dist/LocaleHoc/index.js +0 -40
- package/dist/esm/CapHeading/CapHeading.js +0 -41
- package/dist/esm/CapHeading/index.js +0 -1
- package/dist/esm/CapHeading/styles.js +0 -123
- package/dist/esm/CapInfoNote/CapInfoNote.js +0 -62
- package/dist/esm/CapInfoNote/index.js +0 -1
- package/dist/esm/CapInfoNote/styles.js +0 -6
- package/dist/esm/CapInput/CapInput.js +0 -57
- package/dist/esm/CapInput/Number.js +0 -35
- package/dist/esm/CapInput/Search.js +0 -28
- package/dist/esm/CapInput/TextArea.js +0 -35
- package/dist/esm/CapInput/index.js +0 -8
- package/dist/esm/CapInput/loadable.js +0 -9
- package/dist/esm/CapInput/messages.js +0 -25
- package/dist/esm/CapInput/styles.js +0 -3
- package/dist/esm/CapLabel/CapLabel.js +0 -50
- package/dist/esm/CapLabel/index.js +0 -1
- package/dist/esm/CapLabel/styles.js +0 -219
- package/dist/esm/CapRow/CapRow.js +0 -22
- package/dist/esm/CapRow/index.js +0 -1
- package/dist/esm/CapRow/styles.js +0 -5
- package/dist/esm/CapTable/CapTable.js +0 -140
- package/dist/esm/CapTable/index.js +0 -2
- package/dist/esm/CapTable/loadable.js +0 -12
- package/dist/esm/CapTable/styles.js +0 -17
- package/dist/esm/CapTooltip/CapTooltip.js +0 -34
- package/dist/esm/CapTooltip/index.js +0 -1
- package/dist/esm/CapTooltip/styles.js +0 -6
- package/dist/esm/CapUnifiedSelect/CapUnifiedSelect.js +0 -101
- package/dist/esm/CapUnifiedSelect/index.js +0 -3
- package/dist/esm/CapUnifiedSelect/loadable.js +0 -4
- package/dist/esm/CapUnifiedSelect/messages.js +0 -23
- package/dist/esm/CapUnifiedSelect/styles.js +0 -15
- package/dist/esm/LocaleHoc/index.js +0 -31
- package/dist/esm/index.js +0 -11
- package/dist/esm/styled/index.js +0 -5
- package/dist/esm/styled/variables.js +0 -88
- package/dist/esm/translations/en.js +0 -329
- package/dist/index.js +0 -39
- package/dist/index.js.LICENSE.txt +0 -7
- package/dist/styled/index.js +0 -22
- package/dist/styled/variables.js +0 -94
- package/dist/translations/en.js +0 -335
|
@@ -1,54 +0,0 @@
|
|
|
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;
|
package/CapInfoNote/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './CapInfoNote';
|
package/CapInfoNote/styles.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
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
|
-
`;
|
package/CapInput/loadable.js
DELETED
package/CapLabel/CapLabel.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
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;
|
package/CapLabel/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './CapLabel';
|
package/CapLabel/styles.js
DELETED
|
@@ -1,221 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
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
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './CapRow';
|
package/CapRow/styles.js
DELETED
package/CapTooltip/CapTooltip.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { Tooltip } from 'antd';
|
|
4
|
-
import classNames from 'classnames';
|
|
5
|
-
import { TooltipWrapper } from './styles';
|
|
6
|
-
|
|
7
|
-
const CapTooltip = ({ overlayClassName, children, ...rest }) => {
|
|
8
|
-
return (
|
|
9
|
-
<TooltipWrapper>
|
|
10
|
-
<Tooltip
|
|
11
|
-
overlayClassName={classNames('cap-tooltip', overlayClassName)}
|
|
12
|
-
{...rest}
|
|
13
|
-
>
|
|
14
|
-
{children}
|
|
15
|
-
</Tooltip>
|
|
16
|
-
</TooltipWrapper>
|
|
17
|
-
);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
/*
|
|
21
|
-
NOTE:
|
|
22
|
-
While using a disabled button with tooltip, wrap the button with an element with className "button-disabled-tooltip-wrapper".
|
|
23
|
-
|
|
24
|
-
<CapTooltip title="disabled button with tooltip">
|
|
25
|
-
<span className="button-disabled-tooltip-wrapper">
|
|
26
|
-
<CapButton disabled>Button</CapButton>
|
|
27
|
-
</span>
|
|
28
|
-
</CapTooltip>
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
CapTooltip.propTypes = {
|
|
32
|
-
overlayClassName: PropTypes.string,
|
|
33
|
-
children: PropTypes.node,
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export default CapTooltip;
|
package/CapTooltip/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './CapTooltip';
|
package/CapTooltip/styles.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import * as styledVars from '../styled/variables';
|
|
3
|
-
|
|
4
|
-
export const TooltipWrapper = styled.span`
|
|
5
|
-
.cap-tooltip {
|
|
6
|
-
max-width: 324px;
|
|
7
|
-
|
|
8
|
-
.ant-tooltip-inner {
|
|
9
|
-
background-color: ${styledVars.FONT_COLOR_01};
|
|
10
|
-
font-size: ${styledVars.FONT_SIZE_M};
|
|
11
|
-
font-weight: ${styledVars.FONT_WEIGHT_MEDIUM};
|
|
12
|
-
padding: 6px 8px;
|
|
13
|
-
min-height: 32px;
|
|
14
|
-
border-radius: ${styledVars.RADIUS_04};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
&.cap-bgcolor-tooltip {
|
|
18
|
-
.ant-tooltip-inner {
|
|
19
|
-
background-color: ${styledVars.FONT_COLOR_05};
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&.hide-tooltip-pointer {
|
|
24
|
-
.ant-tooltip-arrow {
|
|
25
|
-
display: none;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.button-disabled-tooltip-wrapper {
|
|
31
|
-
display: inline-flex;
|
|
32
|
-
cursor: not-allowed;
|
|
33
|
-
|
|
34
|
-
.cap-button.ant-btn[disabled] {
|
|
35
|
-
pointer-events: none;
|
|
36
|
-
& > * {
|
|
37
|
-
pointer-events: auto;
|
|
38
|
-
cursor: not-allowed;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
`;
|