@paygreen/pgui 2.1.0 → 2.1.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/dist/cjs/index.js CHANGED
@@ -2945,13 +2945,11 @@ var ActionsButton = react$1.forwardRef(function (_a, ref) {
2945
2945
  });
2946
2946
  ActionsButton.displayName = 'ActionsButton';
2947
2947
 
2948
- // TODO: DataListcontext
2949
- // type DataListContextValue = {
2950
- // setColumns: React.Dispatch<React.SetStateAction<DataListColumns>>;
2951
- // columns: DataListColumns;
2952
- // isHover: boolean;
2953
- // };
2954
- var DataListContext = React.createContext({});
2948
+ var DataListContext = React.createContext({
2949
+ setColumns: function () { },
2950
+ columns: {},
2951
+ isHover: false
2952
+ });
2955
2953
  var DataListHeaderContext = React.createContext(false);
2956
2954
  var DataListCell = function (_a) {
2957
2955
  var _b, _c;
@@ -2969,9 +2967,9 @@ var DataListCell = function (_a) {
2969
2967
  }
2970
2968
  }, [isInHeader, colName, colWidth, isVisible, setColumns]);
2971
2969
  var headerProps = !isInHeader ? (_b = columns === null || columns === void 0 ? void 0 : columns[colName !== null && colName !== void 0 ? colName : '']) !== null && _b !== void 0 ? _b : {} : {};
2972
- var _g = __assign$1(__assign$1({ colWidth: colWidth, isVisible: isVisible }, headerProps), rest), _h = _g.isVisible, _isVisible = _h === void 0 ? true : _h, _j = _g.colWidth, _colWidth = _j === void 0 ? true : _j, cellProps = __rest$1(_g, ["isVisible", "colWidth"]);
2973
- var showCell = react$1.useBreakpointValue(typeof _isVisible === 'object' ? _isVisible : { base: _isVisible });
2974
- var cellWidth = (_c = react$1.useBreakpointValue(typeof _colWidth === 'object' ? _colWidth : { base: _colWidth })) !== null && _c !== void 0 ? _c : 0;
2970
+ var _g = __assign$1(__assign$1({ colWidth: colWidth, isVisible: isVisible }, headerProps), rest), _h = _g.isVisible, isCellVisible = _h === void 0 ? true : _h, _j = _g.colWidth, columnWidth = _j === void 0 ? true : _j, cellProps = __rest$1(_g, ["isVisible", "colWidth"]);
2971
+ var showCell = react$1.useBreakpointValue(typeof isCellVisible === 'object' ? isCellVisible : { base: isCellVisible });
2972
+ var cellWidth = (_c = react$1.useBreakpointValue(typeof columnWidth === 'object' ? columnWidth : { base: columnWidth })) !== null && _c !== void 0 ? _c : 0;
2975
2973
  if (!showCell)
2976
2974
  return null;
2977
2975
  var isWidthUnitless = /^[0-9.]+$/.test(String(cellWidth));
@@ -2979,7 +2977,7 @@ var DataListCell = function (_a) {
2979
2977
  };
2980
2978
  var DataListAccordion = function (_a) {
2981
2979
  var rest = __rest$1(_a, []);
2982
- return React.createElement(react$1.AccordionItem, __assign$1({ border: "none" }, rest));
2980
+ return (React.createElement(react$1.AccordionItem, __assign$1({ border: "none" }, rest)));
2983
2981
  };
2984
2982
  var DataListAccordionButton = function (_a) {
2985
2983
  var rest = __rest$1(_a, []);