@fanvue/ui 2.15.1 → 2.17.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 (78) hide show
  1. package/dist/cjs/components/Icons/AIIcon.cjs +5 -5
  2. package/dist/cjs/components/Icons/AIIcon.cjs.map +1 -1
  3. package/dist/cjs/components/Icons/AiCallIcon.cjs +53 -0
  4. package/dist/cjs/components/Icons/AiCallIcon.cjs.map +1 -0
  5. package/dist/cjs/components/Icons/BoltIcon.cjs +2 -2
  6. package/dist/cjs/components/Icons/BoltIcon.cjs.map +1 -1
  7. package/dist/cjs/components/Icons/CalendarIcon.cjs +4 -4
  8. package/dist/cjs/components/Icons/CalendarIcon.cjs.map +1 -1
  9. package/dist/cjs/components/Icons/CoinIcon.cjs +1 -1
  10. package/dist/cjs/components/Icons/CoinIcon.cjs.map +1 -1
  11. package/dist/cjs/components/Icons/CrossCircleIcon.cjs +85 -0
  12. package/dist/cjs/components/Icons/CrossCircleIcon.cjs.map +1 -0
  13. package/dist/cjs/components/Icons/DiscordIcon.cjs +74 -0
  14. package/dist/cjs/components/Icons/DiscordIcon.cjs.map +1 -0
  15. package/dist/cjs/components/Icons/FlashIcon.cjs +68 -0
  16. package/dist/cjs/components/Icons/FlashIcon.cjs.map +1 -0
  17. package/dist/cjs/components/Icons/ImageUploadIcon.cjs +103 -0
  18. package/dist/cjs/components/Icons/ImageUploadIcon.cjs.map +1 -0
  19. package/dist/cjs/components/Icons/MoonIcon.cjs +4 -4
  20. package/dist/cjs/components/Icons/MoonIcon.cjs.map +1 -1
  21. package/dist/cjs/components/Icons/SoundIcon.cjs +50 -0
  22. package/dist/cjs/components/Icons/SoundIcon.cjs.map +1 -0
  23. package/dist/cjs/components/Icons/SunIcon.cjs +1 -1
  24. package/dist/cjs/components/Icons/SunIcon.cjs.map +1 -1
  25. package/dist/cjs/components/Icons/TickCircleIcon.cjs +1 -1
  26. package/dist/cjs/components/Icons/TickCircleIcon.cjs.map +1 -1
  27. package/dist/cjs/components/Icons/TranscationArrowIcon.cjs +103 -0
  28. package/dist/cjs/components/Icons/TranscationArrowIcon.cjs.map +1 -0
  29. package/dist/cjs/components/Icons/UploadToCloudIcon.cjs +3 -3
  30. package/dist/cjs/components/Icons/UploadToCloudIcon.cjs.map +1 -1
  31. package/dist/cjs/components/Icons/UserAddIcon.cjs +4 -4
  32. package/dist/cjs/components/Icons/UserAddIcon.cjs.map +1 -1
  33. package/dist/cjs/components/Icons/UsersIcon.cjs +4 -4
  34. package/dist/cjs/components/Icons/UsersIcon.cjs.map +1 -1
  35. package/dist/cjs/index.cjs +16 -0
  36. package/dist/cjs/index.cjs.map +1 -1
  37. package/dist/cjs/utils/useSuppressClickAfterDrag.cjs +6 -5
  38. package/dist/cjs/utils/useSuppressClickAfterDrag.cjs.map +1 -1
  39. package/dist/components/Icons/AIIcon.mjs +5 -5
  40. package/dist/components/Icons/AIIcon.mjs.map +1 -1
  41. package/dist/components/Icons/AiCallIcon.mjs +36 -0
  42. package/dist/components/Icons/AiCallIcon.mjs.map +1 -0
  43. package/dist/components/Icons/BoltIcon.mjs +2 -2
  44. package/dist/components/Icons/BoltIcon.mjs.map +1 -1
  45. package/dist/components/Icons/CalendarIcon.mjs +4 -4
  46. package/dist/components/Icons/CalendarIcon.mjs.map +1 -1
  47. package/dist/components/Icons/CoinIcon.mjs +1 -1
  48. package/dist/components/Icons/CoinIcon.mjs.map +1 -1
  49. package/dist/components/Icons/CrossCircleIcon.mjs +68 -0
  50. package/dist/components/Icons/CrossCircleIcon.mjs.map +1 -0
  51. package/dist/components/Icons/DiscordIcon.mjs +57 -0
  52. package/dist/components/Icons/DiscordIcon.mjs.map +1 -0
  53. package/dist/components/Icons/FlashIcon.mjs +51 -0
  54. package/dist/components/Icons/FlashIcon.mjs.map +1 -0
  55. package/dist/components/Icons/ImageUploadIcon.mjs +86 -0
  56. package/dist/components/Icons/ImageUploadIcon.mjs.map +1 -0
  57. package/dist/components/Icons/MoonIcon.mjs +4 -4
  58. package/dist/components/Icons/MoonIcon.mjs.map +1 -1
  59. package/dist/components/Icons/SoundIcon.mjs +33 -0
  60. package/dist/components/Icons/SoundIcon.mjs.map +1 -0
  61. package/dist/components/Icons/SunIcon.mjs +1 -1
  62. package/dist/components/Icons/SunIcon.mjs.map +1 -1
  63. package/dist/components/Icons/TickCircleIcon.mjs +1 -1
  64. package/dist/components/Icons/TickCircleIcon.mjs.map +1 -1
  65. package/dist/components/Icons/TranscationArrowIcon.mjs +86 -0
  66. package/dist/components/Icons/TranscationArrowIcon.mjs.map +1 -0
  67. package/dist/components/Icons/UploadToCloudIcon.mjs +3 -3
  68. package/dist/components/Icons/UploadToCloudIcon.mjs.map +1 -1
  69. package/dist/components/Icons/UserAddIcon.mjs +4 -4
  70. package/dist/components/Icons/UserAddIcon.mjs.map +1 -1
  71. package/dist/components/Icons/UsersIcon.mjs +4 -4
  72. package/dist/components/Icons/UsersIcon.mjs.map +1 -1
  73. package/dist/index.d.ts +115 -0
  74. package/dist/index.mjs +17 -1
  75. package/dist/index.mjs.map +1 -1
  76. package/dist/utils/useSuppressClickAfterDrag.mjs +6 -5
  77. package/dist/utils/useSuppressClickAfterDrag.mjs.map +1 -1
  78. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -100,6 +100,19 @@ export declare const AI2Icon: React_2.ForwardRefExoticComponent<BaseIconProps &
