cf-elements 1.0.6 → 1.0.8
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/cf-elements.js +18 -6
- package/package.json +4 -4
package/cf-elements.js
CHANGED
|
@@ -1201,6 +1201,7 @@
|
|
|
1201
1201
|
const borderColor = attr(this, "border-color");
|
|
1202
1202
|
const show = attr(this, "show");
|
|
1203
1203
|
const brandAsset = attr(this, "brand-asset");
|
|
1204
|
+
const color = attr(this, "color");
|
|
1204
1205
|
|
|
1205
1206
|
// Video background attributes
|
|
1206
1207
|
const videoBg = attr(this, "video-bg");
|
|
@@ -1238,6 +1239,7 @@
|
|
|
1238
1239
|
"padding-right": px,
|
|
1239
1240
|
"box-sizing": "border-box",
|
|
1240
1241
|
};
|
|
1242
|
+
if (color) styles["color"] = color;
|
|
1241
1243
|
|
|
1242
1244
|
// Only apply bg if not using paint (styleguide handles paint backgrounds)
|
|
1243
1245
|
if (!paint) {
|
|
@@ -1277,6 +1279,7 @@
|
|
|
1277
1279
|
|
|
1278
1280
|
let dataAttrs = 'data-type="SectionContainer/V1"';
|
|
1279
1281
|
dataAttrs += ` data-container="${container}"`;
|
|
1282
|
+
if (color) dataAttrs += ` data-color="${color}"`;
|
|
1280
1283
|
if (show) dataAttrs += ` data-show="${show}"`;
|
|
1281
1284
|
if (bgStyleClass) dataAttrs += ` data-bg-style="${bgStyleClass}"`;
|
|
1282
1285
|
if (overlay) dataAttrs += ` data-overlay="${overlay}"`;
|
|
@@ -1383,6 +1386,7 @@
|
|
|
1383
1386
|
const borderColor = attr(this, "border-color");
|
|
1384
1387
|
const brandAsset = attr(this, "brand-asset");
|
|
1385
1388
|
const show = attr(this, "show");
|
|
1389
|
+
const color = attr(this, "color");
|
|
1386
1390
|
|
|
1387
1391
|
// If brand-asset is specified, try to get the asset URL from brand assets manager
|
|
1388
1392
|
if (brandAsset && brandAssetsManager.hasAsset(brandAsset)) {
|
|
@@ -1413,6 +1417,7 @@
|
|
|
1413
1417
|
"box-sizing": "border-box",
|
|
1414
1418
|
"margin-top": mt || "0",
|
|
1415
1419
|
};
|
|
1420
|
+
if (color) styles["color"] = color;
|
|
1416
1421
|
|
|
1417
1422
|
// Only apply bg if not using paint (styleguide handles paint backgrounds)
|
|
1418
1423
|
if (!paint) {
|
|
@@ -1457,6 +1462,7 @@
|
|
|
1457
1462
|
|
|
1458
1463
|
let dataAttrs = 'data-type="RowContainer/V1"';
|
|
1459
1464
|
dataAttrs += ` data-width="${width}"`;
|
|
1465
|
+
if (color) dataAttrs += ` data-color="${color}"`;
|
|
1460
1466
|
if (show) dataAttrs += ` data-show="${show}"`;
|
|
1461
1467
|
if (bgStyleClass) dataAttrs += ` data-bg-style="${bgStyleClass}"`;
|
|
1462
1468
|
if (overlay) dataAttrs += ` data-overlay="${overlay}"`;
|
|
@@ -1556,6 +1562,7 @@
|
|
|
1556
1562
|
const borderStyle = attr(this, "border-style", "solid");
|
|
1557
1563
|
const borderColor = attr(this, "border-color");
|
|
1558
1564
|
const brandAsset = attr(this, "brand-asset");
|
|
1565
|
+
const color = attr(this, "color");
|
|
1559
1566
|
|
|
1560
1567
|
// If brand-asset is specified, try to get the asset URL from brand assets manager
|
|
1561
1568
|
if (brandAsset && brandAssetsManager.hasAsset(brandAsset)) {
|
|
@@ -1609,6 +1616,7 @@
|
|
|
1609
1616
|
"text-align": align,
|
|
1610
1617
|
"box-sizing": "border-box",
|
|
1611
1618
|
};
|
|
1619
|
+
if (color) innerStyles["color"] = color;
|
|
1612
1620
|
|
|
1613
1621
|
if (pt) innerStyles["padding-top"] = pt;
|
|
1614
1622
|
if (pb) innerStyles["padding-bottom"] = pb;
|
|
@@ -1712,6 +1720,7 @@
|
|
|
1712
1720
|
// ID goes on ColContainer so pagetree parser captures it correctly
|
|
1713
1721
|
const idAttr = elementId ? ` id="${elementId}"` : "";
|
|
1714
1722
|
const showAttr = show ? ` data-show="${show}"` : "";
|
|
1723
|
+
const colorAttr = color ? ` data-color="${color}"` : "";
|
|
1715
1724
|
|
|
1716
1725
|
// Only render col-inner if there's styling, otherwise just wrap content
|
|
1717
1726
|
let innerHtml;
|
|
@@ -1726,7 +1735,7 @@
|
|
|
1726
1735
|
}
|
|
1727
1736
|
|
|
1728
1737
|
this.outerHTML = `
|
|
1729
|
-
<div${idAttr} data-type="ColContainer/V1" data-span="${span}" data-col-direction="${align}"${showAttr} style="${buildStyle(
|
|
1738
|
+
<div${idAttr} data-type="ColContainer/V1" data-span="${span}" data-col-direction="${align}"${showAttr}${colorAttr} style="${buildStyle(
|
|
1730
1739
|
colStyles
|
|
1731
1740
|
)}">
|
|
1732
1741
|
${innerHtml}
|
|
@@ -1903,6 +1912,7 @@
|
|
|
1903
1912
|
const width = attr(this, "width");
|
|
1904
1913
|
const height = attr(this, "height");
|
|
1905
1914
|
const show = attr(this, "show");
|
|
1915
|
+
const color = attr(this, "color");
|
|
1906
1916
|
|
|
1907
1917
|
// Check if shadow/border/corner are styleguide references
|
|
1908
1918
|
const isShadowStyleguide =
|
|
@@ -2008,12 +2018,14 @@
|
|
|
2008
2018
|
styles["border-style"] = borderStyle;
|
|
2009
2019
|
}
|
|
2010
2020
|
if (borderColor) styles["border-color"] = borderColor;
|
|
2021
|
+
if (color) styles["color"] = color;
|
|
2011
2022
|
// Only set width if explicitly provided - let flex shrink to fit content by default
|
|
2012
2023
|
if (width) styles["width"] = width;
|
|
2013
2024
|
if (height) styles["height"] = height;
|
|
2014
2025
|
|
|
2015
2026
|
// Data attributes - include all flex properties for pagetree parser
|
|
2016
2027
|
let dataAttrs = 'data-type="FlexContainer/V1"';
|
|
2028
|
+
if (color) dataAttrs += ` data-color="${color}"`;
|
|
2017
2029
|
if (show) dataAttrs += ` data-show="${show}"`;
|
|
2018
2030
|
dataAttrs += ` data-direction="${direction}"`;
|
|
2019
2031
|
dataAttrs += ` data-justify="${justify}"`;
|
|
@@ -2181,7 +2193,7 @@
|
|
|
2181
2193
|
class CFHeadline extends CFElement {
|
|
2182
2194
|
render() {
|
|
2183
2195
|
const elementId = attr(this, "element-id");
|
|
2184
|
-
const size = attr(this, "size", "48px");
|
|
2196
|
+
const size = attr(this, "font-size") || attr(this, "size", "48px");
|
|
2185
2197
|
const weight = attr(this, "weight", "bold");
|
|
2186
2198
|
const font = attr(this, "font");
|
|
2187
2199
|
const color = attr(this, "color");
|
|
@@ -2277,7 +2289,7 @@
|
|
|
2277
2289
|
class CFSubheadline extends CFElement {
|
|
2278
2290
|
render() {
|
|
2279
2291
|
const elementId = attr(this, "element-id");
|
|
2280
|
-
const size = attr(this, "size", "24px");
|
|
2292
|
+
const size = attr(this, "font-size") || attr(this, "size", "24px");
|
|
2281
2293
|
const weight = attr(this, "weight", "normal");
|
|
2282
2294
|
const font = attr(this, "font");
|
|
2283
2295
|
const color = attr(this, "color");
|
|
@@ -2371,7 +2383,7 @@
|
|
|
2371
2383
|
class CFParagraph extends CFElement {
|
|
2372
2384
|
render() {
|
|
2373
2385
|
const elementId = attr(this, "element-id");
|
|
2374
|
-
const size = attr(this, "size", "16px");
|
|
2386
|
+
const size = attr(this, "font-size") || attr(this, "size", "16px");
|
|
2375
2387
|
const weight = attr(this, "weight", "normal");
|
|
2376
2388
|
const font = attr(this, "font");
|
|
2377
2389
|
const color = attr(this, "color");
|
|
@@ -2530,7 +2542,7 @@
|
|
|
2530
2542
|
// Always read attribute values - we need them for data attributes even if using styleguide
|
|
2531
2543
|
const bg = attr(this, "bg", "#3b82f6");
|
|
2532
2544
|
const color = attr(this, "color", "#ffffff");
|
|
2533
|
-
const size = attr(this, "size", "20px");
|
|
2545
|
+
const size = attr(this, "font-size") || attr(this, "size", "20px");
|
|
2534
2546
|
const weight = attr(this, "weight", "bold");
|
|
2535
2547
|
const px = attr(this, "px", "32px");
|
|
2536
2548
|
const py = attr(this, "py", "16px");
|
|
@@ -3553,7 +3565,7 @@
|
|
|
3553
3565
|
const textColor = attr(this, "text-color"); // No default - allows paint inheritance
|
|
3554
3566
|
const hasExplicitTextColor = this.hasAttribute("text-color");
|
|
3555
3567
|
const iconSize = attr(this, "icon-size", "16px");
|
|
3556
|
-
const size = attr(this, "size", "
|
|
3568
|
+
const size = attr(this, "font-size") || attr(this, "size", "16px"); // Direct px value or preset fallback
|
|
3557
3569
|
const gap = attr(this, "gap", "12px");
|
|
3558
3570
|
const itemGap = attr(this, "item-gap", "8px");
|
|
3559
3571
|
const align = attr(this, "align", "left");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cf-elements",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Zero-dependency markup library that generates ClickFunnels compatible HTML with inline styles",
|
|
5
5
|
"main": "cf-elements.js",
|
|
6
6
|
"browser": "cf-elements.js",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
|
-
"url": "git+https://github.com/
|
|
25
|
+
"url": "git+https://github.com/PrimeMoverHQ/BarnumPT-Builder.git"
|
|
26
26
|
},
|
|
27
|
-
"homepage": "https://
|
|
27
|
+
"homepage": "https://github.com/PrimeMoverHQ/BarnumPT-Builder",
|
|
28
28
|
"bugs": {
|
|
29
|
-
"url": "https://github.com/
|
|
29
|
+
"url": "https://github.com/PrimeMoverHQ/BarnumPT-Builder/issues"
|
|
30
30
|
}
|
|
31
31
|
}
|