@digigov/react-core 2.4.1-govgr-4710.09-06-26-20-50 → 2.4.1
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 -9
- package/{TableDataCellBase → TableDataCell}/index.d.ts +3 -17
- package/{TableDataCellBase → TableDataCell}/index.js +3 -3
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/lazy.d.ts +1 -1
- package/lazy.js +2 -2
- package/package.json +3 -3
- package/registry.d.ts +2 -2
- package/registry.js +4 -4
- package/src/{TableDataCellBase → TableDataCell}/index.test.tsx +7 -9
- package/src/{TableDataCellBase → TableDataCell}/index.tsx +4 -22
- package/src/index.ts +1 -1
- package/src/lazy.ts +1 -1
- package/src/registry.ts +4 -4
- /package/src/{TableDataCellBase → TableDataCell}/__snapshots__/index.test.tsx.snap +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
# Change Log - @digigov/react-core
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Fri, 05 Jun 2026 08:02:15 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## 2.4.1-govgr-4710.09-06-26-20-50
|
|
8
|
-
|
|
9
|
-
Tue, 09 Jun 2026 20:50:17 GMT
|
|
10
|
-
|
|
11
|
-
### Patches
|
|
12
|
-
|
|
13
|
-
- Reaname TableDataCell to TableDataCellBase, add preserveCellWidth prop (gpapadakis@admin.grnet.gr)
|
|
14
|
-
|
|
15
7
|
## 2.4.0
|
|
16
8
|
|
|
17
9
|
Fri, 05 Jun 2026 08:02:15 GMT
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BaseProps } from '../Base/index.js';
|
|
3
|
-
export interface
|
|
3
|
+
export interface TableDataCellProps extends BaseProps<'td'> {
|
|
4
4
|
/**
|
|
5
5
|
* dataType is optional.
|
|
6
6
|
* Use numeric value when comparing columns of numbers, align the numbers to the right in table cells
|
|
@@ -45,23 +45,9 @@ export interface TableDataCellBaseProps extends BaseProps<'td'> {
|
|
|
45
45
|
* @default false
|
|
46
46
|
*/
|
|
47
47
|
maxWidthWithOverflow?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* maxWidthWithOverflow is optional.
|
|
50
|
-
* Use this prop to add an invisible element that has the same width as the cell content to preserve the cell width when the content is positioned absolute.
|
|
51
|
-
* This is useful in cells that contain for example action dropdowns (see dilosi) to prevent the table from collapsing the cell width when the dropdown is open.
|
|
52
|
-
* @default false
|
|
53
|
-
*/
|
|
54
|
-
preserveCellWidth?: boolean;
|
|
55
|
-
/**
|
|
56
|
-
* cellUniqueId is optional.
|
|
57
|
-
* Use this prop to add an id to the cell.
|
|
58
|
-
* This is useful in cells that contain for example action dropdowns (see dilosi) to prevent the table from collapsing the cell width when the dropdown is open.
|
|
59
|
-
* @default undefined
|
|
60
|
-
*/
|
|
61
|
-
cellUniqueId?: string;
|
|
62
48
|
}
|
|
63
49
|
/**
|
|
64
50
|
* Use TableDataCell inside the Table component to fill the data of a cell in a table.
|
|
65
51
|
*/
|
|
66
|
-
export declare const
|
|
67
|
-
export default
|
|
52
|
+
export declare const TableDataCell: React.ForwardRefExoticComponent<Omit<TableDataCellProps, "ref"> & React.RefAttributes<HTMLTableCellElement>>;
|
|
53
|
+
export default TableDataCell;
|
|
@@ -2,7 +2,7 @@ import react from "react";
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import Base from "../Base/index.js";
|
|
4
4
|
import VisuallyHidden from "../VisuallyHidden/index.js";
|
|
5
|
-
const
|
|
5
|
+
const TableDataCell_TableDataCell = /*#__PURE__*/ react.forwardRef(function({ dataType = 'text', variant = 'border', wordBreak = 'none', highlight, highlightAssistiveText, maxWidthWithOverflow = false, className, children, ...props }, ref) {
|
|
6
6
|
const calculatedHighlightAssistiveText = highlightAssistiveText || ('warning' === highlight ? 'Προσοχή' : 'error' === highlight ? 'Λανθασμένο πεδίο' : void 0);
|
|
7
7
|
return /*#__PURE__*/ react.createElement(Base, {
|
|
8
8
|
as: "td",
|
|
@@ -21,5 +21,5 @@ const TableDataCellBase = /*#__PURE__*/ react.forwardRef(function({ dataType = '
|
|
|
21
21
|
className: "ds-table__cell__content"
|
|
22
22
|
}, calculatedHighlightAssistiveText && /*#__PURE__*/ react.createElement(VisuallyHidden, null, calculatedHighlightAssistiveText), children) : /*#__PURE__*/ react.createElement(react.Fragment, null, calculatedHighlightAssistiveText && /*#__PURE__*/ react.createElement(VisuallyHidden, null, calculatedHighlightAssistiveText), children));
|
|
23
23
|
});
|
|
24
|
-
const
|
|
25
|
-
export {
|
|
24
|
+
const src_TableDataCell = TableDataCell_TableDataCell;
|
|
25
|
+
export { TableDataCell_TableDataCell as TableDataCell, src_TableDataCell as default };
|
package/index.d.ts
CHANGED
|
@@ -127,7 +127,7 @@ export * from './Table/index.js';
|
|
|
127
127
|
export * from './TableBody/index.js';
|
|
128
128
|
export * from './TableCaption/index.js';
|
|
129
129
|
export * from './TableContainer/index.js';
|
|
130
|
-
export * from './
|
|
130
|
+
export * from './TableDataCell/index.js';
|
|
131
131
|
export * from './TableNoDataRow/index.js';
|
|
132
132
|
export * from './TableHead/index.js';
|
|
133
133
|
export * from './TableHeadCell/index.js';
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license Digigov v2.4.1
|
|
1
|
+
/** @license Digigov v2.4.1
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the BSD-2-Clause license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -131,7 +131,7 @@ export * from "./Table/index.js";
|
|
|
131
131
|
export * from "./TableBody/index.js";
|
|
132
132
|
export * from "./TableCaption/index.js";
|
|
133
133
|
export * from "./TableContainer/index.js";
|
|
134
|
-
export * from "./
|
|
134
|
+
export * from "./TableDataCell/index.js";
|
|
135
135
|
export * from "./TableNoDataRow/index.js";
|
|
136
136
|
export * from "./TableHead/index.js";
|
|
137
137
|
export * from "./TableHeadCell/index.js";
|
package/lazy.d.ts
CHANGED
|
@@ -127,7 +127,7 @@ declare const _default: {
|
|
|
127
127
|
TableBody: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<Omit<import("./TableBody/index.js").TableBodyProps, "ref"> & import("react").RefAttributes<HTMLTableSectionElement>>>;
|
|
128
128
|
TableCaption: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<Omit<import("./TableCaption/index.js").TableCaptionProps, "ref"> & import("react").RefAttributes<HTMLElement>>>;
|
|
129
129
|
TableContainer: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<Omit<import("./TableContainer/index.js").TableContainerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
130
|
-
|
|
130
|
+
TableDataCell: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<Omit<import("./TableDataCell/index.js").TableDataCellProps, "ref"> & import("react").RefAttributes<HTMLTableCellElement>>>;
|
|
131
131
|
TableNoDataRow: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<Omit<import("./TableNoDataRow/index.js").TableNoDataRowProps, "ref"> & import("react").RefAttributes<HTMLTableCellElement>>>;
|
|
132
132
|
TableHead: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<Omit<import("./TableHead/index.js").TableHeadProps, "ref"> & import("react").RefAttributes<HTMLTableSectionElement>>>;
|
|
133
133
|
TableHeadCell: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<Omit<import("./TableHeadCell/index.js").TableHeadCellProps, "ref"> & import("react").RefAttributes<HTMLTableCellElement>>>;
|
package/lazy.js
CHANGED
|
@@ -384,8 +384,8 @@ const src_lazy = {
|
|
|
384
384
|
TableContainer: lazy(()=>import("./TableContainer/index.js").then((module)=>({
|
|
385
385
|
default: module['TableContainer']
|
|
386
386
|
}))),
|
|
387
|
-
|
|
388
|
-
default: module['
|
|
387
|
+
TableDataCell: lazy(()=>import("./TableDataCell/index.js").then((module)=>({
|
|
388
|
+
default: module['TableDataCell']
|
|
389
389
|
}))),
|
|
390
390
|
TableNoDataRow: lazy(()=>import("./TableNoDataRow/index.js").then((module)=>({
|
|
391
391
|
default: module['TableNoDataRow']
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digigov/react-core",
|
|
3
|
-
"version": "2.4.1
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "@digigov react core components",
|
|
5
5
|
"author": "GRNET Developers <devs@lists.grnet.gr>",
|
|
6
6
|
"license": "BSD-2-Clause",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"react-native-svg": "^15.2.0",
|
|
18
18
|
"expo-router": "^3.5.14",
|
|
19
19
|
"nativewind": "^4.1.1",
|
|
20
|
-
"@digigov/css": "2.4.1
|
|
21
|
-
"@digigov/react-icons": "2.4.1
|
|
20
|
+
"@digigov/css": "2.4.1",
|
|
21
|
+
"@digigov/react-icons": "2.4.1"
|
|
22
22
|
},
|
|
23
23
|
"peerDependenciesMeta": {
|
|
24
24
|
"react-native": {
|
package/registry.d.ts
CHANGED
|
@@ -113,10 +113,10 @@ declare const _default: {
|
|
|
113
113
|
'@digigov/react-core/FooterNavigationSection': {};
|
|
114
114
|
'@digigov/react-core/Form': {};
|
|
115
115
|
'@digigov/react-core/FullPageBackground': {};
|
|
116
|
-
'@digigov/react-core/Grid': {};
|
|
117
116
|
'@digigov/react-core/GovGRLogoBase/govgr-logo-base64': {};
|
|
118
117
|
'@digigov/react-core/GovGRLogoBase/govgr-logo-blue-base64': {};
|
|
119
118
|
'@digigov/react-core/GovGRLogoBase': {};
|
|
119
|
+
'@digigov/react-core/Grid': {};
|
|
120
120
|
'@digigov/react-core/Header': {};
|
|
121
121
|
'@digigov/react-core/HeaderContent': {};
|
|
122
122
|
'@digigov/react-core/HeaderLogoBase': {};
|
|
@@ -231,7 +231,7 @@ declare const _default: {
|
|
|
231
231
|
'@digigov/react-core/TableBody': {};
|
|
232
232
|
'@digigov/react-core/TableCaption': {};
|
|
233
233
|
'@digigov/react-core/TableContainer': {};
|
|
234
|
-
'@digigov/react-core/
|
|
234
|
+
'@digigov/react-core/TableDataCell': {};
|
|
235
235
|
'@digigov/react-core/TableHead': {};
|
|
236
236
|
'@digigov/react-core/TableHeadCell': {};
|
|
237
237
|
'@digigov/react-core/TableLoaderBackground': {};
|
package/registry.js
CHANGED
|
@@ -112,10 +112,10 @@ import * as __WEBPACK_EXTERNAL_MODULE__FooterNavigation_index_js_e511ad08__ from
|
|
|
112
112
|
import * as __WEBPACK_EXTERNAL_MODULE__FooterNavigationSection_index_js_a1485485__ from "./FooterNavigationSection/index.js";
|
|
113
113
|
import * as __WEBPACK_EXTERNAL_MODULE__Form_index_js_5b9f56e0__ from "./Form/index.js";
|
|
114
114
|
import * as __WEBPACK_EXTERNAL_MODULE__FullPageBackground_index_js_2fe91d97__ from "./FullPageBackground/index.js";
|
|
115
|
-
import * as __WEBPACK_EXTERNAL_MODULE__Grid_index_js_46714793__ from "./Grid/index.js";
|
|
116
115
|
import * as __WEBPACK_EXTERNAL_MODULE__GovGRLogoBase_govgr_logo_base64_js_0b089d3c__ from "./GovGRLogoBase/govgr-logo-base64.js";
|
|
117
116
|
import * as __WEBPACK_EXTERNAL_MODULE__GovGRLogoBase_govgr_logo_blue_base64_js_e895c898__ from "./GovGRLogoBase/govgr-logo-blue-base64.js";
|
|
118
117
|
import * as __WEBPACK_EXTERNAL_MODULE__GovGRLogoBase_index_js_26a7b641__ from "./GovGRLogoBase/index.js";
|
|
118
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Grid_index_js_46714793__ from "./Grid/index.js";
|
|
119
119
|
import * as __WEBPACK_EXTERNAL_MODULE__Header_index_js_f600c2c8__ from "./Header/index.js";
|
|
120
120
|
import * as __WEBPACK_EXTERNAL_MODULE__HeaderContent_index_js_c6c0ba83__ from "./HeaderContent/index.js";
|
|
121
121
|
import * as __WEBPACK_EXTERNAL_MODULE__HeaderLogoBase_index_js_631f88e9__ from "./HeaderLogoBase/index.js";
|
|
@@ -230,7 +230,7 @@ import * as __WEBPACK_EXTERNAL_MODULE__Table_index_js_7fc944c8__ from "./Table/i
|
|
|
230
230
|
import * as __WEBPACK_EXTERNAL_MODULE__TableBody_index_js_3a5e6dcd__ from "./TableBody/index.js";
|
|
231
231
|
import * as __WEBPACK_EXTERNAL_MODULE__TableCaption_index_js_9e4d1681__ from "./TableCaption/index.js";
|
|
232
232
|
import * as __WEBPACK_EXTERNAL_MODULE__TableContainer_index_js_d11f2c53__ from "./TableContainer/index.js";
|
|
233
|
-
import * as
|
|
233
|
+
import * as __WEBPACK_EXTERNAL_MODULE__TableDataCell_index_js_cd52ffdb__ from "./TableDataCell/index.js";
|
|
234
234
|
import * as __WEBPACK_EXTERNAL_MODULE__TableHead_index_js_3b445169__ from "./TableHead/index.js";
|
|
235
235
|
import * as __WEBPACK_EXTERNAL_MODULE__TableHeadCell_index_js_329ce8cf__ from "./TableHeadCell/index.js";
|
|
236
236
|
import * as __WEBPACK_EXTERNAL_MODULE__TableLoaderBackground_index_js_70d44157__ from "./TableLoaderBackground/index.js";
|
|
@@ -386,10 +386,10 @@ const registry = {
|
|
|
386
386
|
'@digigov/react-core/FooterNavigationSection': lazyImport(__WEBPACK_EXTERNAL_MODULE__FooterNavigationSection_index_js_a1485485__),
|
|
387
387
|
'@digigov/react-core/Form': lazyImport(__WEBPACK_EXTERNAL_MODULE__Form_index_js_5b9f56e0__),
|
|
388
388
|
'@digigov/react-core/FullPageBackground': lazyImport(__WEBPACK_EXTERNAL_MODULE__FullPageBackground_index_js_2fe91d97__),
|
|
389
|
-
'@digigov/react-core/Grid': lazyImport(__WEBPACK_EXTERNAL_MODULE__Grid_index_js_46714793__),
|
|
390
389
|
'@digigov/react-core/GovGRLogoBase/govgr-logo-base64': lazyImport(__WEBPACK_EXTERNAL_MODULE__GovGRLogoBase_govgr_logo_base64_js_0b089d3c__),
|
|
391
390
|
'@digigov/react-core/GovGRLogoBase/govgr-logo-blue-base64': lazyImport(__WEBPACK_EXTERNAL_MODULE__GovGRLogoBase_govgr_logo_blue_base64_js_e895c898__),
|
|
392
391
|
'@digigov/react-core/GovGRLogoBase': lazyImport(__WEBPACK_EXTERNAL_MODULE__GovGRLogoBase_index_js_26a7b641__),
|
|
392
|
+
'@digigov/react-core/Grid': lazyImport(__WEBPACK_EXTERNAL_MODULE__Grid_index_js_46714793__),
|
|
393
393
|
'@digigov/react-core/Header': lazyImport(__WEBPACK_EXTERNAL_MODULE__Header_index_js_f600c2c8__),
|
|
394
394
|
'@digigov/react-core/HeaderContent': lazyImport(__WEBPACK_EXTERNAL_MODULE__HeaderContent_index_js_c6c0ba83__),
|
|
395
395
|
'@digigov/react-core/HeaderLogoBase': lazyImport(__WEBPACK_EXTERNAL_MODULE__HeaderLogoBase_index_js_631f88e9__),
|
|
@@ -504,7 +504,7 @@ const registry = {
|
|
|
504
504
|
'@digigov/react-core/TableBody': lazyImport(__WEBPACK_EXTERNAL_MODULE__TableBody_index_js_3a5e6dcd__),
|
|
505
505
|
'@digigov/react-core/TableCaption': lazyImport(__WEBPACK_EXTERNAL_MODULE__TableCaption_index_js_9e4d1681__),
|
|
506
506
|
'@digigov/react-core/TableContainer': lazyImport(__WEBPACK_EXTERNAL_MODULE__TableContainer_index_js_d11f2c53__),
|
|
507
|
-
'@digigov/react-core/
|
|
507
|
+
'@digigov/react-core/TableDataCell': lazyImport(__WEBPACK_EXTERNAL_MODULE__TableDataCell_index_js_cd52ffdb__),
|
|
508
508
|
'@digigov/react-core/TableHead': lazyImport(__WEBPACK_EXTERNAL_MODULE__TableHead_index_js_3b445169__),
|
|
509
509
|
'@digigov/react-core/TableHeadCell': lazyImport(__WEBPACK_EXTERNAL_MODULE__TableHeadCell_index_js_329ce8cf__),
|
|
510
510
|
'@digigov/react-core/TableLoaderBackground': lazyImport(__WEBPACK_EXTERNAL_MODULE__TableLoaderBackground_index_js_70d44157__),
|
|
@@ -3,7 +3,7 @@ import { render } from '@testing-library/react';
|
|
|
3
3
|
|
|
4
4
|
import Table from '@digigov/react-core/Table';
|
|
5
5
|
import TableBody from '@digigov/react-core/TableBody';
|
|
6
|
-
import
|
|
6
|
+
import TableDataCell from '@digigov/react-core/TableDataCell';
|
|
7
7
|
import TableRow from '@digigov/react-core/TableRow';
|
|
8
8
|
|
|
9
9
|
it('renders the Table with no props', () => {
|
|
@@ -12,7 +12,7 @@ it('renders the Table with no props', () => {
|
|
|
12
12
|
<Table>
|
|
13
13
|
<TableBody>
|
|
14
14
|
<TableRow>
|
|
15
|
-
<
|
|
15
|
+
<TableDataCell>hello</TableDataCell>
|
|
16
16
|
</TableRow>
|
|
17
17
|
</TableBody>
|
|
18
18
|
</Table>
|
|
@@ -26,7 +26,7 @@ it('renders the Table with dataType numeric prop', () => {
|
|
|
26
26
|
<Table>
|
|
27
27
|
<TableBody>
|
|
28
28
|
<TableRow>
|
|
29
|
-
<
|
|
29
|
+
<TableDataCell dataType="numeric">hello</TableDataCell>
|
|
30
30
|
</TableRow>
|
|
31
31
|
</TableBody>
|
|
32
32
|
</Table>
|
|
@@ -40,7 +40,7 @@ it('renders the Table with variant border prop', () => {
|
|
|
40
40
|
<Table>
|
|
41
41
|
<TableBody>
|
|
42
42
|
<TableRow>
|
|
43
|
-
<
|
|
43
|
+
<TableDataCell variant="border">hello</TableDataCell>
|
|
44
44
|
</TableRow>
|
|
45
45
|
</TableBody>
|
|
46
46
|
</Table>
|
|
@@ -54,7 +54,7 @@ it('renders the Table with wordBreak break-all prop', () => {
|
|
|
54
54
|
<Table>
|
|
55
55
|
<TableBody>
|
|
56
56
|
<TableRow>
|
|
57
|
-
<
|
|
57
|
+
<TableDataCell wordBreak="break-all">hello</TableDataCell>
|
|
58
58
|
</TableRow>
|
|
59
59
|
</TableBody>
|
|
60
60
|
</Table>
|
|
@@ -68,7 +68,7 @@ it('renders the Table with highlight warning prop', () => {
|
|
|
68
68
|
<Table>
|
|
69
69
|
<TableBody>
|
|
70
70
|
<TableRow>
|
|
71
|
-
<
|
|
71
|
+
<TableDataCell highlight="warning">hello</TableDataCell>
|
|
72
72
|
</TableRow>
|
|
73
73
|
</TableBody>
|
|
74
74
|
</Table>
|
|
@@ -81,9 +81,7 @@ it('renders the Table with maxWidthWithOverflow prop', () => {
|
|
|
81
81
|
<Table>
|
|
82
82
|
<TableBody>
|
|
83
83
|
<TableRow>
|
|
84
|
-
<
|
|
85
|
-
hello
|
|
86
|
-
</TableDataCellBase>
|
|
84
|
+
<TableDataCell maxWidthWithOverflow={true}>hello</TableDataCell>
|
|
87
85
|
</TableRow>
|
|
88
86
|
</TableBody>
|
|
89
87
|
</Table>
|
|
@@ -4,7 +4,7 @@ import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
|
4
4
|
import VisuallyHidden from '@digigov/react-core/VisuallyHidden';
|
|
5
5
|
// import PhaseBannerTag from '@digigov/react-core/PhaseBannerTag';
|
|
6
6
|
|
|
7
|
-
export interface
|
|
7
|
+
export interface TableDataCellProps extends BaseProps<'td'> {
|
|
8
8
|
/**
|
|
9
9
|
* dataType is optional.
|
|
10
10
|
* Use numeric value when comparing columns of numbers, align the numbers to the right in table cells
|
|
@@ -52,28 +52,13 @@ export interface TableDataCellBaseProps extends BaseProps<'td'> {
|
|
|
52
52
|
* @default false
|
|
53
53
|
*/
|
|
54
54
|
maxWidthWithOverflow?: boolean;
|
|
55
|
-
/**
|
|
56
|
-
* maxWidthWithOverflow is optional.
|
|
57
|
-
* Use this prop to add an invisible element that has the same width as the cell content to preserve the cell width when the content is positioned absolute.
|
|
58
|
-
* This is useful in cells that contain for example action dropdowns (see dilosi) to prevent the table from collapsing the cell width when the dropdown is open.
|
|
59
|
-
* @default false
|
|
60
|
-
*/
|
|
61
|
-
preserveCellWidth?: boolean;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* cellUniqueId is optional.
|
|
65
|
-
* Use this prop to add an id to the cell.
|
|
66
|
-
* This is useful in cells that contain for example action dropdowns (see dilosi) to prevent the table from collapsing the cell width when the dropdown is open.
|
|
67
|
-
* @default undefined
|
|
68
|
-
*/
|
|
69
|
-
cellUniqueId?: string;
|
|
70
55
|
}
|
|
71
56
|
/**
|
|
72
57
|
* Use TableDataCell inside the Table component to fill the data of a cell in a table.
|
|
73
58
|
*/
|
|
74
|
-
export const
|
|
59
|
+
export const TableDataCell = React.forwardRef<
|
|
75
60
|
HTMLTableCellElement,
|
|
76
|
-
|
|
61
|
+
TableDataCellProps
|
|
77
62
|
>(function TableDataCell(
|
|
78
63
|
{
|
|
79
64
|
dataType = 'text',
|
|
@@ -82,10 +67,8 @@ export const TableDataCellBase = React.forwardRef<
|
|
|
82
67
|
highlight,
|
|
83
68
|
highlightAssistiveText,
|
|
84
69
|
maxWidthWithOverflow = false,
|
|
85
|
-
|
|
86
70
|
className,
|
|
87
71
|
children,
|
|
88
|
-
|
|
89
72
|
...props
|
|
90
73
|
},
|
|
91
74
|
ref
|
|
@@ -125,7 +108,6 @@ export const TableDataCellBase = React.forwardRef<
|
|
|
125
108
|
{calculatedHighlightAssistiveText && (
|
|
126
109
|
<VisuallyHidden>{calculatedHighlightAssistiveText}</VisuallyHidden>
|
|
127
110
|
)}
|
|
128
|
-
|
|
129
111
|
{children}
|
|
130
112
|
</>
|
|
131
113
|
)}
|
|
@@ -133,4 +115,4 @@ export const TableDataCellBase = React.forwardRef<
|
|
|
133
115
|
);
|
|
134
116
|
});
|
|
135
117
|
|
|
136
|
-
export default
|
|
118
|
+
export default TableDataCell;
|
package/src/index.ts
CHANGED
|
@@ -127,7 +127,7 @@ export * from '@digigov/react-core/Table';
|
|
|
127
127
|
export * from '@digigov/react-core/TableBody';
|
|
128
128
|
export * from '@digigov/react-core/TableCaption';
|
|
129
129
|
export * from '@digigov/react-core/TableContainer';
|
|
130
|
-
export * from '@digigov/react-core/
|
|
130
|
+
export * from '@digigov/react-core/TableDataCell';
|
|
131
131
|
export * from '@digigov/react-core/TableNoDataRow';
|
|
132
132
|
export * from '@digigov/react-core/TableHead';
|
|
133
133
|
export * from '@digigov/react-core/TableHeadCell';
|
package/src/lazy.ts
CHANGED
|
@@ -128,7 +128,7 @@ export default {
|
|
|
128
128
|
'TableBody': lazy(() => import('@digigov/react-core/TableBody').then((module) => ({ default: module['TableBody'] }))),
|
|
129
129
|
'TableCaption': lazy(() => import('@digigov/react-core/TableCaption').then((module) => ({ default: module['TableCaption'] }))),
|
|
130
130
|
'TableContainer': lazy(() => import('@digigov/react-core/TableContainer').then((module) => ({ default: module['TableContainer'] }))),
|
|
131
|
-
'
|
|
131
|
+
'TableDataCell': lazy(() => import('@digigov/react-core/TableDataCell').then((module) => ({ default: module['TableDataCell'] }))),
|
|
132
132
|
'TableNoDataRow': lazy(() => import('@digigov/react-core/TableNoDataRow').then((module) => ({ default: module['TableNoDataRow'] }))),
|
|
133
133
|
'TableHead': lazy(() => import('@digigov/react-core/TableHead').then((module) => ({ default: module['TableHead'] }))),
|
|
134
134
|
'TableHeadCell': lazy(() => import('@digigov/react-core/TableHeadCell').then((module) => ({ default: module['TableHeadCell'] }))),
|
package/src/registry.ts
CHANGED
|
@@ -113,10 +113,10 @@ import * as _digigov_react_core_FooterNavigation from "@digigov/react-core/Foote
|
|
|
113
113
|
import * as _digigov_react_core_FooterNavigationSection from "@digigov/react-core/FooterNavigationSection";
|
|
114
114
|
import * as _digigov_react_core_Form from "@digigov/react-core/Form";
|
|
115
115
|
import * as _digigov_react_core_FullPageBackground from "@digigov/react-core/FullPageBackground";
|
|
116
|
-
import * as _digigov_react_core_Grid from "@digigov/react-core/Grid";
|
|
117
116
|
import * as _digigov_react_core_GovGRLogoBase_govgr_logo_base64 from "@digigov/react-core/GovGRLogoBase/govgr-logo-base64";
|
|
118
117
|
import * as _digigov_react_core_GovGRLogoBase_govgr_logo_blue_base64 from "@digigov/react-core/GovGRLogoBase/govgr-logo-blue-base64";
|
|
119
118
|
import * as _digigov_react_core_GovGRLogoBase from "@digigov/react-core/GovGRLogoBase";
|
|
119
|
+
import * as _digigov_react_core_Grid from "@digigov/react-core/Grid";
|
|
120
120
|
import * as _digigov_react_core_Header from "@digigov/react-core/Header";
|
|
121
121
|
import * as _digigov_react_core_HeaderContent from "@digigov/react-core/HeaderContent";
|
|
122
122
|
import * as _digigov_react_core_HeaderLogoBase from "@digigov/react-core/HeaderLogoBase";
|
|
@@ -231,7 +231,7 @@ import * as _digigov_react_core_Table from "@digigov/react-core/Table";
|
|
|
231
231
|
import * as _digigov_react_core_TableBody from "@digigov/react-core/TableBody";
|
|
232
232
|
import * as _digigov_react_core_TableCaption from "@digigov/react-core/TableCaption";
|
|
233
233
|
import * as _digigov_react_core_TableContainer from "@digigov/react-core/TableContainer";
|
|
234
|
-
import * as
|
|
234
|
+
import * as _digigov_react_core_TableDataCell from "@digigov/react-core/TableDataCell";
|
|
235
235
|
import * as _digigov_react_core_TableHead from "@digigov/react-core/TableHead";
|
|
236
236
|
import * as _digigov_react_core_TableHeadCell from "@digigov/react-core/TableHeadCell";
|
|
237
237
|
import * as _digigov_react_core_TableLoaderBackground from "@digigov/react-core/TableLoaderBackground";
|
|
@@ -396,10 +396,10 @@ export default {
|
|
|
396
396
|
'@digigov/react-core/FooterNavigationSection': lazyImport(_digigov_react_core_FooterNavigationSection),
|
|
397
397
|
'@digigov/react-core/Form': lazyImport(_digigov_react_core_Form),
|
|
398
398
|
'@digigov/react-core/FullPageBackground': lazyImport(_digigov_react_core_FullPageBackground),
|
|
399
|
-
'@digigov/react-core/Grid': lazyImport(_digigov_react_core_Grid),
|
|
400
399
|
'@digigov/react-core/GovGRLogoBase/govgr-logo-base64': lazyImport(_digigov_react_core_GovGRLogoBase_govgr_logo_base64),
|
|
401
400
|
'@digigov/react-core/GovGRLogoBase/govgr-logo-blue-base64': lazyImport(_digigov_react_core_GovGRLogoBase_govgr_logo_blue_base64),
|
|
402
401
|
'@digigov/react-core/GovGRLogoBase': lazyImport(_digigov_react_core_GovGRLogoBase),
|
|
402
|
+
'@digigov/react-core/Grid': lazyImport(_digigov_react_core_Grid),
|
|
403
403
|
'@digigov/react-core/Header': lazyImport(_digigov_react_core_Header),
|
|
404
404
|
'@digigov/react-core/HeaderContent': lazyImport(_digigov_react_core_HeaderContent),
|
|
405
405
|
'@digigov/react-core/HeaderLogoBase': lazyImport(_digigov_react_core_HeaderLogoBase),
|
|
@@ -514,7 +514,7 @@ export default {
|
|
|
514
514
|
'@digigov/react-core/TableBody': lazyImport(_digigov_react_core_TableBody),
|
|
515
515
|
'@digigov/react-core/TableCaption': lazyImport(_digigov_react_core_TableCaption),
|
|
516
516
|
'@digigov/react-core/TableContainer': lazyImport(_digigov_react_core_TableContainer),
|
|
517
|
-
'@digigov/react-core/
|
|
517
|
+
'@digigov/react-core/TableDataCell': lazyImport(_digigov_react_core_TableDataCell),
|
|
518
518
|
'@digigov/react-core/TableHead': lazyImport(_digigov_react_core_TableHead),
|
|
519
519
|
'@digigov/react-core/TableHeadCell': lazyImport(_digigov_react_core_TableHeadCell),
|
|
520
520
|
'@digigov/react-core/TableLoaderBackground': lazyImport(_digigov_react_core_TableLoaderBackground),
|
|
File without changes
|