@fanvue/ui 3.13.0 → 3.14.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 (30) hide show
  1. package/dist/cjs/components/AudioPlayer/AudioPlayer.cjs +357 -0
  2. package/dist/cjs/components/AudioPlayer/AudioPlayer.cjs.map +1 -0
  3. package/dist/cjs/components/Dialog/Dialog.cjs +2 -1
  4. package/dist/cjs/components/Dialog/Dialog.cjs.map +1 -1
  5. package/dist/cjs/components/FloatingActionButton/FloatingActionButton.cjs +59 -0
  6. package/dist/cjs/components/FloatingActionButton/FloatingActionButton.cjs.map +1 -0
  7. package/dist/cjs/components/Icons/GridViewIcon.cjs +50 -0
  8. package/dist/cjs/components/Icons/GridViewIcon.cjs.map +1 -0
  9. package/dist/cjs/components/Icons/ListViewIcon.cjs +50 -0
  10. package/dist/cjs/components/Icons/ListViewIcon.cjs.map +1 -0
  11. package/dist/cjs/components/SegmentedControl/SegmentedControl.cjs +42 -11
  12. package/dist/cjs/components/SegmentedControl/SegmentedControl.cjs.map +1 -1
  13. package/dist/cjs/index.cjs +8 -0
  14. package/dist/cjs/index.cjs.map +1 -1
  15. package/dist/components/AudioPlayer/AudioPlayer.mjs +340 -0
  16. package/dist/components/AudioPlayer/AudioPlayer.mjs.map +1 -0
  17. package/dist/components/Dialog/Dialog.mjs +2 -1
  18. package/dist/components/Dialog/Dialog.mjs.map +1 -1
  19. package/dist/components/FloatingActionButton/FloatingActionButton.mjs +42 -0
  20. package/dist/components/FloatingActionButton/FloatingActionButton.mjs.map +1 -0
  21. package/dist/components/Icons/GridViewIcon.mjs +33 -0
  22. package/dist/components/Icons/GridViewIcon.mjs.map +1 -0
  23. package/dist/components/Icons/ListViewIcon.mjs +33 -0
  24. package/dist/components/Icons/ListViewIcon.mjs.map +1 -0
  25. package/dist/components/SegmentedControl/SegmentedControl.mjs +42 -11
  26. package/dist/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  27. package/dist/index.d.ts +134 -1
  28. package/dist/index.mjs +8 -0
  29. package/dist/index.mjs.map +1 -1
  30. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -332,6 +332,54 @@ export declare interface AudioFileRejection {
332
332
  errors: AudioValidationError[];
333
333
  }
334
334
 
335
+ /**
336
+ * A compact playback control for a single audio clip: a play/pause toggle, a
337
+ * static amplitude waveform that doubles as a seek scrubber, and elapsed/total
338
+ * timestamps. Designed to sit as an overlay on media thumbnails (Vault cards)
339
+ * as well as inline rows (the AI Voice Message "Generated Audio" row).
340
+ *
341
+ * The waveform is seeded from the decoded audio when possible, falling back
342
+ * to a deterministic (not random) placeholder derived from `src` so the
343
+ * result is stable across renders, SSR, and Chromatic snapshots.
344
+ *
345
+ * @example
346
+ * ```tsx
347
+ * <AudioPlayer src="https://example.com/clip.mp3" duration={5} />
348
+ * ```
349
+ */
350
+ export declare const AudioPlayer: React_2.ForwardRefExoticComponent<AudioPlayerProps & React_2.RefAttributes<HTMLDivElement>>;
351
+
352
+ export declare interface AudioPlayerProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, "onPlay" | "onPause" | "onEnded"> {
353
+ /** URL of the audio file to play. */
354
+ src: string;
355
+ /**
356
+ * Total duration in seconds, used to render the timestamp before the
357
+ * media's own metadata has loaded (and as a fallback if it never does).
358
+ */
359
+ duration?: number;
360
+ /**
361
+ * Whether playback is active (controlled). Note: once `onEnded` fires, the
362
+ * browser has already stopped native playback. To loop or replay under
363
+ * controlled usage, toggle this prop `false` then `true` (rather than
364
+ * leaving it `true`) — the sync effect only calls `play()` again when this
365
+ * value actually changes.
366
+ */
367
+ playing?: boolean;
368
+ /** Initial playback state (uncontrolled). @default false */
369
+ defaultPlaying?: boolean;
370
+ /** Called when playback starts. */
371
+ onPlay?: () => void;
372
+ /** Called when playback is paused. */
373
+ onPause?: () => void;
374
+ /** Called when playback reaches the end of the media. */
375
+ onEnded?: () => void;
376
+ /** Height of the player row, in pixels. @default "40" */
377
+ size?: AudioPlayerSize;
378
+ }
379
+
380
+ /** Height of the audio player row, in pixels. Matches both the Vault card overlay and the "Generated Audio" modal row in Figma — both use an identical 32px play button and 40px row. */
381
+ export declare type AudioPlayerSize = "40";
382
+
335
383
  /**
336
384
  * Audio file upload with drag-and-drop and optional in-browser recording.
337
385
  * Supports file validation, multiple files, and real-time waveform visualization during recording.
@@ -1812,6 +1860,8 @@ export declare interface DialogContentProps extends React_2.ComponentPropsWithou
1812
1860
  * @default "sheet"
1813
1861
  */
