allaw-ui 2.3.8 → 2.3.9

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.
@@ -18,13 +18,7 @@ var VerificationCodeInput = function (_a) {
18
18
  useEffect(function () {
19
19
  setValues(Array(numInputs).fill(""));
20
20
  inputRefs.current = Array(numInputs).fill(null);
21
- if (autoFocus) {
22
- setTimeout(function () {
23
- var _a;
24
- (_a = inputRefs.current[0]) === null || _a === void 0 ? void 0 : _a.focus();
25
- }, 0);
26
- }
27
- }, [numInputs, autoFocus]);
21
+ }, [numInputs]);
28
22
  useEffect(function () {
29
23
  if (testError) {
30
24
  setError("Code de vérification invalide");
@@ -162,7 +156,7 @@ var VerificationCodeInput = function (_a) {
162
156
  ? "[0-9]*"
163
157
  : allowedChars === "alphabetic"
164
158
  ? "[a-zA-Z]*"
165
- : "[a-zA-Z0-9]*", ref: function (input) { return (inputRefs.current[index] = input); } })); });
159
+ : "[a-zA-Z0-9]*", ref: function (input) { return (inputRefs.current[index] = input); }, autoFocus: index === 0 && autoFocus, tabIndex: index === 0 ? 0 : undefined })); });
166
160
  };
167
161
  return (React.createElement("div", { className: styles.container },
168
162
  React.createElement("div", { className: styles.inputsContainer }, renderInputs()),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "2.3.8",
3
+ "version": "2.3.9",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",