@josephomills/esign 0.9.3 → 0.9.5

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/ui/index.cjs CHANGED
@@ -589,6 +589,7 @@ function FieldDesigner({
589
589
  {
590
590
  ref: stageRef,
591
591
  onPointerDown: (e) => {
592
+ setSelectedId(null);
592
593
  if (drawMode || e.pointerType === "mouse") setDrag({ mode: "new", start: rel(e) });
593
594
  },
594
595
  onPointerMove,
@@ -825,75 +826,92 @@ function FieldDesigner({
825
826
  ] }),
826
827
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
827
828
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, fontWeight: 600, marginBottom: 4 }, children: "Earliest date" }),
828
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
829
- /* @__PURE__ */ jsxRuntime.jsxs(
830
- "div",
831
- {
832
- style: {
833
- display: "inline-flex",
834
- alignItems: "center",
835
- border: "1px solid #d1d5db",
836
- borderRadius: 6,
837
- background: "#fff"
838
- },
839
- children: [
840
- /* @__PURE__ */ jsxRuntime.jsx(
841
- "input",
842
- {
843
- ref: minDateRef,
844
- type: "date",
845
- value: configField.minDate ?? "",
846
- onChange: (e) => setConfig(configField.id, { minDate: e.target.value || null }),
847
- style: {
848
- border: "none",
849
- outline: "none",
850
- background: "transparent",
851
- padding: "5px 8px",
852
- fontSize: 13,
853
- appearance: "none",
854
- WebkitAppearance: "none"
855
- }
856
- }
857
- ),
858
- /* @__PURE__ */ jsxRuntime.jsx(
859
- "button",
860
- {
861
- type: "button",
862
- "aria-label": "Open calendar",
863
- onClick: () => minDateRef.current?.showPicker?.(),
864
- style: {
865
- border: "none",
866
- background: "transparent",
867
- cursor: "pointer",
868
- fontSize: 14,
869
- lineHeight: 1,
870
- padding: "4px 8px 4px 2px"
871
- },
872
- children: "\u{1F4C5}"
829
+ /* @__PURE__ */ jsxRuntime.jsxs(
830
+ "div",
831
+ {
832
+ style: {
833
+ display: "inline-flex",
834
+ alignItems: "center",
835
+ border: "1px solid #d1d5db",
836
+ borderRadius: 6,
837
+ background: "#fff"
838
+ },
839
+ children: [
840
+ /* @__PURE__ */ jsxRuntime.jsx(
841
+ "input",
842
+ {
843
+ ref: minDateRef,
844
+ type: "date",
845
+ value: configField.minDate ?? "",
846
+ onChange: (e) => setConfig(configField.id, { minDate: e.target.value || null }),
847
+ style: {
848
+ border: "none",
849
+ outline: "none",
850
+ background: "transparent",
851
+ padding: "5px 4px 5px 8px",
852
+ fontSize: 13,
853
+ appearance: "none",
854
+ WebkitAppearance: "none"
873
855
  }
874
- )
875
- ]
876
- }
877
- ),
878
- configField.minDate ? /* @__PURE__ */ jsxRuntime.jsx(
879
- "button",
880
- {
881
- type: "button",
882
- onClick: () => setConfig(configField.id, { minDate: null }),
883
- style: {
884
- padding: "5px 8px",
885
- borderRadius: 6,
886
- border: "1px solid #d1d5db",
887
- background: "#fff",
888
- color: "#6b7280",
889
- cursor: "pointer",
890
- fontSize: 12
891
- },
892
- children: "Clear"
893
- }
894
- ) : null
895
- ] }),
896
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#9ca3af", fontSize: 11 }, children: "Leave blank to use the document's creation date." })
856
+ }
857
+ ),
858
+ configField.minDate ? /* @__PURE__ */ jsxRuntime.jsx(
859
+ "button",
860
+ {
861
+ type: "button",
862
+ "aria-label": "Clear earliest date",
863
+ onClick: () => setConfig(configField.id, { minDate: null }),
864
+ style: {
865
+ border: "none",
866
+ background: "transparent",
867
+ color: "#dc2626",
868
+ cursor: "pointer",
869
+ fontSize: 16,
870
+ lineHeight: 1,
871
+ padding: "2px 4px"
872
+ },
873
+ children: "\xD7"
874
+ }
875
+ ) : null,
876
+ /* @__PURE__ */ jsxRuntime.jsx(
877
+ "button",
878
+ {
879
+ type: "button",
880
+ "aria-label": "Open calendar",
881
+ onClick: () => minDateRef.current?.showPicker?.(),
882
+ style: {
883
+ display: "inline-flex",
884
+ alignItems: "center",
885
+ border: "none",
886
+ background: "transparent",
887
+ color: "#6b7280",
888
+ cursor: "pointer",
889
+ padding: "4px 8px 4px 4px"
890
+ },
891
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
892
+ "svg",
893
+ {
894
+ width: "15",
895
+ height: "15",
896
+ viewBox: "0 0 24 24",
897
+ fill: "none",
898
+ stroke: "currentColor",
899
+ strokeWidth: "2",
900
+ strokeLinecap: "round",
901
+ strokeLinejoin: "round",
902
+ "aria-hidden": "true",
903
+ children: [
904
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "18", height: "18", x: "3", y: "4", rx: "2" }),
905
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 10h18M8 2v4M16 2v4" })
906
+ ]
907
+ }
908
+ )
909
+ }
910
+ )
911
+ ]
912
+ }
913
+ ),
914
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#9ca3af", fontSize: 11, display: "block", marginTop: 4 }, children: "Leave blank to use the document's creation date." })
897
915
  ] })
898
916
  ]
899
917
  }