@fanvue/ui 3.45.0 → 3.47.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.
@@ -2,52 +2,95 @@
2
2
  import { jsxs, jsx } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { cn } from "../../utils/cn.mjs";
5
- const TablePagination = React.forwardRef(
6
- ({ className, layout = "desktop", leadingSlot, paginationSlot, summary, ...props }, ref) => {
7
- if (layout === "mobile") {
8
- return /* @__PURE__ */ jsxs(
9
- "div",
10
- {
11
- ref,
12
- className: cn("flex w-full max-w-full flex-col gap-4 px-3 py-3", className),
13
- ...props,
14
- children: [
15
- /* @__PURE__ */ jsxs("div", { className: "flex w-full items-center gap-2", children: [
16
- leadingSlot != null ? /* @__PURE__ */ jsx("div", { className: "flex min-w-0 shrink-0 items-center", children: leadingSlot }) : null,
17
- /* @__PURE__ */ jsx(
18
- "div",
19
- {
20
- className: cn(
21
- "typography-description-12px-regular min-w-0 flex-1 text-content-secondary",
22
- leadingSlot == null && "text-left",
23
- leadingSlot != null && "text-right"
24
- ),
25
- children: summary
26
- }
27
- )
28
- ] }),
29
- paginationSlot != null ? /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: paginationSlot }) : null
30
- ]
31
- }
32
- );
33
- }
5
+ import { ChevronDownIcon } from "../Icons/ChevronDownIcon.mjs";
6
+ import { ChevronLeftIcon } from "../Icons/ChevronLeftIcon.mjs";
7
+ import { ChevronRightIcon } from "../Icons/ChevronRightIcon.mjs";
8
+ import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent } from "../DropdownMenu/DropdownMenuRoot.mjs";
9
+ import { DropdownMenuItem } from "../DropdownMenu/DropdownMenuItem.mjs";
10
+ const TableCardPagination = React.forwardRef(
11
+ ({
12
+ className,
13
+ page,
14
+ pageCount,
15
+ onPageChange,
16
+ pageSize,
17
+ pageSizeOptions,
18
+ onPageSizeChange,
19
+ formatPage = (current, total) => `${current} of ${total}`,
20
+ formatPageSize = (size) => `${size} rows`,
21
+ navigationLabel = "Pagination",
22
+ previousLabel = "Previous page",
23
+ nextLabel = "Next page",
24
+ pageSizeLabel = "Rows per page",
25
+ ...props
26
+ }, ref) => {
27
+ const total = Math.max(pageCount, 1);
28
+ const stepButton = "inline-flex size-4 shrink-0 cursor-pointer items-center justify-center border-none bg-transparent p-0 text-icons-primary disabled:cursor-default disabled:opacity-40";
34
29
  return /* @__PURE__ */ jsxs(
35
30
  "div",
36
31
  {
37
32
  ref,
38
- className: cn("flex w-full flex-wrap items-center gap-3 px-3 py-3", className),
33
+ className: cn(
34
+ "typography-description-12px-regular flex h-8 shrink-0 items-center gap-6 border-border-primary border-t-[0.5px] bg-surface-table-row px-4 text-content-primary",
35
+ className
36
+ ),
39
37
  ...props,
40
38
  children: [
41
- /* @__PURE__ */ jsx("div", { className: "flex min-h-0 min-w-0 flex-1 items-center", children: leadingSlot }),
42
- paginationSlot != null ? /* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center justify-center", children: paginationSlot }) : null,
43
- /* @__PURE__ */ jsx("div", { className: "typography-description-12px-regular min-w-0 flex-1 text-right text-content-secondary", children: summary })
39
+ /* @__PURE__ */ jsxs("nav", { "aria-label": navigationLabel, className: "flex items-center gap-2", children: [
40
+ /* @__PURE__ */ jsx(
41
+ "button",
42
+ {
43
+ type: "button",
44
+ "aria-label": previousLabel,
45
+ className: stepButton,
46
+ disabled: page <= 1,
47
+ onClick: () => onPageChange(page - 1),
48
+ children: /* @__PURE__ */ jsx(ChevronLeftIcon, { size: 16 })
49
+ }
50
+ ),
51
+ /* @__PURE__ */ jsx("span", { className: "whitespace-nowrap", children: formatPage(page, total) }),
52
+ /* @__PURE__ */ jsx(
53
+ "button",
54
+ {
55
+ type: "button",
56
+ "aria-label": nextLabel,
57
+ className: stepButton,
58
+ disabled: page >= pageCount,
59
+ onClick: () => onPageChange(page + 1),
60
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, { size: 16 })
61
+ }
62
+ )
63
+ ] }),
64
+ /* @__PURE__ */ jsxs(DropdownMenu, { children: [
65
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
66
+ "button",
67
+ {
68
+ type: "button",
69
+ "aria-label": `${pageSizeLabel}, ${formatPageSize(pageSize)}`,
70
+ className: "typography-description-12px-regular inline-flex cursor-pointer items-center gap-2 whitespace-nowrap border-none bg-transparent p-0 text-content-primary",
71
+ children: [
72
+ formatPageSize(pageSize),
73
+ /* @__PURE__ */ jsx(ChevronDownIcon, { size: 16, className: "text-icons-primary", "aria-hidden": true })
74
+ ]
75
+ }
76
+ ) }),
77
+ /* @__PURE__ */ jsx(DropdownMenuContent, { align: "start", children: pageSizeOptions.map((option) => /* @__PURE__ */ jsx(
78
+ DropdownMenuItem,
79
+ {
80
+ selected: option === pageSize,
81
+ onSelect: () => onPageSizeChange(option),
82
+ children: formatPageSize(option)
83
+ },
84
+ option
85
+ )) })
86
+ ] })
44
87
  ]
45
88
  }
46
89
  );
47
90
  }
48
91
  );
49
- TablePagination.displayName = "TablePagination";
92
+ TableCardPagination.displayName = "TableCardPagination";
50
93
  export {
51
- TablePagination
94
+ TableCardPagination
52
95
  };
