allaw-ui 2.5.0 → 2.5.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.
@@ -65,7 +65,11 @@ var Input = forwardRef(function (_a, ref) {
65
65
  React.createElement("i", { className: endIcon })));
66
66
  }
67
67
  if (style === "password") {
68
- return (React.createElement("button", { className: "Input-button", onClick: function () { return setIsPasswordVisible(!isPasswordVisible); } }, isPasswordVisible ? "CACHER" : "AFFICHER"));
68
+ return (React.createElement("button", { type: "button", className: "Input-button", onClick: function (e) {
69
+ e.preventDefault();
70
+ e.stopPropagation();
71
+ setIsPasswordVisible(function (prev) { return !prev; });
72
+ } }, isPasswordVisible ? "CACHER" : "AFFICHER"));
69
73
  }
70
74
  return null;
71
75
  };
@@ -77,7 +81,10 @@ var Input = forwardRef(function (_a, ref) {
77
81
  "*"))),
78
82
  React.createElement("div", { className: "Input-container" },
79
83
  React.createElement("div", { className: "Input-input ".concat(style === "password" ? "Input-password-input" : "") },
80
- React.createElement("input", { ref: inputRef, type: style === "password" && !isPasswordVisible ? "password" : type, placeholder: placeholder, className: "Input-placeholder", value: value, onChange: function (e) { handleChange(e); rowChange && rowChange(e); }, onBlur: handleBlur })),
84
+ React.createElement("input", { ref: inputRef, type: style === "password" && !isPasswordVisible ? "password" : type, placeholder: placeholder, className: "Input-placeholder", value: value, onChange: function (e) {
85
+ handleChange(e);
86
+ rowChange && rowChange(e);
87
+ }, onBlur: handleBlur })),
81
88
  renderEndIcon(),
82
89
  error && isTouched && (React.createElement("div", { className: "error-message" },
83
90
  React.createElement(TinyInfo, { variant: "medium12", color: "actions-error", text: error }))))));
@@ -132,7 +132,9 @@ var VerificationCodeInput = function (_a) {
132
132
  ? "[0-9]*"
133
133
  : allowedChars === "alphabetic"
134
134
  ? "[a-zA-Z]*"
135
- : "[a-zA-Z0-9]*", ref: function (input) { return (inputRefs.current[index] = input); }, autoFocus: index === 0 && autoFocus, tabIndex: index === 0 ? 0 : undefined })); });
135
+ : "[a-zA-Z0-9]*", ref: function (input) { return (inputRefs.current[index] = input); }, autoFocus: index === 0 && autoFocus, tabIndex: index === 0 ? 0 : undefined, "data-lpignore": "true" // Empêche Dashlane d'intervenir
136
+ , "data-form-type": "other" // Indique que ce n'est pas un champ de mot de passe
137
+ })); });
136
138
  };
137
139
  return (React.createElement("div", { className: styles.container },
138
140
  React.createElement("div", { className: styles.inputsContainer }, renderInputs()),
@@ -16,6 +16,12 @@
16
16
  letter-spacing: 0.5px;
17
17
  }
18
18
 
19
+ .tiny-info.semiBold14 {
20
+ font-size: 14px;
21
+ font-weight: 600;
22
+ color: var(--Primary-Blanc, #fff);
23
+ }
24
+
19
25
  .tiny-info.medium14 {
20
26
  font-size: 14px;
21
27
  font-weight: 400;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import "./TinyInfo.css";
3
3
  export interface TinyInfoProps {
4
- variant: "bold14" | "medium14" | "semiBold12" | "medium12";
4
+ variant: "bold14" | "medium14" | "semiBold14" | "semiBold12" | "medium12";
5
5
  color?: "bleu-allaw" | "mid-grey" | "dark-grey" | "noir" | "pure-white" | "actions-error" | "actions-valid";
6
6
  text: string;
7
7
  href?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "2.5.0",
3
+ "version": "2.5.2",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",