@instructure/ui-table 8.25.1-snapshot-10 → 8.25.1-snapshot-13
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 +5 -11
- package/es/Table/Cell/index.js +6 -12
- package/es/Table/ColHeader/index.js +24 -26
- package/es/Table/Head/index.js +5 -11
- package/es/Table/Row/index.js +5 -11
- package/es/Table/RowHeader/index.js +6 -12
- package/es/Table/index.js +20 -27
- package/lib/Table/Body/index.js +5 -11
- package/lib/Table/Cell/index.js +6 -12
- package/lib/Table/ColHeader/index.js +24 -26
- package/lib/Table/Head/index.js +5 -11
- package/lib/Table/Row/index.js +5 -11
- package/lib/Table/RowHeader/index.js +6 -12
- package/lib/Table/index.js +20 -27
- package/package.json +16 -16
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-13](https://github.com/instructure/instructure-ui/compare/v8.25.0...v8.25.1-snapshot-13) (2022-06-22)
|
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, _class2;
|
2
2
|
|
3
3
|
/*
|
4
4
|
* The MIT License (MIT)
|
@@ -41,15 +41,7 @@ id: Table.Body
|
|
41
41
|
@tsProps
|
42
42
|
**/
|
43
43
|
|
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
|
-
|
44
|
+
let Body = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_class2 = class Body extends Component {
|
53
45
|
componentDidMount() {
|
54
46
|
var _this$props$makeStyle, _this$props;
|
55
47
|
|
@@ -81,6 +73,8 @@ let Body = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class
|
|
81
73
|
}) : null));
|
82
74
|
}
|
83
75
|
|
84
|
-
}
|
76
|
+
}, _class2.displayName = "Body", _class2.componentId = 'Table.Body', _class2.allowedProps = allowedProps, _class2.propTypes = propTypes, _class2.defaultProps = {
|
77
|
+
children: null
|
78
|
+
}, _class2)) || _class);
|
85
79
|
export default Body;
|
86
80
|
export { Body };
|
package/es/Table/Cell/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
var _dec, _class;
|
1
|
+
var _dec, _class, _class2;
|
2
2
|
|
3
3
|
/*
|
4
4
|
* The MIT License (MIT)
|
@@ -40,16 +40,7 @@ id: Table.Cell
|
|
40
40
|
@tsProps
|
41
41
|
**/
|
42
42
|
|
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
|
-
|
43
|
+
let Cell = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_class2 = class Cell extends Component {
|
53
44
|
componentDidMount() {
|
54
45
|
var _this$props$makeStyle, _this$props;
|
55
46
|
|
@@ -75,6 +66,9 @@ let Cell = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class
|
|
75
66
|
}), header && callRenderProp(header), header && ': ', callRenderProp(children));
|
76
67
|
}
|
77
68
|
|
78
|
-
}
|
69
|
+
}, _class2.displayName = "Cell", _class2.componentId = 'Table.Cell', _class2.allowedProps = allowedProps, _class2.propTypes = propTypes, _class2.defaultProps = {
|
70
|
+
textAlign: 'start',
|
71
|
+
children: null
|
72
|
+
}, _class2)) || _class);
|
79
73
|
export default Cell;
|
80
74
|
export { Cell };
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _dec, _class, _IconMiniArrowUpLine, _IconMiniArrowDownLin;
|
1
|
+
var _dec, _class, _class2, _IconMiniArrowUpLine, _IconMiniArrowDownLin;
|
2
2
|
|
3
3
|
/*
|
4
4
|
* The MIT License (MIT)
|
@@ -40,39 +40,32 @@ id: Table.ColHeader
|
|
40
40
|
@tsProps
|
41
41
|
**/
|
42
42
|
|
43
|
-
let ColHeader = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class ColHeader extends Component {
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
43
|
+
let ColHeader = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_class2 = class ColHeader extends Component {
|
44
|
+
constructor() {
|
45
|
+
super(...arguments);
|
46
|
+
|
47
|
+
this.handleClick = event => {
|
48
|
+
const _this$props = this.props,
|
49
|
+
id = _this$props.id,
|
50
|
+
onRequestSort = _this$props.onRequestSort;
|
51
|
+
onRequestSort && onRequestSort(event, {
|
52
|
+
id
|
53
|
+
});
|
54
|
+
};
|
55
|
+
}
|
54
56
|
|
55
57
|
componentDidMount() {
|
56
|
-
var _this$props$makeStyle, _this$
|
58
|
+
var _this$props$makeStyle, _this$props2;
|
57
59
|
|
58
|
-
(_this$props$makeStyle = (_this$
|
60
|
+
(_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
|
59
61
|
}
|
60
62
|
|
61
63
|
componentDidUpdate() {
|
62
|
-
var _this$props$makeStyle2, _this$
|
64
|
+
var _this$props$makeStyle2, _this$props3;
|
63
65
|
|
64
|
-
(_this$props$makeStyle2 = (_this$
|
66
|
+
(_this$props$makeStyle2 = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props3);
|
65
67
|
}
|
66
68
|
|
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
|
-
|
76
69
|
renderSortArrow() {
|
77
70
|
const _this$props4 = this.props,
|
78
71
|
sortDirection = _this$props4.sortDirection,
|
@@ -120,6 +113,11 @@ let ColHeader = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_
|
|
120
113
|
}, callRenderProp(children), this.renderSortArrow())), !onRequestSort && children, !onRequestSort && this.renderSortArrow());
|
121
114
|
}
|
122
115
|
|
123
|
-
}
|
116
|
+
}, _class2.displayName = "ColHeader", _class2.componentId = 'Table.ColHeader', _class2.allowedProps = allowedProps, _class2.propTypes = propTypes, _class2.defaultProps = {
|
117
|
+
textAlign: 'start',
|
118
|
+
sortDirection: 'none',
|
119
|
+
children: null,
|
120
|
+
scope: 'col'
|
121
|
+
}, _class2)) || _class);
|
124
122
|
export default ColHeader;
|
125
123
|
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, _ScreenReaderContent;
|
3
|
+
var _dec, _class, _class2, _ScreenReaderContent;
|
4
4
|
|
5
5
|
/*
|
6
6
|
* The MIT License (MIT)
|
@@ -47,15 +47,7 @@ id: Table.Head
|
|
47
47
|
@tsProps
|
48
48
|
**/
|
49
49
|
|
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
|
-
|
50
|
+
let Head = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_class2 = class Head extends Component {
|
59
51
|
get isSortable() {
|
60
52
|
const _ref = Children.toArray(this.props.children),
|
61
53
|
_ref2 = _slicedToArray(_ref, 1),
|
@@ -184,6 +176,8 @@ let Head = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class
|
|
184
176
|
}), Children.map(children, child => matchComponentTypes(child, [Row]) ? child : null));
|
185
177
|
}
|
186
178
|
|
187
|
-
}
|
179
|
+
}, _class2.displayName = "Head", _class2.componentId = 'Table.Head', _class2.allowedProps = allowedProps, _class2.propTypes = propTypes, _class2.defaultProps = {
|
180
|
+
children: null
|
181
|
+
}, _class2)) || _class);
|
188
182
|
export default Head;
|
189
183
|
export { Head };
|
package/es/Table/Row/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
var _dec, _class;
|
1
|
+
var _dec, _class, _class2;
|
2
2
|
|
3
3
|
/*
|
4
4
|
* The MIT License (MIT)
|
@@ -43,15 +43,7 @@ id: Table.Row
|
|
43
43
|
@tsProps
|
44
44
|
**/
|
45
45
|
|
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
|
-
|
46
|
+
let Row = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_class2 = class Row extends Component {
|
55
47
|
componentDidMount() {
|
56
48
|
var _this$props$makeStyle, _this$props;
|
57
49
|
|
@@ -98,6 +90,8 @@ let Row = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class
|
|
98
90
|
}));
|
99
91
|
}
|
100
92
|
|
101
|
-
}
|
93
|
+
}, _class2.displayName = "Row", _class2.componentId = 'Table.Row', _class2.allowedProps = allowedProps, _class2.propTypes = propTypes, _class2.defaultProps = {
|
94
|
+
children: null
|
95
|
+
}, _class2)) || _class);
|
102
96
|
export default Row;
|
103
97
|
export { Row };
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _dec, _class;
|
1
|
+
var _dec, _class, _class2;
|
2
2
|
|
3
3
|
/*
|
4
4
|
* The MIT License (MIT)
|
@@ -40,16 +40,7 @@ id: Table.RowHeader
|
|
40
40
|
@tsProps
|
41
41
|
**/
|
42
42
|
|
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
|
-
|
43
|
+
let RowHeader = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_class2 = class RowHeader extends Component {
|
53
44
|
componentDidMount() {
|
54
45
|
var _this$props$makeStyle, _this$props;
|
55
46
|
|
@@ -75,6 +66,9 @@ let RowHeader = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_
|
|
75
66
|
}), callRenderProp(children));
|
76
67
|
}
|
77
68
|
|
78
|
-
}
|
69
|
+
}, _class2.displayName = "RowHeader", _class2.componentId = 'Table.RowHeader', _class2.allowedProps = allowedProps, _class2.propTypes = propTypes, _class2.defaultProps = {
|
70
|
+
textAlign: 'start',
|
71
|
+
children: null
|
72
|
+
}, _class2)) || _class);
|
79
73
|
export default RowHeader;
|
80
74
|
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, _class2;
|
4
4
|
|
5
5
|
/*
|
6
6
|
* The MIT License (MIT)
|
@@ -48,31 +48,20 @@ category: components
|
|
48
48
|
@tsProps
|
49
49
|
**/
|
50
50
|
|
51
|
-
let Table = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class Table extends Component {
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
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
|
-
};
|
51
|
+
let Table = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_class2 = class Table extends Component {
|
52
|
+
constructor() {
|
53
|
+
super(...arguments);
|
54
|
+
this.ref = null;
|
55
|
+
|
56
|
+
this.handleRef = el => {
|
57
|
+
const elementRef = this.props.elementRef;
|
58
|
+
this.ref = el;
|
59
|
+
|
60
|
+
if (typeof elementRef === 'function') {
|
61
|
+
elementRef(el);
|
62
|
+
}
|
63
|
+
};
|
64
|
+
}
|
76
65
|
|
77
66
|
componentDidMount() {
|
78
67
|
var _this$props$makeStyle, _this$props;
|
@@ -146,6 +135,10 @@ let Table = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_clas
|
|
146
135
|
}));
|
147
136
|
}
|
148
137
|
|
149
|
-
}
|
138
|
+
}, _class2.displayName = "Table", _class2.componentId = 'Table', _class2.allowedProps = allowedProps, _class2.propTypes = propTypes, _class2.defaultProps = {
|
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);
|
150
143
|
export default Table;
|
151
144
|
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, _class2;
|
31
31
|
|
32
32
|
/**
|
33
33
|
---
|
@@ -36,15 +36,7 @@ id: Table.Body
|
|
36
36
|
---
|
37
37
|
@tsProps
|
38
38
|
**/
|
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
|
-
|
39
|
+
let Body = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_class2 = class Body extends _react.Component {
|
48
40
|
componentDidMount() {
|
49
41
|
var _this$props$makeStyle, _this$props;
|
50
42
|
|
@@ -76,7 +68,9 @@ let Body = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
|
|
76
68
|
}) : null));
|
77
69
|
}
|
78
70
|
|
79
|
-
}
|
71
|
+
}, _class2.displayName = "Body", _class2.componentId = 'Table.Body', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
|
72
|
+
children: null
|
73
|
+
}, _class2)) || _class);
|
80
74
|
exports.Body = Body;
|
81
75
|
var _default = Body;
|
82
76
|
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, _class2;
|
27
27
|
|
28
28
|
/**
|
29
29
|
---
|
@@ -32,16 +32,7 @@ id: Table.Cell
|
|
32
32
|
---
|
33
33
|
@tsProps
|
34
34
|
**/
|
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
|
-
|
35
|
+
let Cell = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_class2 = class Cell extends _react.Component {
|
45
36
|
componentDidMount() {
|
46
37
|
var _this$props$makeStyle, _this$props;
|
47
38
|
|
@@ -67,7 +58,10 @@ let Cell = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
|
|
67
58
|
}), header && (0, _callRenderProp.callRenderProp)(header), header && ': ', (0, _callRenderProp.callRenderProp)(children));
|
68
59
|
}
|
69
60
|
|
70
|
-
}
|
61
|
+
}, _class2.displayName = "Cell", _class2.componentId = 'Table.Cell', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
|
62
|
+
textAlign: 'start',
|
63
|
+
children: null
|
64
|
+
}, _class2)) || _class);
|
71
65
|
exports.Cell = Cell;
|
72
66
|
var _default = Cell;
|
73
67
|
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, _IconMiniArrowUpLine, _IconMiniArrowDownLin;
|
32
|
+
var _dec, _class, _class2, _IconMiniArrowUpLine, _IconMiniArrowDownLin;
|
33
33
|
|
34
34
|
/**
|
35
35
|
---
|
@@ -38,39 +38,32 @@ id: Table.ColHeader
|
|
38
38
|
---
|
39
39
|
@tsProps
|
40
40
|
**/
|
41
|
-
let ColHeader = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = class ColHeader extends _react.Component {
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
41
|
+
let ColHeader = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_class2 = class ColHeader extends _react.Component {
|
42
|
+
constructor() {
|
43
|
+
super(...arguments);
|
44
|
+
|
45
|
+
this.handleClick = event => {
|
46
|
+
const _this$props = this.props,
|
47
|
+
id = _this$props.id,
|
48
|
+
onRequestSort = _this$props.onRequestSort;
|
49
|
+
onRequestSort && onRequestSort(event, {
|
50
|
+
id
|
51
|
+
});
|
52
|
+
};
|
53
|
+
}
|
52
54
|
|
53
55
|
componentDidMount() {
|
54
|
-
var _this$props$makeStyle, _this$
|
56
|
+
var _this$props$makeStyle, _this$props2;
|
55
57
|
|
56
|
-
(_this$props$makeStyle = (_this$
|
58
|
+
(_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
|
57
59
|
}
|
58
60
|
|
59
61
|
componentDidUpdate() {
|
60
|
-
var _this$props$makeStyle2, _this$
|
62
|
+
var _this$props$makeStyle2, _this$props3;
|
61
63
|
|
62
|
-
(_this$props$makeStyle2 = (_this$
|
64
|
+
(_this$props$makeStyle2 = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props3);
|
63
65
|
}
|
64
66
|
|
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
|
-
|
74
67
|
renderSortArrow() {
|
75
68
|
const _this$props4 = this.props,
|
76
69
|
sortDirection = _this$props4.sortDirection,
|
@@ -118,7 +111,12 @@ let ColHeader = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default)
|
|
118
111
|
}, (0, _callRenderProp.callRenderProp)(children), this.renderSortArrow())), !onRequestSort && children, !onRequestSort && this.renderSortArrow());
|
119
112
|
}
|
120
113
|
|
121
|
-
}
|
114
|
+
}, _class2.displayName = "ColHeader", _class2.componentId = 'Table.ColHeader', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
|
115
|
+
textAlign: 'start',
|
116
|
+
sortDirection: 'none',
|
117
|
+
children: null,
|
118
|
+
scope: 'col'
|
119
|
+
}, _class2)) || _class);
|
122
120
|
exports.ColHeader = ColHeader;
|
123
121
|
var _default = ColHeader;
|
124
122
|
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, _ScreenReaderContent;
|
40
|
+
var _dec, _class, _class2, _ScreenReaderContent;
|
41
41
|
|
42
42
|
/**
|
43
43
|
---
|
@@ -46,15 +46,7 @@ id: Table.Head
|
|
46
46
|
---
|
47
47
|
@tsProps
|
48
48
|
**/
|
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
|
-
|
49
|
+
let Head = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_class2 = class Head extends _react.Component {
|
58
50
|
get isSortable() {
|
59
51
|
const _ref = _react.Children.toArray(this.props.children),
|
60
52
|
_ref2 = (0, _slicedToArray2.default)(_ref, 1),
|
@@ -184,7 +176,9 @@ let Head = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
|
|
184
176
|
}), _react.Children.map(children, child => (0, _matchComponentTypes.matchComponentTypes)(child, [_Row.Row]) ? child : null));
|
185
177
|
}
|
186
178
|
|
187
|
-
}
|
179
|
+
}, _class2.displayName = "Head", _class2.componentId = 'Table.Head', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
|
180
|
+
children: null
|
181
|
+
}, _class2)) || _class);
|
188
182
|
exports.Head = Head;
|
189
183
|
var _default = Head;
|
190
184
|
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, _class2;
|
35
35
|
|
36
36
|
/**
|
37
37
|
---
|
@@ -40,15 +40,7 @@ id: Table.Row
|
|
40
40
|
---
|
41
41
|
@tsProps
|
42
42
|
**/
|
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
|
-
|
43
|
+
let Row = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_class2 = class Row extends _react.Component {
|
52
44
|
componentDidMount() {
|
53
45
|
var _this$props$makeStyle, _this$props;
|
54
46
|
|
@@ -95,7 +87,9 @@ let Row = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec
|
|
95
87
|
}));
|
96
88
|
}
|
97
89
|
|
98
|
-
}
|
90
|
+
}, _class2.displayName = "Row", _class2.componentId = 'Table.Row', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
|
91
|
+
children: null
|
92
|
+
}, _class2)) || _class);
|
99
93
|
exports.Row = Row;
|
100
94
|
var _default = Row;
|
101
95
|
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, _class2;
|
27
27
|
|
28
28
|
/**
|
29
29
|
---
|
@@ -32,16 +32,7 @@ id: Table.RowHeader
|
|
32
32
|
---
|
33
33
|
@tsProps
|
34
34
|
**/
|
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
|
-
|
35
|
+
let RowHeader = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_class2 = class RowHeader extends _react.Component {
|
45
36
|
componentDidMount() {
|
46
37
|
var _this$props$makeStyle, _this$props;
|
47
38
|
|
@@ -67,7 +58,10 @@ let RowHeader = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default)
|
|
67
58
|
}), (0, _callRenderProp.callRenderProp)(children));
|
68
59
|
}
|
69
60
|
|
70
|
-
}
|
61
|
+
}, _class2.displayName = "RowHeader", _class2.componentId = 'Table.RowHeader', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
|
62
|
+
textAlign: 'start',
|
63
|
+
children: null
|
64
|
+
}, _class2)) || _class);
|
71
65
|
exports.RowHeader = RowHeader;
|
72
66
|
var _default = RowHeader;
|
73
67
|
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, _class2;
|
45
45
|
|
46
46
|
/**
|
47
47
|
---
|
@@ -49,31 +49,20 @@ category: components
|
|
49
49
|
---
|
50
50
|
@tsProps
|
51
51
|
**/
|
52
|
-
let Table = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = class Table extends _react.Component {
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
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
|
-
};
|
52
|
+
let Table = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_class2 = class Table extends _react.Component {
|
53
|
+
constructor() {
|
54
|
+
super(...arguments);
|
55
|
+
this.ref = null;
|
56
|
+
|
57
|
+
this.handleRef = el => {
|
58
|
+
const elementRef = this.props.elementRef;
|
59
|
+
this.ref = el;
|
60
|
+
|
61
|
+
if (typeof elementRef === 'function') {
|
62
|
+
elementRef(el);
|
63
|
+
}
|
64
|
+
};
|
65
|
+
}
|
77
66
|
|
78
67
|
componentDidMount() {
|
79
68
|
var _this$props$makeStyle, _this$props;
|
@@ -147,7 +136,11 @@ let Table = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _d
|
|
147
136
|
}));
|
148
137
|
}
|
149
138
|
|
150
|
-
}
|
139
|
+
}, _class2.displayName = "Table", _class2.componentId = 'Table', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
|
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);
|
151
144
|
exports.Table = Table;
|
152
145
|
var _default = Table;
|
153
146
|
exports.default = _default;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@instructure/ui-table",
|
3
|
-
"version": "8.25.1-snapshot-
|
3
|
+
"version": "8.25.1-snapshot-13",
|
4
4
|
"description": "A styled HTML table component",
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
6
6
|
"module": "./es/index.js",
|
@@ -23,24 +23,24 @@
|
|
23
23
|
},
|
24
24
|
"license": "MIT",
|
25
25
|
"devDependencies": {
|
26
|
-
"@instructure/ui-babel-preset": "8.25.1-snapshot-
|
27
|
-
"@instructure/ui-color-utils": "8.25.1-snapshot-
|
28
|
-
"@instructure/ui-test-utils": "8.25.1-snapshot-
|
29
|
-
"@instructure/ui-themes": "8.25.1-snapshot-
|
26
|
+
"@instructure/ui-babel-preset": "8.25.1-snapshot-13",
|
27
|
+
"@instructure/ui-color-utils": "8.25.1-snapshot-13",
|
28
|
+
"@instructure/ui-test-utils": "8.25.1-snapshot-13",
|
29
|
+
"@instructure/ui-themes": "8.25.1-snapshot-13"
|
30
30
|
},
|
31
31
|
"dependencies": {
|
32
32
|
"@babel/runtime": "^7.13.10",
|
33
|
-
"@instructure/console": "8.25.1-snapshot-
|
34
|
-
"@instructure/emotion": "8.25.1-snapshot-
|
35
|
-
"@instructure/shared-types": "8.25.1-snapshot-
|
36
|
-
"@instructure/ui-a11y-content": "8.25.1-snapshot-
|
37
|
-
"@instructure/ui-icons": "8.25.1-snapshot-
|
38
|
-
"@instructure/ui-prop-types": "8.25.1-snapshot-
|
39
|
-
"@instructure/ui-react-utils": "8.25.1-snapshot-
|
40
|
-
"@instructure/ui-simple-select": "8.25.1-snapshot-
|
41
|
-
"@instructure/ui-testable": "8.25.1-snapshot-
|
42
|
-
"@instructure/ui-utils": "8.25.1-snapshot-
|
43
|
-
"@instructure/ui-view": "8.25.1-snapshot-
|
33
|
+
"@instructure/console": "8.25.1-snapshot-13",
|
34
|
+
"@instructure/emotion": "8.25.1-snapshot-13",
|
35
|
+
"@instructure/shared-types": "8.25.1-snapshot-13",
|
36
|
+
"@instructure/ui-a11y-content": "8.25.1-snapshot-13",
|
37
|
+
"@instructure/ui-icons": "8.25.1-snapshot-13",
|
38
|
+
"@instructure/ui-prop-types": "8.25.1-snapshot-13",
|
39
|
+
"@instructure/ui-react-utils": "8.25.1-snapshot-13",
|
40
|
+
"@instructure/ui-simple-select": "8.25.1-snapshot-13",
|
41
|
+
"@instructure/ui-testable": "8.25.1-snapshot-13",
|
42
|
+
"@instructure/ui-utils": "8.25.1-snapshot-13",
|
43
|
+
"@instructure/ui-view": "8.25.1-snapshot-13",
|
44
44
|
"prop-types": "^15"
|
45
45
|
},
|
46
46
|
"peerDependencies": {
|