@conform-to/react 1.18.0 → 1.19.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/dist/helpers.d.ts CHANGED
@@ -85,7 +85,7 @@ export declare function getAriaAttributes(metadata: Metadata<any, any, any>, opt
85
85
  * Derives the properties of a form element based on the form metadata,
86
86
  * including `id`, `onSubmit`, `noValidate`, and `aria-describedby`.
87
87
  *
88
- * @example
88
+ * **Example:**
89
89
  * ```tsx
90
90
  * <form {...getFormProps(metadata)} />
91
91
  * ```
@@ -101,7 +101,7 @@ export declare function getFormProps<Schema extends Record<string, any>, FormErr
101
101
  * Derives the properties of a fieldset element based on the field metadata,
102
102
  * including `id`, `name`, `form`, and `aria-describedby`.
103
103
  *
104
- * @example
104
+ * **Example:**
105
105
  * ```tsx
106
106
  * <fieldset {...getFieldsetProps(metadata)} />
107
107
  * ```
@@ -125,8 +125,9 @@ export declare function getFormControlProps<Schema>(metadata: FieldMetadata<Sche
125
125
  * Depends on the provided options, it will also set `defaultChecked` / `checked` if it is a checkbox or radio button,
126
126
  * or otherwise `defaultValue` / `value`.
127
127
  *
128
- * @see https://conform.guide/api/react/getInputProps
129
- * @example
128
+ * See https://conform.guide/api/react/getInputProps
129
+ *
130
+ * **Example:**
130
131
  * ```tsx
131
132
  * // To setup an uncontrolled input
132
133
  * <input {...getInputProps(metadata, { type: 'text' })} />
@@ -145,8 +146,9 @@ export declare function getInputProps<Schema, Options extends InputOptions>(meta
145
146
  * and constraint attributes such as `required` or `multiple`.
146
147
  * Depends on the provided options, it will also set `defaultValue` / `value`.
147
148
  *
148
- * @see https://conform.guide/api/react/getSelectProps
149
- * @example
149
+ * See https://conform.guide/api/react/getSelectProps
150
+ *
151
+ * **Example:**
150
152
  * ```tsx
151
153
  * // To setup an uncontrolled select
152
154
  * <select {...getSelectProps(metadata)} />
@@ -161,8 +163,9 @@ export declare function getSelectProps<Schema>(metadata: FieldMetadata<Schema, a
161
163
  * and constraint attributes such as `required`, `minLength` or `maxLength`.
162
164
  * Depends on the provided options, it will also set `defaultValue` / `value`.
163
165
  *
164
- * @see https://conform.guide/api/react/getTextareaProps
165
- * @example
166
+ * See https://conform.guide/api/react/getTextareaProps
167
+ *
168
+ * **Example:**
166
169
  * ```tsx
167
170
  * // To setup an uncontrolled textarea
168
171
  * <textarea {...getTextareaProps(metadata)} />
@@ -175,8 +178,9 @@ export declare function getTextareaProps<Schema>(metadata: FieldMetadata<Schema,
175
178
  * Derives the properties of a collection of checkboxes or radio buttons based on the field metadata,
176
179
  * including common form control attributes like `key`, `id`, `name`, `form`, `autoFocus`, `aria-invalid`, `aria-describedby` and `required`.
177
180
  *
178
- * @see https://conform.guide/api/react/getCollectionProps
179
- * @example
181
+ * See https://conform.guide/api/react/getCollectionProps
182
+ *
183
+ * **Example:**
180
184
  * ```tsx
181
185
  * <fieldset>
182
186
  * {getCollectionProps(metadata, {
package/dist/helpers.js CHANGED
@@ -38,7 +38,7 @@ function getAriaAttributes(metadata) {
38
38
  * Derives the properties of a form element based on the form metadata,
39
39
  * including `id`, `onSubmit`, `noValidate`, and `aria-describedby`.
40
40
  *
41
- * @example
41
+ * **Example:**
42
42
  * ```tsx
43
43
  * <form {...getFormProps(metadata)} />
44
44
  * ```
@@ -55,7 +55,7 @@ function getFormProps(metadata, options) {
55
55
  * Derives the properties of a fieldset element based on the field metadata,
56
56
  * including `id`, `name`, `form`, and `aria-describedby`.
57
57
  *
58
- * @example
58
+ * **Example:**
59
59
  * ```tsx
60
60
  * <fieldset {...getFieldsetProps(metadata)} />
61
61
  * ```
@@ -87,8 +87,9 @@ function getFormControlProps(metadata, options) {
87
87
  * Depends on the provided options, it will also set `defaultChecked` / `checked` if it is a checkbox or radio button,
88
88
  * or otherwise `defaultValue` / `value`.
89
89
  *
90
- * @see https://conform.guide/api/react/getInputProps
91
- * @example
90
+ * See https://conform.guide/api/react/getInputProps
91
+ *
92
+ * **Example:**
92
93
  * ```tsx
93
94
  * // To setup an uncontrolled input
94
95
  * <input {...getInputProps(metadata, { type: 'text' })} />
@@ -129,8 +130,9 @@ function getInputProps(metadata, options) {
129
130
  * and constraint attributes such as `required` or `multiple`.
130
131
  * Depends on the provided options, it will also set `defaultValue` / `value`.
131
132
  *
132
- * @see https://conform.guide/api/react/getSelectProps
133
- * @example
133
+ * See https://conform.guide/api/react/getSelectProps
134
+ *
135
+ * **Example:**
134
136
  * ```tsx
135
137
  * // To setup an uncontrolled select
136
138
  * <select {...getSelectProps(metadata)} />
@@ -156,8 +158,9 @@ function getSelectProps(metadata) {
156
158
  * and constraint attributes such as `required`, `minLength` or `maxLength`.
157
159
  * Depends on the provided options, it will also set `defaultValue` / `value`.
158
160
  *
159
- * @see https://conform.guide/api/react/getTextareaProps
160
- * @example
161
+ * See https://conform.guide/api/react/getTextareaProps
162
+ *
163
+ * **Example:**
161
164
  * ```tsx
162
165
  * // To setup an uncontrolled textarea
163
166
  * <textarea {...getTextareaProps(metadata)} />
@@ -182,8 +185,9 @@ function getTextareaProps(metadata) {
182
185
  * Derives the properties of a collection of checkboxes or radio buttons based on the field metadata,
183
186
  * including common form control attributes like `key`, `id`, `name`, `form`, `autoFocus`, `aria-invalid`, `aria-describedby` and `required`.
184
187
  *
185
- * @see https://conform.guide/api/react/getCollectionProps
186
- * @example
188
+ * See https://conform.guide/api/react/getCollectionProps
189
+ *
190
+ * **Example:**
187
191
  * ```tsx
188
192
  * <fieldset>
189
193
  * {getCollectionProps(metadata, {
package/dist/helpers.mjs CHANGED
@@ -34,7 +34,7 @@ function getAriaAttributes(metadata) {
34
34
  * Derives the properties of a form element based on the form metadata,
35
35
  * including `id`, `onSubmit`, `noValidate`, and `aria-describedby`.
36
36
  *
37
- * @example
37
+ * **Example:**
38
38
  * ```tsx
39
39
  * <form {...getFormProps(metadata)} />
40
40
  * ```
@@ -51,7 +51,7 @@ function getFormProps(metadata, options) {
51
51
  * Derives the properties of a fieldset element based on the field metadata,
52
52
  * including `id`, `name`, `form`, and `aria-describedby`.
53
53
  *
54
- * @example
54
+ * **Example:**
55
55
  * ```tsx
56
56
  * <fieldset {...getFieldsetProps(metadata)} />
57
57
  * ```
@@ -83,8 +83,9 @@ function getFormControlProps(metadata, options) {
83
83
  * Depends on the provided options, it will also set `defaultChecked` / `checked` if it is a checkbox or radio button,
84
84
  * or otherwise `defaultValue` / `value`.
85
85
  *
86
- * @see https://conform.guide/api/react/getInputProps
87
- * @example
86
+ * See https://conform.guide/api/react/getInputProps
87
+ *
88
+ * **Example:**
88
89
  * ```tsx
89
90
  * // To setup an uncontrolled input
90
91
  * <input {...getInputProps(metadata, { type: 'text' })} />
@@ -125,8 +126,9 @@ function getInputProps(metadata, options) {
125
126
  * and constraint attributes such as `required` or `multiple`.
126
127
  * Depends on the provided options, it will also set `defaultValue` / `value`.
127
128
  *
128
- * @see https://conform.guide/api/react/getSelectProps
129
- * @example
129
+ * See https://conform.guide/api/react/getSelectProps
130
+ *
131
+ * **Example:**
130
132
  * ```tsx
131
133
  * // To setup an uncontrolled select
132
134
  * <select {...getSelectProps(metadata)} />
@@ -152,8 +154,9 @@ function getSelectProps(metadata) {
152
154
  * and constraint attributes such as `required`, `minLength` or `maxLength`.
153
155
  * Depends on the provided options, it will also set `defaultValue` / `value`.
154
156
  *
155
- * @see https://conform.guide/api/react/getTextareaProps
156
- * @example
157
+ * See https://conform.guide/api/react/getTextareaProps
158
+ *
159
+ * **Example:**
157
160
  * ```tsx
158
161
  * // To setup an uncontrolled textarea
159
162
  * <textarea {...getTextareaProps(metadata)} />
@@ -178,8 +181,9 @@ function getTextareaProps(metadata) {
178
181
  * Derives the properties of a collection of checkboxes or radio buttons based on the field metadata,
179
182
  * including common form control attributes like `key`, `id`, `name`, `form`, `autoFocus`, `aria-invalid`, `aria-describedby` and `required`.
180
183
  *
181
- * @see https://conform.guide/api/react/getCollectionProps
182
- * @example
184
+ * See https://conform.guide/api/react/getCollectionProps
185
+ *
186
+ * **Example:**
183
187
  * ```tsx
184
188
  * <fieldset>
185
189
  * {getCollectionProps(metadata, {
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.18.0",
6
+ "version": "1.19.0",
7
7
  "main": "./dist/index.js",
8
8
  "module": "./dist/index.mjs",
9
9
  "types": "./dist/index.d.ts",
@@ -41,7 +41,7 @@
41
41
  "url": "https://github.com/edmundhung/conform/issues"
42
42
  },
43
43
  "dependencies": {
44
- "@conform-to/dom": "1.18.0"
44
+ "@conform-to/dom": "1.19.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@babel/core": "^7.17.8",