@instructure/ui-table 8.18.0 → 8.18.1-snapshot.12

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.
@@ -51,17 +51,21 @@ let ColHeader = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default)
51
51
  }
52
52
 
53
53
  componentDidMount() {
54
- this.props.makeStyles?.();
54
+ var _this$props$makeStyle, _this$props2;
55
+
56
+ (_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
55
57
  }
56
58
 
57
59
  componentDidUpdate() {
58
- this.props.makeStyles?.();
60
+ var _this$props$makeStyle2, _this$props3;
61
+
62
+ (_this$props$makeStyle2 = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props3);
59
63
  }
60
64
 
61
65
  renderSortArrow() {
62
- const _this$props2 = this.props,
63
- sortDirection = _this$props2.sortDirection,
64
- onRequestSort = _this$props2.onRequestSort;
66
+ const _this$props4 = this.props,
67
+ sortDirection = _this$props4.sortDirection,
68
+ onRequestSort = _this$props4.onRequestSort;
65
69
 
66
70
  if (sortDirection === 'ascending') {
67
71
  return _IconMiniArrowUpLine || (_IconMiniArrowUpLine = (0, _emotion.jsx)(_IconMiniArrowUpLine2.IconMiniArrowUpLine, null));
@@ -84,15 +88,15 @@ let ColHeader = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default)
84
88
  }
85
89
 
86
90
  render() {
87
- const _this$props3 = this.props,
88
- onRequestSort = _this$props3.onRequestSort,
89
- width = _this$props3.width,
90
- children = _this$props3.children,
91
- sortDirection = _this$props3.sortDirection,
92
- scope = _this$props3.scope,
93
- styles = _this$props3.styles;
91
+ const _this$props5 = this.props,
92
+ onRequestSort = _this$props5.onRequestSort,
93
+ width = _this$props5.width,
94
+ children = _this$props5.children,
95
+ sortDirection = _this$props5.sortDirection,
96
+ scope = _this$props5.scope,
97
+ styles = _this$props5.styles;
94
98
  return (0, _emotion.jsx)("th", Object.assign({}, (0, _omitProps.omitProps)(this.props, ColHeader.allowedProps), {
95
- css: styles?.colHeader,
99
+ css: styles === null || styles === void 0 ? void 0 : styles.colHeader,
96
100
  style: {
97
101
  width
98
102
  },
@@ -100,7 +104,7 @@ let ColHeader = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default)
100
104
  "aria-sort": sortDirection
101
105
  }), onRequestSort && (0, _emotion.jsx)("button", {
102
106
  onClick: this.handleClick,
103
- css: styles?.button
107
+ css: styles === null || styles === void 0 ? void 0 : styles.button
104
108
  }, (0, _emotion.jsx)("div", null, (0, _callRenderProp.callRenderProp)(children), this.renderSortArrow())), !onRequestSort && children, !onRequestSort && this.renderSortArrow());
105
109
  }
106
110
 
@@ -40,16 +40,16 @@ const generateComponentTheme = theme => {
40
40
  borders = theme.borders,
41
41
  spacing = theme.spacing;
42
42
  const componentVariables = {
43
- fontSize: typography?.fontSizeMedium,
44
- fontFamily: typography?.fontFamily,
45
- color: colors?.textDarkest,
46
- background: colors?.backgroundLightest,
47
- borderColor: colors?.borderMedium,
48
- lineHeight: typography?.lineHeightCondensed,
49
- padding: `${spacing?.xSmall} ${spacing?.small}`,
50
- focusOutlineColor: colors?.borderBrand,
51
- focusOutlineWidth: borders?.widthMedium,
52
- focusOutlineStyle: borders?.style
43
+ fontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
44
+ fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
45
+ color: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
46
+ background: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest,
47
+ borderColor: colors === null || colors === void 0 ? void 0 : colors.borderMedium,
48
+ lineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeightCondensed,
49
+ padding: `${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall} ${spacing === null || spacing === void 0 ? void 0 : spacing.small}`,
50
+ focusOutlineColor: colors === null || colors === void 0 ? void 0 : colors.borderBrand,
51
+ focusOutlineWidth: borders === null || borders === void 0 ? void 0 : borders.widthMedium,
52
+ focusOutlineStyle: borders === null || borders === void 0 ? void 0 : borders.style
53
53
  };
54
54
  return { ...componentVariables
55
55
  };
@@ -66,21 +66,25 @@ let Head = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
66
66
  }
67
67
 
