@capillarytech/blaze-ui 0.1.6-alpha.48 → 0.1.6-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/CapHeading/CapHeading.js +71 -0
  2. package/CapHeading/index.js +1 -0
  3. package/CapHeading/styles.js +125 -0
  4. package/CapInfoNote/CapInfoNote.js +54 -0
  5. package/CapInfoNote/index.js +1 -0
  6. package/CapInfoNote/styles.js +63 -0
  7. package/CapInput/CapInput.js +1 -1
  8. package/CapInput/Number.js +1 -1
  9. package/CapInput/Search.js +1 -1
  10. package/CapInput/TextArea.js +1 -1
  11. package/CapInput/loadable.js +9 -0
  12. package/CapLabel/CapLabel.js +81 -101
  13. package/CapLabel/index.js +1 -3
  14. package/CapLabel/styles.js +212 -250
  15. package/CapRow/CapRow.js +10 -111
  16. package/CapRow/index.js +1 -3
  17. package/CapRow/styles.js +6 -47
  18. package/CapTable/loadable.js +4 -4
  19. package/CapTable/styles.js +1 -1
  20. package/CapTooltip/CapTooltip.js +25 -87
  21. package/CapTooltip/index.js +1 -3
  22. package/CapTooltip/styles.js +27 -19
  23. package/CapUnifiedSelect/CapUnifiedSelect.js +66 -308
  24. package/CapUnifiedSelect/index.js +4 -1
  25. package/CapUnifiedSelect/loadable.js +3 -0
  26. package/CapUnifiedSelect/styles.js +151 -255
  27. package/dist/235.index.js +2 -0
  28. package/dist/235.index.js.LICENSE.txt +29 -0
  29. package/dist/603.index.js +1 -0
  30. package/dist/CapInput/CapInput.js +66 -0
  31. package/dist/CapInput/Number.js +42 -0
  32. package/dist/CapInput/Search.js +35 -0
  33. package/dist/CapInput/TextArea.js +42 -0
  34. package/dist/CapInput/index.js +15 -0
  35. package/dist/CapInput/messages.js +32 -0
  36. package/dist/CapInput/styles.js +11 -0
  37. package/dist/CapTable/CapTable.js +148 -0
  38. package/dist/CapTable/index.js +9 -0
  39. package/dist/CapTable/loadable.js +23 -0
  40. package/dist/CapTable/styles.js +26 -0
  41. package/dist/LocaleHoc/index.js +40 -0
  42. package/dist/esm/CapHeading/CapHeading.js +41 -0
  43. package/dist/esm/CapHeading/index.js +1 -0
  44. package/dist/esm/CapHeading/styles.js +123 -0
  45. package/dist/esm/CapInfoNote/CapInfoNote.js +62 -0
  46. package/dist/esm/CapInfoNote/index.js +1 -0
  47. package/dist/esm/CapInfoNote/styles.js +6 -0
  48. package/dist/esm/CapInput/CapInput.js +57 -0
  49. package/dist/esm/CapInput/Number.js +35 -0
  50. package/dist/esm/CapInput/Search.js +28 -0
  51. package/dist/esm/CapInput/TextArea.js +35 -0
  52. package/dist/esm/CapInput/index.js +8 -0
  53. package/dist/esm/CapInput/loadable.js +9 -0
  54. package/dist/esm/CapInput/messages.js +25 -0
  55. package/dist/esm/CapInput/styles.js +3 -0
  56. package/dist/esm/CapLabel/CapLabel.js +50 -0
  57. package/dist/esm/CapLabel/index.js +1 -0
  58. package/dist/esm/CapLabel/styles.js +219 -0
  59. package/dist/esm/CapRow/CapRow.js +22 -0
  60. package/dist/esm/CapRow/index.js +1 -0
  61. package/dist/esm/CapRow/styles.js +5 -0
  62. package/dist/esm/CapTable/CapTable.js +140 -0
  63. package/dist/esm/CapTable/index.js +2 -0
  64. package/dist/esm/CapTable/loadable.js +12 -0
  65. package/dist/esm/CapTable/styles.js +17 -0
  66. package/dist/esm/CapTooltip/CapTooltip.js +34 -0
  67. package/dist/esm/CapTooltip/index.js +1 -0
  68. package/dist/esm/CapTooltip/styles.js +6 -0
  69. package/dist/esm/CapUnifiedSelect/CapUnifiedSelect.js +101 -0
  70. package/dist/esm/CapUnifiedSelect/index.js +3 -0
  71. package/dist/esm/CapUnifiedSelect/loadable.js +4 -0
  72. package/dist/esm/CapUnifiedSelect/messages.js +23 -0
  73. package/dist/esm/CapUnifiedSelect/styles.js +15 -0
  74. package/dist/esm/LocaleHoc/index.js +31 -0
  75. package/dist/esm/index.js +11 -0
  76. package/dist/esm/styled/index.js +5 -0
  77. package/dist/esm/styled/variables.js +88 -0
  78. package/dist/esm/translations/en.js +329 -0
  79. package/dist/index.js +39 -0
  80. package/dist/index.js.LICENSE.txt +7 -0
  81. package/dist/styled/index.js +22 -0
  82. package/dist/styled/variables.js +94 -0
  83. package/dist/translations/en.js +335 -0
  84. package/index.js +1 -12
  85. package/package.json +11 -5
  86. package/.DS_Store +0 -0
  87. package/CapIcon/CapIcon.js +0 -183
  88. package/CapIcon/index.js +0 -3
  89. package/CapIcon/styles.js +0 -76
  90. package/CapSkeleton/CapSkeleton.js +0 -17
  91. package/CapSkeleton/index.js +0 -1
  92. package/CapSpin/CapSpin.js +0 -23
  93. package/CapSpin/index.js +0 -1
  94. package/CapTestSelect/CapTestSelect.js +0 -47
  95. package/CapTestSelect/index.js +0 -1
  96. package/CapTooltipWithInfo/CapTooltipWithInfo.js +0 -82
  97. package/CapTooltipWithInfo/index.js +0 -3
  98. package/CapTooltipWithInfo/styles.js +0 -22
  99. package/assets/upload.svg +0 -3
  100. package/utils/index.js +0 -1
  101. 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
