@trackunit/react-table-base-components 1.6.56 → 1.6.58
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
|
@@ -101,15 +101,6 @@ const cvaIdentityCellLayout = cssClassVarianceUtilities.cvaMerge(["grid", "items
|
|
|
101
101
|
density: "default",
|
|
102
102
|
},
|
|
103
103
|
});
|
|
104
|
-
const cvaIdentityCellDetails = cssClassVarianceUtilities.cvaMerge(["flex", "w-full", "min-w-0", "items-center", "truncate", "text-xs", "text-gray-600", "font-medium"], {
|
|
105
|
-
variants: {
|
|
106
|
-
density: {
|
|
107
|
-
default: "pt-0",
|
|
108
|
-
compact: "pt-1",
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
});
|
|
112
|
-
const cvaIdentityCellDetailsItem = cssClassVarianceUtilities.cvaMerge(["last:truncate"]);
|
|
113
104
|
|
|
114
105
|
/**
|
|
115
106
|
* The IdentityCell is used for render an identity in a table cell.
|
|
@@ -121,7 +112,7 @@ const cvaIdentityCellDetailsItem = cssClassVarianceUtilities.cvaMerge(["last:tru
|
|
|
121
112
|
* @returns {ReactElement} LinkCell component
|
|
122
113
|
*/
|
|
123
114
|
const IdentityCell = ({ className, dataTestId, density = "default", title, details = [], thumbnail, }) => {
|
|
124
|
-
return (jsxRuntime.jsxs("div", { className: cvaIdentityCell({ className, density, hasThumbnail: !!thumbnail }), "data-testid": dataTestId, children: [thumbnail ? (jsxRuntime.jsx("div", { className: "mr-1 flex h-8 w-8 items-center justify-center overflow-hidden rounded-md", children: thumbnail })) : null, jsxRuntime.jsxs("div", { className: cvaIdentityCellLayout({ className, density }), children: [jsxRuntime.jsx("div", { className: "gap-responsive-space-sm flex w-full min-w-0 items-center truncate text-sm", children: jsxRuntime.jsx(reactComponents.Heading, { className: "truncate text-sm", dataTestId: dataTestId ? `${dataTestId}-name` : undefined, variant: "tertiary", children: title }) }), details.length > 0 &&
|
|
115
|
+
return (jsxRuntime.jsxs("div", { className: cvaIdentityCell({ className, density, hasThumbnail: !!thumbnail }), "data-testid": dataTestId, children: [thumbnail ? (jsxRuntime.jsx("div", { className: "mr-1 flex h-8 w-8 items-center justify-center overflow-hidden rounded-md", children: thumbnail })) : null, jsxRuntime.jsxs("div", { className: cvaIdentityCellLayout({ className, density }), children: [jsxRuntime.jsx("div", { className: "gap-responsive-space-sm flex w-full min-w-0 items-center truncate text-sm", children: jsxRuntime.jsx(reactComponents.Heading, { className: "truncate text-sm", dataTestId: dataTestId ? `${dataTestId}-name` : undefined, variant: "tertiary", children: title }) }), details.length > 0 && jsxRuntime.jsx(reactComponents.DetailsList, { className: className, density: density, details: details })] })] }));
|
|
125
116
|
};
|
|
126
117
|
|
|
127
118
|
/**
|
package/index.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { Button, Icon, Highlight, Heading, Indicator, ExternalLink, Tooltip, Tag, Notice, IconButton, MoreMenu, MenuList, MenuItem, MenuDivider, Spinner } from '@trackunit/react-components';
|
|
2
|
+
import { Button, Icon, Highlight, Heading, DetailsList, Indicator, ExternalLink, Tooltip, Tag, Notice, IconButton, MoreMenu, MenuList, MenuItem, MenuDivider, Spinner } from '@trackunit/react-components';
|
|
3
3
|
import { twMerge } from 'tailwind-merge';
|
|
4
4
|
import { Checkbox } from '@trackunit/react-form-components';
|
|
5
5
|
import { cvaMerge } from '@trackunit/css-class-variance-utilities';
|
|
6
6
|
import { formatDateUtil, timeSinceAuto, timeSinceInDays } from '@trackunit/date-and-time-utils';
|
|
7
|
-
import {
|
|
7
|
+
import { useState, isValidElement, cloneElement } from 'react';
|
|
8
8
|
import { Temporal } from '@js-temporal/polyfill';
|
|
9
9
|
import { DateTimeFormat } from '@trackunit/shared-utils';
|
|
10
10
|
|
|
@@ -99,15 +99,6 @@ const cvaIdentityCellLayout = cvaMerge(["grid", "items-center", "text-sm"], {
|
|
|
99
99
|
density: "default",
|
|
100
100
|
},
|
|
101
101
|
});
|
|
102
|
-
const cvaIdentityCellDetails = cvaMerge(["flex", "w-full", "min-w-0", "items-center", "truncate", "text-xs", "text-gray-600", "font-medium"], {
|
|
103
|
-
variants: {
|
|
104
|
-
density: {
|
|
105
|
-
default: "pt-0",
|
|
106
|
-
compact: "pt-1",
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
});
|
|
110
|
-
const cvaIdentityCellDetailsItem = cvaMerge(["last:truncate"]);
|
|
111
102
|
|
|
112
103
|
/**
|
|
113
104
|
* The IdentityCell is used for render an identity in a table cell.
|
|
@@ -119,7 +110,7 @@ const cvaIdentityCellDetailsItem = cvaMerge(["last:truncate"]);
|
|
|
119
110
|
* @returns {ReactElement} LinkCell component
|
|
120
111
|
*/
|
|
121
112
|
const IdentityCell = ({ className, dataTestId, density = "default", title, details = [], thumbnail, }) => {
|
|
122
|
-
return (jsxs("div", { className: cvaIdentityCell({ className, density, hasThumbnail: !!thumbnail }), "data-testid": dataTestId, children: [thumbnail ? (jsx("div", { className: "mr-1 flex h-8 w-8 items-center justify-center overflow-hidden rounded-md", children: thumbnail })) : null, jsxs("div", { className: cvaIdentityCellLayout({ className, density }), children: [jsx("div", { className: "gap-responsive-space-sm flex w-full min-w-0 items-center truncate text-sm", children: jsx(Heading, { className: "truncate text-sm", dataTestId: dataTestId ? `${dataTestId}-name` : undefined, variant: "tertiary", children: title }) }), details.length > 0 &&
|
|
113
|
+
return (jsxs("div", { className: cvaIdentityCell({ className, density, hasThumbnail: !!thumbnail }), "data-testid": dataTestId, children: [thumbnail ? (jsx("div", { className: "mr-1 flex h-8 w-8 items-center justify-center overflow-hidden rounded-md", children: thumbnail })) : null, jsxs("div", { className: cvaIdentityCellLayout({ className, density }), children: [jsx("div", { className: "gap-responsive-space-sm flex w-full min-w-0 items-center truncate text-sm", children: jsx(Heading, { className: "truncate text-sm", dataTestId: dataTestId ? `${dataTestId}-name` : undefined, variant: "tertiary", children: title }) }), details.length > 0 && jsx(DetailsList, { className: className, density: density, details: details })] })] }));
|
|
123
114
|
};
|
|
124
115
|
|
|
125
116
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-table-base-components",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.58",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"react": "19.0.0",
|
|
11
|
-
"@trackunit/react-components": "1.8.
|
|
11
|
+
"@trackunit/react-components": "1.8.10",
|
|
12
12
|
"@trackunit/ui-icons": "1.6.37",
|
|
13
|
-
"@trackunit/react-form-components": "1.7.
|
|
13
|
+
"@trackunit/react-form-components": "1.7.23",
|
|
14
14
|
"@trackunit/css-class-variance-utilities": "1.6.38",
|
|
15
15
|
"@trackunit/date-and-time-utils": "1.6.38",
|
|
16
16
|
"@trackunit/shared-utils": "1.8.38",
|
|
@@ -5,7 +5,3 @@ export declare const cvaIdentityCell: (props?: ({
|
|
|
5
5
|
export declare const cvaIdentityCellLayout: (props?: ({
|
|
6
6
|
density?: "default" | "compact" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
8
|
-
export declare const cvaIdentityCellDetails: (props?: ({
|
|
9
|
-
density?: "default" | "compact" | null | undefined;
|
|
10
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
11
|
-
export declare const cvaIdentityCellDetailsItem: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|