@fanvue/ui 3.7.2 → 3.8.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.
- package/dist/cjs/components/Breadcrumb/Breadcrumb.cjs +46 -23
- package/dist/cjs/components/Breadcrumb/Breadcrumb.cjs.map +1 -1
- package/dist/cjs/components/Icons/GifIcon.cjs +101 -0
- package/dist/cjs/components/Icons/GifIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/VerifiedIcon.cjs +82 -0
- package/dist/cjs/components/Icons/VerifiedIcon.cjs.map +1 -0
- package/dist/cjs/components/Pagination/Pagination.cjs +7 -7
- package/dist/cjs/components/Pagination/Pagination.cjs.map +1 -1
- package/dist/cjs/components/ProfileOnlineStatus/ProfileOnlineStatus.cjs +44 -0
- package/dist/cjs/components/ProfileOnlineStatus/ProfileOnlineStatus.cjs.map +1 -0
- package/dist/cjs/components/RatingSummary/RatingSummary.cjs +103 -0
- package/dist/cjs/components/RatingSummary/RatingSummary.cjs.map +1 -0
- package/dist/cjs/components/ReviewCard/ReviewCard.cjs +51 -0
- package/dist/cjs/components/ReviewCard/ReviewCard.cjs.map +1 -0
- package/dist/cjs/components/Toast/Toast.cjs +18 -32
- package/dist/cjs/components/Toast/Toast.cjs.map +1 -1
- package/dist/cjs/components/UserDisplayName/UserDisplayName.cjs +67 -0
- package/dist/cjs/components/UserDisplayName/UserDisplayName.cjs.map +1 -0
- package/dist/cjs/components/UserHandle/UserHandle.cjs +46 -0
- package/dist/cjs/components/UserHandle/UserHandle.cjs.map +1 -0
- package/dist/cjs/components/UserItem/UserItem.cjs +74 -0
- package/dist/cjs/components/UserItem/UserItem.cjs.map +1 -0
- package/dist/cjs/index.cjs +18 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/utils/getInitials.cjs +10 -0
- package/dist/cjs/utils/getInitials.cjs.map +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.mjs +46 -23
- package/dist/components/Breadcrumb/Breadcrumb.mjs.map +1 -1
- package/dist/components/Icons/GifIcon.mjs +84 -0
- package/dist/components/Icons/GifIcon.mjs.map +1 -0
- package/dist/components/Icons/VerifiedIcon.mjs +65 -0
- package/dist/components/Icons/VerifiedIcon.mjs.map +1 -0
- package/dist/components/Pagination/Pagination.mjs +7 -7
- package/dist/components/Pagination/Pagination.mjs.map +1 -1
- package/dist/components/ProfileOnlineStatus/ProfileOnlineStatus.mjs +27 -0
- package/dist/components/ProfileOnlineStatus/ProfileOnlineStatus.mjs.map +1 -0
- package/dist/components/RatingSummary/RatingSummary.mjs +86 -0
- package/dist/components/RatingSummary/RatingSummary.mjs.map +1 -0
- package/dist/components/ReviewCard/ReviewCard.mjs +34 -0
- package/dist/components/ReviewCard/ReviewCard.mjs.map +1 -0
- package/dist/components/Toast/Toast.mjs +18 -32
- package/dist/components/Toast/Toast.mjs.map +1 -1
- package/dist/components/UserDisplayName/UserDisplayName.mjs +50 -0
- package/dist/components/UserDisplayName/UserDisplayName.mjs.map +1 -0
- package/dist/components/UserHandle/UserHandle.mjs +29 -0
- package/dist/components/UserHandle/UserHandle.mjs.map +1 -0
- package/dist/components/UserItem/UserItem.mjs +57 -0
- package/dist/components/UserItem/UserItem.mjs.map +1 -0
- package/dist/index.d.ts +246 -4
- package/dist/index.mjs +18 -0
- package/dist/index.mjs.map +1 -1
- package/dist/utils/getInitials.mjs +10 -0
- package/dist/utils/getInitials.mjs.map +1 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -744,7 +744,7 @@ export declare interface BottomNavigationProps extends React_2.HTMLAttributes<HT
|
|
|
744
744
|
* @example
|
|
745
745
|
* ```tsx
|
|
746
746
|
* <Breadcrumb>
|
|
747
|
-
* <BreadcrumbList>
|
|
747
|
+
* <BreadcrumbList size="14px">
|
|
748
748
|
* <BreadcrumbItem><BreadcrumbLink href="/">Home</BreadcrumbLink></BreadcrumbItem>
|
|
749
749
|
* <BreadcrumbSeparator />
|
|
750
750
|
* <BreadcrumbItem><BreadcrumbPage>Current Page</BreadcrumbPage></BreadcrumbItem>
|
|
@@ -775,13 +775,16 @@ export declare interface BreadcrumbLinkProps extends React_2.ComponentPropsWitho
|
|
|
775
775
|
|
|
776
776
|
/**
|
|
777
777
|
* Ordered list container for breadcrumb items. Automatically injects a
|
|
778
|
-
* separator between each child item
|
|
778
|
+
* separator between each child item and shares the trail {@link BreadcrumbSize}
|
|
779
|
+
* with its descendants.
|
|
779
780
|
*/
|
|
780
781
|
export declare const BreadcrumbList: React_2.ForwardRefExoticComponent<BreadcrumbListProps & React_2.RefAttributes<HTMLOListElement>>;
|
|
781
782
|
|
|
782
783
|
export declare interface BreadcrumbListProps extends React_2.ComponentPropsWithoutRef<"ol"> {
|
|
783
|
-
/** Custom separator element rendered between items. @default
|
|
784
|
+
/** Custom separator element rendered between items. @default "/" */
|
|
784
785
|
separator?: React_2.ReactNode;
|
|
786
|
+
/** Text size preset applied to every item in the trail. @default "12px" */
|
|
787
|
+
size?: BreadcrumbSize;
|
|
785
788
|
}
|
|
786
789
|
|
|
787
790
|
/**
|
|
@@ -799,13 +802,16 @@ export declare interface BreadcrumbProps extends React_2.ComponentPropsWithoutRe
|
|
|
799
802
|
|
|
800
803
|
/**
|
|
801
804
|
* Visual separator rendered between breadcrumb items.
|
|
802
|
-
* Renders a
|
|
805
|
+
* Renders a `/` glyph by default and is hidden from assistive technology.
|
|
803
806
|
*/
|
|
804
807
|
export declare const BreadcrumbSeparator: React_2.ForwardRefExoticComponent<BreadcrumbSeparatorProps & React_2.RefAttributes<HTMLLIElement>>;
|
|
805
808
|
|
|
806
809
|
export declare interface BreadcrumbSeparatorProps extends React_2.ComponentPropsWithoutRef<"li"> {
|
|
807
810
|
}
|
|
808
811
|
|
|
812
|
+
/** Text size preset controlling the typography of the whole breadcrumb trail. @default "12px" */
|
|
813
|
+
export declare type BreadcrumbSize = "12px" | "14px" | "16px";
|
|
814
|
+
|
|
809
815
|
/** Breakpoint values for responsive props. */
|
|
810
816
|
declare type Breakpoint = "sm" | "md" | "lg" | "xl";
|
|
811
817
|
|
|
@@ -2557,6 +2563,28 @@ export declare const GenderIcon: React_2.ForwardRefExoticComponent<BaseIconProps
|
|
|
2557
2563
|
/** Props for {@link GenderIcon}. See {@link BaseIconProps} for the shared shape. */
|
|
2558
2564
|
export declare type GenderIconProps = BaseIconProps;
|
|
2559
2565
|
|
|
2566
|
+
/**
|
|
2567
|
+
* Returns the first letters of the first one or two words in a given string, capitalized.
|
|
2568
|
+
* @example
|
|
2569
|
+
* getInitials("Ciao Bello"); // "CB"
|
|
2570
|
+
* getInitials("JavaScript"); // "J"
|
|
2571
|
+
* getInitials(undefined); // ""
|
|
2572
|
+
*/
|
|
2573
|
+
export declare const getInitials: (str?: string | null) => string;
|
|
2574
|
+
|
|
2575
|
+
/**
|
|
2576
|
+
* Gif icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
|
|
2577
|
+
*
|
|
2578
|
+
* @example
|
|
2579
|
+
* ```tsx
|
|
2580
|
+
* <GifIcon size={24} filled />
|
|
2581
|
+
* ```
|
|
2582
|
+
*/
|
|
2583
|
+
export declare const GifIcon: React_2.ForwardRefExoticComponent<BaseIconProps & React_2.RefAttributes<SVGSVGElement>>;
|
|
2584
|
+
|
|
2585
|
+
/** Props for {@link GifIcon}. See {@link BaseIconProps} for the shared shape. */
|
|
2586
|
+
export declare type GifIconProps = BaseIconProps;
|
|
2587
|
+
|
|
2560
2588
|
/**
|
|
2561
2589
|
* Gift icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
|
|
2562
2590
|
*
|
|
@@ -3444,6 +3472,17 @@ export declare const PrivacyIcon: React_2.ForwardRefExoticComponent<BaseIconProp
|
|
|
3444
3472
|
/** Props for {@link PrivacyIcon}. See {@link BaseIconProps} for the shared shape. */
|
|
3445
3473
|
export declare type PrivacyIconProps = BaseIconProps;
|
|
3446
3474
|
|
|
3475
|
+
/**
|
|
3476
|
+
* Inline online-status indicator: a pulsing dot followed by a label. Used by
|
|
3477
|
+
* {@link UserDisplayName} when `showOnlineStatus` is set.
|
|
3478
|
+
*/
|
|
3479
|
+
export declare const ProfileOnlineStatus: React_2.ForwardRefExoticComponent<ProfileOnlineStatusProps & React_2.RefAttributes<HTMLSpanElement>>;
|
|
3480
|
+
|
|
3481
|
+
export declare interface ProfileOnlineStatusProps extends React_2.HTMLAttributes<HTMLSpanElement> {
|
|
3482
|
+
/** Visible status label rendered next to the indicator. @default "Online" */
|
|
3483
|
+
label?: string;
|
|
3484
|
+
}
|
|
3485
|
+
|
|
3447
3486
|
/**
|
|
3448
3487
|
* A horizontal progress indicator with optional title, completion percentage,
|
|
3449
3488
|
* step count, and helper text. The bar colour reflects progress when using the
|
|
@@ -3540,6 +3579,74 @@ export declare interface RadioProps extends Omit<React_2.ComponentPropsWithoutRe
|
|
|
3540
3579
|
helperText?: string;
|
|
3541
3580
|
}
|
|
3542
3581
|
|
|
3582
|
+
/** A single rating value paired with the number of reviews that gave it. */
|
|
3583
|
+
export declare interface RatingCount {
|
|
3584
|
+
/** The rating value this entry represents (e.g. `5`). */
|
|
3585
|
+
rating: number;
|
|
3586
|
+
/** Number of reviews that gave this rating. */
|
|
3587
|
+
count: number;
|
|
3588
|
+
}
|
|
3589
|
+
|
|
3590
|
+
/**
|
|
3591
|
+
* An aggregated rating overview: a headline average with the total review count,
|
|
3592
|
+
* followed by a per-rating histogram. Bar lengths are scaled relative to the
|
|
3593
|
+
* most-reviewed rating, so the busiest rating always fills the track.
|
|
3594
|
+
*
|
|
3595
|
+
* The brand star is decorative; the header and each histogram row expose
|
|
3596
|
+
* `role="img"` with an accessible label (override via `formatAverageLabel` /
|
|
3597
|
+
* `formatRatingLabel`) so the single-star-plus-number reads clearly.
|
|
3598
|
+
*
|
|
3599
|
+
* @example
|
|
3600
|
+
* ```tsx
|
|
3601
|
+
* <RatingSummary
|
|
3602
|
+
* distribution={[
|
|
3603
|
+
* { rating: 5, count: 300 },
|
|
3604
|
+
* { rating: 4, count: 20 },
|
|
3605
|
+
* { rating: 3, count: 20 },
|
|
3606
|
+
* { rating: 2, count: 10 },
|
|
3607
|
+
* { rating: 1, count: 0 },
|
|
3608
|
+
* ]}
|
|
3609
|
+
* />
|
|
3610
|
+
* ```
|
|
3611
|
+
*/
|
|
3612
|
+
export declare const RatingSummary: React_2.ForwardRefExoticComponent<RatingSummaryProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
3613
|
+
|
|
3614
|
+
export declare interface RatingSummaryProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
3615
|
+
/**
|
|
3616
|
+
* Per-rating review counts. Order is not significant — rows always render from
|
|
3617
|
+
* `maxRating` down to `1`, and any rating without an entry renders as zero.
|
|
3618
|
+
* Entries are expected to use whole-number ratings within `1`–`maxRating`;
|
|
3619
|
+
* any outside that range are ignored, including in the derived total and average.
|
|
3620
|
+
*/
|
|
3621
|
+
distribution: RatingCount[];
|
|
3622
|
+
/**
|
|
3623
|
+
* Average rating shown in the header. Defaults to the count-weighted mean of
|
|
3624
|
+
* `distribution`; provide it to display a server-computed average instead.
|
|
3625
|
+
*/
|
|
3626
|
+
averageRating?: number;
|
|
3627
|
+
/** Highest possible rating. Sets how many histogram rows render. @default 5 */
|
|
3628
|
+
maxRating?: number;
|
|
3629
|
+
/**
|
|
3630
|
+
* Formats a review count into its label, without surrounding parentheses.
|
|
3631
|
+
* Used for the visible text and as the count portion of the default
|
|
3632
|
+
* accessible labels.
|
|
3633
|
+
* @default ``(count) => `${count.toLocaleString()} review(s)` ``
|
|
3634
|
+
*/
|
|
3635
|
+
formatCount?: (count: number) => string;
|
|
3636
|
+
/**
|
|
3637
|
+
* Builds the accessible label for the header. Override to localise the
|
|
3638
|
+
* screen-reader text. `average` is the already-formatted average string.
|
|
3639
|
+
* @default ``(average, max, total) => `Average rating ${average} out of ${max}, ${formatCount(total)}` ``
|
|
3640
|
+
*/
|
|
3641
|
+
formatAverageLabel?: (average: string, maxRating: number, total: number) => string;
|
|
3642
|
+
/**
|
|
3643
|
+
* Builds the accessible label for each histogram row. Override to localise the
|
|
3644
|
+
* screen-reader text.
|
|
3645
|
+
* @default ``(rating, count) => `${rating} star(s), ${formatCount(count)}` ``
|
|
3646
|
+
*/
|
|
3647
|
+
formatRatingLabel?: (rating: number, count: number) => string;
|
|
3648
|
+
}
|
|
3649
|
+
|
|
3543
3650
|
/**
|
|
3544
3651
|
* Repeat icon. Renders at sizes 16, 24, or 32 px.
|
|
3545
3652
|
*
|
|
@@ -3592,6 +3699,34 @@ export declare const ReverseIcon: React_2.ForwardRefExoticComponent<BaseIconProp
|
|
|
3592
3699
|
/** Props for {@link ReverseIcon}. See {@link BaseIconProps} for the shared shape. */
|
|
3593
3700
|
export declare type ReverseIconProps = BaseIconProps;
|
|
3594
3701
|
|
|
3702
|
+
/**
|
|
3703
|
+
* A single written review: a star rating with an optional author byline, a
|
|
3704
|
+
* title, and the review body. Stack several with a {@link Divider} between them
|
|
3705
|
+
* to build a review list.
|
|
3706
|
+
*
|
|
3707
|
+
* @example
|
|
3708
|
+
* ```tsx
|
|
3709
|
+
* <ReviewCard rating={4} author="@jane_doe" title="A great app to start!">
|
|
3710
|
+
* Easily plan and organize your content. Streamline your scheduling so you can
|
|
3711
|
+
* focus on what you do best.
|
|
3712
|
+
* </ReviewCard>
|
|
3713
|
+
* ```
|
|
3714
|
+
*/
|
|
3715
|
+
export declare const ReviewCard: React_2.ForwardRefExoticComponent<ReviewCardProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
3716
|
+
|
|
3717
|
+
export declare interface ReviewCardProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
3718
|
+
/** Star rating the reviewer gave, shown beside the star icon. */
|
|
3719
|
+
rating: number;
|
|
3720
|
+
/** Highest possible rating, used only in the accessible label (e.g. "4 out of 5"). @default 5 */
|
|
3721
|
+
maxRating?: number;
|
|
3722
|
+
/** Reviewer name or handle, rendered after "by". Omitted when not provided. */
|
|
3723
|
+
author?: React_2.ReactNode;
|
|
3724
|
+
/** Short headline for the review. */
|
|
3725
|
+
title?: React_2.ReactNode;
|
|
3726
|
+
/** Review body text. */
|
|
3727
|
+
children?: React_2.ReactNode;
|
|
3728
|
+
}
|
|
3729
|
+
|
|
3595
3730
|
/**
|
|
3596
3731
|
* A text input field with a search icon and optional clear button.
|
|
3597
3732
|
*
|
|
@@ -4973,6 +5108,60 @@ export declare const UserCircleIcon: React_2.ForwardRefExoticComponent<React_2.S
|
|
|
4973
5108
|
className?: string;
|
|
4974
5109
|
} & React_2.RefAttributes<SVGSVGElement>>;
|
|
4975
5110
|
|
|
5111
|
+
/**
|
|
5112
|
+
* Renders a user's display name with optional ambassador/verified badges and an
|
|
5113
|
+
* online-status indicator. Only the name shrinks and truncates; trailing badges
|
|
5114
|
+
* and the online-status indicator stay visible on the same line.
|
|
5115
|
+
*
|
|
5116
|
+
* Typography is not baked in: pass a `typography-*` utility via `className` on
|
|
5117
|
+
* the root and the name inherits it. Use `typography-body-small-14px-semibold`
|
|
5118
|
+
* for the standard display-name scale.
|
|
5119
|
+
*
|
|
5120
|
+
* When both `ambassador` and `verified` are set, the ambassador badge takes
|
|
5121
|
+
* precedence. Its tint uses `text-success-content` (not `text-icons-brand-green`)
|
|
5122
|
+
* so the green darkens in light mode and lightens in dark mode, matching
|
|
5123
|
+
* {@link ProfileOnlineStatus}; `text-icons-brand-green` is fixed across modes.
|
|
5124
|
+
*
|
|
5125
|
+
* @example
|
|
5126
|
+
* ```tsx
|
|
5127
|
+
* <UserDisplayName className="typography-body-small-14px-semibold">Jane Doe</UserDisplayName>
|
|
5128
|
+
* ```
|
|
5129
|
+
*/
|
|
5130
|
+
export declare const UserDisplayName: React_2.ForwardRefExoticComponent<UserDisplayNameProps & React_2.RefAttributes<HTMLElement>>;
|
|
5131
|
+
|
|
5132
|
+
export declare interface UserDisplayNameProps extends React_2.HTMLAttributes<HTMLElement> {
|
|
5133
|
+
/** Render an ambassador badge after the name. */
|
|
5134
|
+
ambassador?: boolean;
|
|
5135
|
+
/** Accessible label for the ambassador badge. @default "Ambassador" */
|
|
5136
|
+
ambassadorLabel?: string;
|
|
5137
|
+
/** HTML element used for the root wrapper. @default "span" */
|
|
5138
|
+
component?: "span" | "h1" | "h2" | "h3" | "p" | "div";
|
|
5139
|
+
/** Truncate the display name on a single line. @default true */
|
|
5140
|
+
noWrap?: boolean;
|
|
5141
|
+
/** Accessible label for the online-status indicator. @default "Online" */
|
|
5142
|
+
onlineLabel?: string;
|
|
5143
|
+
/** Render the inline online-status indicator after the name. @default false */
|
|
5144
|
+
showOnlineStatus?: boolean;
|
|
5145
|
+
/** Render a verified badge after the name (ignored when `ambassador` is set). */
|
|
5146
|
+
verified?: boolean;
|
|
5147
|
+
/** Accessible label for the verified badge. @default "Verified" */
|
|
5148
|
+
verifiedLabel?: string;
|
|
5149
|
+
}
|
|
5150
|
+
|
|
5151
|
+
/**
|
|
5152
|
+
* Renders a user handle prefixed with the `@` symbol as muted, truncated
|
|
5153
|
+
* secondary text.
|
|
5154
|
+
*
|
|
5155
|
+
* @example
|
|
5156
|
+
* ```tsx
|
|
5157
|
+
* <UserHandle>jane_doe</UserHandle>
|
|
5158
|
+
* ```
|
|
5159
|
+
*/
|
|
5160
|
+
export declare const UserHandle: React_2.ForwardRefExoticComponent<UserHandleProps & React_2.RefAttributes<HTMLSpanElement>>;
|
|
5161
|
+
|
|
5162
|
+
export declare interface UserHandleProps extends React_2.HTMLAttributes<HTMLSpanElement> {
|
|
5163
|
+
}
|
|
5164
|
+
|
|
4976
5165
|
/**
|
|
4977
5166
|
* User icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
|
|
4978
5167
|
*
|
|
@@ -4986,6 +5175,45 @@ export declare const UserIcon: React_2.ForwardRefExoticComponent<BaseIconProps &
|
|
|
4986
5175
|
/** Props for {@link UserIcon}. See {@link BaseIconProps} for the shared shape. */
|
|
4987
5176
|
export declare type UserIconProps = BaseIconProps;
|
|
4988
5177
|
|
|
5178
|
+
/**
|
|
5179
|
+
* A compact user row showing an avatar, display name (or nickname) and handle,
|
|
5180
|
+
* with optional online and muted indicators.
|
|
5181
|
+
*
|
|
5182
|
+
* @example
|
|
5183
|
+
* ```tsx
|
|
5184
|
+
* <UserItem user={{ displayName: "Jane Doe", handle: "jane_doe" }} />
|
|
5185
|
+
* ```
|
|
5186
|
+
*/
|
|
5187
|
+
export declare const UserItem: React_2.ForwardRefExoticComponent<UserItemProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
5188
|
+
|
|
5189
|
+
export declare interface UserItemProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
5190
|
+
/** The user to display. */
|
|
5191
|
+
user: UserItemUser;
|
|
5192
|
+
/** Desired avatar size in px; snapped to the nearest supported token. @default 48 */
|
|
5193
|
+
avatarSize?: number;
|
|
5194
|
+
/** Show the muted indicator in the bottom-left corner. @default false */
|
|
5195
|
+
isMuted?: boolean;
|
|
5196
|
+
/** Whether the user is online (only shown when `showOnlineStatus` is also set). @default false */
|
|
5197
|
+
isOnline?: boolean;
|
|
5198
|
+
/** Render the avatar. @default true */
|
|
5199
|
+
showAvatar?: boolean;
|
|
5200
|
+
/** Render the handle line under the display name. @default true */
|
|
5201
|
+
showHandle?: boolean;
|
|
5202
|
+
/** Enable the avatar online indicator (combined with `isOnline`). */
|
|
5203
|
+
showOnlineStatus?: boolean;
|
|
5204
|
+
}
|
|
5205
|
+
|
|
5206
|
+
/** Minimal user shape consumed by {@link UserItem}. */
|
|
5207
|
+
export declare type UserItemUser = {
|
|
5208
|
+
avatarUri?: {
|
|
5209
|
+
url: string;
|
|
5210
|
+
url2x?: string;
|
|
5211
|
+
};
|
|
5212
|
+
displayName: string;
|
|
5213
|
+
handle: string;
|
|
5214
|
+
nickname?: string;
|
|
5215
|
+
};
|
|
5216
|
+
|
|
4989
5217
|
/**
|
|
4990
5218
|
* User Menu icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
|
|
4991
5219
|
*
|
|
@@ -5042,6 +5270,20 @@ export declare const VaultIcon: React_2.ForwardRefExoticComponent<BaseIconProps
|
|
|
5042
5270
|
/** Props for {@link VaultIcon}. See {@link BaseIconProps} for the shared shape. */
|
|
5043
5271
|
export declare type VaultIconProps = BaseIconProps;
|
|
5044
5272
|
|
|
5273
|
+
/**
|
|
5274
|
+
* Verified badge icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
|
|
5275
|
+
* Defaults to the filled variant.
|
|
5276
|
+
*
|
|
5277
|
+
* @example
|
|
5278
|
+
* ```tsx
|
|
5279
|
+
* <VerifiedIcon size={24} />
|
|
5280
|
+
* ```
|
|
5281
|
+
*/
|
|
5282
|
+
export declare const VerifiedIcon: React_2.ForwardRefExoticComponent<BaseIconProps & React_2.RefAttributes<SVGSVGElement>>;
|
|
5283
|
+
|
|
5284
|
+
/** Props for {@link VerifiedIcon}. See {@link BaseIconProps} for the shared shape. */
|
|
5285
|
+
export declare type VerifiedIconProps = BaseIconProps;
|
|
5286
|
+
|
|
5045
5287
|
/**
|
|
5046
5288
|
* Video icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
|
|
5047
5289
|
*
|
package/dist/index.mjs
CHANGED
|
@@ -98,6 +98,7 @@ import { ForwardIcon } from "./components/Icons/ForwardIcon.mjs";
|
|
|
98
98
|
import { GalleryIcon } from "./components/Icons/GalleryIcon.mjs";
|
|
99
99
|
import { GameIcon } from "./components/Icons/GameIcon.mjs";
|
|
100
100
|
import { GenderIcon } from "./components/Icons/GenderIcon.mjs";
|
|
101
|
+
import { GifIcon } from "./components/Icons/GifIcon.mjs";
|
|
101
102
|
import { GiftIcon } from "./components/Icons/GiftIcon.mjs";
|
|
102
103
|
import { GoogleIcon } from "./components/Icons/GoogleIcon.mjs";
|
|
103
104
|
import { HealthIcon } from "./components/Icons/HealthIcon.mjs";
|
|
@@ -182,6 +183,7 @@ import { UserIcon } from "./components/Icons/UserIcon.mjs";
|
|
|
182
183
|
import { UserMenuIcon } from "./components/Icons/UserMenuIcon.mjs";
|
|
183
184
|
import { UsersIcon } from "./components/Icons/UsersIcon.mjs";
|
|
184
185
|
import { VaultIcon } from "./components/Icons/VaultIcon.mjs";
|
|
186
|
+
import { VerifiedIcon } from "./components/Icons/VerifiedIcon.mjs";
|
|
185
187
|
import { VideoIcon } from "./components/Icons/VideoIcon.mjs";
|
|
186
188
|
import { VipBadgeIcon } from "./components/Icons/VipBadgeIcon.mjs";
|
|
187
189
|
import { WalletIcon } from "./components/Icons/WalletIcon.mjs";
|
|
@@ -200,9 +202,12 @@ import { OnlineBlinkingIcon } from "./components/OnlineBlinkingIcon/OnlineBlinki
|
|
|
200
202
|
import { Pagination } from "./components/Pagination/Pagination.mjs";
|
|
201
203
|
import { PasswordField } from "./components/PasswordField/PasswordField.mjs";
|
|
202
204
|
import { Pill } from "./components/Pill/Pill.mjs";
|
|
205
|
+
import { ProfileOnlineStatus } from "./components/ProfileOnlineStatus/ProfileOnlineStatus.mjs";
|
|
203
206
|
import { ProgressBar } from "./components/ProgressBar/ProgressBar.mjs";
|
|
204
207
|
import { Radio } from "./components/Radio/Radio.mjs";
|
|
205
208
|
import { RadioGroup } from "./components/RadioGroup/RadioGroup.mjs";
|
|
209
|
+
import { RatingSummary } from "./components/RatingSummary/RatingSummary.mjs";
|
|
210
|
+
import { ReviewCard } from "./components/ReviewCard/ReviewCard.mjs";
|
|
206
211
|
import { SearchField } from "./components/SearchField/SearchField.mjs";
|
|
207
212
|
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator } from "./components/Select/Select.mjs";
|
|
208
213
|
import { Skeleton } from "./components/Skeleton/Skeleton.mjs";
|
|
@@ -223,7 +228,11 @@ import { TextArea } from "./components/TextArea/TextArea.mjs";
|
|
|
223
228
|
import { TextField } from "./components/TextField/TextField.mjs";
|
|
224
229
|
import { Toast, ToastProvider, ToastViewport } from "./components/Toast/Toast.mjs";
|
|
225
230
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./components/Tooltip/Tooltip.mjs";
|
|
231
|
+
import { UserDisplayName } from "./components/UserDisplayName/UserDisplayName.mjs";
|
|
232
|
+
import { UserHandle } from "./components/UserHandle/UserHandle.mjs";
|
|
233
|
+
import { UserItem } from "./components/UserItem/UserItem.mjs";
|
|
226
234
|
import { cn } from "./utils/cn.mjs";
|
|
235
|
+
import { getInitials } from "./utils/getInitials.mjs";
|
|
227
236
|
import { useSuppressClickAfterDrag } from "./utils/useSuppressClickAfterDrag.mjs";
|
|
228
237
|
export {
|
|
229
238
|
AI2Icon,
|
|
@@ -361,6 +370,7 @@ export {
|
|
|
361
370
|
GalleryIcon,
|
|
362
371
|
GameIcon,
|
|
363
372
|
GenderIcon,
|
|
373
|
+
GifIcon,
|
|
364
374
|
GiftIcon,
|
|
365
375
|
GoogleIcon,
|
|
366
376
|
HealthIcon,
|
|
@@ -415,14 +425,17 @@ export {
|
|
|
415
425
|
PlayIcon,
|
|
416
426
|
PlusIcon,
|
|
417
427
|
PrivacyIcon,
|
|
428
|
+
ProfileOnlineStatus,
|
|
418
429
|
ProgressBar,
|
|
419
430
|
QueueIcon,
|
|
420
431
|
Radio,
|
|
421
432
|
RadioGroup,
|
|
433
|
+
RatingSummary,
|
|
422
434
|
RepeatIcon,
|
|
423
435
|
Reply2Icon,
|
|
424
436
|
ReplyIcon,
|
|
425
437
|
ReverseIcon,
|
|
438
|
+
ReviewCard,
|
|
426
439
|
SearchField,
|
|
427
440
|
SearchIcon,
|
|
428
441
|
Select,
|
|
@@ -507,10 +520,14 @@ export {
|
|
|
507
520
|
UserAIIcon,
|
|
508
521
|
UserAddIcon,
|
|
509
522
|
UserCircleIcon,
|
|
523
|
+
UserDisplayName,
|
|
524
|
+
UserHandle,
|
|
510
525
|
UserIcon,
|
|
526
|
+
UserItem,
|
|
511
527
|
UserMenuIcon,
|
|
512
528
|
UsersIcon,
|
|
513
529
|
VaultIcon,
|
|
530
|
+
VerifiedIcon,
|
|
514
531
|
VideoIcon,
|
|
515
532
|
VipBadgeIcon,
|
|
516
533
|
WalletIcon,
|
|
@@ -521,6 +538,7 @@ export {
|
|
|
521
538
|
WifiOnIcon,
|
|
522
539
|
WrenchIcon,
|
|
523
540
|
cn,
|
|
541
|
+
getInitials,
|
|
524
542
|
useAudioRecorder,
|
|
525
543
|
useSuppressClickAfterDrag
|
|
526
544
|
};
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const cleanSpaces = (str) => str.trim().replace(/\s+/g, " ");
|
|
3
|
+
const getInitials = (str) => {
|
|
4
|
+
if (!str) return "";
|
|
5
|
+
return cleanSpaces(str).split(" ").map((word) => word.length ? ([...word][0] ?? "").toUpperCase() : "").slice(0, 2).join("");
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
getInitials
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=getInitials.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getInitials.mjs","sources":["../../src/utils/getInitials.ts"],"sourcesContent":["/** Trim leading/trailing whitespace and collapse internal runs of whitespace to a single space. */\nconst cleanSpaces = (str: string): string => str.trim().replace(/\\s+/g, \" \");\n\n/**\n * Returns the first letters of the first one or two words in a given string, capitalized.\n * @example\n * getInitials(\"Ciao Bello\"); // \"CB\"\n * getInitials(\"JavaScript\"); // \"J\"\n * getInitials(undefined); // \"\"\n */\nexport const getInitials = (str?: string | null): string => {\n if (!str) return \"\";\n return cleanSpaces(str)\n .split(\" \")\n .map((word) => (word.length ? ([...word][0] ?? \"\").toUpperCase() : \"\"))\n .slice(0, 2)\n .join(\"\");\n};\n"],"names":[],"mappings":";AACA,MAAM,cAAc,CAAC,QAAwB,IAAI,OAAO,QAAQ,QAAQ,GAAG;AASpE,MAAM,cAAc,CAAC,QAAgC;AAC1D,MAAI,CAAC,IAAK,QAAO;AACjB,SAAO,YAAY,GAAG,EACnB,MAAM,GAAG,EACT,IAAI,CAAC,SAAU,KAAK,UAAU,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,IAAI,YAAA,IAAgB,EAAG,EACrE,MAAM,GAAG,CAAC,EACV,KAAK,EAAE;AACZ;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fanvue/ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
4
4
|
"description": "React component library built with Tailwind CSS for Fanvue ecosystem",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org",
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
"size-limit": [
|
|
181
181
|
{
|
|
182
182
|
"path": "dist/index.mjs",
|
|
183
|
-
"limit": "
|
|
183
|
+
"limit": "220 KB",
|
|
184
184
|
"ignore": [
|
|
185
185
|
"@radix-ui/*",
|
|
186
186
|
"clsx",
|