@vention/machine-ui 5.26.3 → 5.27.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 +202 -57
- package/package.json +1 -1
- package/src/index.d.ts +1 -0
- package/src/lib/components/vention-avatar/vention-avatar.d.ts +1 -0
- package/src/lib/components/vention-person-card/vention-person-card.d.ts +18 -1
- package/src/lib/components/vention-select/vention-select.d.ts +21 -2
- package/src/lib/components/vention-skeleton/vention-skeleton.d.ts +19 -0
package/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { Typography, useTheme, Button, Stack, Box as Box$1, Grid, IconButton, ClickAwayListener, Modal, CircularProgress as CircularProgress$1, linearProgressClasses, LinearProgress, InputAdornment, TextField, MenuList, MenuItem, ListItemIcon, ListItemText, Popover, Popper, Radio, FormControlLabel, FormControl, Select, FormHelperText, ButtonGroup, Paper, Card, CardMedia, CardContent, Drawer, Autocomplete, Tooltip, Checkbox } from '@mui/material';
|
|
2
|
+
import { Typography, useTheme, Button, Stack, Box as Box$1, Grid, IconButton, ClickAwayListener, Modal, CircularProgress as CircularProgress$1, linearProgressClasses, LinearProgress, Skeleton, InputAdornment, TextField, MenuList, MenuItem, ListItemIcon, ListItemText, Popover, Popper, Radio, FormControlLabel, FormControl, Select, FormHelperText, ButtonGroup, Paper, Card, CardMedia, CardContent, Drawer, Autocomplete, Tooltip, Checkbox } from '@mui/material';
|
|
3
3
|
import { IconCheck, IconAlertTriangleFilled, IconAlertTriangle, IconExclamationMark, IconExternalLink, IconX, IconInfoCircleFilled, IconCircleCheckFilled, IconChevronUp, IconChevronDown, IconInfoCircle, IconInfoSmall, IconMinus, IconPlus, IconLoader2, IconCaretRightFilled, IconChevronsRight, IconChevronsLeft, IconChevronRight } from '@tabler/icons-react';
|
|
4
4
|
import { lazy, memo, Suspense, forwardRef, useState, cloneElement, useRef, useEffect, useCallback, createContext, useContext, useImperativeHandle, useMemo, Children, Fragment as Fragment$1, useReducer, useLayoutEffect } from 'react';
|
|
5
5
|
import { tss } from 'tss-react/mui';
|
|
@@ -1991,7 +1991,7 @@ const defaultProps$8 = {
|
|
|
1991
1991
|
const VentionSpinner = props => {
|
|
1992
1992
|
const {
|
|
1993
1993
|
classes
|
|
1994
|
-
} = useStyles$
|
|
1994
|
+
} = useStyles$P({
|
|
1995
1995
|
size: props.size,
|
|
1996
1996
|
colored: props.colored,
|
|
1997
1997
|
type: props.type,
|
|
@@ -2041,7 +2041,7 @@ const VentionSpinner = props => {
|
|
|
2041
2041
|
})]
|
|
2042
2042
|
});
|
|
2043
2043
|
};
|
|
2044
|
-
const useStyles$
|
|
2044
|
+
const useStyles$P = tss.withParams().create(({
|
|
2045
2045
|
size,
|
|
2046
2046
|
colored,
|
|
2047
2047
|
color,
|
|
@@ -3798,7 +3798,7 @@ function isVentionIconType(value) {
|
|
|
3798
3798
|
const VentionIcon = /*#__PURE__*/memo(props => {
|
|
3799
3799
|
const {
|
|
3800
3800
|
classes
|
|
3801
|
-
} = useStyles$
|
|
3801
|
+
} = useStyles$O({
|
|
3802
3802
|
size: props.size || 24,
|
|
3803
3803
|
color: props.color,
|
|
3804
3804
|
hoverColor: props.hoverColor
|
|
@@ -3818,7 +3818,7 @@ const VentionIcon = /*#__PURE__*/memo(props => {
|
|
|
3818
3818
|
});
|
|
3819
3819
|
});
|
|
3820
3820
|
VentionIcon.displayName = "VentionIcon";
|
|
3821
|
-
const useStyles$
|
|
3821
|
+
const useStyles$O = tss.withParams().create(({
|
|
3822
3822
|
theme,
|
|
3823
3823
|
size,
|
|
3824
3824
|
color,
|
|
@@ -4501,7 +4501,7 @@ const VentionButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
4501
4501
|
const {
|
|
4502
4502
|
classes,
|
|
4503
4503
|
cx
|
|
4504
|
-
} = useStyles$
|
|
4504
|
+
} = useStyles$N({
|
|
4505
4505
|
variant: variant,
|
|
4506
4506
|
size: size,
|
|
4507
4507
|
fullWidth: fullWidth
|
|
@@ -4528,7 +4528,7 @@ const VentionButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
4528
4528
|
})
|
|
4529
4529
|
}));
|
|
4530
4530
|
});
|
|
4531
|
-
const useStyles$
|
|
4531
|
+
const useStyles$N = tss.withParams().create(({
|
|
4532
4532
|
variant,
|
|
4533
4533
|
size,
|
|
4534
4534
|
fullWidth,
|
|
@@ -4646,7 +4646,7 @@ const VentionLink = inputProps => {
|
|
|
4646
4646
|
const linkProps = applyDefaultProps(inputProps, defaultProps$7);
|
|
4647
4647
|
const {
|
|
4648
4648
|
classes
|
|
4649
|
-
} = useStyles$
|
|
4649
|
+
} = useStyles$M({
|
|
4650
4650
|
underlined: linkProps.underlined,
|
|
4651
4651
|
size: linkProps.size
|
|
4652
4652
|
});
|
|
@@ -4663,7 +4663,7 @@ const VentionLink = inputProps => {
|
|
|
4663
4663
|
}) : null]
|
|
4664
4664
|
});
|
|
4665
4665
|
};
|
|
4666
|
-
const useStyles$
|
|
4666
|
+
const useStyles$M = tss.withParams().create(({
|
|
4667
4667
|
underlined,
|
|
4668
4668
|
size,
|
|
4669
4669
|
theme
|
|
@@ -4718,7 +4718,7 @@ function getGapSpaceForContent$1(isSingleLine, size) {
|
|
|
4718
4718
|
const VentionAlertControls = alertControlProps => {
|
|
4719
4719
|
const {
|
|
4720
4720
|
classes
|
|
4721
|
-
} = useStyles$
|
|
4721
|
+
} = useStyles$L(alertControlProps);
|
|
4722
4722
|
return alertControlProps.display ? jsxs(Stack, {
|
|
4723
4723
|
className: classes.alertControls,
|
|
4724
4724
|
children: [alertControlProps.primaryButtonText ? jsx(VentionButton, {
|
|
@@ -4740,7 +4740,7 @@ const VentionAlertControls = alertControlProps => {
|
|
|
4740
4740
|
}) : null]
|
|
4741
4741
|
}) : null;
|
|
4742
4742
|
};
|
|
4743
|
-
const useStyles$
|
|
4743
|
+
const useStyles$L = tss.withParams().create(({
|
|
4744
4744
|
isSingleLine,
|
|
4745
4745
|
size
|
|
4746
4746
|
}) => {
|
|
@@ -4765,7 +4765,7 @@ const VentionAlert = inputProps => {
|
|
|
4765
4765
|
const hasControlProps = !!(alertProps.linkText || alertProps.primaryButtonText || alertProps.secondaryButtonText);
|
|
4766
4766
|
const {
|
|
4767
4767
|
classes
|
|
4768
|
-
} = useStyles$
|
|
4768
|
+
} = useStyles$K(Object.assign(Object.assign({}, alertProps), {
|
|
4769
4769
|
hasControlProps
|
|
4770
4770
|
}));
|
|
4771
4771
|
const [titleTypography, descriptionTypography] = getTypographyVariant$2(alertProps.size);
|
|
@@ -4854,7 +4854,7 @@ function getRootMaxWidth(isSingleLine, isFullWidth) {
|
|
|
4854
4854
|
if (isSingleLine) return "inherit";
|
|
4855
4855
|
return "560px";
|
|
4856
4856
|
}
|
|
4857
|
-
const useStyles$
|
|
4857
|
+
const useStyles$K = tss.withParams().create(({
|
|
4858
4858
|
isSingleLine,
|
|
4859
4859
|
severity,
|
|
4860
4860
|
size,
|
|
@@ -5935,7 +5935,7 @@ function VentionAvatar({
|
|
|
5935
5935
|
const {
|
|
5936
5936
|
classes,
|
|
5937
5937
|
cx
|
|
5938
|
-
} = useStyles$
|
|
5938
|
+
} = useStyles$J({
|
|
5939
5939
|
size,
|
|
5940
5940
|
variant,
|
|
5941
5941
|
color,
|
|
@@ -5961,7 +5961,7 @@ function VentionAvatar({
|
|
|
5961
5961
|
})]
|
|
5962
5962
|
});
|
|
5963
5963
|
}
|
|
5964
|
-
const useStyles$
|
|
5964
|
+
const useStyles$J = tss.withParams().create(({
|
|
5965
5965
|
size,
|
|
5966
5966
|
variant,
|
|
5967
5967
|
color,
|
|
@@ -6055,7 +6055,7 @@ const avatarStyleMap = {
|
|
|
6055
6055
|
textColor: theme.palette.text.primary
|
|
6056
6056
|
}),
|
|
6057
6057
|
"initials-filled": theme => ({
|
|
6058
|
-
background:
|
|
6058
|
+
background: COLORS.slate[900],
|
|
6059
6059
|
borderColor: null,
|
|
6060
6060
|
textColor: theme.palette.text.primaryOnColor
|
|
6061
6061
|
}),
|
|
@@ -6074,7 +6074,7 @@ const VentionBadge = props => {
|
|
|
6074
6074
|
const {
|
|
6075
6075
|
classes,
|
|
6076
6076
|
cx
|
|
6077
|
-
} = useStyles$
|
|
6077
|
+
} = useStyles$I({
|
|
6078
6078
|
size: props.size,
|
|
6079
6079
|
color: props.color,
|
|
6080
6080
|
variant: props.variant
|
|
@@ -6092,7 +6092,7 @@ const VentionBadge = props => {
|
|
|
6092
6092
|
})]
|
|
6093
6093
|
});
|
|
6094
6094
|
};
|
|
6095
|
-
const useStyles$
|
|
6095
|
+
const useStyles$I = tss.withParams().create(({
|
|
6096
6096
|
size,
|
|
6097
6097
|
color,
|
|
6098
6098
|
variant,
|
|
@@ -6261,7 +6261,7 @@ const VentionIconButton = /*#__PURE__*/forwardRef((inputProps, ref) => {
|
|
|
6261
6261
|
const {
|
|
6262
6262
|
classes,
|
|
6263
6263
|
cx
|
|
6264
|
-
} = useStyles$
|
|
6264
|
+
} = useStyles$H({
|
|
6265
6265
|
variant: variant,
|
|
6266
6266
|
size: size
|
|
6267
6267
|
});
|
|
@@ -6276,7 +6276,7 @@ const VentionIconButton = /*#__PURE__*/forwardRef((inputProps, ref) => {
|
|
|
6276
6276
|
}));
|
|
6277
6277
|
});
|
|
6278
6278
|
VentionIconButton.displayName = "VentionIconButton";
|
|
6279
|
-
const useStyles$
|
|
6279
|
+
const useStyles$H = tss.withParams().create(({
|
|
6280
6280
|
variant,
|
|
6281
6281
|
size,
|
|
6282
6282
|
theme
|
|
@@ -6333,7 +6333,7 @@ const VentionDropdownButton = _a => {
|
|
|
6333
6333
|
const {
|
|
6334
6334
|
classes,
|
|
6335
6335
|
cx
|
|
6336
|
-
} = useStyles$
|
|
6336
|
+
} = useStyles$G({
|
|
6337
6337
|
variant,
|
|
6338
6338
|
size,
|
|
6339
6339
|
contentColor,
|
|
@@ -6396,7 +6396,7 @@ const VentionDropdownButton = _a => {
|
|
|
6396
6396
|
})
|
|
6397
6397
|
});
|
|
6398
6398
|
};
|
|
6399
|
-
const useStyles$
|
|
6399
|
+
const useStyles$G = tss.withParams().create(({
|
|
6400
6400
|
variant,
|
|
6401
6401
|
size,
|
|
6402
6402
|
contentColor,
|
|
@@ -6508,7 +6508,7 @@ const VentionCallout = inputProps => {
|
|
|
6508
6508
|
const calloutProps = applyDefaultProps(inputProps, defaultProps$6);
|
|
6509
6509
|
const {
|
|
6510
6510
|
classes
|
|
6511
|
-
} = useStyles$
|
|
6511
|
+
} = useStyles$F({
|
|
6512
6512
|
isSingleLine: calloutProps.isSingleLine,
|
|
6513
6513
|
variant: calloutProps.variant,
|
|
6514
6514
|
size: calloutProps.size
|
|
@@ -6630,7 +6630,7 @@ function getBottomMarginForDescription(isSingleLine, size) {
|
|
|
6630
6630
|
}
|
|
6631
6631
|
return "16px";
|
|
6632
6632
|
}
|
|
6633
|
-
const useStyles$
|
|
6633
|
+
const useStyles$F = tss.withParams().create(({
|
|
6634
6634
|
isSingleLine,
|
|
6635
6635
|
variant,
|
|
6636
6636
|
size,
|
|
@@ -6688,7 +6688,7 @@ if (NOT_GENERIC || INCORRECT_NAME) {
|
|
|
6688
6688
|
const VentionCounter = props => {
|
|
6689
6689
|
const {
|
|
6690
6690
|
classes
|
|
6691
|
-
} = useStyles$
|
|
6691
|
+
} = useStyles$E({
|
|
6692
6692
|
size: props.size,
|
|
6693
6693
|
color: props.color,
|
|
6694
6694
|
variant: props.variant
|
|
@@ -6711,7 +6711,7 @@ const getShownValue = props => {
|
|
|
6711
6711
|
const displayCap = size === "small" ? 9 : 99;
|
|
6712
6712
|
return value > displayCap ? `${displayCap}+` : value.toString();
|
|
6713
6713
|
};
|
|
6714
|
-
const useStyles$
|
|
6714
|
+
const useStyles$E = tss.withParams().create(({
|
|
6715
6715
|
size,
|
|
6716
6716
|
color,
|
|
6717
6717
|
variant,
|
|
@@ -6861,7 +6861,7 @@ const VentionModalBase = props => {
|
|
|
6861
6861
|
const {
|
|
6862
6862
|
classes,
|
|
6863
6863
|
cx
|
|
6864
|
-
} = useStyles$
|
|
6864
|
+
} = useStyles$D({
|
|
6865
6865
|
modalSize,
|
|
6866
6866
|
isTouchDevice,
|
|
6867
6867
|
width
|
|
@@ -6939,7 +6939,7 @@ const getModalStyle = (modalSize, width) => {
|
|
|
6939
6939
|
};
|
|
6940
6940
|
return modalStyles[modalSize];
|
|
6941
6941
|
};
|
|
6942
|
-
const useStyles$
|
|
6942
|
+
const useStyles$D = tss.withParams().create(({
|
|
6943
6943
|
modalSize,
|
|
6944
6944
|
isTouchDevice,
|
|
6945
6945
|
width,
|
|
@@ -7008,7 +7008,7 @@ const VentionModal = props => {
|
|
|
7008
7008
|
} = props;
|
|
7009
7009
|
const {
|
|
7010
7010
|
classes
|
|
7011
|
-
} = useStyles$
|
|
7011
|
+
} = useStyles$C({
|
|
7012
7012
|
modalSize,
|
|
7013
7013
|
isTouchDevice,
|
|
7014
7014
|
type,
|
|
@@ -7086,7 +7086,7 @@ const VentionModal = props => {
|
|
|
7086
7086
|
})
|
|
7087
7087
|
});
|
|
7088
7088
|
};
|
|
7089
|
-
const useStyles$
|
|
7089
|
+
const useStyles$C = tss.withParams().create(({
|
|
7090
7090
|
type,
|
|
7091
7091
|
modalSize,
|
|
7092
7092
|
isTouchDevice,
|
|
@@ -7228,7 +7228,7 @@ const VentionProgressBar = inputProps => {
|
|
|
7228
7228
|
const isStatusState = props.state === "error" || props.state === "success";
|
|
7229
7229
|
const {
|
|
7230
7230
|
classes
|
|
7231
|
-
} = useStyles$
|
|
7231
|
+
} = useStyles$B({
|
|
7232
7232
|
size: props.size,
|
|
7233
7233
|
colored: props.colored,
|
|
7234
7234
|
state: props.state
|
|
@@ -7266,7 +7266,7 @@ const VentionProgressBar = inputProps => {
|
|
|
7266
7266
|
})]
|
|
7267
7267
|
});
|
|
7268
7268
|
};
|
|
7269
|
-
const useStyles$
|
|
7269
|
+
const useStyles$B = tss.withParams().create(({
|
|
7270
7270
|
size,
|
|
7271
7271
|
colored,
|
|
7272
7272
|
state,
|
|
@@ -7331,6 +7331,54 @@ const PROGRESS_BAR_SIZES = {
|
|
|
7331
7331
|
};
|
|
7332
7332
|
VentionProgressBar.defaultProps = defaultProps$5;
|
|
7333
7333
|
|
|
7334
|
+
function VentionSkeleton(props) {
|
|
7335
|
+
var _a;
|
|
7336
|
+
const {
|
|
7337
|
+
classes,
|
|
7338
|
+
cx
|
|
7339
|
+
} = useStyles$A({
|
|
7340
|
+
typography: props.variant === "text" ? props.typography : undefined
|
|
7341
|
+
});
|
|
7342
|
+
const className = cx(classes.root, props.className);
|
|
7343
|
+
const testId = (_a = props["data-testid"]) !== null && _a !== void 0 ? _a : "vention-skeleton";
|
|
7344
|
+
if (props.variant === "text") {
|
|
7345
|
+
return jsx(Skeleton, {
|
|
7346
|
+
variant: "text",
|
|
7347
|
+
animation: "wave",
|
|
7348
|
+
width: props.width,
|
|
7349
|
+
className: className,
|
|
7350
|
+
"data-testid": testId
|
|
7351
|
+
});
|
|
7352
|
+
}
|
|
7353
|
+
if (props.variant === "circular") {
|
|
7354
|
+
return jsx(Skeleton, {
|
|
7355
|
+
variant: "circular",
|
|
7356
|
+
animation: "wave",
|
|
7357
|
+
width: props.diameter,
|
|
7358
|
+
height: props.diameter,
|
|
7359
|
+
className: className,
|
|
7360
|
+
"data-testid": testId
|
|
7361
|
+
});
|
|
7362
|
+
}
|
|
7363
|
+
return jsx(Skeleton, {
|
|
7364
|
+
variant: "rounded",
|
|
7365
|
+
animation: "wave",
|
|
7366
|
+
width: props.width,
|
|
7367
|
+
height: props.height,
|
|
7368
|
+
className: className,
|
|
7369
|
+
"data-testid": testId
|
|
7370
|
+
});
|
|
7371
|
+
}
|
|
7372
|
+
const useStyles$A = tss.withParams().create(({
|
|
7373
|
+
theme,
|
|
7374
|
+
typography
|
|
7375
|
+
}) => ({
|
|
7376
|
+
root: Object.assign({
|
|
7377
|
+
backgroundColor: theme.palette.background.surface3,
|
|
7378
|
+
flexShrink: 0
|
|
7379
|
+
}, typography === undefined ? {} : theme.typography[typography])
|
|
7380
|
+
}));
|
|
7381
|
+
|
|
7334
7382
|
var $$m = _export;
|
|
7335
7383
|
var DESCRIPTORS$2 = descriptors;
|
|
7336
7384
|
var globalThis$3 = globalThis_1;
|
|
@@ -10232,7 +10280,7 @@ const MenuItemDivider = ({
|
|
|
10232
10280
|
role: "separator",
|
|
10233
10281
|
className: className
|
|
10234
10282
|
});
|
|
10235
|
-
const
|
|
10283
|
+
const VentionSelectRoot = props => {
|
|
10236
10284
|
var _a;
|
|
10237
10285
|
const {
|
|
10238
10286
|
classes
|
|
@@ -10382,6 +10430,43 @@ const VentionSelect = props => {
|
|
|
10382
10430
|
})
|
|
10383
10431
|
});
|
|
10384
10432
|
};
|
|
10433
|
+
const VentionSelectSkeleton = ({
|
|
10434
|
+
size,
|
|
10435
|
+
hasLabelText,
|
|
10436
|
+
hasHelperText,
|
|
10437
|
+
className,
|
|
10438
|
+
"data-testid": testId = "vention-select-skeleton"
|
|
10439
|
+
}) => {
|
|
10440
|
+
const theme = useTheme$1();
|
|
10441
|
+
const typographyVariants = typographyNameFromSizeMap[size];
|
|
10442
|
+
return jsxs(Box$1, {
|
|
10443
|
+
display: "flex",
|
|
10444
|
+
flexDirection: "column",
|
|
10445
|
+
gap: theme.spacing(1),
|
|
10446
|
+
width: "100%",
|
|
10447
|
+
className: className,
|
|
10448
|
+
"aria-busy": true,
|
|
10449
|
+
"data-testid": testId,
|
|
10450
|
+
children: [hasLabelText && jsx(VentionSkeleton, {
|
|
10451
|
+
variant: "text",
|
|
10452
|
+
typography: typographyVariants.label,
|
|
10453
|
+
width: "30%"
|
|
10454
|
+
}), jsx(VentionSkeleton, {
|
|
10455
|
+
variant: "rounded",
|
|
10456
|
+
width: "100%",
|
|
10457
|
+
height: getInputHeight(size, theme)
|
|
10458
|
+
}), hasHelperText && jsx(VentionSkeleton, {
|
|
10459
|
+
variant: "text",
|
|
10460
|
+
typography: typographyVariants.helperText,
|
|
10461
|
+
width: "40%"
|
|
10462
|
+
})]
|
|
10463
|
+
});
|
|
10464
|
+
};
|
|
10465
|
+
VentionSelectRoot.displayName = "VentionSelect";
|
|
10466
|
+
VentionSelectSkeleton.displayName = "VentionSelect.Skeleton";
|
|
10467
|
+
const VentionSelect = Object.assign(VentionSelectRoot, {
|
|
10468
|
+
Skeleton: VentionSelectSkeleton
|
|
10469
|
+
});
|
|
10385
10470
|
const useStyles$n = tss.withParams().create(({
|
|
10386
10471
|
theme,
|
|
10387
10472
|
size,
|
|
@@ -15037,7 +15122,7 @@ const useStyles$1 = tss.create(({
|
|
|
15037
15122
|
}
|
|
15038
15123
|
}));
|
|
15039
15124
|
|
|
15040
|
-
function
|
|
15125
|
+
function VentionPersonCardRoot({
|
|
15041
15126
|
name,
|
|
15042
15127
|
size,
|
|
15043
15128
|
description,
|
|
@@ -15050,46 +15135,106 @@ function VentionPersonCard({
|
|
|
15050
15135
|
}) {
|
|
15051
15136
|
const isDisabled = state === "disabled";
|
|
15052
15137
|
const {
|
|
15053
|
-
classes
|
|
15054
|
-
cx
|
|
15138
|
+
classes
|
|
15055
15139
|
} = useStyles({
|
|
15056
15140
|
size,
|
|
15057
15141
|
hideName: hideName !== null && hideName !== void 0 ? hideName : false
|
|
15058
15142
|
});
|
|
15059
|
-
|
|
15060
|
-
|
|
15061
|
-
|
|
15143
|
+
return jsx(VentionPersonCardLayout, {
|
|
15144
|
+
size: size,
|
|
15145
|
+
hideName: hideName !== null && hideName !== void 0 ? hideName : false,
|
|
15146
|
+
className: className,
|
|
15147
|
+
testId: "vention-person-card",
|
|
15148
|
+
avatar: jsx(VentionAvatar, {
|
|
15149
|
+
name: name,
|
|
15150
|
+
size: size,
|
|
15151
|
+
variant: avatarVariant,
|
|
15152
|
+
state: state,
|
|
15153
|
+
imageUrl: imageUrl,
|
|
15154
|
+
initials: initials
|
|
15155
|
+
}),
|
|
15156
|
+
name: jsx(Typography, {
|
|
15157
|
+
variant: getNameTypographyVariant(size),
|
|
15158
|
+
color: isDisabled ? "text.tertiary" : "text.primary",
|
|
15159
|
+
className: classes.line,
|
|
15160
|
+
children: name
|
|
15161
|
+
}),
|
|
15162
|
+
description: description && jsx(Typography, {
|
|
15163
|
+
variant: "uiText12Regular",
|
|
15164
|
+
color: isDisabled ? "text.tertiary" : "text.secondary",
|
|
15165
|
+
className: classes.line,
|
|
15166
|
+
children: description
|
|
15167
|
+
})
|
|
15168
|
+
});
|
|
15169
|
+
}
|
|
15170
|
+
function VentionPersonCardSkeleton({
|
|
15171
|
+
size,
|
|
15172
|
+
hasDescription,
|
|
15173
|
+
hideName,
|
|
15174
|
+
className
|
|
15175
|
+
}) {
|
|
15176
|
+
return jsx(VentionPersonCardLayout, {
|
|
15062
15177
|
size: size,
|
|
15063
|
-
|
|
15064
|
-
|
|
15065
|
-
|
|
15066
|
-
|
|
15178
|
+
hideName: hideName !== null && hideName !== void 0 ? hideName : false,
|
|
15179
|
+
className: className,
|
|
15180
|
+
testId: "vention-person-card-skeleton",
|
|
15181
|
+
busy: true,
|
|
15182
|
+
avatar: jsx(VentionSkeleton, {
|
|
15183
|
+
variant: "circular",
|
|
15184
|
+
diameter: getAvatarDiameter(size)
|
|
15185
|
+
}),
|
|
15186
|
+
name: jsx(VentionSkeleton, {
|
|
15187
|
+
variant: "text",
|
|
15188
|
+
typography: getNameTypographyVariant(size),
|
|
15189
|
+
width: "60%"
|
|
15190
|
+
}),
|
|
15191
|
+
description: hasDescription && jsx(VentionSkeleton, {
|
|
15192
|
+
variant: "text",
|
|
15193
|
+
typography: "uiText12Regular",
|
|
15194
|
+
width: "40%"
|
|
15195
|
+
})
|
|
15196
|
+
});
|
|
15197
|
+
}
|
|
15198
|
+
VentionPersonCardRoot.displayName = "VentionPersonCard";
|
|
15199
|
+
VentionPersonCardSkeleton.displayName = "VentionPersonCard.Skeleton";
|
|
15200
|
+
const VentionPersonCard = Object.assign(VentionPersonCardRoot, {
|
|
15201
|
+
Skeleton: VentionPersonCardSkeleton
|
|
15202
|
+
});
|
|
15203
|
+
function VentionPersonCardLayout({
|
|
15204
|
+
size,
|
|
15205
|
+
hideName,
|
|
15206
|
+
className,
|
|
15207
|
+
testId,
|
|
15208
|
+
busy,
|
|
15209
|
+
avatar,
|
|
15210
|
+
name,
|
|
15211
|
+
description
|
|
15212
|
+
}) {
|
|
15213
|
+
const {
|
|
15214
|
+
classes,
|
|
15215
|
+
cx
|
|
15216
|
+
} = useStyles({
|
|
15217
|
+
size,
|
|
15218
|
+
hideName
|
|
15067
15219
|
});
|
|
15220
|
+
const rootClassName = cx(classes.root, className);
|
|
15068
15221
|
if (hideName) {
|
|
15069
15222
|
return jsx("div", {
|
|
15070
15223
|
className: rootClassName,
|
|
15071
|
-
"
|
|
15224
|
+
"aria-busy": busy,
|
|
15225
|
+
"data-testid": testId,
|
|
15072
15226
|
children: avatar
|
|
15073
15227
|
});
|
|
15074
15228
|
}
|
|
15075
15229
|
return jsx("div", {
|
|
15076
15230
|
className: rootClassName,
|
|
15077
|
-
"
|
|
15231
|
+
"aria-busy": busy,
|
|
15232
|
+
"data-testid": testId,
|
|
15078
15233
|
children: jsxs("div", {
|
|
15079
15234
|
className: classes.content,
|
|
15080
15235
|
children: [avatar, jsxs("div", {
|
|
15081
15236
|
className: classes.titleAndDescription,
|
|
15082
|
-
children: [
|
|
15083
|
-
variant: getNameTypographyVariant(size),
|
|
15084
|
-
color: isDisabled ? "text.tertiary" : "text.primary",
|
|
15085
|
-
className: classes.line,
|
|
15086
|
-
children: name
|
|
15087
|
-
}), description && jsx(Typography, {
|
|
15088
|
-
variant: "uiText12Regular",
|
|
15089
|
-
color: isDisabled ? "text.tertiary" : "text.secondary",
|
|
15090
|
-
className: classes.line,
|
|
15091
|
-
children: description
|
|
15092
|
-
})]
|
|
15237
|
+
children: [name, description]
|
|
15093
15238
|
})]
|
|
15094
15239
|
})
|
|
15095
15240
|
});
|
|
@@ -15266,4 +15411,4 @@ function calcMenuPosition(anchorRect, menuSize, placement, alignment) {
|
|
|
15266
15411
|
}
|
|
15267
15412
|
}
|
|
15268
15413
|
|
|
15269
|
-
export { COLORS, DEFAULT_MAX_VISIBLE_SUGGESTIONS, DEFAULT_MIN_SUGGESTION_CHARACTERS, DEFAULT_VENTION_TREE_ITEM_HEIGHT, ElementTestIds, IconSizes, POSITIONED_MENU_OFFSET, VentionAlert, VentionAvatar, VentionBadge, VentionBanner, VentionButton, VentionCallout, VentionCheckbox, VentionCombobox, VentionCounter, VentionDraggable, VentionDrawer, VentionDropZone, VentionDropdownButton, VentionIcon, VentionIconButton, VentionInputGroupLabel, VentionLink, VentionMenu, VentionModal, VentionModalBanner, VentionModalBase, VentionPersonCard, VentionPopover, VentionPositionedComponent, VentionProgressBar, VentionRadio, VentionRadioTile, VentionSelect, VentionSidebarItem, VentionSlider, VentionSpinner, VentionStatusDot, VentionStatusIndicator, VentionStepper, VentionSteps, VentionSuggestionsInput, VentionSwitch, VentionTabs, VentionTagsInput, VentionTextInput, VentionTooltip, VentionTreeItem, VentionUploadFile, calcMenuPosition, getSpinnerColor, getVentionBadgeColors, isVentionIconType, machineUiHmiTheme, machineUiTheme, menuTestIds, testIds, useBannerColorStyles, ventionModalBaseTestIds, ventionModalTestIds, ventionPopoverArrowSize };
|
|
15414
|
+
export { COLORS, DEFAULT_MAX_VISIBLE_SUGGESTIONS, DEFAULT_MIN_SUGGESTION_CHARACTERS, DEFAULT_VENTION_TREE_ITEM_HEIGHT, ElementTestIds, IconSizes, POSITIONED_MENU_OFFSET, VentionAlert, VentionAvatar, VentionBadge, VentionBanner, VentionButton, VentionCallout, VentionCheckbox, VentionCombobox, VentionCounter, VentionDraggable, VentionDrawer, VentionDropZone, VentionDropdownButton, VentionIcon, VentionIconButton, VentionInputGroupLabel, VentionLink, VentionMenu, VentionModal, VentionModalBanner, VentionModalBase, VentionPersonCard, VentionPersonCardSkeleton, VentionPopover, VentionPositionedComponent, VentionProgressBar, VentionRadio, VentionRadioTile, VentionSelect, VentionSelectSkeleton, VentionSidebarItem, VentionSkeleton, VentionSlider, VentionSpinner, VentionStatusDot, VentionStatusIndicator, VentionStepper, VentionSteps, VentionSuggestionsInput, VentionSwitch, VentionTabs, VentionTagsInput, VentionTextInput, VentionTooltip, VentionTreeItem, VentionUploadFile, calcMenuPosition, getAvatarDiameter, getSpinnerColor, getVentionBadgeColors, isVentionIconType, machineUiHmiTheme, machineUiTheme, menuTestIds, testIds, useBannerColorStyles, ventionModalBaseTestIds, ventionModalTestIds, ventionPopoverArrowSize };
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from "./lib/components/vention-modal/vention-modal";
|
|
|
12
12
|
export * from "./lib/components/vention-modal-base/vention-modal-base";
|
|
13
13
|
export * from "./lib/components/vention-progress-bar/vention-progress-bar";
|
|
14
14
|
export * from "./lib/components/vention-spinner/vention-spinner";
|
|
15
|
+
export * from "./lib/components/vention-skeleton/vention-skeleton";
|
|
15
16
|
export * from "./lib/components/vention-steps/vention-steps";
|
|
16
17
|
export * from "./lib/components/vention-status-dot/vention-status-dot";
|
|
17
18
|
export * from "./lib/components/vention-text-input/vention-text-input";
|
|
@@ -15,3 +15,4 @@ export interface VentionAvatarProps {
|
|
|
15
15
|
className?: string;
|
|
16
16
|
}
|
|
17
17
|
export declare function VentionAvatar({ initials, name, size, variant, color, state, className, imageUrl, focused, }: VentionAvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function getAvatarDiameter(size: VentionAvatarSizes): number;
|
|
@@ -13,4 +13,21 @@ export interface VentionPersonCardProps {
|
|
|
13
13
|
initials?: string;
|
|
14
14
|
className?: string;
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
declare function VentionPersonCardRoot({ name, size, description, state, hideName, avatarVariant, imageUrl, initials, className, }: VentionPersonCardProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare namespace VentionPersonCardRoot {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
20
|
+
export interface VentionPersonCardSkeletonProps {
|
|
21
|
+
size: VentionPersonCardSizes;
|
|
22
|
+
hasDescription?: boolean;
|
|
23
|
+
hideName?: boolean;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function VentionPersonCardSkeleton({ size, hasDescription, hideName, className }: VentionPersonCardSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare namespace VentionPersonCardSkeleton {
|
|
28
|
+
var displayName: string;
|
|
29
|
+
}
|
|
30
|
+
export declare const VentionPersonCard: typeof VentionPersonCardRoot & {
|
|
31
|
+
Skeleton: typeof VentionPersonCardSkeleton;
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
@@ -2,6 +2,7 @@ import { SelectChangeEvent, SelectProps } from "@mui/material";
|
|
|
2
2
|
import { Sizes, StrictExtract } from "../../theme/machine-ui-theme";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import { InputStates } from "../shared/types/input-types";
|
|
5
|
+
import { TestProps } from "../shared/types/test-props";
|
|
5
6
|
import { DuotoneIconType, IconType } from "../vention-icon/vention-icon";
|
|
6
7
|
export type VentionSelectMenuItem<T> = {
|
|
7
8
|
type?: never;
|
|
@@ -16,7 +17,7 @@ export type VentionSelectDivider = {
|
|
|
16
17
|
type: "divider";
|
|
17
18
|
};
|
|
18
19
|
export type VentionSelectItem<T> = VentionSelectMenuItem<T> | VentionSelectDivider;
|
|
19
|
-
export interface VentionSelectProps extends Omit<SelectProps, "placeholder" | "size" | "defaultValue" | "label"
|
|
20
|
+
export interface VentionSelectProps extends Omit<SelectProps, "placeholder" | "size" | "defaultValue" | "label">, TestProps {
|
|
20
21
|
size: StrictExtract<Sizes, "small" | "medium" | "large" | "x-large" | "xx-large">;
|
|
21
22
|
variant: "outlined";
|
|
22
23
|
value: string | number | string[] | number[] | undefined;
|
|
@@ -30,4 +31,22 @@ export interface VentionSelectProps extends Omit<SelectProps, "placeholder" | "s
|
|
|
30
31
|
isMultiple?: boolean;
|
|
31
32
|
state?: StrictExtract<InputStates, "default" | "warning">;
|
|
32
33
|
}
|
|
33
|
-
export
|
|
34
|
+
export interface VentionSelectSkeletonProps extends TestProps {
|
|
35
|
+
size: VentionSelectProps["size"];
|
|
36
|
+
hasLabelText?: boolean;
|
|
37
|
+
hasHelperText?: boolean;
|
|
38
|
+
className?: string;
|
|
39
|
+
}
|
|
40
|
+
export declare const VentionSelectSkeleton: {
|
|
41
|
+
({ size, hasLabelText, hasHelperText, className, "data-testid": testId, }: VentionSelectSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
44
|
+
export declare const VentionSelect: {
|
|
45
|
+
(props: VentionSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
displayName: string;
|
|
47
|
+
} & {
|
|
48
|
+
Skeleton: {
|
|
49
|
+
({ size, hasLabelText, hasHelperText, className, "data-testid": testId, }: VentionSelectSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
displayName: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TypographyOwnProps } from "@mui/material";
|
|
2
|
+
import { TestProps } from "../shared/types/test-props";
|
|
3
|
+
type VentionSkeletonBaseProps = TestProps & {
|
|
4
|
+
className?: string;
|
|
5
|
+
};
|
|
6
|
+
export type VentionSkeletonProps = (VentionSkeletonBaseProps & {
|
|
7
|
+
variant: "text";
|
|
8
|
+
typography: TypographyOwnProps["variant"];
|
|
9
|
+
width?: number | string;
|
|
10
|
+
}) | (VentionSkeletonBaseProps & {
|
|
11
|
+
variant: "rounded";
|
|
12
|
+
width?: number | string;
|
|
13
|
+
height: number | string;
|
|
14
|
+
}) | (VentionSkeletonBaseProps & {
|
|
15
|
+
variant: "circular";
|
|
16
|
+
diameter: number;
|
|
17
|
+
});
|
|
18
|
+
export declare function VentionSkeleton(props: VentionSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|