@canonical/react-components 3.4.1 → 3.4.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.
@@ -13,5 +13,10 @@ const visibleRowColumns = (rows, hiddenCols) => {
13
13
  });
14
14
  };
15
15
  exports.visibleRowColumns = visibleRowColumns;
16
- const visibleHeaderColumns = (headers, hiddenCols) => headers.filter(item => typeof item.content !== "string" || !hiddenCols.includes(item.content));
16
+ const visibleHeaderColumns = (headers, hiddenCols) => headers.filter(item => {
17
+ if (typeof item.content === "string") {
18
+ return !hiddenCols.includes(item.content);
19
+ }
20
+ return !hiddenCols.includes(item["aria-label"]);
21
+ });
17
22
  exports.visibleHeaderColumns = visibleHeaderColumns;
@@ -24,7 +24,7 @@ export type Props = PropsWithSpread<{
24
24
  /**
25
25
  * Optional class(es) to pass to the help text element.
26
26
  */
27
- helpClassName?: ReactNode;
27
+ helpClassName?: string;
28
28
  /**
29
29
  * The id of the input.
30
30
  */
@@ -90,7 +90,7 @@ const Input = _ref => {
90
90
  error: error,
91
91
  forId: inputId,
92
92
  help: help,
93
- helpClassName: helpClassName + "",
93
+ helpClassName: helpClassName,
94
94
  helpId: helpId,
95
95
  isTickElement: type === "checkbox" || type === "radio",
96
96
  label: fieldLabel,
@@ -10,4 +10,9 @@ export var visibleRowColumns = (rows, hiddenCols) => {
10
10
  });
11
11
  });
12
12
  };
13
- export var visibleHeaderColumns = (headers, hiddenCols) => headers.filter(item => typeof item.content !== "string" || !hiddenCols.includes(item.content));
13
+ export var visibleHeaderColumns = (headers, hiddenCols) => headers.filter(item => {
14
+ if (typeof item.content === "string") {
15
+ return !hiddenCols.includes(item.content);
16
+ }
17
+ return !hiddenCols.includes(item["aria-label"]);
18
+ });
@@ -24,7 +24,7 @@ export type Props = PropsWithSpread<{
24
24
  /**
25
25
  * Optional class(es) to pass to the help text element.
26
26
  */
27
- helpClassName?: ReactNode;
27
+ helpClassName?: string;
28
28
  /**
29
29
  * The id of the input.
30
30
  */
@@ -89,7 +89,7 @@ var Input = _ref => {
89
89
  error: error,
90
90
  forId: inputId,
91
91
  help: help,
92
- helpClassName: helpClassName + "",
92
+ helpClassName: helpClassName,
93
93
  helpId: helpId,
94
94
  isTickElement: type === "checkbox" || type === "radio",
95
95
  label: fieldLabel,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonical/react-components",
3
- "version": "3.4.1",
3
+ "version": "3.4.3",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "author": {
@@ -93,7 +93,7 @@
93
93
  "tsc-alias": "1.8.10",
94
94
  "typescript": "5.7.3",
95
95
  "typescript-eslint": "8.24.1",
96
- "vanilla-framework": "4.34.1",
96
+ "vanilla-framework": "4.35.0",
97
97
  "wait-on": "8.0.2",
98
98
  "webpack": "5.98.0"
99
99
  },