@instructure/ui-table 11.4.1-snapshot-2 → 11.4.1-snapshot-3

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 CHANGED
@@ -3,9 +3,12 @@
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
- ## [11.4.1-snapshot-2](https://github.com/instructure/instructure-ui/compare/v11.4.0...v11.4.1-snapshot-2) (2026-02-03)
6
+ ## [11.4.1-snapshot-3](https://github.com/instructure/instructure-ui/compare/v11.4.0...v11.4.1-snapshot-3) (2026-02-03)
7
7
 
8
- **Note:** Version bump only for package @instructure/ui-table
8
+
9
+ ### Features
10
+
11
+ * **ui-table:** expose min-width prop, so one can make a table where each column has no wrapping text ([317897a](https://github.com/instructure/instructure-ui/commit/317897a996288108865e8204be075b1cfab7530f))
9
12
 
10
13
 
11
14
 
package/es/Table/index.js CHANGED
@@ -88,7 +88,8 @@ let Table = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_clas
88
88
  caption = _this$props3.caption,
89
89
  children = _this$props3.children,
90
90
  hover = _this$props3.hover,
91
- styles = _this$props3.styles;
91
+ styles = _this$props3.styles,
92
+ minWidth = _this$props3.minWidth;
92
93
  const isStacked = layout === 'stacked';
93
94
  const headers = isStacked ? this.getHeaders() : void 0;
94
95
  if (!caption) {
@@ -100,8 +101,11 @@ let Table = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_clas
100
101
  hover: hover,
101
102
  headers: headers
102
103
  },
103
- children: _jsxs(View, {
104
+ children: _jsxs(View
105
+ // All HTML props, except the ones accepted by `View` and `Table`
106
+ , {
104
107
  ...View.omitViewProps(omitProps(this.props, Table.allowedProps), Table),
108
+ minWidth: minWidth,
105
109
  as: isStacked ? 'div' : 'table',
106
110
  margin: margin,
107
111
  elementRef: this.handleRef,
@@ -94,7 +94,8 @@ let Table = exports.Table = (_dec = (0, _emotion.withStyle)(_styles.default, _th
94
94
  caption = _this$props3.caption,
95
95
  children = _this$props3.children,
96
96
  hover = _this$props3.hover,
97
- styles = _this$props3.styles;
97
+ styles = _this$props3.styles,
98
+ minWidth = _this$props3.minWidth;
98
99
  const isStacked = layout === 'stacked';
99
100
  const headers = isStacked ? this.getHeaders() : void 0;
100
101
  if (!caption) {
@@ -106,8 +107,11 @@ let Table = exports.Table = (_dec = (0, _emotion.withStyle)(_styles.default, _th
106
107
  hover: hover,
107
108
  headers: headers
108
109
  },
109
- children: (0, _jsxRuntime.jsxs)(_View.View, {
110
+ children: (0, _jsxRuntime.jsxs)(_View.View
111
+ // All HTML props, except the ones accepted by `View` and `Table`
112
+ , {
110
113
  ..._View.View.omitViewProps((0, _omitProps.omitProps)(this.props, Table.allowedProps), Table),
114
+ minWidth: minWidth,
111
115
  as: isStacked ? 'div' : 'table',
112
116
  margin: margin,
113
117
  elementRef: this.handleRef,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-table",
3
- "version": "11.4.1-snapshot-2",
3
+ "version": "11.4.1-snapshot-3",
4
4
  "description": "A styled HTML table component",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -15,25 +15,25 @@
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
17
  "@babel/runtime": "^7.27.6",
18
- "@instructure/console": "11.4.1-snapshot-2",
19
- "@instructure/shared-types": "11.4.1-snapshot-2",
20
- "@instructure/emotion": "11.4.1-snapshot-2",
21
- "@instructure/ui-a11y-content": "11.4.1-snapshot-2",
22
- "@instructure/ui-icons": "11.4.1-snapshot-2",
23
- "@instructure/ui-react-utils": "11.4.1-snapshot-2",
24
- "@instructure/ui-simple-select": "11.4.1-snapshot-2",
25
- "@instructure/ui-view": "11.4.1-snapshot-2",
26
- "@instructure/ui-utils": "11.4.1-snapshot-2"
18
+ "@instructure/emotion": "11.4.1-snapshot-3",
19
+ "@instructure/console": "11.4.1-snapshot-3",
20
+ "@instructure/shared-types": "11.4.1-snapshot-3",
21
+ "@instructure/ui-icons": "11.4.1-snapshot-3",
22
+ "@instructure/ui-a11y-content": "11.4.1-snapshot-3",
23
+ "@instructure/ui-react-utils": "11.4.1-snapshot-3",
24
+ "@instructure/ui-simple-select": "11.4.1-snapshot-3",
25
+ "@instructure/ui-utils": "11.4.1-snapshot-3",
26
+ "@instructure/ui-view": "11.4.1-snapshot-3"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@testing-library/jest-dom": "^6.6.3",
30
30
  "@testing-library/react": "15.0.7",
31
31
  "@testing-library/user-event": "^14.6.1",
32
32
  "vitest": "^3.2.2",
33
- "@instructure/ui-babel-preset": "11.4.1-snapshot-2",
34
- "@instructure/ui-color-utils": "11.4.1-snapshot-2",
35
- "@instructure/ui-axe-check": "11.4.1-snapshot-2",
36
- "@instructure/ui-themes": "11.4.1-snapshot-2"
33
+ "@instructure/ui-axe-check": "11.4.1-snapshot-3",
34
+ "@instructure/ui-color-utils": "11.4.1-snapshot-3",
35
+ "@instructure/ui-babel-preset": "11.4.1-snapshot-3",
36
+ "@instructure/ui-themes": "11.4.1-snapshot-3"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "react": ">=18 <=19"
@@ -107,7 +107,8 @@ class Table extends Component<TableProps> {
107
107
  }
108
108
 
109
109
  render() {
110
- const { margin, layout, caption, children, hover, styles } = this.props
110
+ const { margin, layout, caption, children, hover, styles, minWidth } =
111
+ this.props
111
112
  const isStacked = layout === 'stacked'
112
113
  const headers = isStacked ? this.getHeaders() : undefined
113
114
 
@@ -124,10 +125,12 @@ class Table extends Component<TableProps> {
124
125
  }}
125
126
  >
126
127
  <View
128
+ // All HTML props, except the ones accepted by `View` and `Table`
127
129
  {...View.omitViewProps(
128
130
  omitProps(this.props, Table.allowedProps),
129
131
  Table
130
132
  )}
133
+ minWidth={minWidth}
131
134
  as={isStacked ? 'div' : 'table'}
132
135
  margin={margin}
133
136
  elementRef={this.handleRef}
@@ -60,6 +60,11 @@ type TableOwnProps = {
60
60
  * `stacked` renders table in one column to be more readable on narrow screens
61
61
  */
62
62
  layout?: 'auto' | 'fixed' | 'stacked'
63
+ /**
64
+ * Sets the CSS prop `min-width` on the table.
65
+ * Same as {@link React.CSSProperties.minWidth}
66
+ */
67
+ minWidth?: React.CSSProperties['minWidth']
63
68
  /**
64
69
  * `Table.Head` or `Table.Body`
65
70
  */