cf-elements 1.0.7 → 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.
Files changed (2) hide show
  1. package/cf-elements.js +13 -1
  2. 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}"`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cf-elements",
3
- "version": "1.0.7",
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/barnumpt/cf-elements.git"
25
+ "url": "git+https://github.com/PrimeMoverHQ/BarnumPT-Builder.git"
26
26
  },
27
- "homepage": "https://barnumpt.app/docs/funnelwind",
27
+ "homepage": "https://github.com/PrimeMoverHQ/BarnumPT-Builder",
28
28
  "bugs": {
29
- "url": "https://github.com/barnumpt/cf-elements/issues"
29
+ "url": "https://github.com/PrimeMoverHQ/BarnumPT-Builder/issues"
30
30
  }
31
31
  }