@ttoss/forms 0.14.9 → 0.14.11
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/esm/index.js +3 -3
- package/dist/index.js +3 -3
- package/package.json +6 -6
- package/src/FormFieldCheckbox.tsx +12 -14
package/dist/esm/index.js
CHANGED
|
@@ -107,7 +107,7 @@ var FormFieldCheckbox = ({
|
|
|
107
107
|
});
|
|
108
108
|
const id = `form-field-checkbox-${name}`;
|
|
109
109
|
return /* @__PURE__ */ jsxs2(Box3, { children: [
|
|
110
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ jsx4(Flex, { sx: { alignItems: "center" }, children: /* @__PURE__ */ jsxs2(Label2, { "aria-disabled": checkboxProps.disabled, htmlFor: id, children: [
|
|
111
111
|
/* @__PURE__ */ jsx4(
|
|
112
112
|
Checkbox,
|
|
113
113
|
{
|
|
@@ -120,8 +120,8 @@ var FormFieldCheckbox = ({
|
|
|
120
120
|
...checkboxProps
|
|
121
121
|
}
|
|
122
122
|
),
|
|
123
|
-
label
|
|
124
|
-
] }),
|
|
123
|
+
label
|
|
124
|
+
] }) }),
|
|
125
125
|
/* @__PURE__ */ jsx4(ErrorMessage, { name })
|
|
126
126
|
] });
|
|
127
127
|
};
|
package/dist/index.js
CHANGED
|
@@ -147,7 +147,7 @@ var FormFieldCheckbox = ({
|
|
|
147
147
|
});
|
|
148
148
|
const id = `form-field-checkbox-${name}`;
|
|
149
149
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_ui4.Box, { children: [
|
|
150
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.
|
|
150
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_ui4.Flex, { sx: { alignItems: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_ui4.Label, { "aria-disabled": checkboxProps.disabled, htmlFor: id, children: [
|
|
151
151
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
152
152
|
import_ui4.Checkbox,
|
|
153
153
|
{
|
|
@@ -160,8 +160,8 @@ var FormFieldCheckbox = ({
|
|
|
160
160
|
...checkboxProps
|
|
161
161
|
}
|
|
162
162
|
),
|
|
163
|
-
label
|
|
164
|
-
] }),
|
|
163
|
+
label
|
|
164
|
+
] }) }),
|
|
165
165
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ErrorMessage, { name })
|
|
166
166
|
] });
|
|
167
167
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/forms",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.11",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": "ttoss",
|
|
6
6
|
"contributors": [
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"react": "^18.2.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@ttoss/config": "^1.28.
|
|
33
|
-
"@ttoss/test-utils": "^1.20.
|
|
34
|
-
"@ttoss/ui": "^1.30.
|
|
35
|
-
"@types/jest": "^29.4.
|
|
32
|
+
"@ttoss/config": "^1.28.4",
|
|
33
|
+
"@ttoss/test-utils": "^1.20.6",
|
|
34
|
+
"@ttoss/ui": "^1.30.11",
|
|
35
|
+
"@types/jest": "^29.4.4",
|
|
36
36
|
"jest": "^29.5.0",
|
|
37
37
|
"react": "^18.2.0",
|
|
38
38
|
"react-hook-form": "^7.43.2",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "2f241b7126c460eeaea3eba6445aa139411d4b19"
|
|
45
45
|
}
|
|
@@ -24,20 +24,18 @@ export const FormFieldCheckbox = <
|
|
|
24
24
|
return (
|
|
25
25
|
<Box>
|
|
26
26
|
<Flex sx={{ alignItems: 'center' }}>
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
</Label>
|
|
40
|
-
)}
|
|
27
|
+
<Label aria-disabled={checkboxProps.disabled} htmlFor={id}>
|
|
28
|
+
<Checkbox
|
|
29
|
+
id={id}
|
|
30
|
+
ref={ref}
|
|
31
|
+
checked={value}
|
|
32
|
+
onChange={onChange}
|
|
33
|
+
onBlur={onBlur}
|
|
34
|
+
name={name}
|
|
35
|
+
{...checkboxProps}
|
|
36
|
+
/>
|
|
37
|
+
{label}
|
|
38
|
+
</Label>
|
|
41
39
|
</Flex>
|
|
42
40
|
<ErrorMessage name={name} />
|
|
43
41
|
</Box>
|