@delmaredigital/payload-puck 0.1.3 → 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.
@@ -507,25 +507,23 @@ function responsiveValueToCSS(value, converter, uniqueId) {
507
507
  mediaQueryCSS: ""
508
508
  };
509
509
  }
510
- const mediaQueries = [];
511
- let baseStyles = {};
510
+ const cssRules = [];
512
511
  BREAKPOINTS.forEach((bp) => {
513
512
  const bpValue = value[bp.key];
514
513
  if (bpValue === void 0) return;
515
514
  const cssProps = converter(bpValue);
516
515
  if (!cssProps) return;
516
+ const styleString = cssPropertiesToString(cssProps);
517
+ if (!styleString) return;
517
518
  if (bp.key === "xs") {
518
- baseStyles = cssProps;
519
+ cssRules.push(`.${uniqueId} { ${styleString} }`);
519
520
  } else {
520
- const styleString = cssPropertiesToString(cssProps);
521
- if (styleString) {
522
- mediaQueries.push(
523
- `@media (min-width: ${bp.minWidth}px) { .${uniqueId} { ${styleString} } }`
524
- );
525
- }
521
+ cssRules.push(
522
+ `@media (min-width: ${bp.minWidth}px) { .${uniqueId} { ${styleString} } }`
523
+ );
526
524
  }
527
525
  });
528
- return { baseStyles, mediaQueryCSS: mediaQueries.join("\n") };
526
+ return { baseStyles: {}, mediaQueryCSS: cssRules.join("\n") };
529
527
  }
