@luscii-healthtech/web-ui 2.63.2 → 2.63.3
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/dist/components/ButtonV2/ButtonProps.type.d.ts +1 -0
- package/dist/web-ui.cjs.development.js +8 -3
- package/dist/web-ui.cjs.development.js.map +1 -1
- package/dist/web-ui.cjs.production.min.js +1 -1
- package/dist/web-ui.cjs.production.min.js.map +1 -1
- package/dist/web-ui.esm.js +8 -3
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -11,6 +11,7 @@ export interface BaseButtonProps extends React.HTMLAttributes<HTMLButtonElement>
|
|
|
11
11
|
icon?: React.FunctionComponent<IconProps> | IconKey;
|
|
12
12
|
isDisabled?: boolean;
|
|
13
13
|
className?: string;
|
|
14
|
+
dataTestId?: string;
|
|
14
15
|
}
|
|
15
16
|
export declare type NonPrimaryButtonProps = BaseButtonProps;
|
|
16
17
|
/**
|
|
@@ -3066,8 +3066,10 @@ var Spinner = function Spinner(props) {
|
|
|
3066
3066
|
}));
|
|
3067
3067
|
};
|
|
3068
3068
|
|
|
3069
|
-
var _excluded$b = ["onClick", "text", "textColor", "textHoverColor", "icon", "isDisabled", "isPending", "className", "title"];
|
|
3069
|
+
var _excluded$b = ["onClick", "text", "textColor", "textHoverColor", "icon", "isDisabled", "isPending", "className", "title", "dataTestId"];
|
|
3070
3070
|
var ButtonV2 = /*#__PURE__*/React__default.forwardRef(function (_ref, innerRef) {
|
|
3071
|
+
var _otherAttributes$id;
|
|
3072
|
+
|
|
3071
3073
|
var onClick = _ref.onClick,
|
|
3072
3074
|
text = _ref.text,
|
|
3073
3075
|
textColor = _ref.textColor,
|
|
@@ -3077,10 +3079,12 @@ var ButtonV2 = /*#__PURE__*/React__default.forwardRef(function (_ref, innerRef)
|
|
|
3077
3079
|
isPending = _ref.isPending,
|
|
3078
3080
|
className = _ref.className,
|
|
3079
3081
|
title = _ref.title,
|
|
3082
|
+
dataTestId = _ref.dataTestId,
|
|
3080
3083
|
otherAttributes = _objectWithoutPropertiesLoose(_ref, _excluded$b);
|
|
3081
3084
|
|
|
3082
3085
|
var generatedId = React__default.useId();
|
|
3083
|
-
var
|
|
3086
|
+
var buttonId = (_otherAttributes$id = otherAttributes.id) != null ? _otherAttributes$id : generatedId;
|
|
3087
|
+
var buttonTooltipId = "button-tooltip-id-" + buttonId;
|
|
3084
3088
|
|
|
3085
3089
|
function handleClick(event) {
|
|
3086
3090
|
event.stopPropagation();
|
|
@@ -3109,7 +3113,8 @@ var ButtonV2 = /*#__PURE__*/React__default.forwardRef(function (_ref, innerRef)
|
|
|
3109
3113
|
type: "button",
|
|
3110
3114
|
onClick: handleClick,
|
|
3111
3115
|
disabled: isDisabled,
|
|
3112
|
-
"aria-disabled": isDisabled
|
|
3116
|
+
"aria-disabled": isDisabled,
|
|
3117
|
+
"data-test-id": dataTestId != null ? dataTestId : buttonId
|
|
3113
3118
|
}), /*#__PURE__*/React__default.createElement("span", _extends({}, tooltipAttrs, {
|
|
3114
3119
|
className: classNames("relative flex flex-row items-center justify-center w-full h-full", // ensuring the buttons are 44px high including content
|
|
3115
3120
|
{
|