@usefillo/react 0.5.1 → 0.5.3
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/index.js +6 -5
- package/dist/styles.css +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1359,8 +1359,8 @@ function shouldAutoSubmit(field, value, api) {
|
|
|
1359
1359
|
if (!hasDiscreteAnswer) return false;
|
|
1360
1360
|
if (value === api.data[field.id]) return false;
|
|
1361
1361
|
const nextData = { ...api.data, [field.id]: value };
|
|
1362
|
-
const
|
|
1363
|
-
if (
|
|
1362
|
+
const interactive = visibleFields(api.form, nextData).filter((f) => f.kind !== "hidden");
|
|
1363
|
+
if (interactive.length !== 1 || interactive[0]?.id !== field.id) return false;
|
|
1364
1364
|
return validateResponse(api.form, nextData).ok;
|
|
1365
1365
|
}
|
|
1366
1366
|
function blockHasPiping(block) {
|
|
@@ -1491,9 +1491,10 @@ function isAutoSubmitBlock(block) {
|
|
|
1491
1491
|
return isField2(block) && (block.kind === "select" || block.kind === "dropdown" || block.kind === "checkbox" || block.kind === "rating" || block.kind === "linear_scale");
|
|
1492
1492
|
}
|
|
1493
1493
|
function needsExplicitSubmit(visible) {
|
|
1494
|
-
|
|
1495
|
-
if (
|
|
1496
|
-
|
|
1494
|
+
const interactive = visible.filter((b) => !(isField2(b) && b.kind === "hidden"));
|
|
1495
|
+
if (interactive.length === 0) return false;
|
|
1496
|
+
if (interactive.length > 1) return true;
|
|
1497
|
+
return !isAutoSubmitBlock(interactive[0]);
|
|
1497
1498
|
}
|
|
1498
1499
|
function FilloForm(props) {
|
|
1499
1500
|
const { form, formId } = props;
|
package/dist/styles.css
CHANGED
|
@@ -586,17 +586,17 @@
|
|
|
586
586
|
}
|
|
587
587
|
|
|
588
588
|
/* ---------- Success ---------- */
|
|
589
|
-
.fillo-success { display: flex; flex-direction: column; align-items: center; gap: 0.
|
|
589
|
+
.fillo-success { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; text-align: center; padding: 1.4rem 1rem; }
|
|
590
590
|
.fillo-success-mark {
|
|
591
|
-
width:
|
|
591
|
+
width: 2rem; height: 2rem;
|
|
592
592
|
display: grid; place-items: center;
|
|
593
593
|
border-radius: 999px;
|
|
594
594
|
background: color-mix(in srgb, var(--fillo-primary) 10%, transparent);
|
|
595
595
|
color: var(--fillo-primary);
|
|
596
|
-
font-size:
|
|
596
|
+
font-size: 0.95rem; font-weight: 700;
|
|
597
597
|
}
|
|
598
|
-
.fillo-success-title { margin: 0; font-size: 1.
|
|
599
|
-
.fillo-success-message { margin: 0; color: var(--fillo-muted); }
|
|
598
|
+
.fillo-success-title { margin: 0; font-size: 1.05rem; letter-spacing: 0; }
|
|
599
|
+
.fillo-success-message { margin: 0; font-size: 0.875rem; color: var(--fillo-muted); }
|
|
600
600
|
|
|
601
601
|
/* Honeypot — off-screen, never display:none (bots check that) */
|
|
602
602
|
.fillo-hp {
|