funuicss 3.7.11 β†’ 3.7.12

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 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.11",
2
+ "version": "3.7.12",
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",
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  interface SelectOption {
3
3
  value: string;
4
- text: string;
4
+ text?: string;
5
+ label?: string;
5
6
  prefix?: React.ReactNode;
6
7
  suffix?: React.ReactNode;
7
8
  }
@@ -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
@@ -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' },
@@ -46,8 +46,6 @@ type VistaProps = {
46
46
  fade?: boolean;
47
47
  fadeDirection?: 'top' | 'bottom' | 'left' | 'right';
48
48
  fadeRadial?: boolean;
49
- fadeOverlayDarken?: number;
50
- backgroundImage?: string;
51
49
  variant?: string;
52
50
  showPrimaryCTA?: boolean;
53
51
  showSecondaryCTA?: boolean;
@@ -84,6 +82,28 @@ type VistaProps = {
84
82
  accentButtonSmall?: boolean;
85
83
  ctaGap?: number;
86
84
  ctaFlexJustify?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around';
85
+ mediaType?: 'image' | 'video' | 'iframe' | 'custom';
86
+ videoUrl?: string;
87
+ videoAutoplay?: boolean;
88
+ videoLoop?: boolean;
89
+ videoMuted?: boolean;
90
+ videoPoster?: string;
91
+ videoControls?: boolean;
92
+ iframeUrl?: string;
93
+ iframeSize?: string;
94
+ customMedia?: React.ReactNode;
95
+ imageOverlay?: boolean;
96
+ imageOverlayColor?: string;
97
+ imageOverlayOpacity?: number;
98
+ imageFilter?: 'grayscale' | 'sepia' | 'blur' | 'brightness' | 'contrast' | 'none';
99
+ imageFilterValue?: number;
100
+ imageBlendMode?: 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten';
101
+ hoverEffect?: 'lift' | 'scale' | 'tilt' | 'glow' | 'none';
102
+ parallax?: boolean;
103
+ parallaxSpeed?: number;
104
+ mobileLayout?: 'centered' | 'stacked';
105
+ tabletLayout?: 'centered' | 'imageLeft' | 'imageRight' | 'stacked';
106
+ desktopLayout?: 'centered' | 'imageLeft' | 'imageRight' | 'stacked';
87
107
  };
88
108
  declare const Vista: React.FC<VistaProps>;
89
109
  export default Vista;
package/ui/vista/Vista.js CHANGED
@@ -11,56 +11,218 @@ 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 = __importDefault(require("react"));
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 responsive layout
79
+ var getResponsiveLayout = function () {
80
+ if (typeof window === 'undefined')
81
+ return final.layout || 'centered';
82
+ var width = window.innerWidth;
83
+ if (width < 768 && final.mobileLayout)
84
+ return final.mobileLayout;
85
+ if (width >= 768 && width < 1024 && final.tabletLayout)
86
+ return final.tabletLayout;
87
+ if (width >= 1024 && final.desktopLayout)
88
+ return final.desktopLayout;
89
+ return final.layout || 'centered';
90
+ };
91
+ var _b = (0, react_1.useState)(getResponsiveLayout()), currentLayout = _b[0], setCurrentLayout = _b[1];
92
+ (0, react_1.useEffect)(function () {
93
+ var handleResize = function () {
94
+ setCurrentLayout(getResponsiveLayout());
95
+ };
96
+ window.addEventListener('resize', handleResize);
97
+ return function () { return window.removeEventListener('resize', handleResize); };
98
+ }, [final.layout, final.mobileLayout, final.tabletLayout, final.desktopLayout]);
33
99
  var layoutClass = [
34
- final.layout,
100
+ currentLayout,
35
101
  final.reverse ? 'reverse' : '',
36
- "text-".concat(final.textAlign),
102
+ "text-".concat(final.textAlign || 'left'),
37
103
  ]
38
104
  .filter(Boolean)
39
105
  .join(' ');
106
+ // Hover effect class
107
+ var getHoverClass = function () {
108
+ if (!final.hoverEffect || final.hoverEffect === 'none')
109
+ return '';
110
+ return "vista-hover-".concat(final.hoverEffect);
111
+ };
112
+ // Filter styles helper
113
+ var getFilterStyle = function (filter, filterValue) {
114
+ if (!filter || filter === 'none')
115
+ return '';
116
+ var value = filterValue || 1;
117
+ switch (filter) {
118
+ case 'grayscale':
119
+ return "grayscale(".concat(value, ")");
120
+ case 'sepia':
121
+ return "sepia(".concat(value, ")");
122
+ case 'blur':
123
+ return "blur(".concat(value, "px)");
124
+ case 'brightness':
125
+ return "brightness(".concat(value, ")");
126
+ case 'contrast':
127
+ return "contrast(".concat(value, ")");
128
+ default:
129
+ return '';
130
+ }
131
+ };
40
132
  // CTA Buttons Component
41
133
  var CTAButtons = function () {
42
134
  var hasCTAs = final.showPrimaryCTA || final.showSecondaryCTA || final.showAccentCTA;
43
135
  if (!hasCTAs)
44
136
  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%' },
137
+ 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
138
  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
139
  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
140
  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
141
  };
50
- // Enhanced Text Content with flexible styling
51
- var TextContent = (react_1.default.createElement("div", { className: "vista-text ".concat(final.layout === 'centered' ? "text-center" : "", " ").concat(final.textWrapperClass) },
142
+ // Enhanced Text Content
143
+ var TextContent = (react_1.default.createElement("div", { className: "vista-text ".concat(currentLayout === 'centered' ? "text-center" : "", " ").concat(final.textWrapperClass || '') },
52
144
  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 Image Content - uses imageUrl if no image component provided
57
- var ImageContent = (final.image || final.imageUrl) && (react_1.default.createElement("div", { className: "vista-image ".concat(final.imageWrapperClass) }, final.image ? (final.image) : (react_1.default.createElement("img", { src: final.imageUrl, alt: final.imageAlt || 'Vista image', className: "".concat(final.imageClass), style: {
145
+ 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)),
146
+ 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))),
147
+ final.cta ? (react_1.default.createElement("div", { className: "mt-6 ".concat(final.ctaClass || '') }, final.cta)) : (react_1.default.createElement(CTAButtons, null))));
148
+ // Get size for media
149
+ var getMediaSize = function () {
150
+ if (final.mediaType === 'iframe' && final.iframeSize) {
151
+ return final.iframeSize;
152
+ }
153
+ return final.imageSize;
154
+ };
155
+ // Enhanced Media Content
156
+ var MediaContent = function () {
157
+ var _a;
158
+ var mediaType = final.mediaType || 'image';
159
+ var hasMedia = final.image || final.imageUrl || final.videoUrl || final.iframeUrl || final.customMedia;
160
+ if (!hasMedia)
161
+ return null;
162
+ var mediaSize = getMediaSize();
163
+ var mediaWrapperStyle = {
164
+ position: 'relative',
165
+ transform: final.parallax ? "translateY(".concat(scrollY, "px)") : undefined,
166
+ transition: final.parallax ? 'transform 0.1s linear' : undefined,
167
+ width: '100%',
168
+ maxWidth: mediaSize || '100%',
169
+ margin: '0 auto',
170
+ };
171
+ var mediaStyle = {
58
172
  objectFit: 'cover',
59
- maxWidth: final.imageSize,
60
- borderRadius: 'inherit'
61
- } }))));
62
- var isCentered = final.layout === 'centered';
63
- var isStacked = final.layout === 'stacked';
173
+ maxWidth: mediaSize,
174
+ width: '100%',
175
+ borderRadius: 'inherit',
176
+ filter: getFilterStyle(final.imageFilter, final.imageFilterValue),
177
+ mixBlendMode: final.imageBlendMode,
178
+ };
179
+ var overlayStyle = final.imageOverlay ? {
180
+ position: 'absolute',
181
+ inset: 0,
182
+ backgroundColor: final.imageOverlayColor || 'rgba(0, 0, 0, 0.3)',
183
+ opacity: (_a = final.imageOverlayOpacity) !== null && _a !== void 0 ? _a : 1,
184
+ pointerEvents: 'none',
185
+ borderRadius: 'inherit',
186
+ zIndex: 1,
187
+ } : {};
188
+ return (react_1.default.createElement("div", { className: "vista-media ".concat(final.imageWrapperClass || ''), style: mediaWrapperStyle },
189
+ mediaType === 'custom' && final.customMedia && (react_1.default.createElement("div", { style: { position: 'relative', width: '100%' } },
190
+ final.customMedia,
191
+ final.imageOverlay && react_1.default.createElement("div", { style: overlayStyle }))),
192
+ mediaType === 'video' && final.videoUrl && (react_1.default.createElement("div", { style: { position: 'relative', maxWidth: mediaSize, width: '100%', aspectRatio: '16/9', margin: '0 auto' } },
193
+ 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: {
194
+ filter: getFilterStyle(final.imageFilter, final.imageFilterValue),
195
+ mixBlendMode: final.imageBlendMode,
196
+ } }),
197
+ final.imageOverlay && react_1.default.createElement("div", { style: overlayStyle }))),
198
+ mediaType === 'iframe' && final.iframeUrl && (react_1.default.createElement("div", { className: "vista-iframe-wrapper", style: {
199
+ position: 'relative',
200
+ width: '100%',
201
+ maxWidth: mediaSize || '100%',
202
+ aspectRatio: '16/9',
203
+ margin: '0 auto',
204
+ } },
205
+ react_1.default.createElement("div", { style: {
206
+ position: 'relative',
207
+ width: '100%',
208
+ height: '100%',
209
+ filter: getFilterStyle(final.imageFilter, final.imageFilterValue),
210
+ mixBlendMode: final.imageBlendMode,
211
+ } },
212
+ react_1.default.createElement("iframe", { src: final.iframeUrl, className: "vista-iframe ".concat(final.imageClass || ''), style: {
213
+ width: '100%',
214
+ height: '100%',
215
+ border: 'none',
216
+ borderRadius: 'inherit',
217
+ display: 'block',
218
+ }, allowFullScreen: true, allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture", title: "Vista iframe content" }),
219
+ final.imageOverlay && react_1.default.createElement("div", { style: overlayStyle })))),
220
+ mediaType === 'image' && (final.image || final.imageUrl) && (react_1.default.createElement("div", { style: { position: 'relative', width: '100%' } },
221
+ 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" })),
222
+ final.imageOverlay && react_1.default.createElement("div", { style: overlayStyle })))));
223
+ };
224
+ var isCentered = currentLayout === 'centered';
225
+ var isStacked = currentLayout === 'stacked';
64
226
  var positionStyles = {
65
227
  'top-left': { top: '-100px', left: '-100px' },
66
228
  'top-right': { top: '-100px', right: '-100px' },
@@ -70,62 +232,70 @@ var Vista = function (localProps) {
70
232
  };
71
233
  var primaryColor = (0, getCssVariable_1.getCssVariableValue)('primary');
72
234
  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
- return (react_1.default.createElement(ScrollInView_1.default, null,
75
- react_1.default.createElement("div", { className: "vista \n ".concat(final.pattern === 'grid' ? 'grid-bg' :
76
- final.pattern === 'dots' ? 'bg-pattern-dots' :
77
- final.pattern === 'diagonal' ? 'bg-pattern-diagonal' :
78
- final.pattern === 'checkerboard' ? 'bg-pattern-checkerboard' :
79
- final.pattern === 'horizontal' ? 'bg-pattern-horizontal' :
80
- final.pattern === 'vertical' ? 'bg-pattern-vertical' : '', " \n ").concat(final.bg, " p-").concat(final.padding, " ").concat(layoutClass, " ").concat(final.sectionClass, " ").concat(final.funcss), style: {
235
+ 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']);
236
+ // Get fade style
237
+ var getFadeStyle = function () {
238
+ if (!final.fade)
239
+ return {};
240
+ var bgColor = (0, getCssVariable_1.getCssVariableValue)('page-bg') || '#ffffff';
241
+ if (final.fadeRadial) {
242
+ return {
243
+ background: "radial-gradient(circle, transparent 0%, ".concat(bgColor, " 100%)"),
244
+ };
245
+ }
246
+ var direction = final.fadeDirection || 'bottom';
247
+ var toDirectionMap = {
248
+ top: 'to top',
249
+ bottom: 'to bottom',
250
+ left: 'to left',
251
+ right: 'to right'
252
+ };
253
+ return {
254
+ background: "linear-gradient(".concat(toDirectionMap[direction], ", transparent 0%, ").concat(bgColor, " 100%)"),
255
+ };
256
+ };
257
+ return (react_1.default.createElement("div", { ref: sectionRef, className: "vista \n ".concat(final.pattern === 'grid' ? 'grid-bg' :
258
+ final.pattern === 'dots' ? 'bg-pattern-dots' :
259
+ final.pattern === 'diagonal' ? 'bg-pattern-diagonal' :
260
+ final.pattern === 'checkerboard' ? 'bg-pattern-checkerboard' :
261
+ final.pattern === 'horizontal' ? 'bg-pattern-horizontal' :
262
+ 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: {
263
+ position: 'relative',
264
+ overflow: 'hidden',
265
+ minHeight: "90vh",
266
+ 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)") :
267
+ final.pattern === 'dots' ? "radial-gradient(rgba(var(--borderRgb), ".concat(final.patternOpacity || 0.1, ") 1px, transparent 1px)") :
268
+ 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)") :
269
+ 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%)") :
270
+ final.pattern === 'horizontal' ? "linear-gradient(to bottom, rgba(var(--borderRgb), ".concat(final.patternOpacity || 0.1, ") 1px, transparent 1px)") :
271
+ final.pattern === 'vertical' ? "linear-gradient(to right, rgba(var(--borderRgb), ".concat(final.patternOpacity || 0.1, ") 1px, transparent 1px)") : '',
272
+ backgroundSize: final.pattern ? '40px 40px' : undefined,
273
+ } },
274
+ final.showGradient && (react_1.default.createElement("div", { className: "vista-gradient-blob", style: gradientStyle })),
275
+ 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' }) })),
276
+ react_1.default.createElement("div", { className: "vista-container ".concat(final.containerClass || ''), style: {
81
277
  position: 'relative',
82
- overflow: 'hidden',
83
- minHeight: "90vh",
84
- backgroundImage: final.pattern === 'grid' ? "linear-gradient(to right, rgba(var(--borderRgb), ".concat(final.patternOpacity, ") 1px, transparent 1px),\n linear-gradient(to bottom, rgba(var(--borderRgb), ").concat(final.patternOpacity, ") 1px, transparent 1px)") :
85
- final.pattern === 'dots' ? "radial-gradient(rgba(var(--borderRgb), ".concat(final.patternOpacity, ") 1px, transparent 1px)") :
86
- final.pattern === 'diagonal' ? "repeating-linear-gradient(45deg, rgba(var(--borderRgb), ".concat(final.patternOpacity, "), rgba(var(--borderRgb), ").concat(final.patternOpacity, ") 1px, transparent 1px, transparent 10px)") :
87
- final.pattern === 'checkerboard' ? "linear-gradient(45deg, rgba(var(--borderRgb), ".concat(final.patternOpacity, ") 25%, transparent 25%), linear-gradient(-45deg, rgba(var(--borderRgb), ").concat(final.patternOpacity, ") 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(var(--borderRgb), ").concat(final.patternOpacity, ") 75%), linear-gradient(-45deg, transparent 75%, rgba(var(--borderRgb), ").concat(final.patternOpacity, ") 75%)") :
88
- final.pattern === 'horizontal' ? "linear-gradient(to bottom, rgba(var(--borderRgb), ".concat(final.patternOpacity, ") 1px, transparent 1px)") :
89
- final.pattern === 'vertical' ? "linear-gradient(to right, rgba(var(--borderRgb), ".concat(final.patternOpacity, ") 1px, transparent 1px)") : ''
90
- } },
91
- final.showGradient && react_1.default.createElement("div", { style: gradientStyle }),
92
- react_1.default.createElement("div", { className: "vista-container ".concat(final.containerClass), style: { position: 'relative', zIndex: 1, gap: final.gap || "2rem" } }, isCentered || isStacked ? (react_1.default.createElement(react_1.default.Fragment, null,
93
- (final.imgPosition === 'top') && ImageContent,
94
- TextContent,
95
- (final.imgPosition === 'bottom') && ImageContent)) : final.reverse ? (react_1.default.createElement(react_1.default.Fragment, null,
96
- ImageContent,
97
- TextContent)) : (react_1.default.createElement(react_1.default.Fragment, null,
98
- (final.layout === 'imageLeft') && react_1.default.createElement(Col_1.default, null, ImageContent),
99
- TextContent,
100
- (final.layout === 'imageRight') && react_1.default.createElement(Col_1.default, null, ImageContent)))),
101
- final.fade && (react_1.default.createElement("div", { style: {
102
- position: 'absolute',
103
- inset: 0,
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
- } })))));
278
+ zIndex: 1,
279
+ gap: final.gap || "2rem",
280
+ display: 'flex',
281
+ flexDirection: isCentered || isStacked ? 'column' : 'row',
282
+ alignItems: 'center',
283
+ justifyContent: 'center',
284
+ width: '100%',
285
+ maxWidth: '1200px',
286
+ margin: '0 auto',
287
+ padding: '2rem',
288
+ } }, isCentered || isStacked ? (react_1.default.createElement(react_1.default.Fragment, null,
289
+ (final.imgPosition === 'top') && react_1.default.createElement(MediaContent, null),
290
+ TextContent,
291
+ (final.imgPosition === 'bottom' || !final.imgPosition) && react_1.default.createElement(MediaContent, null))) : final.reverse ? (react_1.default.createElement(react_1.default.Fragment, null,
292
+ react_1.default.createElement("div", { style: { flex: 1 } },
293
+ react_1.default.createElement(MediaContent, null)),
294
+ react_1.default.createElement("div", { style: { flex: 1 } }, TextContent))) : (react_1.default.createElement(react_1.default.Fragment, null,
295
+ (currentLayout === 'imageLeft') && (react_1.default.createElement("div", { style: { flex: 1 } },
296
+ react_1.default.createElement(MediaContent, null))),
297
+ react_1.default.createElement("div", { style: { flex: 1 } }, TextContent),
298
+ (currentLayout === 'imageRight') && (react_1.default.createElement("div", { style: { flex: 1 } },
299
+ react_1.default.createElement(MediaContent, null))))))));
130
300
  };
131
301
  exports.default = Vista;