funuicss 3.7.11 β 3.7.13
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/css/fun.css +2 -1
- package/package.json +1 -1
- package/ui/select/Select.d.ts +2 -1
- package/ui/select/Select.js +2 -2
- package/ui/theme/theme.js +0 -6
- package/ui/video/Video.d.ts +2 -1
- package/ui/video/Video.js +3 -3
- package/ui/vista/Vista.d.ts +22 -2
- package/ui/vista/Vista.js +252 -75
package/css/fun.css
CHANGED
|
@@ -1062,6 +1062,8 @@ link:hover {
|
|
|
1062
1062
|
|
|
1063
1063
|
|
|
1064
1064
|
|
|
1065
|
+
|
|
1066
|
+
|
|
1065
1067
|
.roundBtn {
|
|
1066
1068
|
border-radius: 100rem;
|
|
1067
1069
|
}
|
|
@@ -4324,7 +4326,6 @@ opacity: 1;
|
|
|
4324
4326
|
color: white;
|
|
4325
4327
|
}
|
|
4326
4328
|
|
|
4327
|
-
|
|
4328
4329
|
.vista{
|
|
4329
4330
|
display: flex;
|
|
4330
4331
|
align-items: center;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "3.7.
|
|
2
|
+
"version": "3.7.13",
|
|
3
3
|
"name": "funuicss",
|
|
4
4
|
"description": "React and Next.js component UI Library for creating Easy and good looking websites with fewer lines of code. Elevate your web development experience with our cutting-edge React/Next.js component UI Library. Craft stunning websites effortlessly, boasting both seamless functionality and aesthetic appealβall achieved with minimal lines of code. Unleash the power of simplicity and style in your projects!",
|
|
5
5
|
"main": "index.js",
|
package/ui/select/Select.d.ts
CHANGED
package/ui/select/Select.js
CHANGED
|
@@ -57,7 +57,7 @@ var Select = function (_a) {
|
|
|
57
57
|
(0, react_1.useEffect)(function () {
|
|
58
58
|
if (searchQuery) {
|
|
59
59
|
var filtered = options.filter(function (option) {
|
|
60
|
-
return option.text.toLowerCase().includes(searchQuery.toLowerCase());
|
|
60
|
+
return (option.text || option.label || "").toLowerCase().includes(searchQuery.toLowerCase());
|
|
61
61
|
});
|
|
62
62
|
setFilteredOptions(filtered);
|
|
63
63
|
setFocusedIndex(filtered.length > 0 ? 0 : -1);
|
|
@@ -208,7 +208,7 @@ var Select = function (_a) {
|
|
|
208
208
|
pointerEvents: 'none'
|
|
209
209
|
}, tabIndex: -1 },
|
|
210
210
|
!label && react_1.default.createElement("option", { value: "" }, "Select an option"),
|
|
211
|
-
options.map(function (option) { return (react_1.default.createElement("option", { key: option.value, value: option.value }, option.text)); })),
|
|
211
|
+
options.map(function (option) { return (react_1.default.createElement("option", { key: option.value, value: option.value }, option.text || option.label || option.value)); })),
|
|
212
212
|
react_1.default.createElement("div", { ref: triggerRef, className: "".concat(funcss, " ").concat(rounded && 'round-edge', " ").concat(getTriggerClasses()), onClick: openDropdown, onKeyDown: handleKeyDown, tabIndex: disabled ? -1 : 0, role: "button", "aria-expanded": isOpen, "aria-haspopup": "listbox" },
|
|
213
213
|
react_1.default.createElement("span", { className: "select-value ".concat(!selectedOption ? 'select-placeholder' : '') }, selectedOption ? selectedOption.text : label),
|
|
214
214
|
react_1.default.createElement("div", { className: "select-arrow ".concat(isOpen ? 'open' : '') },
|
package/ui/theme/theme.js
CHANGED
|
@@ -146,7 +146,6 @@ var validateOriginAccess = function (projectId) { return __awaiter(void 0, void
|
|
|
146
146
|
console.log('π Trusted domains:', trustedDomains.map(function (d) { return d.domain; }));
|
|
147
147
|
return [2 /*return*/, false];
|
|
148
148
|
}
|
|
149
|
-
console.log('β
Origin validation passed');
|
|
150
149
|
return [2 /*return*/, true];
|
|
151
150
|
case 3:
|
|
152
151
|
error_1 = _a.sent();
|
|
@@ -174,7 +173,6 @@ var loadLocalTheme = function () { return __awaiter(void 0, void 0, void 0, func
|
|
|
174
173
|
return [4 /*yield*/, response.json()];
|
|
175
174
|
case 2:
|
|
176
175
|
data = _a.sent();
|
|
177
|
-
console.log('β
Loaded theme from local file');
|
|
178
176
|
return [2 /*return*/, data];
|
|
179
177
|
case 3: return [3 /*break*/, 5];
|
|
180
178
|
case 4:
|
|
@@ -210,7 +208,6 @@ var loadThemeFromCDN = function (projectId) { return __awaiter(void 0, void 0, v
|
|
|
210
208
|
return [4 /*yield*/, response.json()];
|
|
211
209
|
case 3:
|
|
212
210
|
data = _a.sent();
|
|
213
|
-
console.log('β
Loaded theme from Firebase Storage CDN');
|
|
214
211
|
return [2 /*return*/, data];
|
|
215
212
|
case 4:
|
|
216
213
|
console.error('β Firebase Storage fetch failed:', response.status, response.statusText);
|
|
@@ -327,7 +324,6 @@ var ThemeProvider = function (_a) {
|
|
|
327
324
|
switch (_a.label) {
|
|
328
325
|
case 0:
|
|
329
326
|
_a.trys.push([0, 8, 9, 10]);
|
|
330
|
-
console.log('π Starting theme loading process...');
|
|
331
327
|
finalTheme = null;
|
|
332
328
|
finalVersion = null;
|
|
333
329
|
return [4 /*yield*/, loadLocalTheme()];
|
|
@@ -335,7 +331,6 @@ var ThemeProvider = function (_a) {
|
|
|
335
331
|
localTheme = _a.sent();
|
|
336
332
|
localVersion = (localTheme === null || localTheme === void 0 ? void 0 : localTheme.version) || 0;
|
|
337
333
|
if (!projectId) return [3 /*break*/, 6];
|
|
338
|
-
console.log('π Project ID provided, attempting CDN load with origin validation...');
|
|
339
334
|
return [4 /*yield*/, validateOriginAccess(projectId)];
|
|
340
335
|
case 2:
|
|
341
336
|
hasAccess = _a.sent();
|
|
@@ -352,7 +347,6 @@ var ThemeProvider = function (_a) {
|
|
|
352
347
|
console.log("\uD83D\uDD04 Version mismatch: Local(".concat(localVersion, ") vs CDN(").concat(cdnVersion, ")"));
|
|
353
348
|
console.log('βΉοΈ Using CDN version. Please update your local funui.json file manually.');
|
|
354
349
|
}
|
|
355
|
-
console.log('β
Theme loaded from CDN');
|
|
356
350
|
}
|
|
357
351
|
else if (localTheme) {
|
|
358
352
|
// CDN not available but we have local theme
|
package/ui/video/Video.d.ts
CHANGED
|
@@ -43,8 +43,9 @@ interface VideoProps {
|
|
|
43
43
|
rewindCss?: string;
|
|
44
44
|
forwardCss?: string;
|
|
45
45
|
buttonCss?: string;
|
|
46
|
+
style?: React.CSSProperties;
|
|
46
47
|
volumeStyle?: 'slider' | 'compact' | 'hover';
|
|
47
48
|
variant?: string;
|
|
48
49
|
}
|
|
49
|
-
export default function Video({ src, poster, onDuration, onEnded, isPause, spacebarPlay, className, autoPlay, showControls, showPlayPause, showProgress, showVolume, showTime, showFullscreen, showDownload, showSeekButtons, playIcon, pauseIcon, fullscreenIcon, downloadIcon, volumeIcon, muteIcon, rewindIcon, forwardIcon, hideControlsDelay, loop, muted, seekAmount, funcss, containerCss, videoCss, controlsCss, progressCss, progressBarCss, timeCss, playCss, pauseCss, volumeCss, fullscreenCss, downloadCss, rewindCss, forwardCss, buttonCss, volumeStyle, variant, ...rest }: VideoProps): React.JSX.Element;
|
|
50
|
+
export default function Video({ src, poster, onDuration, onEnded, isPause, spacebarPlay, className, autoPlay, showControls, showPlayPause, showProgress, showVolume, showTime, showFullscreen, showDownload, showSeekButtons, playIcon, pauseIcon, fullscreenIcon, downloadIcon, volumeIcon, muteIcon, rewindIcon, forwardIcon, hideControlsDelay, loop, muted, seekAmount, funcss, containerCss, videoCss, controlsCss, progressCss, progressBarCss, timeCss, playCss, pauseCss, volumeCss, fullscreenCss, downloadCss, rewindCss, forwardCss, buttonCss, volumeStyle, style, variant, ...rest }: VideoProps): React.JSX.Element;
|
|
50
51
|
export {};
|
package/ui/video/Video.js
CHANGED
|
@@ -222,10 +222,10 @@ var useComponentConfiguration = function (componentName, variant) {
|
|
|
222
222
|
function Video(_a) {
|
|
223
223
|
var _this = this;
|
|
224
224
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
|
|
225
|
-
var src = _a.src, poster = _a.poster, onDuration = _a.onDuration, onEnded = _a.onEnded, isPause = _a.isPause, spacebarPlay = _a.spacebarPlay, _8 = _a.className, className = _8 === void 0 ? '' : _8, autoPlay = _a.autoPlay, showControls = _a.showControls, showPlayPause = _a.showPlayPause, showProgress = _a.showProgress, showVolume = _a.showVolume, showTime = _a.showTime, showFullscreen = _a.showFullscreen, showDownload = _a.showDownload, showSeekButtons = _a.showSeekButtons, playIcon = _a.playIcon, pauseIcon = _a.pauseIcon, fullscreenIcon = _a.fullscreenIcon, downloadIcon = _a.downloadIcon, volumeIcon = _a.volumeIcon, muteIcon = _a.muteIcon, rewindIcon = _a.rewindIcon, forwardIcon = _a.forwardIcon, hideControlsDelay = _a.hideControlsDelay, loop = _a.loop, muted = _a.muted, seekAmount = _a.seekAmount, _9 = _a.funcss, funcss = _9 === void 0 ? '' : _9, _10 = _a.containerCss, containerCss = _10 === void 0 ? '' : _10, _11 = _a.videoCss, videoCss = _11 === void 0 ? '' : _11, _12 = _a.controlsCss, controlsCss = _12 === void 0 ? '' : _12, _13 = _a.progressCss, progressCss = _13 === void 0 ? '' : _13, _14 = _a.progressBarCss, progressBarCss = _14 === void 0 ? '' : _14, _15 = _a.timeCss, timeCss = _15 === void 0 ? '' : _15, _16 = _a.playCss, playCss = _16 === void 0 ? '' : _16, _17 = _a.pauseCss, pauseCss = _17 === void 0 ? '' : _17, _18 = _a.volumeCss, volumeCss = _18 === void 0 ? '' : _18, _19 = _a.fullscreenCss, fullscreenCss = _19 === void 0 ? '' : _19, _20 = _a.downloadCss, downloadCss = _20 === void 0 ? '' : _20, _21 = _a.rewindCss, rewindCss = _21 === void 0 ? '' : _21, _22 = _a.forwardCss, forwardCss = _22 === void 0 ? '' : _22, _23 = _a.buttonCss, buttonCss = _23 === void 0 ? '' : _23, _24 = _a.volumeStyle, volumeStyle = _24 === void 0 ? 'slider' : _24, _25 = _a.variant, variant = _25 === void 0 ? '' : _25, rest = __rest(_a, ["src", "poster", "onDuration", "onEnded", "isPause", "spacebarPlay", "className", "autoPlay", "showControls", "showPlayPause", "showProgress", "showVolume", "showTime", "showFullscreen", "showDownload", "showSeekButtons", "playIcon", "pauseIcon", "fullscreenIcon", "downloadIcon", "volumeIcon", "muteIcon", "rewindIcon", "forwardIcon", "hideControlsDelay", "loop", "muted", "seekAmount", "funcss", "containerCss", "videoCss", "controlsCss", "progressCss", "progressBarCss", "timeCss", "playCss", "pauseCss", "volumeCss", "fullscreenCss", "downloadCss", "rewindCss", "forwardCss", "buttonCss", "volumeStyle", "variant"]);
|
|
225
|
+
var src = _a.src, poster = _a.poster, onDuration = _a.onDuration, onEnded = _a.onEnded, isPause = _a.isPause, spacebarPlay = _a.spacebarPlay, _8 = _a.className, className = _8 === void 0 ? '' : _8, autoPlay = _a.autoPlay, showControls = _a.showControls, showPlayPause = _a.showPlayPause, showProgress = _a.showProgress, showVolume = _a.showVolume, showTime = _a.showTime, showFullscreen = _a.showFullscreen, showDownload = _a.showDownload, showSeekButtons = _a.showSeekButtons, playIcon = _a.playIcon, pauseIcon = _a.pauseIcon, fullscreenIcon = _a.fullscreenIcon, downloadIcon = _a.downloadIcon, volumeIcon = _a.volumeIcon, muteIcon = _a.muteIcon, rewindIcon = _a.rewindIcon, forwardIcon = _a.forwardIcon, hideControlsDelay = _a.hideControlsDelay, loop = _a.loop, muted = _a.muted, seekAmount = _a.seekAmount, _9 = _a.funcss, funcss = _9 === void 0 ? '' : _9, _10 = _a.containerCss, containerCss = _10 === void 0 ? '' : _10, _11 = _a.videoCss, videoCss = _11 === void 0 ? '' : _11, _12 = _a.controlsCss, controlsCss = _12 === void 0 ? '' : _12, _13 = _a.progressCss, progressCss = _13 === void 0 ? '' : _13, _14 = _a.progressBarCss, progressBarCss = _14 === void 0 ? '' : _14, _15 = _a.timeCss, timeCss = _15 === void 0 ? '' : _15, _16 = _a.playCss, playCss = _16 === void 0 ? '' : _16, _17 = _a.pauseCss, pauseCss = _17 === void 0 ? '' : _17, _18 = _a.volumeCss, volumeCss = _18 === void 0 ? '' : _18, _19 = _a.fullscreenCss, fullscreenCss = _19 === void 0 ? '' : _19, _20 = _a.downloadCss, downloadCss = _20 === void 0 ? '' : _20, _21 = _a.rewindCss, rewindCss = _21 === void 0 ? '' : _21, _22 = _a.forwardCss, forwardCss = _22 === void 0 ? '' : _22, _23 = _a.buttonCss, buttonCss = _23 === void 0 ? '' : _23, _24 = _a.volumeStyle, volumeStyle = _24 === void 0 ? 'slider' : _24, style = _a.style, _25 = _a.variant, variant = _25 === void 0 ? '' : _25, rest = __rest(_a, ["src", "poster", "onDuration", "onEnded", "isPause", "spacebarPlay", "className", "autoPlay", "showControls", "showPlayPause", "showProgress", "showVolume", "showTime", "showFullscreen", "showDownload", "showSeekButtons", "playIcon", "pauseIcon", "fullscreenIcon", "downloadIcon", "volumeIcon", "muteIcon", "rewindIcon", "forwardIcon", "hideControlsDelay", "loop", "muted", "seekAmount", "funcss", "containerCss", "videoCss", "controlsCss", "progressCss", "progressBarCss", "timeCss", "playCss", "pauseCss", "volumeCss", "fullscreenCss", "downloadCss", "rewindCss", "forwardCss", "buttonCss", "volumeStyle", "style", "variant"]);
|
|
226
226
|
var mergeWithLocal = useComponentConfiguration('Video', variant).mergeWithLocal;
|
|
227
227
|
// Create local props object - these will override config props
|
|
228
|
-
var localProps = __assign({ src: src, poster: poster, onDuration: onDuration, onEnded: onEnded, isPause: isPause, spacebarPlay: spacebarPlay, className: className, autoPlay: autoPlay, showControls: showControls, showPlayPause: showPlayPause, showProgress: showProgress, showVolume: showVolume, showTime: showTime, showFullscreen: showFullscreen, showDownload: showDownload, showSeekButtons: showSeekButtons, playIcon: playIcon, pauseIcon: pauseIcon, fullscreenIcon: fullscreenIcon, downloadIcon: downloadIcon, volumeIcon: volumeIcon, muteIcon: muteIcon, rewindIcon: rewindIcon, forwardIcon: forwardIcon, hideControlsDelay: hideControlsDelay, loop: loop, muted: muted, seekAmount: seekAmount, funcss: funcss, containerCss: containerCss, videoCss: videoCss, controlsCss: controlsCss, progressCss: progressCss, progressBarCss: progressBarCss, timeCss: timeCss, playCss: playCss, pauseCss: pauseCss, volumeCss: volumeCss, fullscreenCss: fullscreenCss, downloadCss: downloadCss, rewindCss: rewindCss, forwardCss: forwardCss, buttonCss: buttonCss, volumeStyle: volumeStyle }, rest);
|
|
228
|
+
var localProps = __assign({ src: src, poster: poster, onDuration: onDuration, onEnded: onEnded, isPause: isPause, spacebarPlay: spacebarPlay, className: className, autoPlay: autoPlay, showControls: showControls, showPlayPause: showPlayPause, showProgress: showProgress, showVolume: showVolume, showTime: showTime, showFullscreen: showFullscreen, showDownload: showDownload, showSeekButtons: showSeekButtons, playIcon: playIcon, pauseIcon: pauseIcon, fullscreenIcon: fullscreenIcon, downloadIcon: downloadIcon, volumeIcon: volumeIcon, muteIcon: muteIcon, rewindIcon: rewindIcon, forwardIcon: forwardIcon, hideControlsDelay: hideControlsDelay, loop: loop, muted: muted, seekAmount: seekAmount, funcss: funcss, containerCss: containerCss, videoCss: videoCss, controlsCss: controlsCss, progressCss: progressCss, progressBarCss: progressBarCss, timeCss: timeCss, playCss: playCss, pauseCss: pauseCss, volumeCss: volumeCss, fullscreenCss: fullscreenCss, downloadCss: downloadCss, rewindCss: rewindCss, forwardCss: forwardCss, buttonCss: buttonCss, volumeStyle: volumeStyle, style: style }, rest);
|
|
229
229
|
// Merge with config - LOCAL PROPS OVERRIDE CONFIG
|
|
230
230
|
var mergedProps = mergeWithLocal(localProps).props;
|
|
231
231
|
// Extract final values - local props take precedence
|
|
@@ -606,7 +606,7 @@ function Video(_a) {
|
|
|
606
606
|
};
|
|
607
607
|
return (react_1.default.createElement("div", { ref: containerRef, className: "video_container fit ".concat(final.funcss, " ").concat(final.containerCss, " ").concat(final.className), onClick: handleVideoClick },
|
|
608
608
|
final.poster && !hasStarted && !isPlaying && (react_1.default.createElement("div", { style: { backgroundImage: "url(".concat(final.poster, ")") }, className: "video_poster" })),
|
|
609
|
-
react_1.default.createElement("video", { ref: videoRef, preload: "auto", src: final.src, className: "video_player fit min-w-200 ".concat(final.videoCss), onLoadedMetadata: handleLoadedMetadata, playsInline: true, controls: false, loop: final.loop, muted: final.muted }),
|
|
609
|
+
react_1.default.createElement("video", { ref: videoRef, preload: "auto", autoPlay: final.autoPlay, style: style, src: final.src, className: "video_player fit min-w-200 ".concat(final.videoCss), onLoadedMetadata: handleLoadedMetadata, playsInline: true, controls: false, loop: final.loop, muted: final.muted }),
|
|
610
610
|
final.showControls && (react_1.default.createElement("div", { className: "video_controls ".concat(final.controlsCss, " ").concat(showControlsState ? 'show_controls' : 'hide_controls') },
|
|
611
611
|
react_1.default.createElement(RowFlex_1.default, { gap: 1, justify: "space-between", alignItems: "center", className: "controls-row" },
|
|
612
612
|
react_1.default.createElement(RowFlex_1.default, { gap: 0.5, alignItems: "center", funcss: 'videoLeftContainer' },
|
package/ui/vista/Vista.d.ts
CHANGED
|
@@ -44,11 +44,12 @@ type VistaProps = {
|
|
|
44
44
|
gradientSize?: string;
|
|
45
45
|
gradientColors?: string;
|
|
46
46
|
fade?: boolean;
|
|
47
|
+
fadeColor?: string;
|
|
47
48
|
fadeDirection?: 'top' | 'bottom' | 'left' | 'right';
|
|
48
49
|
fadeRadial?: boolean;
|
|
49
|
-
fadeOverlayDarken?: number;
|
|
50
|
-
backgroundImage?: string;
|
|
51
50
|
variant?: string;
|
|
51
|
+
mediaSize?: string;
|
|
52
|
+
mediaCss?: string;
|
|
52
53
|
showPrimaryCTA?: boolean;
|
|
53
54
|
showSecondaryCTA?: boolean;
|
|
54
55
|
showAccentCTA?: boolean;
|
|
@@ -84,6 +85,25 @@ type VistaProps = {
|
|
|
84
85
|
accentButtonSmall?: boolean;
|
|
85
86
|
ctaGap?: number;
|
|
86
87
|
ctaFlexJustify?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around';
|
|
88
|
+
mediaType?: 'image' | 'video' | 'iframe' | 'custom';
|
|
89
|
+
videoUrl?: string;
|
|
90
|
+
videoAutoplay?: boolean;
|
|
91
|
+
videoLoop?: boolean;
|
|
92
|
+
videoMuted?: boolean;
|
|
93
|
+
videoPoster?: string;
|
|
94
|
+
videoControls?: boolean;
|
|
95
|
+
iframeUrl?: string;
|
|
96
|
+
iframeSize?: string;
|
|
97
|
+
customMedia?: React.ReactNode;
|
|
98
|
+
imageOverlay?: boolean;
|
|
99
|
+
imageOverlayColor?: string;
|
|
100
|
+
imageOverlayOpacity?: number;
|
|
101
|
+
imageFilter?: 'grayscale' | 'sepia' | 'blur' | 'brightness' | 'contrast' | 'none';
|
|
102
|
+
imageFilterValue?: number;
|
|
103
|
+
imageBlendMode?: 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten';
|
|
104
|
+
hoverEffect?: 'lift' | 'scale' | 'tilt' | 'glow' | 'none';
|
|
105
|
+
parallax?: boolean;
|
|
106
|
+
parallaxSpeed?: number;
|
|
87
107
|
};
|
|
88
108
|
declare const Vista: React.FC<VistaProps>;
|
|
89
109
|
export default Vista;
|
package/ui/vista/Vista.js
CHANGED
|
@@ -11,56 +11,210 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
return __assign.apply(this, arguments);
|
|
13
13
|
};
|
|
14
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
17
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
18
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
19
|
+
}
|
|
20
|
+
Object.defineProperty(o, k2, desc);
|
|
21
|
+
}) : (function(o, m, k, k2) {
|
|
22
|
+
if (k2 === undefined) k2 = k;
|
|
23
|
+
o[k2] = m[k];
|
|
24
|
+
}));
|
|
25
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
26
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
27
|
+
}) : function(o, v) {
|
|
28
|
+
o["default"] = v;
|
|
29
|
+
});
|
|
30
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
31
|
+
var ownKeys = function(o) {
|
|
32
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
33
|
+
var ar = [];
|
|
34
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
35
|
+
return ar;
|
|
36
|
+
};
|
|
37
|
+
return ownKeys(o);
|
|
38
|
+
};
|
|
39
|
+
return function (mod) {
|
|
40
|
+
if (mod && mod.__esModule) return mod;
|
|
41
|
+
var result = {};
|
|
42
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
43
|
+
__setModuleDefault(result, mod);
|
|
44
|
+
return result;
|
|
45
|
+
};
|
|
46
|
+
})();
|
|
14
47
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
48
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
49
|
};
|
|
17
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
var react_1 =
|
|
19
|
-
var ScrollInView_1 = __importDefault(require("../ScrollInView/ScrollInView"));
|
|
51
|
+
var react_1 = __importStar(require("react"));
|
|
20
52
|
var getCssVariable_1 = require("../../utils/getCssVariable");
|
|
21
53
|
var componentUtils_1 = require("../../utils/componentUtils");
|
|
22
54
|
var Text_1 = __importDefault(require("../text/Text"));
|
|
23
|
-
var Col_1 = __importDefault(require("../grid/Col"));
|
|
24
55
|
var Button_1 = __importDefault(require("../button/Button"));
|
|
25
56
|
var Flex_1 = __importDefault(require("../flex/Flex"));
|
|
57
|
+
var Video_1 = __importDefault(require("../video/Video"));
|
|
26
58
|
var Vista = function (localProps) {
|
|
27
|
-
// Use the component config hook with the variant from localProps
|
|
28
59
|
var mergeWithLocal = (0, componentUtils_1.useComponentConfiguration)('Vista', localProps.variant).mergeWithLocal;
|
|
29
|
-
// Merge config with local props - local props override config
|
|
30
60
|
var mergedProps = mergeWithLocal(localProps).props;
|
|
31
|
-
// Use mergedProps directly - they already have the correct merge logic applied
|
|
32
61
|
var final = mergedProps;
|
|
62
|
+
var _a = (0, react_1.useState)(0), scrollY = _a[0], setScrollY = _a[1];
|
|
63
|
+
var sectionRef = (0, react_1.useRef)(null);
|
|
64
|
+
// Parallax effect
|
|
65
|
+
(0, react_1.useEffect)(function () {
|
|
66
|
+
if (!final.parallax)
|
|
67
|
+
return;
|
|
68
|
+
var handleScroll = function () {
|
|
69
|
+
if (sectionRef.current) {
|
|
70
|
+
var rect = sectionRef.current.getBoundingClientRect();
|
|
71
|
+
var scrollProgress = -rect.top;
|
|
72
|
+
setScrollY(scrollProgress * (final.parallaxSpeed || 0.5));
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
window.addEventListener('scroll', handleScroll);
|
|
76
|
+
return function () { return window.removeEventListener('scroll', handleScroll); };
|
|
77
|
+
}, [final.parallax, final.parallaxSpeed]);
|
|
78
|
+
// Get media size - updated logic
|
|
79
|
+
var getMediaSize = function () {
|
|
80
|
+
// Priority order:
|
|
81
|
+
// 1. If imageSize is passed for images, use it
|
|
82
|
+
// 2. If iframeSize is passed for iframes, use it
|
|
83
|
+
// 3. Otherwise use mediaSize
|
|
84
|
+
// 4. Fallback to undefined
|
|
85
|
+
if (final.mediaType === 'image' && final.imageSize) {
|
|
86
|
+
return final.imageSize;
|
|
87
|
+
}
|
|
88
|
+
if (final.mediaType === 'iframe' && final.iframeSize) {
|
|
89
|
+
return final.iframeSize;
|
|
90
|
+
}
|
|
91
|
+
if (final.mediaSize) {
|
|
92
|
+
return final.mediaSize;
|
|
93
|
+
}
|
|
94
|
+
return undefined;
|
|
95
|
+
};
|
|
33
96
|
var layoutClass = [
|
|
34
|
-
final.layout,
|
|
97
|
+
final.layout || 'centered',
|
|
35
98
|
final.reverse ? 'reverse' : '',
|
|
36
|
-
"text-".concat(final.textAlign),
|
|
99
|
+
"text-".concat(final.textAlign || 'left'),
|
|
37
100
|
]
|
|
38
101
|
.filter(Boolean)
|
|
39
102
|
.join(' ');
|
|
103
|
+
// Hover effect class
|
|
104
|
+
var getHoverClass = function () {
|
|
105
|
+
if (!final.hoverEffect || final.hoverEffect === 'none')
|
|
106
|
+
return '';
|
|
107
|
+
return "vista-hover-".concat(final.hoverEffect);
|
|
108
|
+
};
|
|
109
|
+
// Filter styles helper
|
|
110
|
+
var getFilterStyle = function (filter, filterValue) {
|
|
111
|
+
if (!filter || filter === 'none')
|
|
112
|
+
return '';
|
|
113
|
+
var value = filterValue || 1;
|
|
114
|
+
switch (filter) {
|
|
115
|
+
case 'grayscale':
|
|
116
|
+
return "grayscale(".concat(value, ")");
|
|
117
|
+
case 'sepia':
|
|
118
|
+
return "sepia(".concat(value, ")");
|
|
119
|
+
case 'blur':
|
|
120
|
+
return "blur(".concat(value, "px)");
|
|
121
|
+
case 'brightness':
|
|
122
|
+
return "brightness(".concat(value, ")");
|
|
123
|
+
case 'contrast':
|
|
124
|
+
return "contrast(".concat(value, ")");
|
|
125
|
+
default:
|
|
126
|
+
return '';
|
|
127
|
+
}
|
|
128
|
+
};
|
|
40
129
|
// CTA Buttons Component
|
|
41
130
|
var CTAButtons = function () {
|
|
42
131
|
var hasCTAs = final.showPrimaryCTA || final.showSecondaryCTA || final.showAccentCTA;
|
|
43
132
|
if (!hasCTAs)
|
|
44
133
|
return null;
|
|
45
|
-
return (react_1.default.createElement(Flex_1.default, { gap: final.ctaGap, justify: final.ctaFlexJustify, className: "mt-6 ".concat(final.ctaClass), wrap: "wrap", width: '100%' },
|
|
134
|
+
return (react_1.default.createElement(Flex_1.default, { gap: final.ctaGap, justify: final.ctaFlexJustify, className: "mt-6 ".concat(final.ctaClass || ''), wrap: "wrap", width: '100%' },
|
|
46
135
|
final.showPrimaryCTA && (react_1.default.createElement(Button_1.default, { bg: "primary", outlined: final.primaryButtonOutlined, onClick: function () { return final.ctaPrimaryUrl && (window.location.href = final.ctaPrimaryUrl); }, rounded: final.ctaPrimaryRounded, flat: final.ctaPrimaryFlat, stringPrefix: final.ctaPrimaryPrefix, stringSuffix: final.ctaPrimarySuffix, iconSize: final.primaryIconSize, funcss: final.primaryButtonFuncss, small: final.primaryButtonSmall }, final.ctaPrimaryText)),
|
|
47
136
|
final.showSecondaryCTA && (react_1.default.createElement(Button_1.default, { bg: "secondary", outlined: final.secondaryButtonOutlined, onClick: function () { return final.ctaSecondaryUrl && (window.location.href = final.ctaSecondaryUrl); }, rounded: final.ctaSecondaryRounded, flat: final.ctaSecondaryFlat, stringPrefix: final.ctaSecondaryPrefix, stringSuffix: final.ctaSecondarySuffix, iconSize: final.secondaryIconSize, funcss: final.secondaryButtonFuncss, small: final.secondaryButtonSmall }, final.ctaSecondaryText)),
|
|
48
137
|
final.showAccentCTA && (react_1.default.createElement(Button_1.default, { bg: "accent", outlined: final.accentButtonOutlined, onClick: function () { return final.ctaAccentUrl && (window.location.href = final.ctaAccentUrl); }, rounded: final.ctaAccentRounded, flat: final.ctaAccentFlat, stringPrefix: final.ctaAccentPrefix, stringSuffix: final.ctaAccentSuffix, iconSize: final.accentIconSize, funcss: final.accentButtonFuncss, small: final.accentButtonSmall }, final.ctaAccentText))));
|
|
49
138
|
};
|
|
50
|
-
// Enhanced Text Content
|
|
51
|
-
var TextContent = (react_1.default.createElement("div", { className: "vista-text ".concat(final.layout === 'centered' ? "text-center" : "", " ").concat(final.textWrapperClass) },
|
|
139
|
+
// Enhanced Text Content
|
|
140
|
+
var TextContent = (react_1.default.createElement("div", { className: "vista-text ".concat(final.layout === 'centered' ? "text-center" : "", " ").concat(final.textWrapperClass || '') },
|
|
52
141
|
final.heading && (react_1.default.createElement(Text_1.default, { block: true, size: final.headingSize, weight: final.headingWeight, color: final.headingColor, funcss: final.headingClass }, final.heading)),
|
|
53
|
-
final.subheading && (react_1.default.createElement(Text_1.default, { block: true, size: final.subheadingSize, weight: final.subheadingWeight, color: final.subheadingColor, funcss: "mt-2 ".concat(final.subheadingClass) }, final.subheading)),
|
|
54
|
-
final.content && (react_1.default.createElement(Text_1.default, { block: true, size: final.contentSize, weight: final.contentWeight, color: final.contentColor, funcss: "mt-4 ".concat(final.contentClass), article: true }, localProps.children || (typeof final.content === 'string' ? react_1.default.createElement("div", { dangerouslySetInnerHTML: { __html: final.content } }) : final.content))),
|
|
55
|
-
final.cta ? (react_1.default.createElement("div", { className: "mt-6 ".concat(final.ctaClass) }, final.cta)) : (react_1.default.createElement(CTAButtons, null))));
|
|
56
|
-
// Enhanced
|
|
57
|
-
var
|
|
142
|
+
final.subheading && (react_1.default.createElement(Text_1.default, { block: true, size: final.subheadingSize, weight: final.subheadingWeight, color: final.subheadingColor, funcss: "mt-2 ".concat(final.subheadingClass || '') }, final.subheading)),
|
|
143
|
+
final.content && (react_1.default.createElement(Text_1.default, { block: true, size: final.contentSize, weight: final.contentWeight, color: final.contentColor, funcss: "mt-4 ".concat(final.contentClass || ''), article: true }, localProps.children || (typeof final.content === 'string' ? react_1.default.createElement("div", { dangerouslySetInnerHTML: { __html: final.content } }) : final.content))),
|
|
144
|
+
final.cta ? (react_1.default.createElement("div", { className: "mt-6 ".concat(final.ctaClass || '') }, final.cta)) : (react_1.default.createElement(CTAButtons, null))));
|
|
145
|
+
// Enhanced Media Content
|
|
146
|
+
var MediaContent = function () {
|
|
147
|
+
var _a;
|
|
148
|
+
var mediaType = final.mediaType || 'image';
|
|
149
|
+
var hasMedia = final.image || final.imageUrl || final.videoUrl || final.iframeUrl || final.customMedia;
|
|
150
|
+
if (!hasMedia)
|
|
151
|
+
return null;
|
|
152
|
+
var mediaSize = getMediaSize();
|
|
153
|
+
var mediaWrapperStyle = {
|
|
154
|
+
position: 'relative',
|
|
155
|
+
transform: final.parallax ? "translateY(".concat(scrollY, "px)") : undefined,
|
|
156
|
+
transition: final.parallax ? 'transform 0.1s linear' : undefined,
|
|
157
|
+
width: '100%',
|
|
158
|
+
maxWidth: mediaSize || '100%',
|
|
159
|
+
margin: '0 auto',
|
|
160
|
+
};
|
|
161
|
+
var mediaStyle = {
|
|
58
162
|
objectFit: 'cover',
|
|
59
|
-
maxWidth:
|
|
60
|
-
|
|
61
|
-
|
|
163
|
+
maxWidth: mediaSize,
|
|
164
|
+
width: '100%',
|
|
165
|
+
borderRadius: 'inherit',
|
|
166
|
+
filter: getFilterStyle(final.imageFilter, final.imageFilterValue),
|
|
167
|
+
mixBlendMode: final.imageBlendMode,
|
|
168
|
+
};
|
|
169
|
+
var overlayStyle = final.imageOverlay ? {
|
|
170
|
+
position: 'absolute',
|
|
171
|
+
inset: 0,
|
|
172
|
+
backgroundColor: final.imageOverlayColor || 'rgba(0, 0, 0, 0.3)',
|
|
173
|
+
opacity: (_a = final.imageOverlayOpacity) !== null && _a !== void 0 ? _a : 1,
|
|
174
|
+
pointerEvents: 'none',
|
|
175
|
+
borderRadius: 'inherit',
|
|
176
|
+
zIndex: 1,
|
|
177
|
+
} : {};
|
|
178
|
+
return (react_1.default.createElement("div", { className: "vista-media ".concat(final.mediaCss || '', " ").concat(final.imageWrapperClass || ''), style: mediaWrapperStyle },
|
|
179
|
+
mediaType === 'custom' && final.customMedia && (react_1.default.createElement("div", { style: { position: 'relative', width: '100%' } },
|
|
180
|
+
final.customMedia,
|
|
181
|
+
final.imageOverlay && react_1.default.createElement("div", { style: overlayStyle }))),
|
|
182
|
+
mediaType === 'video' && final.videoUrl && (react_1.default.createElement("div", { style: { position: 'relative', maxWidth: mediaSize, width: '100%', aspectRatio: '16/9', margin: '0 auto' } },
|
|
183
|
+
react_1.default.createElement(Video_1.default, { src: final.videoUrl, autoPlay: final.videoAutoplay, loop: final.videoLoop, muted: final.videoMuted, poster: final.videoPoster, funcss: final.imageClass || '', style: {
|
|
184
|
+
filter: getFilterStyle(final.imageFilter, final.imageFilterValue),
|
|
185
|
+
mixBlendMode: final.imageBlendMode,
|
|
186
|
+
} }),
|
|
187
|
+
final.imageOverlay && react_1.default.createElement("div", { style: overlayStyle }))),
|
|
188
|
+
mediaType === 'iframe' && final.iframeUrl && (react_1.default.createElement("div", { className: "vista-iframe-wrapper", style: {
|
|
189
|
+
position: 'relative',
|
|
190
|
+
width: '100%',
|
|
191
|
+
maxWidth: mediaSize || '100%',
|
|
192
|
+
aspectRatio: '16/9',
|
|
193
|
+
margin: '0 auto',
|
|
194
|
+
} },
|
|
195
|
+
react_1.default.createElement("div", { style: {
|
|
196
|
+
position: 'relative',
|
|
197
|
+
width: '100%',
|
|
198
|
+
height: '100%',
|
|
199
|
+
filter: getFilterStyle(final.imageFilter, final.imageFilterValue),
|
|
200
|
+
mixBlendMode: final.imageBlendMode,
|
|
201
|
+
} },
|
|
202
|
+
react_1.default.createElement("iframe", { src: final.iframeUrl, className: "vista-iframe ".concat(final.imageClass || ''), style: {
|
|
203
|
+
width: '100%',
|
|
204
|
+
height: '100%',
|
|
205
|
+
border: 'none',
|
|
206
|
+
borderRadius: 'inherit',
|
|
207
|
+
display: 'block',
|
|
208
|
+
}, allowFullScreen: true, allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture", title: "Vista iframe content" }),
|
|
209
|
+
final.imageOverlay && react_1.default.createElement("div", { style: overlayStyle })))),
|
|
210
|
+
mediaType === 'image' && (final.image || final.imageUrl) && (react_1.default.createElement("div", { style: { position: 'relative', width: '100%' } },
|
|
211
|
+
final.image ? (react_1.default.createElement("div", { style: { width: '100%', maxWidth: mediaSize, margin: '0 auto' } }, final.image)) : (react_1.default.createElement("img", { src: final.imageUrl, alt: final.imageAlt || 'Vista image', className: final.imageClass || '', style: mediaStyle, loading: "lazy" })),
|
|
212
|
+
final.imageOverlay && react_1.default.createElement("div", { style: overlayStyle })))));
|
|
213
|
+
};
|
|
62
214
|
var isCentered = final.layout === 'centered';
|
|
63
215
|
var isStacked = final.layout === 'stacked';
|
|
216
|
+
var isImageLeft = final.layout === 'imageLeft';
|
|
217
|
+
var isImageRight = final.layout === 'imageRight';
|
|
64
218
|
var positionStyles = {
|
|
65
219
|
'top-left': { top: '-100px', left: '-100px' },
|
|
66
220
|
'top-right': { top: '-100px', right: '-100px' },
|
|
@@ -70,62 +224,85 @@ var Vista = function (localProps) {
|
|
|
70
224
|
};
|
|
71
225
|
var primaryColor = (0, getCssVariable_1.getCssVariableValue)('primary');
|
|
72
226
|
var secondaryColor = (0, getCssVariable_1.getCssVariableValue)('secondary');
|
|
73
|
-
var gradientStyle = __assign({ position: 'absolute', width: final.gradientSize || "200px", height: final.gradientSize || "200px", background: final.gradientColors || "radial-gradient(circle, ".concat(primaryColor, ", ").concat(secondaryColor, ")"), opacity: final.opacity, filter: "blur(".concat(final.blurry || 4, "rem)"), pointerEvents: 'none', zIndex: 0 }, positionStyles[final.gradientPosition]);
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
227
|
+
var gradientStyle = __assign({ position: 'absolute', width: final.gradientSize || "200px", height: final.gradientSize || "200px", background: final.gradientColors || "radial-gradient(circle, ".concat(primaryColor, ", ").concat(secondaryColor, ")"), opacity: final.opacity || 0.7, filter: "blur(".concat(final.blurry || 4, "rem)"), pointerEvents: 'none', zIndex: 0 }, positionStyles[final.gradientPosition || 'center']);
|
|
228
|
+
// Get fade color - accepts color variable name or color string
|
|
229
|
+
var getFadeColor = function () {
|
|
230
|
+
if (!final.fade)
|
|
231
|
+
return '';
|
|
232
|
+
if (final.fadeColor) {
|
|
233
|
+
// Try to get CSS variable value
|
|
234
|
+
var colorValue = (0, getCssVariable_1.getCssVariableValue)(final.fadeColor);
|
|
235
|
+
if (colorValue)
|
|
236
|
+
return colorValue;
|
|
237
|
+
// If not a variable, assume it's a color string
|
|
238
|
+
return final.fadeColor;
|
|
239
|
+
}
|
|
240
|
+
// Default to page background
|
|
241
|
+
return (0, getCssVariable_1.getCssVariableValue)('page-bg') || '#ffffff';
|
|
242
|
+
};
|
|
243
|
+
// Get fade style
|
|
244
|
+
var getFadeStyle = function () {
|
|
245
|
+
var fadeColor = getFadeColor();
|
|
246
|
+
if (!fadeColor)
|
|
247
|
+
return {};
|
|
248
|
+
if (final.fadeRadial) {
|
|
249
|
+
return {
|
|
250
|
+
background: "radial-gradient(circle, transparent 0%, ".concat(fadeColor, " 100%)"),
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
var direction = final.fadeDirection || 'bottom';
|
|
254
|
+
var toDirectionMap = {
|
|
255
|
+
top: 'to top',
|
|
256
|
+
bottom: 'to bottom',
|
|
257
|
+
left: 'to left',
|
|
258
|
+
right: 'to right'
|
|
259
|
+
};
|
|
260
|
+
return {
|
|
261
|
+
background: "linear-gradient(".concat(toDirectionMap[direction], ", transparent 0%, ").concat(fadeColor, " 100%)"),
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
return (react_1.default.createElement("div", { ref: sectionRef, className: "vista \n ".concat(final.pattern === 'grid' ? 'grid-bg' :
|
|
265
|
+
final.pattern === 'dots' ? 'bg-pattern-dots' :
|
|
266
|
+
final.pattern === 'diagonal' ? 'bg-pattern-diagonal' :
|
|
267
|
+
final.pattern === 'checkerboard' ? 'bg-pattern-checkerboard' :
|
|
268
|
+
final.pattern === 'horizontal' ? 'bg-pattern-horizontal' :
|
|
269
|
+
final.pattern === 'vertical' ? 'bg-pattern-vertical' : '', " \n ").concat(final.bg ? "bg-".concat(final.bg) : '', " ").concat(final.padding ? "p-".concat(final.padding) : '', " ").concat(layoutClass, " ").concat(final.sectionClass || '', " ").concat(final.funcss || '', "\n ").concat(getHoverClass()), style: {
|
|
270
|
+
position: 'relative',
|
|
271
|
+
overflow: 'hidden',
|
|
272
|
+
minHeight: "90vh",
|
|
273
|
+
backgroundImage: final.pattern === 'grid' ? "linear-gradient(to right, rgba(var(--borderRgb), ".concat(final.patternOpacity || 0.1, ") 1px, transparent 1px),\n linear-gradient(to bottom, rgba(var(--borderRgb), ").concat(final.patternOpacity || 0.1, ") 1px, transparent 1px)") :
|
|
274
|
+
final.pattern === 'dots' ? "radial-gradient(rgba(var(--borderRgb), ".concat(final.patternOpacity || 0.1, ") 1px, transparent 1px)") :
|
|
275
|
+
final.pattern === 'diagonal' ? "repeating-linear-gradient(45deg, rgba(var(--borderRgb), ".concat(final.patternOpacity || 0.1, "), rgba(var(--borderRgb), ").concat(final.patternOpacity || 0.1, ") 1px, transparent 1px, transparent 10px)") :
|
|
276
|
+
final.pattern === 'checkerboard' ? "linear-gradient(45deg, rgba(var(--borderRgb), ".concat(final.patternOpacity || 0.1, ") 25%, transparent 25%), linear-gradient(-45deg, rgba(var(--borderRgb), ").concat(final.patternOpacity || 0.1, ") 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(var(--borderRgb), ").concat(final.patternOpacity || 0.1, ") 75%), linear-gradient(-45deg, transparent 75%, rgba(var(--borderRgb), ").concat(final.patternOpacity || 0.1, ") 75%)") :
|
|
277
|
+
final.pattern === 'horizontal' ? "linear-gradient(to bottom, rgba(var(--borderRgb), ".concat(final.patternOpacity || 0.1, ") 1px, transparent 1px)") :
|
|
278
|
+
final.pattern === 'vertical' ? "linear-gradient(to right, rgba(var(--borderRgb), ".concat(final.patternOpacity || 0.1, ") 1px, transparent 1px)") : '',
|
|
279
|
+
backgroundSize: final.pattern ? '40px 40px' : undefined,
|
|
280
|
+
} },
|
|
281
|
+
final.showGradient && (react_1.default.createElement("div", { className: "vista-gradient-blob", style: gradientStyle })),
|
|
282
|
+
final.fade && (react_1.default.createElement("div", { className: "vista-fade-overlay", style: __assign(__assign({ position: 'absolute', inset: 0, width: '100%', height: '100%' }, getFadeStyle()), { zIndex: 0, pointerEvents: 'none' }) })),
|
|
283
|
+
react_1.default.createElement("div", { className: "vista-container ".concat(final.containerClass || ''), style: {
|
|
81
284
|
position: 'relative',
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
width: '100%',
|
|
105
|
-
height: '100%',
|
|
106
|
-
background: final.fadeRadial
|
|
107
|
-
? "radial-gradient(circle, transparent 0%, ".concat((0, getCssVariable_1.getCssVariableValue)(final.bg || 'page-bg'), " 100%)")
|
|
108
|
-
: "linear-gradient(to ".concat(final.fadeDirection || 'bottom', ", ").concat((0, getCssVariable_1.getCssVariableValue)(final.bg || 'page-bg'), " 0%, transparent 100%)"),
|
|
109
|
-
zIndex: 0,
|
|
110
|
-
pointerEvents: 'none'
|
|
111
|
-
} })),
|
|
112
|
-
final.backgroundImage && (react_1.default.createElement("div", { style: {
|
|
113
|
-
position: 'absolute',
|
|
114
|
-
inset: 0,
|
|
115
|
-
backgroundImage: "url(".concat(final.backgroundImage, ")"),
|
|
116
|
-
backgroundSize: 'cover',
|
|
117
|
-
backgroundPosition: 'center',
|
|
118
|
-
zIndex: -1,
|
|
119
|
-
width: '100%',
|
|
120
|
-
height: '100%',
|
|
121
|
-
} })),
|
|
122
|
-
final.backgroundImage && final.fadeOverlayDarken !== undefined && (react_1.default.createElement("div", { style: {
|
|
123
|
-
position: 'absolute',
|
|
124
|
-
width: '100%',
|
|
125
|
-
height: '100%',
|
|
126
|
-
inset: 0,
|
|
127
|
-
backgroundColor: "rgba(0, 0, 0, ".concat(final.fadeOverlayDarken, ")"),
|
|
128
|
-
zIndex: -1,
|
|
129
|
-
} })))));
|
|
285
|
+
zIndex: 1,
|
|
286
|
+
gap: final.gap || "2rem",
|
|
287
|
+
display: 'flex',
|
|
288
|
+
flexDirection: isCentered || isStacked ? 'column' : 'row',
|
|
289
|
+
alignItems: 'center',
|
|
290
|
+
justifyContent: 'center',
|
|
291
|
+
width: '100%',
|
|
292
|
+
maxWidth: '1200px',
|
|
293
|
+
margin: '0 auto',
|
|
294
|
+
padding: '2rem',
|
|
295
|
+
} }, isCentered || isStacked ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
296
|
+
(final.imgPosition === 'top') && react_1.default.createElement(MediaContent, null),
|
|
297
|
+
TextContent,
|
|
298
|
+
(final.imgPosition === 'bottom' || !final.imgPosition) && react_1.default.createElement(MediaContent, null))) : final.reverse ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
299
|
+
react_1.default.createElement("div", { style: { flex: 1 } },
|
|
300
|
+
react_1.default.createElement(MediaContent, null)),
|
|
301
|
+
react_1.default.createElement("div", { style: { flex: 1 } }, TextContent))) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
302
|
+
isImageLeft && (react_1.default.createElement("div", { style: { flex: 1 } },
|
|
303
|
+
react_1.default.createElement(MediaContent, null))),
|
|
304
|
+
react_1.default.createElement("div", { style: { flex: 1 } }, TextContent),
|
|
305
|
+
isImageRight && (react_1.default.createElement("div", { style: { flex: 1 } },
|
|
306
|
+
react_1.default.createElement(MediaContent, null))))))));
|
|
130
307
|
};
|
|
131
308
|
exports.default = Vista;
|