@instructure/ui-table 10.22.1-snapshot-0 → 10.22.1-snapshot-2

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,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
- ## [10.22.1-snapshot-0](https://github.com/instructure/instructure-ui/compare/v10.22.0...v10.22.1-snapshot-0) (2025-07-08)
6
+ ## [10.22.1-snapshot-2](https://github.com/instructure/instructure-ui/compare/v10.22.0...v10.22.1-snapshot-2) (2025-07-09)
7
7
 
8
8
 
9
9
  ### Features
package/README.md CHANGED
@@ -1,7 +1,3 @@
1
- ---
2
- category: packages
3
- ---
4
-
5
1
  ## ui-table
6
2
 
7
3
  [![npm][npm]][npm-url]
@@ -24,7 +24,19 @@
24
24
 
25
25
  import { createContext } from 'react';
26
26
  /**
27
- * React context created by the `Table` component to hold its data
27
+ * ---
28
+ * category: utilities/react
29
+ * ---
30
+ * React context created by the `Table` component to hold its data which are
31
+ * read by its children. You can access these to make custom Table cells/rows.
32
+ *
33
+ * It stores the following parameters:
34
+ * - `isStacked`: Whether the `Table` is in `stacked` layout.
35
+ * - `hover`: Whether highlight rows on mouse hover
36
+ * - `headers`: in `stacked` layout the children of the first row of cells
37
+ * (e.g. the titles in a table). This is used in `stacked` layout to display
38
+ * the titles inline
39
+ * @module
28
40
  */
