@delmaredigital/payload-puck 0.1.2 → 0.2.0

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.
@@ -479,25 +479,23 @@ function responsiveValueToCSS(value, converter, uniqueId) {
479
479
  mediaQueryCSS: ""
480
480
  };
481
481
  }
482
- const mediaQueries = [];
483
- let baseStyles = {};
482
+ const cssRules = [];
484
483
  BREAKPOINTS.forEach((bp) => {
485
484
  const bpValue = value[bp.key];
486
485
  if (bpValue === void 0) return;
487
486
  const cssProps = converter(bpValue);
488
487
  if (!cssProps) return;
488
+ const styleString = cssPropertiesToString(cssProps);
489
+ if (!styleString) return;
489
490
  if (bp.key === "xs") {
490
- baseStyles = cssProps;
491
+ cssRules.push(`.${uniqueId} { ${styleString} }`);
491
492
  } else {
492
- const styleString = cssPropertiesToString(cssProps);
493
- if (styleString) {
494
- mediaQueries.push(
495
- `@media (min-width: ${bp.minWidth}px) { .${uniqueId} { ${styleString} } }`
496
- );
497
- }
493
+ cssRules.push(
494
+ `@media (min-width: ${bp.minWidth}px) { .${uniqueId} { ${styleString} } }`
495
+ );
498
496
  }
499
497
  });
500
- return { baseStyles, mediaQueryCSS: mediaQueries.join("\n") };
498
+ return { baseStyles: {}, mediaQueryCSS: cssRules.join("\n") };
501
499
  }