530
528
  function visibilityValueToCSS(visibility, uniqueId) {
531
529
  if (!visibility) return "";
@@ -692,16 +690,13 @@ function generateUniqueId() {
692
690
  }
693
691
  var defaultProps = {
694
692
  content: [],
695
- background: null,
696
- customPadding: null,
693
+ visibility: null,
697
694
  dimensions: null,
695
+ background: null,
698
696
  border: null,
697
+ padding: null,
699
698
  margin: null,
700
- animation: null,
701
- innerBackground: null,
702
- innerPadding: null,
703
- innerBorder: null,
704
- visibility: null
699
+ animation: null
705
700
  };
706
701
  var ContainerConfig = {
707
702
  label: "Container",
@@ -711,84 +706,86 @@ var ContainerConfig = {
711
706
  defaultProps,
712
707
  render: ({
713
708
  content: Content,
714
- background,
715
- customPadding,
709
+ visibility,
716
710
  dimensions,
711
+ background,
717
712
  border,
713
+ padding,
718
714
  margin,
719
- animation,
720
- innerBackground,
721
- innerPadding,
722
- innerBorder,
723
- visibility
715
+ animation
724
716
  }) => {
725
717
  const uniqueId = generateUniqueId();
726
- const outerClass = `puck-container-outer-${uniqueId}`;
727
- const innerClass = `puck-container-inner-${uniqueId}`;
718
+ const containerClass = `puck-container-${uniqueId}`;
728
719
  const mediaQueries = [];
729
- const outerBackgroundStyles = backgroundValueToCSS(background);
730
- const outerStyles = {
731
- ...outerBackgroundStyles
732
- };
733
- const outerPaddingResult = responsiveValueToCSS(
734
- customPadding,
735
- (v) => ({ padding: paddingValueToCSS(v) }),
736
- outerClass
737
- );
738
- Object.assign(outerStyles, outerPaddingResult.baseStyles);
739
- if (outerPaddingResult.mediaQueryCSS) {
740
- mediaQueries.push(outerPaddingResult.mediaQueryCSS);
741
- }
742
- const outerBorderStyles = borderValueToCSS(border);
743
- if (outerBorderStyles) {
744
- Object.assign(outerStyles, outerBorderStyles);
720
+ const containerStyles = {};
721
+ const backgroundStyles = backgroundValueToCSS(background);
722
+ if (backgroundStyles) {
723
+ Object.assign(containerStyles, backgroundStyles);
745
724
  }
746
- const marginResult = responsiveValueToCSS(
747
- margin,
748
- (v) => ({ margin: marginValueToCSS(v) }),
749
- outerClass
750
- );
751
- Object.assign(outerStyles, marginResult.baseStyles);
752
- if (marginResult.mediaQueryCSS) {
753
- mediaQueries.push(marginResult.mediaQueryCSS);
725
+ const borderStyles = borderValueToCSS(border);
726
+ if (borderStyles) {
727
+ Object.assign(containerStyles, borderStyles);
754
728
  }
755
- const innerBackgroundStyles = backgroundValueToCSS(innerBackground);
756
- const innerStyles = {
757
- ...innerBackgroundStyles
758
- };
759
729
  const dimensionsResult = responsiveValueToCSS(
760
730
  dimensions,
761
731
  dimensionsValueToCSS,
762
- innerClass
732
+ containerClass
763
733
  );
764
- Object.assign(innerStyles, dimensionsResult.baseStyles);
734
+ Object.assign(containerStyles, dimensionsResult.baseStyles);
765
735
  if (dimensionsResult.mediaQueryCSS) {
766
736
  mediaQueries.push(dimensionsResult.mediaQueryCSS);
767
737
  }
768
- const innerPaddingResult = responsiveValueToCSS(
769
- innerPadding,
738
+ const hasMinHeight = (() => {
739
+ if (!dimensions) return false;
740
+ if (typeof dimensions === "object" && "xs" in dimensions) {
741
+ const responsiveDims = dimensions;
742
+ return Object.values(responsiveDims).some((v) => {
743
+ if (!v || typeof v !== "object") return false;
744
+ const dim2 = v;
745
+ return dim2.minHeight?.enabled && dim2.minHeight?.value > 0;
746
+ });
747
+ }
748
+ const dim = dimensions;
749
+ return dim.minHeight?.enabled && dim.minHeight?.value > 0;
750
+ })();
751
+ if (hasMinHeight) {
752
+ containerStyles.display = "flex";
753
+ containerStyles.flexDirection = "column";
754
+ }
755
+ const paddingResult = responsiveValueToCSS(
756
+ padding,
770
757
  (v) => ({ padding: paddingValueToCSS(v) }),
771
- innerClass
758
+ containerClass
772
759
  );
773
- Object.assign(innerStyles, innerPaddingResult.baseStyles);
774
- if (innerPaddingResult.mediaQueryCSS) {
775
- mediaQueries.push(innerPaddingResult.mediaQueryCSS);
760
+ Object.assign(containerStyles, paddingResult.baseStyles);
761
+ if (paddingResult.mediaQueryCSS) {
762
+ mediaQueries.push(paddingResult.mediaQueryCSS);
776
763
  }
777
- const innerBorderStyles = borderValueToCSS(innerBorder);
778
- if (innerBorderStyles) {
779
- Object.assign(innerStyles, innerBorderStyles);
764
+ const marginResult = responsiveValueToCSS(
765
+ margin,
766
+ (v) => ({ margin: marginValueToCSS(v) }),
767
+ containerClass
768
+ );
769
+ Object.assign(containerStyles, marginResult.baseStyles);
770
+ if (marginResult.mediaQueryCSS) {
771
+ mediaQueries.push(marginResult.mediaQueryCSS);
780
772
  }
781
- const visibilityCSS = visibilityValueToCSS(visibility, outerClass);
773
+ const visibilityCSS = visibilityValueToCSS(visibility, containerClass);
782
774
  if (visibilityCSS) {
783
775
  mediaQueries.push(visibilityCSS);
784
776
  }
785
- const contentClasses = cn("px-4", innerClass);
786
- const hasInnerStyles = Object.keys(innerStyles).length > 0;
787
777
  const allMediaQueryCSS = mediaQueries.join("\n");
778
+ const hasStyles = Object.keys(containerStyles).length > 0;
788
779
  const ContentSlot = Content;
780
+ const renderContent = () => {
781
+ if (hasMinHeight) {
782
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1, display: "flex", flexDirection: "column", minHeight: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(ContentSlot, { style: { flex: 1 } }) });
783
+ }
784
+ return /* @__PURE__ */ jsxRuntime.jsx(ContentSlot, {});
785
+ };
789
786
  return /* @__PURE__ */ jsxRuntime.jsxs(AnimatedWrapper.AnimatedWrapper, { animation, children: [
790
787
  allMediaQueryCSS && /* @__PURE__ */ jsxRuntime.jsx("style", { children: allMediaQueryCSS }),
791
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: outerClass, style: outerStyles, children: hasInnerStyles ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: contentClasses, style: innerStyles, children: /* @__PURE__ */ jsxRuntime.jsx(ContentSlot, {}) }) : /* @__PURE__ */ jsxRuntime.jsx(ContentSlot, { className: contentClasses, style: innerStyles }) })
788
+ hasStyles ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: containerClass, style: containerStyles, children: renderContent() }) : /* @__PURE__ */ jsxRuntime.jsx(ContentSlot, { className: containerClass })
792
789
  ] });
793
790
  }
