@fanvue/ui 3.50.0 → 3.51.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 (53) hide show
  1. package/dist/charts.d.ts +7 -0
  2. package/dist/cjs/components/Button/Button.cjs +12 -8
  3. package/dist/cjs/components/Button/Button.cjs.map +1 -1
  4. package/dist/cjs/components/Chart/ChartCard.cjs +4 -3
  5. package/dist/cjs/components/Chart/ChartCard.cjs.map +1 -1
  6. package/dist/cjs/components/Dialog/Dialog.cjs +29 -2
  7. package/dist/cjs/components/Dialog/Dialog.cjs.map +1 -1
  8. package/dist/cjs/components/Drawer/Drawer.cjs +61 -14
  9. package/dist/cjs/components/Drawer/Drawer.cjs.map +1 -1
  10. package/dist/cjs/components/DropdownMenu/DropdownMenuItem.cjs +26 -7
  11. package/dist/cjs/components/DropdownMenu/DropdownMenuItem.cjs.map +1 -1
  12. package/dist/cjs/components/IconButton/IconButton.cjs +11 -2
  13. package/dist/cjs/components/IconButton/IconButton.cjs.map +1 -1
  14. package/dist/cjs/components/Icons/DocumentIcon.cjs +74 -0
  15. package/dist/cjs/components/Icons/DocumentIcon.cjs.map +1 -0
  16. package/dist/cjs/components/Icons/EpisodesIcon.cjs +65 -0
  17. package/dist/cjs/components/Icons/EpisodesIcon.cjs.map +1 -0
  18. package/dist/cjs/components/Icons/ShortsIcon.cjs +74 -0
  19. package/dist/cjs/components/Icons/ShortsIcon.cjs.map +1 -0
  20. package/dist/cjs/components/InfoBox/InfoBox.cjs +1 -1
  21. package/dist/cjs/components/InfoBox/InfoBox.cjs.map +1 -1
  22. package/dist/cjs/components/Pill/Pill.cjs +1 -1
  23. package/dist/cjs/components/Pill/Pill.cjs.map +1 -1
  24. package/dist/cjs/index.cjs +6 -0
  25. package/dist/cjs/index.cjs.map +1 -1
  26. package/dist/components/Button/Button.mjs +12 -8
  27. package/dist/components/Button/Button.mjs.map +1 -1
  28. package/dist/components/Chart/ChartCard.mjs +4 -3
  29. package/dist/components/Chart/ChartCard.mjs.map +1 -1
  30. package/dist/components/Dialog/Dialog.mjs +29 -2
  31. package/dist/components/Dialog/Dialog.mjs.map +1 -1
  32. package/dist/components/Drawer/Drawer.mjs +61 -14
  33. package/dist/components/Drawer/Drawer.mjs.map +1 -1
  34. package/dist/components/DropdownMenu/DropdownMenuItem.mjs +26 -7
  35. package/dist/components/DropdownMenu/DropdownMenuItem.mjs.map +1 -1
  36. package/dist/components/IconButton/IconButton.mjs +11 -2
  37. package/dist/components/IconButton/IconButton.mjs.map +1 -1
  38. package/dist/components/Icons/DocumentIcon.mjs +57 -0
  39. package/dist/components/Icons/DocumentIcon.mjs.map +1 -0
  40. package/dist/components/Icons/EpisodesIcon.mjs +48 -0
  41. package/dist/components/Icons/EpisodesIcon.mjs.map +1 -0
  42. package/dist/components/Icons/ShortsIcon.mjs +57 -0
  43. package/dist/components/Icons/ShortsIcon.mjs.map +1 -0
  44. package/dist/components/InfoBox/InfoBox.mjs +1 -1
  45. package/dist/components/InfoBox/InfoBox.mjs.map +1 -1
  46. package/dist/components/Pill/Pill.mjs +1 -1
  47. package/dist/components/Pill/Pill.mjs.map +1 -1
  48. package/dist/index.d.ts +85 -10
  49. package/dist/index.mjs +6 -0
  50. package/dist/index.mjs.map +1 -1
  51. package/dist/styles/base.css +157 -4
  52. package/dist/styles/theme.css +20 -12
  53. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -95,11 +95,13 @@ import { DenseGridViewIcon } from "./components/Icons/DenseGridViewIcon.mjs";