68
68
  componentDidMount() {
69
- this.props.makeStyles?.();
69
+ var _this$props$makeStyle, _this$props;
70
+
71
+ (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
70
72
  }
71
73
 
72
74
  componentDidUpdate() {
75
+ var _this$props$makeStyle2, _this$props2;
76
+
73
77
  if (this.isSortable && typeof this.props.renderSortLabel === 'undefined') {
74
78
  (0, _console.warn)(false, '[Table.Head] The `renderSortLabel` prop should be provided when Table is sortable.');
75
79
  }
76
80
 
77
- this.props.makeStyles?.();
81
+ (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
78
82
  }
79
83
 
80
84
  renderSelect() {
81
- const _this$props = this.props,
82
- children = _this$props.children,
83
- renderSortLabel = _this$props.renderSortLabel;
85
+ const _this$props3 = this.props,
86
+ children = _this$props3.children,
87
+ renderSortLabel = _this$props3.renderSortLabel;
84
88
 
85
89
  const _ref3 = _react.Children.toArray(children),
86
90
  _ref4 = (0, _slicedToArray2.default)(_ref3, 1),
@@ -163,12 +167,12 @@ let Head = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
163
167
  }
164
168
 
165
169
  render() {
166
- const _this$props2 = this.props,
167
- children = _this$props2.children,
168
- isStacked = _this$props2.isStacked,
169
- styles = _this$props2.styles;
170
+ const _this$props4 = this.props,
171
+ children = _this$props4.children,
172
+ isStacked = _this$props4.isStacked,
173
+ styles = _this$props4.styles;
170
174
  return isStacked ? this.renderSelect() : (0, _emotion.jsx)("thead", Object.assign({}, (0, _omitProps.omitProps)(this.props, Head.allowedProps), {
171
- css: styles?.head
175
+ css: styles === null || styles === void 0 ? void 0 : styles.head
172
176
  }), _react.Children.map(children, child => (0, _matchComponentTypes.matchComponentTypes)(child, [_Row.Row]) ? child : null));
173
177
  }
174
178
 
@@ -38,11 +38,11 @@ const generateComponentTheme = theme => {
38
38
  const colors = theme.colors,
39
39
  typography = theme.typography;
40
40
  const componentVariables = {
41
- fontSize: typography?.fontSizeMedium,
42
- fontFamily: typography?.fontFamily,
43
- fontWeight: typography?.fontWeightNormal,
44
- color: colors?.textDarkest,
45
- background: colors?.backgroundLightest
41
+ fontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
42
+ fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
43
+ fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
44
+ color: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
45
+ background: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest
46
46
  };
47
47
  return { ...componentVariables
48
48
  };
@@ -42,22 +42,26 @@ id: Table.Row
42
42
  **/
43
43
  let Row = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = class Row extends _react.Component {
44
44
  componentDidMount() {
45
- this.props.makeStyles?.();
45
+ var _this$props$makeStyle, _this$props;
46
+
47
+ (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
46
48
  }
47
49
 
48
50
  componentDidUpdate() {
49
- this.props.makeStyles?.();
51
+ var _this$props$makeStyle2, _this$props2;
52
+
53
+ (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
50
54
  }
51
55
 
52
56
  render() {
53
- const _this$props = this.props,
54
- children = _this$props.children,
55
- styles = _this$props.styles,
56
- isStacked = _this$props.isStacked,
57
- headers = _this$props.headers;
57
+ const _this$props3 = this.props,
58
+ children = _this$props3.children,
59
+ styles = _this$props3.styles,
60
+ isStacked = _this$props3.isStacked,
61
+ headers = _this$props3.headers;
58
62
  return (0, _emotion.jsx)(_View.View, Object.assign({}, _View.View.omitViewProps((0, _omitProps.omitProps)(this.props, Row.allowedProps), Row), {
59
63
  as: isStacked ? 'div' : 'tr',
60
- css: styles?.row,
64
+ css: styles === null || styles === void 0 ? void 0 : styles.row,
61
65
  role: isStacked ? 'row' : void 0
62
66
  }), _react.Children.toArray(children).filter(Boolean).map((child, index) => {
63
67
  if ((0, _matchComponentTypes.matchComponentTypes)(child, [_ColHeader.ColHeader])) {
@@ -45,14 +45,14 @@ const generateComponentTheme = theme => {
45
45
  }
46
46
  };
47
47
  const componentVariables = {
48
- fontSize: typography?.fontSizeMedium,
49
- fontFamily: typography?.fontFamily,
50
- fontWeight: typography?.fontWeightNormal,
51
- color: colors?.textDarkest,
52
- background: colors?.backgroundLightest,
53
- borderColor: colors?.borderMedium,
54
- hoverBorderColor: colors?.borderBrand,
55
- padding: `${spacing?.xSmall} 0`
48
+ fontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
49
+ fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
50
+ fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
51
+ color: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
52
+ background: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest,
53
+ borderColor: colors === null || colors === void 0 ? void 0 : colors.borderMedium,
54
+ hoverBorderColor: colors === null || colors === void 0 ? void 0 : colors.borderBrand,
55
+ padding: `${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall} 0`
56
56
  };
57
57
  return { ...componentVariables,
58
58
  ...themeSpecificStyle[themeName]
@@ -34,21 +34,25 @@ id: Table.RowHeader
34
34
  **/
35
35
  let RowHeader = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = class RowHeader extends _react.Component {
36
36
  componentDidMount() {
37
- this.props.makeStyles?.();
37
+ var _this$props$makeStyle, _this$props;
38
+
39
+ (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
38
40
  }
39
41
 
40
42
  componentDidUpdate() {
41
- this.props.makeStyles?.();
43
+ var _this$props$makeStyle2, _this$props2;
44
+
45
+ (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
42
46
  }
43
47
 
44
48
  render() {
45
- const _this$props = this.props,
46
- children = _this$props.children,
47
- isStacked = _this$props.isStacked,
48
- styles = _this$props.styles;
49
+ const _this$props3 = this.props,
50
+ children = _this$props3.children,
51
+ isStacked = _this$props3.isStacked,
52
+ styles = _this$props3.styles;
49
53
  return (0, _emotion.jsx)(_View.View, Object.assign({}, _View.View.omitViewProps((0, _omitProps.omitProps)(this.props, RowHeader.allowedProps), RowHeader), {
50
54
  as: isStacked ? 'div' : 'th',
51
- css: styles?.rowHeader,
55
+ css: styles === null || styles === void 0 ? void 0 : styles.rowHeader,
52
56
  scope: "row",
53
57
  role: isStacked ? 'rowheader' : void 0
54
58
  }), (0, _callRenderProp.callRenderProp)(children));
@@ -39,14 +39,14 @@ const generateComponentTheme = theme => {
39
39
  typography = theme.typography,
40
40
  spacing = theme.spacing;
41
41
  const componentVariables = {
42
- fontSize: typography?.fontSizeMedium,
43
- fontFamily: typography?.fontFamily,
44
- fontWeight: typography?.fontWeightNormal,
45
- color: colors?.textDarkest,
46
- background: colors?.backgroundLightest,
47
- borderColor: colors?.borderMedium,
48
- lineHeight: typography?.lineHeightCondensed,
49
- padding: `${spacing?.xSmall} ${spacing?.small}`
42
+ fontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
43
+ fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
44
+ fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
45
+ color: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
46
+ background: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest,
47
+ borderColor: colors === null || colors === void 0 ? void 0 : colors.borderMedium,
48
+ lineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeightCondensed,
49
+ padding: `${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall} ${spacing === null || spacing === void 0 ? void 0 : spacing.small}`
50
50
  };
51
51
  return { ...componentVariables
52
52
  };
@@ -65,11 +65,15 @@ let Table = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _d
65
65
  }
66
66
 
67
67
  componentDidMount() {
68
- this.props.makeStyles?.();
68
+ var _this$props$makeStyle, _this$props;
69
+
70
+ (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
69
71
  }
70
72
 
71
73
  componentDidUpdate() {
72
- this.props.makeStyles?.();
74
+ var _this$props$makeStyle2, _this$props2;
75
+
76
+ (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
73
77
  }
74
78
 
75
79
  getHeaders() {
@@ -95,20 +99,20 @@ let Table = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _d
95
99
  }
96
100
 
97
101
  render() {
98
- const _this$props = this.props,
99
- margin = _this$props.margin,
100
- layout = _this$props.layout,
101
- caption = _this$props.caption,
102
- children = _this$props.children,
103
- hover = _this$props.hover,
104
- styles = _this$props.styles;
102
+ const _this$props3 = this.props,
103
+ margin = _this$props3.margin,
104
+ layout = _this$props3.layout,
105
+ caption = _this$props3.caption,
106
+ children = _this$props3.children,
107
+ hover = _this$props3.hover,
108
+ styles = _this$props3.styles;
105
109
  const isStacked = layout === 'stacked';
106
110
  const headers = isStacked ? this.getHeaders() : void 0;
107
111
  return (0, _emotion.jsx)(_View.View, Object.assign({}, _View.View.omitViewProps((0, _omitProps.omitProps)(this.props, Table.allowedProps), Table), {
108
112
  as: isStacked ? 'div' : 'table',
109
113
  margin: margin,
110
114
  elementRef: this.handleRef,
111
- css: styles?.table,
115
+ css: styles === null || styles === void 0 ? void 0 : styles.table,
112
116
  role: isStacked ? 'table' : void 0,
113
117
  "aria-label": isStacked ? caption : void 0
114
118
  }), !isStacked && (0, _emotion.jsx)("caption", null, (0, _emotion.jsx)(_ScreenReaderContent.ScreenReaderContent, null, caption)), _react.Children.map(children, child => {
@@ -44,11 +44,11 @@ const generateComponentTheme = theme => {
44
44
  }
45
45
  };
46
46
  const componentVariables = {
47
- fontSize: typography?.fontSizeMedium,
48
- fontFamily: typography?.fontFamily,
49
- fontWeight: typography?.fontWeightNormal,
50
- color: colors?.textDarkest,
51
- background: colors?.backgroundLightest
47
+ fontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
48
+ fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
49
+ fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
50
+ color: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
51
+ background: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest
52
52
  };
53
53
  return { ...componentVariables,
54
54
  ...themeSpecificStyle[themeName]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-table",
3
- "version": "8.18.0",
3
+ "version": "8.18.1-snapshot.12+ca14b3dc8",
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.18.0",
27
- "@instructure/ui-color-utils": "8.18.0",
28
- "@instructure/ui-test-utils": "8.18.0",
29
- "@instructure/ui-themes": "8.18.0"
26
+ "@instructure/ui-babel-preset": "8.18.1-snapshot.12+ca14b3dc8",
27
+ "@instructure/ui-color-utils": "8.18.1-snapshot.12+ca14b3dc8",
28
+ "@instructure/ui-test-utils": "8.18.1-snapshot.12+ca14b3dc8",
29
+ "@instructure/ui-themes": "8.18.1-snapshot.12+ca14b3dc8"
30
30
  },
31
31
  "dependencies": {
32
32
  "@babel/runtime": "^7.13.10",
33
- "@instructure/console": "8.18.0",
34
- "@instructure/emotion": "8.18.0",
35
- "@instructure/shared-types": "8.18.0",
36
- "@instructure/ui-a11y-content": "8.18.0",
37
- "@instructure/ui-icons": "8.18.0",
38
- "@instructure/ui-prop-types": "8.18.0",
39
- "@instructure/ui-react-utils": "8.18.0",
40
- "@instructure/ui-simple-select": "8.18.0",
41
- "@instructure/ui-testable": "8.18.0",
42
- "@instructure/ui-utils": "8.18.0",
43
- "@instructure/ui-view": "8.18.0",
33
+ "@instructure/console": "8.18.1-snapshot.12+ca14b3dc8",
34
+ "@instructure/emotion": "8.18.1-snapshot.12+ca14b3dc8",
35
+ "@instructure/shared-types": "8.18.1-snapshot.12+ca14b3dc8",
36
+ "@instructure/ui-a11y-content": "8.18.1-snapshot.12+ca14b3dc8",
37
+ "@instructure/ui-icons": "8.18.1-snapshot.12+ca14b3dc8",
38
+ "@instructure/ui-prop-types": "8.18.1-snapshot.12+ca14b3dc8",
39
+ "@instructure/ui-react-utils": "8.18.1-snapshot.12+ca14b3dc8",
40
+ "@instructure/ui-simple-select": "8.18.1-snapshot.12+ca14b3dc8",
41
+ "@instructure/ui-testable": "8.18.1-snapshot.12+ca14b3dc8",
42
+ "@instructure/ui-utils": "8.18.1-snapshot.12+ca14b3dc8",
43
+ "@instructure/ui-view": "8.18.1-snapshot.12+ca14b3dc8",
44
44
  "prop-types": "^15"
45
45
  },
46
46
  "peerDependencies": {
@@ -49,5 +49,6 @@
49
49
  "publishConfig": {
50
50
  "access": "public"
51
51
  },
52
- "sideEffects": false
52
+ "sideEffects": false,
53
+ "gitHead": "ca14b3dc8f0315daef7b86aa05f711e6d6684c58"
53
54
  }