794
791
  };
@@ -1016,15 +1013,33 @@ var idCounter4 = 0;
1016
1013
  function generateUniqueId4() {
1017
1014
  return `s${(++idCounter4).toString(36)}${Math.random().toString(36).slice(2, 6)}`;
1018
1015
  }
1016
+ var DEFAULT_CONTENT_DIMENSIONS = {
1017
+ mode: "contained",
1018
+ alignment: "center",
1019
+ maxWidth: { value: 1200, unit: "px", enabled: true }
1020
+ };
1021
+ var DEFAULT_CONTENT_PADDING = {
1022
+ top: 0,
1023
+ right: 16,
1024
+ bottom: 0,
1025
+ left: 16,
1026
+ unit: "px",
1027
+ linked: false
1028
+ };
1019
1029
  var defaultProps4 = {
1020
1030
  id: "",
1021
1031
  content: [],
1022
- background: null,
1023
- fullWidth: false,
1024
- customPadding: null,
1025
- dimensions: null,
1026
- border: null,
1027
- margin: null,
1032
+ // Section layer defaults
1033
+ sectionBackground: null,
1034
+ sectionBorder: null,
1035
+ sectionPadding: null,
1036
+ sectionMargin: null,
1037
+ // Content layer defaults - 1200px max-width so two-layer design is immediately visible
1038
+ contentDimensions: { xs: DEFAULT_CONTENT_DIMENSIONS },
1039
+ contentBackground: null,
1040
+ contentBorder: null,
1041
+ contentPadding: { xs: DEFAULT_CONTENT_PADDING },
1042
+ // Other
1028
1043
  animation: null,
1029
1044
  visibility: null
1030
1045
  };