53
96
  //# sourceMappingURL=TablePagination.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"TablePagination.mjs","sources":["../../../src/components/Table/TablePagination.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\n\n/** Layout preset for the pagination bar — desktop (range on the right) or stacked mobile. */\nexport type TablePaginationLayout = \"desktop\" | \"mobile\";\n\nexport interface TablePaginationProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Layout preset. @default \"desktop\" */\n layout?: TablePaginationLayout;\n /** Left (desktop) or top row (mobile) content, e.g. rows-per-page {@link Select}. */\n leadingSlot?: React.ReactNode;\n /** Center (desktop) or bottom row (mobile) content, e.g. {@link Pagination}. */\n paginationSlot?: React.ReactNode;\n /** Summary text or node (e.g. current range and total). */\n summary: React.ReactNode;\n}\n\n/**\n * Footer bar for data tables: rows-per-page control, page navigation, and\n * range summary. Pair `paginationSlot` with {@link Pagination} for numbered\n * controls.\n *\n * v2 sits flush inside {@link TableCard} (`px-3` matches the card's inner\n * gutter); the chip styling now lives on the {@link TableRowsPerPageSelect}\n * trigger itself.\n *\n * @example\n * ```tsx\n * <TablePagination\n * leadingSlot={<TableRowsPerPageSelect />}\n * paginationSlot={<Pagination totalPages={5} currentPage={2} onPageChange={setPage} />}\n * summary=\"20–30 of 100 rows\"\n * />\n * ```\n */\nexport const TablePagination = React.forwardRef<HTMLDivElement, TablePaginationProps>(\n ({ className, layout = \"desktop\", leadingSlot, paginationSlot, summary, ...props }, ref) => {\n if (layout === \"mobile\") {\n return (\n <div\n ref={ref}\n className={cn(\"flex w-full max-w-full flex-col gap-4 px-3 py-3\", className)}\n {...props}\n >\n <div className=\"flex w-full items-center gap-2\">\n {leadingSlot != null ? (\n <div className=\"flex min-w-0 shrink-0 items-center\">{leadingSlot}</div>\n ) : null}\n <div\n className={cn(\n \"typography-description-12px-regular min-w-0 flex-1 text-content-secondary\",\n leadingSlot == null && \"text-left\",\n leadingSlot != null && \"text-right\",\n )}\n >\n {summary}\n </div>\n </div>\n {paginationSlot != null ? (\n <div className=\"flex justify-center\">{paginationSlot}</div>\n ) : null}\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n className={cn(\"flex w-full flex-wrap items-center gap-3 px-3 py-3\", className)}\n {...props}\n >\n <div className=\"flex min-h-0 min-w-0 flex-1 items-center\">{leadingSlot}</div>\n {paginationSlot != null ? (\n <div className=\"flex shrink-0 items-center justify-center\">{paginationSlot}</div>\n ) : null}\n <div className=\"typography-description-12px-regular min-w-0 flex-1 text-right text-content-secondary\">\n {summary}\n </div>\n </div>\n );\n },\n);\nTablePagination.displayName = \"TablePagination\";\n"],"names":[],"mappings":";;;;AAmCO,MAAM,kBAAkB,MAAM;AAAA,EACnC,CAAC,EAAE,WAAW,SAAS,WAAW,aAAa,gBAAgB,SAAS,GAAG,MAAA,GAAS,QAAQ;AAC1F,QAAI,WAAW,UAAU;AACvB,aACE;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA,WAAW,GAAG,mDAAmD,SAAS;AAAA,UACzE,GAAG;AAAA,UAEJ,UAAA;AAAA,YAAA,qBAAC,OAAA,EAAI,WAAU,kCACZ,UAAA;AAAA,cAAA,eAAe,OACd,oBAAC,OAAA,EAAI,WAAU,sCAAsC,uBAAY,IAC/D;AAAA,cACJ;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,WAAW;AAAA,oBACT;AAAA,oBACA,eAAe,QAAQ;AAAA,oBACvB,eAAe,QAAQ;AAAA,kBAAA;AAAA,kBAGxB,UAAA;AAAA,gBAAA;AAAA,cAAA;AAAA,YACH,GACF;AAAA,YACC,kBAAkB,OACjB,oBAAC,SAAI,WAAU,uBAAuB,0BAAe,IACnD;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAGV;AAEA,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAW,GAAG,sDAAsD,SAAS;AAAA,QAC5E,GAAG;AAAA,QAEJ,UAAA;AAAA,UAAA,oBAAC,OAAA,EAAI,WAAU,4CAA4C,UAAA,aAAY;AAAA,UACtE,kBAAkB,OACjB,oBAAC,SAAI,WAAU,6CAA6C,0BAAe,IACzE;AAAA,UACJ,oBAAC,OAAA,EAAI,WAAU,wFACZ,UAAA,QAAA,CACH;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACA,gBAAgB,cAAc;"}
