@fanvue/ui 3.17.0 → 3.19.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 (43) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/components/Badge/Badge.cjs +13 -11
  3. package/dist/cjs/components/Badge/Badge.cjs.map +1 -1
  4. package/dist/cjs/components/Banner/Banner.cjs +1 -1
  5. package/dist/cjs/components/Banner/Banner.cjs.map +1 -1
  6. package/dist/cjs/components/Chip/Chip.cjs +21 -1
  7. package/dist/cjs/components/Chip/Chip.cjs.map +1 -1
  8. package/dist/cjs/components/Count/Count.cjs +36 -7
  9. package/dist/cjs/components/Count/Count.cjs.map +1 -1
  10. package/dist/cjs/components/Icons/ReceiveMoneyIcon.cjs +79 -0
  11. package/dist/cjs/components/Icons/ReceiveMoneyIcon.cjs.map +1 -0
  12. package/dist/cjs/components/PhoneField/PhoneField.cjs +198 -0
  13. package/dist/cjs/components/PhoneField/PhoneField.cjs.map +1 -0
  14. package/dist/cjs/components/RatingSummary/RatingSummary.cjs +30 -23
  15. package/dist/cjs/components/RatingSummary/RatingSummary.cjs.map +1 -1
  16. package/dist/cjs/components/TextArea/TextArea.cjs +2 -2
  17. package/dist/cjs/components/TextArea/TextArea.cjs.map +1 -1
  18. package/dist/cjs/components/TextField/TextField.cjs +13 -6
  19. package/dist/cjs/components/TextField/TextField.cjs.map +1 -1
  20. package/dist/cjs/index.cjs +4 -0
  21. package/dist/cjs/index.cjs.map +1 -1
  22. package/dist/components/Badge/Badge.mjs +13 -11
  23. package/dist/components/Badge/Badge.mjs.map +1 -1
  24. package/dist/components/Banner/Banner.mjs +1 -1
  25. package/dist/components/Banner/Banner.mjs.map +1 -1
  26. package/dist/components/Chip/Chip.mjs +21 -1
  27. package/dist/components/Chip/Chip.mjs.map +1 -1
  28. package/dist/components/Count/Count.mjs +36 -7
  29. package/dist/components/Count/Count.mjs.map +1 -1
  30. package/dist/components/Icons/ReceiveMoneyIcon.mjs +62 -0
  31. package/dist/components/Icons/ReceiveMoneyIcon.mjs.map +1 -0
  32. package/dist/components/PhoneField/PhoneField.mjs +181 -0
  33. package/dist/components/PhoneField/PhoneField.mjs.map +1 -0
  34. package/dist/components/RatingSummary/RatingSummary.mjs +30 -23
  35. package/dist/components/RatingSummary/RatingSummary.mjs.map +1 -1
  36. package/dist/components/TextArea/TextArea.mjs +2 -2
  37. package/dist/components/TextArea/TextArea.mjs.map +1 -1
  38. package/dist/components/TextField/TextField.mjs +13 -6
  39. package/dist/components/TextField/TextField.mjs.map +1 -1
  40. package/dist/index.d.ts +109 -7
  41. package/dist/index.mjs +4 -0
  42. package/dist/index.mjs.map +1 -1
  43. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -715,7 +715,7 @@ export declare interface BadgeProps extends React_2.HTMLAttributes<HTMLSpanEleme
715
715
  }
716
716
 
717
717
  /** Visual style variant of the badge. */
718
- export declare type BadgeVariant = "default" | "dark" | "success" | "warning" | "error" | "special" | "info" | "successColour" | "warningColour" | "errorColour" | "infoColour" | "aiGenerated" | "negative" | "online" | "brand" | "pink" | "brandLight" | "pinkLight";
718
+ export declare type BadgeVariant = "default" | "dark" | "success" | "warning" | "error" | "special" | "info" | "successColour" | "warningColour" | "errorColour" | "infoColour" | "aiGenerated" | "negative" | "alwaysWhite" | "online" | "brand" | "pink" | "brandLight" | "pinkLight";
719
719
 
720
720
  /**
721
721
  * Bank icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
@@ -1530,6 +1530,12 @@ export declare interface ChipProps extends React_2.HTMLAttributes<HTMLElement> {
1530
1530
  rightIcon?: React_2.ReactNode;
1531
1531
  /** Notification badge content (e.g. `"99+"`). Passed as a string for i18n support. */
