@trackunit/react-table-base-components 0.0.201 → 0.0.202

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/index.cjs.js CHANGED
@@ -131,6 +131,17 @@ const MultiValueTextCell = ({ content, count, icon, iconTooltip, dataTestId, cla
131
131
  return count && count > 0 ? (jsxRuntime.jsxs("div", { className: cvaMultiValueTextCellWrapper({ className }), "data-testid": dataTestId, children: [jsxRuntime.jsx(reactComponents.Tooltip, { className: "inline", disabled: !iconTooltip, label: iconTooltip !== null && iconTooltip !== void 0 ? iconTooltip : "", placement: "bottom", children: icon }), jsxRuntime.jsx("span", { className: cvaMultiValueTextCellTooltip(), ref: elementRef => updateTooltipVisibility(elementRef), children: jsxRuntime.jsx(reactComponents.Tooltip, { className: "inline", disabled: !isTooltipVisible, label: content !== null && content !== void 0 ? content : "", placement: "bottom", children: content !== null && content !== void 0 ? content : "" }) }), jsxRuntime.jsx("span", { className: "text-slate-500", children: count > 1 ? `+${count - 1}` : "" })] })) : null;
132
132
  };
133
133
 
134
+ /**
135
+ * The NoticeCell is used for rendering a Notice in a table cell
136
+ *
137
+ * @param {NoticeCellProps} props - The props for the NoticeCell component
138
+ * @returns {JSX.Element} NoticeCell component
139
+ */
140
+ const NoticeCell = (_a) => {
141
+ var rest = __rest(_a, []);
142
+ return jsxRuntime.jsx(reactComponents.Notice, Object.assign({}, rest));
143
+ };
144
+
134
145
  const cvaNumberCell = cssClassVarianceUtilities.cvaMerge([
135
146
  "flex",
136
147
  "gap-1",
@@ -412,6 +423,7 @@ exports.ImageCell = ImageCell;
412
423
  exports.IndicatorCell = IndicatorCell;
413
424
  exports.LinkCell = LinkCell;
414
425
  exports.MultiValueTextCell = MultiValueTextCell;
426
+ exports.NoticeCell = NoticeCell;
415
427
  exports.NumberCell = NumberCell;
416
428
  exports.ResizeHandle = ResizeHandle;
417
429
  exports.SortIndicator = SortIndicator;
package/index.esm.js CHANGED
@@ -2,7 +2,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { Checkbox } from '@trackunit/react-form-components';
3
3
  import { cvaMerge } from '@trackunit/css-class-variance-utilities';
4
4
  import { formatDateUtil, timeSinceAuto } from '@trackunit/date-and-time-utils';
5
- import { Indicator, ExternalLink, Tooltip, Tag } from '@trackunit/react-components';
5
+ import { Indicator, ExternalLink, Tooltip, Notice, Tag } from '@trackunit/react-components';
6
6
  import { useState, useEffect } from 'react';
7
7
 
8
8
  const cvaCheckboxCell = cvaMerge([""]);
@@ -127,6 +127,17 @@ const MultiValueTextCell = ({ content, count, icon, iconTooltip, dataTestId, cla
127
127
  return count && count > 0 ? (jsxs("div", { className: cvaMultiValueTextCellWrapper({ className }), "data-testid": dataTestId, children: [jsx(Tooltip, { className: "inline", disabled: !iconTooltip, label: iconTooltip !== null && iconTooltip !== void 0 ? iconTooltip : "", placement: "bottom", children: icon }), jsx("span", { className: cvaMultiValueTextCellTooltip(), ref: elementRef => updateTooltipVisibility(elementRef), children: jsx(Tooltip, { className: "inline", disabled: !isTooltipVisible, label: content !== null && content !== void 0 ? content : "", placement: "bottom", children: content !== null && content !== void 0 ? content : "" }) }), jsx("span", { className: "text-slate-500", children: count > 1 ? `+${count - 1}` : "" })] })) : null;
128
128
  };
129
129
 
130
+ /**
131
+ * The NoticeCell is used for rendering a Notice in a table cell
132
+ *
133
+ * @param {NoticeCellProps} props - The props for the NoticeCell component
134
+ * @returns {JSX.Element} NoticeCell component
135
+ */
136
+ const NoticeCell = (_a) => {
137
+ var rest = __rest(_a, []);
138
+ return jsx(Notice, Object.assign({}, rest));
139
+ };
140
+
130
141
  const cvaNumberCell = cvaMerge([
131
142
  "flex",
132
143
  "gap-1",
@@ -402,4 +413,4 @@ const cvaTr = cvaMerge(["border-b", "border-neutral-300", "w-full", "h-max"], {
402
413
  },
403
414
  });
404
415
 
405
- export { CheckboxCell, DateTimeCell, ImageCell, IndicatorCell, LinkCell, MultiValueTextCell, NumberCell, ResizeHandle, SortIndicator, TableRoot, TagsCell, Tbody, Td, TextCell, Tfoot, Th, Thead, Tr };
416
+ export { CheckboxCell, DateTimeCell, ImageCell, IndicatorCell, LinkCell, MultiValueTextCell, NoticeCell, NumberCell, ResizeHandle, SortIndicator, TableRoot, TagsCell, Tbody, Td, TextCell, Tfoot, Th, Thead, Tr };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-table-base-components",
3
- "version": "0.0.201",
3
+ "version": "0.0.202",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { NoticeProps } from "@trackunit/react-components";
3
+ export interface NoticeCellProps extends NoticeProps {
4
+ }
5
+ /**
6
+ * The NoticeCell is used for rendering a Notice in a table cell
7
+ *
8
+ * @param {NoticeCellProps} props - The props for the NoticeCell component
9
+ * @returns {JSX.Element} NoticeCell component
10
+ */
11
+ export declare const NoticeCell: ({ ...rest }: NoticeCellProps) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from "@storybook/react";
2
+ import { NoticeCell } from "./NoticeCell";
3
+ type Story = StoryObj<typeof NoticeCell>;
4
+ declare const meta: Meta<typeof NoticeCell>;
5
+ export default meta;
6
+ export declare const packageName: () => JSX.Element;
7
+ export declare const Default: Story;
package/src/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export * from "./components/ImageCell/ImageCell";
4
4
  export * from "./components/IndicatorCell/IndicatorCell";
5
5
  export * from "./components/LinkCell/LinkCell";
6
6
  export * from "./components/MultiValueTextCell/MultiValueTextCell";
7
+ export * from "./components/NoticeCell/NoticeCell";
7
8
  export * from "./components/NumberCell/NumberCell";
8
9
  export * from "./components/ResizeHandle";
9
10
  export * from "./components/SortIndicator";