@conform-to/react 1.5.0 → 1.6.0
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.
- package/README.md +1 -1
- package/integrations.d.ts +1 -1
- package/integrations.js +1 -1
- package/integrations.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
╚══════╝ ╚═════╝ ╚═╝ ╚══╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
Version 1.
|
|
10
|
+
Version 1.6.0 / License MIT / Copyright (c) 2024 Edmund Hung
|
|
11
11
|
|
|
12
12
|
A type-safe form validation library utilizing web fundamentals to progressively enhance HTML Forms with full support for server frameworks like Remix and Next.js.
|
|
13
13
|
|
package/integrations.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { type Key, type RefCallback } from 'react';
|
|
|
2
2
|
export declare function getFormElement(formId: string): HTMLFormElement | null;
|
|
3
3
|
export declare function getFieldElements(form: HTMLFormElement | null, name: string): Array<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>;
|
|
4
4
|
export declare function getEventTarget(form: HTMLFormElement | null, name: string, value?: string | string[]): HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement | null;
|
|
5
|
-
export declare function createDummySelect(form: HTMLFormElement, name: string, value
|
|
5
|
+
export declare function createDummySelect(form: HTMLFormElement, name: string, value: string | string[]): HTMLSelectElement;
|
|
6
6
|
export declare function isDummySelect(element: HTMLElement): element is HTMLSelectElement;
|
|
7
7
|
export declare function getInputValue(element: HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement): string | string[] | null;
|
|
8
8
|
export declare function useInputEvent(onUpdate: React.Dispatch<React.SetStateAction<string | string[] | undefined>>): {
|
package/integrations.js
CHANGED
|
@@ -31,7 +31,7 @@ function createDummySelect(form, name, value) {
|
|
|
31
31
|
var select = document.createElement('select');
|
|
32
32
|
var options = typeof value === 'string' ? [value] : value !== null && value !== void 0 ? value : [];
|
|
33
33
|
select.name = name;
|
|
34
|
-
select.multiple =
|
|
34
|
+
select.multiple = Array.isArray(value);
|
|
35
35
|
select.dataset.conform = 'true';
|
|
36
36
|
|
|
37
37
|
// To make sure the input is hidden but still focusable
|
package/integrations.mjs
CHANGED
|
@@ -27,7 +27,7 @@ function createDummySelect(form, name, value) {
|
|
|
27
27
|
var select = document.createElement('select');
|
|
28
28
|
var options = typeof value === 'string' ? [value] : value !== null && value !== void 0 ? value : [];
|
|
29
29
|
select.name = name;
|
|
30
|
-
select.multiple =
|
|
30
|
+
select.multiple = Array.isArray(value);
|
|
31
31
|
select.dataset.conform = 'true';
|
|
32
32
|
|
|
33
33
|
// To make sure the input is hidden but still focusable
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Conform view adapter for react",
|
|
4
4
|
"homepage": "https://conform.guide",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.6.0",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"module": "index.mjs",
|
|
9
9
|
"types": "index.d.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"url": "https://github.com/edmundhung/conform/issues"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@conform-to/dom": "1.
|
|
33
|
+
"@conform-to/dom": "1.6.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@babel/core": "^7.17.8",
|