1532
1532
  notificationLabel?: string;
1533
+ /** Numeric value for the notification badge. Uses the `Count` component for overflow formatting. Takes precedence over `notificationLabel` when both are provided. */
1534
+ notificationCount?: number;
1535
+ /** Maximum value before the badge shows overflow (e.g. `"9+"`). Only applies when `notificationCount` is set. @default 99 */
1536
+ notificationMax?: number;
1537
+ /** Colour variant of the notification badge. @default "brand" */
1538
+ notificationVariant?: CountVariant;
1533
1539
  /** Click handler — when provided, the chip renders as a `<button>` for accessibility. */
1534
1540
  onClick?: React_2.MouseEventHandler<HTMLElement>;
1535
1541
  /** Merge props onto a child element instead of rendering a wrapper. @default false */
@@ -1636,24 +1642,33 @@ export declare const CopyIcon: React_2.ForwardRefExoticComponent<BaseIconProps &
1636
1642
  export declare type CopyIconProps = BaseIconProps;
1637
1643
 
1638
1644
  /**
1639
- * A numeric badge typically used for notification counts. Automatically
1640
- * truncates values above `max` (e.g. `"99+"`). Renders nothing when the
1641
- * value is `0` and no children are provided.
1645
+ * V2 Notification Count a small badge for unread activity on nav items,
1646
+ * icons, buttons, or chips. Truncates values above `max` (e.g. `"99+"`).
1647
+ * Renders nothing when the value is `0` and no children are provided.
1642
1648
  *
1643
1649
  * @example
1644
1650
  * ```tsx
1645
1651
  * <Count value={5} variant="brand" />
1652
+ * <Count value={1} variant="brand" showAmount={false} />
1646
1653
  * ```
1647
1654
  */
1648
1655
  export declare const Count: React_2.ForwardRefExoticComponent<CountProps & React_2.RefAttributes<HTMLSpanElement>>;
1649
1656
 