1
+ {"version":3,"file":"TablePagination.mjs","sources":["../../../src/components/Table/TablePagination.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from \"../DropdownMenu/DropdownMenu\";\nimport { ChevronDownIcon } from \"../Icons/ChevronDownIcon\";\nimport { ChevronLeftIcon } from \"../Icons/ChevronLeftIcon\";\nimport { ChevronRightIcon } from \"../Icons/ChevronRightIcon\";\n\nexport interface TableCardPaginationProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onChange\"> {\n /** Current page, 1-based. */\n page: number;\n /** Total number of pages. */\n pageCount: number;\n /** Called with the 1-based page to show. */\n onPageChange: (page: number) => void;\n /** Rows per page currently shown. */\n pageSize: number;\n /** Choices offered in the rows-per-page menu. */\n pageSizeOptions: readonly number[];\n /** Called with the new rows-per-page choice. */\n onPageSizeChange: (pageSize: number) => void;\n /** Formats the page indicator. @default (page, pageCount) => `${page} of ${pageCount}` */\n formatPage?: (page: number, pageCount: number) => string;\n /** Formats a rows-per-page choice. @default (pageSize) => `${pageSize} rows` */\n formatPageSize?: (pageSize: number) => string;\n /** Accessible name of the page navigation. @default \"Pagination\" */\n navigationLabel?: string;\n /** Accessible name of the previous-page button. @default \"Previous page\" */\n previousLabel?: string;\n /** Accessible name of the next-page button. @default \"Next page\" */\n nextLabel?: string;\n /** Accessible name of the rows-per-page menu trigger, followed by the current choice (e.g. \"Rows per page, 10 rows\"). @default \"Rows per page\" */\n pageSizeLabel?: string;\n}\n\n/**\n * 32px footer that closes a {@link TableCard}: previous, \"1 of N\", next, then\n * a rows-per-page menu, on `surface-table-row`. Place it after\n * {@link TableScrollArea} inside the card.\n *\n * @example\n * ```tsx\n * <TableCard>\n * <TableScrollArea>…</TableScrollArea>\n * <TableCardPagination\n * page={page}\n * pageCount={12}\n * onPageChange={setPage}\n * pageSize={10}\n * pageSizeOptions={[10, 25, 50]}\n * onPageSizeChange={setPageSize}\n * />\n * </TableCard>\n * ```\n */\nexport const TableCardPagination = React.forwardRef<HTMLDivElement, TableCardPaginationProps>(\n (\n {\n className,\n page,\n pageCount,\n onPageChange,\n pageSize,\n pageSizeOptions,\n onPageSizeChange,\n formatPage = (current, total) => `${current} of ${total}`,\n formatPageSize = (size) => `${size} rows`,\n navigationLabel = \"Pagination\",\n previousLabel = \"Previous page\",\n nextLabel = \"Next page\",\n pageSizeLabel = \"Rows per page\",\n ...props\n },\n ref,\n ) => {\n const total = Math.max(pageCount, 1);\n const stepButton =\n \"inline-flex size-4 shrink-0 cursor-pointer items-center justify-center border-none bg-transparent p-0 text-icons-primary disabled:cursor-default disabled:opacity-40\";\n return (\n <div\n ref={ref}\n className={cn(\n \"typography-description-12px-regular flex h-8 shrink-0 items-center gap-6 border-border-primary border-t-[0.5px] bg-surface-table-row px-4 text-content-primary\",\n className,\n )}\n {...props}\n >\n <nav aria-label={navigationLabel} className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n aria-label={previousLabel}\n className={stepButton}\n disabled={page <= 1}\n onClick={() => onPageChange(page - 1)}\n >\n <ChevronLeftIcon size={16} />\n </button>\n <span className=\"whitespace-nowrap\">{formatPage(page, total)}</span>\n <button\n type=\"button\"\n aria-label={nextLabel}\n className={stepButton}\n disabled={page >= pageCount}\n onClick={() => onPageChange(page + 1)}\n >\n <ChevronRightIcon size={16} />\n </button>\n </nav>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <button\n type=\"button\"\n aria-label={`${pageSizeLabel}, ${formatPageSize(pageSize)}`}\n className=\"typography-description-12px-regular inline-flex cursor-pointer items-center gap-2 whitespace-nowrap border-none bg-transparent p-0 text-content-primary\"\n >\n {formatPageSize(pageSize)}\n <ChevronDownIcon size={16} className=\"text-icons-primary\" aria-hidden />\n </button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n {pageSizeOptions.map((option) => (\n <DropdownMenuItem\n key={option}\n selected={option === pageSize}\n onSelect={() => onPageSizeChange(option)}\n >\n {formatPageSize(option)}\n </DropdownMenuItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n },\n);\nTableCardPagination.displayName = \"TableCardPagination\";\n"],"names":[],"mappings":";;;;;;;;;AA4DO,MAAM,sBAAsB,MAAM;AAAA,EACvC,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa,CAAC,SAAS,UAAU,GAAG,OAAO,OAAO,KAAK;AAAA,IACvD,iBAAiB,CAAC,SAAS,GAAG,IAAI;AAAA,IAClC,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,QAAQ,KAAK,IAAI,WAAW,CAAC;AACnC,UAAM,aACJ;AACF,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QAAA;AAAA,QAED,GAAG;AAAA,QAEJ,UAAA;AAAA,UAAA,qBAAC,OAAA,EAAI,cAAY,iBAAiB,WAAU,2BAC1C,UAAA;AAAA,YAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAK;AAAA,gBACL,cAAY;AAAA,gBACZ,WAAW;AAAA,gBACX,UAAU,QAAQ;AAAA,gBAClB,SAAS,MAAM,aAAa,OAAO,CAAC;AAAA,gBAEpC,UAAA,oBAAC,iBAAA,EAAgB,MAAM,GAAA,CAAI;AAAA,cAAA;AAAA,YAAA;AAAA,gCAE5B,QAAA,EAAK,WAAU,qBAAqB,UAAA,WAAW,MAAM,KAAK,GAAE;AAAA,YAC7D;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAK;AAAA,gBACL,cAAY;AAAA,gBACZ,WAAW;AAAA,gBACX,UAAU,QAAQ;AAAA,gBAClB,SAAS,MAAM,aAAa,OAAO,CAAC;AAAA,gBAEpC,UAAA,oBAAC,kBAAA,EAAiB,MAAM,GAAA,CAAI;AAAA,cAAA;AAAA,YAAA;AAAA,UAC9B,GACF;AAAA,+BACC,cAAA,EACC,UAAA;AAAA,YAAA,oBAAC,qBAAA,EAAoB,SAAO,MAC1B,UAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAK;AAAA,gBACL,cAAY,GAAG,aAAa,KAAK,eAAe,QAAQ,CAAC;AAAA,gBACzD,WAAU;AAAA,gBAET,UAAA;AAAA,kBAAA,eAAe,QAAQ;AAAA,sCACvB,iBAAA,EAAgB,MAAM,IAAI,WAAU,sBAAqB,eAAW,KAAA,CAAC;AAAA,gBAAA;AAAA,cAAA;AAAA,YAAA,GAE1E;AAAA,gCACC,qBAAA,EAAoB,OAAM,SACxB,UAAA,gBAAgB,IAAI,CAAC,WACpB;AAAA,cAAC;AAAA,cAAA;AAAA,gBAEC,UAAU,WAAW;AAAA,gBACrB,UAAU,MAAM,iBAAiB,MAAM;AAAA,gBAEtC,yBAAe,MAAM;AAAA,cAAA;AAAA,cAJjB;AAAA,YAAA,CAMR,EAAA,CACH;AAAA,UAAA,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACA,oBAAoB,cAAc;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.mjs","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/** Props for the {@link TooltipProvider}. Wraps Radix `Tooltip.Provider`. */\nexport type TooltipProviderProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider>;\n\nconst DEFAULT_DELAY_DURATION = 200;\n\n/**\n * Provides tooltip delay and skip-delay context. Wrap your app or a subtree.\n *\n * Defaults `delayDuration` to 200ms rather than inheriting Radix's 700ms, which\n * reads as unresponsive on the short hint labels this library uses tooltips for.\n * Pass `delayDuration` to override.\n *\n * Note that `TooltipLabel`, `ChartCard` and `SwitchField` each mount their own\n * provider internally, so they take this default but not an app-level override.\n */\nexport const TooltipProvider = ({\n delayDuration = DEFAULT_DELAY_DURATION,\n ...props\n}: TooltipProviderProps) => <TooltipPrimitive.Provider delayDuration={delayDuration} {...props} />;\nTooltipProvider.displayName = \"TooltipProvider\";\n\n/** Props for the {@link Tooltip} root component. */\nexport interface TooltipProps extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root> {\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n defaultOpen?: boolean;\n}\n\n/** Root component that manages open/close state for a single tooltip. */\nexport const Tooltip = TooltipPrimitive.Root;\n\n/** Props for the {@link TooltipTrigger} component. */\nexport type TooltipTriggerProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Trigger>;\n\n/** The element that triggers the tooltip on hover/focus. */\nexport const TooltipTrigger = TooltipPrimitive.Trigger;\n\n/** Position of the tooltip relative to its trigger, combining side and alignment (MUI-style). */\nexport type TooltipPlacement =\n | \"top\"\n | \"top-start\"\n | \"top-end\"\n | \"bottom\"\n | \"bottom-start\"\n | \"bottom-end\"\n | \"left\"\n | \"left-start\"\n | \"left-end\"\n | \"right\"\n | \"right-start\"\n | \"right-end\";\n\nexport interface TooltipContentProps\n extends Omit<React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>, \"title\"> {\n /**\n * Position of the tooltip relative to the trigger. Takes precedence over `side` and `align`.\n * @default \"top\"\n */\n placement?: TooltipPlacement;\n /**\n * Optional heading above the body, for the two-row tooltip: a bold label\n * naming the thing, then a plain-weight description of it. Without it the\n * tooltip is a single bold line.\n */\n title?: React.ReactNode;\n}\n\nexport const TooltipContent = React.forwardRef<\n React.ComponentRef<typeof TooltipPrimitive.Content>,\n TooltipContentProps\n>(\n (\n { className, sideOffset = 8, style, placement, side, align, title, children, ...props },\n ref,\n ) => {\n let resolvedSide = side;\n let resolvedAlign: \"start\" | \"center\" | \"end\" = align ?? \"center\";\n if (placement) {\n const [parsedSide, parsedAlign] = placement.split(\"-\") as [\n \"top\" | \"right\" | \"bottom\" | \"left\",\n \"start\" | \"end\" | undefined,\n ];\n resolvedSide = parsedSide;\n resolvedAlign = parsedAlign ?? \"center\";\n }\n\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n side={resolvedSide}\n align={resolvedAlign}\n sideOffset={sideOffset}\n collisionPadding={8}\n style={{ zIndex: \"var(--fanvue-ui-portal-z-index, 50)\", ...style }}\n className={cn(\n \"typography-description-12px-semibold max-w-[320px] rounded-sm bg-surface-primary-inverted px-4 py-2 text-content-primary-inverted shadow-[0px_1px_4px_0px_rgba(0,0,0,0.06),0px_1px_3px_0px_rgba(0,0,0,0.05)]\",\n className,\n )}\n {...props}\n >\n {title ? (\n <span className=\"flex flex-col gap-1\">\n <span>{title}</span>\n <span className=\"typography-description-12px-regular\">{children}</span>\n </span>\n ) : (\n children\n )}\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n },\n);\nTooltipContent.displayName = \"TooltipContent\";\n"],"names":[],"mappings":";;;;;AAOA,MAAM,yBAAyB;AAYxB,MAAM,kBAAkB,CAAC;AAAA,EAC9B,gBAAgB;AAAA,EAChB,GAAG;AACL,0BAA6B,iBAAiB,UAAjB,EAA0B,eAA+B,GAAG,MAAA,CAAO;AAChG,gBAAgB,cAAc;AAUvB,MAAM,UAAU,iBAAiB;AAMjC,MAAM,iBAAiB,iBAAiB;AAgCxC,MAAM,iBAAiB,MAAM;AAAA,EAIlC,CACE,EAAE,WAAW,aAAa,GAAG,OAAO,WAAW,MAAM,OAAO,OAAO,UAAU,GAAG,MAAA,GAChF,QACG;AACH,QAAI,eAAe;AACnB,QAAI,gBAA4C,SAAS;AACzD,QAAI,WAAW;AACb,YAAM,CAAC,YAAY,WAAW,IAAI,UAAU,MAAM,GAAG;AAIrD,qBAAe;AACf,sBAAgB,eAAe;AAAA,IACjC;AAEA,WACE,oBAAC,iBAAiB,QAAjB,EACC,UAAA;AAAA,MAAC,iBAAiB;AAAA,MAAjB;AAAA,QACC;AAAA,QACA,MAAM;AAAA,QACN,OAAO;AAAA,QACP;AAAA,QACA,kBAAkB;AAAA,QAClB,OAAO,EAAE,QAAQ,uCAAuC,GAAG,MAAA;AAAA,QAC3D,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QAAA;AAAA,QAED,GAAG;AAAA,QAEH,UAAA,QACC,qBAAC,QAAA,EAAK,WAAU,uBACd,UAAA;AAAA,UAAA,oBAAC,UAAM,UAAA,MAAA,CAAM;AAAA,UACb,oBAAC,QAAA,EAAK,WAAU,uCAAuC,SAAA,CAAS;AAAA,QAAA,EAAA,CAClE,IAEA;AAAA,MAAA;AAAA,IAAA,GAGN;AAAA,EAEJ;AACF;AACA,eAAe,cAAc;"}
1
+ {"version":3,"file":"Tooltip.mjs","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/** Props for the {@link TooltipProvider}. Wraps Radix `Tooltip.Provider`. */\nexport type TooltipProviderProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider>;\n\nconst DEFAULT_DELAY_DURATION = 200;\n\n/**\n * Provides tooltip delay and skip-delay context. Wrap your app or a subtree.\n *\n * Defaults `delayDuration` to 200ms rather than inheriting Radix's 700ms, which\n * reads as unresponsive on the short hint labels this library uses tooltips for.\n * Pass `delayDuration` to override.\n *\n * Note that `TooltipLabel`, `ChartCard`, `SwitchField` and `TableTruncatedText`\n * each mount their own provider internally, so they take this default but not an\n * app-level override.\n */\nexport const TooltipProvider = ({\n delayDuration = DEFAULT_DELAY_DURATION,\n ...props\n}: TooltipProviderProps) => <TooltipPrimitive.Provider delayDuration={delayDuration} {...props} />;\nTooltipProvider.displayName = \"TooltipProvider\";\n\n/** Props for the {@link Tooltip} root component. */\nexport interface TooltipProps extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root> {\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n defaultOpen?: boolean;\n}\n\n/** Root component that manages open/close state for a single tooltip. */\nexport const Tooltip = TooltipPrimitive.Root;\n\n/** Props for the {@link TooltipTrigger} component. */\nexport type TooltipTriggerProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Trigger>;\n\n/** The element that triggers the tooltip on hover/focus. */\nexport const TooltipTrigger = TooltipPrimitive.Trigger;\n\n/** Position of the tooltip relative to its trigger, combining side and alignment (MUI-style). */\nexport type TooltipPlacement =\n | \"top\"\n | \"top-start\"\n | \"top-end\"\n | \"bottom\"\n | \"bottom-start\"\n | \"bottom-end\"\n | \"left\"\n | \"left-start\"\n | \"left-end\"\n | \"right\"\n | \"right-start\"\n | \"right-end\";\n\nexport interface TooltipContentProps\n extends Omit<React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>, \"title\"> {\n /**\n * Position of the tooltip relative to the trigger. Takes precedence over `side` and `align`.\n * @default \"top\"\n */\n placement?: TooltipPlacement;\n /**\n * Optional heading above the body, for the two-row tooltip: a bold label\n * naming the thing, then a plain-weight description of it. Without it the\n * tooltip is a single bold line.\n */\n title?: React.ReactNode;\n}\n\nexport const TooltipContent = React.forwardRef<\n React.ComponentRef<typeof TooltipPrimitive.Content>,\n TooltipContentProps\n>(\n (\n { className, sideOffset = 8, style, placement, side, align, title, children, ...props },\n ref,\n ) => {\n let resolvedSide = side;\n let resolvedAlign: \"start\" | \"center\" | \"end\" = align ?? \"center\";\n if (placement) {\n const [parsedSide, parsedAlign] = placement.split(\"-\") as [\n \"top\" | \"right\" | \"bottom\" | \"left\",\n \"start\" | \"end\" | undefined,\n ];\n resolvedSide = parsedSide;\n resolvedAlign = parsedAlign ?? \"center\";\n }\n\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n side={resolvedSide}\n align={resolvedAlign}\n sideOffset={sideOffset}\n collisionPadding={8}\n style={{ zIndex: \"var(--fanvue-ui-portal-z-index, 50)\", ...style }}\n className={cn(\n \"typography-description-12px-semibold max-w-[320px] rounded-sm bg-surface-primary-inverted px-4 py-2 text-content-primary-inverted shadow-[0px_1px_4px_0px_rgba(0,0,0,0.06),0px_1px_3px_0px_rgba(0,0,0,0.05)]\",\n className,\n )}\n {...props}\n >\n {title ? (\n <span className=\"flex flex-col gap-1\">\n <span>{title}</span>\n <span className=\"typography-description-12px-regular\">{children}</span>\n </span>\n ) : (\n children\n )}\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n },\n);\nTooltipContent.displayName = \"TooltipContent\";\n"],"names":[],"mappings":";;;;;AAOA,MAAM,yBAAyB;AAaxB,MAAM,kBAAkB,CAAC;AAAA,EAC9B,gBAAgB;AAAA,EAChB,GAAG;AACL,0BAA6B,iBAAiB,UAAjB,EAA0B,eAA+B,GAAG,MAAA,CAAO;AAChG,gBAAgB,cAAc;AAUvB,MAAM,UAAU,iBAAiB;AAMjC,MAAM,iBAAiB,iBAAiB;AAgCxC,MAAM,iBAAiB,MAAM;AAAA,EAIlC,CACE,EAAE,WAAW,aAAa,GAAG,OAAO,WAAW,MAAM,OAAO,OAAO,UAAU,GAAG,MAAA,GAChF,QACG;AACH,QAAI,eAAe;AACnB,QAAI,gBAA4C,SAAS;AACzD,QAAI,WAAW;AACb,YAAM,CAAC,YAAY,WAAW,IAAI,UAAU,MAAM,GAAG;AAIrD,qBAAe;AACf,sBAAgB,eAAe;AAAA,IACjC;AAEA,WACE,oBAAC,iBAAiB,QAAjB,EACC,UAAA;AAAA,MAAC,iBAAiB;AAAA,MAAjB;AAAA,QACC;AAAA,QACA,MAAM;AAAA,QACN,OAAO;AAAA,QACP;AAAA,QACA,kBAAkB;AAAA,QAClB,OAAO,EAAE,QAAQ,uCAAuC,GAAG,MAAA;AAAA,QAC3D,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QAAA;AAAA,QAED,GAAG;AAAA,QAEH,UAAA,QACC,qBAAC,QAAA,EAAK,WAAU,uBACd,UAAA;AAAA,UAAA,oBAAC,UAAM,UAAA,MAAA,CAAM;AAAA,UACb,oBAAC,QAAA,EAAK,WAAU,uCAAuC,SAAA,CAAS;AAAA,QAAA,EAAA,CAClE,IAEA;AAAA,MAAA;AAAA,IAAA,GAGN;AAAA,EAEJ;AACF;AACA,eAAe,cAAc;"}
package/dist/index.d.ts CHANGED
@@ -1062,6 +1062,19 @@ export declare const BoltIcon: React_2.ForwardRefExoticComponent<BaseIconProps &
1062
1062
  /** Props for {@link BoltIcon}. See {@link BaseIconProps} for the shared shape. */