+ `;
@@ -1,6 +1,6 @@
1
1
  import React, { useRef, useEffect } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { Input } from 'antd-v5';
3
+ import { Input } from 'antd';
4
4
  import { WarningOutlined, CheckCircleOutlined } from '@ant-design/icons';
5
5
  import styled from 'styled-components';
6
6
  import * as styledVars from '../styled/variables';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { InputNumber } from 'antd-v5';
3
+ import { InputNumber } from 'antd';
4
4
 
5
5
  const CapInputNumber = React.forwardRef((props, ref) => {
6
6
  const { size = 'large', ...rest } = props;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { Input } from 'antd-v5';
3
+ import { Input } from 'antd';
4
4
 
5
5
  const { Search } = Input;
6
6
 
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { Input } from 'antd-v5';
3
+ import { Input } from 'antd';
4
4
 
5
5
  const { TextArea } = Input;
6
6
 
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Asynchronously loads the CapInput component
3
+ */
4
+
5
+ import { loadable } from '@capillarytech/cap-ui-utils';
6
+
7
+ const CapInputLoadable = loadable(() => import('./CapInput'));
8
+
9
+ export default CapInputLoadable;
@@ -1,126 +1,106 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import classnames from 'classnames';
4
- import styled from 'styled-components';
5
- import { StyledLabelDiv, StyledLabelSpan, labelStyles } from './styles';
6
- import withStyles from '../utils/withStyles';
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
-
48
- const CapLabel = ({
49
- children,
50
- type = 'label1',
51
- className = '',
52
- style = {},
53
- fontWeight,
54
- lineHeight,
55
- ...rest
56
- }) => {
57
- const typeStyles = getLabelTypeStyles(type);
3
+ import { LabelWrapper, LabelInline } from './styles';
58
4
 
5
+ const CapLabel = ({ type = 'label1', children, fontWeight, lineHeight, ...rest }) => {
59
6
  return (
60
- <StyledLabelDiv
61
- className={classnames('cap-label', type, className)}
62
- style={style}
63
- typeStyles={typeStyles}
64
- fontWeight={fontWeight}
65
- lineHeight={lineHeight}
66
- {...rest}
67
- >
7
+ <LabelWrapper type={type} fontWeight={fontWeight} lineHeight={lineHeight} {...rest}>
68
8
  {children}
69
- </StyledLabelDiv>
9
+ </LabelWrapper>
70
10
  );
71
11
  };
72
12
 
73
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
+ ]),
74
49
  children: PropTypes.node,
75
- type: PropTypes.string,
76
- className: PropTypes.string,
77
- style: PropTypes.object,
78
50
  fontWeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
79
51
  lineHeight: PropTypes.string,
80
52
  };
81
53
 
82
- CapLabel.defaultProps = {
83
- type: 'label1',
84
- className: '',
85
- style: {},
86
- };
87
-
88
- // Static method for inline label
89
- const CapLabelInline = styled(({ children, type = 'label1', className = '', style = {}, fontWeight, lineHeight, ...rest }) => {
90
- const typeStyles = getLabelTypeStyles(type);
91
-
54
+ // Inline span version
55
+ const CapLabelInline = ({ type = 'label1', children, fontWeight, lineHeight, ...rest }) => {
92
56
  return (
93
- <StyledLabelSpan
94
- className={classnames('cap-label', type, className)}
95
- style={style}
96
- typeStyles={typeStyles}
97
- fontWeight={fontWeight}
98
- lineHeight={lineHeight}
99
- {...rest}
100
- >
57
+ <LabelInline type={type} fontWeight={fontWeight} lineHeight={lineHeight} {...rest}>
101
58
  {children}
102
- </StyledLabelSpan>
59
+ </LabelInline>
103
60
  );
104
- })`
105
- ${labelStyles}
106
- `;
61
+ };
107
62
 
108
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
+ ]),
109
99
  children: PropTypes.node,
110
- type: PropTypes.string,
111
- className: PropTypes.string,
112
- style: PropTypes.object,
113
100
  fontWeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
114
101
  lineHeight: PropTypes.string,
115
102
  };
116
103
 
117
- CapLabelInline.defaultProps = {
118
- type: 'label1',
119
- className: '',
120
- style: {},
121
- };
122
-
123
- // Attach the static method
124
- CapLabel.CapLabelInline = CapLabelInline;
104
+ CapLabel.Inline = CapLabelInline;
125
105
 
126
- export default withStyles(CapLabel, labelStyles);
106
+ export default CapLabel;
package/CapLabel/index.js CHANGED
@@ -1,3 +1 @@
1
- import CapLabel from './CapLabel';
2
-
3
- export default CapLabel;
1
+ export { default } from './CapLabel';