@fanvue/ui 3.46.0 → 3.48.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/Table.cjs +63 -0
- package/dist/cjs/components/Table/Table.cjs.map +1 -1
- package/dist/cjs/components/Tabs/TabsList.cjs +2 -2
- package/dist/cjs/components/Tabs/TabsList.cjs.map +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.cjs +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/cjs/components/UndoAlertPrompt/UndoAlertPrompt.cjs +66 -0
- package/dist/cjs/components/UndoAlertPrompt/UndoAlertPrompt.cjs.map +1 -0
- package/dist/cjs/index.cjs +4 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/Table/Table.mjs +64 -1
- package/dist/components/Table/Table.mjs.map +1 -1
- package/dist/components/Tabs/TabsList.mjs +2 -2
- package/dist/components/Tabs/TabsList.mjs.map +1 -1
- package/dist/components/Tooltip/Tooltip.mjs +1 -1
- package/dist/components/Tooltip/Tooltip.mjs.map +1 -1
- package/dist/components/UndoAlertPrompt/UndoAlertPrompt.mjs +48 -0
- package/dist/components/UndoAlertPrompt/UndoAlertPrompt.mjs.map +1 -0
- package/dist/index.d.ts +74 -2
- package/dist/index.mjs +5 -1
- package/dist/index.mjs.map +1 -1
- package/dist/styles/base.css +23 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6486,6 +6486,16 @@ export declare interface TableProps extends React_2.TableHTMLAttributes<HTMLTabl
|
|
|
6486
6486
|
*/
|
|
6487
6487
|
export declare const TableRow: React_2.ForwardRefExoticComponent<TableRowProps & React_2.RefAttributes<HTMLTableRowElement>>;
|
|
6488
6488
|
|
|
6489
|
+
/**
|
|
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.
|
|
6493
|
+
*/
|
|
6494
|
+
export declare const TableRowButton: React_2.ForwardRefExoticComponent<TableRowButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
6495
|
+
|
|
6496
|
+
export declare interface TableRowButtonProps extends Omit<ButtonProps, "size"> {
|
|
6497
|
+
}
|
|
6498
|
+
|
|
6489
6499
|
export declare interface TableRowProps extends React_2.HTMLAttributes<HTMLTableRowElement> {
|
|
6490
6500
|
}
|
|
6491
6501
|
|
|
@@ -6628,6 +6638,22 @@ export declare interface TableToolbarSearchProps extends Omit<React_2.InputHTMLA
|
|
|
6628
6638
|
clearLabel: string;
|
|
6629
6639
|
}
|
|
6630
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;
|
|
6655
|
+
}
|
|
6656
|
+
|
|
6631
6657
|
export declare const Tabs: React_2.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
6632
6658
|
|
|
6633
6659
|
/** Renders the content panel for a given tab `value`. Only visible when its value matches the active tab. */
|
|
@@ -7100,6 +7126,11 @@ export declare type ToolsIconProps = BaseIconProps;
|
|
|
7100
7126
|
/** Root component that manages open/close state for a single tooltip. */
|
|
7101
7127
|
export declare const Tooltip: React_2.FC<TooltipPrimitive.TooltipProps>;
|
|
7102
7128
|
|
|
7129
|
+
/**
|
|
7130
|
+
* The floating tooltip panel. It sits on a same-mode surface rather than an
|
|
7131
|
+
* inverted one, so it is dark in dark mode and light in light mode, set off by
|
|
7132
|
+
* a hairline border.
|
|
7133
|
+
*/
|
|
7103
7134
|
export declare const TooltipContent: React_2.ForwardRefExoticComponent<TooltipContentProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
7104
7135
|
|
|
7105
7136
|
export declare interface TooltipContentProps extends Omit<React_2.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>, "title"> {
|
|
@@ -7161,8 +7192,9 @@ export declare interface TooltipProps extends React_2.ComponentPropsWithoutRef<t
|
|
|
7161
7192
|
* reads as unresponsive on the short hint labels this library uses tooltips for.
|
|
7162
7193
|
* Pass `delayDuration` to override.
|
|
7163
7194
|
*
|
|
7164
|
-
* Note that `TooltipLabel`, `ChartCard` and `
|
|
7165
|
-
* provider internally, so they take this default but not an
|
|
7195
|
+
* Note that `TooltipLabel`, `ChartCard`, `SwitchField` and `TableTruncatedText`
|
|
7196
|
+
* each mount their own provider internally, so they take this default but not an
|
|
7197
|
+
* app-level override.
|
|
7166
7198
|
*/
|
|
7167
7199
|
export declare const TooltipProvider: {
|
|
7168
7200
|
({ delayDuration, ...props }: TooltipProviderProps): JSX.Element;
|
|
@@ -7259,6 +7291,46 @@ export declare const TwitterIcon: React_2.ForwardRefExoticComponent<React_2.SVGA
|
|
|
7259
7291
|
className?: string;
|
|
7260
7292
|
} & React_2.RefAttributes<SVGSVGElement>>;
|
|
7261
7293
|
|
|
7294
|
+
/**
|
|
7295
|
+
* A compact, auto-dismissing confirmation with a single undo action. Use it
|
|
7296
|
+
* straight after a reversible change, such as moving or deleting an item, so
|
|
7297
|
+
* the user can reverse it without leaving their flow. The copy is not fixed:
|
|
7298
|
+
* pass a `title` describing the action that just happened, and pick `type`
|
|
7299
|
+
* by outcome (`removed` for deletions, `positive` for everything else).
|
|
7300
|
+
*
|
|
7301
|
+
* Use inside a {@link ToastProvider} with a {@link ToastViewport}.
|
|
7302
|
+
*
|
|
7303
|
+
* @example
|
|
7304
|
+
* ```tsx
|
|
7305
|
+
* <UndoAlertPrompt type="removed" title="Folder deleted" onUndo={restoreFolder} />
|
|
7306
|
+
* ```
|
|
7307
|
+
*/
|
|
7308
|
+
export declare const UndoAlertPrompt: React_2.ForwardRefExoticComponent<UndoAlertPromptProps & React_2.RefAttributes<HTMLLIElement>>;
|
|
7309
|
+
|
|
7310
|
+
export declare interface UndoAlertPromptProps extends Omit<React_2.ComponentPropsWithoutRef<typeof ToastPrimitive.Root>, "type" | "title"> {
|
|
7311
|
+
/** Outcome being confirmed. Drives the leading icon. @default "positive" */
|
|
7312
|
+
type?: UndoAlertPromptType;
|
|
7313
|
+
/**
|
|
7314
|
+
* Confirmation of the action that just completed. Write it for the action
|
|
7315
|
+
* being undone, e.g. "Folder deleted", "Template moved" or
|
|
7316
|
+
* "3 messages archived". Accepts rich content for emphasising an item name.
|
|
7317
|
+
*/
|
|
7318
|
+
title: React_2.ReactNode;
|
|
7319
|
+
/** Called when the user activates the undo button. The prompt closes afterwards. */
|
|
7320
|
+
onUndo: () => void;
|
|
7321
|
+
/** Label for the undo button. @default "Undo" */
|
|
7322
|
+
undoLabel?: string;
|
|
7323
|
+
/**
|
|
7324
|
+
* Describes an alternative way to undo, announced to screen reader users
|
|
7325
|
+
* who cannot reach the button before the prompt dismisses. Word it for the
|
|
7326
|
+
* action, e.g. "Restore the folder from Recently deleted". @default undoLabel
|
|
7327
|
+
*/
|
|
7328
|
+
undoAltText?: string;
|
|
7329
|
+
}
|
|
7330
|
+
|
|
7331
|
+
/** Outcome the prompt confirms: a completed change, or a removal. */
|
|
7332
|
+
export declare type UndoAlertPromptType = "positive" | "removed";
|
|
7333
|
+
|
|
7262
7334
|
/** An upload-to-cloud icon with an upward arrow (20 × 20). */
|
|
7263
7335
|
export declare const UploadCloudIcon: React_2.ForwardRefExoticComponent<React_2.SVGAttributes<SVGSVGElement> & {
|
|
7264
7336
|
className?: string;
|
package/dist/index.mjs
CHANGED
|
@@ -255,7 +255,7 @@ import { Switch } from "./components/Switch/Switch.mjs";
|
|
|
255
255
|
import { SwitchButton } from "./components/SwitchButton/SwitchButton.mjs";
|
|
256
256
|
import { SwitchField } from "./components/SwitchField/SwitchField.mjs";
|
|
257
257
|
import { SwitchToggle } from "./components/SwitchToggle/SwitchToggle.mjs";
|
|
258
|
-
import { Table, TableBody, TableCard, TableCell, TableCellContent, TableCellGroup, TableFooter, TableHead, TableHeader, TableLineClamp, TableMediaThumbnail, TableMediaTile, TablePillProgressLayout, TableProgressTrack, TableRow, TableScrollArea, TableSortLabel, TableStackedText, TableStatusDot, TableToolbar, TableToolbarAction, TableToolbarButton, TableToolbarSearch } 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";
|
|
259
259
|
import { TableMobileRow } from "./components/Table/TableMobileRow.mjs";
|
|
260
260
|
import { TableCardPagination } from "./components/Table/TablePagination.mjs";
|
|
261
261
|
import { Tabs } from "./components/Tabs/Tabs.mjs";
|
|
@@ -269,6 +269,7 @@ import { Toast, ToastProvider, ToastViewport } from "./components/Toast/Toast.mj
|
|
|
269
269
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./components/Tooltip/Tooltip.mjs";
|
|
270
270
|
import { TooltipLabel } from "./components/Tooltip/TooltipLabel.mjs";
|
|
271
271
|
import { TrendPill } from "./components/TrendPill/TrendPill.mjs";
|
|
272
|
+
import { UndoAlertPrompt } from "./components/UndoAlertPrompt/UndoAlertPrompt.mjs";
|
|
272
273
|
import { UserDisplayName } from "./components/UserDisplayName/UserDisplayName.mjs";
|
|
273
274
|
import { UserHandle } from "./components/UserHandle/UserHandle.mjs";
|
|
274
275
|
import { UserItem } from "./components/UserItem/UserItem.mjs";
|
|
@@ -577,6 +578,7 @@ export {
|
|
|
577
578
|
TablePillProgressLayout,
|
|
578
579
|
TableProgressTrack,
|
|
579
580
|
TableRow,
|
|
581
|
+
TableRowButton,
|
|
580
582
|
TableScrollArea,
|
|
581
583
|
TableSortLabel,
|
|
582
584
|
TableStackedText,
|
|
@@ -585,6 +587,7 @@ export {
|
|
|
585
587
|
TableToolbarAction,
|
|
586
588
|
TableToolbarButton,
|
|
587
589
|
TableToolbarSearch,
|
|
590
|
+
TableTruncatedText,
|
|
588
591
|
Tabs,
|
|
589
592
|
TabsContent,
|
|
590
593
|
TabsList,
|
|
@@ -617,6 +620,7 @@ export {
|
|
|
617
620
|
TrendPill,
|
|
618
621
|
TrophyIcon,
|
|
619
622
|
TwitterIcon,
|
|
623
|
+
UndoAlertPrompt,
|
|
620
624
|
UploadCloudIcon,
|
|
621
625
|
UploadIcon,
|
|
622
626
|
UploadToCloudIcon,
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/styles/base.css
CHANGED
|
@@ -384,12 +384,35 @@
|
|
|
384
384
|
line-height: 0.75rem;
|
|
385
385
|
}
|
|
386
386
|
|
|
387
|
+
/*
|
|
388
|
+
* Raised control surface: the track of a pill TabsList and its sliding pill.
|
|
389
|
+
* Themed here because the generated --shadow-* tokens are black at 5–10% in
|
|
390
|
+
* both modes, which vanishes on a dark page. Dark lifts the control with a lit
|
|
391
|
+
* fill and a heavier drop instead of an edge highlight, which reads as a hard
|
|
392
|
+
* line. Consumers recolouring the track need `bg-none` to drop the fill.
|
|
393
|
+
*/
|
|
387
394
|
:root {
|
|
388
395
|
--color-special-bottom-nav-highlight: var(--primitives-color-green-500);
|
|
389
396
|
--color-content-disabled: var(--primitives-color-gray-450);
|
|
397
|
+
--fv-raised-control-fill: linear-gradient(
|
|
398
|
+
to bottom,
|
|
399
|
+
var(--primitives-color-gray-white),
|
|
400
|
+
var(--primitives-color-gray-50)
|
|
401
|
+
);
|
|
402
|
+
--fv-raised-control-shadow:
|
|
403
|
+
inset 0 0 0 1px rgb(0 0 0 / 0.04), 0 1px 2px 0 rgb(0 0 0 / 0.045), 0 4px 12px -6px rgb(0 0 0 / 0.08);
|
|
404
|
+
--fv-raised-control-thumb-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 1px 4px -1px rgb(0 0 0 / 0.07);
|
|
390
405
|
}
|
|
391
406
|
|
|
392
407
|
.dark {
|
|
393
408
|
--color-special-bottom-nav-highlight: var(--primitives-color-gray-white);
|
|
394
409
|
--color-content-disabled: var(--primitives-color-gray-450);
|
|
410
|
+
--fv-raised-control-fill: linear-gradient(
|
|
411
|
+
to bottom,
|
|
412
|
+
var(--primitives-color-gray-900),
|
|
413
|
+
var(--primitives-color-gray-950)
|
|
414
|
+
);
|
|
415
|
+
--fv-raised-control-shadow:
|
|
416
|
+
inset 0 0 0 1px rgb(255 255 255 / 0.025), 0 1px 2px 0 rgb(0 0 0 / 0.4), 0 6px 16px -6px rgb(0 0 0 / 0.45);
|
|
417
|
+
--fv-raised-control-thumb-shadow: 0 1px 2px rgb(0 0 0 / 0.35), 0 2px 6px -2px rgb(0 0 0 / 0.4);
|
|
395
418
|
}
|