@luscii-healthtech/web-ui 2.63.1 → 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.
@@ -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
  /**
@@ -2094,14 +2094,18 @@ toast.info = function (message) {
2094
2094
  });
2095
2095
  };
2096
2096
 
2097
- var css_248z$2 = ".title {\n font-family: \"AvenirNextLTPro-Bold\", \"Roboto\", sans-serif;\n}";
2097
+ var css_248z$2 = ".title-avenir {\n font-family: \"AvenirNextLTPro-Bold\", \"Roboto\", sans-serif;\n}\n\n.title-inter {\n font-family: \"Inter\", \"Roboto\", \"Helvetica\", sans-serif;\n}";
2098
2098
  styleInject(css_248z$2);
2099
2099
 
2100
2100
  var Title = function Title(props) {
2101
2101
  var _props$color;
2102
2102
 
2103
- var containerClassName = classNames("title", //this is used to load the correct font from the css
2104
- "font-bold", allowedColors[(_props$color = props.color) != null ? _props$color : "base"], {
2103
+ var isSmallTitle = props.type === "xs" || props.type === "sm";
2104
+ var containerClassName = classNames("font-bold", allowedColors[(_props$color = props.color) != null ? _props$color : "base"], {
2105
+ "title-inter": isSmallTitle,
2106
+ "title-avenir": !isSmallTitle //this is used to load the correct font from the css
2107
+
2108
+ }, {
2105
2109
  "text-base": props.type === "xs",
2106
2110
  "text-xl": props.type === "sm",
2107
2111
  "text-2xl": props.type === "base",
@@ -3062,8 +3066,10 @@ var Spinner = function Spinner(props) {
3062
3066
  }));
3063
3067
  };
3064
3068
 
3065
- 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"];
3066
3070
  var ButtonV2 = /*#__PURE__*/React__default.forwardRef(function (_ref, innerRef) {
3071
+ var _otherAttributes$id;
3072
+
3067
3073
  var onClick = _ref.onClick,
3068
3074
  text = _ref.text,
3069
3075
  textColor = _ref.textColor,
@@ -3073,10 +3079,12 @@ var ButtonV2 = /*#__PURE__*/React__default.forwardRef(function (_ref, innerRef)
3073
3079
  isPending = _ref.isPending,
3074
3080
  className = _ref.className,
3075
3081
  title = _ref.title,
3082
+ dataTestId = _ref.dataTestId,
3076
3083
  otherAttributes = _objectWithoutPropertiesLoose(_ref, _excluded$b);
3077
3084
 
3078
3085
  var generatedId = React__default.useId();
3079
- var buttonTooltipId = otherAttributes.id ? "button-tooltip-id-" + otherAttributes.id : "button-tooltip-id-" + generatedId;
3086
+ var buttonId = (_otherAttributes$id = otherAttributes.id) != null ? _otherAttributes$id : generatedId;
3087
+ var buttonTooltipId = "button-tooltip-id-" + buttonId;
3080
3088
 
3081
3089
  function handleClick(event) {
3082
3090
  event.stopPropagation();
@@ -3105,7 +3113,8 @@ var ButtonV2 = /*#__PURE__*/React__default.forwardRef(function (_ref, innerRef)
3105
3113
  type: "button",
3106
3114
  onClick: handleClick,
3107
3115
  disabled: isDisabled,
3108
- "aria-disabled": isDisabled
3116
+ "aria-disabled": isDisabled,
3117
+ "data-test-id": dataTestId != null ? dataTestId : buttonId
3109
3118
  }), /*#__PURE__*/React__default.createElement("span", _extends({}, tooltipAttrs, {
3110
3119
  className: classNames("relative flex flex-row items-center justify-center w-full h-full", // ensuring the buttons are 44px high including content
3111
3120
  {