1063
1063
  export declare type BoltIconProps = BaseIconProps;
1064
1064
 
1065
+ /**
1066
+ * Bookmark icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
1067
+ *
1068
+ * @example
1069
+ * ```tsx
1070
+ * <BookmarkIcon size={24} filled />
1071
+ * ```
1072
+ */
1073
+ export declare const BookmarkIcon: React_2.ForwardRefExoticComponent<BaseIconProps & React_2.RefAttributes<SVGSVGElement>>;
1074
+
1075
+ /** Props for {@link BookmarkIcon}. See {@link BaseIconProps} for the shared shape. */
1076
+ export declare type BookmarkIconProps = BaseIconProps;
1077
+
1065
1078
  export declare const BottomNavigation: React_2.ForwardRefExoticComponent<BottomNavigationProps & React_2.RefAttributes<HTMLElement>>;
1066
1079
 
1067
1080
  export declare const BottomNavigationAction: React_2.ForwardRefExoticComponent<BottomNavigationActionProps & React_2.RefAttributes<HTMLButtonElement>>;
@@ -6204,9 +6217,10 @@ export declare interface TableBodyProps extends React_2.HTMLAttributes<HTMLTable
6204
6217
  }
6205
6218
 
6206
6219
  /**
6207
- * Surface wrapper for data tables: rounded 24px container with a strong
6208
- * outer border, inner spacing, and size context for {@link TableCell}
6209
- * descendants. Compose with {@link TableScrollArea}, {@link Table},
6220
+ * Surface wrapper for data tables: 12px-radius container with a 0.5px
6221
+ * hairline border and no inner padding, so the header, rows and
6222
+ * {@link TableCardPagination} footer run edge to edge. Provides the size
6223
+ * context for {@link TableCell} descendants. Compose with {@link TableScrollArea}, {@link Table},
6210
6224
  * {@link TableHeader}, {@link TableBody}, {@link TableRow},
6211
6225
  * {@link TableHead}, and {@link TableCell}.
6212
6226
  *
@@ -6232,23 +6246,72 @@ export declare interface TableBodyProps extends React_2.HTMLAttributes<HTMLTable
6232
6246
  */
