@unlev/exeq 0.1.10 → 0.1.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/index.mjs CHANGED
@@ -1242,6 +1242,7 @@ function FieldNavigator({
1242
1242
  if (f.type === "checkbox") return true;
1243
1243
  return !!f.value;
1244
1244
  }).length;
1245
+ const showCompleteAsNext = !hasNext && allRequiredFilled;
1245
1246
  return /* @__PURE__ */ jsxs5("div", { className: "field-navigator", children: [
1246
1247
  /* @__PURE__ */ jsxs5("div", { className: "field-navigator-progress", children: [
1247
1248
  filledCount,
@@ -1260,7 +1261,14 @@ function FieldNavigator({
1260
1261
  }
1261
1262
  ),
1262
1263
  /* @__PURE__ */ jsx5("span", { className: "field-navigator-position", children: currentIndex >= 0 ? `${currentIndex + 1} / ${fields.length}` : "-" }),
1263
- /* @__PURE__ */ jsx5(
1264
+ showCompleteAsNext ? /* @__PURE__ */ jsx5(
1265
+ "button",
1266
+ {
1267
+ onClick: onComplete,
1268
+ className: "nav-btn nav-btn-complete",
1269
+ children: completeLabel
1270
+ }
1271
+ ) : /* @__PURE__ */ jsx5(
1264
1272
  "button",
1265
1273
  {
1266
1274
  onClick: handleNext,
@@ -1269,21 +1277,12 @@ function FieldNavigator({
1269
1277
  children: "Next"
1270
1278
  }
1271
1279
  )
1272
- ] }),
1273
- /* @__PURE__ */ jsx5(
1274
- "button",
1275
- {
1276
- onClick: onComplete,
1277
- disabled: !allRequiredFilled,
1278
- className: "complete-btn",
1279
- children: completeLabel
1280
- }
1281
- )
1280
+ ] })
1282
1281
  ] });
1283
1282
  }
1284
1283
 
1285
1284
  // src/components/pdf-builder/SignerView.tsx
1286
- import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1285
+ import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1287
1286
  function SignerView({
1288
1287
  apiKey,
1289
1288
  initialPdfUrl,
@@ -1419,6 +1418,9 @@ function SignerView({
1419
1418
  const handleFieldUpdate = useCallback4((id, value) => {
1420
1419
  setFields((prev) => prev.map((f) => f.id === id ? { ...f, value } : f));
1421
1420
  }, []);
1421
+ const handleFieldPropertyUpdate = useCallback4((id, updates) => {
1422
+ setFields((prev) => prev.map((f) => f.id === id ? { ...f, ...updates } : f));
1423
+ }, []);
1422
1424
  const handleNavigate = useCallback4((fieldId) => {
1423
1425
  setSelectedFieldId(fieldId);
1424
1426
  const field = fields.find((f) => f.id === fieldId);
@@ -1569,16 +1571,32 @@ function SignerView({
1569
1571
  initialValue: selectedField.value
1570
1572
  }
1571
1573
  ),
1572
- selectedField.type === "text" && /* @__PURE__ */ jsx6(
1573
- "input",
1574
- {
1575
- type: selectedField.textSubtype === "email" ? "email" : selectedField.textSubtype === "number" ? "number" : selectedField.textSubtype === "phone" ? "tel" : selectedField.textSubtype === "date" ? "date" : "text",
1576
- value: selectedField.value,
1577
- onChange: (e) => handleFieldUpdate(selectedField.id, e.target.value),
1578
- placeholder: selectedField.placeholder,
1579
- className: "signer-text-input"
1580
- }
1581
- ),
1574
+ selectedField.type === "text" && /* @__PURE__ */ jsxs6(Fragment2, { children: [
1575
+ /* @__PURE__ */ jsx6(
1576
+ "input",
1577
+ {
1578
+ type: selectedField.textSubtype === "email" ? "email" : selectedField.textSubtype === "number" ? "number" : selectedField.textSubtype === "phone" ? "tel" : selectedField.textSubtype === "date" ? "date" : "text",
1579
+ value: selectedField.value,
1580
+ onChange: (e) => handleFieldUpdate(selectedField.id, e.target.value),
1581
+ placeholder: selectedField.placeholder,
1582
+ className: "signer-text-input"
1583
+ }
1584
+ ),
1585
+ /* @__PURE__ */ jsxs6("div", { className: "signer-font-size", children: [
1586
+ /* @__PURE__ */ jsx6("label", { children: "Font Size" }),
1587
+ /* @__PURE__ */ jsx6(
1588
+ "input",
1589
+ {
1590
+ type: "number",
1591
+ min: "6",
1592
+ max: "72",
1593
+ value: selectedField.fontSize,
1594
+ onChange: (e) => handleFieldPropertyUpdate(selectedField.id, { fontSize: Number(e.target.value) })
1595
+ }
1596
+ ),
1597
+ /* @__PURE__ */ jsx6("span", { children: "pt" })
1598
+ ] })
1599
+ ] }),
1582
1600
  selectedField.type === "checkbox" && /* @__PURE__ */ jsxs6("label", { className: "signer-checkbox-label", children: [
1583
1601
  /* @__PURE__ */ jsx6(
1584
1602
  "input",