@vention/machine-ui 5.26.4 → 5.28.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
@@ -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$O({
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$O = tss.withParams().create(({
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$N({
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$N = tss.withParams().create(({
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$M({
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$M = tss.withParams().create(({
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$L({
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$L = tss.withParams().create(({
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$K(alertControlProps);
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$K = tss.withParams().create(({
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$J(Object.assign(Object.assign({}, alertProps), {
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$J = tss.withParams().create(({
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$I({
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$I = tss.withParams().create(({
5964
+ const useStyles$J = tss.withParams().create(({
5965
5965
  size,
5966
5966
  variant,
5967
5967
  color,
@@ -6074,7 +6074,7 @@ const VentionBadge = props => {
6074
6074
  const {
6075
6075
  classes,
6076
6076
  cx
6077
- } = useStyles$H({
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$H = tss.withParams().create(({
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$G({
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$G = tss.withParams().create(({
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$F({
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$F = tss.withParams().create(({
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$E({
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$E = tss.withParams().create(({
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$D({
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$D = tss.withParams().create(({
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$C({
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$C = tss.withParams().create(({
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$B({
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$B = tss.withParams().create(({
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$A({
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$A = tss.withParams().create(({
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;
@@ -8816,6 +8864,7 @@ function getPaddingForMenuHeaderSize(size) {
8816
8864
  }
8817
8865
  function getPaddingForMenuDividerSize(size) {
8818
8866
  const padding = {
8867
+ "x-small": "0px 12px 0px 12px",
8819
8868
  small: "8px 12px 7px 12px",
8820
8869
  medium: "12px 12px 11px 12px",
8821
8870
  large: "16px 12px 15px 12px"
@@ -10232,7 +10281,7 @@ const MenuItemDivider = ({
10232
10281
  role: "separator",
10233
10282
  className: className
10234
10283
  });
10235
- const VentionSelect = props => {
10284
+ const VentionSelectRoot = props => {
10236
10285
  var _a;
10237
10286
  const {
10238
10287
  classes
@@ -10382,6 +10431,43 @@ const VentionSelect = props => {
10382
10431
  })
10383
10432
  });
10384
10433
  };
10434
+ const VentionSelectSkeleton = ({
10435
+ size,
10436
+ hasLabelText,
10437
+ hasHelperText,
10438
+ className,
10439
+ "data-testid": testId = "vention-select-skeleton"
10440
+ }) => {
10441
+ const theme = useTheme$1();
10442
+ const typographyVariants = typographyNameFromSizeMap[size];
10443
+ return jsxs(Box$1, {
10444
+ display: "flex",
10445
+ flexDirection: "column",
10446
+ gap: theme.spacing(1),
10447
+ width: "100%",
10448
+ className: className,
10449
+ "aria-busy": true,
10450
+ "data-testid": testId,
10451
+ children: [hasLabelText && jsx(VentionSkeleton, {
10452
+ variant: "text",
10453
+ typography: typographyVariants.label,
10454
+ width: "30%"
10455
+ }), jsx(VentionSkeleton, {
10456
+ variant: "rounded",
10457
+ width: "100%",
10458
+ height: getInputHeight(size, theme)
10459
+ }), hasHelperText && jsx(VentionSkeleton, {
10460
+ variant: "text",
10461
+ typography: typographyVariants.helperText,
10462
+ width: "40%"
10463
+ })]
10464
+ });
10465
+ };
10466
+ VentionSelectRoot.displayName = "VentionSelect";
10467
+ VentionSelectSkeleton.displayName = "VentionSelect.Skeleton";
10468
+ const VentionSelect = Object.assign(VentionSelectRoot, {
10469
+ Skeleton: VentionSelectSkeleton
10470
+ });
10385
10471
  const useStyles$n = tss.withParams().create(({
10386
10472
  theme,
10387
10473
  size,
@@ -15037,7 +15123,7 @@ const useStyles$1 = tss.create(({
15037
15123
  }
15038
15124
  }));
15039
15125
 
15040
- function VentionPersonCard({
15126
+ function VentionPersonCardRoot({
15041
15127
  name,
15042
15128
  size,
15043
15129
  description,
@@ -15050,46 +15136,106 @@ function VentionPersonCard({
15050
15136
  }) {
15051
15137
  const isDisabled = state === "disabled";
15052
15138
  const {
15053
- classes,
15054
- cx
15139
+ classes
15055
15140
  } = useStyles({
15056
15141
  size,
15057
15142
  hideName: hideName !== null && hideName !== void 0 ? hideName : false
15058
15143
  });
15059
- const rootClassName = cx(classes.root, className);
15060
- const avatar = jsx(VentionAvatar, {
15061
- name: name,
15144
+ return jsx(VentionPersonCardLayout, {
15062
15145
  size: size,
15063
- variant: avatarVariant,
15064
- state: state,
15065
- imageUrl: imageUrl,
15066
- initials: initials
15146
+ hideName: hideName !== null && hideName !== void 0 ? hideName : false,
15147
+ className: className,
15148
+ testId: "vention-person-card",
15149
+ avatar: jsx(VentionAvatar, {
15150
+ name: name,
15151
+ size: size,
15152
+ variant: avatarVariant,
15153
+ state: state,
15154
+ imageUrl: imageUrl,
15155
+ initials: initials
15156
+ }),
15157
+ name: jsx(Typography, {
15158
+ variant: getNameTypographyVariant(size),
15159
+ color: isDisabled ? "text.tertiary" : "text.primary",
15160
+ className: classes.line,
15161
+ children: name
15162
+ }),
15163
+ description: description && jsx(Typography, {
15164
+ variant: "uiText12Regular",
15165
+ color: isDisabled ? "text.tertiary" : "text.secondary",
15166
+ className: classes.line,
15167
+ children: description
15168
+ })
15169
+ });
15170
+ }
15171
+ function VentionPersonCardSkeleton({
15172
+ size,
15173
+ hasDescription,
15174
+ hideName,
15175
+ className
15176
+ }) {
15177
+ return jsx(VentionPersonCardLayout, {
15178
+ size: size,
15179
+ hideName: hideName !== null && hideName !== void 0 ? hideName : false,
15180
+ className: className,
15181
+ testId: "vention-person-card-skeleton",
15182
+ busy: true,
15183
+ avatar: jsx(VentionSkeleton, {
15184
+ variant: "circular",
15185
+ diameter: getAvatarDiameter(size)
15186
+ }),
15187
+ name: jsx(VentionSkeleton, {
15188
+ variant: "text",
15189
+ typography: getNameTypographyVariant(size),
15190
+ width: "60%"
15191
+ }),
15192
+ description: hasDescription && jsx(VentionSkeleton, {
15193
+ variant: "text",
15194
+ typography: "uiText12Regular",
15195
+ width: "40%"
15196
+ })
15067
15197
  });
15198
+ }
15199
+ VentionPersonCardRoot.displayName = "VentionPersonCard";
15200
+ VentionPersonCardSkeleton.displayName = "VentionPersonCard.Skeleton";
15201
+ const VentionPersonCard = Object.assign(VentionPersonCardRoot, {
15202
+ Skeleton: VentionPersonCardSkeleton
15203
+ });
15204
+ function VentionPersonCardLayout({
15205
+ size,
15206
+ hideName,
15207
+ className,
15208
+ testId,
15209
+ busy,
15210
+ avatar,
15211
+ name,
15212
+ description
15213
+ }) {
15214
+ const {
15215
+ classes,
15216
+ cx
15217
+ } = useStyles({
15218
+ size,
15219
+ hideName
15220
+ });
15221
+ const rootClassName = cx(classes.root, className);
15068
15222
  if (hideName) {
15069
15223
  return jsx("div", {
15070
15224
  className: rootClassName,
15071
- "data-testid": "vention-person-card",
15225
+ "aria-busy": busy,
15226
+ "data-testid": testId,
15072
15227
  children: avatar
15073
15228
  });
15074
15229
  }
15075
15230
  return jsx("div", {
15076
15231
  className: rootClassName,
15077
- "data-testid": "vention-person-card",
15232
+ "aria-busy": busy,
15233
+ "data-testid": testId,
15078
15234
  children: jsxs("div", {
15079
15235
  className: classes.content,
15080
15236
  children: [avatar, jsxs("div", {
15081
15237
  className: classes.titleAndDescription,
15082
- children: [jsx(Typography, {
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
- })]
15238
+ children: [name, description]
15093
15239
  })]
15094
15240
  })
15095
15241
  });
@@ -15266,4 +15412,4 @@ function calcMenuPosition(anchorRect, menuSize, placement, alignment) {
15266
15412
  }
15267
15413
  }
15268
15414
 
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 };
15415
+ 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vention/machine-ui",
3
- "version": "5.26.4",
3
+ "version": "5.28.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/VentionCo/machine-cloud.git"
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;
@@ -1,4 +1,4 @@
1
1
  export interface VentionMenuHeaderProps {
2
- size: "small" | "medium" | "large";
2
+ size: "x-small" | "small" | "medium" | "large";
3
3
  }
4
4
  export declare const VentionMenuDivider: ({ size }: VentionMenuHeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import { Theme } from "@mui/material";
2
2
  import { Sizes, StrictExtract } from "../../theme/machine-ui-theme";
3
3
  export type MenuSize = StrictExtract<Sizes, "small" | "medium" | "large" | "x-large">;
4
4
  export type MenuHeaderSize = StrictExtract<Sizes, "small" | "medium" | "large">;
5
- export type MenuDividerSize = StrictExtract<Sizes, "small" | "medium" | "large">;
5
+ export type MenuDividerSize = StrictExtract<Sizes, "x-small" | "small" | "medium" | "large">;
6
6
  export interface StylingProperties {
7
7
  borderRadius: string;
8
8
  gap: string;
@@ -13,4 +13,21 @@ export interface VentionPersonCardProps {
13
13
  initials?: string;
14
14
  className?: string;
15
15
  }
16
- export declare function VentionPersonCard({ name, size, description, state, hideName, avatarVariant, imageUrl, initials, className, }: VentionPersonCardProps): import("react/jsx-runtime").JSX.Element;
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 declare const VentionSelect: (props: VentionSelectProps) => import("react/jsx-runtime").JSX.Element;
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 {};