100
100
  /** Props for {@link AI2Icon}. See {@link BaseIconProps} for the shared shape. */
101
101
  export declare type AI2IconProps = BaseIconProps;
102
102
 
103
+ /**
104
+ * AI Call icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
105
+ *
106
+ * @example
107
+ * ```tsx
108
+ * <AICallIcon size={24} filled />
109
+ * ```
110
+ */
111
+ export declare const AICallIcon: React_2.ForwardRefExoticComponent<BaseIconProps & React_2.RefAttributes<SVGSVGElement>>;
112
+
113
+ /** Props for {@link AICallIcon}. See {@link BaseIconProps} for the shared shape. */
114
+ export declare type AICallIconProps = BaseIconProps;
115
+
103
116
  /**
104
117
  * AI Disclosure icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
105
118
  *
@@ -1434,6 +1447,19 @@ export declare interface CreatorTileProps extends React_2.HTMLAttributes<HTMLDiv
1434
1447
  aspectRatio?: CreatorTileAspectRatio;
1435
1448
  }
1436
1449
 
1450
+ /**
1451
+ * Cross Circle icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
1452
+ *
1453
+ * @example
1454
+ * ```tsx
1455
+ * <CrossCircleIcon size={24} filled />
1456
+ * ```
1457
+ */
1458
+ export declare const CrossCircleIcon: React_2.ForwardRefExoticComponent<BaseIconProps & React_2.RefAttributes<SVGSVGElement>>;
1459
+
1460
+ /** Props for {@link CrossCircleIcon}. See {@link BaseIconProps} for the shared shape. */
1461
+ export declare type CrossCircleIconProps = BaseIconProps;
1462
+
1437
1463
  /** A compact "×" cross icon (20 × 20). */
