@charisol/plexo-sdk 1.0.29 → 1.0.31

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.
@@ -931,7 +931,9 @@ var p = (e = {}) => !e || typeof e != "object" ? "" : Object.entries(e).filter((
931
931
  "buttonPaddingLeft",
932
932
  "buttonPaddingRight",
933
933
  "buttonFontSize",
934
- "buttonFontWeight"
934
+ "buttonFontWeight",
935
+ "buttonWidth",
936
+ "buttonAlign"
935
937
  ], v = (e) => {
936
938
  if (!e || typeof e != "object") return "";
937
939
  let t = e.kind || "text", n = h(e.name || e.label || "field"), r = e.required ? " required" : "", i = p({
@@ -956,7 +958,13 @@ var p = (e = {}) => !e || typeof e != "object" ? "" : Object.entries(e).filter((
956
958
  case "heading": return `<h2 style="margin-top: 0; margin-bottom: 8px; ${n}">${r.text || "Heading"}</h2>`;
957
959
  case "paragraph": return `<p style="margin-top: 0; margin-bottom: 12px; ${n}">${r.text || "Paragraph text content."}</p>`;
958
960
  case "text": return `<div style="${n}">${r.text || ""}</div>`;
959
- case "button": return `<div style="text-align: ${t.textAlign || "center"};"><a href="${r.href || "#"}" target="${r.openInNewTab ? "_blank" : "_self"}" style="display: inline-block; text-decoration: none; ${n}">${r.text || "Button"}</a></div>`;
961
+ case "button": {
962
+ let e = r.autoWidth === !1 ? t.width || "100%" : "auto", n = p({
963
+ ...t,
964
+ width: e
965
+ });
966
+ return `<div style="text-align: ${t.textAlign || "center"};"><a href="${r.href || "#"}" target="${r.openInNewTab ? "_blank" : "_self"}" style="display: inline-block; text-decoration: none; ${n}">${r.text || "Button"}</a></div>`;
967
+ }
960
968
  case "image": {
961
969
  let e = t.textAlign === "center" ? "margin: 0 auto; display: block;" : t.textAlign === "right" ? "margin-left: auto; display: block;" : "display: inline-block;";
962
970
  return `<img src="${r.src || "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe"}" alt="${r.alt || ""}" style="${n} ${e}" />`;
@@ -973,7 +981,7 @@ var p = (e = {}) => !e || typeof e != "object" ? "" : Object.entries(e).filter((
973
981
  ...t
974
982
  }, n = {};
975
983
  for (let t of Object.keys(e)) _.includes(t) || (n[t] = e[t]);
976
- let i = p(n), a = Array.isArray(r.fields) ? r.fields : [], o = e.fieldSpacing || "12px", s = a.map((e) => `<div style="margin-bottom: ${o};">${v(e)}</div>`).join(""), c = p({
984
+ let i = p(n), a = Array.isArray(r.fields) ? r.fields : [], o = e.fieldSpacing || "12px", s = a.map((e) => `<div style="margin-bottom: ${o};">${v(e)}</div>`).join(""), c = r.buttonAutoWidth === !1 ? e.buttonWidth || "100%" : "auto", l = e.buttonAlign === "left" ? "flex-start" : e.buttonAlign === "right" ? "flex-end" : "center", u = p({
977
985
  backgroundColor: e.buttonBackgroundColor,
978
986
  color: e.buttonTextColor,
979
987
  borderRadius: e.buttonBorderRadius,
@@ -982,9 +990,10 @@ var p = (e = {}) => !e || typeof e != "object" ? "" : Object.entries(e).filter((
982
990
  paddingLeft: e.buttonPaddingLeft,
983
991
  paddingRight: e.buttonPaddingRight,
984
992
  fontSize: e.buttonFontSize,
985
- fontWeight: e.buttonFontWeight
993
+ fontWeight: e.buttonFontWeight,
994
+ width: c
986
995
  });
987
- return `<form action="${h(r.actionUrl || r.action || "#")}" method="${h(r.method || "POST")}" style="${i}">${s}<button type="submit" style="border: 0; cursor: pointer; ${c}">${r.submitLabel || "Submit"}</button></form>`;
996
+ return `<form action="${h(r.actionUrl || r.action || "#")}" method="${h(r.method || "POST")}" style="${i}">${s}<div style="display: flex; width: 100%; justify-content: ${l};"><button type="submit" style="border: 0; cursor: pointer; ${u}">${r.submitLabel || "Submit"}</button></div></form>`;
988
997
  }
989
998
  case "input": {
990
999
  let e = r.inputType || r.type || "text", t = h(r.name || r.fieldName || "field"), i = h(r.placeholder || ""), a = r.required ? " required" : "";
package/dist/compiler.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, o as r, r as i, t as a } from "./compiler-Bn4rYU81.js";
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./compiler-0uSlsR6R.js";
2
2
  export { a as DEFAULT_BODY_FONT_FAMILY, n as compileToHTML, i as compileToHTMLWithStrataAuto, t as compileToPlainText, e as convertSectionRowToPlexoRow, r as injectStrataBundle };
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import type { BoxShadowControlsProps } from '../../utilities/playground.interfaces';
3
+ export interface ParsedBoxShadow {
4
+ offsetX: number;
5
+ offsetY: number;
6
+ blur: number;
7
+ spread: number;
8
+ color: string;
9
+ }
10
+ export declare const DEFAULT_BOX_SHADOW: ParsedBoxShadow;
11
+ export declare const parseBoxShadow: (value?: string) => ParsedBoxShadow;
12
+ export declare const serializeBoxShadow: (v: ParsedBoxShadow) => string;
13
+ export declare const BoxShadowControls: React.FC<BoxShadowControlsProps>;
@@ -7,6 +7,7 @@ export { InlineTextInput } from './InlineTextInput';
7
7
  export { InlineTextArea } from './InlineTextArea';
8
8
  export { Toggle } from './Toggle';
9
9
  export { BorderRadiusControls } from './BorderRadiusControls';
10
+ export { BoxShadowControls } from './BoxShadowControls';
10
11
  export { AccordionSection } from './AccordionSection';
11
12
  export { ColumnsSelector } from './ColumnsSelector';
12
13
  export { SpacingControls } from './SpacingControls';
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const CardPropertiesAccordion: React.FC<any>;