@fanvue/ui 3.42.2 → 3.43.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/cjs/components/Table/TableMobileRow.cjs +48 -0
- package/dist/cjs/components/Table/TableMobileRow.cjs.map +1 -0
- package/dist/cjs/index.cjs +2 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/Table/TableMobileRow.mjs +31 -0
- package/dist/components/Table/TableMobileRow.mjs.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
+
const React = require("react");
|
|
6
|
+
const cn = require("../../utils/cn.cjs");
|
|
7
|
+
function _interopNamespaceDefault(e) {
|
|
8
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
9
|
+
if (e) {
|
|
10
|
+
for (const k in e) {
|
|
11
|
+
if (k !== "default") {
|
|
12
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: () => e[k]
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
n.default = e;
|
|
21
|
+
return Object.freeze(n);
|
|
22
|
+
}
|
|
23
|
+
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
24
|
+
const TableMobileRow = React__namespace.forwardRef(
|
|
25
|
+
({ className, badge, title, description, actions, ...props }, ref) => {
|
|
26
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
ref,
|
|
30
|
+
className: cn.cn("flex w-full flex-col gap-4 border-border-primary border-b py-4", className),
|
|
31
|
+
...props,
|
|
32
|
+
children: [
|
|
33
|
+
(badge || actions) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-6 items-center justify-between gap-2", children: [
|
|
34
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-w-0 items-center", children: badge }),
|
|
35
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center gap-2", children: actions })
|
|
36
|
+
] }),
|
|
37
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col", children: [
|
|
38
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "typography-body-default-16px-semibold truncate text-content-primary", children: title }),
|
|
39
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "typography-body-small-14px-regular truncate text-content-tertiary", children: description })
|
|
40
|
+
] })
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
TableMobileRow.displayName = "TableMobileRow";
|
|
47
|
+
exports.TableMobileRow = TableMobileRow;
|
|
48
|
+
//# sourceMappingURL=TableMobileRow.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableMobileRow.cjs","sources":["../../../../src/components/Table/TableMobileRow.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\nexport interface TableMobileRowProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> {\n /** Status or type label above the title, typically a {@link Pill}. */\n badge?: React.ReactNode;\n /** Primary line (semibold body). */\n title: React.ReactNode;\n /** Secondary line beneath the title (muted). */\n description?: React.ReactNode;\n /** Trailing controls on the badge line, such as a favourite toggle and a navigation {@link IconButton}. */\n actions?: React.ReactNode;\n}\n\n/**\n * Stacked row that stands in for a table row on narrow screens (Figma `V2 Table Mobile`):\n * a badge and actions line, then a title with a description, closed by a divider.\n *\n * @example\n * ```tsx\n * <TableMobileRow\n * badge={<Pill variant=\"green\">Dynamic</Pill>}\n * title=\"Top Spenders\"\n * description=\"320 members\"\n * actions={<IconButton aria-label=\"Open list\" icon={<ChevronRightIcon />} />}\n * />\n * ```\n */\nexport const TableMobileRow = React.forwardRef<HTMLDivElement, TableMobileRowProps>(\n ({ className, badge, title, description, actions, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\"flex w-full flex-col gap-4 border-border-primary border-b py-4\", className)}\n {...props}\n >\n {(badge || actions) && (\n <div className=\"flex min-h-6 items-center justify-between gap-2\">\n <div className=\"flex min-w-0 items-center\">{badge}</div>\n {actions && <div className=\"flex shrink-0 items-center gap-2\">{actions}</div>}\n </div>\n )}\n <div className=\"flex min-w-0 flex-col\">\n <p className=\"typography-body-default-16px-semibold truncate text-content-primary\">\n {title}\n </p>\n {description && (\n <p className=\"typography-body-small-14px-regular truncate text-content-tertiary\">\n {description}\n </p>\n )}\n </div>\n </div>\n );\n },\n);\nTableMobileRow.displayName = \"TableMobileRow\";\n"],"names":["React","jsxs","cn","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA4BO,MAAM,iBAAiBA,iBAAM;AAAA,EAClC,CAAC,EAAE,WAAW,OAAO,OAAO,aAAa,SAAS,GAAG,MAAA,GAAS,QAAQ;AACpE,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAWC,GAAAA,GAAG,kEAAkE,SAAS;AAAA,QACxF,GAAG;AAAA,QAEF,UAAA;AAAA,WAAA,SAAS,YACTD,2BAAAA,KAAC,OAAA,EAAI,WAAU,mDACb,UAAA;AAAA,YAAAE,2BAAAA,IAAC,OAAA,EAAI,WAAU,6BAA6B,UAAA,OAAM;AAAA,YACjD,WAAWA,2BAAAA,IAAC,OAAA,EAAI,WAAU,oCAAoC,UAAA,QAAA,CAAQ;AAAA,UAAA,GACzE;AAAA,UAEFF,2BAAAA,KAAC,OAAA,EAAI,WAAU,yBACb,UAAA;AAAA,YAAAE,2BAAAA,IAAC,KAAA,EAAE,WAAU,uEACV,UAAA,OACH;AAAA,YACC,eACCA,2BAAAA,IAAC,KAAA,EAAE,WAAU,qEACV,UAAA,YAAA,CACH;AAAA,UAAA,EAAA,CAEJ;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACA,eAAe,cAAc;;"}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -257,6 +257,7 @@ const SwitchButton = require("./components/SwitchButton/SwitchButton.cjs");
|
|
|
257
257
|
const SwitchField = require("./components/SwitchField/SwitchField.cjs");
|
|
258
258
|
const SwitchToggle = require("./components/SwitchToggle/SwitchToggle.cjs");
|
|
259
259
|
const Table = require("./components/Table/Table.cjs");
|
|
260
|
+
const TableMobileRow = require("./components/Table/TableMobileRow.cjs");
|
|
260
261
|
const TablePagination = require("./components/Table/TablePagination.cjs");
|
|
261
262
|
const Tabs = require("./components/Tabs/Tabs.cjs");
|
|
262
263
|
const TabsContent = require("./components/Tabs/TabsContent.cjs");
|
|
@@ -606,6 +607,7 @@ exports.TableSortLabel = Table.TableSortLabel;
|
|
|
606
607
|
exports.TableStackedText = Table.TableStackedText;
|
|
607
608
|
exports.TableStatusDot = Table.TableStatusDot;
|
|
608
609
|
exports.TableToolbar = Table.TableToolbar;
|
|
610
|
+
exports.TableMobileRow = TableMobileRow.TableMobileRow;
|
|
609
611
|
exports.TablePagination = TablePagination.TablePagination;
|
|
610
612
|
exports.Tabs = Tabs.Tabs;
|
|
611
613
|
exports.TabsContent = TabsContent.TabsContent;
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../utils/cn.mjs";
|
|
5
|
+
const TableMobileRow = React.forwardRef(
|
|
6
|
+
({ className, badge, title, description, actions, ...props }, ref) => {
|
|
7
|
+
return /* @__PURE__ */ jsxs(
|
|
8
|
+
"div",
|
|
9
|
+
{
|
|
10
|
+
ref,
|
|
11
|
+
className: cn("flex w-full flex-col gap-4 border-border-primary border-b py-4", className),
|
|
12
|
+
...props,
|
|
13
|
+
children: [
|
|
14
|
+
(badge || actions) && /* @__PURE__ */ jsxs("div", { className: "flex min-h-6 items-center justify-between gap-2", children: [
|
|
15
|
+
/* @__PURE__ */ jsx("div", { className: "flex min-w-0 items-center", children: badge }),
|
|
16
|
+
actions && /* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center gap-2", children: actions })
|
|
17
|
+
] }),
|
|
18
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col", children: [
|
|
19
|
+
/* @__PURE__ */ jsx("p", { className: "typography-body-default-16px-semibold truncate text-content-primary", children: title }),
|
|
20
|
+
description && /* @__PURE__ */ jsx("p", { className: "typography-body-small-14px-regular truncate text-content-tertiary", children: description })
|
|
21
|
+
] })
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
TableMobileRow.displayName = "TableMobileRow";
|
|
28
|
+
export {
|
|
29
|
+
TableMobileRow
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=TableMobileRow.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableMobileRow.mjs","sources":["../../../src/components/Table/TableMobileRow.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\nexport interface TableMobileRowProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> {\n /** Status or type label above the title, typically a {@link Pill}. */\n badge?: React.ReactNode;\n /** Primary line (semibold body). */\n title: React.ReactNode;\n /** Secondary line beneath the title (muted). */\n description?: React.ReactNode;\n /** Trailing controls on the badge line, such as a favourite toggle and a navigation {@link IconButton}. */\n actions?: React.ReactNode;\n}\n\n/**\n * Stacked row that stands in for a table row on narrow screens (Figma `V2 Table Mobile`):\n * a badge and actions line, then a title with a description, closed by a divider.\n *\n * @example\n * ```tsx\n * <TableMobileRow\n * badge={<Pill variant=\"green\">Dynamic</Pill>}\n * title=\"Top Spenders\"\n * description=\"320 members\"\n * actions={<IconButton aria-label=\"Open list\" icon={<ChevronRightIcon />} />}\n * />\n * ```\n */\nexport const TableMobileRow = React.forwardRef<HTMLDivElement, TableMobileRowProps>(\n ({ className, badge, title, description, actions, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\"flex w-full flex-col gap-4 border-border-primary border-b py-4\", className)}\n {...props}\n >\n {(badge || actions) && (\n <div className=\"flex min-h-6 items-center justify-between gap-2\">\n <div className=\"flex min-w-0 items-center\">{badge}</div>\n {actions && <div className=\"flex shrink-0 items-center gap-2\">{actions}</div>}\n </div>\n )}\n <div className=\"flex min-w-0 flex-col\">\n <p className=\"typography-body-default-16px-semibold truncate text-content-primary\">\n {title}\n </p>\n {description && (\n <p className=\"typography-body-small-14px-regular truncate text-content-tertiary\">\n {description}\n </p>\n )}\n </div>\n </div>\n );\n },\n);\nTableMobileRow.displayName = \"TableMobileRow\";\n"],"names":[],"mappings":";;;;AA4BO,MAAM,iBAAiB,MAAM;AAAA,EAClC,CAAC,EAAE,WAAW,OAAO,OAAO,aAAa,SAAS,GAAG,MAAA,GAAS,QAAQ;AACpE,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAW,GAAG,kEAAkE,SAAS;AAAA,QACxF,GAAG;AAAA,QAEF,UAAA;AAAA,WAAA,SAAS,YACT,qBAAC,OAAA,EAAI,WAAU,mDACb,UAAA;AAAA,YAAA,oBAAC,OAAA,EAAI,WAAU,6BAA6B,UAAA,OAAM;AAAA,YACjD,WAAW,oBAAC,OAAA,EAAI,WAAU,oCAAoC,UAAA,QAAA,CAAQ;AAAA,UAAA,GACzE;AAAA,UAEF,qBAAC,OAAA,EAAI,WAAU,yBACb,UAAA;AAAA,YAAA,oBAAC,KAAA,EAAE,WAAU,uEACV,UAAA,OACH;AAAA,YACC,eACC,oBAAC,KAAA,EAAE,WAAU,qEACV,UAAA,YAAA,CACH;AAAA,UAAA,EAAA,CAEJ;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACA,eAAe,cAAc;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6324,6 +6324,33 @@ export declare interface TableMediaThumbnailProps extends Omit<React_2.HTMLAttri
|
|
|
6324
6324
|
/** Pixel size of the square {@link TableMediaThumbnail}. */
|
|
6325
6325
|
export declare type TableMediaThumbnailSize = "48" | "32";
|
|
6326
6326
|
|
|
6327
|
+
/**
|
|
6328
|
+
* Stacked row that stands in for a table row on narrow screens (Figma `V2 Table Mobile`):
|
|
6329
|
+
* a badge and actions line, then a title with a description, closed by a divider.
|
|
6330
|
+
*
|
|
6331
|
+
* @example
|
|
6332
|
+
* ```tsx
|
|
6333
|
+
* <TableMobileRow
|
|
6334
|
+
* badge={<Pill variant="green">Dynamic</Pill>}
|
|
6335
|
+
* title="Top Spenders"
|
|
6336
|
+
* description="320 members"
|
|
6337
|
+
* actions={<IconButton aria-label="Open list" icon={<ChevronRightIcon />} />}
|
|
6338
|
+
* />
|
|
6339
|
+
* ```
|
|
6340
|
+
*/
|
|
6341
|
+
export declare const TableMobileRow: React_2.ForwardRefExoticComponent<TableMobileRowProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
6342
|
+
|
|
6343
|
+
export declare interface TableMobileRowProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
6344
|
+
/** Status or type label above the title, typically a {@link Pill}. */
|
|
6345
|
+
badge?: React_2.ReactNode;
|
|
6346
|
+
/** Primary line (semibold body). */
|
|
6347
|
+
title: React_2.ReactNode;
|
|
6348
|
+
/** Secondary line beneath the title (muted). */
|
|
6349
|
+
description?: React_2.ReactNode;
|
|
6350
|
+
/** Trailing controls on the badge line, such as a favourite toggle and a navigation {@link IconButton}. */
|
|
6351
|
+
actions?: React_2.ReactNode;
|
|
6352
|
+
}
|
|
6353
|
+
|
|
6327
6354
|
/**
|
|
6328
6355
|
* Footer bar for data tables: rows-per-page control, page navigation, and
|
|
6329
6356
|
* range summary. Pair `paginationSlot` with {@link Pagination} for numbered
|
package/dist/index.mjs
CHANGED
|
@@ -255,6 +255,7 @@ import { SwitchButton } from "./components/SwitchButton/SwitchButton.mjs";
|
|
|
255
255
|
import { SwitchField } from "./components/SwitchField/SwitchField.mjs";
|
|
256
256
|
import { SwitchToggle } from "./components/SwitchToggle/SwitchToggle.mjs";
|
|
257
257
|
import { Table, TableBody, TableCard, TableCell, TableCellContent, TableCellGroup, TableFooter, TableHead, TableHeader, TableLineClamp, TableMediaThumbnail, TablePillProgressLayout, TableProgressTrack, TableRow, TableRowsPerPageSelect, TableScrollArea, TableSortLabel, TableStackedText, TableStatusDot, TableToolbar } from "./components/Table/Table.mjs";
|
|
258
|
+
import { TableMobileRow } from "./components/Table/TableMobileRow.mjs";
|
|
258
259
|
import { TablePagination } from "./components/Table/TablePagination.mjs";
|
|
259
260
|
import { Tabs } from "./components/Tabs/Tabs.mjs";
|
|
260
261
|
import { TabsContent } from "./components/Tabs/TabsContent.mjs";
|
|
@@ -568,6 +569,7 @@ export {
|
|
|
568
569
|
TableHeader,
|
|
569
570
|
TableLineClamp,
|
|
570
571
|
TableMediaThumbnail,
|
|
572
|
+
TableMobileRow,
|
|
571
573
|
TablePagination,
|
|
572
574
|
TablePillProgressLayout,
|
|
573
575
|
TableProgressTrack,
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|