@vention/machine-ui 6.2.0 → 6.3.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/index.esm.js
CHANGED
|
@@ -15262,11 +15262,13 @@ const useStyles$1 = tss.create(({
|
|
|
15262
15262
|
|
|
15263
15263
|
function VentionPersonCardRoot({
|
|
15264
15264
|
name,
|
|
15265
|
+
nameSuffix,
|
|
15265
15266
|
size,
|
|
15266
15267
|
description,
|
|
15267
15268
|
state = "default",
|
|
15268
15269
|
hideName,
|
|
15269
15270
|
avatarVariant,
|
|
15271
|
+
avatarStatusDotColor,
|
|
15270
15272
|
imageUrl,
|
|
15271
15273
|
initials,
|
|
15272
15274
|
className
|
|
@@ -15289,13 +15291,24 @@ function VentionPersonCardRoot({
|
|
|
15289
15291
|
variant: avatarVariant,
|
|
15290
15292
|
state: state,
|
|
15291
15293
|
imageUrl: imageUrl,
|
|
15292
|
-
initials: initials
|
|
15294
|
+
initials: initials,
|
|
15295
|
+
statusDotColor: avatarStatusDotColor
|
|
15293
15296
|
}),
|
|
15294
|
-
name:
|
|
15295
|
-
variant: getNameTypographyVariant(size),
|
|
15296
|
-
color: isDisabled ? "text.tertiary" : "text.primary",
|
|
15297
|
+
name: jsxs("div", {
|
|
15297
15298
|
className: classes.line,
|
|
15298
|
-
children:
|
|
15299
|
+
children: [jsx(Typography, {
|
|
15300
|
+
component: "span",
|
|
15301
|
+
variant: getNameTypographyVariant(size, Boolean(nameSuffix)),
|
|
15302
|
+
color: isDisabled ? "text.tertiary" : "text.primary",
|
|
15303
|
+
children: name
|
|
15304
|
+
}), nameSuffix && jsxs(Fragment, {
|
|
15305
|
+
children: [" ", jsx(Typography, {
|
|
15306
|
+
component: "span",
|
|
15307
|
+
variant: getNameTypographyVariant(size),
|
|
15308
|
+
color: isDisabled ? "text.tertiary" : "text.secondary",
|
|
15309
|
+
children: nameSuffix
|
|
15310
|
+
})]
|
|
15311
|
+
})]
|
|
15299
15312
|
}),
|
|
15300
15313
|
description: description && jsx(Typography, {
|
|
15301
15314
|
variant: "uiText12Regular",
|
|
@@ -15433,12 +15446,12 @@ function getCardPadding(size, hideName, theme) {
|
|
|
15433
15446
|
return hideName ? theme.spacing(2, 4) : theme.spacing(3, 4);
|
|
15434
15447
|
}
|
|
15435
15448
|
}
|
|
15436
|
-
function getNameTypographyVariant(size) {
|
|
15449
|
+
function getNameTypographyVariant(size, emphasized = false) {
|
|
15437
15450
|
switch (size) {
|
|
15438
15451
|
case "small":
|
|
15439
|
-
return "uiText12Regular";
|
|
15452
|
+
return emphasized ? "uiText12SemiBold" : "uiText12Regular";
|
|
15440
15453
|
default:
|
|
15441
|
-
return "uiText14Regular";
|
|
15454
|
+
return emphasized ? "uiText14SemiBold" : "uiText14Regular";
|
|
15442
15455
|
}
|
|
15443
15456
|
}
|
|
15444
15457
|
|
package/package.json
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { Sizes, StrictExtract } from "../../theme/machine-ui-theme";
|
|
2
|
-
import { VentionAvatarVariants } from "../vention-avatar/vention-avatar";
|
|
2
|
+
import { VentionAvatarProps, VentionAvatarVariants } from "../vention-avatar/vention-avatar";
|
|
3
3
|
export type VentionPersonCardSizes = StrictExtract<Sizes, "small" | "medium" | "large">;
|
|
4
4
|
export type VentionPersonCardStates = "default" | "disabled";
|
|
5
5
|
export interface VentionPersonCardProps {
|
|
6
6
|
name: string;
|
|
7
|
+
nameSuffix?: string | undefined;
|
|
7
8
|
size: VentionPersonCardSizes;
|
|
8
9
|
description?: string;
|
|
9
10
|
state?: VentionPersonCardStates;
|
|
10
11
|
hideName?: boolean;
|
|
11
12
|
avatarVariant?: VentionAvatarVariants;
|
|
13
|
+
avatarStatusDotColor?: VentionAvatarProps["statusDotColor"];
|
|
12
14
|
imageUrl?: string;
|
|
13
15
|
initials?: string;
|
|
14
16
|
className?: string;
|
|
15
17
|
}
|
|
16
|
-
declare function VentionPersonCardRoot({ name, size, description, state, hideName, avatarVariant, imageUrl, initials, className, }: VentionPersonCardProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function VentionPersonCardRoot({ name, nameSuffix, size, description, state, hideName, avatarVariant, avatarStatusDotColor, imageUrl, initials, className, }: VentionPersonCardProps): import("react/jsx-runtime").JSX.Element;
|
|
17
19
|
declare namespace VentionPersonCardRoot {
|
|
18
20
|
var displayName: string;
|
|
19
21
|
}
|