@orion-studios/payload-studio 0.5.0-beta.2 → 0.5.0-beta.4
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/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
admin_exports
|
|
3
3
|
} from "./chunk-J7W5EE3B.mjs";
|
|
4
|
-
import {
|
|
5
|
-
admin_app_exports
|
|
6
|
-
} from "./chunk-AAOHJDNS.mjs";
|
|
7
4
|
import {
|
|
8
5
|
studio_exports
|
|
9
6
|
} from "./chunk-N67KVM2S.mjs";
|
|
7
|
+
import {
|
|
8
|
+
admin_app_exports
|
|
9
|
+
} from "./chunk-AAOHJDNS.mjs";
|
|
10
10
|
import {
|
|
11
11
|
studio_pages_exports
|
|
12
12
|
} from "./chunk-UJFU323N.mjs";
|
|
@@ -137,11 +137,13 @@ h4 {
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
.hero {
|
|
140
|
+
position: relative;
|
|
141
|
+
isolation: isolate;
|
|
140
142
|
margin: 1.2rem auto 1.8rem;
|
|
141
143
|
border-radius: var(--orion-studio-radius-lg);
|
|
142
144
|
overflow: hidden;
|
|
143
145
|
box-shadow: var(--orion-studio-shadow);
|
|
144
|
-
background:
|
|
146
|
+
background: transparent;
|
|
145
147
|
color: #fff;
|
|
146
148
|
}
|
|
147
149
|
|
|
@@ -150,12 +152,18 @@ h4 {
|
|
|
150
152
|
}
|
|
151
153
|
|
|
152
154
|
.hero-media {
|
|
153
|
-
min-height:
|
|
154
|
-
background:
|
|
155
|
+
min-height: 360px;
|
|
156
|
+
background: transparent;
|
|
155
157
|
}
|
|
156
158
|
|
|
157
159
|
.hero-content {
|
|
158
|
-
|
|
160
|
+
position: absolute;
|
|
161
|
+
inset: 0;
|
|
162
|
+
display: flex;
|
|
163
|
+
flex-direction: column;
|
|
164
|
+
justify-content: center;
|
|
165
|
+
padding: 2rem;
|
|
166
|
+
max-width: 610px;
|
|
159
167
|
}
|
|
160
168
|
|
|
161
169
|
.hero h1 {
|
|
@@ -750,6 +750,7 @@ var sectionStyleFromBlock = (block, pageDefaults) => {
|
|
|
750
750
|
} : {},
|
|
751
751
|
sectionClass: `orion-builder-shell is-${pageDefaults.pageWidthDefault}`,
|
|
752
752
|
sectionInnerStyle: {
|
|
753
|
+
paddingInline: "1rem",
|
|
753
754
|
paddingBottom: sectionPaddingMap[sectionPaddingY],
|
|
754
755
|
paddingTop: sectionPaddingMap[sectionPaddingY]
|
|
755
756
|
},
|
|
@@ -1728,15 +1729,20 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
1728
1729
|
if (type === "hero") {
|
|
1729
1730
|
const media = resolveMedia(block.media);
|
|
1730
1731
|
const variant = normalizeText(block.variant, "default");
|
|
1731
|
-
const backgroundColor = normalizeText(block.backgroundColor);
|
|
1732
|
+
const backgroundColor = normalizeText(block.backgroundColor).trim();
|
|
1733
|
+
const sectionBackgroundMode = normalizeText(
|
|
1734
|
+
block.sectionBackgroundMode,
|
|
1735
|
+
defaultSectionStyle.sectionBackgroundMode
|
|
1736
|
+
);
|
|
1732
1737
|
const backgroundImageURL = normalizeText(block.backgroundImageURL);
|
|
1733
1738
|
const backgroundImage = backgroundImageURL || media?.url;
|
|
1739
|
+
const hasCustomHeroColor = backgroundColor.length > 0 && backgroundColor.toLowerCase() !== "#124a37";
|
|
1734
1740
|
const mediaStyle = backgroundImage && variant === "default" ? {
|
|
1735
|
-
|
|
1741
|
+
...hasCustomHeroColor ? { backgroundColor } : {},
|
|
1736
1742
|
backgroundImage: `linear-gradient(145deg, rgba(13, 74, 55, 0.34), rgba(13, 74, 55, 0.74)), url('${backgroundImage}')`
|
|
1737
|
-
} : {
|
|
1738
|
-
backgroundColor
|
|
1739
|
-
};
|
|
1743
|
+
} : hasCustomHeroColor && sectionBackgroundMode !== "none" ? {
|
|
1744
|
+
backgroundColor
|
|
1745
|
+
} : {};
|
|
1740
1746
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1741
1747
|
BlockFrame,
|
|
1742
1748
|
{
|
|
@@ -3162,10 +3168,19 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
3162
3168
|
onChange: (event) => updateSelectedField("backgroundColor", event.target.value),
|
|
3163
3169
|
style: { ...sidebarInputStyle, height: 36, padding: 4 },
|
|
3164
3170
|
type: "color",
|
|
3165
|
-
value: parseColor(selectedBlock.backgroundColor, "#
|
|
3171
|
+
value: parseColor(selectedBlock.backgroundColor, "#ffffff")
|
|
3166
3172
|
}
|
|
3167
3173
|
)
|
|
3168
3174
|
] }),
|
|
3175
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
3176
|
+
"button",
|
|
3177
|
+
{
|
|
3178
|
+
onClick: () => updateSelectedField("backgroundColor", ""),
|
|
3179
|
+
style: { borderRadius: 999, cursor: "pointer", fontSize: 12, padding: "7px 10px" },
|
|
3180
|
+
type: "button",
|
|
3181
|
+
children: "Clear Hero Background Color"
|
|
3182
|
+
}
|
|
3183
|
+
),
|
|
3169
3184
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { style: sidebarLabelStyle, children: [
|
|
3170
3185
|
"Upload Hero Background Image",
|
|
3171
3186
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -722,6 +722,7 @@ var sectionStyleFromBlock = (block, pageDefaults) => {
|
|
|
722
722
|
} : {},
|
|
723
723
|
sectionClass: `orion-builder-shell is-${pageDefaults.pageWidthDefault}`,
|
|
724
724
|
sectionInnerStyle: {
|
|
725
|
+
paddingInline: "1rem",
|
|
725
726
|
paddingBottom: sectionPaddingMap[sectionPaddingY],
|
|
726
727
|
paddingTop: sectionPaddingMap[sectionPaddingY]
|
|
727
728
|
},
|
|
@@ -1700,15 +1701,20 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
1700
1701
|
if (type === "hero") {
|
|
1701
1702
|
const media = resolveMedia(block.media);
|
|
1702
1703
|
const variant = normalizeText(block.variant, "default");
|
|
1703
|
-
const backgroundColor = normalizeText(block.backgroundColor);
|
|
1704
|
+
const backgroundColor = normalizeText(block.backgroundColor).trim();
|
|
1705
|
+
const sectionBackgroundMode = normalizeText(
|
|
1706
|
+
block.sectionBackgroundMode,
|
|
1707
|
+
defaultSectionStyle.sectionBackgroundMode
|
|
1708
|
+
);
|
|
1704
1709
|
const backgroundImageURL = normalizeText(block.backgroundImageURL);
|
|
1705
1710
|
const backgroundImage = backgroundImageURL || media?.url;
|
|
1711
|
+
const hasCustomHeroColor = backgroundColor.length > 0 && backgroundColor.toLowerCase() !== "#124a37";
|
|
1706
1712
|
const mediaStyle = backgroundImage && variant === "default" ? {
|
|
1707
|
-
|
|
1713
|
+
...hasCustomHeroColor ? { backgroundColor } : {},
|
|
1708
1714
|
backgroundImage: `linear-gradient(145deg, rgba(13, 74, 55, 0.34), rgba(13, 74, 55, 0.74)), url('${backgroundImage}')`
|
|
1709
|
-
} : {
|
|
1710
|
-
backgroundColor
|
|
1711
|
-
};
|
|
1715
|
+
} : hasCustomHeroColor && sectionBackgroundMode !== "none" ? {
|
|
1716
|
+
backgroundColor
|
|
1717
|
+
} : {};
|
|
1712
1718
|
return /* @__PURE__ */ jsx(
|
|
1713
1719
|
BlockFrame,
|
|
1714
1720
|
{
|
|
@@ -3134,10 +3140,19 @@ function BuilderPageEditor({ initialDoc, pageID }) {
|
|
|
3134
3140
|
onChange: (event) => updateSelectedField("backgroundColor", event.target.value),
|
|
3135
3141
|
style: { ...sidebarInputStyle, height: 36, padding: 4 },
|
|
3136
3142
|
type: "color",
|
|
3137
|
-
value: parseColor(selectedBlock.backgroundColor, "#
|
|
3143
|
+
value: parseColor(selectedBlock.backgroundColor, "#ffffff")
|
|
3138
3144
|
}
|
|
3139
3145
|
)
|
|
3140
3146
|
] }),
|
|
3147
|
+
/* @__PURE__ */ jsx(
|
|
3148
|
+
"button",
|
|
3149
|
+
{
|
|
3150
|
+
onClick: () => updateSelectedField("backgroundColor", ""),
|
|
3151
|
+
style: { borderRadius: 999, cursor: "pointer", fontSize: 12, padding: "7px 10px" },
|
|
3152
|
+
type: "button",
|
|
3153
|
+
children: "Clear Hero Background Color"
|
|
3154
|
+
}
|
|
3155
|
+
),
|
|
3141
3156
|
/* @__PURE__ */ jsxs("label", { style: sidebarLabelStyle, children: [
|
|
3142
3157
|
"Upload Hero Background Image",
|
|
3143
3158
|
/* @__PURE__ */ jsx(
|