@capillarytech/blaze-ui 0.1.6-alpha.6 → 0.1.6-alpha.60

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/CapIcon/CapIcon.js +183 -0
  2. package/CapIcon/index.js +3 -0
  3. package/CapIcon/styles.js +76 -0
  4. package/CapInput/CapInput.js +2 -2
  5. package/CapInput/Number.js +1 -1
  6. package/CapInput/Search.js +1 -1
  7. package/CapInput/TextArea.js +1 -1
  8. package/CapLabel/CapLabel.js +101 -81
  9. package/CapLabel/index.js +3 -1
  10. package/CapLabel/styles.js +250 -212
  11. package/CapRow/CapRow.js +111 -10
  12. package/CapRow/index.js +3 -1
  13. package/CapRow/styles.js +47 -6
  14. package/CapSkeleton/CapSkeleton.js +17 -0
  15. package/CapSkeleton/index.js +1 -0
  16. package/CapSpin/CapSpin.js +23 -0
  17. package/CapSpin/index.js +1 -0
  18. package/CapTable/loadable.js +4 -4
  19. package/CapTable/styles.js +1 -1
  20. package/CapTestSelect/CapTestSelect.js +47 -0
  21. package/CapTestSelect/index.js +1 -0
  22. package/CapTooltip/CapTooltip.js +87 -25
  23. package/CapTooltip/index.js +3 -1
  24. package/CapTooltip/styles.js +19 -27
  25. package/CapTooltipWithInfo/CapTooltipWithInfo.js +82 -0
  26. package/CapTooltipWithInfo/index.js +3 -0
  27. package/CapTooltipWithInfo/styles.js +22 -0
  28. package/CapUnifiedSelect/CapUnifiedSelect.js +547 -67
  29. package/CapUnifiedSelect/index.js +1 -4
  30. package/CapUnifiedSelect/styles.js +300 -168
  31. package/assets/upload.svg +3 -0
  32. package/index.js +12 -1
  33. package/package.json +6 -12
  34. package/utils/index.js +1 -0
  35. package/utils/withMemo.js +33 -0
  36. package/utils/withStyles.js +24 -0
  37. package/CapHeading/CapHeading.js +0 -71
  38. package/CapHeading/index.js +0 -1
  39. package/CapHeading/styles.js +0 -125
  40. package/CapInfoNote/CapInfoNote.js +0 -54
  41. package/CapInfoNote/index.js +0 -1
  42. package/CapInfoNote/styles.js +0 -63
  43. package/CapInput/loadable.js +0 -9
  44. package/CapUnifiedSelect/loadable.js +0 -3
  45. package/dist/235.index.js +0 -2
  46. package/dist/235.index.js.LICENSE.txt +0 -29
  47. package/dist/603.index.js +0 -1
  48. package/dist/CapInput/CapInput.js +0 -66
  49. package/dist/CapInput/Number.js +0 -42
  50. package/dist/CapInput/Search.js +0 -35
  51. package/dist/CapInput/TextArea.js +0 -42
  52. package/dist/CapInput/index.js +0 -15
  53. package/dist/CapInput/messages.js +0 -32
  54. package/dist/CapInput/styles.js +0 -11
  55. package/dist/CapTable/CapTable.js +0 -148
  56. package/dist/CapTable/index.js +0 -9
  57. package/dist/CapTable/loadable.js +0 -23
  58. package/dist/CapTable/styles.js +0 -26
  59. package/dist/LocaleHoc/index.js +0 -40
  60. package/dist/esm/CapHeading/CapHeading.js +0 -41
  61. package/dist/esm/CapHeading/index.js +0 -1
  62. package/dist/esm/CapHeading/styles.js +0 -123
  63. package/dist/esm/CapInfoNote/CapInfoNote.js +0 -62
  64. package/dist/esm/CapInfoNote/index.js +0 -1
  65. package/dist/esm/CapInfoNote/styles.js +0 -6
  66. package/dist/esm/CapInput/CapInput.js +0 -57
  67. package/dist/esm/CapInput/Number.js +0 -35
  68. package/dist/esm/CapInput/Search.js +0 -28
  69. package/dist/esm/CapInput/TextArea.js +0 -35
  70. package/dist/esm/CapInput/index.js +0 -8
  71. package/dist/esm/CapInput/loadable.js +0 -9
  72. package/dist/esm/CapInput/messages.js +0 -25
  73. package/dist/esm/CapInput/styles.js +0 -3
  74. package/dist/esm/CapLabel/CapLabel.js +0 -50
  75. package/dist/esm/CapLabel/index.js +0 -1
  76. package/dist/esm/CapLabel/styles.js +0 -219
  77. package/dist/esm/CapRow/CapRow.js +0 -22
  78. package/dist/esm/CapRow/index.js +0 -1
  79. package/dist/esm/CapRow/styles.js +0 -5
  80. package/dist/esm/CapTable/CapTable.js +0 -140
  81. package/dist/esm/CapTable/index.js +0 -2
  82. package/dist/esm/CapTable/loadable.js +0 -12
  83. package/dist/esm/CapTable/styles.js +0 -17
  84. package/dist/esm/CapTooltip/CapTooltip.js +0 -34
  85. package/dist/esm/CapTooltip/index.js +0 -1
  86. package/dist/esm/CapTooltip/styles.js +0 -6
  87. package/dist/esm/CapUnifiedSelect/CapUnifiedSelect.js +0 -101
  88. package/dist/esm/CapUnifiedSelect/index.js +0 -3
  89. package/dist/esm/CapUnifiedSelect/loadable.js +0 -4
  90. package/dist/esm/CapUnifiedSelect/messages.js +0 -23
  91. package/dist/esm/CapUnifiedSelect/styles.js +0 -15
  92. package/dist/esm/LocaleHoc/index.js +0 -31
  93. package/dist/esm/index.js +0 -11
  94. package/dist/esm/styled/index.js +0 -5
  95. package/dist/esm/styled/variables.js +0 -88
  96. package/dist/esm/translations/en.js +0 -329
  97. package/dist/index.js +0 -39
  98. package/dist/index.js.LICENSE.txt +0 -7
  99. package/dist/styled/index.js +0 -22
  100. package/dist/styled/variables.js +0 -94
  101. package/dist/translations/en.js +0 -335