6233
6247
  export declare const TableCard: React_2.ForwardRefExoticComponent<TableCardProps & React_2.RefAttributes<HTMLDivElement>>;
6234
6248
 
6249
+ /**
6250
+ * 32px footer that closes a {@link TableCard}: previous, "1 of N", next, then
6251
+ * a rows-per-page menu, on `surface-table-row`. Place it after
6252
+ * {@link TableScrollArea} inside the card.
6253
+ *
6254
+ * @example
6255
+ * ```tsx
6256
+ * <TableCard>
6257
+ * <TableScrollArea>…</TableScrollArea>
6258
+ * <TableCardPagination
6259
+ * page={page}
6260
+ * pageCount={12}
6261
+ * onPageChange={setPage}
6262
+ * pageSize={10}
6263
+ * pageSizeOptions={[10, 25, 50]}
6264
+ * onPageSizeChange={setPageSize}
6265
+ * />
6266
+ * </TableCard>
6267
+ * ```
6268
+ */
6269
+ export declare const TableCardPagination: React_2.ForwardRefExoticComponent<TableCardPaginationProps & React_2.RefAttributes<HTMLDivElement>>;
6270
+
6271
+ export declare interface TableCardPaginationProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, "onChange"> {
6272
+ /** Current page, 1-based. */
6273
+ page: number;
6274
+ /** Total number of pages. */
6275
+ pageCount: number;
6276
+ /** Called with the 1-based page to show. */
6277
+ onPageChange: (page: number) => void;
6278
+ /** Rows per page currently shown. */
6279
+ pageSize: number;
6280
+ /** Choices offered in the rows-per-page menu. */
6281
+ pageSizeOptions: readonly number[];
6282
+ /** Called with the new rows-per-page choice. */
6283
+ onPageSizeChange: (pageSize: number) => void;
6284
+ /** Formats the page indicator. @default (page, pageCount) => `${page} of ${pageCount}` */
6285
+ formatPage?: (page: number, pageCount: number) => string;
6286
+ /** Formats a rows-per-page choice. @default (pageSize) => `${pageSize} rows` */
6287
+ formatPageSize?: (pageSize: number) => string;
6288
+ /** Accessible name of the page navigation. @default "Pagination" */
6289
+ navigationLabel?: string;
6290
+ /** Accessible name of the previous-page button. @default "Previous page" */
6291
+ previousLabel?: string;
6292
+ /** Accessible name of the next-page button. @default "Next page" */
6293
+ nextLabel?: string;
6294
+ /** Accessible name of the rows-per-page menu trigger, followed by the current choice (e.g. "Rows per page, 10 rows"). @default "Rows per page" */
6295
+ pageSizeLabel?: string;
6296
+ }
6297
+
6235
6298
  export declare interface TableCardProps extends React_2.HTMLAttributes<HTMLDivElement> {
6236
6299
  /** Row density applied to {@link TableCell} descendants. @default "md" */
6237
6300
  size?: TableSize;
6238
6301
  }