95
95
  import { DiamondIcon } from "./components/Icons/DiamondIcon.mjs";
96
96
  import { DiscordIcon } from "./components/Icons/DiscordIcon.mjs";
97
97
  import { DiscountIcon } from "./components/Icons/DiscountIcon.mjs";
98
+ import { DocumentIcon } from "./components/Icons/DocumentIcon.mjs";
98
99
  import { DonateIcon } from "./components/Icons/DonateIcon.mjs";
99
100
  import { DoubleTickIcon } from "./components/Icons/DoubleTickIcon.mjs";
100
101
  import { DownloadIcon } from "./components/Icons/DownloadIcon.mjs";
101
102
  import { EditIcon } from "./components/Icons/EditIcon.mjs";
102
103
  import { EmojiIcon } from "./components/Icons/EmojiIcon.mjs";
104
+ import { EpisodesIcon } from "./components/Icons/EpisodesIcon.mjs";
103
105
  import { ErrorCircleIcon } from "./components/Icons/ErrorCircleIcon.mjs";
104
106
  import { ErrorIcon } from "./components/Icons/ErrorIcon.mjs";
105
107
  import { ExclamationMarkIcon } from "./components/Icons/ExclamationMarkIcon.mjs";
@@ -176,6 +178,7 @@ import { SearchIcon } from "./components/Icons/SearchIcon.mjs";
176
178
  import { SendIcon } from "./components/Icons/SendIcon.mjs";
177
179
  import { SettingsIcon } from "./components/Icons/SettingsIcon.mjs";
178
180
  import { ShareIcon } from "./components/Icons/ShareIcon.mjs";
181
+ import { ShortsIcon } from "./components/Icons/ShortsIcon.mjs";
179
182
  import { SoundIcon } from "./components/Icons/SoundIcon.mjs";
180
183
  import { SpinnerIcon } from "./components/Icons/SpinnerIcon.mjs";
181
184
  import { StarIcon } from "./components/Icons/StarIcon.mjs";
@@ -403,6 +406,7 @@ export {
403
406
  DiscordIcon,
404
407
  DiscountIcon,
405
408
  Divider,
409
+ DocumentIcon,
406
410
  DonateIcon,
407
411
  DoubleTickIcon,
408
412
  DownloadIcon,
@@ -431,6 +435,7 @@ export {
431
435
  EditIcon,
432
436
  EmojiIcon,
433
437
  EmptyState,
438
+ EpisodesIcon,
434
439
  ErrorCircleIcon,
435
440
  ErrorIcon,
436
441
  ExclamationMarkIcon,
@@ -544,6 +549,7 @@ export {
544
549
  SendIcon,
545
550
  SettingsIcon,
546
551
  ShareIcon,
552
+ ShortsIcon,
547
553
  Skeleton,
548
554
  Slider,
549
555
  Slot,
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -65,9 +65,9 @@
65
65
  &:autofill {
66
66
  font-size: 16px !important;
67
67
  font-family: Inter !important;
68
- font-weight: 400 !important;
68
+ font-weight: var(--typography-body-default-16px-regular-font-weight) !important;
69
69
  line-height: 24px !important;
70
- letter-spacing: 0px !important;
70
+ letter-spacing: -0.16px !important;
71
71
  }
72
72
  }
73
73
 
@@ -77,9 +77,9 @@
77
77
  &:autofill {
78
78
  font-size: 14px !important;
79
79
  font-family: Inter !important;
80
- font-weight: 400 !important;
80
+ font-weight: var(--typography-body-small-14px-regular-font-weight) !important;
81
81
  line-height: 18px !important;
82
- letter-spacing: 0px !important;
82
+ letter-spacing: -0.035px !important;
83
83
  }
84
84
  }
85
85
 
@@ -318,6 +318,130 @@
318
318
  opacity: 0;
319
319
  }
