@ultraviolet/form 6.0.15 → 6.0.16

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.
@@ -46,7 +46,7 @@ const DateInputField = ({
46
46
  ...props,
47
47
  endDate: selectsRange && Array.isArray(field.value) ? field.value[1] : void 0,
48
48
  error: getError({ label, maxDate, minDate }, error),
49
- format: format || ((value) => {
49
+ format: format ?? ((value) => {
50
50
  if (!value) {
51
51
  return "";
52
52
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAGjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAG7C,KAAK,cAAc,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAA;AAEtD,KAAK,SAAS,CAAC,YAAY,SAAS,WAAW,IAAI;IACjD,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC,cAAc,CAAC,GAAG,cAAc,CAAA;IAC1E,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,CAAA;CACrC,CAAA;AAED,eAAO,MAAM,IAAI,GAAI,YAAY,SAAS,WAAW,EAAE,gDAMpD,SAAS,CAAC,YAAY,CAAC,4CA8BzB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAGjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAG7C,KAAK,cAAc,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAA;AAEtD,KAAK,SAAS,CAAC,YAAY,SAAS,WAAW,IAAI;IACjD,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC,cAAc,CAAC,GAAG,cAAc,CAAA;IAC1E,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,CAAA;CACrC,CAAA;AAED,eAAO,MAAM,IAAI,GAAI,YAAY,SAAS,WAAW,EAAE,gDAMpD,SAAS,CAAC,YAAY,CAAC,4CA+BzB,CAAA"}
@@ -24,10 +24,10 @@ const Form = ({
24
24
  {
25
25
  name,
26
26
  noValidate: true,
27
- onSubmit: async (e) => {
27
+ onSubmit: (e) => {
28
28
  e.preventDefault();
29
29
  e.stopPropagation();
30
- await handleSubmit(e);
30
+ handleSubmit(e).catch(() => null);
31
31
  },
32
32
  style: { display: "contents" },
33
33
  children
@@ -69,7 +69,7 @@ const TextInputField = ({
69
69
  );
70
70
  },
71
71
  required,
72
- value: field.value === void 0 ? "" : field.value
72
+ value: field.value ?? ""
73
73
  }
74
74
  );
75
75
  };
@@ -36,7 +36,7 @@ const VerificationCodeField = ({
36
36
  VerificationCode,
37
37
  {
38
38
  ...props,
39
- error: getError({ label: label || "verification-code-field" }, error),
39
+ error: getError({ label: label ?? "verification-code-field" }, error),
40
40
  fields,
41
41
  inputId,
42
42
  label,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultraviolet/form",
3
- "version": "6.0.15",
3
+ "version": "6.0.16",
4
4
  "description": "Ultraviolet Form",
5
5
  "homepage": "https://github.com/scaleway/ultraviolet#readme",
6
6
  "repository": {
@@ -60,9 +60,9 @@
60
60
  "react-dom": "18.x || 19.x"
61
61
  },
62
62
  "devDependencies": {
63
- "@babel/core": "7.28.6",
63
+ "@babel/core": "7.29.0",
64
64
  "@types/final-form-focus": "1.1.7",
65
- "@types/react": "19.2.10",
65
+ "@types/react": "19.2.14",
66
66
  "@types/react-dom": "19.2.3",
67
67
  "react": "19.2.4",
68
68
  "react-dom": "19.2.4",
@@ -72,9 +72,9 @@
72
72
  "dependencies": {
73
73
  "@babel/runtime": "7.28.6",
74
74
  "react-hook-form": "7.55.0",
75
- "@ultraviolet/icons": "5.1.2",
76
- "@ultraviolet/themes": "3.0.6",
77
- "@ultraviolet/ui": "3.8.2"
75
+ "@ultraviolet/icons": "5.1.3",
76
+ "@ultraviolet/themes": "3.1.0",
77
+ "@ultraviolet/ui": "3.9.0"
78
78
  },
79
79
  "scripts": {
80
80
  "build:profile": "npx vite-bundle-visualizer -c vite.config.ts",
@@ -84,6 +84,7 @@
84
84
  "test:unit": "LC_ALL=en_US.UTF-8 pnpm vitest --run --config vite.config.ts",
85
85
  "type:generate": "tsc --declaration -p tsconfig.build.json",
86
86
  "typecheck": "tsc --noEmit",
87
+ "typecheck:go": "tsgo --noEmit",
87
88
  "watch:build": "vite build --config vite.config.ts --watch",
88
89
  "watch": "pnpm run '/^watch:.*/'",
89
90
  "lintpublish": "publint"