@@ -0,0 +1,183 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import classnames from 'classnames';
4
+ import styled from 'styled-components';
5
+ import * as AntdIcons from '@ant-design-v5/icons';
6
+ import { IconWrapper, BackgroundWrapper, iconStyles } from './styles';
7
+ import withStyles from '../utils/withStyles';
8
+
9
+ const StyledIcon = styled.span`
10
+ ${iconStyles}
11
+ `;
12
+
13
+ const getSvgIcon = (type, svgProps = {}) => {
14
+ const icons = {
15
+ // Add your SVG icons here if needed
16
+ };
17
+
18
+ const IconComponent = icons[type];
19
+ return IconComponent ? <IconComponent {...svgProps} /> : null;
20
+ };
21
+
22
+ const getAntIcon = (type) => {
23
+ // Convert kebab-case to PascalCase for Ant Design icon naming
24
+ const pascalCase = type
25
+ .split('-')
26
+ .map(part => part.charAt(0).toUpperCase() + part.slice(1))
27
+ .join('');
28
+
29
+ // Try different naming conventions
30
+ const iconName = `${pascalCase}Outlined`;
31
+ const iconNameFilled = `${pascalCase}Filled`;
32
+ const iconNameTwoTone = `${pascalCase}TwoTone`;
33
+
34
+ return AntdIcons[iconName] || AntdIcons[iconNameFilled] || AntdIcons[iconNameTwoTone];
35
+ };
36
+
37
+ const CapIcon = ({
38
+ type,
39
+ size = 'm',
40
+ style = {},
41
+ className = '',
42
+ disabled = false,
43
+ spin = false,
44
+ rotate,
45
+ withBackground = false,
46
+ backgroundProps = {},
47
+ onClick,
48
+ textLabel,
49
+ component,
50
+ svgProps = {},
51
+ allowSvg = true,
52
+ ...rest
53
+ }) => {
54
+ const handleClick = (e) => {
55
+ if (!disabled && onClick) {
56
+ onClick(e);
57
+ }
58
+ };
59
+
60
+ // Render custom component if provided
61
+ if (component) {
62
+ return (
63
+ <IconWrapper
64
+ className={classnames('cap-icon', size, { 'with-text-label': textLabel }, className)}
65
+ style={style}
66
+ disabled={disabled}
67
+ onClick={handleClick}
68
+ {...rest}
69
+ >
70
+ {component}
71
+ {textLabel}
72
+ </IconWrapper>
73
+ );
74
+ }
75
+
76
+ // Try to get SVG icon if allowSvg is true
77
+ const svgIcon = allowSvg && type ? getSvgIcon(type, svgProps) : null;
78
+
79
+ // If SVG icon exists and allowSvg is true, use it
80
+ if (svgIcon) {
81
+ const iconComponent = (
82
+ <IconWrapper
83
+ className={classnames('cap-icon', size, { spin }, { 'with-text-label': textLabel }, className)}
84
+ style={{
85
+ ...style,
86
+ transform: rotate ? `rotate(${rotate}deg)` : undefined
87
+ }}
88
+ disabled={disabled}
89
+ onClick={handleClick}
90
+ {...rest}
91
+ >
92
+ {svgIcon}
93
+ {textLabel}
94
+ </IconWrapper>
95
+ );
96
+
97
+ return withBackground ? (
98
+ <BackgroundWrapper size={size} {...backgroundProps}>
99
+ {iconComponent}
100
+ </BackgroundWrapper>
101
+ ) : iconComponent;
102
+ }
103
+
104
+ // Try to get Ant Design icon
105
+ const AntIcon = type ? getAntIcon(type) : null;
106
+
107
+ if (AntIcon) {
108
+ const iconComponent = (
109
+ <IconWrapper
110
+ className={classnames('cap-icon', size, { 'with-text-label': textLabel }, className)}
111
+ style={style}
112
+ disabled={disabled}
113
+ onClick={handleClick}
114
+ {...rest}
115
+ >
116
+ <AntIcon
117
+ spin={spin}
118
+ rotate={rotate}
119
+ />
120
+ {textLabel}
121
+ </IconWrapper>
122
+ );
123
+
124
+ return withBackground ? (
125
+ <BackgroundWrapper size={size} {...backgroundProps}>
126
+ {iconComponent}
127
+ </BackgroundWrapper>
128
+ ) : iconComponent;
129
+ }
130
+
131
+ // Fallback: render an empty icon container
132
+ return (
133
+ <IconWrapper
134
+ className={classnames('cap-icon', size, { 'with-text-label': textLabel }, className)}
135
+ style={style}
136
+ disabled={disabled}
137
+ onClick={handleClick}
138
+ {...rest}
139
+ >
140
+ {textLabel}
141
+ </IconWrapper>
142
+ );
143
+ };
144
+
145
+ CapIcon.propTypes = {
146
+ type: PropTypes.string,
147
+ size: PropTypes.oneOf(['xs', 's', 'm', 'l']),
148
+ style: PropTypes.object,
149
+ className: PropTypes.string,
150
+ disabled: PropTypes.bool,
151
+ spin: PropTypes.bool,
152
+ rotate: PropTypes.number,
153
+ withBackground: PropTypes.bool,
154
+ backgroundProps: PropTypes.object,
155
+ onClick: PropTypes.func,
156
+ textLabel: PropTypes.node,
157
+ component: PropTypes.node,
158
+ svgProps: PropTypes.object,
159
+ allowSvg: PropTypes.bool,
160
+ };
161
+
162
+ CapIcon.defaultProps = {
163
+ size: 'm',
164
+ style: {},
165
+ className: '',
166
+ disabled: false,
167
+ spin: false,
168
+ withBackground: false,
169
+ backgroundProps: {},
170
+ svgProps: {},
171
+ allowSvg: true,
172
+ };
173
+
174
+ // Create AntIcon subcomponent for backward compatibility
175
+ const AntIcon = styled.i`
176
+ display: inline-flex;
177
+ align-items: center;
178
+ justify-content: center;
179
+ `;
180
+
181
+ CapIcon.AntIcon = AntIcon;
182
+
183
+ export default withStyles(CapIcon, iconStyles);
@@ -0,0 +1,3 @@
1
+ import CapIcon from './CapIcon';
2
+
3
+ export default CapIcon;
@@ -0,0 +1,76 @@
1
+ import styled, { css } from 'styled-components';
2
+ import * as styledVars from '../styled/variables';
3
+
4
+ export const IconWrapper = styled.span`
5
+ display: inline-flex;
6
+ align-items: center;
7
+ justify-content: center;
8
+ cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};
9
+ opacity: ${({ disabled }) => (disabled ? 0.5 : 1)};
10
+
11
+ &.xs {
12
+ font-size: 12px;
13
+ width: 12px;
14
+ height: 12px;
15
+ }
16
+
17
+ &.s {
18
+ font-size: 16px;
19
+ width: 16px;
20
+ height: 16px;
21
+ }
22
+
23
+ &.m {
24
+ font-size: 24px;
25
+ width: 24px;
26
+ height: 24px;
27
+ }
28
+
29
+ &.l {
30
+ font-size: 32px;
31
+ width: 32px;
32
+ height: 32px;
33
+ }
34
+
35
+ &.with-text-label {
36
+ display: inline-flex;
37
+ align-items: center;
38
+ gap: 8px;
39
+ }
40
+ `;
41
+
42
+ export const BackgroundWrapper = styled.span`
43
+ display: inline-flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ border-radius: 50%;
47
+ background-color: ${({ bgColor }) => bgColor || styledVars.CAP_G09};
48
+ width: ${({ size }) => (size === 'xs' ? '20px' : size === 's' ? '24px' : size === 'l' ? '48px' : '36px')};
49
+ height: ${({ size }) => (size === 'xs' ? '20px' : size === 's' ? '24px' : size === 'l' ? '48px' : '36px')};
50
+ `;
51
+
52
+ export const iconStyles = css`
53
+ &.cap-icon {
54
+ display: inline-flex;
55
+ align-items: center;
56
+
57
+ .anticon {
58
+ display: flex;
59
+ align-items: center;
60
+ justify-content: center;
61
+ }
62
+
63
+ &.spin {
64
+ animation: rotate 2s linear infinite;
65
+ }
66
+ }
67
+
68
+ @keyframes rotate {
69
+ from {
70
+ transform: rotate(0deg);
71
+ }
72
+ to {
73
+ transform: rotate(360deg);
74
+ }
75
+ }
76
+ `;
@@ -1,7 +1,7 @@
1
1
  import React, { useRef, useEffect } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { Input } from 'antd';