6239
6302
 
6240
6303
  /**
6241
- * Body cell. v2: `h-16` (or `h-20` when the parent {@link TableCard} uses
6242
- * `size="lg"`), `px-4 py-3` padding, body-sm typography, and a single
6243
- * `border-border-primary` rule that is zeroed by {@link TableBody} for the
6244
- * final row.
6304
+ * Body cell: 40px rows (56px when the parent {@link TableCard} uses
6305
+ * `size="lg"` or the row holds media), 12px type, transparent background and
6306
+ * a 0.5px rule that {@link TableBody} drops on the final row. Long text wraps
6307
+ * and the row grows; set `nowrap` on short columns to keep them on one line.
6245
6308
  */
6246
6309
  export declare const TableCell: React_2.ForwardRefExoticComponent<TableCellProps & React_2.RefAttributes<HTMLTableCellElement>>;
6247
6310
 
6248
6311
  /**
6249
- * Two-line content slot matching Figma `V2 Table Content` — primary line
6250
- * (semibold) over an optional secondary line (regular, muted) with a 2px
6251
- * gap. Use inside {@link TableCell} for the common stacked-text pattern.
6312
+ * Two-line content slot matching Figma `V2 Table Content` — 12px primary line
6313
+ * (semibold) over an optional 12px secondary line (regular, muted), so both
6314
+ * fit a 40px row. Use inside {@link TableCell} for the common stacked-text pattern.
6252
6315
  */
6253
6316
  export declare function TableCellContent({ primary, secondary, primaryAdornment, secondaryAdornment, className, }: TableCellContentProps): JSX.Element;
6254
6317
 
@@ -6286,6 +6349,8 @@ export declare interface TableCellProps extends React_2.TdHTMLAttributes<HTMLTab
6286
6349
  cellVariant?: TableCellVariant;
6287
6350
  /** Alignment and typography preset for common cell types. @default "default" */
6288
6351
  intent?: TableCellIntent;
6352
+ /** Keeps the content on one line, for short values (dates, amounts, statuses). @default false */
6353
+ nowrap?: boolean;
6289
6354
  }
6290
6355
 
6291
6356
  /** Bottom border and padding preset for body cells (Figma table cell component). */
@@ -6297,9 +6362,9 @@ export declare interface TableFooterProps extends React_2.HTMLAttributes<HTMLTab
6297
6362
  }
6298
6363
 
6299
6364
  /**
6300
- * Header cell. v2: transparent background, 48px min height, tertiary text,
6301
- * `border-border-primary` bottom rule. Uses 16px semibold type, or 14px when
6302
- * the parent {@link TableCard} is `size="condensed"`.
6365
+ * Header cell: 32px tall on `surface-table-row`, 12px secondary text and a
6366
+ * 0.5px bottom rule. Columns sit at least 40px apart, with 16px against the
6367
+ * card edges.
6303
6368
  */
6304
6369
  export declare const TableHead: React_2.ForwardRefExoticComponent<TableHeadProps & React_2.RefAttributes<HTMLTableCellElement>>;
6305
6370
 
@@ -6327,8 +6392,9 @@ export declare interface TableLineClampProps extends React_2.HTMLAttributes<HTML
6327
6392
  }
6328
6393
 
6329
6394
  /**
6330
- * Square thumbnail used inside {@link TableCell} for media columns
6331
- * (Figma `V2 Media Thumbnail Item`).
6395
+ * Square photo that fills its frame, used inside {@link TableCell} for media
6396
+ * columns. At the 40px and 48px sizes its row grows to 56px; the 32px size
6397
+ * fits a regular 40px row.
6332
6398
  */
6333
6399
  export declare const TableMediaThumbnail: React_2.ForwardRefExoticComponent<TableMediaThumbnailProps & React_2.RefAttributes<HTMLDivElement>>;
6334
6400
 
@@ -6341,12 +6407,27 @@ export declare interface TableMediaThumbnailProps extends Omit<React_2.HTMLAttri
6341
6407
  blurred?: boolean;
6342
6408
  /** `center` uses the fixed media column width from the lg spec. @default "start" */
6343
6409
  align?: "start" | "center";
6344
- /** Pixel size of the square thumbnail; `"32"` matches the current Figma `V2 Media Thumbnail Item`. @default "48" */
6410
+ /** Pixel size of the square thumbnail. At 40 or 48 its row grows to 56px; 32 fits a 40px row. @default "40" */
6345
6411
  size?: TableMediaThumbnailSize;
6346
6412
  }
6347
6413
 
6348
6414
  /** Pixel size of the square {@link TableMediaThumbnail}. */
6349
- export declare type TableMediaThumbnailSize = "48" | "32";
6415
+ export declare type TableMediaThumbnailSize = "48" | "40" | "32";
6416
+
6417
+ /**
6418
+ * 40px tile for a {@link TableCell}: a logo or icon (e.g. a social platform)
6419
+ * centred on `surface-table-row` with a 0.5px border, or, with `fill`, custom
6420
+ * media that fills it. Its row grows to 56px. For a plain image URL use
6421
+ * {@link TableMediaThumbnail}.
6422
+ */
6423
+ export declare const TableMediaTile: React_2.ForwardRefExoticComponent<TableMediaTileProps & React_2.RefAttributes<HTMLSpanElement>>;
6424
+
6425
+ export declare interface TableMediaTileProps extends React_2.HTMLAttributes<HTMLSpanElement> {
6426
+ /** Logo or icon centred on the tile, or edge-to-edge media when `fill` is set. */
6427
+ children: React_2.ReactNode;
6428
+ /** Lets the child fill the tile edge to edge (e.g. a video preview) with no border or fill. @default false */
6429
+ fill?: boolean;
6430
+ }
6350
6431
 