1814
1862
  mobilePresentation?: "sheet" | "card";
1863
+ /** Props forwarded to the default {@link DialogOverlay} when `overlay` is `true`. */
1864
+ overlayProps?: DialogOverlayProps;
1815
1865
  }
1816
1866
 
1817
1867
  /** Accessible description for the dialog. Rendered as secondary text. */
@@ -2603,6 +2653,30 @@ export declare const FlashIcon: React_2.ForwardRefExoticComponent<BaseIconProps
2603
2653
  /** Props for {@link FlashIcon}. See {@link BaseIconProps} for the shared shape. */
2604
2654
  export declare type FlashIconProps = BaseIconProps;
2605
2655
 
2656
+ /**
2657
+ * A circular, elevated button for the single most important action on a
2658
+ * screen (e.g. creating new content). Unlike {@link IconButton}, it always
2659
+ * floats above page content with a drop shadow and is meant to be
2660
+ * positioned by the consumer (e.g. `fixed bottom-6 right-6`) rather than
2661
+ * inline in a toolbar or action row.
2662
+ *
2663
+ * Requires an accessible name — pass `aria-label` or `aria-labelledby`, since
2664
+ * the icon alone doesn't convey the action to screen readers.
2665
+ *
2666
+ * @example
2667
+ * ```tsx
2668
+ * <FloatingActionButton aria-label="Add content" className="fixed right-6 bottom-6">
2669
+ * <AddIcon />
2670
+ * </FloatingActionButton>
2671
+ * ```
2672
+ */
2673
+ export declare const FloatingActionButton: React_2.ForwardRefExoticComponent<FloatingActionButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
2674
+
2675
+ export declare interface FloatingActionButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement> {
2676
+ /** Icon to render inside the button. Pass an icon component (e.g. `<AddIcon />`). */
2677
+ children: React_2.ReactNode;
2678
+ }
2679
+
2606
2680
  /**
2607
2681
  * Folder icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
2608
2682
  *
@@ -2705,6 +2779,19 @@ export declare const GoogleIcon: React_2.ForwardRefExoticComponent<React_2.SVGAt
2705
2779
  className?: string;
2706
2780
  } & React_2.RefAttributes<SVGSVGElement>>;
2707
2781
 
2782
+ /**
2783
+ * Grid view icon. Renders at sizes 16, 24, or 32 px.
2784
+ *
2785
+ * @example
2786
+ * ```tsx
2787
+ * <GridViewIcon size={24} />
2788
+ * ```
2789
+ */
2790
+ export declare const GridViewIcon: React_2.ForwardRefExoticComponent<BaseIconProps & React_2.RefAttributes<SVGSVGElement>>;
2791
+
2792
+ /** Props for {@link GridViewIcon}. See {@link BaseIconProps} for the shared shape. */
2793
+ export declare type GridViewIconProps = BaseIconProps;
2794
+
2708
2795
  /**
2709
2796
  * Health icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
2710
2797
  *
@@ -3054,6 +3141,19 @@ export declare type LinkSize = "16" | "14";
3054
3141
  /** Visual style variant of the link. */
