@digigov/react-core 2.2.3 → 2.2.4-govgr-3925.02-06-26-15-58

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,9 +1,17 @@
1
1
  # Change Log - @digigov/react-core
2
2
 
3
- <!-- This log was last generated on Thu, 28 May 2026 09:16:18 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Tue, 02 Jun 2026 15:58:15 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 2.2.4-govgr-3925.02-06-26-15-58
8
+
9
+ Tue, 02 Jun 2026 15:58:15 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - fix(libs-ui/TableDataCell): add a protective div to preserve cell-width when action positions absolute (cpapakon@admin.grnet.gr)
14
+
7
15
  ## 2.2.3
8
16
 
9
17
  Thu, 28 May 2026 09:16:18 GMT
@@ -45,6 +45,13 @@ export interface TableDataCellProps 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
+ isActionsCell?: boolean;
48
55
  }
49
56
  /**
50
57
  * Use TableDataCell inside the Table component to fill the data of a cell in a table.
@@ -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 TableDataCell_TableDataCell = /*#__PURE__*/ react.forwardRef(function({ dataType = 'text', variant = 'border', wordBreak = 'none', highlight, highlightAssistiveText, maxWidthWithOverflow = false, className, children, ...props }, ref) {
5
+ const TableDataCell_TableDataCell = /*#__PURE__*/ react.forwardRef(function({ dataType = 'text', variant = 'border', wordBreak = 'none', highlight, isActionsCell = false, 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",
@@ -14,7 +14,8 @@ const TableDataCell_TableDataCell = /*#__PURE__*/ react.forwardRef(function({ da
14
14
  'ds-table__cell--numeric': 'numeric' === dataType,
15
15
  'ds-table__cell--warning': 'warning' === highlight,
16
16
  'ds-table__cell--error': 'error' === highlight,
17
- 'ds-table__cell--max-w': true === maxWidthWithOverflow
17
+ 'ds-table__cell--max-w': true === maxWidthWithOverflow,
18
+ 'ds-table__cell--actions-cell-width': true === isActionsCell
18
19
  }),
19
20
  ...props
20
21
  }, maxWidthWithOverflow ? /*#__PURE__*/ react.createElement("div", {
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Digigov v2.2.3
1
+ /** @license Digigov v2.2.4-govgr-3925.02-06-26-15-58
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digigov/react-core",
3
- "version": "2.2.3",
3
+ "version": "2.2.4-govgr-3925.02-06-26-15-58",
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.2.3",
21
- "@digigov/react-icons": "2.2.3"
20
+ "@digigov/css": "2.2.4-govgr-3925.02-06-26-15-58",
21
+ "@digigov/react-icons": "2.2.4-govgr-3925.02-06-26-15-58"
22
22
  },
23
23
  "peerDependenciesMeta": {
24
24
  "react-native": {
@@ -52,6 +52,14 @@ export interface TableDataCellProps extends BaseProps<'td'> {
52
52
  * @default false
53
53
  */
54
54
  maxWidthWithOverflow?: boolean;
55
+
56
+ /**
57
+ * maxWidthWithOverflow is optional.
58
+ * 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.
59
+ * 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.
60
+ * @default false
61
+ */
62
+ isActionsCell?: boolean;
55
63
  }
56
64
  /**
57
65
  * Use TableDataCell inside the Table component to fill the data of a cell in a table.
@@ -65,6 +73,7 @@ export const TableDataCell = React.forwardRef<
65
73
  variant = 'border',
66
74
  wordBreak = 'none',
67
75
  highlight,
76
+ isActionsCell = false,
68
77
  highlightAssistiveText,
69
78
  maxWidthWithOverflow = false,
70
79
  className,
@@ -93,6 +102,7 @@ export const TableDataCell = React.forwardRef<
93
102
  'ds-table__cell--warning': highlight === 'warning',
94
103
  'ds-table__cell--error': highlight === 'error',
95
104
  'ds-table__cell--max-w': maxWidthWithOverflow === true,
105
+ 'ds-table__cell--actions-cell-width': isActionsCell === true,
96
106
  })}
97
107
  {...props}
98
108
  >