4
- import { WarningOutlined, CheckCircleOutlined } from '@ant-design/icons';
3
+ import { Input } from 'antd-v5';
4
+ import { WarningOutlined, CheckCircleOutlined } from '@ant-design-v5/icons';
5
5
  import styled from 'styled-components';
6
6
  import * as styledVars from '../styled/variables';
7
7
 
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { InputNumber } from 'antd';
3
+ import { InputNumber } from 'antd-v5';
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';
3
+ import { Input } from 'antd-v5';
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';
3
+ import { Input } from 'antd-v5';
4
4
 
5
5
  const { TextArea } = Input;
6
6
 
@@ -1,106 +1,126 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { LabelWrapper, LabelInline } from './styles';
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);
4
58
 
5
- const CapLabel = ({ type = 'label1', children, fontWeight, lineHeight, ...rest }) => {
6
59
  return (
7
- <LabelWrapper type={type} fontWeight={fontWeight} lineHeight={lineHeight} {...rest}>
60
+ <StyledLabelDiv
61
+ className={classnames('cap-label', type, className)}
62
+ style={style}
63
+ typeStyles={typeStyles}
64
+ fontWeight={fontWeight}
65
+ lineHeight={lineHeight}
66
+ {...rest}
67
+ >
8
68
  {children}
9
- </LabelWrapper>
69
+ </StyledLabelDiv>
10
70
  );
11
71
  };