3055
3142
  export declare type LinkVariant = "primary" | "brand";
3056
3143
 
3144
+ /**
3145
+ * List view icon. Renders at sizes 16, 24, or 32 px.
3146
+ *
3147
+ * @example
3148
+ * ```tsx
3149
+ * <ListViewIcon size={24} />
3150
+ * ```
3151
+ */
3152
+ export declare const ListViewIcon: React_2.ForwardRefExoticComponent<BaseIconProps & React_2.RefAttributes<SVGSVGElement>>;
3153
+
3154
+ /** Props for {@link ListViewIcon}. See {@link BaseIconProps} for the shared shape. */
3155
+ export declare type ListViewIconProps = BaseIconProps;
3156
+
3057
3157
  /**
3058
3158
  * A layout-aware loading indicator that renders a centered `SpinnerIcon` inside
3059
3159
  * a relatively-positioned container. Drop-in replacement for the Olympus `Loader`.
@@ -4071,15 +4171,46 @@ export declare type SearchIconProps = BaseIconProps;
4071
4171
  * aria-label="Amount type"
4072
4172
  * />
4073
4173
  * ```
4174
+ *
4175
+ * @example Icon-only segments (e.g. a list/grid view toggle)
4176
+ * ```tsx
4177
+ * <SegmentedControl
4178
+ * appearance="plain"
4179
+ * options={[
4180
+ * { label: "List view", value: "list", icon: <ListViewIcon size={16} /> },
4181
+ * { label: "Grid view", value: "grid", icon: <GridViewIcon size={16} /> },
4182
+ * ]}
4183
+ * value={view}
4184
+ * onChange={setView}
4185
+ * aria-label="View"
4186
+ * />
4187
+ * ```
4074
4188
  */
4075
4189
  export declare const SegmentedControl: React_2.ForwardRefExoticComponent<SegmentedControlProps & React_2.RefAttributes<HTMLDivElement>>;
4076
4190
 
4191
+ /**
4192
+ * Visual style of the control.
4193
+ * - `"pill"`: the container has a muted background and the selected segment shows a filled pill (default).
4194
+ * - `"plain"`: no container or selected-pill background; segments are bare content and selection is
4195
+ * communicated by color alone. Designed for icon-only toggles (e.g. a list/grid view switch).
4196
+ */
4197
+ export declare type SegmentedControlAppearance = "pill" | "plain";
4198
+
4077
4199
  /** Describes one selectable segment. */
4078
4200
  export declare interface SegmentedControlOption {
4079
- /** Display label for the segment. */
4201
+ /**
4202
+ * Display label for the segment. When `icon` is provided, the segment renders icon-only and
4203
+ * this value is used as its accessible name (applied as `aria-label`) instead of visible text.
4204
+ */
4080
4205
  label: string;
4081
4206
  /** Value identifier returned via `onChange`. */
4082
4207
  value: string;
4208
+ /**
4209
+ * Icon to render instead of the visible label. When set, the segment renders icon-only and
4210
+ * `label` becomes required as its accessible name — it is applied as `aria-label` and no
4211
+ * visible text is rendered.
4212
+ */
4213
+ icon?: React_2.ReactNode;
4083
4214
  }
4084
4215
 
4085
4216
  export declare interface SegmentedControlProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, "onChange"> {
@@ -4087,6 +4218,8 @@ export declare interface SegmentedControlProps extends Omit<React_2.HTMLAttribut
4087
4218
  size?: SegmentedControlSize;
4088
4219
  /** Segment layout. @default "hug" */
4089
4220
  variant?: SegmentedControlVariant;
4221
+ /** Visual style of the control. @default "pill" */
4222
+ appearance?: SegmentedControlAppearance;
4090
4223
  /** The selectable segments. Designed for two or three mutually exclusive options. */
4091
4224
  options: SegmentedControlOption[];
4092
4225
  /** Currently selected value (controlled). */
package/dist/index.mjs CHANGED
@@ -5,6 +5,7 @@ import { AccordionContent } from "./components/Accordion/AccordionContent.mjs";
5
5
  import { AccordionItem } from "./components/Accordion/AccordionItem.mjs";
6
6
  import { AccordionTrigger } from "./components/Accordion/AccordionTrigger.mjs";
7
7
  import { Alert } from "./components/Alert/Alert.mjs";
8
+ import { AudioPlayer } from "./components/AudioPlayer/AudioPlayer.mjs";
8
9
  import { AudioUpload } from "./components/AudioUpload/AudioUpload.mjs";
9
10
  import { useAudioRecorder } from "./components/AudioUpload/useAudioRecorder.mjs";
10
11
  import { Autocomplete } from "./components/Autocomplete/Autocomplete.mjs";
@@ -30,6 +31,7 @@ import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, Dr
30
31
  import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuHeader, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger } from "./components/DropdownMenu/DropdownMenu.mjs";
