@vention/machine-ui 3.42.1 → 3.44.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
@@ -11329,7 +11329,8 @@ const defaultProps = {
11329
11329
  textAlign: "left",
11330
11330
  disabled: false,
11331
11331
  labelText: undefined,
11332
- helperText: undefined
11332
+ helperText: undefined,
11333
+ "data-testid": "VentionCheckbox"
11333
11334
  };
11334
11335
  const VentionCheckbox = checkboxProps => {
11335
11336
  const props = applyDefaultProps(checkboxProps, defaultProps);
@@ -11378,7 +11379,7 @@ const VentionCheckbox = checkboxProps => {
11378
11379
  inputProps: props.inputProps,
11379
11380
  value: props.value,
11380
11381
  name: props.name,
11381
- "data-testid": "VentionCheckbox",
11382
+ "data-testid": props["data-testid"],
11382
11383
  icon: jsx(VentionCheckboxIcon, {
11383
11384
  size: sizeStyle,
11384
11385
  checked: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vention/machine-ui",
3
- "version": "3.42.1",
3
+ "version": "3.44.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/VentionCo/machine-cloud.git"
@@ -0,0 +1,3 @@
1
+ export interface TestProps {
2
+ "data-testid"?: string;
3
+ }
@@ -1,12 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  import { FormControlLabelProps } from "@mui/material";
3
3
  import "../../theme/machine-ui-theme";
4
+ import { TestProps } from "../shared/types/test-props";
4
5
  export type VentionCheckboxSizes = "small" | "medium" | "large";
5
6
  export type VentionCheckboxLabelVariant = "default" | "bold";
6
7
  export type VentionCheckboxVariantStyle = "outlined";
7
8
  export type VentionCheckboxPosition = "left" | "right";
8
9
  export type VentionCheckboxTextAlign = "left" | "center" | "right";
9
- export interface VentionCheckboxProps extends Omit<FormControlLabelProps, "control" | "label"> {
10
+ export interface VentionCheckboxProps extends Omit<FormControlLabelProps, "control" | "label">, TestProps {
10
11
  labelText?: string;
11
12
  helperText?: string;
12
13
  variant?: VentionCheckboxVariantStyle;
@@ -17,5 +18,6 @@ export interface VentionCheckboxProps extends Omit<FormControlLabelProps, "contr
17
18
  disabled?: boolean;
18
19
  className?: string;
19
20
  inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
21
+ "data-testid"?: string;
20
22
  }
21
23
  export declare const VentionCheckbox: (checkboxProps: VentionCheckboxProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,13 @@
1
1
  import { Sizes, StrictExtract } from "../../theme/machine-ui-theme";
2
+ import { TestProps } from "../shared/types/test-props";
2
3
  type VentionCounterSizes = StrictExtract<Sizes, "small" | "medium" | "large">;
3
4
  export type VentionCounterVariants = "filled" | "subtle" | "outlined";
4
5
  export type VentionCounterColors = "red" | "blue" | "green" | "yellow" | "black";
5
- interface VentionCounterProps {
6
+ interface VentionCounterProps extends TestProps {
6
7
  color: VentionCounterColors;
7
8
  size: VentionCounterSizes;
8
9
  value: number;
9
10
  variant: VentionCounterVariants;
10
- "data-testid"?: string;
11
11
  }
12
12
  export declare const VentionCounter: (props: VentionCounterProps) => import("react/jsx-runtime").JSX.Element;
13
13
  export {};
@@ -1,12 +1,12 @@
1
1
  import { Sizes, StrictExtract } from "../../theme/machine-ui-theme";
2
- interface VentionLinkProps {
2
+ import { TestProps } from "../shared/types/test-props";
3
+ interface VentionLinkProps extends TestProps {
3
4
  onClick: () => void;
4
5
  size?: StrictExtract<Sizes, "medium" | "large">;
5
6
  labelText?: string;
6
7
  disabled?: boolean;
7
8
  underlined?: boolean;
8
9
  external?: boolean;
9
- "data-testid"?: string;
10
10
  }
11
11
  export declare const VentionLink: (inputProps: VentionLinkProps) => import("react/jsx-runtime").JSX.Element;
12
12
  export {};
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from "react";
2
- interface BaseProps {
2
+ import { TestProps } from "../../shared/types/test-props";
3
+ interface BaseProps extends TestProps {
3
4
  onClick?: (event: React.MouseEvent<HTMLLIElement, MouseEvent>) => void;
4
5
  disabled?: boolean;
5
6
  leftElement?: ReactNode;
@@ -8,7 +9,6 @@ interface BaseProps {
8
9
  customID?: string;
9
10
  subMenuItems?: ReactNode;
10
11
  focused?: boolean;
11
- "data-testid"?: string;
12
12
  }
13
13
  export type VentionMenuItemProps = ({
14
14
  labelText: string;
@@ -1,6 +1,7 @@
1
1
  import { VentionMenuItemProps } from "./vention-menu-item/vention-menu-item";
2
2
  import { PropsWithChildren } from "react";
3
- export type VentionMenuListProps = PropsWithChildren<{
3
+ import { TestProps } from "../shared/types/test-props";
4
+ export type VentionMenuListProps = PropsWithChildren<TestProps & {
4
5
  /**
5
6
  * Consider using composition
6
7
  * @example ```jsx
@@ -11,7 +12,6 @@ export type VentionMenuListProps = PropsWithChildren<{
11
12
  * ```
12
13
  */
13
14
  menuOptionsInfo?: VentionMenuItemProps[];
14
- "data-testid"?: string;
15
15
  disableBoxShadow?: boolean;
16
16
  }>;
17
17
  export declare const VentionMenuList: ({ menuOptionsInfo, "data-testid": dataTestId, children, disableBoxShadow, }: VentionMenuListProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import { FormHelperTextProps, InputLabelProps, TextFieldProps } from "@mui/material";
2
2
  import { Sizes, StrictExtract } from "../../theme/machine-ui-theme";
3
3
  import { InputStates } from "../shared/types/input-types";
4
+ import { TestProps } from "../shared/types/test-props";
4
5
  type VentionFormHelperTextProps = FormHelperTextProps & {
5
6
  "data-testid"?: string;
6
7
  };
@@ -8,12 +9,11 @@ type VentionInputLabelProps = Partial<InputLabelProps> & {
8
9
  "data-testid"?: string;
9
10
  };
10
11
  type VentionInputVariants = "outlined" | "shaded";
11
- export interface VentionTextInputProps extends Omit<TextFieldProps, "variant" | "error" | "disabled" | "FormHelperTextProps" | "size"> {
12
+ export interface VentionTextInputProps extends Omit<TextFieldProps, "variant" | "error" | "disabled" | "FormHelperTextProps" | "size">, TestProps {
12
13
  variant?: VentionInputVariants;
13
14
  state?: InputStates;
14
15
  className?: string;
15
16
  FormHelperTextProps?: VentionFormHelperTextProps;
16
- "data-testid"?: string;
17
17
  InputLabelProps?: VentionInputLabelProps;
18
18
  size?: StrictExtract<Sizes, "x-small" | "small" | "medium" | "large" | "x-large" | "xx-large">;
19
19
  rightItemText?: string;
@@ -1,6 +1,7 @@
1
1
  import { TooltipProps } from "@mui/material";
2
2
  import "../../theme/machine-ui-theme";
3
- export interface VentionTooltipProps extends TooltipProps {
3
+ import { TestProps } from "../shared/types/test-props";
4
+ export interface VentionTooltipProps extends TooltipProps, TestProps {
4
5
  placement?: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end";
5
6
  classes?: Partial<ReturnType<typeof useStyles>["classes"]>;
6
7
  }