@vention/machine-ui 3.30.5 → 3.31.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
@@ -5683,7 +5683,8 @@ const VentionModal = props => {
5683
5683
  isTouchDevice = false,
5684
5684
  type,
5685
5685
  backDropClickClosable = true,
5686
- textAlign = "center"
5686
+ textAlign = "center",
5687
+ buttonPosition
5687
5688
  } = props;
5688
5689
  const {
5689
5690
  classes
@@ -5691,7 +5692,8 @@ const VentionModal = props => {
5691
5692
  modalSize,
5692
5693
  isTouchDevice,
5693
5694
  type,
5694
- textAlign
5695
+ textAlign,
5696
+ buttonPosition
5695
5697
  });
5696
5698
  const iconProps = isTouchDevice ? {
5697
5699
  stroke: 2,
@@ -5737,21 +5739,22 @@ const VentionModal = props => {
5737
5739
  children: props.body
5738
5740
  }), jsxs(Box$1, {
5739
5741
  className: classes.modalActions,
5742
+ "data-testid": ventionModalTestIds.modalActions,
5740
5743
  children: [props.secondaryButton && jsx(VentionButton, {
5741
5744
  size: buttonSize,
5742
5745
  onClick: props.secondaryButton.onClick,
5743
5746
  variant: props.secondaryButton.variant || "outline",
5744
- className: classes.modalButton,
5745
5747
  loading: props.secondaryButton.loading,
5746
5748
  disabled: props.secondaryButton.disabled,
5749
+ fullWidth: props.buttonPosition === undefined ? true : false,
5747
5750
  children: props.secondaryButton.text
5748
5751
  }), props.primaryButton && jsx(VentionButton, {
5749
5752
  size: buttonSize,
5750
5753
  onClick: props.primaryButton.onClick,
5751
5754
  variant: props.primaryButton.variant || "filled",
5752
- className: classes.modalButton,
5753
5755
  loading: props.primaryButton.loading,
5754
5756
  disabled: props.primaryButton.disabled,
5757
+ fullWidth: props.buttonPosition === undefined ? true : false,
5755
5758
  children: props.primaryButton.text
5756
5759
  })]
5757
5760
  })]
@@ -5763,6 +5766,7 @@ const useStyles$v = tss.withParams().create(({
5763
5766
  modalSize,
5764
5767
  isTouchDevice,
5765
5768
  textAlign,
5769
+ buttonPosition,
5766
5770
  theme
5767
5771
  }) => {
5768
5772
  const colors = getColors$2(type, theme);
@@ -5804,10 +5808,8 @@ const useStyles$v = tss.withParams().create(({
5804
5808
  modalActions: {
5805
5809
  display: "flex",
5806
5810
  width: "100%",
5807
- gap: isTouchDevice || modalSize === "xx-large" ? theme.spacing(5) : theme.spacing(4)
5808
- },
5809
- modalButton: {
5810
- flex: 1
5811
+ gap: isTouchDevice || modalSize === "xx-large" ? theme.spacing(5) : theme.spacing(4),
5812
+ justifyContent: buttonPosition === "left" ? "flex-start" : buttonPosition === "right" ? "flex-end" : "space-between"
5811
5813
  },
5812
5814
  titleText: {
5813
5815
  textAlign,
@@ -5815,6 +5817,7 @@ const useStyles$v = tss.withParams().create(({
5815
5817
  },
5816
5818
  bodyText: {
5817
5819
  textAlign,
5820
+ width: "100%",
5818
5821
  marginBottom: isTouchDevice || modalSize === "xx-large" ? theme.spacing(9) : theme.spacing(5)
5819
5822
  }
5820
5823
  };
@@ -5882,7 +5885,8 @@ const ventionModalTestIds = {
5882
5885
  positiveIcon: "vention-modal-positive-icon",
5883
5886
  infoIcon: "vention-modal-info-icon",
5884
5887
  warningIcon: "vention-modal-warning-icon",
5885
- negativeIcon: "vention-modal-negative-icon"
5888
+ negativeIcon: "vention-modal-negative-icon",
5889
+ modalActions: "vention-modal-actions"
5886
5890
  };
5887
5891
 
5888
5892
  const defaultProps$5 = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vention/machine-ui",
3
- "version": "3.30.5",
3
+ "version": "3.31.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/VentionCo/machine-cloud.git"
@@ -13,6 +13,7 @@ export interface VentionModalProps {
13
13
  isTouchDevice?: boolean;
14
14
  isOpen: VentionModalBaseProps["isOpen"];
15
15
  onClose: () => void;
16
+ buttonPosition?: "left" | "right";
16
17
  primaryButton?: {
17
18
  text: string;
18
19
  onClick: () => void;
@@ -45,4 +46,5 @@ export declare const ventionModalTestIds: {
45
46
  infoIcon: string;
46
47
  warningIcon: string;
47
48
  negativeIcon: string;
49
+ modalActions: string;
48
50
  };