@pagenflow/email 1.3.1 → 1.3.3

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.esm.js CHANGED
@@ -1954,6 +1954,35 @@ function Head({ children, backgroundColor = "#ffffff", title = "Email Preview",
1954
1954
  mso-line-height-rule: exactly;
1955
1955
  }
1956
1956
  }
1957
+
1958
+ @media only screen and (max-width: 600px) {
1959
+ /* 1. Handling Mobile Alignment (Justify) */
1960
+ /* We target the inner table alignment */
1961
+ .responsive-row[data-mobile-justify="center"] .content-table {
1962
+ margin: 0 auto !important;
1963
+ float: none !important;
1964
+ }
1965
+ .responsive-row[data-mobile-justify="start"] .content-table {
1966
+ margin: 0 !important;
1967
+ float: left !important;
1968
+ }
1969
+ .responsive-row[data-mobile-justify="end"] .content-table {
1970
+ margin: 0 0 0 auto !important;
1971
+ float: right !important;
1972
+ }
1973
+
1974
+ /* 2. Handling Mobile Vertical Alignment (Align Items) */
1975
+ /* We target the child cells if they are still side-by-side */
1976
+ .responsive-row[data-mobile-align="center"] .child-cell {
1977
+ vertical-align: middle !important;
1978
+ }
1979
+ .responsive-row[data-mobile-align="start"] .child-cell {
1980
+ vertical-align: top !important;
1981
+ }
1982
+ .responsive-row[data-mobile-align="end"] .child-cell {
1983
+ vertical-align: bottom !important;
1984
+ }
1985
+ }
1957
1986
 
1958
1987
  /* ================================================= */
1959
1988
  /* 🔒 UNIVERSAL LINK RESET */
@@ -2182,10 +2211,15 @@ function getBorderStyle$1(border) {
2182
2211
  return style;
2183
2212
  }
2184
2213
  function Row({ children, config, devNode }) {
2214
+ var _a, _b, _c, _d, _e;
2185
2215
  const childrenArray = (Array.isArray(children) ? children : [children]).filter((child) => child != null);
2186
2216
  const numChildren = childrenArray.length;
2187
2217
  // 1. Outer TD for Background and Border Radius (no border here)
2188
- const backgroundTdStyle = Object.assign({ backgroundColor: config.backgroundColor, borderRadius: config.borderRadius, width: config.width || "100%", height: config.height }, (config.borderRadius && { overflow: "hidden" }));
2218
+ const backgroundTdStyle = Object.assign({ backgroundColor: config.backgroundColor, borderRadius: config.borderRadius, width: config.width || "100%", height: config.height,
2219
+ // Background Image styles
2220
+ backgroundImage: config.backgroundImage
2221
+ ? `url(${config.backgroundImage.src})`
2222
+ : undefined, backgroundRepeat: (_a = config.backgroundImage) === null || _a === void 0 ? void 0 : _a.repeat, backgroundSize: (_b = config.backgroundImage) === null || _b === void 0 ? void 0 : _b.size, backgroundPosition: (_c = config.backgroundImage) === null || _c === void 0 ? void 0 : _c.position }, (config.borderRadius && { overflow: "hidden" }));
2189
2223
  // 2. Inner Table for Border and Border Radius
2190
2224
  const borderTableStyle = Object.assign({ width: "100%", height: "100%", borderCollapse: "separate", borderSpacing: 0, borderRadius: config.borderRadius }, getBorderStyle$1(config.border));
2191
2225
  // 3. TD for Padding
@@ -2218,16 +2252,16 @@ function Row({ children, config, devNode }) {
2218
2252
  width: config.width || "100%",
2219
2253
  height: config.height,
2220
2254
  borderCollapse: "collapse",
2221
- } }, (config.height && { height: config.height }), { children: [jsx("tbody", { children: jsx("tr", { children: jsx("td", Object.assign({ style: backgroundTdStyle }, (config.height && { height: config.height }), { children: jsx("table", { "aria-label": "Row Border Wrapper", role: "presentation", cellPadding: 0, cellSpacing: 0, border: 0, style: borderTableStyle, children: jsx("tbody", { children: jsx("tr", { children: jsx("td", { style: paddingTdStyle, children: jsx("table", { "aria-label": "Row Justification Wrapper", role: "presentation", cellPadding: 0, cellSpacing: 0, border: 0, style: {
2255
+ } }, (config.height && { height: config.height }), { "data-mobile-justify": (_d = config.mobile) === null || _d === void 0 ? void 0 : _d.justifyContent, "data-mobile-align": (_e = config.mobile) === null || _e === void 0 ? void 0 : _e.alignItems, className: "responsive-row", children: [jsx("tbody", { children: jsx("tr", { children: jsx("td", Object.assign({ style: backgroundTdStyle }, (config.height && { height: config.height }), { children: jsx("table", { "aria-label": "Row Border Wrapper", role: "presentation", cellPadding: 0, cellSpacing: 0, border: 0, style: borderTableStyle, children: jsx("tbody", { children: jsx("tr", { children: jsx("td", { style: paddingTdStyle, children: jsx("table", { "aria-label": "Row Justification Wrapper", role: "presentation", cellPadding: 0, cellSpacing: 0, border: 0, style: {
2222
2256
  width: "100%",
2223
2257
  height: "100%",
2224
2258
  borderCollapse: "collapse",
2225
- }, children: jsx("tbody", { children: jsx("tr", { children: jsx("td", { align: tdAlign, children: jsx("table", Object.assign({ "aria-label": "Row Content", role: "presentation", cellPadding: 0, cellSpacing: 0, border: 0, style: contentTableStyle }, (config.height && { height: config.height }), { children: jsx("tbody", { children: jsx("tr", { children: childrenArray.map((child, index) => (jsxs(Fragment, { children: [jsx("td", { valign: tdValign, style: {
2259
+ }, children: jsx("tbody", { children: jsx("tr", { children: jsx("td", { align: tdAlign, children: jsx("table", Object.assign({ "aria-label": "Row Content", role: "presentation", cellPadding: 0, cellSpacing: 0, border: 0, style: contentTableStyle }, (config.height && { height: config.height }), { className: "content-table", children: jsx("tbody", { children: jsx("tr", { className: "content-tr", children: childrenArray.map((child, index) => (jsxs(Fragment, { children: [jsx("td", { valign: tdValign, style: {
2226
2260
  verticalAlign: tdValign,
2227
2261
  textAlign: "left",
2228
2262
  padding: "0",
2229
2263
  margin: "0",
2230
- }, children: child }), index < numChildren - 1 &&
2264
+ }, className: "child-cell", children: child }), index < numChildren - 1 &&
2231
2265
  config.gap && (jsx("td", { width: config.gap, style: gapTdStyle, children: "\u00A0" }, `row-gap-${index}`))] }, `row-child-${index}`))) }) }) })) }) }) }) }) }) }) }) }) })) }) }), devNode && (jsx("tfoot", { children: jsx("tr", { children: jsx("td", { children: devNode }) }) }))] })));
2232
2266
  }
2233
2267
  var Row_default = memo(Row, arePropsEqual);