320
320
  }
321
+ /*
322
+ * Upsell (brand) surface: the Figma `Upsell` button. A radial pool of
323
+ * `Green/300` rising from the bottom edge into the brand fill, lit by two
324
+ * green glows from its edge.
325
+ *
326
+ * The glows sit on `::before` rather than on the element's own box-shadow, so
327
+ * the inset `focus-visible:shadow-focus-ring` can still draw without wiping
328
+ * them out.
329
+ * `--fv-upsell-end` is the outer gradient stop, so a consumer moves the whole
330
+ * pool to the hover fill by swapping one property.
331
+ *
332
+ * A loading button is natively disabled but keeps the look, so the disabled
333
+ * resets skip `aria-busy`.
334
+ */
335
+ @utility fv-upsell {
336
+ --fv-upsell-end: var(--color-buttons-brand-default);
337
+ position: relative;
338
+ isolation: isolate;
339
+ background-image: radial-gradient(
340
+ 58.1% 100% at 50% 100%,
341
+ var(--fv-upsell-pool),
342
+ var(--fv-upsell-end)
343
+ );
344
+
345
+ &::before {
346
+ content: "";
347
+ position: absolute;
348
+ inset: 0;
349
+ z-index: -1;
350
+ border-radius: inherit;
351
+ pointer-events: none;
352
+ box-shadow: var(--fv-upsell-glow);
353
+ }
354
+
355
+ &:disabled:not([aria-busy="true"]) {
356
+ background-image: none;
357
+ }
358
+
359
+ &:disabled:not([aria-busy="true"])::before {
360
+ content: none;
361
+ }
362
+ }
363
+
364
+ /*
365
+ * An `fv-upsell` button on an inverted surface, such as a dark panel on a light
366
+ * page: it takes the other theme's glow, the glow made for that surface. Put it
367
+ * on the button (`negative`) or on any container; the glow is inherited.
368
+ *
369
+ * Elements painted with the inverted surface token do this for every upsell
370
+ * button inside them, so InfoBox, Toast, Banner and app surfaces using
371
+ * `bg-surface-primary-inverted` need no prop.
372
+ */
373
+ @utility fv-upsell-negative {
374
+ --fv-upsell-glow: var(--fv-upsell-glow-negative);
375
+ }
376
+
377
+ @layer utilities {
378
+ .bg-surface-primary-inverted {
379
+ --fv-upsell-glow: var(--fv-upsell-glow-negative);
380
+ }
381
+ }
382
+
383
+ @property --fv-upsell-angle {
384
+ syntax: "<angle>";
385
+ inherits: false;
386
+ initial-value: 0deg;
387
+ }
388
+
389
+ @keyframes fv-upsell-spin {
390
+ to {
391
+ --fv-upsell-angle: 360deg;
392
+ }
393
+ }
394
+
395
+ /*
396
+ * A white highlight that travels once round the rim of an `fv-upsell` button,
397
+ * then rests. It is a conic gradient masked to a 1.5px ring, turned by
398
+ * animating a registered angle. A single pass keeps the motion under the five
399
+ * seconds after which WCAG 2.2.2 asks for a pause control, and stops the
400
+ * per-frame repaint once it lands. It only moves for users who have not asked
401
+ * for reduced motion; for everyone else it rests at the top right.
402
+ *
403
+ * The rim hides while the button has keyboard focus, so the focus ring stays
404
+ * whole. It hides with `visibility` rather than `content: none`, which would
405
+ * remove the pseudo-element and replay the pass when it comes back, so the
406
+ * shine plays once per mount.
407
+ */
408
+ @utility fv-upsell-shine {
409
+ &::after {
410
+ content: "";
411
+ position: absolute;
412
+ inset: 0;
413
+ border-radius: inherit;
414
+ padding: 1.5px;
415
+ pointer-events: none;
416
+ background: conic-gradient(
417
+ from var(--fv-upsell-angle),
418
+ transparent 0deg,
419
+ var(--fv-upsell-shine-color) 40deg,
420
+ transparent 100deg,
421
+ transparent 360deg
422
+ );
423
+ -webkit-mask:
424
+ linear-gradient(#000 0 0) content-box,
425
+ linear-gradient(#000 0 0);
426
+ -webkit-mask-composite: xor;
427
+ mask:
428
+ linear-gradient(#000 0 0) content-box,
429
+ linear-gradient(#000 0 0);
430
+ mask-composite: exclude;
431
+ }
432
+
433
+ &:disabled:not([aria-busy="true"])::after,
434
+ &:focus-visible::after {
435
+ visibility: hidden;
436
+ }
437
+
438
+ @media (prefers-reduced-motion: no-preference) {
439
+ &::after {
440
+ animation: fv-upsell-spin var(--fv-upsell-shine-duration) var(--fv-upsell-shine-easing) 1;
441
+ }
442
+ }
443
+ }
444
+
321
445
  /*
322
446
  * Animate `height` between 0 and the panel's measured height
323
447
  * (`--radix-accordion-content-height`, which Radix sets from a getBoundingClientRect
@@ -416,3 +540,32 @@
416
540
  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
541
  --fv-raised-control-thumb-shadow: 0 1px 2px rgb(0 0 0 / 0.35), 0 2px 6px -2px rgb(0 0 0 / 0.4);
418
542
  }
543
+
544
+ /*
545
+ * Upsell surface tokens, read by the `fv-upsell` and `fv-upsell-shine`
546
+ * utilities. Figma's `Upsell` button (Fanvue Library, node 16650:1558) fills
547
+ * from `Color/Green/300` into `Color/Buttons/Brand/Default`. The button is
548
+ * brand green in both themes; only the glow changes with the page. On
549
+ * black, the `Green/800` / `Green/900` glows read as lit green. On a light page
550
+ * those same greens read as a grey shadow, so light mode draws the glow in the
551
+ * green they appear as on black (`Green/600`, translucent) to keep the look.
552
+ * `--fv-upsell-glow-negative` is the other theme's glow, for a button on an
553
+ * inverted surface (`fv-upsell-negative`).
554
+ */
555
+ :root {
556
+ --fv-upsell-pool: var(--primitives-color-green-300);
557
+ --fv-upsell-glow-on-light:
558
+ 0 0 4px color-mix(in srgb, var(--primitives-color-green-600) 60%, transparent),
559
+ 0 0 16px color-mix(in srgb, var(--primitives-color-green-600) 30%, transparent);
560
+ --fv-upsell-glow-on-dark: 0 0 4px var(--primitives-color-green-800), 0 0 16px var(--primitives-color-green-900);
561
+ --fv-upsell-glow: var(--fv-upsell-glow-on-light);
562
+ --fv-upsell-glow-negative: var(--fv-upsell-glow-on-dark);
563
+ --fv-upsell-shine-color: var(--primitives-color-whitealpha-900);
564
+ --fv-upsell-shine-duration: 3s;
565
+ --fv-upsell-shine-easing: linear;
566
+ }
567
+
568
+ .dark {
569
+ --fv-upsell-glow: var(--fv-upsell-glow-on-dark);
570
+ --fv-upsell-glow-negative: var(--fv-upsell-glow-on-light);
571
+ }
@@ -806,6 +806,10 @@
806
806
  /* Focus-ring colour, consumed by --shadow-focus-ring. Violet on light
807
807
  backgrounds; overridden to white in .dark so the ring stays visible. */
808
808
  --fv-focus-ring-color: var(--color-interaction-focus);
809
+
810
+ --typography-body-default-16px-regular-font-weight: 400;
811
+ --typography-body-small-14px-regular-font-weight: 400;
812
+ --typography-description-12px-regular-font-weight: 400;
809
813
  }
810
814
 
811
815
  .dark {
@@ -1102,6 +1106,10 @@
1102
1106
  --color-inputs-inputs-off: var(--color-inputs-inputs-disabled);
1103
1107
  --color-messages-background-receiver-2: var(--color-messages-background-receiver-stroke);
1104
1108
  --fv-focus-ring-color: var(--color-content-always-white);
1109
+
1110
+ --typography-body-default-16px-regular-font-weight: 450;
1111
+ --typography-body-small-14px-regular-font-weight: 450;
1112
+ --typography-description-12px-regular-font-weight: 500;
1105
1113
  }
1106
1114
 
1107
1115
  @utility typography-header-heading-xl {
@@ -1166,7 +1174,7 @@
1166
1174
  font-weight: 600;
1167
1175
  font-style: normal;
1168
1176
  font-stretch: normal;
1169
- letter-spacing: 0px;
1177
+ letter-spacing: -0.16px;
1170
1178
  line-height: 24px;
1171
1179
  }
1172
1180
 
@@ -1174,10 +1182,10 @@
1174
1182
  font-size: 16px;
1175
1183
  text-decoration: none;
1176
1184
  font-family: Inter;
1177
- font-weight: 400;
1185
+ font-weight: var(--typography-body-default-16px-regular-font-weight);
1178
1186
  font-style: normal;
1179
1187
  font-stretch: normal;
1180
- letter-spacing: 0px;
1188
+ letter-spacing: -0.16px;
1181
1189
  line-height: 24px;
1182
1190
  }
1183
1191
 
@@ -1188,7 +1196,7 @@
1188
1196
  font-weight: 600;
1189
1197
  font-style: normal;
1190
1198
  font-stretch: normal;
1191
- letter-spacing: 0px;
1199
+ letter-spacing: -0.035px;
1192
1200
  line-height: 18px;
1193
1201
  }
1194
1202
 
@@ -1196,10 +1204,10 @@
1196
1204
  font-size: 14px;
1197
1205
  text-decoration: none;
1198
1206
  font-family: Inter;
1199
- font-weight: 400;
1207
+ font-weight: var(--typography-body-small-14px-regular-font-weight);
1200
1208
  font-style: normal;
1201
1209
  font-stretch: normal;
1202
- letter-spacing: 0px;
1210
+ letter-spacing: -0.035px;
1203
1211
  line-height: 18px;
1204
1212
  }