29
41
  const TableContext = /*#__PURE__*/createContext({
30
42
  isStacked: false,
@@ -30,7 +30,19 @@ var _react = require("react");
30
30
  */
31
31
 
32
32
  /**
33
- * React context created by the `Table` component to hold its data
33
+ * ---
34
+ * category: utilities/react
35
+ * ---
36
+ * React context created by the `Table` component to hold its data which are
37
+ * read by its children. You can access these to make custom Table cells/rows.
38
+ *
39
+ * It stores the following parameters:
40
+ * - `isStacked`: Whether the `Table` is in `stacked` layout.
41
+ * - `hover`: Whether highlight rows on mouse hover
42
+ * - `headers`: in `stacked` layout the children of the first row of cells
43
+ * (e.g. the titles in a table). This is used in `stacked` layout to display
44
+ * the titles inline
45
+ * @module
34
46
  */
35
47
  const TableContext = exports.TableContext = /*#__PURE__*/(0, _react.createContext)({
36
48
  isStacked: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-table",
3
- "version": "10.22.1-snapshot-0",
3
+ "version": "10.22.1-snapshot-2",
4
4
  "description": "A styled HTML table component",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -23,10 +23,10 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-axe-check": "10.22.1-snapshot-0",
27
- "@instructure/ui-babel-preset": "10.22.1-snapshot-0",
28
- "@instructure/ui-color-utils": "10.22.1-snapshot-0",
29
- "@instructure/ui-themes": "10.22.1-snapshot-0",
26
+ "@instructure/ui-axe-check": "10.22.1-snapshot-2",
27
+ "@instructure/ui-babel-preset": "10.22.1-snapshot-2",
28
+ "@instructure/ui-color-utils": "10.22.1-snapshot-2",
29
+ "@instructure/ui-themes": "10.22.1-snapshot-2",
30
30
  "@testing-library/jest-dom": "^6.6.3",
31
31
  "@testing-library/react": "^16.0.1",
32
32
  "@testing-library/user-event": "^14.6.1",
@@ -34,17 +34,17 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@babel/runtime": "^7.27.6",
37
- "@instructure/console": "10.22.1-snapshot-0",
38
- "@instructure/emotion": "10.22.1-snapshot-0",
39
- "@instructure/shared-types": "10.22.1-snapshot-0",
40
- "@instructure/ui-a11y-content": "10.22.1-snapshot-0",
41
- "@instructure/ui-icons": "10.22.1-snapshot-0",
42
- "@instructure/ui-prop-types": "10.22.1-snapshot-0",
43
- "@instructure/ui-react-utils": "10.22.1-snapshot-0",
44
- "@instructure/ui-simple-select": "10.22.1-snapshot-0",
45
- "@instructure/ui-testable": "10.22.1-snapshot-0",
46
- "@instructure/ui-utils": "10.22.1-snapshot-0",
47
- "@instructure/ui-view": "10.22.1-snapshot-0",
37
+ "@instructure/console": "10.22.1-snapshot-2",
38
+ "@instructure/emotion": "10.22.1-snapshot-2",
39
+ "@instructure/shared-types": "10.22.1-snapshot-2",
40
+ "@instructure/ui-a11y-content": "10.22.1-snapshot-2",
41
+ "@instructure/ui-icons": "10.22.1-snapshot-2",
42
+ "@instructure/ui-prop-types": "10.22.1-snapshot-2",
43
+ "@instructure/ui-react-utils": "10.22.1-snapshot-2",
44
+ "@instructure/ui-simple-select": "10.22.1-snapshot-2",
45
+ "@instructure/ui-testable": "10.22.1-snapshot-2",
46
+ "@instructure/ui-utils": "10.22.1-snapshot-2",
47
+ "@instructure/ui-view": "10.22.1-snapshot-2",
48
48
  "prop-types": "^15.8.1"
49
49
  },
50
50
  "peerDependencies": {
@@ -1763,7 +1763,7 @@ Wrapper HOCs are simple, just return the original component:
1763
1763
  If you want to use fully custom components you have to pay attention to the following:
1764
1764
 
1765
1765
  - Render them as the appropriate HTML Table tags (`tr`, `th`, ...)
1766
- - Read the `hover` prop from `TableContext` to customize hover behaviour
1766
+ - Read the `hover` prop from [TableContext](#TableContext) to customize hover behaviour
1767
1767
  - A11y: Row header cells must have the `scope='row'` HTML attribute
1768
1768
  - A11y: Column header cells must have the `scope='col'` and `aria-sort` (if sortable) HTML attribute
1769
1769
 
@@ -1977,13 +1977,13 @@ Basic fully custom table:
1977
1977
 
1978
1978
  #### Fully custom components with `stacked` layout
1979
1979
 
1980
- This layout for small screens displays the table as a list. To accomplish this the headers are passed down to cells (in `TableContext`), so they can display what column they are rendering.
1980
+ This layout for small screens displays the table as a list. To accomplish this the headers are passed down to cells (in [TableContext](#TableContext)), so they can display what column they are rendering.
1981
1981
  In this layout for accessibility not render HTML table tags, just plain DOM elements (e.g. `div`) and use the appropriate ARIA role to signify that it's actually a `Table` (e.g. [`cell`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/cell_role), [`row`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/row_role), [`rowheader`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/rowheader_role)).
1982
1982
  Also you need the following props on the components:
1983
1983
 
1984
1984
  ##### Table rows
1985
1985
 
1986
- - It should read the `headers` array from `TableContext` and pass its nth element to its nth child (if they have such prop).
1986
+ - It should read the `headers` array from [TableContext](#TableContext) and pass its nth element to its nth child (if they have such prop).
1987
1987
 
1988
1988
  ##### The children of the first row in `Table.Head` (`Table.ColHeader` by default)
1989
1989
 
@@ -1991,7 +1991,7 @@ Also you need the following props on the components:
1991
1991
 
1992
1992
  ##### Table cells
1993
1993
 
1994
- - It needs to have an optional `header` prop and should display its value so the user knows which column the cell's value belongs to (you can read whether the table is using `stacked` layout from `TableContext`.
1994
+ - It needs to have an optional `header` prop and should display its value so the user knows which column the cell's value belongs to (you can read whether the table is using `stacked` layout from [TableContext](#TableContext).
1995
1995
 
1996
1996
  Custom table with `stacked` layout support:
1997
1997
 
@@ -42,7 +42,19 @@ type TableContextType = {
42
42
  }
43
43
 
44
44
  /**
45
- * React context created by the `Table` component to hold its data
45
+ * ---
46
+ * category: utilities/react
47
+ * ---
48
+ * React context created by the `Table` component to hold its data which are
49
+ * read by its children. You can access these to make custom Table cells/rows.
50
+ *
51
+ * It stores the following parameters:
52
+ * - `isStacked`: Whether the `Table` is in `stacked` layout.
53
+ * - `hover`: Whether highlight rows on mouse hover
54
+ * - `headers`: in `stacked` layout the children of the first row of cells
55
+ * (e.g. the titles in a table). This is used in `stacked` layout to display
56
+ * the titles inline
57
+ * @module
46
58
  */
47
59
  const TableContext = createContext<TableContextType>({
48
60
  isStacked: false,