@sb1/ffe-tables-react 10.1.6 → 10.1.8

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.
@@ -40,7 +40,6 @@ export var TableRowExpandable = React.forwardRef(function (_a, ref) {
40
40
  if (!((_a = expandButtonRef.current) === null || _a === void 0 ? void 0 : _a.contains(e.target))) {
41
41
  (_b = expandButtonRef.current) === null || _b === void 0 ? void 0 : _b.click();
42
42
  }
43
- onClick === null || onClick === void 0 ? void 0 : onClick(e);
44
43
  }, ref: ref }, rest),
45
44
  children,
46
45
  React.createElement("td", null,
@@ -49,9 +48,10 @@ export var TableRowExpandable = React.forwardRef(function (_a, ref) {
49
48
  'ffe-table__expand-button--open': isOpen,
50
49
  }), ref: expandButtonRef, type: "button", "aria-label": isOpen
51
50
  ? txt[locale].showLess
52
- : txt[locale].showMore, "aria-controls": expandoRowId, "aria-expanded": isOpen, onClick: function () {
51
+ : txt[locale].showMore, "aria-controls": expandoRowId, "aria-expanded": isOpen, onClick: function (e) {
53
52
  setIsOpen(function (prev) { return !prev; });
54
53
  setIsAnimating(true);
54
+ onClick === null || onClick === void 0 ? void 0 : onClick(e);
55
55
  } },
56
56
  React.createElement(Icon, { fileUrl: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik00ODAtMzczLjUzOXEtNy4yMzEgMC0xMy40NjEtMi4zMDgtNi4yMzEtMi4zMDgtMTEuODQ2LTcuOTIzTDI3NC45MjQtNTYzLjUzOXEtOC4zMDgtOC4zMDctOC41LTIwLjg4NC0uMTkzLTEyLjU3NyA4LjUtMjEuMjY5IDguNjkyLTguNjkyIDIxLjA3Ni04LjY5MnQyMS4wNzYgOC42OTJMNDgwLTQ0Mi43NjhsMTYyLjkyNC0xNjIuOTI0cTguMzA3LTguMzA3IDIwLjg4NC04LjUgMTIuNTc2LS4xOTIgMjEuMjY4IDguNSA4LjY5MyA4LjY5MiA4LjY5MyAyMS4wNzcgMCAxMi4zODQtOC42OTMgMjEuMDc2TDUwNS4zMDctMzgzLjc3cS01LjYxNSA1LjYxNS0xMS44NDYgNy45MjMtNi4yMyAyLjMwOC0xMy40NjEgMi4zMDhaIi8+PC9zdmc+", size: "md" }))))),
57
57
  React.createElement("tr", { "aria-hidden": !isAnimating && !isOpen, id: expandoRowId },
@@ -69,7 +69,6 @@ exports.TableRowExpandable = react_1.default.forwardRef(function (_a, ref) {
69
69
  if (!((_a = expandButtonRef.current) === null || _a === void 0 ? void 0 : _a.contains(e.target))) {
70
70
  (_b = expandButtonRef.current) === null || _b === void 0 ? void 0 : _b.click();
71
71
  }
72
- onClick === null || onClick === void 0 ? void 0 : onClick(e);
73
72
  }, ref: ref }, rest),
74
73
  children,
75
74
  react_1.default.createElement("td", null,
@@ -78,9 +77,10 @@ exports.TableRowExpandable = react_1.default.forwardRef(function (_a, ref) {
78
77
  'ffe-table__expand-button--open': isOpen,
79
78
  }), ref: expandButtonRef, type: "button", "aria-label": isOpen
80
79
  ? texts_1.txt[locale].showLess
81
- : texts_1.txt[locale].showMore, "aria-controls": expandoRowId, "aria-expanded": isOpen, onClick: function () {
80
+ : texts_1.txt[locale].showMore, "aria-controls": expandoRowId, "aria-expanded": isOpen, onClick: function (e) {
82
81
  setIsOpen(function (prev) { return !prev; });
83
82
  setIsAnimating(true);
83
+ onClick === null || onClick === void 0 ? void 0 : onClick(e);
84
84
  } },
85
85
  react_1.default.createElement(ffe_icons_react_1.Icon, { fileUrl: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik00ODAtMzczLjUzOXEtNy4yMzEgMC0xMy40NjEtMi4zMDgtNi4yMzEtMi4zMDgtMTEuODQ2LTcuOTIzTDI3NC45MjQtNTYzLjUzOXEtOC4zMDgtOC4zMDctOC41LTIwLjg4NC0uMTkzLTEyLjU3NyA4LjUtMjEuMjY5IDguNjkyLTguNjkyIDIxLjA3Ni04LjY5MnQyMS4wNzYgOC42OTJMNDgwLTQ0Mi43NjhsMTYyLjkyNC0xNjIuOTI0cTguMzA3LTguMzA3IDIwLjg4NC04LjUgMTIuNTc2LS4xOTIgMjEuMjY4IDguNSA4LjY5MyA4LjY5MiA4LjY5MyAyMS4wNzcgMCAxMi4zODQtOC42OTMgMjEuMDc2TDUwNS4zMDctMzgzLjc3cS01LjYxNSA1LjYxNS0xMS44NDYgNy45MjMtNi4yMyAyLjMwOC0xMy40NjEgMi4zMDhaIi8+PC9zdmc+", size: "md" }))))),
86
86
  react_1.default.createElement("tr", { "aria-hidden": !isAnimating && !isOpen, id: expandoRowId },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-tables-react",
3
- "version": "10.1.6",
3
+ "version": "10.1.8",
4
4
  "description": "React implementation of ffe-tables",
5
5
  "license": "MIT",
6
6
  "author": "SpareBank 1",
@@ -26,13 +26,13 @@
26
26
  "test:watch": "ffe-buildtool jest --watch"
27
27
  },
28
28
  "dependencies": {
29
- "@sb1/ffe-collapse-react": "^5.0.5",
30
- "@sb1/ffe-icons-react": "^11.0.2",
31
- "@sb1/ffe-tables": "^15.0.5",
29
+ "@sb1/ffe-collapse-react": "^5.0.6",
30
+ "@sb1/ffe-icons-react": "^11.0.3",
31
+ "@sb1/ffe-tables": "^16.0.0",
32
32
  "classnames": "^2.3.1"
33
33
  },
34
34
  "devDependencies": {
35
- "@sb1/ffe-buildtool": "^0.7.1",
35
+ "@sb1/ffe-buildtool": "^0.8.0",
36
36
  "react": "^18.2.0",
37
37
  "react-dom": "^18.2.0"
38
38
  },
@@ -42,5 +42,5 @@
42
42
  "publishConfig": {
43
43
  "access": "public"
44
44
  },
45
- "gitHead": "831354c828a1fcd6fb4b4e6c561dfe3068dce76e"
45
+ "gitHead": "98d33cf2e867ce718139edf1adf97336b8da6b68"
46
46
  }
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
- export interface TableRowExpandableProps extends React.ComponentPropsWithoutRef<'tr'> {
2
+ export interface TableRowExpandableProps extends Omit<React.ComponentPropsWithoutRef<'tr'>, 'onClick'> {
3
3
  expandContent: React.ReactNode;
4
4
  locale?: 'nb' | 'nn' | 'en';
5
5
  isDefaultOpen?: boolean;
6
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
6
7
  }
7
8
  export declare const TableRowExpandable: React.ForwardRefExoticComponent<TableRowExpandableProps & React.RefAttributes<HTMLTableRowElement>>;