@nulogy/components 8.18.0 → 9.0.0

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/main.js CHANGED
@@ -12879,7 +12879,7 @@
12879
12879
  };
12880
12880
  }
12881
12881
 
12882
- var index$1 = typeof document !== 'undefined' ? React.useLayoutEffect : React.useEffect;
12882
+ var index = typeof document !== 'undefined' ? React.useLayoutEffect : React.useEffect;
12883
12883
 
12884
12884
  var _excluded$4 = ["className", "clearValue", "cx", "getStyles", "getClassNames", "getValue", "hasValue", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue", "theme"];
12885
12885
  // ==============================
@@ -13392,7 +13392,7 @@
13392
13392
  placement = _useState4[0],
13393
13393
  setPlacement = _useState4[1];
13394
13394
  var controlHeight = theme.spacing.controlHeight;
13395
- index$1(function () {
13395
+ index(function () {
13396
13396
  var menuEl = ref.current;
13397
13397
  if (!menuEl) return;
13398
13398
 
@@ -13557,7 +13557,7 @@
13557
13557
  });
13558
13558
  }
13559
13559
  }, [controlElement, menuPosition, placement, computedPosition === null || computedPosition === void 0 ? void 0 : computedPosition.offset, computedPosition === null || computedPosition === void 0 ? void 0 : computedPosition.rect.left, computedPosition === null || computedPosition === void 0 ? void 0 : computedPosition.rect.width]);
13560
- index$1(function () {
13560
+ index(function () {
13561
13561
  updateComputedPosition();
13562
13562
  }, [updateComputedPosition]);
13563
13563
  var runAutoUpdate = React.useCallback(function () {
@@ -13571,7 +13571,7 @@
13571
13571
  });
13572
13572
  }
13573
13573
  }, [controlElement, updateComputedPosition]);