12
72
 
13
73
  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
74
  children: PropTypes.node,
75
+ type: PropTypes.string,
76
+ className: PropTypes.string,
77
+ style: PropTypes.object,
50
78
  fontWeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
51
79
  lineHeight: PropTypes.string,
52
80
  };
53
81
 
54
- // Inline span version
55
- const CapLabelInline = ({ type = 'label1', children, fontWeight, lineHeight, ...rest }) => {
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
+
56
92
  return (
57
- <LabelInline type={type} fontWeight={fontWeight} lineHeight={lineHeight} {...rest}>
93
+ <StyledLabelSpan
94
+ className={classnames('cap-label', type, className)}
95
+ style={style}
96
+ typeStyles={typeStyles}
97
+ fontWeight={fontWeight}
98
+ lineHeight={lineHeight}
99
+ {...rest}
100
+ >
58
101
  {children}
59
- </LabelInline>
102
+ </StyledLabelSpan>
60
103
  );
61
- };
104
+ })`
105
+ ${labelStyles}
106
+ `;
62
107
 
63
108
  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
109
  children: PropTypes.node,
110
+ type: PropTypes.string,
111
+ className: PropTypes.string,
112
+ style: PropTypes.object,
100
113
  fontWeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
101
114
  lineHeight: PropTypes.string,
102
115
  };
103
116
 
104
- CapLabel.Inline = CapLabelInline;
117
+ CapLabelInline.defaultProps = {
118
+ type: 'label1',
119
+ className: '',
120
+ style: {},
121
+ };
122
+
123
+ // Attach the static method
124
+ CapLabel.CapLabelInline = CapLabelInline;
105
125
 
106
- export default CapLabel;
126
+ export default withStyles(CapLabel, labelStyles);
package/CapLabel/index.js CHANGED
@@ -1 +1,3 @@
1
- export { default } from './CapLabel';
1
+ import CapLabel from './CapLabel';
2
+
3
+ export default CapLabel;