@pagenflow/email 1.3.2 → 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/components/Row.d.ts +4 -0
- package/dist/index.cjs.js +33 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +33 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/components/Row.d.ts
CHANGED
|
@@ -17,6 +17,10 @@ export interface RowConfig {
|
|
|
17
17
|
backgroundImage?: BackgroundImageType;
|
|
18
18
|
borderRadius?: string;
|
|
19
19
|
border?: BorderConfig;
|
|
20
|
+
mobile?: {
|
|
21
|
+
justifyContent?: JustifyContent;
|
|
22
|
+
alignItems?: AlignItems;
|
|
23
|
+
};
|
|
20
24
|
}
|
|
21
25
|
export type RowProps = {
|
|
22
26
|
children: ReactNode;
|
package/dist/index.cjs.js
CHANGED
|
@@ -1956,6 +1956,35 @@ function Head({ children, backgroundColor = "#ffffff", title = "Email Preview",
|
|
|
1956
1956
|
mso-line-height-rule: exactly;
|
|
1957
1957
|
}
|
|
1958
1958
|
}
|
|
1959
|
+
|
|
1960
|
+
@media only screen and (max-width: 600px) {
|
|
1961
|
+
/* 1. Handling Mobile Alignment (Justify) */
|
|
1962
|
+
/* We target the inner table alignment */
|
|
1963
|
+
.responsive-row[data-mobile-justify="center"] .content-table {
|
|
1964
|
+
margin: 0 auto !important;
|
|
1965
|
+
float: none !important;
|
|
1966
|
+
}
|
|
1967
|
+
.responsive-row[data-mobile-justify="start"] .content-table {
|
|
1968
|
+
margin: 0 !important;
|
|
1969
|
+
float: left !important;
|
|
1970
|
+
}
|
|
1971
|
+
.responsive-row[data-mobile-justify="end"] .content-table {
|
|
1972
|
+
margin: 0 0 0 auto !important;
|
|
1973
|
+
float: right !important;
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
/* 2. Handling Mobile Vertical Alignment (Align Items) */
|
|
1977
|
+
/* We target the child cells if they are still side-by-side */
|
|
1978
|
+
.responsive-row[data-mobile-align="center"] .child-cell {
|
|
1979
|
+
vertical-align: middle !important;
|
|
1980
|
+
}
|
|
1981
|
+
.responsive-row[data-mobile-align="start"] .child-cell {
|
|
1982
|
+
vertical-align: top !important;
|
|
1983
|
+
}
|
|
1984
|
+
.responsive-row[data-mobile-align="end"] .child-cell {
|
|
1985
|
+
vertical-align: bottom !important;
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1959
1988
|
|
|
1960
1989
|
/* ================================================= */
|
|
1961
1990
|
/* 🔒 UNIVERSAL LINK RESET */
|
|
@@ -2184,7 +2213,7 @@ function getBorderStyle$1(border) {
|
|
|
2184
2213
|
return style;
|
|
2185
2214
|
}
|
|
2186
2215
|
function Row({ children, config, devNode }) {
|
|
2187
|
-
var _a, _b, _c;
|
|
2216
|
+
var _a, _b, _c, _d, _e;
|
|
2188
2217
|
const childrenArray = (Array.isArray(children) ? children : [children]).filter((child) => child != null);
|
|
2189
2218
|
const numChildren = childrenArray.length;
|
|
2190
2219
|
// 1. Outer TD for Background and Border Radius (no border here)
|
|
@@ -2225,16 +2254,16 @@ function Row({ children, config, devNode }) {
|
|
|
2225
2254
|
width: config.width || "100%",
|
|
2226
2255
|
height: config.height,
|
|
2227
2256
|
borderCollapse: "collapse",
|
|
2228
|
-
} }, (config.height && { height: config.height }), { children: [jsxRuntime.jsx("tbody", { children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", Object.assign({ style: backgroundTdStyle }, (config.height && { height: config.height }), { children: jsxRuntime.jsx("table", { "aria-label": "Row Border Wrapper", role: "presentation", cellPadding: 0, cellSpacing: 0, border: 0, style: borderTableStyle, children: jsxRuntime.jsx("tbody", { children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { style: paddingTdStyle, children: jsxRuntime.jsx("table", { "aria-label": "Row Justification Wrapper", role: "presentation", cellPadding: 0, cellSpacing: 0, border: 0, style: {
|
|
2257
|
+
} }, (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: [jsxRuntime.jsx("tbody", { children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", Object.assign({ style: backgroundTdStyle }, (config.height && { height: config.height }), { children: jsxRuntime.jsx("table", { "aria-label": "Row Border Wrapper", role: "presentation", cellPadding: 0, cellSpacing: 0, border: 0, style: borderTableStyle, children: jsxRuntime.jsx("tbody", { children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { style: paddingTdStyle, children: jsxRuntime.jsx("table", { "aria-label": "Row Justification Wrapper", role: "presentation", cellPadding: 0, cellSpacing: 0, border: 0, style: {
|
|
2229
2258
|
width: "100%",
|
|
2230
2259
|
height: "100%",
|
|
2231
2260
|
borderCollapse: "collapse",
|
|
2232
|
-
}, children: jsxRuntime.jsx("tbody", { children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { align: tdAlign, children: jsxRuntime.jsx("table", Object.assign({ "aria-label": "Row Content", role: "presentation", cellPadding: 0, cellSpacing: 0, border: 0, style: contentTableStyle }, (config.height && { height: config.height }), { children: jsxRuntime.jsx("tbody", { children: jsxRuntime.jsx("tr", { children: childrenArray.map((child, index) => (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx("td", { valign: tdValign, style: {
|
|
2261
|
+
}, children: jsxRuntime.jsx("tbody", { children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { align: tdAlign, children: jsxRuntime.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: jsxRuntime.jsx("tbody", { children: jsxRuntime.jsx("tr", { className: "content-tr", children: childrenArray.map((child, index) => (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx("td", { valign: tdValign, style: {
|
|
2233
2262
|
verticalAlign: tdValign,
|
|
2234
2263
|
textAlign: "left",
|
|
2235
2264
|
padding: "0",
|
|
2236
2265
|
margin: "0",
|
|
2237
|
-
}, children: child }), index < numChildren - 1 &&
|
|
2266
|
+
}, className: "child-cell", children: child }), index < numChildren - 1 &&
|
|
2238
2267
|
config.gap && (jsxRuntime.jsx("td", { width: config.gap, style: gapTdStyle, children: "\u00A0" }, `row-gap-${index}`))] }, `row-child-${index}`))) }) }) })) }) }) }) }) }) }) }) }) })) }) }), devNode && (jsxRuntime.jsx("tfoot", { children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { children: devNode }) }) }))] })));
|
|
2239
2268
|
}
|
|
2240
2269
|
var Row_default = React.memo(Row, arePropsEqual);
|