6351
6432
  /**
6352
6433
  * Stacked row that stands in for a table row on narrow screens (Figma `V2 Table Mobile`):
@@ -6377,40 +6458,6 @@ export declare interface TableMobileRowProps extends Omit<React_2.HTMLAttributes
6377
6458
  wrap?: boolean;
6378
6459
  }
6379
6460
 
6380
- /**
6381
- * Footer bar for data tables: rows-per-page control, page navigation, and
6382
- * range summary. Pair `paginationSlot` with {@link Pagination} for numbered
6383
- * controls.
6384
- *
6385
- * v2 sits flush inside {@link TableCard} (`px-3` matches the card's inner
6386
- * gutter); the chip styling now lives on the {@link TableRowsPerPageSelect}
6387
- * trigger itself.
6388
- *
6389
- * @example
6390
- * ```tsx
6391
- * <TablePagination
6392
- * leadingSlot={<TableRowsPerPageSelect />}
6393
- * paginationSlot={<Pagination totalPages={5} currentPage={2} onPageChange={setPage} />}
6394
- * summary="20–30 of 100 rows"
6395
- * />
6396
- * ```
6397
- */
6398
- export declare const TablePagination: React_2.ForwardRefExoticComponent<TablePaginationProps & React_2.RefAttributes<HTMLDivElement>>;
6399
-
6400
- /** Layout preset for the pagination bar — desktop (range on the right) or stacked mobile. */
6401
- export declare type TablePaginationLayout = "desktop" | "mobile";
6402
-
6403
- export declare interface TablePaginationProps extends React_2.HTMLAttributes<HTMLDivElement> {
6404
- /** Layout preset. @default "desktop" */
6405
- layout?: TablePaginationLayout;
6406
- /** Left (desktop) or top row (mobile) content, e.g. rows-per-page {@link Select}. */
6407
- leadingSlot?: React_2.ReactNode;
6408
- /** Center (desktop) or bottom row (mobile) content, e.g. {@link Pagination}. */
6409
- paginationSlot?: React_2.ReactNode;
6410
- /** Summary text or node (e.g. current range and total). */
6411
- summary: React_2.ReactNode;
6412
- }
6413
-
6414
6461
  /**
6415
6462
  * Vertical layout for pill label + {@link TableProgressTrack} in a cell.
6416
6463
  */
@@ -6433,22 +6480,23 @@ export declare interface TableProgressTrackProps extends React_2.HTMLAttributes<
6433
6480
  export declare interface TableProps extends React_2.TableHTMLAttributes<HTMLTableElement> {
6434
6481
  }
6435
6482
 
6483
+ /**
6484
+ * Table row. A body row holding a {@link TableMediaThumbnail} or
6485
+ * {@link TableMediaTile} grows from 40px to 56px to keep 8px around it.
6486
+ */
6436
6487
  export declare const TableRow: React_2.ForwardRefExoticComponent<TableRowProps & React_2.RefAttributes<HTMLTableRowElement>>;
6437
6488
 
6438
- export declare interface TableRowProps extends React_2.HTMLAttributes<HTMLTableRowElement> {
6439
- }
6440
-
6441
6489
  /**
6442
- * Rows-per-page {@link Select} styled for {@link TablePagination}. v2 uses a
6443
- * subtle pill trigger with the table's secondary-surface background.
6490
+ * Action inside a table row (e.g. "Copy", "View"): a 24px squared secondary
6491
+ * {@link Button} with 12px semibold type, so it fits a 40px row. Pass 16px
6492
+ * filled icons; they take the secondary icon colour.
6444
6493
  */
6445
- export declare function TableRowsPerPageSelect(props: TableRowsPerPageSelectProps): JSX.Element;
6494
+ export declare const TableRowButton: React_2.ForwardRefExoticComponent<TableRowButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
6446
6495
 
6447
- export declare interface TableRowsPerPageSelectProps {
6448
- /** Passed to the trigger for forms and labels. */
6449
- id?: string;
6450
- /** Accessible name for the trigger when no visible label. @default "Rows per page" */
6451
- "aria-label"?: string;
6496
+ export declare interface TableRowButtonProps extends Omit<ButtonProps, "size"> {
6497
+ }
6498
+
6499
+ export declare interface TableRowProps extends React_2.HTMLAttributes<HTMLTableRowElement> {
6452
6500
  }
6453
6501
 
6454
6502
  /**
@@ -6488,8 +6536,8 @@ export declare type TableSize = "md" | "lg" | "condensed" | "default";
6488
6536
  export declare type TableSortDirection = "asc" | "desc" | null;
6489
6537
 
6490
6538
  /**
6491
- * Sortable column label. v2 expresses the sort state with a 1px underline
6492
- * beneath the label plus a directional arrow when sorted.
6539
+ * Sortable column label. A sorted column reads primary with the Arrow Sort
6540
+ * Up / Down chevrons; an unsorted one keeps the header colour.
6493
6541
  */
6494
6542
  export declare const TableSortLabel: React_2.ForwardRefExoticComponent<TableSortLabelProps & React_2.RefAttributes<HTMLSpanElement>>;
6495
6543
 
@@ -6497,8 +6545,8 @@ export declare interface TableSortLabelProps extends React_2.HTMLAttributes<HTML
6497
6545
  children: React_2.ReactNode;
6498
6546
  /**
6499
6547
  * Visual indicator of the column's sort state. When set to `"asc"` or
6500
- * `"desc"`, a 1px underline accent appears beneath the label and a small
6501
- * directional arrow is shown next to it. @default null
6548
+ * `"desc"`, the label turns primary and the Arrow Sort Up / Down chevrons
6549
+ * appear next to it, the active direction highlighted. @default null
6502
6550
  */
6503
6551
  direction?: TableSortDirection;
6504
6552
  }
@@ -6531,11 +6579,79 @@ export declare interface TableStatusDotProps extends React_2.HTMLAttributes<HTML
6531
6579
  }
6532
6580
 
6533
6581
  /**
6534
- * Optional toolbar row above the table (e.g. bulk selection actions).
6582
+ * 40px action bar above a {@link TableCard}: search on the left, every other
6583
+ * control (menus, toggles, buttons) on the right, 24px apart. On phones
6584
+ * {@link TableToolbarAction} controls go icon-only so the bar fits.
6585
+ *
6586
+ * @example
6587
+ * ```tsx
6588
+ * <TableToolbar search={<TableToolbarSearch value={q} onValueChange={setQ} placeholder="Search" clearLabel="Clear search" />}>
6589
+ * <TableToolbarAction icon={<SettingsIcon />}>Filters</TableToolbarAction>
6590
+ * <TableToolbarButton>Create</TableToolbarButton>
6591
+ * </TableToolbar>
6592
+ * ```
6535
6593
  */
6536
6594
  export declare const TableToolbar: React_2.ForwardRefExoticComponent<TableToolbarProps & React_2.RefAttributes<HTMLDivElement>>;
6537
6595
 
