@fanvue/ui 2.18.0 → 2.20.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.
Files changed (38) hide show
  1. package/dist/cjs/components/Autocomplete/Autocomplete.cjs +6 -2
  2. package/dist/cjs/components/Autocomplete/Autocomplete.cjs.map +1 -1
  3. package/dist/cjs/components/Autocomplete/AutocompleteDropdownContent.cjs +46 -3
  4. package/dist/cjs/components/Autocomplete/AutocompleteDropdownContent.cjs.map +1 -1
  5. package/dist/cjs/components/Autocomplete/constants.cjs +32 -0
  6. package/dist/cjs/components/Autocomplete/constants.cjs.map +1 -1
  7. package/dist/cjs/components/Autocomplete/useAutocomplete.cjs +15 -9
  8. package/dist/cjs/components/Autocomplete/useAutocomplete.cjs.map +1 -1
  9. package/dist/cjs/components/Checkbox/Checkbox.cjs +19 -6
  10. package/dist/cjs/components/Checkbox/Checkbox.cjs.map +1 -1
  11. package/dist/cjs/components/DropdownMenu/DropdownMenu.cjs +189 -11
  12. package/dist/cjs/components/DropdownMenu/DropdownMenu.cjs.map +1 -1
  13. package/dist/cjs/components/Table/Table.cjs +66 -46
  14. package/dist/cjs/components/Table/Table.cjs.map +1 -1
  15. package/dist/cjs/components/Table/TablePagination.cjs +7 -7
  16. package/dist/cjs/components/Table/TablePagination.cjs.map +1 -1
  17. package/dist/cjs/index.cjs +4 -0
  18. package/dist/cjs/index.cjs.map +1 -1
  19. package/dist/components/Autocomplete/Autocomplete.mjs +6 -2
  20. package/dist/components/Autocomplete/Autocomplete.mjs.map +1 -1
  21. package/dist/components/Autocomplete/AutocompleteDropdownContent.mjs +46 -3
  22. package/dist/components/Autocomplete/AutocompleteDropdownContent.mjs.map +1 -1
  23. package/dist/components/Autocomplete/constants.mjs +33 -1
  24. package/dist/components/Autocomplete/constants.mjs.map +1 -1
  25. package/dist/components/Autocomplete/useAutocomplete.mjs +16 -10
  26. package/dist/components/Autocomplete/useAutocomplete.mjs.map +1 -1
  27. package/dist/components/Checkbox/Checkbox.mjs +19 -6
  28. package/dist/components/Checkbox/Checkbox.mjs.map +1 -1
  29. package/dist/components/DropdownMenu/DropdownMenu.mjs +189 -11
  30. package/dist/components/DropdownMenu/DropdownMenu.mjs.map +1 -1
  31. package/dist/components/Table/Table.mjs +66 -46
  32. package/dist/components/Table/Table.mjs.map +1 -1
  33. package/dist/components/Table/TablePagination.mjs +7 -7
  34. package/dist/components/Table/TablePagination.mjs.map +1 -1
  35. package/dist/index.d.ts +299 -31
  36. package/dist/index.mjs +6 -2
  37. package/dist/styles/base.css +2 -0
  38. package/package.json +5 -2
package/dist/index.d.ts CHANGED
@@ -340,6 +340,31 @@ export declare interface AudioValidationError {
340
340
  message: string;
341
341
  }
342
342
 
343
+ /**
344
+ * A combobox input with single- or multi-select, optional async loading, and
345
+ * native support for grouped + pinned options.
346
+ *
347
+ * - Pass `groups` plus an `options` array whose entries reference each group
348
+ * via `groupId` to render hierarchical lists with proper `role="group"` +
349
+ * `aria-labelledby` semantics. Options without a `groupId` render above
350
+ * the first group; options marked `pinned` render above everything and
351
+ * bypass the search filter.
352
+ * - Indentation of nested rows (e.g. price under product) is controlled by
353
+ * the consumer via `renderOption` styling — there is no built-in indent.
354
+ *
355
+ * @example
356
+ * ```tsx
357
+ * <Autocomplete
358
+ * aria-label="Choose a product"
359
+ * options={[
360
+ * { value: "__new__", label: "+ Create new product", pinned: true },
361
+ * { value: "product:abc", label: "Demo Product", groupId: "recent" },
362
+ * ]}
363
+ * groups={[{ id: "recent", label: "Recent products" }]}
364
+ * onChange={handleSelect}
365
+ * />
366
+ * ```
367
+ */
343
368
  export declare const Autocomplete: React_2.ForwardRefExoticComponent<AutocompleteProps & React_2.RefAttributes<HTMLInputElement>>;
