@pagenflow/email 1.1.6 → 1.1.7

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.cjs.js CHANGED
@@ -17332,26 +17332,6 @@ const justifyMap$2 = {
17332
17332
  function Button({ config, devMode }) {
17333
17333
  const { href, children, backgroundColor = "#007bff", // Default blue
17334
17334
  color = "#ffffff", padding = "12px 24px", borderRadius = "3px", width, justifyContent = "center", } = config;
17335
- // 1. Link (A) Tag Styles (Fallback for Webmail/Mobile)
17336
- const linkStyle = {
17337
- color: color,
17338
- textDecoration: "none",
17339
- display: "block",
17340
- // Apply padding here for simplicity, though the TD is more reliable
17341
- padding: padding,
17342
- wordBreak: "break-word",
17343
- fontFamily: "Arial, sans-serif",
17344
- fontSize: "16px",
17345
- fontWeight: "bold",
17346
- lineHeight: "1.2",
17347
- };
17348
- // 2. Button Wrapper TD Style
17349
- const buttonTdStyle = {
17350
- backgroundColor: backgroundColor,
17351
- borderRadius: borderRadius,
17352
- padding: "0",
17353
- width: width || "auto",
17354
- };
17355
17335
  // --- VML Calculation and Code for Outlook Compatibility ---
17356
17336
  // VML needs fixed pixel height. We estimate it based on padding.
17357
17337
  const numericPadding = parseInt(padding.split(" ")[0] || "12", 10);
@@ -17386,16 +17366,24 @@ function Button({ config, devMode }) {
17386
17366
  border: "0 solid",
17387
17367
  margin: 0,
17388
17368
  padding: 0,
17389
- }, children: jsxRuntime.jsx("tbody", { children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsxs("td", { children: [jsxRuntime.jsx("div", { dangerouslySetInnerHTML: { __html: vmlButton } }), jsxRuntime.jsx("div", { dangerouslySetInnerHTML: { __html: `<!--[if !mso]><!-->` } }), jsxRuntime.jsx("table", { role: "presentation", cellPadding: 0, cellSpacing: 0, border: 0, style: {
17390
- borderCollapse: "collapse",
17391
- width: "100%",
17392
- }, children: jsxRuntime.jsx("tbody", { children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { style: buttonTdStyle, children: React.createElement(devMode ? "button" : "a", Object.assign(Object.assign({}, (devMode
17393
- ? {}
17394
- : {
17395
- href,
17396
- target: "_blank",
17397
- rel: "noopener noreferrer",
17398
- })), { style: linkStyle, draggable: false }), children) }) }) }) }), jsxRuntime.jsx("div", { dangerouslySetInnerHTML: { __html: `<!--<![endif]-->` } })] }) }) }) }));
17369
+ }, children: jsxRuntime.jsx("tbody", { children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { dangerouslySetInnerHTML: {
17370
+ __html: `
17371
+ ${vmlButton}
17372
+ <!--[if !mso]><!-->
17373
+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse; width: 100%;">
17374
+ <tbody>
17375
+ <tr>
17376
+ <td style="background-color: ${backgroundColor}; border-radius: ${borderRadius}; padding: 0; width: ${width || "auto"};">
17377
+ <a href="${href}" target="_blank" rel="noopener noreferrer" style="color: ${color}; text-decoration: none; display: block; padding: ${padding}; word-break: break-word; font-family: Arial, sans-serif; font-size: 16px; font-weight: bold; line-height: 1.2;">
17378
+ ${typeof children === "string" ? children : ""}
17379
+ </a>
17380
+ </td>
17381
+ </tr>
17382
+ </tbody>
17383
+ </table>
17384
+ <!--<![endif]-->
17385
+ `,
17386
+ } }) }) }) }));
17399
17387
  }
17400
17388
  var Button_default = React.memo(Button, arePropsEqual);
17401
17389