@forms.expert/sdk 0.4.8 → 0.4.9

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.
@@ -111,7 +111,7 @@ interface FormStyling {
111
111
  buttonFontSize?: number;
112
112
  buttonIcon?: string;
113
113
  buttonIconPosition?: 'left' | 'right';
114
- fieldSpacing?: 'compact' | 'normal' | 'relaxed' | 'spacious';
114
+ fieldSpacing?: 'none' | 'compact' | 'normal' | 'relaxed' | 'spacious';
115
115
  formPadding?: 'none' | 'compact' | 'normal' | 'relaxed' | 'spacious';
116
116
  labelSpacing?: 'compact' | 'normal' | 'relaxed';
117
117
  placeholderFontSize?: 'small' | 'medium' | 'large';
@@ -111,7 +111,7 @@ interface FormStyling {
111
111
  buttonFontSize?: number;
112
112
  buttonIcon?: string;
113
113
  buttonIconPosition?: 'left' | 'right';
114
- fieldSpacing?: 'compact' | 'normal' | 'relaxed' | 'spacious';
114
+ fieldSpacing?: 'none' | 'compact' | 'normal' | 'relaxed' | 'spacious';
115
115
  formPadding?: 'none' | 'compact' | 'normal' | 'relaxed' | 'spacious';
116
116
  labelSpacing?: 'compact' | 'normal' | 'relaxed';
117
117
  placeholderFontSize?: 'small' | 'medium' | 'large';
@@ -657,6 +657,8 @@ function getPlaceholderFontSize(size) {
657
657
  }
658
658
  function getFieldSpacing(spacing) {
659
659
  switch (spacing) {
660
+ case "none":
661
+ return "0";
660
662
  case "compact":
661
663
  return "0.5rem";
662
664
  case "relaxed":
@@ -1058,6 +1060,7 @@ function FormsExpertForm({
1058
1060
  form[data-fe-scope="${formScopeId}"] button[type="submit"]:active:not(:disabled) { filter: brightness(0.85); transform: scale(0.98); }
1059
1061
  form[data-fe-scope="${formScopeId}"] a[href]:hover { filter: brightness(0.9); }
1060
1062
  form[data-fe-scope="${formScopeId}"] a[href]:active { filter: brightness(0.85); }
1063
+ ${styling.buttonAlign === "inline" ? `form[data-fe-scope="${formScopeId}"] .fe-fields-inline > * { margin-bottom: 0 !important; }` : ""}
1061
1064
  form[data-fe-scope="${formScopeId}"] input:not([type="checkbox"]):not([type="radio"]):focus,
1062
1065
  form[data-fe-scope="${formScopeId}"] textarea:focus,
1063
1066
  form[data-fe-scope="${formScopeId}"] select:focus {
@@ -1091,8 +1094,8 @@ function FormsExpertForm({
1091
1094
  marginBottom: "0.5rem",
1092
1095
  color: styling.textColor
1093
1096
  }, children: form.config.hostedConfig?.pageTitle || form.config.name }),
1094
- /* @__PURE__ */ jsxs("div", { style: styling.buttonAlign === "inline" ? { display: "flex", alignItems: "flex-end", gap: "0.75rem", flexWrap: "wrap" } : void 0, children: [
1095
- /* @__PURE__ */ jsx2("div", { style: styling.buttonAlign === "inline" ? { flex: "1 1 0", minWidth: "180px" } : void 0, children: groupFieldsIntoRows(fields).map((group, idx) => {
1097
+ /* @__PURE__ */ jsxs("div", { style: styling.buttonAlign === "inline" ? { display: "flex", gap: "0.75rem", flexWrap: "wrap" } : void 0, children: [
1098
+ /* @__PURE__ */ jsx2("div", { className: styling.buttonAlign === "inline" ? "fe-fields-inline" : void 0, style: styling.buttonAlign === "inline" ? { flex: "1 1 0", minWidth: "180px" } : void 0, children: groupFieldsIntoRows(fields).map((group, idx) => {
1096
1099
  if (group.type === "single") {
1097
1100
  return /* @__PURE__ */ jsx2(
1098
1101
  FormFieldInput,
@@ -1165,7 +1168,7 @@ function FormsExpertForm({
1165
1168
  textOverflow: "ellipsis"
1166
1169
  } : void 0;
1167
1170
  return /* @__PURE__ */ jsxs(Fragment, { children: [
1168
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: btnAlign, marginTop: styling.buttonAlign === "inline" ? void 0 : "1rem", gap: "0.5rem", flexWrap: "wrap" }, children: [
1171
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: btnAlign, marginTop: styling.buttonAlign === "inline" ? void 0 : "1rem", gap: "0.5rem", flexWrap: "wrap", ...styling.buttonAlign === "inline" ? { alignSelf: "flex-end" } : {} }, children: [
1169
1172
  sec?.enabled && secStyle && sec.position === "left" && /* @__PURE__ */ jsxs("a", { href: sec.href || "#", target: sec.openInNewTab ? "_blank" : void 0, rel: sec.openInNewTab ? "noopener noreferrer" : void 0, style: { ...secStyle, display: "inline-flex", alignItems: "center", gap: "0.5rem" }, children: [
1170
1173
  sec.icon && sec.iconPosition !== "right" && /* @__PURE__ */ jsx2("span", { style: { display: "inline-flex", flexShrink: 0 }, dangerouslySetInnerHTML: { __html: sec.icon } }),
1171
1174
  /* @__PURE__ */ jsx2("span", { children: sec.text || "Learn More" }),