@trackunit/react-components 0.1.205 → 0.1.209
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 +69 -88
- package/index.esm.js +68 -88
- package/package.json +2 -1
- package/src/components/PageHeader/PageHeader.d.ts +4 -2
- package/src/components/PageHeader/PageHeader.variants.d.ts +3 -0
- package/src/components/Tabs/Tab.d.ts +38 -7
- package/src/components/Tabs/TabContent.d.ts +14 -0
- package/src/components/Tabs/TabList.d.ts +21 -0
- package/src/components/Tabs/Tabs.d.ts +5 -8
- package/src/components/Tabs/Tabs.variants.d.ts +3 -9
- package/src/components/index.d.ts +2 -1
- package/src/components/Tabs/TabPanel.d.ts +0 -15
package/index.cjs.js
CHANGED
|
@@ -16,6 +16,7 @@ var react = require('@floating-ui/react');
|
|
|
16
16
|
var usePortal = require('react-useportal');
|
|
17
17
|
var reactRouterDom = require('react-router-dom');
|
|
18
18
|
var reactHelmetAsync = require('react-helmet-async');
|
|
19
|
+
var reactTabs = require('@radix-ui/react-tabs');
|
|
19
20
|
var dateFns = require('date-fns');
|
|
20
21
|
var lodash = require('lodash');
|
|
21
22
|
|
|
@@ -1870,10 +1871,17 @@ const Tip = ({ children, iconProps, dataTestId, className, placement = "bottom",
|
|
|
1870
1871
|
return (jsxRuntime.jsx("span", { "data-testid": dataTestId, className: cvaTip({ className }), children: jsxRuntime.jsxs(Popover, { placement: placement, activation: { click: true }, dataTestId: dataTestId !== null && dataTestId !== void 0 ? dataTestId : "", children: [jsxRuntime.jsx(PopoverTrigger, { children: jsxRuntime.jsx("div", { "data-testid": dataTestId && `${dataTestId}-trigger`, children: jsxRuntime.jsx(Icon, Object.assign({ name: "QuestionMarkCircle", size: "medium", dataTestId: dataTestId && `${dataTestId}-icon` }, iconProps)) }) }), jsxRuntime.jsx(PopoverContent, { children: jsxRuntime.jsxs("div", { className: cvaTipContent({ color: mode }), children: [jsxRuntime.jsx("div", { children: typeof children === "string" ? jsxRuntime.jsx("p", { children: children }) : children }), link ? (jsxRuntime.jsx("a", { href: link, children: jsxRuntime.jsx(Icon, { name: "ArrowRightCircle" }) })) : null] }) })] }) }));
|
|
1871
1872
|
};
|
|
1872
1873
|
|
|
1874
|
+
const cvaPageHeaderContainer = cssClassVarianceUtilities.cvaMerge(["bg-white"], {
|
|
1875
|
+
variants: {
|
|
1876
|
+
withBorder: {
|
|
1877
|
+
true: ["border-b", "border-b-secondary-200"],
|
|
1878
|
+
false: "",
|
|
1879
|
+
},
|
|
1880
|
+
},
|
|
1881
|
+
});
|
|
1873
1882
|
const cvaPageHeader = cssClassVarianceUtilities.cvaMerge([
|
|
1874
1883
|
"min-h-[72px]",
|
|
1875
1884
|
"box-border",
|
|
1876
|
-
"bg-white",
|
|
1877
1885
|
"px-6",
|
|
1878
1886
|
"py-5",
|
|
1879
1887
|
"flex",
|
|
@@ -1882,8 +1890,6 @@ const cvaPageHeader = cssClassVarianceUtilities.cvaMerge([
|
|
|
1882
1890
|
"gap-x-4",
|
|
1883
1891
|
"gap-y-1",
|
|
1884
1892
|
"justify-between",
|
|
1885
|
-
"border-b",
|
|
1886
|
-
"border-b-secondary-200",
|
|
1887
1893
|
]);
|
|
1888
1894
|
const cvaPageHeaderHeading = cssClassVarianceUtilities.cvaMerge(["flex", "text-slate-900", "text-2xl", "font-bold", "min-w-0"]);
|
|
1889
1895
|
const cvaPageHeaderHeadingContainer = cssClassVarianceUtilities.cvaMerge(["flex", "gap-x-4", "items-center"]);
|
|
@@ -1904,8 +1910,11 @@ const cvaPageHeaderChildContainer = cssClassVarianceUtilities.cvaMerge(["flex",
|
|
|
1904
1910
|
* @param {PageHeaderProps} props - The props for the PageHeader component
|
|
1905
1911
|
* @returns {JSX.Element} PageHeader component
|
|
1906
1912
|
*/
|
|
1907
|
-
const PageHeader = ({ className, dataTestId, action, showLoading, description, link, title, tag, backTo, tagColor, children, }) => {
|
|
1908
|
-
return (jsxRuntime.jsxs("div", { className:
|
|
1913
|
+
const PageHeader = ({ className, dataTestId, action, showLoading, description, link, title, tag, backTo, tagColor, children, tabsList, }) => {
|
|
1914
|
+
return (jsxRuntime.jsxs("div", { className: cvaPageHeaderContainer({
|
|
1915
|
+
className: `${className} tu-page-header`,
|
|
1916
|
+
withBorder: !Boolean(tabsList),
|
|
1917
|
+
}), "data-testid": dataTestId, children: [jsxRuntime.jsxs("div", { className: cvaPageHeader(), children: [jsxRuntime.jsxs("div", { className: cvaPageHeaderHeadingAccessoriesContainer(), "data-testid": dataTestId && `${dataTestId}-heading-container`, children: [jsxRuntime.jsxs("div", { className: cvaPageHeaderHeadingContainer(), children: [backTo && (jsxRuntime.jsx(IconButton, { to: backTo, renderAs: reactRouterDom.Link, color: "tertiary", variant: "transparent", size: "small", icon: jsxRuntime.jsx(Icon, { name: "ArrowLeft" }) })), jsxRuntime.jsx("h1", { className: cvaPageHeaderHeading(), "data-testid": dataTestId && `${dataTestId}-heading`, children: title }), description && !showLoading && (jsxRuntime.jsx(Tip, { dataTestId: dataTestId && `${dataTestId}-tip`, iconProps: { name: "QuestionMarkCircle" }, link: link, children: description }))] }), tag && !showLoading && (jsxRuntime.jsx(Tag, { dataTestId: dataTestId, color: tagColor, children: tag })), showLoading && jsxRuntime.jsx(Spinner, { dataTestId: dataTestId && `${dataTestId}-spinner`, centering: "vertically" }), action] }), jsxRuntime.jsx("div", { className: cvaPageHeaderChildContainer(), children: children })] }), tabsList] }));
|
|
1909
1918
|
};
|
|
1910
1919
|
|
|
1911
1920
|
const cvaPagination = cssClassVarianceUtilities.cvaMerge(["flex", "items-center", "gap-1"]);
|
|
@@ -2167,116 +2176,87 @@ const Sidebar = ({ childContainerClassName, children, breakpoint = "lg", classNa
|
|
|
2167
2176
|
}) }))) }))) : null] }));
|
|
2168
2177
|
};
|
|
2169
2178
|
|
|
2179
|
+
const cvaTabsRoot = cssClassVarianceUtilities.cvaMerge([]);
|
|
2180
|
+
const cvaTabList = cssClassVarianceUtilities.cvaMerge([
|
|
2181
|
+
"flex",
|
|
2182
|
+
"flex-row",
|
|
2183
|
+
"border-b",
|
|
2184
|
+
"border-b-slate-200",
|
|
2185
|
+
"overflow-auto",
|
|
2186
|
+
"no-scrollbar",
|
|
2187
|
+
]);
|
|
2188
|
+
const cvaTabContent = cssClassVarianceUtilities.cvaMerge([]);
|
|
2170
2189
|
const cvaTab = cssClassVarianceUtilities.cvaMerge([
|
|
2171
|
-
"mb-px",
|
|
2172
|
-
"box-content",
|
|
2173
2190
|
"flex",
|
|
2174
|
-
"
|
|
2175
|
-
"
|
|
2176
|
-
"cursor-pointer items-center",
|
|
2177
|
-
"justify-center ",
|
|
2191
|
+
"items-center",
|
|
2192
|
+
"justify-center",
|
|
2178
2193
|
"gap-2",
|
|
2179
|
-
"
|
|
2180
|
-
"
|
|
2181
|
-
"
|
|
2194
|
+
"text-sm",
|
|
2195
|
+
"md:text-base",
|
|
2196
|
+
"px-4",
|
|
2197
|
+
"md:px-6",
|
|
2198
|
+
"py-2.5",
|
|
2199
|
+
"cursor-pointer",
|
|
2182
2200
|
"transition",
|
|
2183
2201
|
"duration-200",
|
|
2184
2202
|
"ease-in-out",
|
|
2203
|
+
"whitespace-nowrap",
|
|
2204
|
+
"data-[state=active]:border-b-2",
|
|
2205
|
+
"data-[state=active]:border-b-blue-600",
|
|
2206
|
+
"data-[state=active]:font-semibold",
|
|
2207
|
+
"data-[state=active]:text-slate-900",
|
|
2208
|
+
"data-[state=inactive]:font-medium",
|
|
2209
|
+
"data-[state=inactive]:text-slate-700",
|
|
2210
|
+
"data-[state=inactive]:hover:border-b-slate-400",
|
|
2211
|
+
"data-[state=inactive]:hover:text-slate-900",
|
|
2212
|
+
"disabled:cursor-not-allowed",
|
|
2213
|
+
"data-[state=active]disabled:text-slate-400",
|
|
2214
|
+
"data-[state=inactive]:disabled:text-slate-400",
|
|
2185
2215
|
], {
|
|
2186
2216
|
variants: {
|
|
2187
|
-
isSelected: {
|
|
2188
|
-
true: "border-b-blue-600 hover:text-neutral-500",
|
|
2189
|
-
false: "border-neutral-200 text-neutral-500 hover:border-b-neutral-500",
|
|
2190
|
-
},
|
|
2191
2217
|
isFullWidth: {
|
|
2192
2218
|
true: "w-full",
|
|
2193
2219
|
false: "",
|
|
2194
2220
|
},
|
|
2195
2221
|
},
|
|
2196
2222
|
defaultVariants: {
|
|
2197
|
-
isSelected: false,
|
|
2198
2223
|
isFullWidth: false,
|
|
2199
2224
|
},
|
|
2200
2225
|
});
|
|
2201
|
-
cssClassVarianceUtilities.cvaMerge(["whitespace-no-wrap", "mr-4", "overflow-hidden"]);
|
|
2202
|
-
const cvaTabs = cssClassVarianceUtilities.cvaMerge(["flex", "flex-col"]);
|
|
2203
|
-
const cvaTabsPanels = cssClassVarianceUtilities.cvaMerge(["mt-4", "flex", "h-full"]);
|
|
2204
|
-
const cvaTabsPanel = cssClassVarianceUtilities.cvaMerge([], {
|
|
2205
|
-
variants: {
|
|
2206
|
-
isSelected: {
|
|
2207
|
-
true: "flex-1",
|
|
2208
|
-
false: "grow-0",
|
|
2209
|
-
},
|
|
2210
|
-
},
|
|
2211
|
-
defaultVariants: {
|
|
2212
|
-
isSelected: false,
|
|
2213
|
-
},
|
|
2214
|
-
});
|
|
2215
|
-
const cvaTabPanel = cssClassVarianceUtilities.cvaMerge(["flex-1"]);
|
|
2216
|
-
const cvaTabsContainer = cssClassVarianceUtilities.cvaMerge([
|
|
2217
|
-
"m-0",
|
|
2218
|
-
"flex",
|
|
2219
|
-
"list-none",
|
|
2220
|
-
"items-center",
|
|
2221
|
-
"gap-x-4",
|
|
2222
|
-
"border-b",
|
|
2223
|
-
"border-solid",
|
|
2224
|
-
"border-neutral-100",
|
|
2225
|
-
"p-0",
|
|
2226
|
-
]);
|
|
2227
2226
|
|
|
2228
2227
|
/**
|
|
2229
|
-
*
|
|
2228
|
+
* Wrapper for radix tab component.
|
|
2229
|
+
* We add a custom implementation of the asChild prop to make it easy to make the child element look like other tabs.
|
|
2230
2230
|
*/
|
|
2231
|
-
const Tab = (
|
|
2232
|
-
|
|
2231
|
+
const Tab = (_a) => {
|
|
2232
|
+
var { value, isFullWidth = false, iconName, dataTestId, className, children, suffix, asChild, appendTabStylesToChildIfAsChild = true } = _a, rest = __rest(_a, ["value", "isFullWidth", "iconName", "dataTestId", "className", "children", "suffix", "asChild", "appendTabStylesToChildIfAsChild"]);
|
|
2233
|
+
const renderContent = () => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [iconName && jsxRuntime.jsx(Icon, { name: iconName, size: "small" }), React__default["default"].isValidElement(children) ? children.props.children : children, suffix] }));
|
|
2234
|
+
const commonProps = Object.assign({ className: appendTabStylesToChildIfAsChild ? cvaTab({ className, isFullWidth }) : className }, rest);
|
|
2235
|
+
return (jsxRuntime.jsx(reactTabs.Trigger, { asChild: true, value: value, children: asChild && typeof children !== "string" ? (React__default["default"].cloneElement(children, Object.assign(Object.assign({}, commonProps), { children: renderContent() }))) : (jsxRuntime.jsx("button", Object.assign({}, commonProps, { "data-testid": dataTestId, children: renderContent() }))) }));
|
|
2233
2236
|
};
|
|
2234
2237
|
|
|
2235
2238
|
/**
|
|
2236
|
-
*
|
|
2239
|
+
* Wrapper for radix tab content component.
|
|
2237
2240
|
*/
|
|
2238
|
-
const
|
|
2239
|
-
|
|
2241
|
+
const TabContent = (_a) => {
|
|
2242
|
+
var { className, dataTestId, children } = _a, rest = __rest(_a, ["className", "dataTestId", "children"]);
|
|
2243
|
+
return (jsxRuntime.jsx(reactTabs.Content, Object.assign({ "data-testid": `${dataTestId}-content`, className: cvaTabContent({ className }) }, rest, { children: children })));
|
|
2240
2244
|
};
|
|
2241
2245
|
|
|
2242
2246
|
/**
|
|
2243
|
-
*
|
|
2247
|
+
* Wrapper for radix tab list component.
|
|
2244
2248
|
*/
|
|
2245
|
-
const
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
setSelectedTabId(defaultSelectedTabId);
|
|
2257
|
-
}
|
|
2258
|
-
}, [defaultSelectedTabId]);
|
|
2259
|
-
const isTabSelected = (panel) => {
|
|
2260
|
-
return panel.id === selectedTabId;
|
|
2261
|
-
};
|
|
2262
|
-
const handleTabClick = (panel) => {
|
|
2263
|
-
if (selectedTabId !== panel.id) {
|
|
2264
|
-
if (onSelectedTabChanged) {
|
|
2265
|
-
onSelectedTabChanged(panel.id);
|
|
2266
|
-
}
|
|
2267
|
-
setSelectedTabId(panel.id);
|
|
2268
|
-
}
|
|
2269
|
-
};
|
|
2270
|
-
return (jsxRuntime.jsxs("div", { className: cvaTabs({ className }), "data-testid": dataTestId, children: [jsxRuntime.jsx("ol", { role: "tablist", className: cvaTabsContainer(), children: React.Children.map(children, child => {
|
|
2271
|
-
const panel = child.props;
|
|
2272
|
-
return panel ? (jsxRuntime.jsx(Tab, { onTabClick: () => handleTabClick(panel), isSelected: panel.id === selectedTabId, isFullWidth: fullWidth, label: panel.label, iconName: panel.iconName, suffix: panel.suffix, dataTestId: panel.dataTestId })) : null;
|
|
2273
|
-
}) }), jsxRuntime.jsx("div", { className: cvaTabsPanels(), children: React.Children.map(children, child => {
|
|
2274
|
-
const panel = child === null || child === void 0 ? void 0 : child.props;
|
|
2275
|
-
if (!panel || (panel.id !== selectedTabId && !forceRender)) {
|
|
2276
|
-
return null;
|
|
2277
|
-
}
|
|
2278
|
-
return (jsxRuntime.jsx("div", { className: cvaTabsPanel({ isSelected: isTabSelected(panel) }), children: jsxRuntime.jsx(TabPanel, Object.assign({}, panel)) }));
|
|
2279
|
-
}) })] }));
|
|
2249
|
+
const TabList = (_a) => {
|
|
2250
|
+
var { className, dataTestId, children } = _a, rest = __rest(_a, ["className", "dataTestId", "children"]);
|
|
2251
|
+
return (jsxRuntime.jsx(reactTabs.List, Object.assign({ "data-testid": dataTestId, className: cvaTabList({ className }) }, rest, { children: children })));
|
|
2252
|
+
};
|
|
2253
|
+
|
|
2254
|
+
/**
|
|
2255
|
+
* Tabs are used to group different but related content, allowing users to navigate views without leaving the page. They always contain at least two items and one tab is active at a time. Tabs can be used on full page layouts or in components such as modals or tables.
|
|
2256
|
+
*/
|
|
2257
|
+
const Tabs = (_a) => {
|
|
2258
|
+
var { children, forceRender, className, dataTestId, fullWidth, onSelectedTabChanged } = _a, rest = __rest(_a, ["children", "forceRender", "className", "dataTestId", "fullWidth", "onSelectedTabChanged"]);
|
|
2259
|
+
return (jsxRuntime.jsx(reactTabs.Root, Object.assign({ className: cvaTabsRoot({ className }), "data-testid": dataTestId }, rest, { children: children })));
|
|
2280
2260
|
};
|
|
2281
2261
|
|
|
2282
2262
|
const cvaTimeline = cssClassVarianceUtilities.cvaMerge("ml-4");
|
|
@@ -3055,7 +3035,8 @@ exports.Spacer = Spacer;
|
|
|
3055
3035
|
exports.Spinner = Spinner;
|
|
3056
3036
|
exports.StarButton = StarButton;
|
|
3057
3037
|
exports.Tab = Tab;
|
|
3058
|
-
exports.
|
|
3038
|
+
exports.TabContent = TabContent;
|
|
3039
|
+
exports.TabList = TabList;
|
|
3059
3040
|
exports.Tabs = Tabs;
|
|
3060
3041
|
exports.Tag = Tag;
|
|
3061
3042
|
exports.Text = Text;
|
package/index.esm.js
CHANGED
|
@@ -13,6 +13,7 @@ import { useFloating, autoUpdate, offset, flip, shift, size, useClick, useDismis
|
|
|
13
13
|
import usePortal from 'react-useportal';
|
|
14
14
|
import { Link, UNSAFE_NavigationContext } from 'react-router-dom';
|
|
15
15
|
import { HelmetProvider, Helmet } from 'react-helmet-async';
|
|
16
|
+
import { Trigger, Content, List, Root } from '@radix-ui/react-tabs';
|
|
16
17
|
import { format, formatDistance } from 'date-fns';
|
|
17
18
|
import { isEqual } from 'lodash';
|
|
18
19
|
|
|
@@ -1841,10 +1842,17 @@ const Tip = ({ children, iconProps, dataTestId, className, placement = "bottom",
|
|
|
1841
1842
|
return (jsx("span", { "data-testid": dataTestId, className: cvaTip({ className }), children: jsxs(Popover, { placement: placement, activation: { click: true }, dataTestId: dataTestId !== null && dataTestId !== void 0 ? dataTestId : "", children: [jsx(PopoverTrigger, { children: jsx("div", { "data-testid": dataTestId && `${dataTestId}-trigger`, children: jsx(Icon, Object.assign({ name: "QuestionMarkCircle", size: "medium", dataTestId: dataTestId && `${dataTestId}-icon` }, iconProps)) }) }), jsx(PopoverContent, { children: jsxs("div", { className: cvaTipContent({ color: mode }), children: [jsx("div", { children: typeof children === "string" ? jsx("p", { children: children }) : children }), link ? (jsx("a", { href: link, children: jsx(Icon, { name: "ArrowRightCircle" }) })) : null] }) })] }) }));
|
|
1842
1843
|
};
|
|
1843
1844
|
|
|
1845
|
+
const cvaPageHeaderContainer = cvaMerge(["bg-white"], {
|
|
1846
|
+
variants: {
|
|
1847
|
+
withBorder: {
|
|
1848
|
+
true: ["border-b", "border-b-secondary-200"],
|
|
1849
|
+
false: "",
|
|
1850
|
+
},
|
|
1851
|
+
},
|
|
1852
|
+
});
|
|
1844
1853
|
const cvaPageHeader = cvaMerge([
|
|
1845
1854
|
"min-h-[72px]",
|
|
1846
1855
|
"box-border",
|
|
1847
|
-
"bg-white",
|
|
1848
1856
|
"px-6",
|
|
1849
1857
|
"py-5",
|
|
1850
1858
|
"flex",
|
|
@@ -1853,8 +1861,6 @@ const cvaPageHeader = cvaMerge([
|
|
|
1853
1861
|
"gap-x-4",
|
|
1854
1862
|
"gap-y-1",
|
|
1855
1863
|
"justify-between",
|
|
1856
|
-
"border-b",
|
|
1857
|
-
"border-b-secondary-200",
|
|
1858
1864
|
]);
|
|
1859
1865
|
const cvaPageHeaderHeading = cvaMerge(["flex", "text-slate-900", "text-2xl", "font-bold", "min-w-0"]);
|
|
1860
1866
|
const cvaPageHeaderHeadingContainer = cvaMerge(["flex", "gap-x-4", "items-center"]);
|
|
@@ -1875,8 +1881,11 @@ const cvaPageHeaderChildContainer = cvaMerge(["flex", "flex-wrap", "gap-x-6", "i
|
|
|
1875
1881
|
* @param {PageHeaderProps} props - The props for the PageHeader component
|
|
1876
1882
|
* @returns {JSX.Element} PageHeader component
|
|
1877
1883
|
*/
|
|
1878
|
-
const PageHeader = ({ className, dataTestId, action, showLoading, description, link, title, tag, backTo, tagColor, children, }) => {
|
|
1879
|
-
return (jsxs("div", { className:
|
|
1884
|
+
const PageHeader = ({ className, dataTestId, action, showLoading, description, link, title, tag, backTo, tagColor, children, tabsList, }) => {
|
|
1885
|
+
return (jsxs("div", { className: cvaPageHeaderContainer({
|
|
1886
|
+
className: `${className} tu-page-header`,
|
|
1887
|
+
withBorder: !Boolean(tabsList),
|
|
1888
|
+
}), "data-testid": dataTestId, children: [jsxs("div", { className: cvaPageHeader(), children: [jsxs("div", { className: cvaPageHeaderHeadingAccessoriesContainer(), "data-testid": dataTestId && `${dataTestId}-heading-container`, children: [jsxs("div", { className: cvaPageHeaderHeadingContainer(), children: [backTo && (jsx(IconButton, { to: backTo, renderAs: Link, color: "tertiary", variant: "transparent", size: "small", icon: jsx(Icon, { name: "ArrowLeft" }) })), jsx("h1", { className: cvaPageHeaderHeading(), "data-testid": dataTestId && `${dataTestId}-heading`, children: title }), description && !showLoading && (jsx(Tip, { dataTestId: dataTestId && `${dataTestId}-tip`, iconProps: { name: "QuestionMarkCircle" }, link: link, children: description }))] }), tag && !showLoading && (jsx(Tag, { dataTestId: dataTestId, color: tagColor, children: tag })), showLoading && jsx(Spinner, { dataTestId: dataTestId && `${dataTestId}-spinner`, centering: "vertically" }), action] }), jsx("div", { className: cvaPageHeaderChildContainer(), children: children })] }), tabsList] }));
|
|
1880
1889
|
};
|
|
1881
1890
|
|
|
1882
1891
|
const cvaPagination = cvaMerge(["flex", "items-center", "gap-1"]);
|
|
@@ -2138,116 +2147,87 @@ const Sidebar = ({ childContainerClassName, children, breakpoint = "lg", classNa
|
|
|
2138
2147
|
}) }))) }))) : null] }));
|
|
2139
2148
|
};
|
|
2140
2149
|
|
|
2150
|
+
const cvaTabsRoot = cvaMerge([]);
|
|
2151
|
+
const cvaTabList = cvaMerge([
|
|
2152
|
+
"flex",
|
|
2153
|
+
"flex-row",
|
|
2154
|
+
"border-b",
|
|
2155
|
+
"border-b-slate-200",
|
|
2156
|
+
"overflow-auto",
|
|
2157
|
+
"no-scrollbar",
|
|
2158
|
+
]);
|
|
2159
|
+
const cvaTabContent = cvaMerge([]);
|
|
2141
2160
|
const cvaTab = cvaMerge([
|
|
2142
|
-
"mb-px",
|
|
2143
|
-
"box-content",
|
|
2144
2161
|
"flex",
|
|
2145
|
-
"
|
|
2146
|
-
"
|
|
2147
|
-
"cursor-pointer items-center",
|
|
2148
|
-
"justify-center ",
|
|
2162
|
+
"items-center",
|
|
2163
|
+
"justify-center",
|
|
2149
2164
|
"gap-2",
|
|
2150
|
-
"
|
|
2151
|
-
"
|
|
2152
|
-
"
|
|
2165
|
+
"text-sm",
|
|
2166
|
+
"md:text-base",
|
|
2167
|
+
"px-4",
|
|
2168
|
+
"md:px-6",
|
|
2169
|
+
"py-2.5",
|
|
2170
|
+
"cursor-pointer",
|
|
2153
2171
|
"transition",
|
|
2154
2172
|
"duration-200",
|
|
2155
2173
|
"ease-in-out",
|
|
2174
|
+
"whitespace-nowrap",
|
|
2175
|
+
"data-[state=active]:border-b-2",
|
|
2176
|
+
"data-[state=active]:border-b-blue-600",
|
|
2177
|
+
"data-[state=active]:font-semibold",
|
|
2178
|
+
"data-[state=active]:text-slate-900",
|
|
2179
|
+
"data-[state=inactive]:font-medium",
|
|
2180
|
+
"data-[state=inactive]:text-slate-700",
|
|
2181
|
+
"data-[state=inactive]:hover:border-b-slate-400",
|
|
2182
|
+
"data-[state=inactive]:hover:text-slate-900",
|
|
2183
|
+
"disabled:cursor-not-allowed",
|
|
2184
|
+
"data-[state=active]disabled:text-slate-400",
|
|
2185
|
+
"data-[state=inactive]:disabled:text-slate-400",
|
|
2156
2186
|
], {
|
|
2157
2187
|
variants: {
|
|
2158
|
-
isSelected: {
|
|
2159
|
-
true: "border-b-blue-600 hover:text-neutral-500",
|
|
2160
|
-
false: "border-neutral-200 text-neutral-500 hover:border-b-neutral-500",
|
|
2161
|
-
},
|
|
2162
2188
|
isFullWidth: {
|
|
2163
2189
|
true: "w-full",
|
|
2164
2190
|
false: "",
|
|
2165
2191
|
},
|
|
2166
2192
|
},
|
|
2167
2193
|
defaultVariants: {
|
|
2168
|
-
isSelected: false,
|
|
2169
2194
|
isFullWidth: false,
|
|
2170
2195
|
},
|
|
2171
2196
|
});
|
|
2172
|
-
cvaMerge(["whitespace-no-wrap", "mr-4", "overflow-hidden"]);
|
|
2173
|
-
const cvaTabs = cvaMerge(["flex", "flex-col"]);
|
|
2174
|
-
const cvaTabsPanels = cvaMerge(["mt-4", "flex", "h-full"]);
|
|
2175
|
-
const cvaTabsPanel = cvaMerge([], {
|
|
2176
|
-
variants: {
|
|
2177
|
-
isSelected: {
|
|
2178
|
-
true: "flex-1",
|
|
2179
|
-
false: "grow-0",
|
|
2180
|
-
},
|
|
2181
|
-
},
|
|
2182
|
-
defaultVariants: {
|
|
2183
|
-
isSelected: false,
|
|
2184
|
-
},
|
|
2185
|
-
});
|
|
2186
|
-
const cvaTabPanel = cvaMerge(["flex-1"]);
|
|
2187
|
-
const cvaTabsContainer = cvaMerge([
|
|
2188
|
-
"m-0",
|
|
2189
|
-
"flex",
|
|
2190
|
-
"list-none",
|
|
2191
|
-
"items-center",
|
|
2192
|
-
"gap-x-4",
|
|
2193
|
-
"border-b",
|
|
2194
|
-
"border-solid",
|
|
2195
|
-
"border-neutral-100",
|
|
2196
|
-
"p-0",
|
|
2197
|
-
]);
|
|
2198
2197
|
|
|
2199
2198
|
/**
|
|
2200
|
-
*
|
|
2199
|
+
* Wrapper for radix tab component.
|
|
2200
|
+
* We add a custom implementation of the asChild prop to make it easy to make the child element look like other tabs.
|
|
2201
2201
|
*/
|
|
2202
|
-
const Tab = (
|
|
2203
|
-
|
|
2202
|
+
const Tab = (_a) => {
|
|
2203
|
+
var { value, isFullWidth = false, iconName, dataTestId, className, children, suffix, asChild, appendTabStylesToChildIfAsChild = true } = _a, rest = __rest(_a, ["value", "isFullWidth", "iconName", "dataTestId", "className", "children", "suffix", "asChild", "appendTabStylesToChildIfAsChild"]);
|
|
2204
|
+
const renderContent = () => (jsxs(Fragment, { children: [iconName && jsx(Icon, { name: iconName, size: "small" }), React__default.isValidElement(children) ? children.props.children : children, suffix] }));
|
|
2205
|
+
const commonProps = Object.assign({ className: appendTabStylesToChildIfAsChild ? cvaTab({ className, isFullWidth }) : className }, rest);
|
|
2206
|
+
return (jsx(Trigger, { asChild: true, value: value, children: asChild && typeof children !== "string" ? (React__default.cloneElement(children, Object.assign(Object.assign({}, commonProps), { children: renderContent() }))) : (jsx("button", Object.assign({}, commonProps, { "data-testid": dataTestId, children: renderContent() }))) }));
|
|
2204
2207
|
};
|
|
2205
2208
|
|
|
2206
2209
|
/**
|
|
2207
|
-
*
|
|
2210
|
+
* Wrapper for radix tab content component.
|
|
2208
2211
|
*/
|
|
2209
|
-
const
|
|
2210
|
-
|
|
2212
|
+
const TabContent = (_a) => {
|
|
2213
|
+
var { className, dataTestId, children } = _a, rest = __rest(_a, ["className", "dataTestId", "children"]);
|
|
2214
|
+
return (jsx(Content, Object.assign({ "data-testid": `${dataTestId}-content`, className: cvaTabContent({ className }) }, rest, { children: children })));
|
|
2211
2215
|
};
|
|
2212
2216
|
|
|
2213
2217
|
/**
|
|
2214
|
-
*
|
|
2218
|
+
* Wrapper for radix tab list component.
|
|
2215
2219
|
*/
|
|
2216
|
-
const
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
setSelectedTabId(defaultSelectedTabId);
|
|
2228
|
-
}
|
|
2229
|
-
}, [defaultSelectedTabId]);
|
|
2230
|
-
const isTabSelected = (panel) => {
|
|
2231
|
-
return panel.id === selectedTabId;
|
|
2232
|
-
};
|
|
2233
|
-
const handleTabClick = (panel) => {
|
|
2234
|
-
if (selectedTabId !== panel.id) {
|
|
2235
|
-
if (onSelectedTabChanged) {
|
|
2236
|
-
onSelectedTabChanged(panel.id);
|
|
2237
|
-
}
|
|
2238
|
-
setSelectedTabId(panel.id);
|
|
2239
|
-
}
|
|
2240
|
-
};
|
|
2241
|
-
return (jsxs("div", { className: cvaTabs({ className }), "data-testid": dataTestId, children: [jsx("ol", { role: "tablist", className: cvaTabsContainer(), children: Children.map(children, child => {
|
|
2242
|
-
const panel = child.props;
|
|
2243
|
-
return panel ? (jsx(Tab, { onTabClick: () => handleTabClick(panel), isSelected: panel.id === selectedTabId, isFullWidth: fullWidth, label: panel.label, iconName: panel.iconName, suffix: panel.suffix, dataTestId: panel.dataTestId })) : null;
|
|
2244
|
-
}) }), jsx("div", { className: cvaTabsPanels(), children: Children.map(children, child => {
|
|
2245
|
-
const panel = child === null || child === void 0 ? void 0 : child.props;
|
|
2246
|
-
if (!panel || (panel.id !== selectedTabId && !forceRender)) {
|
|
2247
|
-
return null;
|
|
2248
|
-
}
|
|
2249
|
-
return (jsx("div", { className: cvaTabsPanel({ isSelected: isTabSelected(panel) }), children: jsx(TabPanel, Object.assign({}, panel)) }));
|
|
2250
|
-
}) })] }));
|
|
2220
|
+
const TabList = (_a) => {
|
|
2221
|
+
var { className, dataTestId, children } = _a, rest = __rest(_a, ["className", "dataTestId", "children"]);
|
|
2222
|
+
return (jsx(List, Object.assign({ "data-testid": dataTestId, className: cvaTabList({ className }) }, rest, { children: children })));
|
|
2223
|
+
};
|
|
2224
|
+
|
|
2225
|
+
/**
|
|
2226
|
+
* Tabs are used to group different but related content, allowing users to navigate views without leaving the page. They always contain at least two items and one tab is active at a time. Tabs can be used on full page layouts or in components such as modals or tables.
|
|
2227
|
+
*/
|
|
2228
|
+
const Tabs = (_a) => {
|
|
2229
|
+
var { children, forceRender, className, dataTestId, fullWidth, onSelectedTabChanged } = _a, rest = __rest(_a, ["children", "forceRender", "className", "dataTestId", "fullWidth", "onSelectedTabChanged"]);
|
|
2230
|
+
return (jsx(Root, Object.assign({ className: cvaTabsRoot({ className }), "data-testid": dataTestId }, rest, { children: children })));
|
|
2251
2231
|
};
|
|
2252
2232
|
|
|
2253
2233
|
const cvaTimeline = cvaMerge("ml-4");
|
|
@@ -2986,4 +2966,4 @@ const useVisibilityChange = ({ onChange, targetState = "hidden" }) => {
|
|
|
2986
2966
|
}, [onChange, targetState]);
|
|
2987
2967
|
};
|
|
2988
2968
|
|
|
2989
|
-
export { Alert, Badge, Button, Card, CardBody, CardFooter, CardHeader, Collapse, CopyableText, DayPicker, DayPickerPopover, DayRangePicker, Drawer, EmptyState, ExternalLink, Heading, Icon, IconButton, Indicator, MenuItem, MenuList, Modal, ModalBackdrop, MoreMenu, PackageNameStoryComponent, PageHeader, Pagination, Popover, PopoverContent, PopoverTitle, PopoverTrigger, Prompt, ROLE_CARD, SectionHeader, Sidebar, SkeletonLines, Spacer, Spinner, StarButton, Tab,
|
|
2969
|
+
export { Alert, Badge, Button, Card, CardBody, CardFooter, CardHeader, Collapse, CopyableText, DayPicker, DayPickerPopover, DayRangePicker, Drawer, EmptyState, ExternalLink, Heading, Icon, IconButton, Indicator, MenuItem, MenuList, Modal, ModalBackdrop, MoreMenu, PackageNameStoryComponent, PageHeader, Pagination, Popover, PopoverContent, PopoverTitle, PopoverTrigger, Prompt, ROLE_CARD, SectionHeader, Sidebar, SkeletonLines, Spacer, Spinner, StarButton, Tab, TabContent, TabList, Tabs, Tag, Text, Timeline, TimelineElement, Tip, Tooltip, ValueBar, WidgetBody, cvaButton, cvaButtonSpinner, cvaClickable, cvaIconButtonContainer, cvaIndicator, cvaIndicatorIcon, cvaIndicatorIconBackground, cvaIndicatorLabel, cvaIndicatorPing, cvaMenuItem, cvaMenuItemLabel, cvaMenuItemPrefix, cvaMenuItemSuffix, docs, getDevicePixelRatio, getValueBarColorByValue, iconColorNames, iconPalette, setLocalStorage, useClickOutside, useContainerProps, useContinuousTimeout, useDebounce, useDevicePixelRatio, useGeometry, useHover, useIsFirstRender, useIsFullscreen, useIsTextCutOff, useLocalStorage, useLocalStorageReducer, useModal, useOptionallyElevatedState, useOverflowItems, usePopoverContext, usePrompt, useResize, useSelfUpdatingRef, useTimeout, useVisibilityChange };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.209",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"react-day-picker": "^8.9.1",
|
|
15
15
|
"date-fns": "^2.30.0",
|
|
16
16
|
"@floating-ui/react": "^0.26.2",
|
|
17
|
+
"@radix-ui/react-tabs": "^1.0.4",
|
|
17
18
|
"@trackunit/ui-icons": "*",
|
|
18
19
|
"@trackunit/shared-utils": "*",
|
|
19
20
|
"react-useportal": "1.0.18",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ReactElement } from "react";
|
|
2
2
|
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
+
import { TabListProps } from "../Tabs/TabList";
|
|
3
4
|
import { TagColors } from "../Tag";
|
|
4
5
|
export interface PageHeaderProps extends CommonProps {
|
|
5
6
|
/**
|
|
@@ -40,6 +41,7 @@ export interface PageHeaderProps extends CommonProps {
|
|
|
40
41
|
* The link to the previous page which will be rendered inside an IconButton component to the left of the heading.
|
|
41
42
|
*/
|
|
42
43
|
backTo?: string;
|
|
44
|
+
tabsList?: ReactElement<TabListProps>;
|
|
43
45
|
}
|
|
44
46
|
/**
|
|
45
47
|
* Pageheader component is used to display a page header.
|
|
@@ -49,4 +51,4 @@ export interface PageHeaderProps extends CommonProps {
|
|
|
49
51
|
* @param {PageHeaderProps} props - The props for the PageHeader component
|
|
50
52
|
* @returns {JSX.Element} PageHeader component
|
|
51
53
|
*/
|
|
52
|
-
export declare const PageHeader: ({ className, dataTestId, action, showLoading, description, link, title, tag, backTo, tagColor, children, }: PageHeaderProps) => JSX.Element;
|
|
54
|
+
export declare const PageHeader: ({ className, dataTestId, action, showLoading, description, link, title, tag, backTo, tagColor, children, tabsList, }: PageHeaderProps) => JSX.Element;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export declare const cvaPageHeaderContainer: (props?: ({
|
|
2
|
+
withBorder?: boolean | null | undefined;
|
|
3
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
1
4
|
export declare const cvaPageHeader: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
2
5
|
export declare const cvaPageHeaderHeading: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
3
6
|
export declare const cvaPageHeaderHeadingContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
@@ -1,15 +1,46 @@
|
|
|
1
|
+
import { TabsTriggerProps } from "@radix-ui/react-tabs";
|
|
1
2
|
import { IconName } from "@trackunit/ui-icons";
|
|
2
|
-
import
|
|
3
|
-
export interface
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import { ReactElement, ReactNode } from "react";
|
|
4
|
+
export interface TabChildProps {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface TabProps extends TabsTriggerProps {
|
|
9
|
+
/**
|
|
10
|
+
* Specifies whether the tab should occupy the full width of its container.
|
|
11
|
+
*/
|
|
6
12
|
isFullWidth?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* A data-testid attribute for testing purposes.
|
|
15
|
+
*/
|
|
7
16
|
dataTestId?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The text content of the tab.
|
|
19
|
+
*/
|
|
20
|
+
text?: string;
|
|
21
|
+
/**
|
|
22
|
+
* A JSX element to be rendered as a suffix to the tab content.
|
|
23
|
+
*/
|
|
8
24
|
suffix?: JSX.Element;
|
|
25
|
+
/**
|
|
26
|
+
* The name of the icon associated with the tab.
|
|
27
|
+
*/
|
|
9
28
|
iconName?: IconName;
|
|
10
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Child component to render in the tab.
|
|
31
|
+
*/
|
|
32
|
+
children: ReactElement<TabChildProps> | string;
|
|
33
|
+
/**
|
|
34
|
+
* Only applicable if asChild is true.
|
|
35
|
+
* If true the tab classNames will be added to the child element.
|
|
36
|
+
* If false only the child elements classNames will be used.
|
|
37
|
+
*
|
|
38
|
+
* @default true
|
|
39
|
+
*/
|
|
40
|
+
appendTabStylesToChildIfAsChild?: boolean;
|
|
11
41
|
}
|
|
12
42
|
/**
|
|
13
|
-
*
|
|
43
|
+
* Wrapper for radix tab component.
|
|
44
|
+
* We add a custom implementation of the asChild prop to make it easy to make the child element look like other tabs.
|
|
14
45
|
*/
|
|
15
|
-
export declare const Tab: ({
|
|
46
|
+
export declare const Tab: ({ value, isFullWidth, iconName, dataTestId, className, children, suffix, asChild, appendTabStylesToChildIfAsChild, ...rest }: TabProps) => JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TabsContentProps } from "@radix-ui/react-tabs";
|
|
2
|
+
import { IconName } from "@trackunit/ui-icons";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
export interface TabContentProps extends TabsContentProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
dataTestId?: string;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
suffix?: JSX.Element;
|
|
9
|
+
iconName?: IconName;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Wrapper for radix tab content component.
|
|
13
|
+
*/
|
|
14
|
+
export declare const TabContent: ({ className, dataTestId, children, ...rest }: TabContentProps) => JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TabsListProps } from "@radix-ui/react-tabs";
|
|
2
|
+
import { ReactElement } from "react";
|
|
3
|
+
import { TabContentProps } from "./TabContent";
|
|
4
|
+
export interface TabListProps extends TabsListProps {
|
|
5
|
+
/**
|
|
6
|
+
* The child elements to be displayed within the Tabs component.
|
|
7
|
+
*/
|
|
8
|
+
children: ReactElement<TabContentProps>[];
|
|
9
|
+
/**
|
|
10
|
+
* A custom class name to be attached to root element
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
/**
|
|
14
|
+
* An ID that can be used in tests to locate the component.
|
|
15
|
+
*/
|
|
16
|
+
dataTestId?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Wrapper for radix tab list component.
|
|
20
|
+
*/
|
|
21
|
+
export declare const TabList: ({ className, dataTestId, children, ...rest }: TabListProps) => JSX.Element;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
+
import { TabsProps as TabsRootProps } from "@radix-ui/react-tabs";
|
|
1
2
|
import { ReactNode } from "react";
|
|
2
|
-
export interface TabsProps {
|
|
3
|
-
/**
|
|
4
|
-
* The ID of the tab that should be selected by default.
|
|
5
|
-
*/
|
|
6
|
-
defaultSelectedTabId?: string | number;
|
|
3
|
+
export interface TabsProps extends TabsRootProps {
|
|
7
4
|
/**
|
|
8
5
|
* If set to true, forces the content of all tabs to render even if not selected.
|
|
9
6
|
*/
|
|
@@ -15,7 +12,7 @@ export interface TabsProps {
|
|
|
15
12
|
/**
|
|
16
13
|
* The child elements to be displayed within the Tabs component.
|
|
17
14
|
*/
|
|
18
|
-
children
|
|
15
|
+
children: ReactNode;
|
|
19
16
|
/**
|
|
20
17
|
* A custom class name to be attached to root element
|
|
21
18
|
*/
|
|
@@ -32,6 +29,6 @@ export interface TabsProps {
|
|
|
32
29
|
onSelectedTabChanged?: (id: string | number) => void;
|
|
33
30
|
}
|
|
34
31
|
/**
|
|
35
|
-
*
|
|
32
|
+
* Tabs are used to group different but related content, allowing users to navigate views without leaving the page. They always contain at least two items and one tab is active at a time. Tabs can be used on full page layouts or in components such as modals or tables.
|
|
36
33
|
*/
|
|
37
|
-
export declare const Tabs: ({
|
|
34
|
+
export declare const Tabs: ({ children, forceRender, className, dataTestId, fullWidth, onSelectedTabChanged, ...rest }: TabsProps) => JSX.Element;
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
+
export declare const cvaTabsRoot: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
2
|
+
export declare const cvaTabList: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
3
|
+
export declare const cvaTabContent: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
1
4
|
export declare const cvaTab: (props?: ({
|
|
2
|
-
isSelected?: boolean | null | undefined;
|
|
3
5
|
isFullWidth?: boolean | null | undefined;
|
|
4
6
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
5
|
-
export declare const cvaTabNoWrapContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
6
|
-
export declare const cvaTabs: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
7
|
-
export declare const cvaTabsPanels: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
8
|
-
export declare const cvaTabsPanel: (props?: ({
|
|
9
|
-
isSelected?: boolean | null | undefined;
|
|
10
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
11
|
-
export declare const cvaTabPanel: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
12
|
-
export declare const cvaTabsContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
@@ -24,7 +24,8 @@ export * from "./SkeletonLines";
|
|
|
24
24
|
export * from "./Spacer";
|
|
25
25
|
export * from "./Spinner";
|
|
26
26
|
export * from "./Tabs/Tab";
|
|
27
|
-
export * from "./Tabs/
|
|
27
|
+
export * from "./Tabs/TabContent";
|
|
28
|
+
export * from "./Tabs/TabList";
|
|
28
29
|
export * from "./Tabs/Tabs";
|
|
29
30
|
export * from "./Tag";
|
|
30
31
|
export * from "./Text";
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { IconName } from "@trackunit/ui-icons";
|
|
2
|
-
import { ReactNode } from "react";
|
|
3
|
-
export interface TabPanelProps {
|
|
4
|
-
id: string | number;
|
|
5
|
-
label: string | ReactNode;
|
|
6
|
-
iconName?: IconName;
|
|
7
|
-
suffix?: JSX.Element;
|
|
8
|
-
className?: string;
|
|
9
|
-
dataTestId?: string;
|
|
10
|
-
children?: ReactNode;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
*/
|
|
15
|
-
export declare const TabPanel: ({ id, label, iconName, suffix, className, dataTestId, children }: TabPanelProps) => JSX.Element;
|