1650
1657
  export declare interface CountProps extends React_2.HTMLAttributes<HTMLSpanElement> {
1651
- /** Colour variant of the count badge. @default "default" */
1658
+ /**
1659
+ * Colour variant of the count badge.
1660
+ * Figma V2 types: `default` | `brand` | `contrast`. @default "default"
1661
+ */
1652
1662
  variant?: CountVariant;
1653
1663
  /** Numeric value to display. Renders nothing when `0` and no `children` are provided. @default 0 */
1654
1664
  value?: number;
1655
1665
  /** Maximum value before showing overflow (e.g. `"99+"`). @default 99 */
1656
1666
  max?: number;
1667
+ /**
1668
+ * When `false`, renders an 8px unread dot instead of a numeric amount
1669
+ * (Figma Show Amount=False). @default true
1670
+ */
1671
+ showAmount?: boolean;
1657
1672
  /** Size of the count badge. @default "32" */
1658
1673
  size?: CountSize;
1659
1674
  /** Merge props onto a child element instead of rendering a `<span>`. @default false */
@@ -1663,8 +1678,13 @@ export declare interface CountProps extends React_2.HTMLAttributes<HTMLSpanEleme
1663
1678
  /** Size of the count badge, aligned with button and icon-button sizes. */
1664
1679
  export declare type CountSize = "16" | "24" | "32";
1665
1680
 
1666
- /** Colour variant for the count badge. */
1667
- export declare type CountVariant = "default" | "alert" | "brand" | "pink" | "info" | "success" | "warning";
1681
+ /**
1682
+ * Colour variant for the count badge.
1683
+ *
1684
+ * V2 Notification Count (Fanvue Library) types: `default`, `brand`, `contrast`.
1685
+ * Remaining values are retained extensions for existing consumers.
1686
+ */
1687
+ export declare type CountVariant = "default" | "contrast" | "brand" | "alert" | "pink" | "info" | "success" | "warning";
1668
1688
 
1669
1689
  /**
1670
1690
  * A portrait media card highlighting a creator with avatar, name, optional
@@ -3840,6 +3860,55 @@ export declare const PeopleIcon: React_2.ForwardRefExoticComponent<React_2.SVGAt
3840
3860
  className?: string;
3841
3861
  } & React_2.RefAttributes<SVGSVGElement>>;
3842
3862
 
3863
+ /**
3864
+ * A phone number input with a country selector (flag + chevron), a fixed dial
3865
+ * code prefix, and a `tel` input. The country picker itself is owned by the
3866
+ * consumer: pass the selected country's `flag` and `dialCode`, and open your
3867
+ * picker from `onCountrySelect`.
3868
+ *
3869
+ * Provide at least one of `label`, `aria-label`, or `aria-labelledby` for
3870
+ * accessibility — a console warning is emitted in development if none are set.
3871
+ *
3872
+ * @example
3873
+ * ```tsx
3874
+ * <PhoneField
3875
+ * label="Phone number"
3876
+ * flag={<img src={italyFlag} alt="" />}
3877
+ * dialCode="+39"
3878
+ * onCountrySelect={openCountryPicker}
3879
+ * value={number}
3880
+ * onChange={(e) => setNumber(e.target.value)}
3881
+ * />
3882
+ * ```
3883
+ */
3884
+ export declare const PhoneField: React_2.ForwardRefExoticComponent<PhoneFieldProps & React_2.RefAttributes<HTMLInputElement>>;
3885
+
3886
+ export declare interface PhoneFieldProps extends Omit<React_2.InputHTMLAttributes<HTMLInputElement>, "size" | "prefix"> {
3887
+ /** Label text displayed above the input. Also used as the accessible name. */
3888
+ label?: string;
3889
+ /** Helper text displayed below the input. Replaced by `errorMessage` when `error` is `true`. */
3890
+ helperText?: string;
3891
+ /** Height of the phone field in pixels. @default "48" */
3892
+ size?: PhoneFieldSize;
3893
+ /** Whether the field is in an error state. @default false */
3894
+ error?: boolean;
3895
+ /** Error message displayed below the input. Shown instead of `helperText` when `error` is `true`. */
3896
+ errorMessage?: string;
3897
+ /** Dial code of the selected country, shown before the number (e.g. `"+39"`). */
3898
+ dialCode?: React_2.ReactNode;
3899
+ /** Flag of the selected country, rendered in the country selector (e.g. an image or flag icon). */
3900
+ flag?: React_2.ReactNode;
3901
+ /** Fired when the country selector (flag + chevron) is activated. Open the country picker here. */
3902
+ onCountrySelect?: () => void;
3903
+ /** Accessible name for the country selector button. @default "Select country" */
3904
+ countryButtonLabel?: string;
3905
+ /** Whether the field stretches to fill its container width. @default false */
3906
+ fullWidth?: boolean;
3907
+ }
3908
+
3909
+ /** Phone field height in pixels. */
3910
+ export declare type PhoneFieldSize = "48" | "40" | "32";
3911
+
3843
3912
  /**
3844
3913
  * Phone icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
3845
3914
  *
@@ -4171,6 +4240,11 @@ export declare interface RatingCount {
4171
4240
  * followed by a per-rating histogram. Bar lengths are scaled relative to the
4172
4241
  * most-reviewed rating, so the busiest rating always fills the track.
4173
4242
  *
4243
+ * The histogram is one shared grid (with subgrid rows) rather than per-row
4244
+ * flex: the label column is sized by the widest label across all rows, so a
4245
+ * width difference between labels (e.g. "1 review" vs "3 reviews") never
4246
+ * changes a row's track length — every bar's right edge stays aligned.
4247
+ *
4174
4248
  * The brand star is decorative; the header and each histogram row expose
4175
4249
  * `role="img"` with an accessible label (override via `formatAverageLabel` /
4176
4250
  * `formatRatingLabel`) so the single-star-plus-number reads clearly.
@@ -4226,6 +4300,19 @@ export declare interface RatingSummaryProps extends Omit<React_2.HTMLAttributes<
4226
4300
  formatRatingLabel?: (rating: number, count: number) => string;
4227
4301
  }
4228
4302
 
4303
+ /**
4304
+ * Receive Money icon. Renders at sizes 16, 24, or 32 px.
4305
+ *
4306
+ * @example
4307
+ * ```tsx
4308
+ * <ReceiveMoneyIcon size={24} />
4309
+ * ```
4310
+ */
4311
+ export declare const ReceiveMoneyIcon: React_2.ForwardRefExoticComponent<BaseIconProps & React_2.RefAttributes<SVGSVGElement>>;
4312
+
4313
+ /** Props for {@link ReceiveMoneyIcon}. See {@link BaseIconProps} for the shared shape. */
4314
+ export declare type ReceiveMoneyIconProps = BaseIconProps;
4315
+
4229
4316
  /**
4230
4317
  * Repeat icon. Renders at sizes 16, 24, or 32 px.
4231
4318
  *
@@ -5509,6 +5596,15 @@ export declare type TextAreaSize = "48" | "40" | "32";
5509
5596
  * ```tsx
5510
5597
  * <TextField label="Price" leftLabel="$" rightLabel="USD" placeholder="0.00" />
5511
5598
  * ```
5599
+ *
5600
+ * @example
5601
+ * ```tsx
5602
+ * <TextField
5603
+ * label="Promo code"
5604
+ * placeholder="Enter code"
5605
+ * action={<Chip size="32" onClick={apply}>Apply</Chip>}
5606
+ * />
5607
+ * ```
5512
5608
  */
5513
5609
  export declare const TextField: React_2.ForwardRefExoticComponent<TextFieldProps & React_2.RefAttributes<HTMLInputElement>>;
5514
5610
 
@@ -5533,6 +5629,12 @@ export declare interface TextFieldProps extends Omit<React_2.InputHTMLAttributes
5533
5629
  leftLabel?: React_2.ReactNode;
5534
5630
  /** Fixed, non-editable label pinned inside the right edge of the field — for a unit or suffix such as a currency code or domain. */
5535
5631
  rightLabel?: React_2.ReactNode;
5632
+ /**
5633
+ * Trailing interactive element pinned to the right edge — typically a `Chip`
5634
+ * or `Button` (the "with button" field type). Reduces the right padding so the
5635
+ * control sits flush, and clicks on it do not steal focus from the input.
5636
+ */
5637
+ action?: React_2.ReactNode;
5536
5638
  /** Whether the text field stretches to fill its container width. @default false */
5537
5639
  fullWidth?: boolean;
5538
5640
  }
