allaw-ui 5.4.1 → 5.4.2

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.
@@ -1,5 +1,5 @@
1
1
  import React, { ButtonHTMLAttributes } from "react";
2
- export interface ActionButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
2
+ export interface ActionButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type"> {
3
3
  startIcon?: React.ReactNode;
4
4
  endIcon?: React.ReactNode;
5
5
  startIconName?: string;
@@ -59,7 +59,7 @@ var __rest = (this && this.__rest) || function (s, e) {
59
59
  import React, { forwardRef, useEffect, useImperativeHandle, useState, } from "react";
60
60
  import styles from "./ActionButton.module.css";
61
61
  var ActionButton = forwardRef(function (_a, ref) {
62
- var startIcon = _a.startIcon, endIcon = _a.endIcon, startIconName = _a.startIconName, endIconName = _a.endIconName, label = _a.label, _b = _a.disabled, disabled = _b === void 0 ? false : _b, onClick = _a.onClick, _c = _a.fullWidth, fullWidth = _c === void 0 ? false : _c, _d = _a.type, type = _d === void 0 ? "button" : _d, _e = _a.isLoading, isLoading = _e === void 0 ? false : _e, variant = _a.variant, _f = _a.size, size = _f === void 0 ? "medium" : _f, props = __rest(_a, ["startIcon", "endIcon", "startIconName", "endIconName", "label", "disabled", "onClick", "fullWidth", "type", "isLoading", "variant", "size"]);
62
+ var startIcon = _a.startIcon, endIcon = _a.endIcon, startIconName = _a.startIconName, endIconName = _a.endIconName, label = _a.label, _b = _a.disabled, disabled = _b === void 0 ? false : _b, onClick = _a.onClick, _c = _a.fullWidth, fullWidth = _c === void 0 ? false : _c, _d = _a.type, type = _d === void 0 ? "button" : _d, _e = _a.isLoading, isLoading = _e === void 0 ? false : _e, variant = _a.variant, _f = _a.size, size = _f === void 0 ? "medium" : _f, dataTestId = _a.dataTestId, props = __rest(_a, ["startIcon", "endIcon", "startIconName", "endIconName", "label", "disabled", "onClick", "fullWidth", "type", "isLoading", "variant", "size", "dataTestId"]);
63
63
  var buttonRef = React.useRef(null);
64
64
  var _g = useState(false), internalIsLoading = _g[0], setInternalIsLoading = _g[1];
65
65
  var _h = useState(""), loadingDots = _h[0], setLoadingDots = _h[1];
@@ -106,7 +106,7 @@ var ActionButton = forwardRef(function (_a, ref) {
106
106
  }
107
107
  });
108
108
  }); };
109
- return (React.createElement("button", __assign({ ref: buttonRef, "data-testid": props.dataTestId, className: "".concat(styles.actionButton, " ").concat(disabled ? styles.actionButtonDisabled : styles.actionButtonEnabled, " ").concat(fullWidth ? styles.actionButtonFullWidth : "", " ").concat(isButtonLoading ? styles.actionButtonLoading : "", " ").concat(variant === "warning" ? styles.actionButtonWarning : "", " ").concat(variant === "border" ? styles.actionButtonBorder : "", " ").concat(size === "large" ? styles.actionButtonLarge : ""), disabled: disabled, onClick: handleClick, type: type }, props),
109
+ return (React.createElement("button", __assign({ ref: buttonRef, "data-testid": dataTestId, className: "".concat(styles.actionButton, " ").concat(disabled ? styles.actionButtonDisabled : styles.actionButtonEnabled, " ").concat(fullWidth ? styles.actionButtonFullWidth : "", " ").concat(isButtonLoading ? styles.actionButtonLoading : "", " ").concat(variant === "warning" ? styles.actionButtonWarning : "", " ").concat(variant === "border" ? styles.actionButtonBorder : "", " ").concat(size === "large" ? styles.actionButtonLarge : ""), disabled: disabled, onClick: handleClick, type: type }, props),
110
110
  startIcon && (React.createElement("span", { className: "".concat(styles.actionButtonIcon, " ").concat(startIconName) })),
111
111
  React.createElement("span", { className: styles.actionButtonLabel }, label),
112
112
  isButtonLoading ? (React.createElement("span", { className: styles.actionButtonLoadingDots }, loadingDots)) : (endIcon && (React.createElement("span", { className: "".concat(styles.actionButtonIcon, " ").concat(endIconName) })))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "5.4.1",
3
+ "version": "5.4.2",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",