344
369
 
345
370
  declare interface AutocompleteBaseProps {
@@ -383,6 +408,40 @@ declare interface AutocompleteBaseProps {
383
408
  open?: boolean;
384
409
  defaultOpen?: boolean;
385
410
  onOpenChange?: (open: boolean) => void;
411
+ /**
412
+ * Ordered list of groups. When provided, options whose `groupId` matches
413
+ * an entry render under the corresponding heading. Groups with no visible
414
+ * (post-filter) options collapse silently. Pinned options render above
415
+ * everything; ungrouped options render between pinned and the first group.
416
+ * Only one level of grouping is supported.
417
+ */
418
+ groups?: AutocompleteGroup[];
419
+ /**
420
+ * Custom renderer for group headings. The returned node is wrapped by the
421
+ * component in an element carrying the `id` referenced by the surrounding
422
+ * `role="group"` wrapper's `aria-labelledby`, so consumers only need to
423
+ * return visual content.
424
+ */
425
+ renderGroupHeading?: (group: AutocompleteGroup) => React_2.ReactNode;
426
+ }
427
+
428
+ /**
429
+ * Describes a single group rendered above its matching options.
430
+ * Indentation of nested rows (e.g. price under product) is not built in —
431
+ * consumers control it via `renderOption` styling.
432
+ */
433
+ export declare interface AutocompleteGroup {
434
+ /** Stable identifier referenced by `option.groupId`. */
435
+ id: string;
436
+ /**
437
+ * Group heading text. Used as the group's accessible name and matched
438
+ * against the search query: when the query matches a group's `label`,
439
+ * every option under that group is kept regardless of whether it
440
+ * individually matches the per-option filter. This supports the common
441
+ * "heading is the searchable label, items are sub-rows" shape (e.g.
442
+ * heading = product name, items = prices).
443
+ */
444
+ label: string;
386
445
  }
387
446
 
388
447
  declare interface AutocompleteMultiProps extends AutocompleteBaseProps {
@@ -393,9 +452,25 @@ declare interface AutocompleteMultiProps extends AutocompleteBaseProps {
393
452
  }
394
453
 
395
454
  export declare interface AutocompleteOption {
455
+ /** Unique value identifying the option. Returned via `onChange`. */
396
456
  value: string;
457
+ /** Visible label. Falls back to `value` when omitted. */
397
458
  label?: string;
459
+ /** When `true`, the option renders but cannot be selected. @default false */
398
460
  disabled?: boolean;
461
+ /**
462
+ * ID of the group this option belongs to. Must match an entry in the
463
+ * component's `groups` prop. Options without a `groupId` render in an
464
+ * implicit "ungrouped" bucket above the first declared group.
465
+ */
466
+ groupId?: string;
467
+ /**
468
+ * Pinned options bypass the search filter and stay visible at the top of
469
+ * the list regardless of the current query. Useful for "+ Create new"
470
+ * affordances. Pinned options ignore `groupId` and render before any
471
+ * grouped or ungrouped content. @default false
472
+ */
473
+ pinned?: boolean;
399
474
  }
400
475
 
401
476
  export declare type AutocompleteProps = AutocompleteSingleProps | AutocompleteMultiProps;
@@ -1078,7 +1153,7 @@ export declare const CheckBoxOnIcon: React_2.ForwardRefExoticComponent<BaseIconP
1078
1153
  export declare type CheckBoxOnIconProps = BaseIconProps;
1079
1154
 
1080
1155
  export declare interface CheckboxProps extends Omit<React_2.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, "asChild"> {
1081
- /** Size variant that controls label and helper text typography. @default "default" */
1156
+ /** Size variant. @default "20" */
1082
1157
  size?: CheckboxSize;
1083
1158
  /** Label text displayed next to the checkbox. */
1084
1159
  label?: string;
@@ -1086,8 +1161,19 @@ export declare interface CheckboxProps extends Omit<React_2.ComponentPropsWithou
1086
1161
  helperText?: string;
1087
1162
  }
1088
1163
 
1089
- /** Size variant controlling label and helper text typography. */
1090
- export declare type CheckboxSize = "default" | "small";
1164
+ /**
1165
+ * Size variant for the checkbox.
1166
+ *
1167
+ * - `"20"` (default) — 20px box, body-lg label.
1168
+ * - `"16"` — 16px box, body-md label, used in compact contexts like data tables.
1169
+ * - `"default"` and `"small"` are legacy aliases retained for back-compat
1170
+ * (`"default"` → `"20"`, `"small"` → `"20"` with smaller label typography).
1171
+ */
1172
+ export declare type CheckboxSize = "20" | "16"
1173
+ /** @deprecated Use `"20"` instead. */
1174
+ | "default"
1175
+ /** @deprecated Use `"20"` (the smaller-typography variant remains via `"small"`). */
1176
+ | "small";
1091
1177
 
1092
1178
  /** A checkmark inside a filled circle icon (20 × 20). */
1093
1179
  export declare const CheckCircleIcon: React_2.ForwardRefExoticComponent<React_2.SVGAttributes<SVGSVGElement> & {
@@ -1964,6 +2050,62 @@ export declare const DropdownMenuGroup: React_2.ForwardRefExoticComponent<Dropdo
1964
2050
  /** Props for the {@link DropdownMenuGroup} component. */
1965
2051
  export declare type DropdownMenuGroupProps = React_2.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Group>;
1966
2052
 
2053
+ /**
2054
+ * Optional header rendered at the top of a {@link DropdownMenuContent}. Use
2055
+ * `type="default"` to title the menu, or `type="search"` to embed a search
2056
+ * input for filtering long lists.
2057
+ *
2058
+ * Renders an inset separator beneath the row so it slots cleanly above the
2059
+ * first group of items.
2060
+ *
2061
+ * @example
2062
+ * ```tsx
2063
+ * <DropdownMenuContent>
2064
+ * <DropdownMenuHeader title="Sort by" onClose={() => setOpen(false)} />
2065
+ * <DropdownMenuItem>Newest</DropdownMenuItem>
2066
+ * <DropdownMenuItem>Oldest</DropdownMenuItem>
2067
+ * </DropdownMenuContent>
2068
+ * ```
2069
+ */
2070
+ export declare const DropdownMenuHeader: React_2.ForwardRefExoticComponent<DropdownMenuHeaderProps & React_2.RefAttributes<HTMLDivElement>>;
2071
+
2072
+ export declare interface DropdownMenuHeaderProps extends React_2.HTMLAttributes<HTMLDivElement> {
2073
+ /** Visual type. `"default"` shows a title; `"search"` shows a search input. @default "default" */
2074
+ type?: DropdownMenuHeaderType;
2075
+ /** Height preset for the header row. @default "40" */
2076
+ size?: DropdownMenuHeaderSize;
2077
+ /** Title text shown when `type="default"`. Ignored if `children` is provided. */
2078
+ title?: string;
2079
+ /** Configuration for the embedded search input when `type="search"`. */
2080
+ searchProps?: DropdownMenuHeaderSearchProps;
2081
+ /** Whether to render the close icon button on the right. @default true */
2082
+ showClose?: boolean;
2083
+ /** Fires when the close icon button is activated. */
2084
+ onClose?: () => void;
2085
+ /** Accessible label for the close button. @default "Close menu" */
2086
+ closeLabel?: string;
2087
+ }
2088
+
2089
+ /** Search-input configuration for {@link DropdownMenuHeader} when `type="search"`. */
2090
+ export declare interface DropdownMenuHeaderSearchProps {
2091
+ /** Controlled value of the search input. */
2092
+ value?: string;
2093
+ /** Uncontrolled default value. */
2094
+ defaultValue?: string;
2095
+ /** Fires when the input value changes. */
2096
+ onChange?: (value: string) => void;
2097
+ /** Placeholder text shown when the input is empty. @default "Search…" */
2098
+ placeholder?: string;
2099
+ /** Accessible label for the search input. @default "Search" */
2100
+ "aria-label"?: string;
2101
+ }
2102
+
2103
+ /** Header height preset. Matches the menu item sizing scale. */
2104
+ export declare type DropdownMenuHeaderSize = "40" | "32";
2105
+
2106
+ /** Header type. `"default"` shows a title; `"search"` shows a search input. */
2107
+ export declare type DropdownMenuHeaderType = "default" | "search";
2108
+
1967
2109
  /**
1968
2110
  * An individual item within a {@link DropdownMenuContent}.
1969
2111
  *
@@ -1982,32 +2124,86 @@ export declare type DropdownMenuGroupProps = React_2.ComponentPropsWithoutRef<ty
1982
2124
  export declare const DropdownMenuItem: React_2.ForwardRefExoticComponent<DropdownMenuItemProps & React_2.RefAttributes<HTMLDivElement>>;
1983
2125
 
1984
2126
  export declare interface DropdownMenuItemProps extends React_2.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> {
1985
- /** Height of the menu item row. @default "sm" */
2127
+ /** Height of the menu item row. @default "40" */
1986
2128
  size?: DropdownMenuItemSize;
1987
- /** Whether the item uses destructive (error) styling. */
2129
+ /** Applies the destructive (error) treatment. Use for irreversible actions. @default false */
1988
2130
  destructive?: boolean;
1989
- /** Icon rendered before the label. */
2131
+ /** Icon (or other node) rendered before the label. */
1990
2132
  leadingIcon?: React_2.ReactNode;
1991
- /** Icon rendered after the label. */
2133
+ /** Icon (or other node) rendered after the label. */
1992
2134
  trailingIcon?: React_2.ReactNode;
1993
- /** Whether the item is in a selected state. */
2135
+ /** Marks the item as the current selection in a single-select menu. @default false */
1994
2136
  selected?: boolean;
1995
2137
  }
1996
2138
 
1997
- /** Available sizes for a dropdown menu item. */
1998
- export declare type DropdownMenuItemSize = "sm" | "md";
2139
+ /**
2140
+ * Height preset for a dropdown menu item.
2141
+ *
2142
+ * `"40"` (default) and `"32"` are the v2 numeric tokens that mirror the Figma
2143
+ * design system. `"sm"` and `"md"` are deprecated aliases retained for
2144
+ * backwards compatibility — `"sm"` maps to `"32"`, `"md"` maps to `"40"`.
2145
+ */
2146
+ export declare type DropdownMenuItemSize = "40" | "32"
2147
+ /** @deprecated Use `"32"` instead. */
2148
+ | "sm"
2149
+ /** @deprecated Use `"40"` instead. */
2150
+ | "md";
1999
2151
 
2000
- /** A label for a group of items. Not focusable or selectable. */
2152
+ /** A non-interactive label that groups related items within a menu. */
2001
2153
  export declare const DropdownMenuLabel: React_2.ForwardRefExoticComponent<DropdownMenuLabelProps & React_2.RefAttributes<HTMLDivElement>>;
2002
2154
 
2155
+ /** Vertical placement of a {@link DropdownMenuLabel} within its group. */
2156
+ export declare type DropdownMenuLabelPosition = "default" | "top";
2157
+
2003
2158
  /** Props for the {@link DropdownMenuLabel} component. */
2004
2159
  export declare interface DropdownMenuLabelProps extends React_2.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> {
2160
+ /**
2161
+ * Vertical placement within the surrounding group. `"top"` is used for the
2162
+ * first label directly under a header; `"default"` adds extra top padding to
2163
+ * separate it from preceding items. @default "default"
2164
+ */
2165
+ position?: DropdownMenuLabelPosition;
2005
2166
  }
2006
2167
 
2007
2168
  /** Props for the {@link DropdownMenu} root component. */
2008
2169
  export declare interface DropdownMenuProps extends React_2.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root> {
2009
2170
  }
2010
2171
 
2172
+ /**
2173
+ * Groups {@link DropdownMenuRadioItem} children so they behave as a
2174
+ * single-select set. Controlled via `value`/`onValueChange`.
2175
+ *
2176
+ * @example
2177
+ * ```tsx
2178
+ * <DropdownMenuRadioGroup value={sort} onValueChange={setSort}>
2179
+ * <DropdownMenuRadioItem value="newest">Newest first</DropdownMenuRadioItem>
2180
+ * <DropdownMenuRadioItem value="oldest">Oldest first</DropdownMenuRadioItem>
2181
+ * </DropdownMenuRadioGroup>
2182
+ * ```
2183
+ */
2184
+ export declare const DropdownMenuRadioGroup: React_2.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React_2.RefAttributes<HTMLDivElement>>;
2185
+
2186
+ /** Props for the {@link DropdownMenuRadioGroup} component. */
2187
+ export declare interface DropdownMenuRadioGroupProps extends React_2.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup> {
2188
+ }
2189
+
2190
+ /**
2191
+ * A single radio-style choice within a {@link DropdownMenuRadioGroup}. Shows
2192
+ * a circular indicator that fills when selected, plus an optional helper line
2193
+ * underneath the title.
2194
+ */
2195
+ export declare const DropdownMenuRadioItem: React_2.ForwardRefExoticComponent<DropdownMenuRadioItemProps & React_2.RefAttributes<HTMLDivElement>>;
2196
+
2197
+ export declare interface DropdownMenuRadioItemProps extends React_2.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem> {
2198
+ /** Optional secondary text shown below the title. */
2199
+ helper?: string;
2200
+ /** Height of the item row. @default "40" */
2201
+ size?: DropdownMenuRadioItemSize;
2202
+ }
2203
+
2204
+ /** Height preset for a {@link DropdownMenuRadioItem}. */
2205
+ export declare type DropdownMenuRadioItemSize = "40";
2206
+
2011
2207
  /** Visual separator between groups of items. */
2012
2208
  export declare const DropdownMenuSeparator: React_2.ForwardRefExoticComponent<DropdownMenuSeparatorProps & React_2.RefAttributes<HTMLDivElement>>;
2013
2209
 
@@ -3863,20 +4059,25 @@ export declare type SwitchToggleSize = "24" | "32" | "40";
3863
4059
  */
3864
4060
  export declare const Table: React_2.ForwardRefExoticComponent<TableProps & React_2.RefAttributes<HTMLTableElement>>;
3865
4061
 
4062
+ /**
4063
+ * `<tbody>` wrapper. Removes the bottom border on cells in the final row to
4064
+ * match the Figma `V2 Table Final Row` treatment.
4065
+ */
3866
4066
  export declare const TableBody: React_2.ForwardRefExoticComponent<TableBodyProps & React_2.RefAttributes<HTMLTableSectionElement>>;
3867
4067
 
3868
4068
  export declare interface TableBodyProps extends React_2.HTMLAttributes<HTMLTableSectionElement> {
3869
4069
  }
3870
4070
 
3871
4071
  /**
3872
- * Surface wrapper for data tables: rounded container, spacing, and size
3873
- * context for {@link TableCell} descendants. Compose with {@link TableScrollArea},
3874
- * {@link Table}, {@link TableHeader}, {@link TableBody}, {@link TableRow},
4072
+ * Surface wrapper for data tables: rounded 24px container with a strong
4073
+ * outer border, inner spacing, and size context for {@link TableCell}
4074
+ * descendants. Compose with {@link TableScrollArea}, {@link Table},
4075
+ * {@link TableHeader}, {@link TableBody}, {@link TableRow},
3875
4076
  * {@link TableHead}, and {@link TableCell}.
3876
4077
  *
3877
4078
  * @example
3878
4079
  * ```tsx
3879
- * <TableCard size="md">
4080
+ * <TableCard>
3880
4081
  * <TableScrollArea>
3881
4082
  * <Table>
3882
4083
  * <TableHeader>
@@ -3901,10 +4102,41 @@ export declare interface TableCardProps extends React_2.HTMLAttributes<HTMLDivEl
3901
4102
  size?: TableSize;
3902
4103
  }
3903
4104
 
4105
+ /**
4106
+ * Body cell. v2: `h-16` (or `h-20` when the parent {@link TableCard} uses
4107
+ * `size="lg"`), `px-4 py-3` padding, body-sm typography, and a single
4108
+ * `border-border-primary` rule that is zeroed by {@link TableBody} for the
4109
+ * final row.
4110
+ */
3904
4111
  export declare const TableCell: React_2.ForwardRefExoticComponent<TableCellProps & React_2.RefAttributes<HTMLTableCellElement>>;
3905
4112
 
3906
4113
  /**
3907
- * Horizontal group for icons, chips, and metadata inside a {@link TableCell} (Figma `gap-[10px]`).
4114
+ * Two-line content slot matching Figma `V2 Table Content` primary line
4115
+ * (semibold) over an optional secondary line (regular, muted) with a 2px
4116
+ * gap. Use inside {@link TableCell} for the common stacked-text pattern.
4117
+ */
4118
+ export declare function TableCellContent({ primary, secondary, primaryAdornment, secondaryAdornment, className, }: TableCellContentProps): JSX.Element;
4119
+
4120
+ export declare namespace TableCellContent {
4121
+ var displayName: string;
4122
+ }
4123
+
4124
+ export declare interface TableCellContentProps {
4125
+ /** Primary line (semibold body-sm). */
4126
+ primary: React_2.ReactNode;
4127
+ /** Optional secondary line (regular body-sm, secondary color). */
4128
+ secondary?: React_2.ReactNode;
4129
+ /** Inline node rendered next to the primary line (icon, chip). */
4130
+ primaryAdornment?: React_2.ReactNode;
4131
+ /** Inline node rendered next to the secondary line. */
4132
+ secondaryAdornment?: React_2.ReactNode;
4133
+ /** Class for the outer wrapper. */
4134
+ className?: string;
4135
+ }
4136
+
4137
+ /**
4138
+ * Horizontal group for icons, chips, and metadata inside a {@link TableCell}
4139
+ * (Figma `gap-[4px]`).
3908
4140
  */
3909
4141
  export declare const TableCellGroup: React_2.ForwardRefExoticComponent<TableCellGroupProps & React_2.RefAttributes<HTMLDivElement>>;
3910
4142
 
@@ -3915,7 +4147,7 @@ export declare interface TableCellGroupProps extends React_2.HTMLAttributes<HTML
3915
4147
  export declare type TableCellIntent = "default" | "checkbox" | "stacked" | "multiline" | "sideLabel";
3916
4148
 
3917
4149
  export declare interface TableCellProps extends React_2.TdHTMLAttributes<HTMLTableCellElement> {
3918
- /** `pillProgress` uses wider horizontal padding; row dividers match the default weight for visibility. @default "default" */
4150
+ /** Padding preset for the cell. v2 uses identical padding across variants; values are kept for back-compat. @default "default" */
3919
4151
  cellVariant?: TableCellVariant;
3920
4152
  /** Alignment and typography preset for common cell types. @default "default" */
3921
4153
  intent?: TableCellIntent;
@@ -3929,6 +4161,10 @@ export declare const TableFooter: React_2.ForwardRefExoticComponent<TableFooterP
3929
4161
  export declare interface TableFooterProps extends React_2.HTMLAttributes<HTMLTableSectionElement> {
3930
4162
  }
3931
4163
 
4164
+ /**
4165
+ * Header cell. v2: transparent background, 48px min height, tertiary text,
4166
+ * `border-border-primary` bottom rule.
4167
+ */
3932
4168
  export declare const TableHead: React_2.ForwardRefExoticComponent<TableHeadProps & React_2.RefAttributes<HTMLTableCellElement>>;
3933
4169
 
3934
4170
  export declare const TableHeader: React_2.ForwardRefExoticComponent<TableHeaderProps & React_2.RefAttributes<HTMLTableSectionElement>>;
@@ -3955,7 +4191,8 @@ export declare interface TableLineClampProps extends React_2.HTMLAttributes<HTML
3955
4191
  }
3956
4192
 
3957
4193
  /**
3958
- * Rounded thumbnail sized from {@link TableCard} `size` (`md` vs `lg`).
4194
+ * Square 48px thumbnail used inside {@link TableCell} for media columns
4195
+ * (Figma `V2 Media Thumbnail Item`).
3959
4196
  */
3960
4197
  export declare const TableMediaThumbnail: React_2.ForwardRefExoticComponent<TableMediaThumbnailProps & React_2.RefAttributes<HTMLDivElement>>;
3961
4198
 
@@ -3964,20 +4201,25 @@ export declare interface TableMediaThumbnailProps extends Omit<React_2.HTMLAttri
3964
4201
  src: string;
3965
4202
  /** Alt text for the image. @default "" */
3966
4203
  alt?: string;
3967
- /** Applies the tables blurred-media treatment. @default false */
4204
+ /** Applies the table's blurred-media treatment. @default false */
3968
4205
  blurred?: boolean;
3969
4206
  /** `center` uses the fixed media column width from the lg spec. @default "start" */
3970
4207
  align?: "start" | "center";
3971
4208
  }
3972
4209
 
3973
4210
  /**
3974
- * Footer bar for data tables: rows-per-page control, page navigation, and range
3975
- * summary. Pair `paginationSlot` with {@link Pagination} for numbered controls.
4211
+ * Footer bar for data tables: rows-per-page control, page navigation, and
4212
+ * range summary. Pair `paginationSlot` with {@link Pagination} for numbered
4213
+ * controls.
4214
+ *
4215
+ * v2 sits flush inside {@link TableCard} (`px-3` matches the card's inner
4216
+ * gutter); the chip styling now lives on the {@link TableRowsPerPageSelect}
4217
+ * trigger itself.
3976
4218
  *
3977
4219
  * @example
3978
4220
  * ```tsx
3979
4221
  * <TablePagination
3980
- * leadingSlot={<Select size="32" aria-label="Rows per page">…</Select>}
4222
+ * leadingSlot={<TableRowsPerPageSelect />}
3981
4223
  * paginationSlot={<Pagination totalPages={5} currentPage={2} onPageChange={setPage} />}
3982
4224
  * summary="20–30 of 100 rows"
3983
4225
  * />
@@ -4027,7 +4269,8 @@ export declare interface TableRowProps extends React_2.HTMLAttributes<HTMLTableR
4027
4269
  }
4028
4270
 
4029
4271
  /**
4030
- * Rows-per-page {@link Select} styled for {@link TablePagination} (Figma field).
4272
+ * Rows-per-page {@link Select} styled for {@link TablePagination}. v2 uses a
4273
+ * subtle pill trigger with the table's secondary-surface background.
4031
4274
  */
4032
4275
  export declare function TableRowsPerPageSelect(props: TableRowsPerPageSelectProps): JSX.Element;
4033
4276
 
@@ -4039,31 +4282,56 @@ export declare interface TableRowsPerPageSelectProps {
4039
4282
  }
4040
4283
 
4041
4284
  /**
4042
- * Horizontal scroll container for wide tables. Uses an inner scrollport so the
4043
- * table respects the card radius (plain `overflow-x-auto` on the table
4044
- * wrapper often loses rounded corners with `border-collapse`).
4285
+ * Horizontal scroll container for wide tables. The inner scrollport keeps
4286
+ * `border-collapse` styles intact when the table wraps.
4045
4287
  */
4046
4288
  export declare const TableScrollArea: React_2.ForwardRefExoticComponent<TableScrollAreaProps & React_2.RefAttributes<HTMLDivElement>>;
4047
4289
 
4048
4290
  export declare interface TableScrollAreaProps extends React_2.HTMLAttributes<HTMLDivElement> {
4049
- /** Rounds the top of the table block to match {@link TableCard}. Set `false` when {@link TableToolbar} is above this scroll area. @default true */
4291
+ /**
4292
+ * No longer needed in v2 — {@link TableCard} handles corner rounding via
4293
+ * its own `overflow-hidden rounded-3xl`. Accepted for back-compat.
4294
+ *
4295
+ * @deprecated v2 ignores this prop; safe to remove.
4296
+ */
4050
4297
  roundTop?: boolean;
4051
4298
  }
4052
4299
 
4053
- /** Row density for body cells — `md` (60px min height) or `lg` (80px). */
4054
- export declare type TableSize = "md" | "lg";
4300
+ /**
4301
+ * Row density for body cells.
4302
+ *
4303
+ * - `"md"` (default) → 64px Figma `V2 Table Cell` Small.
4304
+ * - `"lg"` → 80px Figma `V2 Table Cell` Large.
4305
+ *
4306
+ * `"default"` is the v2 numeric-token equivalent of `"md"` and is preferred
4307
+ * for new code.
4308
+ */
4309
+ export declare type TableSize = "md" | "lg" | "default";
4310
+
4311
+ /** Current sort direction of a {@link TableSortLabel}. `null` means unsorted. */
4312
+ export declare type TableSortDirection = "asc" | "desc" | null;
4055
4313
 
4056
4314
  /**
4057
- * Sortable column label with caption typography and a sort affordance.
4315
+ * Sortable column label. v2 expresses the sort state with a 1px underline
4316
+ * beneath the label plus a directional arrow when sorted.
4058
4317
  */
4059
4318
  export declare const TableSortLabel: React_2.ForwardRefExoticComponent<TableSortLabelProps & React_2.RefAttributes<HTMLSpanElement>>;
4060
4319
 
4061
4320
  export declare interface TableSortLabelProps extends React_2.HTMLAttributes<HTMLSpanElement> {
4062
4321
  children: React_2.ReactNode;
4322
+ /**
4323
+ * Visual indicator of the column's sort state. When set to `"asc"` or
4324
+ * `"desc"`, a 1px underline accent appears beneath the label and a small
4325
+ * directional arrow is shown next to it. @default null
4326
+ */
4327
+ direction?: TableSortDirection;
4063
4328
  }
4064
4329
 
4065
4330
  /**
4066
- * Two-line primary + secondary text block for cell + info patterns.
4331
+ * Two-line primary + secondary text block for "cell + info" patterns.
4332
+ *
4333
+ * @deprecated Prefer {@link TableCellContent} which supports adornments and
4334
+ * matches the Figma `V2 Table Content` slot.
4067
4335
  */
4068
4336
  export declare function TableStackedText({ title, subtitle }: TableStackedTextProps): JSX.Element;
4069
4337
 
package/dist/index.mjs CHANGED
@@ -27,7 +27,7 @@ import { CyclingText } from "./components/CyclingText/CyclingText.mjs";
27
27
  import { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogTitle, DialogTrigger } from "./components/Dialog/Dialog.mjs";
28
28
  import { Divider } from "./components/Divider/Divider.mjs";
29
29
  import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerTitle, DrawerTrigger } from "./components/Drawer/Drawer.mjs";
