@forms.expert/sdk 0.4.4 → 0.4.6
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/react/index.cjs +18 -6
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +18 -6
- package/dist/react/index.js.map +1 -1
- package/dist/vanilla/index.cjs +35 -24
- package/dist/vanilla/index.cjs.map +1 -1
- package/dist/vanilla/index.global.js +35 -24
- package/dist/vanilla/index.global.js.map +1 -1
- package/dist/vanilla/index.js +28 -17
- package/dist/vanilla/index.js.map +1 -1
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -1232,7 +1232,7 @@ function FormsExpertForm({
|
|
|
1232
1232
|
textAlign: "center",
|
|
1233
1233
|
marginTop: "1rem",
|
|
1234
1234
|
paddingTop: "0.75rem",
|
|
1235
|
-
borderTop: `1px solid ${styling.theme === "dark" ? "#374151" : "#e5e7eb"}`
|
|
1235
|
+
borderTop: `1px solid ${styling.separatorColor || (styling.theme === "dark" ? "#374151" : "#e5e7eb")}`
|
|
1236
1236
|
},
|
|
1237
1237
|
children: /* @__PURE__ */ jsx2(
|
|
1238
1238
|
"a",
|
|
@@ -1387,7 +1387,13 @@ function FormFieldInput({
|
|
|
1387
1387
|
getOpts().map((opt) => /* @__PURE__ */ jsx2("option", { value: opt.value, children: opt.label }, opt.value))
|
|
1388
1388
|
] });
|
|
1389
1389
|
} else if (field.type === "radio") {
|
|
1390
|
-
fieldEl = /* @__PURE__ */ jsx2("div", { style: {
|
|
1390
|
+
fieldEl = /* @__PURE__ */ jsx2("div", { style: {
|
|
1391
|
+
...inputStyle,
|
|
1392
|
+
display: "flex",
|
|
1393
|
+
flexDirection: "column",
|
|
1394
|
+
gap: "0.5rem",
|
|
1395
|
+
width: "100%"
|
|
1396
|
+
}, children: getOpts().map((opt) => /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "center", gap: "0.5rem", cursor: "pointer" }, children: [
|
|
1391
1397
|
/* @__PURE__ */ jsx2(
|
|
1392
1398
|
"input",
|
|
1393
1399
|
{
|
|
@@ -1396,14 +1402,20 @@ function FormFieldInput({
|
|
|
1396
1402
|
value: opt.value,
|
|
1397
1403
|
checked: value === opt.value,
|
|
1398
1404
|
onChange: () => onValueChange(field.name, opt.value),
|
|
1399
|
-
style: { accentColor: styling.primaryColor }
|
|
1405
|
+
style: { accentColor: styling.primaryColor, backgroundColor: "transparent" }
|
|
1400
1406
|
}
|
|
1401
1407
|
),
|
|
1402
1408
|
opt.label
|
|
1403
1409
|
] }, opt.value)) });
|
|
1404
1410
|
} else if (field.type === "multiselect") {
|
|
1405
1411
|
const selected = Array.isArray(value) ? value : [];
|
|
1406
|
-
fieldEl = /* @__PURE__ */ jsx2("div", { style: {
|
|
1412
|
+
fieldEl = /* @__PURE__ */ jsx2("div", { style: {
|
|
1413
|
+
...inputStyle,
|
|
1414
|
+
display: "flex",
|
|
1415
|
+
flexDirection: "column",
|
|
1416
|
+
gap: "0.5rem",
|
|
1417
|
+
width: "100%"
|
|
1418
|
+
}, children: getOpts().map((opt) => /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "center", gap: "0.5rem", cursor: "pointer" }, children: [
|
|
1407
1419
|
/* @__PURE__ */ jsx2(
|
|
1408
1420
|
"input",
|
|
1409
1421
|
{
|
|
@@ -1413,7 +1425,7 @@ function FormFieldInput({
|
|
|
1413
1425
|
const next = selected.includes(opt.value) ? selected.filter((v) => v !== opt.value) : [...selected, opt.value];
|
|
1414
1426
|
onValueChange(field.name, next);
|
|
1415
1427
|
},
|
|
1416
|
-
style: { accentColor: styling.primaryColor }
|
|
1428
|
+
style: { accentColor: styling.primaryColor, backgroundColor: "transparent" }
|
|
1417
1429
|
}
|
|
1418
1430
|
),
|
|
1419
1431
|
opt.label
|
|
@@ -1518,7 +1530,7 @@ function FormFieldInput({
|
|
|
1518
1530
|
} else if (field.type === "file") {
|
|
1519
1531
|
const fileValue = value;
|
|
1520
1532
|
const formatSize = (size) => size < 1024 ? `${size} B` : size < 1048576 ? `${(size / 1024).toFixed(1)} KB` : `${(size / 1048576).toFixed(1)} MB`;
|
|
1521
|
-
const borderColor = error ? styling.errorColor || "#ef4444" : styling.theme === "dark" ? "#4b5563" : "#d1d5db";
|
|
1533
|
+
const borderColor = error ? styling.errorColor || "#ef4444" : styling.fieldBorderColor || (styling.theme === "dark" ? "#4b5563" : "#d1d5db");
|
|
1522
1534
|
const mutedColor = styling.theme === "dark" ? "#9ca3af" : "#6b7280";
|
|
1523
1535
|
fieldEl = /* @__PURE__ */ jsxs(
|
|
1524
1536
|
"label",
|