13574
- index$1(function () {
13574
+ index(function () {
13575
13575
  runAutoUpdate();
13576
13576
  }, [runAutoUpdate]);
13577
13577
  var setMenuPortalElement = React.useCallback(function (menuPortalElement) {
@@ -49295,21 +49295,28 @@
49295
49295
  return label;
49296
49296
  };
49297
49297
 
49298
- var renderHeaderCellContent = function renderHeaderCellContent(_a) {
49299
- var _a$headerFormatter = _a.headerFormatter,
49300
- headerFormatter = _a$headerFormatter === void 0 ? defaultheaderFormatter : _a$headerFormatter,
49301
- column = __rest(_a, ["headerFormatter"]);
49302
-
49303
- return headerFormatter(column);
49298
+ var renderHeaderCellContent = function renderHeaderCellContent(_ref3) {
49299
+ var _ref3$headerFormatter = _ref3.headerFormatter,
49300
+ headerFormatter = _ref3$headerFormatter === void 0 ? defaultheaderFormatter : _ref3$headerFormatter,
49301
+ align = _ref3.align,
49302
+ label = _ref3.label,
49303
+ dataKey = _ref3.dataKey,
49304
+ width = _ref3.width;
49305
+ return headerFormatter({
49306
+ align: align,
49307
+ label: label,
49308
+ dataKey: dataKey,
49309
+ width: width
49310
+ });
49304
49311
  };
49305
49312
 
49306
- var TableHead = function TableHead(_ref3) {
49307
- var columns = _ref3.columns,
49308
- compact = _ref3.compact,
49309
- sticky = _ref3.sticky;
49313
+ var TableHead = function TableHead(_ref4) {
49314
+ var columns = _ref4.columns,
49315
+ compact = _ref4.compact,
49316
+ sticky = _ref4.sticky;
49310
49317
 
49311
49318
  var renderColumns = function renderColumns(allColumns) {
49312
- return allColumns.map(function (column) {
49319
+ return allColumns.map(function (column, index) {
49313
49320
  var _a, _b;
49314
49321
 
49315
49322
  return /*#__PURE__*/React__default["default"].createElement(StyledTh, {
@@ -49326,10 +49333,6 @@
49326
49333
  return /*#__PURE__*/React__default["default"].createElement("thead", null, /*#__PURE__*/React__default["default"].createElement(StyledHeaderRow, null, renderColumns(columns)));
49327
49334
  };
49328
49335
 
49329
- TableHead.defaultProps = {
49330
- sticky: false
49331
- };
49332
-
49333
49336
  var columnPropType = PropTypes__default["default"].shape({
49334
49337
  align: PropTypes__default["default"].oneOf(["right", "left", "center"]),
49335
49338
  label: PropTypes__default["default"].string,
@@ -12862,7 +12862,7 @@ function autoUpdate(reference, floating, update, options) {
12862
12862
  };
12863
12863
  }
12864
12864
 
12865
- var index$1 = typeof document !== 'undefined' ? useLayoutEffect : useEffect;
12865
+ var index = typeof document !== 'undefined' ? useLayoutEffect : useEffect;
12866
12866
 
12867
12867
  var _excluded$4 = ["className", "clearValue", "cx", "getStyles", "getClassNames", "getValue", "hasValue", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue", "theme"];
12868
12868
  // ==============================
@@ -13375,7 +13375,7 @@ var MenuPlacer = function MenuPlacer(props) {
13375
13375
  placement = _useState4[0],
13376
13376
  setPlacement = _useState4[1];
13377
13377
  var controlHeight = theme.spacing.controlHeight;
13378
- index$1(function () {
13378
+ index(function () {
13379
13379
  var menuEl = ref.current;
13380
13380
  if (!menuEl) return;
13381
13381
 
@@ -13540,7 +13540,7 @@ var MenuPortal = function MenuPortal(props) {
13540
13540
  });
13541
13541
  }
13542
13542
  }, [controlElement, menuPosition, placement, computedPosition === null || computedPosition === void 0 ? void 0 : computedPosition.offset, computedPosition === null || computedPosition === void 0 ? void 0 : computedPosition.rect.left, computedPosition === null || computedPosition === void 0 ? void 0 : computedPosition.rect.width]);
13543
- index$1(function () {
13543
+ index(function () {
13544
13544
  updateComputedPosition();
13545
13545
  }, [updateComputedPosition]);
13546
13546
  var runAutoUpdate = useCallback(function () {
@@ -13554,7 +13554,7 @@ var MenuPortal = function MenuPortal(props) {
13554
13554
  });
13555
13555
  }
13556
13556
  }, [controlElement, updateComputedPosition]);
13557
- index$1(function () {
13557
+ index(function () {
13558
13558
  runAutoUpdate();
13559
13559
  }, [runAutoUpdate]);
13560
13560
  var setMenuPortalElement = useCallback(function (menuPortalElement) {
@@ -49278,21 +49278,28 @@ var defaultheaderFormatter = function defaultheaderFormatter(_ref2) {
49278
49278
  return label;
49279
49279
  };
49280
49280
 
49281
- var renderHeaderCellContent = function renderHeaderCellContent(_a) {
49282
- var _a$headerFormatter = _a.headerFormatter,
49283
- headerFormatter = _a$headerFormatter === void 0 ? defaultheaderFormatter : _a$headerFormatter,
49284
- column = __rest(_a, ["headerFormatter"]);
49285
-
49286
- return headerFormatter(column);
49281
+ var renderHeaderCellContent = function renderHeaderCellContent(_ref3) {
49282
+ var _ref3$headerFormatter = _ref3.headerFormatter,
49283
+ headerFormatter = _ref3$headerFormatter === void 0 ? defaultheaderFormatter : _ref3$headerFormatter,
49284
+ align = _ref3.align,
49285
+ label = _ref3.label,
49286
+ dataKey = _ref3.dataKey,
49287
+ width = _ref3.width;
49288
+ return headerFormatter({
49289
+ align: align,
49290
+ label: label,
49291
+ dataKey: dataKey,
49292
+ width: width
49293
+ });
49287
49294
  };
49288
49295
 
49289
- var TableHead = function TableHead(_ref3) {
49290
- var columns = _ref3.columns,
49291
- compact = _ref3.compact,
49292
- sticky = _ref3.sticky;
49296
+ var TableHead = function TableHead(_ref4) {
49297
+ var columns = _ref4.columns,
49298
+ compact = _ref4.compact,
49299
+ sticky = _ref4.sticky;
49293
49300
 
49294
49301
  var renderColumns = function renderColumns(allColumns) {
49295
- return allColumns.map(function (column) {
49302
+ return allColumns.map(function (column, index) {
49296
49303
  var _a, _b;
49297
49304
 
49298
49305
  return /*#__PURE__*/React__default.createElement(StyledTh, {
@@ -49309,10 +49316,6 @@ var TableHead = function TableHead(_ref3) {
49309
49316
  return /*#__PURE__*/React__default.createElement("thead", null, /*#__PURE__*/React__default.createElement(StyledHeaderRow, null, renderColumns(columns)));
49310
49317
  };
49311
49318
 
49312
- TableHead.defaultProps = {
49313
- sticky: false
49314
- };
49315
-
49316
49319
  var columnPropType = PropTypes.shape({
49317
49320
  align: PropTypes.oneOf(["right", "left", "center"]),
49318
49321
  label: PropTypes.string,
@@ -1,17 +1,17 @@
1
- import { Key } from "react";
1
+ import type { Key } from "react";
2
2
  import PropTypes from "prop-types";
3
3
  export type RowType = unknown;
4
- export type CellInfoType = {
4
+ export interface CellInfoType {
5
5
  cellData: unknown;
6
6
  column: ColumnType;
7
7
  row: RowType;
8
- };
9
- type ColumnInfoType = {
8
+ }
9
+ interface ColumnInfoType {
10
10
  align?: ColumnAlignment;
11
11
  label: string;
12
12
  dataKey?: Key;
13
13
  width?: string | number;
14
- };
14
+ }
15
15
  type ColumnAlignment = "left" | "right" | "center";
16
16
  export type ColumnType = {
17
17
  align?: ColumnAlignment;
@@ -1,9 +1,9 @@
1
1
  import React from "react";
2
- import { Columns } from "./Table.types";
3
- type TableHeadProps = {
2
+ import type { Columns } from "./Table.types";
3
+ interface TableHeadProps {
4
4
  columns: Columns;
5
5
  compact?: boolean;
6
6
  sticky?: boolean;
7
- };
8
- declare const TableHead: React.FC<TableHeadProps>;
7
+ }
8
+ declare const TableHead: ({ columns, compact, sticky }: TableHeadProps) => React.JSX.Element;
9
9
  export default TableHead;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nulogy/components",
3
- "version": "8.18.0",
3
+ "version": "9.0.0",
4
4
  "description": "Component library for the Nulogy Design System - http://nulogy.design",
5
5
  "private": false,
6
6
  "publishConfig": {