30
- import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from "./components/DropdownMenu/DropdownMenu.mjs";
30
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuHeader, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger } from "./components/DropdownMenu/DropdownMenu.mjs";
31
31
  import { EmptyState } from "./components/EmptyState/EmptyState.mjs";
32
32
  import { IconButton } from "./components/IconButton/IconButton.mjs";
33
33
  import { AddIcon } from "./components/Icons/AddIcon.mjs";
@@ -212,7 +212,7 @@ import { StepperStep } from "./components/Stepper/StepperStep.mjs";
212
212
  import { Switch } from "./components/Switch/Switch.mjs";
213
213
  import { SwitchField } from "./components/SwitchField/SwitchField.mjs";
214
214
  import { SwitchToggle } from "./components/SwitchToggle/SwitchToggle.mjs";
215
- import { Table, TableBody, TableCard, TableCell, TableCellGroup, TableFooter, TableHead, TableHeader, TableLineClamp, TableMediaThumbnail, TablePillProgressLayout, TableProgressTrack, TableRow, TableRowsPerPageSelect, TableScrollArea, TableSortLabel, TableStackedText, TableStatusDot, TableToolbar } from "./components/Table/Table.mjs";
215
+ 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";
216
216
  import { TablePagination } from "./components/Table/TablePagination.mjs";