@@ -1037,12 +1052,14 @@ var SectionConfig = {
1037
1052
  render: ({
1038
1053
  id,
1039
1054
  content: Content,
1040
- background,
1041
- fullWidth,
1042
- customPadding,
1043
- dimensions,
1044
- border,
1045
- margin,
1055
+ sectionBackground,
1056
+ sectionBorder,
1057
+ sectionPadding,
1058
+ sectionMargin,
1059
+ contentDimensions,
1060
+ contentBackground,
1061
+ contentBorder,
1062
+ contentPadding,
1046
1063
  animation,
1047
1064
  visibility
1048
1065
  }) => {
@@ -1050,53 +1067,90 @@ var SectionConfig = {
1050
1067
  const sectionClass = `puck-section-${uniqueId}`;
1051
1068
  const contentClass = `puck-section-content-${uniqueId}`;
1052
1069
  const mediaQueries = [];
1053
- const backgroundStyles = backgroundValueToCSS(background);
1070
+ const sectionBackgroundStyles = backgroundValueToCSS(sectionBackground);
1054
1071
  const sectionStyles = {
1055
- ...backgroundStyles
1072
+ ...sectionBackgroundStyles
1056
1073
  };
1057
- const paddingResult = responsiveValueToCSS(
1058
- customPadding,
1074
+ const sectionBorderStyles = borderValueToCSS(sectionBorder);
1075
+ if (sectionBorderStyles) {
1076
+ Object.assign(sectionStyles, sectionBorderStyles);
1077
+ }
1078
+ const sectionPaddingResult = responsiveValueToCSS(
1079
+ sectionPadding,
1059
1080
  (v) => ({ padding: paddingValueToCSS(v) }),
1060
1081
  sectionClass
1061
1082
  );
1062
- Object.assign(sectionStyles, paddingResult.baseStyles);
1063
- if (paddingResult.mediaQueryCSS) {
1064
- mediaQueries.push(paddingResult.mediaQueryCSS);
1065
- }
1066
- const borderStyles = borderValueToCSS(border);
1067
- if (borderStyles) {
1068
- Object.assign(sectionStyles, borderStyles);
1083
+ Object.assign(sectionStyles, sectionPaddingResult.baseStyles);
1084
+ if (sectionPaddingResult.mediaQueryCSS) {
1085
+ mediaQueries.push(sectionPaddingResult.mediaQueryCSS);
1069
1086
  }
1070
- const marginResult = responsiveValueToCSS(
1071
- margin,
1087
+ const sectionMarginResult = responsiveValueToCSS(
1088
+ sectionMargin,
1072
1089
  (v) => ({ margin: marginValueToCSS(v) }),
1073
1090
  sectionClass
1074
1091
  );
1075
- Object.assign(sectionStyles, marginResult.baseStyles);
1076
- if (marginResult.mediaQueryCSS) {
1077
- mediaQueries.push(marginResult.mediaQueryCSS);
1092
+ Object.assign(sectionStyles, sectionMarginResult.baseStyles);
1093
+ if (sectionMarginResult.mediaQueryCSS) {
1094
+ mediaQueries.push(sectionMarginResult.mediaQueryCSS);
1078
1095
  }
1079
1096
  const visibilityCSS = visibilityValueToCSS(visibility, sectionClass);
1080
1097
  if (visibilityCSS) {
1081
1098
  mediaQueries.push(visibilityCSS);
1082
1099
  }
1083
- const sectionClasses = cn("relative w-full", sectionClass);
1084
- const dimensionsResult = responsiveValueToCSS(
1085
- dimensions,
1100
+ const contentBackgroundStyles = backgroundValueToCSS(contentBackground);
1101
+ const contentStyles = {
1102
+ ...contentBackgroundStyles
1103
+ };
1104
+ const contentDimensionsResult = responsiveValueToCSS(
1105
+ contentDimensions,
1086
1106
  dimensionsValueToCSS,
1087
1107
  contentClass
1088
1108
  );
1089
- if (dimensionsResult.mediaQueryCSS) {
1090
- mediaQueries.push(dimensionsResult.mediaQueryCSS);
1091
- }
1092
- const contentClasses = cn(
1093
- "relative z-10",
1094
- // Only apply preset content width if no dimensions set
1095
- !dimensions && !fullWidth && "max-w-[1200px] mx-auto px-4",
1109
+ Object.assign(contentStyles, contentDimensionsResult.baseStyles);
1110
+ if (contentDimensionsResult.mediaQueryCSS) {
1111
+ mediaQueries.push(contentDimensionsResult.mediaQueryCSS);
1112
+ }
1113
+ const hasMinHeight = (() => {
1114
+ if (!contentDimensions) return false;
1115
+ if (typeof contentDimensions === "object" && "xs" in contentDimensions) {
1116
+ const responsiveDims = contentDimensions;
1117
+ return Object.values(responsiveDims).some((v) => {
1118
+ if (!v || typeof v !== "object") return false;
1119
+ const dim2 = v;
1120
+ return dim2.minHeight?.enabled && dim2.minHeight?.value > 0;
1121
+ });
1122
+ }
1123
+ const dim = contentDimensions;
1124
+ return dim.minHeight?.enabled && dim.minHeight?.value > 0;
1125
+ })();
1126
+ if (hasMinHeight) {
1127
+ contentStyles.display = "flex";
1128
+ contentStyles.flexDirection = "column";
1129
+ }
1130
+ const contentBorderStyles = borderValueToCSS(contentBorder);
1131
+ if (contentBorderStyles) {
1132
+ Object.assign(contentStyles, contentBorderStyles);
1133
+ }
1134
+ const contentPaddingResult = responsiveValueToCSS(
1135
+ contentPadding,
1136
+ (v) => ({ padding: paddingValueToCSS(v) }),
1096
1137
  contentClass
1097
1138
  );
1139
+ Object.assign(contentStyles, contentPaddingResult.baseStyles);
1140
+ if (contentPaddingResult.mediaQueryCSS) {
1141
+ mediaQueries.push(contentPaddingResult.mediaQueryCSS);
1142
+ }
1143
+ const sectionClasses = cn("relative w-full", sectionClass);
1144
+ const contentClasses = cn("relative z-10", contentClass);
1145
+ const hasContentStyles = Object.keys(contentStyles).length > 0;
1098
1146
  const allMediaQueryCSS = mediaQueries.join("\n");
1099
1147
  const ContentSlot = Content;
1148
+ const renderContent = () => {
1149
+ if (hasMinHeight) {
1150
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1, display: "flex", flexDirection: "column", minHeight: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(ContentSlot, { style: { flex: 1 } }) });
1151
+ }
1152
+ return /* @__PURE__ */ jsxRuntime.jsx(ContentSlot, {});
1153
+ };
1100
1154
  return /* @__PURE__ */ jsxRuntime.jsxs(AnimatedWrapper.AnimatedWrapper, { animation, children: [
1101
1155
  allMediaQueryCSS && /* @__PURE__ */ jsxRuntime.jsx("style", { children: allMediaQueryCSS }),
1102
1156
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -1105,7 +1159,7 @@ var SectionConfig = {
1105
1159
  id: id || void 0,
1106
1160
  className: sectionClasses,
1107
1161
  style: sectionStyles,
1108
- children: /* @__PURE__ */ jsxRuntime.jsx(ContentSlot, { className: contentClasses, style: dimensionsResult.baseStyles })
1162
+ children: hasContentStyles ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: contentClasses, style: contentStyles, children: renderContent() }) : /* @__PURE__ */ jsxRuntime.jsx(ContentSlot, { className: contentClasses })
1109
1163
  }
1110
1164
  )
1111
1165
  ] });
@@ -1326,6 +1380,14 @@ var TextConfig = {
1326
1380
  ) });
1327
1381
  }
1328
1382
  };
