@instructure/ui-table 8.25.1-snapshot-1 → 8.25.1-snapshot-10
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/CHANGELOG.md +1 -1
- package/es/Table/Body/index.js +11 -5
- package/es/Table/Cell/index.js +12 -6
- package/es/Table/ColHeader/index.js +26 -24
- package/es/Table/Head/index.js +11 -5
- package/es/Table/Row/index.js +11 -5
- package/es/Table/RowHeader/index.js +12 -6
- package/es/Table/index.js +27 -20
- package/lib/Table/Body/index.js +11 -5
- package/lib/Table/Cell/index.js +12 -6
- package/lib/Table/ColHeader/index.js +26 -24
- package/lib/Table/Head/index.js +11 -5
- package/lib/Table/Row/index.js +11 -5
- package/lib/Table/RowHeader/index.js +12 -6
- package/lib/Table/index.js +27 -20
- package/package.json +16 -16
- package/tsconfig.build.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
-
## [8.25.1-snapshot-
|
6
|
+
## [8.25.1-snapshot-10](https://github.com/instructure/instructure-ui/compare/v8.25.0...v8.25.1-snapshot-10) (2022-06-20)
|
7
7
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-table
|
9
9
|
|
package/es/Table/Body/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
var _dec, _class
|
1
|
+
var _dec, _class;
|
2
2
|
|
3
3
|
/*
|
4
4
|
* The MIT License (MIT)
|
@@ -41,7 +41,15 @@ id: Table.Body
|
|
41
41
|
@tsProps
|
42
42
|
**/
|
43
43
|
|
44
|
-
let Body = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class =
|
44
|
+
let Body = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class Body extends Component {
|
45
|
+
static displayName = "Body";
|
46
|
+
static componentId = 'Table.Body';
|
47
|
+
static allowedProps = allowedProps;
|
48
|
+
static propTypes = propTypes;
|
49
|
+
static defaultProps = {
|
50
|
+
children: null
|
51
|
+
};
|
52
|
+
|
45
53
|
componentDidMount() {
|
46
54
|
var _this$props$makeStyle, _this$props;
|
47
55
|
|
@@ -73,8 +81,6 @@ let Body = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class
|
|
73
81
|
}) : null));
|
74
82
|
}
|
75
83
|
|
76
|
-
}
|
77
|
-
children: null
|
78
|
-
}, _class2)) || _class);
|
84
|
+
}) || _class);
|
79
85
|
export default Body;
|
80
86
|
export { Body };
|
package/es/Table/Cell/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
var _dec, _class
|
1
|
+
var _dec, _class;
|
2
2
|
|
3
3
|
/*
|
4
4
|
* The MIT License (MIT)
|
@@ -40,7 +40,16 @@ id: Table.Cell
|
|
40
40
|
@tsProps
|
41
41
|
**/
|
42
42
|
|
43
|
-
let Cell = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class =
|
43
|
+
let Cell = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class Cell extends Component {
|
44
|
+
static displayName = "Cell";
|
45
|
+
static componentId = 'Table.Cell';
|
46
|
+
static allowedProps = allowedProps;
|
47
|
+
static propTypes = propTypes;
|
48
|
+
static defaultProps = {
|
49
|
+
textAlign: 'start',
|
50
|
+
children: null
|
51
|
+
};
|
52
|
+
|
44
53
|
componentDidMount() {
|
45
54
|
var _this$props$makeStyle, _this$props;
|
46
55
|
|
@@ -66,9 +75,6 @@ let Cell = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class
|
|
66
75
|
}), header && callRenderProp(header), header && ': ', callRenderProp(children));
|
67
76
|
}
|
68
77
|
|
69
|
-
}
|
70
|
-
textAlign: 'start',
|
71
|
-
children: null
|
72
|
-
}, _class2)) || _class);
|
78
|
+
}) || _class);
|
73
79
|
export default Cell;
|
74
80
|
export { Cell };
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _dec, _class,
|
1
|
+
var _dec, _class, _IconMiniArrowUpLine, _IconMiniArrowDownLin;
|
2
2
|
|
3
3
|
/*
|
4
4
|
* The MIT License (MIT)
|
@@ -40,32 +40,39 @@ id: Table.ColHeader
|
|
40
40
|
@tsProps
|
41
41
|
**/
|
42
42
|
|
43
|
-
let ColHeader = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class =
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
};
|
55
|
-
}
|
43
|
+
let ColHeader = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class ColHeader extends Component {
|
44
|
+
static displayName = "ColHeader";
|
45
|
+
static componentId = 'Table.ColHeader';
|
46
|
+
static allowedProps = allowedProps;
|
47
|
+
static propTypes = propTypes;
|
48
|
+
static defaultProps = {
|
49
|
+
textAlign: 'start',
|
50
|
+
sortDirection: 'none',
|
51
|
+
children: null,
|
52
|
+
scope: 'col'
|
53
|
+
};
|
56
54
|
|
57
55
|
componentDidMount() {
|
58
|
-
var _this$props$makeStyle, _this$
|
56
|
+
var _this$props$makeStyle, _this$props;
|
59
57
|
|
60
|
-
(_this$props$makeStyle = (_this$
|
58
|
+
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
61
59
|
}
|
62
60
|
|
63
61
|
componentDidUpdate() {
|
64
|
-
var _this$props$makeStyle2, _this$
|
62
|
+
var _this$props$makeStyle2, _this$props2;
|
65
63
|
|
66
|
-
(_this$props$makeStyle2 = (_this$
|
64
|
+
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
67
65
|
}
|
68
66
|
|
67
|
+
handleClick = event => {
|
68
|
+
const _this$props3 = this.props,
|
69
|
+
id = _this$props3.id,
|
70
|
+
onRequestSort = _this$props3.onRequestSort;
|
71
|
+
onRequestSort && onRequestSort(event, {
|
72
|
+
id
|
73
|
+
});
|
74
|
+
};
|
75
|
+
|
69
76
|
renderSortArrow() {
|
70
77
|
const _this$props4 = this.props,
|
71
78
|
sortDirection = _this$props4.sortDirection,
|
@@ -113,11 +120,6 @@ let ColHeader = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_
|
|
113
120
|
}, callRenderProp(children), this.renderSortArrow())), !onRequestSort && children, !onRequestSort && this.renderSortArrow());
|
114
121
|
}
|
115
122
|
|
116
|
-
}
|
117
|
-
textAlign: 'start',
|
118
|
-
sortDirection: 'none',
|
119
|
-
children: null,
|
120
|
-
scope: 'col'
|
121
|
-
}, _class2)) || _class);
|
123
|
+
}) || _class);
|
122
124
|
export default ColHeader;
|
123
125
|
export { ColHeader };
|
package/es/Table/Head/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
2
2
|
|
3
|
-
var _dec, _class,
|
3
|
+
var _dec, _class, _ScreenReaderContent;
|
4
4
|
|
5
5
|
/*
|
6
6
|
* The MIT License (MIT)
|
@@ -47,7 +47,15 @@ id: Table.Head
|
|
47
47
|
@tsProps
|
48
48
|
**/
|
49
49
|
|
50
|
-
let Head = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class =
|
50
|
+
let Head = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class Head extends Component {
|
51
|
+
static displayName = "Head";
|
52
|
+
static componentId = 'Table.Head';
|
53
|
+
static allowedProps = allowedProps;
|
54
|
+
static propTypes = propTypes;
|
55
|
+
static defaultProps = {
|
56
|
+
children: null
|
57
|
+
};
|
58
|
+
|
51
59
|
get isSortable() {
|
52
60
|
const _ref = Children.toArray(this.props.children),
|
53
61
|
_ref2 = _slicedToArray(_ref, 1),
|
@@ -176,8 +184,6 @@ let Head = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class
|
|
176
184
|
}), Children.map(children, child => matchComponentTypes(child, [Row]) ? child : null));
|
177
185
|
}
|
178
186
|
|
179
|
-
}
|
180
|
-
children: null
|
181
|
-
}, _class2)) || _class);
|
187
|
+
}) || _class);
|
182
188
|
export default Head;
|
183
189
|
export { Head };
|
package/es/Table/Row/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
var _dec, _class
|
1
|
+
var _dec, _class;
|
2
2
|
|
3
3
|
/*
|
4
4
|
* The MIT License (MIT)
|
@@ -43,7 +43,15 @@ id: Table.Row
|
|
43
43
|
@tsProps
|
44
44
|
**/
|
45
45
|
|
46
|
-
let Row = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class =
|
46
|
+
let Row = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class Row extends Component {
|
47
|
+
static displayName = "Row";
|
48
|
+
static componentId = 'Table.Row';
|
49
|
+
static allowedProps = allowedProps;
|
50
|
+
static propTypes = propTypes;
|
51
|
+
static defaultProps = {
|
52
|
+
children: null
|
53
|
+
};
|
54
|
+
|
47
55
|
componentDidMount() {
|
48
56
|
var _this$props$makeStyle, _this$props;
|
49
57
|
|
@@ -90,8 +98,6 @@ let Row = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class
|
|
90
98
|
}));
|
91
99
|
}
|
92
100
|
|
93
|
-
}
|
94
|
-
children: null
|
95
|
-
}, _class2)) || _class);
|
101
|
+
}) || _class);
|
96
102
|
export default Row;
|
97
103
|
export { Row };
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _dec, _class
|
1
|
+
var _dec, _class;
|
2
2
|
|
3
3
|
/*
|
4
4
|
* The MIT License (MIT)
|
@@ -40,7 +40,16 @@ id: Table.RowHeader
|
|
40
40
|
@tsProps
|
41
41
|
**/
|
42
42
|
|
43
|
-
let RowHeader = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class =
|
43
|
+
let RowHeader = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class RowHeader extends Component {
|
44
|
+
static displayName = "RowHeader";
|
45
|
+
static componentId = 'Table.RowHeader';
|
46
|
+
static allowedProps = allowedProps;
|
47
|
+
static propTypes = propTypes;
|
48
|
+
static defaultProps = {
|
49
|
+
textAlign: 'start',
|
50
|
+
children: null
|
51
|
+
};
|
52
|
+
|
44
53
|
componentDidMount() {
|
45
54
|
var _this$props$makeStyle, _this$props;
|
46
55
|
|
@@ -66,9 +75,6 @@ let RowHeader = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_
|
|
66
75
|
}), callRenderProp(children));
|
67
76
|
}
|
68
77
|
|
69
|
-
}
|
70
|
-
textAlign: 'start',
|
71
|
-
children: null
|
72
|
-
}, _class2)) || _class);
|
78
|
+
}) || _class);
|
73
79
|
export default RowHeader;
|
74
80
|
export { RowHeader };
|
package/es/Table/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
2
2
|
|
3
|
-
var _dec, _class
|
3
|
+
var _dec, _class;
|
4
4
|
|
5
5
|
/*
|
6
6
|
* The MIT License (MIT)
|
@@ -48,20 +48,31 @@ category: components
|
|
48
48
|
@tsProps
|
49
49
|
**/
|
50
50
|
|
51
|
-
let Table = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class =
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
51
|
+
let Table = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class Table extends Component {
|
52
|
+
static displayName = "Table";
|
53
|
+
static componentId = 'Table';
|
54
|
+
static allowedProps = allowedProps;
|
55
|
+
static propTypes = propTypes;
|
56
|
+
static defaultProps = {
|
57
|
+
children: null,
|
58
|
+
hover: false,
|
59
|
+
layout: 'auto'
|
60
|
+
};
|
61
|
+
static Head = Head;
|
62
|
+
static Body = Body;
|
63
|
+
static Row = Row;
|
64
|
+
static ColHeader = ColHeader;
|
65
|
+
static RowHeader = RowHeader;
|
66
|
+
static Cell = Cell;
|
67
|
+
ref = null;
|
68
|
+
handleRef = el => {
|
69
|
+
const elementRef = this.props.elementRef;
|
70
|
+
this.ref = el;
|
71
|
+
|
72
|
+
if (typeof elementRef === 'function') {
|
73
|
+
elementRef(el);
|
74
|
+
}
|
75
|
+
};
|
65
76
|
|
66
77
|
componentDidMount() {
|
67
78
|
var _this$props$makeStyle, _this$props;
|
@@ -135,10 +146,6 @@ let Table = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_clas
|
|
135
146
|
}));
|
136
147
|
}
|
137
148
|
|
138
|
-
}
|
139
|
-
children: null,
|
140
|
-
hover: false,
|
141
|
-
layout: 'auto'
|
142
|
-
}, _class2.Head = Head, _class2.Body = Body, _class2.Row = Row, _class2.ColHeader = ColHeader, _class2.RowHeader = RowHeader, _class2.Cell = Cell, _class2)) || _class);
|
149
|
+
}) || _class);
|
143
150
|
export default Table;
|
144
151
|
export { Table };
|
package/lib/Table/Body/index.js
CHANGED
@@ -27,7 +27,7 @@ var _Row = require("../Row");
|
|
27
27
|
|
28
28
|
var _props = require("./props");
|
29
29
|
|
30
|
-
var _dec, _class
|
30
|
+
var _dec, _class;
|
31
31
|
|
32
32
|
/**
|
33
33
|
---
|
@@ -36,7 +36,15 @@ id: Table.Body
|
|
36
36
|
---
|
37
37
|
@tsProps
|
38
38
|
**/
|
39
|
-
let Body = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class =
|
39
|
+
let Body = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = class Body extends _react.Component {
|
40
|
+
static displayName = "Body";
|
41
|
+
static componentId = 'Table.Body';
|
42
|
+
static allowedProps = _props.allowedProps;
|
43
|
+
static propTypes = _props.propTypes;
|
44
|
+
static defaultProps = {
|
45
|
+
children: null
|
46
|
+
};
|
47
|
+
|
40
48
|
componentDidMount() {
|
41
49
|
var _this$props$makeStyle, _this$props;
|
42
50
|
|
@@ -68,9 +76,7 @@ let Body = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
|
|
68
76
|
}) : null));
|
69
77
|
}
|
70
78
|
|
71
|
-
}
|
72
|
-
children: null
|
73
|
-
}, _class2)) || _class);
|
79
|
+
}) || _class);
|
74
80
|
exports.Body = Body;
|
75
81
|
var _default = Body;
|
76
82
|
exports.default = _default;
|
package/lib/Table/Cell/index.js
CHANGED
@@ -23,7 +23,7 @@ var _theme = _interopRequireDefault(require("./theme"));
|
|
23
23
|
|
24
24
|
var _props = require("./props");
|
25
25
|
|
26
|
-
var _dec, _class
|
26
|
+
var _dec, _class;
|
27
27
|
|
28
28
|
/**
|
29
29
|
---
|
@@ -32,7 +32,16 @@ id: Table.Cell
|
|
32
32
|
---
|
33
33
|
@tsProps
|
34
34
|
**/
|
35
|
-
let Cell = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class =
|
35
|
+
let Cell = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = class Cell extends _react.Component {
|
36
|
+
static displayName = "Cell";
|
37
|
+
static componentId = 'Table.Cell';
|
38
|
+
static allowedProps = _props.allowedProps;
|
39
|
+
static propTypes = _props.propTypes;
|
40
|
+
static defaultProps = {
|
41
|
+
textAlign: 'start',
|
42
|
+
children: null
|
43
|
+
};
|
44
|
+
|
36
45
|
componentDidMount() {
|
37
46
|
var _this$props$makeStyle, _this$props;
|
38
47
|
|
@@ -58,10 +67,7 @@ let Cell = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
|
|
58
67
|
}), header && (0, _callRenderProp.callRenderProp)(header), header && ': ', (0, _callRenderProp.callRenderProp)(children));
|
59
68
|
}
|
60
69
|
|
61
|
-
}
|
62
|
-
textAlign: 'start',
|
63
|
-
children: null
|
64
|
-
}, _class2)) || _class);
|
70
|
+
}) || _class);
|
65
71
|
exports.Cell = Cell;
|
66
72
|
var _default = Cell;
|
67
73
|
exports.default = _default;
|
@@ -29,7 +29,7 @@ var _theme = _interopRequireDefault(require("./theme"));
|
|
29
29
|
|
30
30
|
var _props = require("./props");
|
31
31
|
|
32
|
-
var _dec, _class,
|
32
|
+
var _dec, _class, _IconMiniArrowUpLine, _IconMiniArrowDownLin;
|
33
33
|
|
34
34
|
/**
|
35
35
|
---
|
@@ -38,32 +38,39 @@ id: Table.ColHeader
|
|
38
38
|
---
|
39
39
|
@tsProps
|
40
40
|
**/
|
41
|
-
let ColHeader = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class =
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
};
|
53
|
-
}
|
41
|
+
let ColHeader = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = class ColHeader extends _react.Component {
|
42
|
+
static displayName = "ColHeader";
|
43
|
+
static componentId = 'Table.ColHeader';
|
44
|
+
static allowedProps = _props.allowedProps;
|
45
|
+
static propTypes = _props.propTypes;
|
46
|
+
static defaultProps = {
|
47
|
+
textAlign: 'start',
|
48
|
+
sortDirection: 'none',
|
49
|
+
children: null,
|
50
|
+
scope: 'col'
|
51
|
+
};
|
54
52
|
|
55
53
|
componentDidMount() {
|
56
|
-
var _this$props$makeStyle, _this$
|
54
|
+
var _this$props$makeStyle, _this$props;
|
57
55
|
|
58
|
-
(_this$props$makeStyle = (_this$
|
56
|
+
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
59
57
|
}
|
60
58
|
|
61
59
|
componentDidUpdate() {
|
62
|
-
var _this$props$makeStyle2, _this$
|
60
|
+
var _this$props$makeStyle2, _this$props2;
|
63
61
|
|
64
|
-
(_this$props$makeStyle2 = (_this$
|
62
|
+
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
65
63
|
}
|
66
64
|
|
65
|
+
handleClick = event => {
|
66
|
+
const _this$props3 = this.props,
|
67
|
+
id = _this$props3.id,
|
68
|
+
onRequestSort = _this$props3.onRequestSort;
|
69
|
+
onRequestSort && onRequestSort(event, {
|
70
|
+
id
|
71
|
+
});
|
72
|
+
};
|
73
|
+
|
67
74
|
renderSortArrow() {
|
68
75
|
const _this$props4 = this.props,
|
69
76
|
sortDirection = _this$props4.sortDirection,
|
@@ -111,12 +118,7 @@ let ColHeader = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default)
|
|
111
118
|
}, (0, _callRenderProp.callRenderProp)(children), this.renderSortArrow())), !onRequestSort && children, !onRequestSort && this.renderSortArrow());
|
112
119
|
}
|
113
120
|
|
114
|
-
}
|
115
|
-
textAlign: 'start',
|
116
|
-
sortDirection: 'none',
|
117
|
-
children: null,
|
118
|
-
scope: 'col'
|
119
|
-
}, _class2)) || _class);
|
121
|
+
}) || _class);
|
120
122
|
exports.ColHeader = ColHeader;
|
121
123
|
var _default = ColHeader;
|
122
124
|
exports.default = _default;
|
package/lib/Table/Head/index.js
CHANGED
@@ -37,7 +37,7 @@ var _ColHeader = require("../ColHeader");
|
|
37
37
|
|
38
38
|
var _props = require("./props");
|
39
39
|
|
40
|
-
var _dec, _class,
|
40
|
+
var _dec, _class, _ScreenReaderContent;
|
41
41
|
|
42
42
|
/**
|
43
43
|
---
|
@@ -46,7 +46,15 @@ id: Table.Head
|
|
46
46
|
---
|
47
47
|
@tsProps
|
48
48
|
**/
|
49
|
-
let Head = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class =
|
49
|
+
let Head = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = class Head extends _react.Component {
|
50
|
+
static displayName = "Head";
|
51
|
+
static componentId = 'Table.Head';
|
52
|
+
static allowedProps = _props.allowedProps;
|
53
|
+
static propTypes = _props.propTypes;
|
54
|
+
static defaultProps = {
|
55
|
+
children: null
|
56
|
+
};
|
57
|
+
|
50
58
|
get isSortable() {
|
51
59
|
const _ref = _react.Children.toArray(this.props.children),
|
52
60
|
_ref2 = (0, _slicedToArray2.default)(_ref, 1),
|
@@ -176,9 +184,7 @@ let Head = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
|
|
176
184
|
}), _react.Children.map(children, child => (0, _matchComponentTypes.matchComponentTypes)(child, [_Row.Row]) ? child : null));
|
177
185
|
}
|
178
186
|
|
179
|
-
}
|
180
|
-
children: null
|
181
|
-
}, _class2)) || _class);
|
187
|
+
}) || _class);
|
182
188
|
exports.Head = Head;
|
183
189
|
var _default = Head;
|
184
190
|
exports.default = _default;
|
package/lib/Table/Row/index.js
CHANGED
@@ -31,7 +31,7 @@ var _Cell = require("../Cell");
|
|
31
31
|
|
32
32
|
var _props = require("./props");
|
33
33
|
|
34
|
-
var _dec, _class
|
34
|
+
var _dec, _class;
|
35
35
|
|
36
36
|
/**
|
37
37
|
---
|
@@ -40,7 +40,15 @@ id: Table.Row
|
|
40
40
|
---
|
41
41
|
@tsProps
|
42
42
|
**/
|
43
|
-
let Row = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class =
|
43
|
+
let Row = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = class Row extends _react.Component {
|
44
|
+
static displayName = "Row";
|
45
|
+
static componentId = 'Table.Row';
|
46
|
+
static allowedProps = _props.allowedProps;
|
47
|
+
static propTypes = _props.propTypes;
|
48
|
+
static defaultProps = {
|
49
|
+
children: null
|
50
|
+
};
|
51
|
+
|
44
52
|
componentDidMount() {
|
45
53
|
var _this$props$makeStyle, _this$props;
|
46
54
|
|
@@ -87,9 +95,7 @@ let Row = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec
|
|
87
95
|
}));
|
88
96
|
}
|
89
97
|
|
90
|
-
}
|
91
|
-
children: null
|
92
|
-
}, _class2)) || _class);
|
98
|
+
}) || _class);
|
93
99
|
exports.Row = Row;
|
94
100
|
var _default = Row;
|
95
101
|
exports.default = _default;
|
@@ -23,7 +23,7 @@ var _theme = _interopRequireDefault(require("./theme"));
|
|
23
23
|
|
24
24
|
var _props = require("./props");
|
25
25
|
|
26
|
-
var _dec, _class
|
26
|
+
var _dec, _class;
|
27
27
|
|
28
28
|
/**
|
29
29
|
---
|
@@ -32,7 +32,16 @@ id: Table.RowHeader
|
|
32
32
|
---
|
33
33
|
@tsProps
|
34
34
|
**/
|
35
|
-
let RowHeader = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class =
|
35
|
+
let RowHeader = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = class RowHeader extends _react.Component {
|
36
|
+
static displayName = "RowHeader";
|
37
|
+
static componentId = 'Table.RowHeader';
|
38
|
+
static allowedProps = _props.allowedProps;
|
39
|
+
static propTypes = _props.propTypes;
|
40
|
+
static defaultProps = {
|
41
|
+
textAlign: 'start',
|
42
|
+
children: null
|
43
|
+
};
|
44
|
+
|
36
45
|
componentDidMount() {
|
37
46
|
var _this$props$makeStyle, _this$props;
|
38
47
|
|
@@ -58,10 +67,7 @@ let RowHeader = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default)
|
|
58
67
|
}), (0, _callRenderProp.callRenderProp)(children));
|
59
68
|
}
|
60
69
|
|
61
|
-
}
|
62
|
-
textAlign: 'start',
|
63
|
-
children: null
|
64
|
-
}, _class2)) || _class);
|
70
|
+
}) || _class);
|
65
71
|
exports.RowHeader = RowHeader;
|
66
72
|
var _default = RowHeader;
|
67
73
|
exports.default = _default;
|
package/lib/Table/index.js
CHANGED
@@ -41,7 +41,7 @@ var _Cell = require("./Cell");
|
|
41
41
|
|
42
42
|
var _props = require("./props");
|
43
43
|
|
44
|
-
var _dec, _class
|
44
|
+
var _dec, _class;
|
45
45
|
|
46
46
|
/**
|
47
47
|
---
|
@@ -49,20 +49,31 @@ category: components
|
|
49
49
|
---
|
50
50
|
@tsProps
|
51
51
|
**/
|
52
|
-
let Table = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class =
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
52
|
+
let Table = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = class Table extends _react.Component {
|
53
|
+
static displayName = "Table";
|
54
|
+
static componentId = 'Table';
|
55
|
+
static allowedProps = _props.allowedProps;
|
56
|
+
static propTypes = _props.propTypes;
|
57
|
+
static defaultProps = {
|
58
|
+
children: null,
|
59
|
+
hover: false,
|
60
|
+
layout: 'auto'
|
61
|
+
};
|
62
|
+
static Head = _Head.Head;
|
63
|
+
static Body = _Body.Body;
|
64
|
+
static Row = _Row.Row;
|
65
|
+
static ColHeader = _ColHeader.ColHeader;
|
66
|
+
static RowHeader = _RowHeader.RowHeader;
|
67
|
+
static Cell = _Cell.Cell;
|
68
|
+
ref = null;
|
69
|
+
handleRef = el => {
|
70
|
+
const elementRef = this.props.elementRef;
|
71
|
+
this.ref = el;
|
72
|
+
|
73
|
+
if (typeof elementRef === 'function') {
|
74
|
+
elementRef(el);
|
75
|
+
}
|
76
|
+
};
|
66
77
|
|
67
78
|
componentDidMount() {
|
68
79
|
var _this$props$makeStyle, _this$props;
|
@@ -136,11 +147,7 @@ let Table = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _d
|
|
136
147
|
}));
|
137
148
|
}
|
138
149
|
|
139
|
-
}
|
140
|
-
children: null,
|
141
|
-
hover: false,
|
142
|
-
layout: 'auto'
|
143
|
-
}, _class2.Head = _Head.Head, _class2.Body = _Body.Body, _class2.Row = _Row.Row, _class2.ColHeader = _ColHeader.ColHeader, _class2.RowHeader = _RowHeader.RowHeader, _class2.Cell = _Cell.Cell, _class2)) || _class);
|
150
|
+
}) || _class);
|
144
151
|
exports.Table = Table;
|
145
152
|
var _default = Table;
|
146
153
|
exports.default = _default;
|