@capillarytech/blaze-ui 0.1.6-alpha.49 → 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
@@ -1,259 +1,221 @@
1
1
  import styled, { css } from 'styled-components';
2
2
  import * as styledVars from '../styled/variables';
3
3
 
4
- export const StyledLabelDiv = styled.div`
5
- font-family: ${styledVars.FONT_FAMILY};
6
- font-size: ${({ typeStyles }) => typeStyles?.fontSize || '12px'};
7
- font-weight: ${({ typeStyles, fontWeight }) => fontWeight || typeStyles?.fontWeight || 'normal'};
8
- color: ${({ typeStyles }) => typeStyles?.color || styledVars.CAP_G04};
9
- line-height: ${({ typeStyles, lineHeight }) => lineHeight || typeStyles?.lineHeight || 'normal'};
10
- margin: 0;
11
- padding: 0;
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
- export const StyledLabelSpan = styled.span`
15
- font-family: ${styledVars.FONT_FAMILY};
16
- font-size: ${({ typeStyles }) => typeStyles?.fontSize || '12px'};
17
- font-weight: ${({ typeStyles, fontWeight }) => fontWeight || typeStyles?.fontWeight || 'normal'};
18
- color: ${({ typeStyles }) => typeStyles?.color || styledVars.CAP_G04};
19
- line-height: ${({ typeStyles, lineHeight }) => lineHeight || typeStyles?.lineHeight || 'normal'};
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 labelStyles = css`
25
- &.cap-label {
26
- font-family: ${styledVars.FONT_FAMILY};
27
-
28
- &.label1 {
29
- font-size: 12px;
30
- color: ${styledVars.CAP_G04};
31
- font-weight: normal;
32
- line-height: normal;
33
- }
34
-
35
- &.label2 {
36
- font-size: 12px;
37
- color: ${styledVars.CAP_G01};
38
- font-weight: normal;
39
- line-height: normal;
40
- }
41
-
42
- &.label3 {
43
- font-size: 12px;
44
- color: ${styledVars.CAP_G05};
45
- font-weight: normal;
46
- line-height: normal;
47
- }
48
-
49
- &.label4 {
50
- font-size: 12px;
51
- color: ${styledVars.CAP_G01};
52
- font-weight: 500;
53
- line-height: normal;
54
- }
55
-
56
- &.label5 {
57
- font-size: 10px;
58
- color: ${styledVars.CAP_G01};
59
- font-weight: normal;
60
- line-height: normal;
61
- }
62
-
63
- &.label6 {
64
- font-size: 12px;
65
- color: ${styledVars.CAP_G06};
66
- font-weight: normal;
67
- line-height: normal;
68
- }
69
-
70
- &.label7 {
71
- font-size: 14px;
72
- color: ${styledVars.CAP_G04};
73
- font-weight: 500;
74
- line-height: normal;
75
- }
76
-
77
- &.label8 {
78
- font-size: 12px;
79
- color: ${styledVars.CAP_G01};
80
- font-weight: 500;
81
- line-height: normal;
82
- }
83
-
84
- &.label9 {
85
- font-size: 12px;
86
- color: ${styledVars.CAP_G01};
87
- line-height: 16px;
88
- font-weight: normal;
89
- }
90
-
91
- &.label10 {
92
- font-size: 12px;
93
- color: ${styledVars.CAP_WHITE};
94
- line-height: 16px;
95
- font-weight: normal;
96
- }
97
-
98
- &.label11 {
99
- font-size: 10px;
100
- color: ${styledVars.CAP_G04};
101
- font-weight: normal;
102
- line-height: normal;
103
- }
104
-
105
- &.label12 {
106
- font-size: 12px;
107
- color: ${styledVars.CAP_WHITE};
108
- font-weight: normal;
109
- line-height: normal;
110
- }
111
-
112
- &.label13 {
113
- font-size: 10px;
114
- color: ${styledVars.CAP_G05};
115
- font-weight: normal;
116
- line-height: normal;
117
- }
118
-
119
- &.label14 {
120
- font-size: 14px;
121
- color: #676e7c;
122
- font-weight: normal;
123
- line-height: normal;
124
- }
125
-
126
- &.label15 {
127
- font-size: 14px;
128
- color: ${styledVars.CAP_G01};
129
- font-weight: normal;
130
- line-height: normal;
131
- }
132
-
133
- &.label16 {
134
- font-size: 14px;
135
- color: ${styledVars.CAP_G01};
136
- font-weight: 500;
137
- line-height: normal;
138
- }
139
-
140
- &.label17 {
141
- font-size: 16px;
142
- color: ${styledVars.CAP_G01};
143
- font-weight: 500;
144
- line-height: normal;
145
- }
146
-
147
- &.label18 {
148
- font-size: 14px;
149
- color: ${styledVars.CAP_G04};
150
- font-weight: normal;
151
- line-height: normal;
152
- }
153
-
154
- &.label19 {
155
- font-size: 12px;
156
- line-height: 16px;
157
- font-weight: normal;
158
- color: rgba(0, 0, 0, 0.87);
159
- }
160
-
161
- &.label20 {
162
- font-size: 14px;
163
- color: ${styledVars.CAP_BLUE01};
164
- font-weight: 500;
165
- line-height: normal;
166
- }
167
-
168
- &.label21 {
169
- font-size: 12px;
170
- color: ${styledVars.CAP_BLUE01};
171
- font-weight: normal;
172
- line-height: normal;
173
- }
174
-
175
- &.label22 {
176
- font-size: 24px;
177
- color: ${styledVars.CAP_G04};
178
- line-height: 28px;
179
- font-weight: normal;
180
- }
181
-
182
- &.label23 {
183
- font-size: 14px;
184
- color: ${styledVars.CAP_WHITE};
185
- font-weight: normal;
186
- line-height: normal;
187
- }
188
-
189
- &.label24 {
190
- font-size: 14px;
191
- color: ${styledVars.CAP_G04};
192
- font-weight: 400;
193
- line-height: 20px;
194
- }
195
-
196
- &.label25 {
197
- font-size: 14px;
198
- color: ${styledVars.CAP_G04};
199
- font-weight: 500;
200
- line-height: 20px;
201
- }
202
-
203
- &.label26 {
204
- font-size: 10px;
205
- color: ${styledVars.CAP_G01};
206
- font-weight: 400;
207
- line-height: 12px;
208
- }
209
-
210
- &.label27 {
211
- font-size: 12px;
212
- color: ${styledVars.CAP_BLUE01};
213
- font-weight: 500;
214
- line-height: 16px;
215
- }
216
-
217
- &.label28 {
218
- color: ${styledVars.CAP_WHITE};
219
- font-size: 12px;
220
- font-weight: 500;
221
- line-height: 16px;
222
- }
223
-
224
- &.label29 {
225
- color: ${styledVars.CAP_WHITE};
226
- font-size: 10px;
227
- font-weight: 400;
228
- line-height: 12px;
229
- }
230
-
231
- &.label30 {
232
- color: ${styledVars.CAP_WHITE};
233
- font-size: 10px;
234
- font-weight: 400;
235
- line-height: 12px;
236
- }
237
-
238
- &.label31 {
239
- font-size: 12px;
240
- color: ${styledVars.CAP_G01};
241
- font-weight: 400;
242
- line-height: 16px;
243
- }
244
-
245
- &.label32 {
246
- line-height: 20px;
247
- font-size: 14px;
248
- color: ${styledVars.CAP_WHITE};
249
- font-weight: 500;
250
- }
251
-
252
- &.label33 {
253
- font-size: 14px;
254
- color: ${styledVars.CAP_BLUE01};
255
- font-weight: 500;
256
- line-height: 20px;
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 classnames from 'classnames';
4
- import styled from 'styled-components';
5
- import { StyledRow, rowStyles } from './styles';
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
- <StyledRow
37
- className={classnames(
38
- 'cap-row-v2',
39
- {
40
- 'with-custom-width': width,
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 withStyles(CapRow, rowStyles);
22
+ export default CapRow;
package/CapRow/index.js CHANGED
@@ -1,3 +1 @@
1
- import CapRow from './CapRow';
2
-
3
- export default CapRow;
1
+ export { default } from './CapRow';
package/CapRow/styles.js CHANGED
@@ -1,50 +1,9 @@
1
- import styled, { css } from 'styled-components';
2
- import { Row } from 'antd-v5';
3
- import * as styledVars from '../styled/variables';
1
+ import styled from 'styled-components';
4
2
 
5
- export const StyledRow = styled(Row)`
6
- width: ${({ width, fullWidth }) => (fullWidth ? '100%' : width || 'auto')};
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-wrap: wrap;
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
+ `;
@@ -1,12 +1,12 @@
1
- import CapSkeleton from '../CapSkeleton';
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 = (props) => (
8
- <Suspense fallback={<CapSkeleton />}>
9
- <LoadableComponent {...props} />
7
+ const CapTableLoadable = () => (
8
+ <Suspense fallback={<CapSpin />}>
9
+ <LoadableComponent />
10
10
  </Suspense>
11
11
  );
12
12
 
@@ -1,4 +1,4 @@
1
- import { Table } from 'antd-v5';
1
+ import { Table } from 'antd';
2
2
  import styled from 'styled-components';
3
3
  import * as styledVars from '../styled/variables';
4
4