@vention/machine-ui 3.47.0 → 4.0.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
@@ -9404,7 +9404,8 @@ const VentionCollapsibleCaretButton = ({
9404
9404
  component: "div",
9405
9405
  className: classes.root,
9406
9406
  onClick: onClick,
9407
- "data-testid": dataTestid ? `${dataTestid}-collapse-button` : "collapsibleCaretButton",
9407
+ "data-testid": dataTestid,
9408
+ "aria-expanded": isExpanded,
9408
9409
  children: jsx(IconCaretRightFilled, {
9409
9410
  size: 16
9410
9411
  })
@@ -9512,13 +9513,14 @@ const VentionTreeItem = /*#__PURE__*/forwardRef((inputProps, ref) => {
9512
9513
  onClick === null || onClick === void 0 ? void 0 : onClick(event);
9513
9514
  };
9514
9515
  const isCaretVisible = Children.count(children) > 0;
9516
+ const testId = dataTestid !== null && dataTestid !== void 0 ? dataTestid : "vention-tree-item";
9515
9517
  return jsxs("div", {
9516
9518
  className: classes.root,
9517
9519
  onClick: handleOnClick,
9518
9520
  ref: ref,
9519
9521
  children: [jsxs("div", {
9520
- "data-testid": "mainContent",
9521
9522
  "aria-selected": isSelected,
9523
+ "data-testid": testId,
9522
9524
  className: classes.mainContent,
9523
9525
  onContextMenu: event => onContextMenu === null || onContextMenu === void 0 ? void 0 : onContextMenu(event),
9524
9526
  onMouseEnter: event => {
@@ -9539,14 +9541,14 @@ const VentionTreeItem = /*#__PURE__*/forwardRef((inputProps, ref) => {
9539
9541
  isVisible: isCaretVisible,
9540
9542
  isExpanded: isExpanded,
9541
9543
  onClick: handleIsExpandedToggle,
9542
- dataTestid: dataTestid
9544
+ dataTestid: `${testId}-collapseButton`
9543
9545
  }), jsx("div", {
9544
- "data-testid": "treeItemIcon",
9546
+ "data-testid": `${testId}-icon`,
9545
9547
  className: classes.iconContainer,
9546
9548
  children: icon
9547
9549
  }), jsx("div", {
9548
9550
  className: classes.labelContainer,
9549
- "data-testid": dataTestid,
9551
+ "data-testid": `${testId}-label`,
9550
9552
  onDoubleClick: handleRenaming,
9551
9553
  children: jsx(Typography, {
9552
9554
  className: classes.label,
@@ -9561,7 +9563,7 @@ const VentionTreeItem = /*#__PURE__*/forwardRef((inputProps, ref) => {
9561
9563
  paddingLeft: theme.spacing(2)
9562
9564
  }
9563
9565
  },
9564
- "data-testid": "tree-item-text-input",
9566
+ "data-testid": `${testId}-textInput`,
9565
9567
  onChange: event => setLabel(event.target.value),
9566
9568
  onBlur: () => handleRename(label),
9567
9569
  onKeyUp: event => {
@@ -9573,10 +9575,10 @@ const VentionTreeItem = /*#__PURE__*/forwardRef((inputProps, ref) => {
9573
9575
  })
9574
9576
  }), hasVisibleTrailingOrActionItems && jsxs("div", {
9575
9577
  className: classes.actionButtonsContainer,
9576
- "data-testid": "actionButtonContainer",
9578
+ "data-testid": `${testId}-contextItems`,
9577
9579
  children: [trailingElements === null || trailingElements === void 0 ? void 0 : trailingElements.map((trailingElement, index) => jsx("div", {
9578
9580
  className: cx(classes.trailingElement, trailingElement.showOnHover && classes.trailingElementShowOnHover),
9579
- "data-testid": `trailingElement-${index}`,
9581
+ "data-testid": `${testId}-trailingElement-${index}`,
9580
9582
  onClick: handleTrailingElementClick,
9581
9583
  children: trailingElement.component
9582
9584
  }, index)), actionButtons === null || actionButtons === void 0 ? void 0 : actionButtons.map((button, index) => {
@@ -9587,7 +9589,7 @@ const VentionTreeItem = /*#__PURE__*/forwardRef((inputProps, ref) => {
9587
9589
  return jsx(VentionIconButton, {
9588
9590
  variant: "shaded",
9589
9591
  className: `${classes.actionButton} ${button.showOnHover ? classes.showOnHover : ""}`,
9590
- "data-testid": `actionButtonContainer-${index}`,
9592
+ "data-testid": `${testId}-actionButton-${index}`,
9591
9593
  onClick: handleButtonOnClick,
9592
9594
  children: button.component
9593
9595
  }, index);
@@ -9595,7 +9597,7 @@ const VentionTreeItem = /*#__PURE__*/forwardRef((inputProps, ref) => {
9595
9597
  })]
9596
9598
  }), captionsRight && captionsRight.length > 0 && jsx("div", {
9597
9599
  className: classes.captionRightContainer,
9598
- "data-testid": "captionRight",
9600
+ "data-testid": `${testId}-captionRightContainer`,
9599
9601
  children: captionsRight.map((caption, index) => jsx("div", {
9600
9602
  className: cx(classes.captionRight, !!caption.onClick && classes.clickableCaptionRight),
9601
9603
  onClick: caption.onClick ? event => {
@@ -9605,7 +9607,7 @@ const VentionTreeItem = /*#__PURE__*/forwardRef((inputProps, ref) => {
9605
9607
  style: {
9606
9608
  color: caption.color
9607
9609
  },
9608
- "data-testid": `captionRight-${index}`,
9610
+ "data-testid": `${testId}-captionRight-${index}`,
9609
9611
  children: jsx(Typography, {
9610
9612
  className: cx(classes.label, classes.captionRightLabel),
9611
9613
  variant: "uiTableNumbers12Reg",
@@ -9625,7 +9627,6 @@ const VentionTreeItem = /*#__PURE__*/forwardRef((inputProps, ref) => {
9625
9627
  });
9626
9628
  });
9627
9629
  const useStyles$a = tss.withParams().withNestedSelectors().create(({
9628
- hasWarning,
9629
9630
  isSelected,
9630
9631
  isExpanded,
9631
9632
  theme,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vention/machine-ui",
3
- "version": "3.47.0",
3
+ "version": "4.0.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/VentionCo/machine-cloud.git"
@@ -6,7 +6,7 @@ interface VentionCollapsibleCaretButtonProps {
6
6
  isExpanded: boolean;
7
7
  isVisible: boolean;
8
8
  onClick: (event: React.MouseEvent<HTMLDivElement>) => void;
9
- dataTestid?: string;
9
+ dataTestid?: string | undefined;
10
10
  }
11
11
  export declare const VentionCollapsibleCaretButton: FC<VentionCollapsibleCaretButtonProps>;
12
12
  export {};