@spark-web/data-table 5.1.0 → 5.2.0

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
@@ -1,5 +1,35 @@
1
1
  # @spark-web/data-table
2
2
 
3
+ ## 5.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#667](https://github.com/brighte-labs/spark-web/pull/667)
8
+ [`80d9c15`](https://github.com/brighte-labs/spark-web/commit/80d9c156a40bbcd2b1a91a2d0403b3c8e9b47b4e)
9
+ Thanks [@Leo704099](https://github.com/Leo704099)! - Support react 17 to 19
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+ [[`80d9c15`](https://github.com/brighte-labs/spark-web/commit/80d9c156a40bbcd2b1a91a2d0403b3c8e9b47b4e)]:
15
+ - @spark-web/checkbox@5.1.0
16
+ - @spark-web/spinner@5.1.0
17
+ - @spark-web/theme@5.13.0
18
+ - @spark-web/utils@5.1.0
19
+ - @spark-web/a11y@5.3.0
20
+ - @spark-web/icon@5.1.0
21
+ - @spark-web/text@5.3.0
22
+ - @spark-web/box@6.0.0
23
+
24
+ ## 5.1.1
25
+
26
+ ### Patch Changes
27
+
28
+ - [#737](https://github.com/brighte-labs/spark-web/pull/737)
29
+ [`43060b0`](https://github.com/brighte-labs/spark-web/commit/43060b0d1b9a97dbaff145c327d2426b0240bb1f)
30
+ Thanks [@jacobporci-brighte](https://github.com/jacobporci-brighte)! - added
31
+ spacing between sort icon and column header + added default sorting value
32
+
3
33
  ## 5.1.0
4
34
 
5
35
  ### Minor Changes
@@ -9,8 +9,8 @@ import type { ReactElement } from 'react';
9
9
  * @see https://spark.brighte.com.au/package/data-table
10
10
  */
11
11
  declare function DataTable<T>({ data, items, className, columns, enableExpanding, enableHiding, enableMultiRowSelection, enableClickableRow, headerClassName, footerClassName, showBottomSpinner: showSpinner, rowClassName, expandedRowComponent, onBottomSpinnerShown, onRowClick, onRowSelectionChange, renderRow, ...tableOptions }: DataTableProps<T>): import("@emotion/react/jsx-runtime").JSX.Element;
12
- declare type TableSubsetOptions<T> = Pick<TableOptions<T>, 'columns' | 'enableExpanding' | 'enableHiding' | 'enableMultiRowSelection' | 'state' | 'onStateChange' | 'onExpandedChange' | 'onRowSelectionChange' | 'getRowId' | 'enableSorting' | 'manualSorting'>;
13
- declare type DataTableProps<T> = TableSubsetOptions<T> & {
12
+ type TableSubsetOptions<T> = Pick<TableOptions<T>, 'columns' | 'enableExpanding' | 'enableHiding' | 'enableMultiRowSelection' | 'state' | 'onStateChange' | 'onExpandedChange' | 'onRowSelectionChange' | 'getRowId' | 'enableSorting' | 'manualSorting'>;
13
+ type DataTableProps<T> = TableSubsetOptions<T> & {
14
14
  className?: SerializedStyles;
15
15
  headerClassName?: SerializedStyles;
16
16
  footerClassName?: SerializedStyles;
@@ -1,2 +1,2 @@
1
- export * from "./declarations/src/index";
1
+ export * from "./declarations/src/index.js";
2
2
  //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Bhcmstd2ViLWRhdGEtdGFibGUuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuL2RlY2xhcmF0aW9ucy9zcmMvaW5kZXguZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9
@@ -91,7 +91,10 @@ function DataTable(_ref) {
91
91
  fontWeight: theme$1.typography.fontWeight.semibold,
92
92
  textAlign: 'left',
93
93
  textTransform: 'uppercase',
94
- width: "".concat(header.getSize(), "px")
94
+ width: "".concat(header.getSize(), "px"),
95
+ svg: {
96
+ marginLeft: theme$1.spacing.xsmall
97
+ }
95
98
  }),
96
99
  onClick: header.column.getToggleSortingHandler(),
97
100
  children: [header.isPlaceholder ? null : reactTable.flexRender(header.column.columnDef.header, header.getContext()), (_asc$desc = {
@@ -91,7 +91,10 @@ function DataTable(_ref) {
91
91
  fontWeight: theme$1.typography.fontWeight.semibold,
92
92
  textAlign: 'left',
93
93
  textTransform: 'uppercase',
94
- width: "".concat(header.getSize(), "px")
94
+ width: "".concat(header.getSize(), "px"),
95
+ svg: {
96
+ marginLeft: theme$1.spacing.xsmall
97
+ }
95
98
  }),
96
99
  onClick: header.column.getToggleSortingHandler(),
97
100
  children: [header.isPlaceholder ? null : reactTable.flexRender(header.column.columnDef.header, header.getContext()), (_asc$desc = {
@@ -84,7 +84,10 @@ function DataTable(_ref) {
84
84
  fontWeight: theme.typography.fontWeight.semibold,
85
85
  textAlign: 'left',
86
86
  textTransform: 'uppercase',
87
- width: "".concat(header.getSize(), "px")
87
+ width: "".concat(header.getSize(), "px"),
88
+ svg: {
89
+ marginLeft: theme.spacing.xsmall
90
+ }
88
91
  }),
89
92
  onClick: header.column.getToggleSortingHandler(),
90
93
  children: [header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()), (_asc$desc = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spark-web/data-table",
3
- "version": "5.1.0",
3
+ "version": "5.2.0",
4
4
  "homepage": "https://github.com/brighte-labs/spark-web#readme",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,23 +18,23 @@
18
18
  "dependencies": {
19
19
  "@babel/runtime": "^7.25.0",
20
20
  "@emotion/react": "^11.14.0",
21
- "@spark-web/a11y": "^5.0.0",
22
- "@spark-web/box": "^5.2.2",
23
- "@spark-web/checkbox": "^5.0.4",
24
- "@spark-web/icon": "^5.0.0",
25
- "@spark-web/spinner": "^5.0.1",
26
- "@spark-web/text": "^5.2.3",
27
- "@spark-web/theme": "^5.12.1",
28
- "@spark-web/utils": "^5.0.0",
21
+ "@spark-web/a11y": "^5.3.0",
22
+ "@spark-web/box": "^6.0.0",
23
+ "@spark-web/checkbox": "^5.1.0",
24
+ "@spark-web/icon": "^5.1.0",
25
+ "@spark-web/spinner": "^5.1.0",
26
+ "@spark-web/text": "^5.3.0",
27
+ "@spark-web/theme": "^5.13.0",
28
+ "@spark-web/utils": "^5.1.0",
29
29
  "@tanstack/react-table": "^8.14.0",
30
30
  "react-intersection-observer": "^9.8.2"
31
31
  },
32
32
  "devDependencies": {
33
- "@types/react": "^18.2.0",
34
- "react": "^18.2.0"
33
+ "@types/react": "^19.1.0",
34
+ "react": "^19.1.0"
35
35
  },
36
36
  "peerDependencies": {
37
- "react": ">=17.0.2"
37
+ "react": "^17.0.0 || ^18.0.0 || ^19.0.0"
38
38
  },
39
39
  "publishConfig": {
40
40
  "access": "public"