1205
1213
 
@@ -1210,7 +1218,7 @@
1210
1218
  font-weight: 600;
1211
1219
  font-style: normal;
1212
1220
  font-stretch: normal;
1213
- letter-spacing: 0px;
1221
+ letter-spacing: 0.12px;
1214
1222
  line-height: 16px;
1215
1223
  }
1216
1224
 
@@ -1218,10 +1226,10 @@
1218
1226
  font-size: 12px;
1219
1227
  text-decoration: none;
1220
1228
  font-family: Inter;
1221
- font-weight: 400;
1229
+ font-weight: var(--typography-description-12px-regular-font-weight);
1222
1230
  font-style: normal;
1223
1231
  font-stretch: normal;
1224
- letter-spacing: 0px;
1232
+ letter-spacing: 0.12px;
1225
1233
  line-height: 16px;
1226
1234
  }
1227
1235
 
@@ -1255,7 +1263,7 @@
1255
1263
  font-weight: 600;
1256
1264
  font-style: normal;
1257
1265
  font-stretch: normal;
1258
- letter-spacing: 0px;
1266
+ letter-spacing: -0.16px;
1259
1267
  line-height: 22px;
1260
1268
  }
1261
1269
 
@@ -1266,7 +1274,7 @@
1266
1274
  font-weight: 600;
1267
1275
  font-style: normal;
1268
1276
  font-stretch: normal;
1269
- letter-spacing: 0px;
1277
+ letter-spacing: -0.035px;
1270
1278
  line-height: 18px;
1271
1279
  }
1272
1280
 
@@ -1277,6 +1285,6 @@
1277
1285
  font-weight: 600;
1278
1286
  font-style: normal;
1279
1287
  font-stretch: normal;
1280
- letter-spacing: 0px;
1288
+ letter-spacing: 0.12px;
1281
1289
  line-height: 16px;
1282
1290
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fanvue/ui",
3
- "version": "3.50.0",
3
+ "version": "3.51.0",
4
4
  "description": "React component library built with Tailwind CSS for Fanvue ecosystem",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org",