6596
+ /**
6597
+ * Labelled control for {@link TableToolbar}: 12px label followed by a 16px
6598
+ * icon. Below the `md` breakpoint only the icon shows, and the label stays as
6599
+ * the accessible name, so a full bar still fits a phone. Works as a plain
6600
+ * button or as a `DropdownMenuTrigger` child.
6601
+ */
6602
+ export declare const TableToolbarAction: React_2.ForwardRefExoticComponent<TableToolbarActionProps & React_2.RefAttributes<HTMLButtonElement>>;
6603
+
6604
+ export declare interface TableToolbarActionProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement> {
6605
+ /** 16px icon after the label. @default up/down arrows, for a menu trigger showing its current value */
6606
+ icon?: React_2.ReactNode;
6607
+ /** Tints the icon with the brand colour while a toggle or filter is on. @default false */
6608
+ active?: boolean;
6609
+ }
6610
+
6611
+ /**
6612
+ * Call to action for {@link TableToolbar} (e.g. "Create New"): a 24px
6613
+ * {@link Button} squared to the toolbar's 8px radius with 12px semibold type,
6614
+ * so it sits 8px from the bar's edges. Elsewhere use {@link Button}.
6615
+ */
6616
+ export declare const TableToolbarButton: React_2.ForwardRefExoticComponent<TableToolbarButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
6617
+
6618
+ export declare interface TableToolbarButtonProps extends Omit<ButtonProps, "size"> {
6619
+ }
6620
+
6538
6621
  export declare interface TableToolbarProps extends React_2.HTMLAttributes<HTMLDivElement> {
6622
+ /** Left slot, usually a {@link TableToolbarSearch}. */
6623
+ search?: React_2.ReactNode;
6624
+ }
6625
+
6626
+ /**
6627
+ * Borderless search field for the left slot of {@link TableToolbar}:
6628
+ * 16px search icon, 12px text and a clear button once there is a query.
6629
+ */
6630
+ export declare const TableToolbarSearch: React_2.ForwardRefExoticComponent<TableToolbarSearchProps & React_2.RefAttributes<HTMLInputElement>>;
6631
+
6632
+ export declare interface TableToolbarSearchProps extends Omit<React_2.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "type"> {
6633
+ /** Current query. */
6634
+ value: string;
6635
+ /** Called with the new query, and with `""` when cleared. */
6636
+ onValueChange: (value: string) => void;
6637
+ /** Accessible name of the clear button. */
6638
+ clearLabel: string;
6639
+ }
6640
+
6641
+ /**
6642
+ * One-line text for a {@link TableCell} that ends in an ellipsis once it no
6643
+ * longer fits, either past `maxChars` or in a narrower column. The tooltip and
6644
+ * the tab stop appear only when the text is actually cut, measured on mount and
6645
+ * on every resize, so short text stays plain and out of the tab order. It
6646
+ * mounts its own {@link TooltipProvider} so it works in apps without one.
6647
+ */
6648
+ export declare const TableTruncatedText: React_2.ForwardRefExoticComponent<TableTruncatedTextProps & React_2.RefAttributes<HTMLSpanElement>>;
6649
+
6650
+ export declare interface TableTruncatedTextProps extends Omit<React_2.HTMLAttributes<HTMLSpanElement>, "children"> {
6651
+ /** Full text; shown whole in a tooltip whenever it does not fit. */
6652
+ children: string;
6653
+ /** Widest the text may grow, in characters, before it ends in an ellipsis. @default 25 */
6654
+ maxChars?: number;
6539
6655
  }
6540
6656
 
6541
6657
  export declare const Tabs: React_2.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
@@ -7071,8 +7187,9 @@ export declare interface TooltipProps extends React_2.ComponentPropsWithoutRef<t
7071
7187
  * reads as unresponsive on the short hint labels this library uses tooltips for.
7072
7188
  * Pass `delayDuration` to override.
7073
7189
  *
7074
- * Note that `TooltipLabel`, `ChartCard` and `SwitchField` each mount their own
7075
- * provider internally, so they take this default but not an app-level override.
7190
+ * Note that `TooltipLabel`, `ChartCard`, `SwitchField` and `TableTruncatedText`
7191
+ * each mount their own provider internally, so they take this default but not an
7192
+ * app-level override.
7076
7193
  */
7077
7194
  export declare const TooltipProvider: {
7078
7195
  ({ delayDuration, ...props }: TooltipProviderProps): JSX.Element;
package/dist/index.mjs CHANGED
@@ -64,6 +64,7 @@ import { BankIcon } from "./components/Icons/BankIcon.mjs";
64
64
  import { BellIcon } from "./components/Icons/BellIcon.mjs";
65
65
  import { BellOffIcon } from "./components/Icons/BellOffIcon.mjs";
66
66
  import { BoltIcon } from "./components/Icons/BoltIcon.mjs";
67
+ import { BookmarkIcon } from "./components/Icons/BookmarkIcon.mjs";
67
68
  import { BulbIcon } from "./components/Icons/BulbIcon.mjs";
68
69
  import { Calendar2Icon } from "./components/Icons/Calendar2Icon.mjs";
69
70
  import { CalendarIcon } from "./components/Icons/CalendarIcon.mjs";
@@ -254,9 +255,9 @@ import { Switch } from "./components/Switch/Switch.mjs";
254
255
  import { SwitchButton } from "./components/SwitchButton/SwitchButton.mjs";
255
256
  import { SwitchField } from "./components/SwitchField/SwitchField.mjs";
256
257
  import { SwitchToggle } from "./components/SwitchToggle/SwitchToggle.mjs";
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 { Table, TableBody, TableCard, TableCell, TableCellContent, TableCellGroup, TableFooter, TableHead, TableHeader, TableLineClamp, TableMediaThumbnail, TableMediaTile, TablePillProgressLayout, TableProgressTrack, TableRow, TableRowButton, TableScrollArea, TableSortLabel, TableStackedText, TableStatusDot, TableToolbar, TableToolbarAction, TableToolbarButton, TableToolbarSearch, TableTruncatedText } from "./components/Table/Table.mjs";
258
259
  import { TableMobileRow } from "./components/Table/TableMobileRow.mjs";
259
- import { TablePagination } from "./components/Table/TablePagination.mjs";
260
+ import { TableCardPagination } from "./components/Table/TablePagination.mjs";
260
261
  import { Tabs } from "./components/Tabs/Tabs.mjs";
261
262
  import { TabsContent } from "./components/Tabs/TabsContent.mjs";
262
263
  import { TabsList } from "./components/Tabs/TabsList.mjs";
@@ -325,6 +326,7 @@ export {
325
326
  BellIcon,
326
327
  BellOffIcon,
327
328
  BoltIcon,
329
+ BookmarkIcon,
328
330
  BottomNavigation,
329
331
  BottomNavigationAction,
330
332
  Breadcrumb,
@@ -561,6 +563,7 @@ export {
561
563
  Table,
562
564
  TableBody,
563
565
  TableCard,
566
+ TableCardPagination,
564
567
  TableCell,
565
568
  TableCellContent,
566
569
  TableCellGroup,
@@ -569,17 +572,21 @@ export {
569
572
  TableHeader,
570
573
  TableLineClamp,
571
574
  TableMediaThumbnail,
575
+ TableMediaTile,
572
576
  TableMobileRow,
573
- TablePagination,
574
577
  TablePillProgressLayout,
575
578
  TableProgressTrack,
576
579
  TableRow,
577
- TableRowsPerPageSelect,
580
+ TableRowButton,
578
581
  TableScrollArea,
579
582
  TableSortLabel,
580
583
  TableStackedText,
581
584
  TableStatusDot,
582
585
  TableToolbar,
586
+ TableToolbarAction,
587
+ TableToolbarButton,
588
+ TableToolbarSearch,
589
+ TableTruncatedText,
583
590
  Tabs,
584
591
  TabsContent,
585
592
  TabsList,
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}