@bsol-oss/react-datatable5 1.0.30 → 1.0.31

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/index.d.ts CHANGED
@@ -3,6 +3,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import { RowData, OnChangeFn, Updater, FilterFn, ColumnDef, Row } from '@tanstack/react-table';
4
4
  import { RankingInfo } from '@tanstack/match-sorter-utils';
5
5
  import { ReactNode } from 'react';
6
+ import { TooltipProps } from '@chakra-ui/react';
6
7
  import * as _tanstack_table_core from '@tanstack/table-core';
7
8
 
8
9
  type DensityState = "sm" | "md" | "lg";
@@ -160,8 +161,9 @@ interface TextCellProps {
160
161
  noOfLines?: number[];
161
162
  padding?: string;
162
163
  children: string | number | JSX.Element | JSX.Element[];
164
+ tooltipProps?: TooltipProps;
163
165
  }
164
- declare const TextCell: ({ label, noOfLines, padding, children, }: TextCellProps) => react_jsx_runtime.JSX.Element;
166
+ declare const TextCell: ({ label, noOfLines, padding, children, tooltipProps, ...props }: TextCellProps) => react_jsx_runtime.JSX.Element;
165
167
 
166
168
  interface useDataFromUrlReturn<T> {
167
169
  data: T;
package/dist/index.js CHANGED
@@ -643,9 +643,9 @@ const TableSelector = () => {
643
643
  }, "aria-label": "reset selection" }))] }));
644
644
  };
645
645
 
646
- const TextCell = ({ label, noOfLines = [1], padding = "0rem", children, }) => {
646
+ const TextCell = ({ label, noOfLines = [1], padding = "0rem", children, tooltipProps, ...props }) => {
647
647
  if (label) {
648
- return (jsxRuntime.jsx(react$1.Box, { padding: padding, children: jsxRuntime.jsx(react$1.Tooltip, { label: jsxRuntime.jsx(react$1.Text, { as: "span", overflow: "hidden", textOverflow: "ellipsis", noOfLines: [5], children: label }), placement: "auto", children: jsxRuntime.jsx(react$1.Text, { as: "span", overflow: "hidden", textOverflow: "ellipsis", wordBreak: "break-all", noOfLines: noOfLines, children: children }) }) }));
648
+ return (jsxRuntime.jsx(react$1.Box, { padding: padding, children: jsxRuntime.jsx(react$1.Tooltip, { label: jsxRuntime.jsx(react$1.Text, { as: "span", overflow: "hidden", textOverflow: "ellipsis", noOfLines: [5], children: label }), placement: "auto", ...tooltipProps, children: jsxRuntime.jsx(react$1.Text, { as: "span", overflow: "hidden", textOverflow: "ellipsis", wordBreak: "break-all", noOfLines: noOfLines, ...props, children: children }) }) }));
649
649
  }
650
650
  return (jsxRuntime.jsx(react$1.Box, { padding: padding, children: jsxRuntime.jsx(react$1.Text, { as: "span", overflow: "hidden", textOverflow: "ellipsis", wordBreak: "break-all", noOfLines: noOfLines, children: children }) }));
651
651
  };
package/dist/index.mjs CHANGED
@@ -641,9 +641,9 @@ const TableSelector = () => {
641
641
  }, "aria-label": "reset selection" }))] }));
642
642
  };
643
643
 
644
- const TextCell = ({ label, noOfLines = [1], padding = "0rem", children, }) => {
644
+ const TextCell = ({ label, noOfLines = [1], padding = "0rem", children, tooltipProps, ...props }) => {
645
645
  if (label) {
646
- return (jsx(Box, { padding: padding, children: jsx(Tooltip, { label: jsx(Text, { as: "span", overflow: "hidden", textOverflow: "ellipsis", noOfLines: [5], children: label }), placement: "auto", children: jsx(Text, { as: "span", overflow: "hidden", textOverflow: "ellipsis", wordBreak: "break-all", noOfLines: noOfLines, children: children }) }) }));
646
+ return (jsx(Box, { padding: padding, children: jsx(Tooltip, { label: jsx(Text, { as: "span", overflow: "hidden", textOverflow: "ellipsis", noOfLines: [5], children: label }), placement: "auto", ...tooltipProps, children: jsx(Text, { as: "span", overflow: "hidden", textOverflow: "ellipsis", wordBreak: "break-all", noOfLines: noOfLines, ...props, children: children }) }) }));
647
647
  }
648
648
  return (jsx(Box, { padding: padding, children: jsx(Text, { as: "span", overflow: "hidden", textOverflow: "ellipsis", wordBreak: "break-all", noOfLines: noOfLines, children: children }) }));
649
649
  };
@@ -1,8 +1,10 @@
1
1
  /// <reference types="react" />
2
+ import { TooltipProps } from "@chakra-ui/react";
2
3
  export interface TextCellProps {
3
4
  label?: string;
4
5
  noOfLines?: number[];
5
6
  padding?: string;
6
7
  children: string | number | JSX.Element | JSX.Element[];
8
+ tooltipProps?: TooltipProps;
7
9
  }
8
- export declare const TextCell: ({ label, noOfLines, padding, children, }: TextCellProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const TextCell: ({ label, noOfLines, padding, children, tooltipProps, ...props }: TextCellProps) => import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bsol-oss/react-datatable5",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",