package/dist/index.mjs CHANGED
@@ -151,6 +151,7 @@ import { PlayIcon } from "./components/Icons/PlayIcon.mjs";
151
151
  import { PlusIcon } from "./components/Icons/PlusIcon.mjs";
152
152
  import { PrivacyIcon } from "./components/Icons/PrivacyIcon.mjs";
153
153
  import { QueueIcon } from "./components/Icons/QueueIcon.mjs";
154
+ import { ReceiveMoneyIcon } from "./components/Icons/ReceiveMoneyIcon.mjs";
154
155
  import { RepeatIcon } from "./components/Icons/RepeatIcon.mjs";
155
156
  import { Reply2Icon } from "./components/Icons/Reply2Icon.mjs";
156
157
  import { ReplyIcon } from "./components/Icons/ReplyIcon.mjs";
@@ -213,6 +214,7 @@ import { OnlineBlinkingIcon } from "./components/OnlineBlinkingIcon/OnlineBlinki
213
214
  import { PageSelector } from "./components/PageSelector/PageSelector.mjs";
214
215
  import { Pagination } from "./components/Pagination/Pagination.mjs";
215
216
  import { PasswordField } from "./components/PasswordField/PasswordField.mjs";
217
+ import { PhoneField } from "./components/PhoneField/PhoneField.mjs";
216
218
  import { Pill } from "./components/Pill/Pill.mjs";
217
219
  import { ProfileOnlineStatus } from "./components/ProfileOnlineStatus/ProfileOnlineStatus.mjs";
218
220
  import { ProfileStatus } from "./components/ProfileStatus/ProfileStatus.mjs";
@@ -447,6 +449,7 @@ export {
447
449
  PasswordField,
448
450
  PauseIcon,
449
451
  PeopleIcon,
452
+ PhoneField,
450
453
  PhoneIcon,
451
454
  PhoneOffIcon,
452
455
  Pill,
@@ -464,6 +467,7 @@ export {
464
467
  Radio,
465
468
  RadioGroup,
466
469
  RatingSummary,
470
+ ReceiveMoneyIcon,
467
471
  RepeatIcon,
468
472
  Reply2Icon,
469
473
  ReplyIcon,
@@ -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.17.0",
3
+ "version": "3.19.0",
4
4
  "description": "React component library built with Tailwind CSS for Fanvue ecosystem",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org",