217
217
  import { Tabs } from "./components/Tabs/Tabs.mjs";
218
218
  import { TabsContent } from "./components/Tabs/TabsContent.mjs";
@@ -332,8 +332,11 @@ export {
332
332
  DropdownMenu,
333
333
  DropdownMenuContent,
334
334
  DropdownMenuGroup,
335
+ DropdownMenuHeader,
335
336
  DropdownMenuItem,
336
337
  DropdownMenuLabel,
338
+ DropdownMenuRadioGroup,
339
+ DropdownMenuRadioItem,
337
340
  DropdownMenuSeparator,
338
341
  DropdownMenuTrigger,
339
342
  EditIcon,
@@ -451,6 +454,7 @@ export {
451
454
  TableBody,
452
455
  TableCard,
453
456
  TableCell,
457
+ TableCellContent,
454
458
  TableCellGroup,
455
459
  TableFooter,
456
460
  TableHead,
@@ -131,8 +131,10 @@
131
131
 
132
132
  :root {
133
133
  --color-special-bottom-nav-highlight: var(--primitives-color-green-500);
134
+ --color-content-disabled: var(--primitives-color-gray-450);
134
135
  }
135
136
 
136
137
  .dark {
137
138
  --color-special-bottom-nav-highlight: var(--primitives-color-gray-white);
139
+ --color-content-disabled: var(--primitives-color-gray-450);
138
140
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fanvue/ui",
3
- "version": "2.18.0",
3
+ "version": "2.20.0",
4
4
  "description": "React component library built with Tailwind CSS for Fanvue ecosystem",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org",
@@ -166,7 +166,10 @@
166
166
  "ajv": ">=8.18.0",
167
167
  "brace-expansion": ">=5.0.5",
168
168
  "yaml": ">=2.8.3",
169
- "postcss": ">=8.5.10"
169
+ "postcss": ">=8.5.10",
170
+ "tmp": ">=0.2.6",
171
+ "ws": ">=8.20.1",
172
+ "qs": ">=6.15.2"
170
173
  }
171
174
  },
172
175
  "size-limit": [