1438
1464
  export declare const CrossIcon: React_2.ForwardRefExoticComponent<React_2.SVGAttributes<SVGSVGElement> & {
1439
1465
  className?: string;
@@ -1661,6 +1687,19 @@ export declare const DiamondIcon: React_2.ForwardRefExoticComponent<BaseIconProp
1661
1687
  /** Props for {@link DiamondIcon}. See {@link BaseIconProps} for the shared shape. */
1662
1688
  export declare type DiamondIconProps = BaseIconProps;
1663
1689
 
1690
+ /**
1691
+ * Discord icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
1692
+ *
1693
+ * @example
1694
+ * ```tsx
1695
+ * <DiscordIcon size={24} filled />
1696
+ * ```
1697
+ */
1698
+ export declare const DiscordIcon: React_2.ForwardRefExoticComponent<BaseIconProps & React_2.RefAttributes<SVGSVGElement>>;
1699
+
1700
+ /** Props for {@link DiscordIcon}. See {@link BaseIconProps} for the shared shape. */
1701
+ export declare type DiscordIconProps = BaseIconProps;
1702
+
1664
1703
  /**
1665
1704
  * Discount icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
1666
1705
  *
@@ -2155,6 +2194,19 @@ export declare const FlameIcon: React_2.ForwardRefExoticComponent<BaseIconProps
2155
2194
  /** Props for {@link FlameIcon}. See {@link BaseIconProps} for the shared shape. */
2156
2195
  export declare type FlameIconProps = BaseIconProps;
2157
2196
 
2197
+ /**
2198
+ * Flash icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
2199
+ *
2200
+ * @example
2201
+ * ```tsx
2202
+ * <FlashIcon size={24} filled />
2203
+ * ```
2204
+ */
2205
+ export declare const FlashIcon: React_2.ForwardRefExoticComponent<BaseIconProps & React_2.RefAttributes<SVGSVGElement>>;
2206
+
2207
+ /** Props for {@link FlashIcon}. See {@link BaseIconProps} for the shared shape. */
2208
+ export declare type FlashIconProps = BaseIconProps;
2209
+
2158
2210
  /**
2159
2211
  * Folder icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
2160
2212
  *
@@ -2198,6 +2250,13 @@ export declare const GameIcon: React_2.ForwardRefExoticComponent<BaseIconProps &
2198
2250
  /** Props for {@link GameIcon}. See {@link BaseIconProps} for the shared shape. */
2199
2251
  export declare type GameIconProps = BaseIconProps;
2200
2252
 
2253
+ declare type GatedHandlers = {
2254
+ onPointerDown?: React_2.PointerEventHandler;
2255
+ onPointerMove?: React_2.PointerEventHandler;
2256
+ onPointerCancel?: React_2.PointerEventHandler;
2257
+ onClick?: React_2.MouseEventHandler;
2258
+ };
2259
+
2201
2260
  /**
2202
2261
  * Gender icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
2203
2262
  *
@@ -2368,6 +2427,19 @@ export declare const ImageIcon: React_2.ForwardRefExoticComponent<BaseIconProps
2368
2427
  /** Props for {@link ImageIcon}. See {@link BaseIconProps} for the shared shape. */
2369
2428
  export declare type ImageIconProps = BaseIconProps;
2370
2429
 
2430
+ /**
2431
+ * Image upload icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
2432
+ *
2433
+ * @example
2434
+ * ```tsx
2435
+ * <ImageUploadIcon size={24} filled />
2436
+ * ```
2437
+ */
2438
+ export declare const ImageUploadIcon: React_2.ForwardRefExoticComponent<BaseIconProps & React_2.RefAttributes<SVGSVGElement>>;
2439
+
2440
+ /** Props for {@link ImageUploadIcon}. See {@link BaseIconProps} for the shared shape. */
2441
+ export declare type ImageUploadIconProps = BaseIconProps;
2442
+
2371
2443
  /**
2372
2444
  * Inbox icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
2373
2445
  *
@@ -3518,6 +3590,19 @@ export declare interface SnackbarProps extends Omit<React_2.HTMLAttributes<HTMLD
3518
3590
  /** Layout variant of the snackbar. */
3519
3591
  export declare type SnackbarVariant = "default" | "vipEarn" | "welcome";
3520
3592
 
3593
+ /**
3594
+ * Sound icon. Renders at sizes 16, 24, or 32 px.
3595
+ *
3596
+ * @example
3597
+ * ```tsx
3598
+ * <SoundIcon size={24} />
3599
+ * ```
3600
+ */
3601
+ export declare const SoundIcon: React_2.ForwardRefExoticComponent<BaseIconProps & React_2.RefAttributes<SVGSVGElement>>;
3602
+
3603
+ /** Props for {@link SoundIcon}. See {@link BaseIconProps} for the shared shape. */
3604
+ export declare type SoundIconProps = BaseIconProps;
3605
+
3521
3606
  /** A circular spinner icon for loading states (20 × 20). Pair with a CSS `animate-spin` class or use the `Loader` component. */
3522
3607
  export declare const SpinnerIcon: React_2.ForwardRefExoticComponent<React_2.SVGAttributes<SVGSVGElement> & {
3523
3608
  className?: string;
@@ -4349,6 +4434,19 @@ export declare const TooltipTrigger: React_2.ForwardRefExoticComponent<TooltipPr
4349
4434
  /** Props for the {@link TooltipTrigger} component. */
4350
4435
  export declare type TooltipTriggerProps = React_2.ComponentPropsWithoutRef<typeof TooltipPrimitive.Trigger>;
4351
4436
 
4437
+ /**
4438
+ * Transcation Arrow icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
4439
+ *
4440
+ * @example
4441
+ * ```tsx
4442
+ * <TranscationArrowIcon size={24} filled />
4443
+ * ```
4444
+ */
4445
+ export declare const TranscationArrowIcon: React_2.ForwardRefExoticComponent<BaseIconProps & React_2.RefAttributes<SVGSVGElement>>;
4446
+
4447
+ /** Props for {@link TranscationArrowIcon}. See {@link BaseIconProps} for the shared shape. */
4448
+ export declare type TranscationArrowIconProps = BaseIconProps;
4449
+
4352
4450
  export declare const TrashBinIcon: React_2.ForwardRefExoticComponent<React_2.SVGAttributes<SVGSVGElement> & {
4353
4451
  className?: string;
4354
4452
  } & React_2.RefAttributes<SVGSVGElement>>;
@@ -4519,6 +4617,23 @@ export declare const UsersIcon: React_2.ForwardRefExoticComponent<BaseIconProps
4519
4617
  /** Props for {@link UsersIcon}. See {@link BaseIconProps} for the shared shape. */
4520
4618
  export declare type UsersIconProps = BaseIconProps;
4521
4619
 
4620
+ /**
4621
+ * Composes the consumer's pointer/click handlers with a touch-drag tracker
4622
+ * that suppresses the synthetic click an Android Chrome scroll-drag-end can
4623
+ * dispatch on a click-based Radix trigger (Popover / Dialog / Drawer).
4624
+ *
4625
+ * On touch / pen input, if the press-and-release crosses a movement threshold,
4626
+ * the subsequent `click` is preventDefault'd — short-circuiting Radix's own
4627
+ * `onOpenToggle` via `composeEventHandlers` — and stopPropagation'd so it
4628
+ * doesn't bubble to ancestors. Mouse input passes through unchanged because
4629
+ * mouse never triggers the Android scroll-drag bug class.
4630
+ *
4631
+ * Related: radix-ui/primitives#1912 (DropdownMenu pointerdown variant) and
4632
+ * #2702 (DismissableLayer touch dismiss). For the DropdownMenu pointerdown
4633
+ * variant see `components/DropdownMenu/DropdownMenu.tsx`.
4634
+ */
4635
+ export declare function useSuppressClickAfterDrag<P extends GatedHandlers = GatedHandlers>(props?: P): P & Required<GatedHandlers>;
4636
+
4522
4637
  /**
4523
4638
  * Vault icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
4524
4639
  *
package/dist/index.mjs CHANGED
@@ -34,6 +34,7 @@ import { AddIcon } from "./components/Icons/AddIcon.mjs";
34
34
  import { AI2Icon } from "./components/Icons/AI2Icon.mjs";
35
35
  import { AIDisclosureIcon } from "./components/Icons/AIDisclosureIcon.mjs";
36
36
  import { AIIcon } from "./components/Icons/AIIcon.mjs";
37
+ import { AICallIcon } from "./components/Icons/AiCallIcon.mjs";
37
38
  import { AlertIcon } from "./components/Icons/AlertIcon.mjs";
38
39
  import { AppsIcon } from "./components/Icons/AppsIcon.mjs";
39
40
  import { ArrowDownIcon } from "./components/Icons/ArrowDownIcon.mjs";
@@ -68,9 +69,11 @@ import { CodeIcon } from "./components/Icons/CodeIcon.mjs";
68
69
  import { CoinIcon } from "./components/Icons/CoinIcon.mjs";
69
70
  import { CompassIcon } from "./components/Icons/CompassIcon.mjs";
70
71
  import { CopyIcon } from "./components/Icons/CopyIcon.mjs";
72
+ import { CrossCircleIcon } from "./components/Icons/CrossCircleIcon.mjs";
71
73
  import { CrossIcon } from "./components/Icons/CrossIcon.mjs";
72
74
  import { CrownIcon } from "./components/Icons/CrownIcon.mjs";
73
75
  import { DiamondIcon } from "./components/Icons/DiamondIcon.mjs";
76
+ import { DiscordIcon } from "./components/Icons/DiscordIcon.mjs";
74
77
  import { DiscountIcon } from "./components/Icons/DiscountIcon.mjs";
75
78
  import { DonateIcon } from "./components/Icons/DonateIcon.mjs";
76
79
  import { DoubleTickIcon } from "./components/Icons/DoubleTickIcon.mjs";
@@ -88,6 +91,7 @@ import { EyeSlashIcon } from "./components/Icons/EyeSlashIcon.mjs";
88
91
  import { FacebookIcon } from "./components/Icons/FacebookIcon.mjs";
89
92
  import { FlagIcon } from "./components/Icons/FlagIcon.mjs";
90
93
  import { FlameIcon } from "./components/Icons/FlameIcon.mjs";
94
+ import { FlashIcon } from "./components/Icons/FlashIcon.mjs";
91
95
  import { FolderIcon } from "./components/Icons/FolderIcon.mjs";
92
96
  import { ForwardIcon } from "./components/Icons/ForwardIcon.mjs";
93
97
  import { GalleryIcon } from "./components/Icons/GalleryIcon.mjs";
@@ -101,6 +105,7 @@ import { HelpIcon } from "./components/Icons/HelpIcon.mjs";
101
105
  import { HomeIcon } from "./components/Icons/HomeIcon.mjs";
102
106
  import { HourglassIcon } from "./components/Icons/HourglassIcon.mjs";
103
107
  import { ImageIcon } from "./components/Icons/ImageIcon.mjs";
108
+ import { ImageUploadIcon } from "./components/Icons/ImageUploadIcon.mjs";
104
109
  import { InboxIcon } from "./components/Icons/InboxIcon.mjs";
105
110
  import { InfoCircleIcon } from "./components/Icons/InfoCircleIcon.mjs";
106
111
  import { InfoIcon } from "./components/Icons/InfoIcon.mjs";
@@ -142,6 +147,7 @@ import { SearchIcon } from "./components/Icons/SearchIcon.mjs";
142
147
  import { SendIcon } from "./components/Icons/SendIcon.mjs";
143
148
  import { SettingsIcon } from "./components/Icons/SettingsIcon.mjs";
144
149
  import { ShareIcon } from "./components/Icons/ShareIcon.mjs";
150
+ import { SoundIcon } from "./components/Icons/SoundIcon.mjs";
145
151
  import { SpinnerIcon } from "./components/Icons/SpinnerIcon.mjs";
146
152
  import { StarIcon } from "./components/Icons/StarIcon.mjs";
147
153
  import { StopIcon } from "./components/Icons/StopIcon.mjs";
@@ -159,6 +165,7 @@ import { TickCircleIcon } from "./components/Icons/TickCircleIcon.mjs";
159
165
  import { TickCircleOffIcon } from "./components/Icons/TickCircleOffIcon.mjs";
160
166
  import { TickIcon } from "./components/Icons/TickIcon.mjs";
161
167
  import { ToolsIcon } from "./components/Icons/ToolsIcon.mjs";
168
+ import { TranscationArrowIcon } from "./components/Icons/TranscationArrowIcon.mjs";
162
169
  import { TrashBinIcon } from "./components/Icons/TrashBinIcon.mjs";
163
170
  import { TrashIcon } from "./components/Icons/TrashIcon.mjs";
164
171
  import { TrophyIcon } from "./components/Icons/TrophyIcon.mjs";
@@ -215,8 +222,10 @@ import { TextField } from "./components/TextField/TextField.mjs";
215
222
  import { Toast, ToastProvider, ToastViewport } from "./components/Toast/Toast.mjs";
216
223
  import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./components/Tooltip/Tooltip.mjs";
217
224
  import { cn } from "./utils/cn.mjs";
225
+ import { useSuppressClickAfterDrag } from "./utils/useSuppressClickAfterDrag.mjs";
218
226
  export {
219
227
  AI2Icon,
228
+ AICallIcon,
220
229
  AIDisclosureIcon,
221
230
  AIIcon,
222
231
  Accordion,
@@ -289,6 +298,7 @@ export {
289
298
  CreatorCard,
290
299
  CreatorCover,
291
300
  CreatorTile,
301
+ CrossCircleIcon,
292
302
  CrossIcon,
293
303
  CrownIcon,
294
304
  CyclingText,
@@ -303,6 +313,7 @@ export {
303
313
  DialogTitle,
304
314
  DialogTrigger,
305
315
  DiamondIcon,
316
+ DiscordIcon,
306
317
  DiscountIcon,
307
318
  Divider,
308
319
  DonateIcon,
@@ -338,6 +349,7 @@ export {
338
349
  FacebookIcon,
339
350
  FlagIcon,
340
351
  FlameIcon,
352
+ FlashIcon,
341
353
  FolderIcon,
342
354
  ForwardIcon,
343
355
  GalleryIcon,
@@ -352,6 +364,7 @@ export {
352
364
  HourglassIcon,
353
365
  IconButton,
354
366
  ImageIcon,
367
+ ImageUploadIcon,
355
368
  InboxIcon,
356
369
  InfoBox,
357
370
  InfoBoxContent,
@@ -419,6 +432,7 @@ export {
419
432
  Slot,
420
433
  Slottable,
421
434
  Snackbar,
435
+ SoundIcon,
422
436
  SpinnerIcon,
423
437
  StarIcon,
424
438
  Stepper,
@@ -474,6 +488,7 @@ export {
474
488
  TooltipContent,
475
489
  TooltipProvider,
476
490
  TooltipTrigger,
491
+ TranscationArrowIcon,
477
492
  TrashBinIcon,
478
493
  TrashIcon,
479
494
  TrophyIcon,
@@ -498,6 +513,7 @@ export {
498
513
  WifiOnIcon,
499
514
  WrenchIcon,
500
515
  cn,
501
- useAudioRecorder
516
+ useAudioRecorder,
517
+ useSuppressClickAfterDrag
502
518
  };
503
519
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,10 +3,11 @@ import * as React from "react";
3
3
  const TAP_MOVEMENT_THRESHOLD_PX = 10;
4
4
  function useSuppressClickAfterDrag(props) {
5
5
  const tapRef = React.useRef(null);
6
+ const consumer = props ?? {};
6
7
  return {
7
- ...props,
8
+ ...consumer,
8
9
  onPointerDown(event) {
9
- props.onPointerDown?.(event);
10
+ consumer.onPointerDown?.(event);
10
11
  if (event.pointerType === "mouse") {
11
12
  tapRef.current = null;
12
13
  return;
@@ -20,7 +21,7 @@ function useSuppressClickAfterDrag(props) {
20
21
  };
21
22
  },
22
23
  onPointerMove(event) {
23
- props.onPointerMove?.(event);
24
+ consumer.onPointerMove?.(event);
24
25
  const tap = tapRef.current;
25
26
  if (tap === null || event.pointerId !== tap.pointerId || tap.movedPastThreshold) return;
26
27
  const dx = event.clientX - tap.x;
@@ -30,7 +31,7 @@ function useSuppressClickAfterDrag(props) {
30
31
  }
31
32
  },
32
33
  onPointerCancel(event) {
33
- props.onPointerCancel?.(event);
34
+ consumer.onPointerCancel?.(event);
34
35
  const tap = tapRef.current;
35
36
  if (tap !== null && event.pointerId === tap.pointerId) {
36
37
  tapRef.current = null;
@@ -44,7 +45,7 @@ function useSuppressClickAfterDrag(props) {
44
45
  event.stopPropagation();
45
46
  return;
46
47
  }
47
- props.onClick?.(event);
48
+ consumer.onClick?.(event);
48
49
  }
49
50
  };
50
51
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useSuppressClickAfterDrag.mjs","sources":["../../src/utils/useSuppressClickAfterDrag.ts"],"sourcesContent":["import * as React from \"react\";\n\nconst TAP_MOVEMENT_THRESHOLD_PX = 10;\n\ntype ActiveTap = {\n pointerId: number;\n x: number;\n y: number;\n movedPastThreshold: boolean;\n};\n\ntype GatedHandlers = {\n onPointerDown?: React.PointerEventHandler;\n onPointerMove?: React.PointerEventHandler;\n onPointerCancel?: React.PointerEventHandler;\n onClick?: React.MouseEventHandler;\n};\n\n/**\n * Composes the consumer's pointer/click handlers with a touch-drag tracker\n * that suppresses the synthetic click an Android Chrome scroll-drag-end can\n * dispatch on a click-based Radix trigger (Popover / Dialog / Drawer).\n *\n * On touch / pen input, if the press-and-release crosses a movement threshold,\n * the subsequent `click` is preventDefault'd — short-circuiting Radix's own\n * `onOpenToggle` via `composeEventHandlers` — and stopPropagation'd so it\n * doesn't bubble to ancestors. Mouse input passes through unchanged because\n * mouse never triggers the Android scroll-drag bug class.\n *\n * Related: radix-ui/primitives#1912 (DropdownMenu pointerdown variant) and\n * #2702 (DismissableLayer touch dismiss). For the DropdownMenu pointerdown\n * variant see `components/DropdownMenu/DropdownMenu.tsx`.\n */\nexport function useSuppressClickAfterDrag<P extends GatedHandlers>(props: P): P {\n const tapRef = React.useRef<ActiveTap | null>(null);\n\n return {\n ...props,\n onPointerDown(event) {\n props.onPointerDown?.(event);\n if (event.pointerType === \"mouse\") {\n tapRef.current = null;\n return;\n }\n // Keep pointermove on this element if the finger drifts off.\n // Optional because jsdom (used in tests) doesn't implement it.\n event.currentTarget.setPointerCapture?.(event.pointerId);\n tapRef.current = {\n pointerId: event.pointerId,\n x: event.clientX,\n y: event.clientY,\n movedPastThreshold: false,\n };\n },\n onPointerMove(event) {\n props.onPointerMove?.(event);\n const tap = tapRef.current;\n if (tap === null || event.pointerId !== tap.pointerId || tap.movedPastThreshold) return;\n const dx = event.clientX - tap.x;\n const dy = event.clientY - tap.y;\n if (Math.hypot(dx, dy) > TAP_MOVEMENT_THRESHOLD_PX) {\n tap.movedPastThreshold = true;\n }\n },\n onPointerCancel(event) {\n props.onPointerCancel?.(event);\n const tap = tapRef.current;\n if (tap !== null && event.pointerId === tap.pointerId) {\n tapRef.current = null;\n }\n },\n onClick(event) {\n const tap = tapRef.current;\n tapRef.current = null;\n if (tap?.movedPastThreshold) {\n // preventDefault stops Radix's onClick → onOpenToggle via\n // composeEventHandlers. stopPropagation prevents the synthetic click\n // from bubbling to ancestor click handlers.\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n props.onClick?.(event);\n },\n };\n}\n"],"names":[],"mappings":";;AAEA,MAAM,4BAA4B;AA+B3B,SAAS,0BAAmD,OAAa;AAC9E,QAAM,SAAS,MAAM,OAAyB,IAAI;AAElD,SAAO;AAAA,IACL,GAAG;AAAA,IACH,cAAc,OAAO;AACnB,YAAM,gBAAgB,KAAK;AAC3B,UAAI,MAAM,gBAAgB,SAAS;AACjC,eAAO,UAAU;AACjB;AAAA,MACF;AAGA,YAAM,cAAc,oBAAoB,MAAM,SAAS;AACvD,aAAO,UAAU;AAAA,QACf,WAAW,MAAM;AAAA,QACjB,GAAG,MAAM;AAAA,QACT,GAAG,MAAM;AAAA,QACT,oBAAoB;AAAA,MAAA;AAAA,IAExB;AAAA,IACA,cAAc,OAAO;AACnB,YAAM,gBAAgB,KAAK;AAC3B,YAAM,MAAM,OAAO;AACnB,UAAI,QAAQ,QAAQ,MAAM,cAAc,IAAI,aAAa,IAAI,mBAAoB;AACjF,YAAM,KAAK,MAAM,UAAU,IAAI;AAC/B,YAAM,KAAK,MAAM,UAAU,IAAI;AAC/B,UAAI,KAAK,MAAM,IAAI,EAAE,IAAI,2BAA2B;AAClD,YAAI,qBAAqB;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,gBAAgB,OAAO;AACrB,YAAM,kBAAkB,KAAK;AAC7B,YAAM,MAAM,OAAO;AACnB,UAAI,QAAQ,QAAQ,MAAM,cAAc,IAAI,WAAW;AACrD,eAAO,UAAU;AAAA,MACnB;AAAA,IACF;AAAA,IACA,QAAQ,OAAO;AACb,YAAM,MAAM,OAAO;AACnB,aAAO,UAAU;AACjB,UAAI,KAAK,oBAAoB;AAI3B,cAAM,eAAA;AACN,cAAM,gBAAA;AACN;AAAA,MACF;AACA,YAAM,UAAU,KAAK;AAAA,IACvB;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"useSuppressClickAfterDrag.mjs","sources":["../../src/utils/useSuppressClickAfterDrag.ts"],"sourcesContent":["import * as React from \"react\";\n\nconst TAP_MOVEMENT_THRESHOLD_PX = 10;\n\ntype ActiveTap = {\n pointerId: number;\n x: number;\n y: number;\n movedPastThreshold: boolean;\n};\n\ntype GatedHandlers = {\n onPointerDown?: React.PointerEventHandler;\n onPointerMove?: React.PointerEventHandler;\n onPointerCancel?: React.PointerEventHandler;\n onClick?: React.MouseEventHandler;\n};\n\n/**\n * Composes the consumer's pointer/click handlers with a touch-drag tracker\n * that suppresses the synthetic click an Android Chrome scroll-drag-end can\n * dispatch on a click-based Radix trigger (Popover / Dialog / Drawer).\n *\n * On touch / pen input, if the press-and-release crosses a movement threshold,\n * the subsequent `click` is preventDefault'd — short-circuiting Radix's own\n * `onOpenToggle` via `composeEventHandlers` — and stopPropagation'd so it\n * doesn't bubble to ancestors. Mouse input passes through unchanged because\n * mouse never triggers the Android scroll-drag bug class.\n *\n * Related: radix-ui/primitives#1912 (DropdownMenu pointerdown variant) and\n * #2702 (DismissableLayer touch dismiss). For the DropdownMenu pointerdown\n * variant see `components/DropdownMenu/DropdownMenu.tsx`.\n */\nexport function useSuppressClickAfterDrag<P extends GatedHandlers = GatedHandlers>(\n props?: P,\n): P & Required<GatedHandlers> {\n const tapRef = React.useRef<ActiveTap | null>(null);\n const consumer = props ?? ({} as P);\n\n return {\n ...consumer,\n onPointerDown(event) {\n consumer.onPointerDown?.(event);\n if (event.pointerType === \"mouse\") {\n tapRef.current = null;\n return;\n }\n // Keep pointermove on this element if the finger drifts off.\n // Optional because jsdom (used in tests) doesn't implement it.\n event.currentTarget.setPointerCapture?.(event.pointerId);\n tapRef.current = {\n pointerId: event.pointerId,\n x: event.clientX,\n y: event.clientY,\n movedPastThreshold: false,\n };\n },\n onPointerMove(event) {\n consumer.onPointerMove?.(event);\n const tap = tapRef.current;\n if (tap === null || event.pointerId !== tap.pointerId || tap.movedPastThreshold) return;\n const dx = event.clientX - tap.x;\n const dy = event.clientY - tap.y;\n if (Math.hypot(dx, dy) > TAP_MOVEMENT_THRESHOLD_PX) {\n tap.movedPastThreshold = true;\n }\n },\n onPointerCancel(event) {\n consumer.onPointerCancel?.(event);\n const tap = tapRef.current;\n if (tap !== null && event.pointerId === tap.pointerId) {\n tapRef.current = null;\n }\n },\n onClick(event) {\n const tap = tapRef.current;\n tapRef.current = null;\n if (tap?.movedPastThreshold) {\n // preventDefault stops Radix's onClick → onOpenToggle via\n // composeEventHandlers. stopPropagation prevents the synthetic click\n // from bubbling to ancestor click handlers.\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n consumer.onClick?.(event);\n },\n };\n}\n"],"names":[],"mappings":";;AAEA,MAAM,4BAA4B;AA+B3B,SAAS,0BACd,OAC6B;AAC7B,QAAM,SAAS,MAAM,OAAyB,IAAI;AAClD,QAAM,WAAW,SAAU,CAAA;AAE3B,SAAO;AAAA,IACL,GAAG;AAAA,IACH,cAAc,OAAO;AACnB,eAAS,gBAAgB,KAAK;AAC9B,UAAI,MAAM,gBAAgB,SAAS;AACjC,eAAO,UAAU;AACjB;AAAA,MACF;AAGA,YAAM,cAAc,oBAAoB,MAAM,SAAS;AACvD,aAAO,UAAU;AAAA,QACf,WAAW,MAAM;AAAA,QACjB,GAAG,MAAM;AAAA,QACT,GAAG,MAAM;AAAA,QACT,oBAAoB;AAAA,MAAA;AAAA,IAExB;AAAA,IACA,cAAc,OAAO;AACnB,eAAS,gBAAgB,KAAK;AAC9B,YAAM,MAAM,OAAO;AACnB,UAAI,QAAQ,QAAQ,MAAM,cAAc,IAAI,aAAa,IAAI,mBAAoB;AACjF,YAAM,KAAK,MAAM,UAAU,IAAI;AAC/B,YAAM,KAAK,MAAM,UAAU,IAAI;AAC/B,UAAI,KAAK,MAAM,IAAI,EAAE,IAAI,2BAA2B;AAClD,YAAI,qBAAqB;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,gBAAgB,OAAO;AACrB,eAAS,kBAAkB,KAAK;AAChC,YAAM,MAAM,OAAO;AACnB,UAAI,QAAQ,QAAQ,MAAM,cAAc,IAAI,WAAW;AACrD,eAAO,UAAU;AAAA,MACnB;AAAA,IACF;AAAA,IACA,QAAQ,OAAO;AACb,YAAM,MAAM,OAAO;AACnB,aAAO,UAAU;AACjB,UAAI,KAAK,oBAAoB;AAI3B,cAAM,eAAA;AACN,cAAM,gBAAA;AACN;AAAA,MACF;AACA,eAAS,UAAU,KAAK;AAAA,IAC1B;AAAA,EAAA;AAEJ;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fanvue/ui",
3
- "version": "2.15.1",
3
+ "version": "2.17.0",
4
4
  "description": "React component library built with Tailwind CSS for Fanvue ecosystem",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org",