1383
+ var DEFAULT_PADDING = {
1384
+ top: 0,
1385
+ right: 16,
1386
+ bottom: 0,
1387
+ left: 16,
1388
+ unit: "px",
1389
+ linked: false
1390
+ };
1329
1391
  var defaultProps9 = {
1330
1392
  content: "<p>Enter your content here...</p>",
1331
1393
  alignment: null,
@@ -1333,7 +1395,8 @@ var defaultProps9 = {
1333
1395
  dimensions: null,
1334
1396
  animation: null,
1335
1397
  margin: null,
1336
- customPadding: null
1398
+ customPadding: DEFAULT_PADDING
1399
+ // Default 16px horizontal padding
1337
1400
  };
1338
1401
  var RichTextConfig = {
1339
1402
  label: "Rich Text",
@@ -1358,17 +1421,25 @@ var RichTextConfig = {
1358
1421
  const alignmentValue = alignment ?? "left";
1359
1422
  const alignmentClass = alignmentMap[alignmentValue] || alignmentMap.left;
1360
1423
  if (!content || content === "<p></p>") {
1361
- return /* @__PURE__ */ jsxRuntime.jsx(AnimatedWrapper.AnimatedWrapper, { animation, children: /* @__PURE__ */ jsxRuntime.jsx("section", { className: cn("relative overflow-hidden px-4", alignmentClass), style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "prose dark:prose-invert", children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: /* @__PURE__ */ jsxRuntime.jsx("em", { children: "No content available" }) }) }) }) });
1424
+ return /* @__PURE__ */ jsxRuntime.jsx(AnimatedWrapper.AnimatedWrapper, { animation, children: /* @__PURE__ */ jsxRuntime.jsx("section", { className: cn("relative overflow-hidden", alignmentClass), style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "prose dark:prose-invert max-w-none", children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: /* @__PURE__ */ jsxRuntime.jsx("em", { children: "No content available" }) }) }) }) });
1362
1425
  }