502
500
  function visibilityValueToCSS(visibility, uniqueId) {
503
501
  if (!visibility) return "";
@@ -547,16 +545,13 @@ function generateUniqueId() {
547
545
  }
548
546
  var defaultProps = {
549
547
  content: [],
550
- background: null,
551
- customPadding: null,
548
+ visibility: null,
552
549
  dimensions: null,
550
+ background: null,
553
551
  border: null,
552
+ padding: null,
554
553
  margin: null,
555
- animation: null,
556
- innerBackground: null,
557
- innerPadding: null,
558
- innerBorder: null,
559
- visibility: null
554
+ animation: null
560
555
  };
561
556
  var ContainerConfig = {
562
557
  label: "Container",
@@ -566,84 +561,86 @@ var ContainerConfig = {
566
561
  defaultProps,
567
562
  render: ({
568
563
  content: Content,
569
- background,
570
- customPadding,
564
+ visibility,
571
565
  dimensions,
566
+ background,
572
567
  border,
568
+ padding,
573
569
  margin,
574
- animation,
575
- innerBackground,
576
- innerPadding,
577
- innerBorder,
578
- visibility
570
+ animation
579
571
  }) => {
580
572
  const uniqueId = generateUniqueId();
581
- const outerClass = `puck-container-outer-${uniqueId}`;
582
- const innerClass = `puck-container-inner-${uniqueId}`;
573
+ const containerClass = `puck-container-${uniqueId}`;
583
574
  const mediaQueries = [];
584
- const outerBackgroundStyles = backgroundValueToCSS(background);
585
- const outerStyles = {
586
- ...outerBackgroundStyles
587
- };
588
- const outerPaddingResult = responsiveValueToCSS(
589
- customPadding,
590
- (v) => ({ padding: paddingValueToCSS(v) }),
591
- outerClass
592
- );
593
- Object.assign(outerStyles, outerPaddingResult.baseStyles);
594
- if (outerPaddingResult.mediaQueryCSS) {
595
- mediaQueries.push(outerPaddingResult.mediaQueryCSS);
596
- }
597
- const outerBorderStyles = borderValueToCSS(border);
598
- if (outerBorderStyles) {
599
- Object.assign(outerStyles, outerBorderStyles);
575
+ const containerStyles = {};
576
+ const backgroundStyles = backgroundValueToCSS(background);
577
+ if (backgroundStyles) {
578
+ Object.assign(containerStyles, backgroundStyles);
600
579
  }
601
- const marginResult = responsiveValueToCSS(
602
- margin,
603
- (v) => ({ margin: marginValueToCSS(v) }),
604
- outerClass
605
- );
606
- Object.assign(outerStyles, marginResult.baseStyles);
607
- if (marginResult.mediaQueryCSS) {
608
- mediaQueries.push(marginResult.mediaQueryCSS);
580
+ const borderStyles = borderValueToCSS(border);
581
+ if (borderStyles) {
582
+ Object.assign(containerStyles, borderStyles);
609
583
  }
610
- const innerBackgroundStyles = backgroundValueToCSS(innerBackground);
611
- const innerStyles = {
612
- ...innerBackgroundStyles
613
- };
614
584
  const dimensionsResult = responsiveValueToCSS(
615
585
  dimensions,
616
586
  dimensionsValueToCSS,
617
- innerClass
587
+ containerClass
618
588
  );
619
- Object.assign(innerStyles, dimensionsResult.baseStyles);
589
+ Object.assign(containerStyles, dimensionsResult.baseStyles);
620
590
  if (dimensionsResult.mediaQueryCSS) {
621
591
  mediaQueries.push(dimensionsResult.mediaQueryCSS);
622
592
  }
623
- const innerPaddingResult = responsiveValueToCSS(
624
- innerPadding,
593
+ const hasMinHeight = (() => {
594
+ if (!dimensions) return false;
595
+ if (typeof dimensions === "object" && "xs" in dimensions) {
596
+ const responsiveDims = dimensions;
597
+ return Object.values(responsiveDims).some((v) => {
598
+ if (!v || typeof v !== "object") return false;
599
+ const dim2 = v;
600
+ return dim2.minHeight?.enabled && dim2.minHeight?.value > 0;
601
+ });
602
+ }
603
+ const dim = dimensions;
604
+ return dim.minHeight?.enabled && dim.minHeight?.value > 0;
605
+ })();
606
+ if (hasMinHeight) {
607
+ containerStyles.display = "flex";
608
+ containerStyles.flexDirection = "column";
609
+ }
610
+ const paddingResult = responsiveValueToCSS(
611
+ padding,
625
612
  (v) => ({ padding: paddingValueToCSS(v) }),
626
- innerClass
613
+ containerClass
627
614
  );
628
- Object.assign(innerStyles, innerPaddingResult.baseStyles);
629
- if (innerPaddingResult.mediaQueryCSS) {
630
- mediaQueries.push(innerPaddingResult.mediaQueryCSS);
615
+ Object.assign(containerStyles, paddingResult.baseStyles);
616
+ if (paddingResult.mediaQueryCSS) {
617
+ mediaQueries.push(paddingResult.mediaQueryCSS);
631
618
  }
632
- const innerBorderStyles = borderValueToCSS(innerBorder);
633
- if (innerBorderStyles) {
634
- Object.assign(innerStyles, innerBorderStyles);
619
+ const marginResult = responsiveValueToCSS(
620
+ margin,
621
+ (v) => ({ margin: marginValueToCSS(v) }),
622
+ containerClass
623
+ );
624
+ Object.assign(containerStyles, marginResult.baseStyles);
625
+ if (marginResult.mediaQueryCSS) {
626
+ mediaQueries.push(marginResult.mediaQueryCSS);
635
627
  }
636
- const visibilityCSS = visibilityValueToCSS(visibility, outerClass);
628
+ const visibilityCSS = visibilityValueToCSS(visibility, containerClass);
637
629
  if (visibilityCSS) {
638
630
  mediaQueries.push(visibilityCSS);
639
631
  }
640
- const contentClasses = cn("px-4", innerClass);
641
- const hasInnerStyles = Object.keys(innerStyles).length > 0;
642
632
  const allMediaQueryCSS = mediaQueries.join("\n");
633
+ const hasStyles = Object.keys(containerStyles).length > 0;
643
634
  const ContentSlot = Content;
635
+ const renderContent = () => {
636
+ if (hasMinHeight) {
637
+ return /* @__PURE__ */ jsx("div", { style: { flex: 1, display: "flex", flexDirection: "column", minHeight: 0 }, children: /* @__PURE__ */ jsx(ContentSlot, { style: { flex: 1 } }) });
638
+ }
639
+ return /* @__PURE__ */ jsx(ContentSlot, {});
640
+ };
644
641
  return /* @__PURE__ */ jsxs(AnimatedWrapper, { animation, children: [
645
642
  allMediaQueryCSS && /* @__PURE__ */ jsx("style", { children: allMediaQueryCSS }),
646
- /* @__PURE__ */ jsx("div", { className: outerClass, style: outerStyles, children: hasInnerStyles ? /* @__PURE__ */ jsx("div", { className: contentClasses, style: innerStyles, children: /* @__PURE__ */ jsx(ContentSlot, {}) }) : /* @__PURE__ */ jsx(ContentSlot, { className: contentClasses, style: innerStyles }) })
643
+ hasStyles ? /* @__PURE__ */ jsx("div", { className: containerClass, style: containerStyles, children: renderContent() }) : /* @__PURE__ */ jsx(ContentSlot, { className: containerClass })
647
644
  ] });
648
645
  }
649
646
  };
@@ -871,15 +868,33 @@ var idCounter4 = 0;
871
868
  function generateUniqueId4() {
872
869
  return `s${(++idCounter4).toString(36)}${Math.random().toString(36).slice(2, 6)}`;
873
870
  }
871
+ var DEFAULT_CONTENT_DIMENSIONS = {
872
+ mode: "contained",
873
+ alignment: "center",
874
+ maxWidth: { value: 1200, unit: "px", enabled: true }
875
+ };
876
+ var DEFAULT_CONTENT_PADDING = {
877
+ top: 0,
878
+ right: 16,
879
+ bottom: 0,
880
+ left: 16,
881
+ unit: "px",
882
+ linked: false
883
+ };
874
884
  var defaultProps4 = {
875
885
  id: "",
876
886
  content: [],
877
- background: null,
878
- fullWidth: false,
879
- customPadding: null,
880
- dimensions: null,
881
- border: null,
882
- margin: null,
887
+ // Section layer defaults
888
+ sectionBackground: null,
889
+ sectionBorder: null,
890
+ sectionPadding: null,
891
+ sectionMargin: null,
892
+ // Content layer defaults - 1200px max-width so two-layer design is immediately visible
893
+ contentDimensions: { xs: DEFAULT_CONTENT_DIMENSIONS },
894
+ contentBackground: null,
895
+ contentBorder: null,
896
+ contentPadding: { xs: DEFAULT_CONTENT_PADDING },
897
+ // Other
883
898
  animation: null,
884
899
  visibility: null
885
900
  };
@@ -892,12 +907,14 @@ var SectionConfig = {
892
907
  render: ({
893
908
  id,
894
909
  content: Content,
895
- background,
896
- fullWidth,
897
- customPadding,
898
- dimensions,
899
- border,
900
- margin,
910
+ sectionBackground,
911
+ sectionBorder,
912
+ sectionPadding,
913
+ sectionMargin,
914
+ contentDimensions,
915
+ contentBackground,
916
+ contentBorder,
917
+ contentPadding,
901
918
  animation,
902
919
  visibility
903
920
  }) => {
@@ -905,53 +922,90 @@ var SectionConfig = {
905
922
  const sectionClass = `puck-section-${uniqueId}`;
906
923
  const contentClass = `puck-section-content-${uniqueId}`;
907
924
  const mediaQueries = [];
908
- const backgroundStyles = backgroundValueToCSS(background);
925
+ const sectionBackgroundStyles = backgroundValueToCSS(sectionBackground);
909
926
  const sectionStyles = {
910
- ...backgroundStyles
927
+ ...sectionBackgroundStyles
911
928
  };
912
- const paddingResult = responsiveValueToCSS(
913
- customPadding,
929
+ const sectionBorderStyles = borderValueToCSS(sectionBorder);
930
+ if (sectionBorderStyles) {
931
+ Object.assign(sectionStyles, sectionBorderStyles);
932
+ }
933
+ const sectionPaddingResult = responsiveValueToCSS(
934
+ sectionPadding,
914
935
  (v) => ({ padding: paddingValueToCSS(v) }),
915
936
  sectionClass
916
937
  );
917
- Object.assign(sectionStyles, paddingResult.baseStyles);
918
- if (paddingResult.mediaQueryCSS) {
919
- mediaQueries.push(paddingResult.mediaQueryCSS);
920
- }
921
- const borderStyles = borderValueToCSS(border);
922
- if (borderStyles) {
923
- Object.assign(sectionStyles, borderStyles);
938
+ Object.assign(sectionStyles, sectionPaddingResult.baseStyles);
939
+ if (sectionPaddingResult.mediaQueryCSS) {
940
+ mediaQueries.push(sectionPaddingResult.mediaQueryCSS);
924
941
  }
925
- const marginResult = responsiveValueToCSS(
926
- margin,
942
+ const sectionMarginResult = responsiveValueToCSS(
943
+ sectionMargin,
927
944
  (v) => ({ margin: marginValueToCSS(v) }),
928
945
  sectionClass
929
946
  );
930
- Object.assign(sectionStyles, marginResult.baseStyles);
931
- if (marginResult.mediaQueryCSS) {
932
- mediaQueries.push(marginResult.mediaQueryCSS);
947
+ Object.assign(sectionStyles, sectionMarginResult.baseStyles);
948
+ if (sectionMarginResult.mediaQueryCSS) {
949
+ mediaQueries.push(sectionMarginResult.mediaQueryCSS);
933
950
  }
934
951
  const visibilityCSS = visibilityValueToCSS(visibility, sectionClass);
935
952
  if (visibilityCSS) {
936
953
  mediaQueries.push(visibilityCSS);
937
954
  }
938
- const sectionClasses = cn("relative w-full", sectionClass);
939
- const dimensionsResult = responsiveValueToCSS(
940
- dimensions,
955
+ const contentBackgroundStyles = backgroundValueToCSS(contentBackground);
956
+ const contentStyles = {
957
+ ...contentBackgroundStyles
958
+ };
959
+ const contentDimensionsResult = responsiveValueToCSS(
960
+ contentDimensions,
941
961
  dimensionsValueToCSS,
942
962
  contentClass
943
963
  );
944
- if (dimensionsResult.mediaQueryCSS) {
945
- mediaQueries.push(dimensionsResult.mediaQueryCSS);
946
- }
947
- const contentClasses = cn(
948
- "relative z-10",
949
- // Only apply preset content width if no dimensions set
950
- !dimensions && !fullWidth && "max-w-[1200px] mx-auto px-4",
964
+ Object.assign(contentStyles, contentDimensionsResult.baseStyles);
965
+ if (contentDimensionsResult.mediaQueryCSS) {
966
+ mediaQueries.push(contentDimensionsResult.mediaQueryCSS);
967
+ }
968
+ const hasMinHeight = (() => {
969
+ if (!contentDimensions) return false;
970
+ if (typeof contentDimensions === "object" && "xs" in contentDimensions) {
971
+ const responsiveDims = contentDimensions;
972
+ return Object.values(responsiveDims).some((v) => {
973
+ if (!v || typeof v !== "object") return false;
974
+ const dim2 = v;
975
+ return dim2.minHeight?.enabled && dim2.minHeight?.value > 0;
976
+ });
977
+ }
978
+ const dim = contentDimensions;
979
+ return dim.minHeight?.enabled && dim.minHeight?.value > 0;
980
+ })();
981
+ if (hasMinHeight) {
982
+ contentStyles.display = "flex";
983
+ contentStyles.flexDirection = "column";
984
+ }
985
+ const contentBorderStyles = borderValueToCSS(contentBorder);
986
+ if (contentBorderStyles) {
987
+ Object.assign(contentStyles, contentBorderStyles);
988
+ }
989
+ const contentPaddingResult = responsiveValueToCSS(
990
+ contentPadding,
991
+ (v) => ({ padding: paddingValueToCSS(v) }),
951
992
  contentClass
952
993
  );
994
+ Object.assign(contentStyles, contentPaddingResult.baseStyles);
995
+ if (contentPaddingResult.mediaQueryCSS) {
996
+ mediaQueries.push(contentPaddingResult.mediaQueryCSS);
997
+ }
998
+ const sectionClasses = cn("relative w-full", sectionClass);
999
+ const contentClasses = cn("relative z-10", contentClass);
1000
+ const hasContentStyles = Object.keys(contentStyles).length > 0;
953
1001
  const allMediaQueryCSS = mediaQueries.join("\n");
954
1002
  const ContentSlot = Content;
1003
+ const renderContent = () => {
1004
+ if (hasMinHeight) {
1005
+ return /* @__PURE__ */ jsx("div", { style: { flex: 1, display: "flex", flexDirection: "column", minHeight: 0 }, children: /* @__PURE__ */ jsx(ContentSlot, { style: { flex: 1 } }) });
1006
+ }
1007
+ return /* @__PURE__ */ jsx(ContentSlot, {});
1008
+ };
955
1009
  return /* @__PURE__ */ jsxs(AnimatedWrapper, { animation, children: [
956
1010
  allMediaQueryCSS && /* @__PURE__ */ jsx("style", { children: allMediaQueryCSS }),
957
1011
  /* @__PURE__ */ jsx(
@@ -960,7 +1014,7 @@ var SectionConfig = {
960
1014
  id: id || void 0,
961
1015
  className: sectionClasses,
962
1016
  style: sectionStyles,
963
- children: /* @__PURE__ */ jsx(ContentSlot, { className: contentClasses, style: dimensionsResult.baseStyles })
1017
+ children: hasContentStyles ? /* @__PURE__ */ jsx("div", { className: contentClasses, style: contentStyles, children: renderContent() }) : /* @__PURE__ */ jsx(ContentSlot, { className: contentClasses })
964
1018
  }
965
1019
  )
966
1020
  ] });
@@ -1181,6 +1235,14 @@ var TextConfig = {
1181
1235
  ) });
1182
1236
  }
1183
1237
  };
1238
+ var DEFAULT_PADDING = {
1239
+ top: 0,
1240
+ right: 16,
1241
+ bottom: 0,
1242
+ left: 16,
1243
+ unit: "px",
1244
+ linked: false
1245
+ };
1184
1246
  var defaultProps9 = {
1185
1247
  content: "<p>Enter your content here...</p>",
1186
1248
  alignment: null,
@@ -1188,7 +1250,8 @@ var defaultProps9 = {
1188
1250
  dimensions: null,
1189
1251
  animation: null,
1190
1252
  margin: null,
1191
- customPadding: null
1253
+ customPadding: DEFAULT_PADDING
1254
+ // Default 16px horizontal padding
1192
1255
  };
1193
1256
  var RichTextConfig = {
1194
1257
  label: "Rich Text",
@@ -1213,17 +1276,25 @@ var RichTextConfig = {
1213
1276
  const alignmentValue = alignment ?? "left";
1214
1277
  const alignmentClass = alignmentMap[alignmentValue] || alignmentMap.left;
1215
1278
  if (!content || content === "<p></p>") {
1216
- return /* @__PURE__ */ jsx(AnimatedWrapper, { animation, children: /* @__PURE__ */ jsx("section", { className: cn("relative overflow-hidden px-4", alignmentClass), style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsx("div", { className: "prose dark:prose-invert", children: /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("em", { children: "No content available" }) }) }) }) });
1279
+ return /* @__PURE__ */ jsx(AnimatedWrapper, { animation, children: /* @__PURE__ */ jsx("section", { className: cn("relative overflow-hidden", alignmentClass), style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsx("div", { className: "prose dark:prose-invert max-w-none", children: /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("em", { children: "No content available" }) }) }) }) });
1217
1280
  }
1218
- return /* @__PURE__ */ jsx(AnimatedWrapper, { animation, children: /* @__PURE__ */ jsx("section", { className: cn("relative overflow-hidden px-4", alignmentClass), style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsx(
1281
+ return /* @__PURE__ */ jsx(AnimatedWrapper, { animation, children: /* @__PURE__ */ jsx("section", { className: cn("relative overflow-hidden", alignmentClass), style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsx(
1219
1282
  "div",
1220
1283
  {
1221
- className: "prose dark:prose-invert",
1284
+ className: "prose dark:prose-invert max-w-none",
1222
1285
  dangerouslySetInnerHTML: { __html: content }
1223
1286
  }
1224
1287
  ) }) });
1225
1288
  }
1226
1289
  };
1290
+ var DEFAULT_PADDING2 = {
1291
+ top: 16,
1292
+ right: 16,
1293
+ bottom: 16,
1294
+ left: 16,
1295
+ unit: "px",
1296
+ linked: true
1297
+ };
1227
1298
  var idCounter7 = 0;
1228
1299
  function generateUniqueId7() {
1229
1300
  return `i${(++idCounter7).toString(36)}${Math.random().toString(36).slice(2, 6)}`;
@@ -1240,7 +1311,8 @@ var defaultProps10 = {
1240
1311
  alignment: null,
1241
1312
  transform: null,
1242
1313
  animation: null,
1243
- customPadding: null,
1314
+ customPadding: DEFAULT_PADDING2,
1315
+ // Default 16px padding
1244
1316
  visibility: null
1245
1317
  };
1246
1318
  var ImageConfig = {
@@ -1280,7 +1352,7 @@ var ImageConfig = {
1280
1352
  if (!image?.url) {
1281
1353
  return /* @__PURE__ */ jsxs(AnimatedWrapper, { animation, children: [
1282
1354
  visibilityCSS && /* @__PURE__ */ jsx("style", { children: visibilityCSS }),
1283
- /* @__PURE__ */ jsx("div", { className: cn("py-4 px-4", wrapperClass), style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsx("div", { className: alignmentClasses, children: /* @__PURE__ */ jsx(
1355
+ /* @__PURE__ */ jsx("div", { className: wrapperClass, style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsx("div", { className: alignmentClasses, children: /* @__PURE__ */ jsx(
1284
1356
  "div",
1285
1357
  {
1286
1358
  className: cn(
@@ -1319,7 +1391,7 @@ var ImageConfig = {
1319
1391
  ) : imageElement;
1320
1392
  return /* @__PURE__ */ jsxs(AnimatedWrapper, { animation, children: [
1321
1393
  visibilityCSS && /* @__PURE__ */ jsx("style", { children: visibilityCSS }),
1322
- /* @__PURE__ */ jsx("div", { className: cn("py-4 px-4", wrapperClass), style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsx("div", { className: alignmentClasses, children: content }) })
1394
+ /* @__PURE__ */ jsx("div", { className: wrapperClass, style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsx("div", { className: alignmentClasses, children: content }) })
1323
1395
  ] });
1324
1396
  }
1325
1397
  };
@@ -1713,6 +1785,14 @@ var ButtonConfig = {
1713
1785
  );
1714
1786
  }
1715
1787
  };
1788
+ var DEFAULT_CONTENT_PADDING2 = {
1789
+ top: 16,
1790
+ right: 16,
1791
+ bottom: 16,
1792
+ left: 16,
1793
+ unit: "px",
1794
+ linked: true
1795
+ };
1716
1796
  var defaultProps12 = {
1717
1797
  image: null,
1718
1798
  heading: "Card Heading",
@@ -1727,12 +1807,13 @@ var defaultProps12 = {
1727
1807
  alignment: null,
1728
1808
  transform: null,
1729
1809
  animation: null,
1730
- customPadding: null
1810
+ contentPadding: DEFAULT_CONTENT_PADDING2
1811
+ // Default 16px padding
1731
1812
  };
1732
1813
  var CardConfig = {
1733
1814
  label: "Card",
1734
1815
  defaultProps: defaultProps12,
1735
- render: ({ image, heading, text, link, openInNewTab, shadow, background, dimensions, alignment, margin, border, transform, animation, customPadding }) => {
1816
+ render: ({ image, heading, text, link, openInNewTab, shadow, background, dimensions, alignment, margin, border, transform, animation, contentPadding }) => {
1736
1817
  const hasBorderRadius = border?.radius && border.radius > 0;
1737
1818
  const cardClasses = cn(
1738
1819
  "overflow-hidden transition-all bg-card",
@@ -1768,9 +1849,10 @@ var CardConfig = {
1768
1849
  if (borderStyles) {
1769
1850
  Object.assign(cardStyle, borderStyles);
1770
1851
  }
1771
- const paddingCSS = paddingValueToCSS(customPadding);
1772
- if (paddingCSS) {
1773
- cardStyle.padding = paddingCSS;
1852
+ const contentStyle = {};
1853
+ const contentPaddingCSS = paddingValueToCSS(contentPadding);
1854
+ if (contentPaddingCSS) {
1855
+ contentStyle.padding = contentPaddingCSS;
1774
1856
  }
1775
1857
  const cardContent = /* @__PURE__ */ jsxs("div", { className: cardClasses, style: cardStyle, children: [
1776
1858
  image?.url ? /* @__PURE__ */ jsx("div", { className: "relative aspect-video w-full overflow-hidden", children: /* @__PURE__ */ jsx(
@@ -1781,7 +1863,7 @@ var CardConfig = {
1781
1863
  className: "w-full h-full object-cover"
1782
1864
  }
1783
1865
  ) }) : /* @__PURE__ */ jsx("div", { className: "aspect-video w-full bg-muted flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "No image" }) }),
1784
- /* @__PURE__ */ jsxs("div", { className: "p-4", children: [
1866
+ /* @__PURE__ */ jsxs("div", { style: contentStyle, children: [
1785
1867
  heading && /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold text-foreground mb-2", children: heading }),
1786
1868
  text && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: text })
1787
1869
  ] })
@@ -1802,6 +1884,14 @@ var CardConfig = {
1802
1884
  return /* @__PURE__ */ jsx(AnimatedWrapper, { animation, children: /* @__PURE__ */ jsx("div", { className: alignmentClasses, children: /* @__PURE__ */ jsx("div", { style: wrapperStyle, children: cardContent }) }) });
1803
1885
  }
1804
1886
  };
1887
+ var DEFAULT_PADDING3 = {
1888
+ top: 0,
1889
+ right: 16,
1890
+ bottom: 0,
1891
+ left: 16,
1892
+ unit: "px",
1893
+ linked: false
1894
+ };
1805
1895
  var defaultProps13 = {
1806
1896
  style: "solid",
1807
1897
  color: null,
@@ -1809,7 +1899,8 @@ var defaultProps13 = {
1809
1899
  dimensions: null,
1810
1900
  transform: null,
1811
1901
  animation: null,
1812
- customPadding: null
1902
+ customPadding: DEFAULT_PADDING3
1903
+ // Default 16px horizontal padding
1813
1904
  };
1814
1905
  var DividerConfig = {
1815
1906
  label: "Divider",
@@ -1833,7 +1924,7 @@ var DividerConfig = {
1833
1924
  }
1834
1925
  const customColor = colorValueToCSS(color);
1835
1926
  const hrStyle = customColor ? { borderColor: customColor } : void 0;
1836
- return /* @__PURE__ */ jsx(AnimatedWrapper, { animation, children: /* @__PURE__ */ jsx("div", { className: "px-4", style: Object.keys(wrapperStyle).length > 0 ? wrapperStyle : void 0, children: /* @__PURE__ */ jsx(
1927
+ return /* @__PURE__ */ jsx(AnimatedWrapper, { animation, children: /* @__PURE__ */ jsx("div", { style: Object.keys(wrapperStyle).length > 0 ? wrapperStyle : void 0, children: /* @__PURE__ */ jsx(
1837
1928
  "hr",
1838
1929
  {
1839
1930
  className: cn(