31
32
  import { EmptyState } from "./components/EmptyState/EmptyState.mjs";
32
33
  import { FanFollowerCount } from "./components/FanFollowerCount/FanFollowerCount.mjs";
34
+ import { FloatingActionButton } from "./components/FloatingActionButton/FloatingActionButton.mjs";
33
35
  import { IconButton } from "./components/IconButton/IconButton.mjs";
34
36
  import { AddIcon } from "./components/Icons/AddIcon.mjs";
35
37
  import { AffiliatesIcon } from "./components/Icons/AffiliatesIcon.mjs";
@@ -103,6 +105,7 @@ import { GenderIcon } from "./components/Icons/GenderIcon.mjs";
103
105
  import { GifIcon } from "./components/Icons/GifIcon.mjs";
104
106
  import { GiftIcon } from "./components/Icons/GiftIcon.mjs";
105
107
  import { GoogleIcon } from "./components/Icons/GoogleIcon.mjs";
108
+ import { GridViewIcon } from "./components/Icons/GridViewIcon.mjs";
106
109
  import { HealthIcon } from "./components/Icons/HealthIcon.mjs";
107
110
  import { HeartIcon } from "./components/Icons/HeartIcon.mjs";
108
111
  import { HelpIcon } from "./components/Icons/HelpIcon.mjs";
@@ -115,6 +118,7 @@ import { InfoCircleIcon } from "./components/Icons/InfoCircleIcon.mjs";
115
118
  import { InfoIcon } from "./components/Icons/InfoIcon.mjs";
116
119
  import { LanguageIcon } from "./components/Icons/LanguageIcon.mjs";
117
120
  import { LinkIcon } from "./components/Icons/LinkIcon.mjs";
121
+ import { ListViewIcon } from "./components/Icons/ListViewIcon.mjs";
118
122
  import { LocationIcon } from "./components/Icons/LocationIcon.mjs";
119
123
  import { LockerIcon } from "./components/Icons/LockerIcon.mjs";
120
124
  import { LockerOffIcon } from "./components/Icons/LockerOffIcon.mjs";
@@ -262,6 +266,7 @@ export {
262
266
  ArrowUpIcon,
263
267
  ArrowUpRightIcon,
264
268
  AtSignIcon,
269
+ AudioPlayer,
265
270
  AudioUpload,
266
271
  AutoMessageIcon,
267
272
  Autocomplete,
@@ -375,6 +380,7 @@ export {
375
380
  FlagIcon,
376
381
  FlameIcon,
377
382
  FlashIcon,
383
+ FloatingActionButton,
378
384
  FolderIcon,
379
385
  ForwardIcon,
380
386
  GalleryIcon,
@@ -383,6 +389,7 @@ export {
383
389
  GifIcon,
384
390
  GiftIcon,
385
391
  GoogleIcon,
392
+ GridViewIcon,
386
393
  HealthIcon,
387
394
  HeartIcon,
388
395
  HelpIcon,
@@ -401,6 +408,7 @@ export {
401
408
  LanguageIcon,
402
409
  Link,
403
410
  LinkIcon,
411
+ ListViewIcon,
404
412
  Loader,
405
413
  LocationIcon,
406
414
  LockerIcon,
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fanvue/ui",
3
- "version": "3.13.0",
3
+ "version": "3.14.0",
4
4
  "description": "React component library built with Tailwind CSS for Fanvue ecosystem",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org",