1363
- return /* @__PURE__ */ jsxRuntime.jsx(AnimatedWrapper.AnimatedWrapper, { animation, children: /* @__PURE__ */ jsxRuntime.jsx("section", { className: cn("relative overflow-hidden px-4", alignmentClass), style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
1426
+ return /* @__PURE__ */ jsxRuntime.jsx(AnimatedWrapper.AnimatedWrapper, { animation, children: /* @__PURE__ */ jsxRuntime.jsx("section", { className: cn("relative overflow-hidden", alignmentClass), style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
1364
1427
  "div",
1365
1428
  {
1366
- className: "prose dark:prose-invert",
1429
+ className: "prose dark:prose-invert max-w-none",
1367
1430
  dangerouslySetInnerHTML: { __html: content }
1368
1431
  }
1369
1432
  ) }) });
1370
1433
  }
1371
1434
  };
1435
+ var DEFAULT_PADDING2 = {
1436
+ top: 16,
1437
+ right: 16,
1438
+ bottom: 16,
1439
+ left: 16,
1440
+ unit: "px",
1441
+ linked: true
1442
+ };
1372
1443
  var idCounter7 = 0;
1373
1444
  function generateUniqueId7() {
1374
1445
  return `i${(++idCounter7).toString(36)}${Math.random().toString(36).slice(2, 6)}`;
@@ -1385,7 +1456,8 @@ var defaultProps10 = {
1385
1456
  alignment: null,
1386
1457
  transform: null,
1387
1458
  animation: null,
1388
- customPadding: null,
1459
+ customPadding: DEFAULT_PADDING2,
1460
+ // Default 16px padding
1389
1461
  visibility: null
1390
1462
  };
1391
1463
  var ImageConfig = {
@@ -1425,7 +1497,7 @@ var ImageConfig = {
1425
1497
  if (!image?.url) {
1426
1498
  return /* @__PURE__ */ jsxRuntime.jsxs(AnimatedWrapper.AnimatedWrapper, { animation, children: [
1427
1499
  visibilityCSS && /* @__PURE__ */ jsxRuntime.jsx("style", { children: visibilityCSS }),
1428
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("py-4 px-4", wrapperClass), style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: alignmentClasses, children: /* @__PURE__ */ jsxRuntime.jsx(
1500
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: wrapperClass, style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: alignmentClasses, children: /* @__PURE__ */ jsxRuntime.jsx(
1429
1501
  "div",
1430
1502
  {
1431
1503
  className: cn(
@@ -1464,7 +1536,7 @@ var ImageConfig = {
1464
1536
  ) : imageElement;
1465
1537
  return /* @__PURE__ */ jsxRuntime.jsxs(AnimatedWrapper.AnimatedWrapper, { animation, children: [
1466
1538
  visibilityCSS && /* @__PURE__ */ jsxRuntime.jsx("style", { children: visibilityCSS }),
1467
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("py-4 px-4", wrapperClass), style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: alignmentClasses, children: content }) })
1539
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: wrapperClass, style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: alignmentClasses, children: content }) })
1468
1540
  ] });
1469
1541
  }
1470
1542
  };
@@ -1858,6 +1930,14 @@ var ButtonConfig = {
1858
1930
  );
1859
1931
  }
1860
1932
  };
1933
+ var DEFAULT_CONTENT_PADDING2 = {
1934
+ top: 16,
1935
+ right: 16,
1936
+ bottom: 16,
1937
+ left: 16,
1938
+ unit: "px",
1939
+ linked: true
1940
+ };
1861
1941
  var defaultProps12 = {
1862
1942
  image: null,
1863
1943
  heading: "Card Heading",
@@ -1872,12 +1952,13 @@ var defaultProps12 = {
1872
1952
  alignment: null,
1873
1953
  transform: null,
1874
1954
  animation: null,
1875
- customPadding: null
1955
+ contentPadding: DEFAULT_CONTENT_PADDING2
1956
+ // Default 16px padding
1876
1957
  };
1877
1958
  var CardConfig = {
1878
1959
  label: "Card",
1879
1960
  defaultProps: defaultProps12,
1880
- render: ({ image, heading, text, link, openInNewTab, shadow, background, dimensions, alignment, margin, border, transform, animation, customPadding }) => {
1961
+ render: ({ image, heading, text, link, openInNewTab, shadow, background, dimensions, alignment, margin, border, transform, animation, contentPadding }) => {
1881
1962
  const hasBorderRadius = border?.radius && border.radius > 0;
1882
1963
  const cardClasses = cn(
1883
1964
  "overflow-hidden transition-all bg-card",
@@ -1913,9 +1994,10 @@ var CardConfig = {
1913
1994
  if (borderStyles) {
1914
1995
  Object.assign(cardStyle, borderStyles);
1915
1996
  }
1916
- const paddingCSS = paddingValueToCSS(customPadding);
1917
- if (paddingCSS) {
1918
- cardStyle.padding = paddingCSS;
1997
+ const contentStyle = {};
1998
+ const contentPaddingCSS = paddingValueToCSS(contentPadding);
1999
+ if (contentPaddingCSS) {
2000
+ contentStyle.padding = contentPaddingCSS;
1919
2001
  }
1920
2002
  const cardContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cardClasses, style: cardStyle, children: [
1921
2003
  image?.url ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative aspect-video w-full overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -1926,7 +2008,7 @@ var CardConfig = {
1926
2008
  className: "w-full h-full object-cover"
1927
2009
  }
1928
2010
  ) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-video w-full bg-muted flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "No image" }) }),
1929
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4", children: [
2011
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle, children: [
1930
2012
  heading && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold text-foreground mb-2", children: heading }),
1931
2013
  text && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: text })
1932
2014
  ] })
@@ -1947,6 +2029,14 @@ var CardConfig = {
1947
2029
  return /* @__PURE__ */ jsxRuntime.jsx(AnimatedWrapper.AnimatedWrapper, { animation, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: alignmentClasses, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: wrapperStyle, children: cardContent }) }) });
1948
2030
  }
1949
2031
  };
2032
+ var DEFAULT_PADDING3 = {
2033
+ top: 0,
2034
+ right: 16,
2035
+ bottom: 0,
2036
+ left: 16,
2037
+ unit: "px",
2038
+ linked: false
2039
+ };
1950
2040
  var defaultProps13 = {
1951
2041
  style: "solid",
1952
2042
  color: null,
@@ -1954,7 +2044,8 @@ var defaultProps13 = {
1954
2044
  dimensions: null,
1955
2045
  transform: null,
1956
2046
  animation: null,
1957
- customPadding: null
2047
+ customPadding: DEFAULT_PADDING3
2048
+ // Default 16px horizontal padding
1958
2049
  };
1959
2050
  var DividerConfig = {
1960
2051
  label: "Divider",
@@ -1978,7 +2069,7 @@ var DividerConfig = {
1978
2069
  }
1979
2070
  const customColor = colorValueToCSS(color);
1980
2071
  const hrStyle = customColor ? { borderColor: customColor } : void 0;
1981
- return /* @__PURE__ */ jsxRuntime.jsx(AnimatedWrapper.AnimatedWrapper, { animation, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4", style: Object.keys(wrapperStyle).length > 0 ? wrapperStyle : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
2072
+ return /* @__PURE__ */ jsxRuntime.jsx(AnimatedWrapper.AnimatedWrapper, { animation, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: Object.keys(wrapperStyle).length > 0 ? wrapperStyle : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
1982
2073
  "hr",
1983
2074
  {
1984
2075
  className: cn(