funuicss 3.7.12 → 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/package.json +1 -1
- package/ui/vista/Vista.d.ts +3 -3
- package/ui/vista/Vista.js +45 -38
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/vista/Vista.d.ts
CHANGED
|
@@ -44,9 +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
50
|
variant?: string;
|
|
51
|
+
mediaSize?: string;
|
|
52
|
+
mediaCss?: string;
|
|
50
53
|
showPrimaryCTA?: boolean;
|
|
51
54
|
showSecondaryCTA?: boolean;
|
|
52
55
|
showAccentCTA?: boolean;
|
|
@@ -101,9 +104,6 @@ type VistaProps = {
|
|
|
101
104
|
hoverEffect?: 'lift' | 'scale' | 'tilt' | 'glow' | 'none';
|
|
102
105
|
parallax?: boolean;
|
|
103
106
|
parallaxSpeed?: number;
|
|
104
|
-
mobileLayout?: 'centered' | 'stacked';
|
|
105
|
-
tabletLayout?: 'centered' | 'imageLeft' | 'imageRight' | 'stacked';
|
|
106
|
-
desktopLayout?: 'centered' | 'imageLeft' | 'imageRight' | 'stacked';
|
|
107
107
|
};
|
|
108
108
|
declare const Vista: React.FC<VistaProps>;
|
|
109
109
|
export default Vista;
|
package/ui/vista/Vista.js
CHANGED
|
@@ -75,29 +75,26 @@ var Vista = function (localProps) {
|
|
|
75
75
|
window.addEventListener('scroll', handleScroll);
|
|
76
76
|
return function () { return window.removeEventListener('scroll', handleScroll); };
|
|
77
77
|
}, [final.parallax, final.parallaxSpeed]);
|
|
78
|
-
// Get
|
|
79
|
-
var
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
if (
|
|
86
|
-
return final.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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;
|
|
90
95
|
};
|
|
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]);
|
|
99
96
|
var layoutClass = [
|
|
100
|
-
|
|
97
|
+
final.layout || 'centered',
|
|
101
98
|
final.reverse ? 'reverse' : '',
|
|
102
99
|
"text-".concat(final.textAlign || 'left'),
|
|
103
100
|
]
|
|
@@ -140,18 +137,11 @@ var Vista = function (localProps) {
|
|
|
140
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))));
|
|
141
138
|
};
|
|
142
139
|
// Enhanced Text Content
|
|
143
|
-
var TextContent = (react_1.default.createElement("div", { className: "vista-text ".concat(
|
|
140
|
+
var TextContent = (react_1.default.createElement("div", { className: "vista-text ".concat(final.layout === 'centered' ? "text-center" : "", " ").concat(final.textWrapperClass || '') },
|
|
144
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)),
|
|
145
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)),
|
|
146
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))),
|
|
147
144
|
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
145
|
// Enhanced Media Content
|
|
156
146
|
var MediaContent = function () {
|
|
157
147
|
var _a;
|
|
@@ -185,7 +175,7 @@ var Vista = function (localProps) {
|
|
|
185
175
|
borderRadius: 'inherit',
|
|
186
176
|
zIndex: 1,
|
|
187
177
|
} : {};
|
|
188
|
-
return (react_1.default.createElement("div", { className: "vista-media ".concat(final.imageWrapperClass || ''), style: mediaWrapperStyle },
|
|
178
|
+
return (react_1.default.createElement("div", { className: "vista-media ".concat(final.mediaCss || '', " ").concat(final.imageWrapperClass || ''), style: mediaWrapperStyle },
|
|
189
179
|
mediaType === 'custom' && final.customMedia && (react_1.default.createElement("div", { style: { position: 'relative', width: '100%' } },
|
|
190
180
|
final.customMedia,
|
|
191
181
|
final.imageOverlay && react_1.default.createElement("div", { style: overlayStyle }))),
|
|
@@ -221,8 +211,10 @@ var Vista = function (localProps) {
|
|
|
221
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" })),
|
|
222
212
|
final.imageOverlay && react_1.default.createElement("div", { style: overlayStyle })))));
|
|
223
213
|
};
|
|
224
|
-
var isCentered =
|
|
225
|
-
var isStacked =
|
|
214
|
+
var isCentered = final.layout === 'centered';
|
|
215
|
+
var isStacked = final.layout === 'stacked';
|
|
216
|
+
var isImageLeft = final.layout === 'imageLeft';
|
|
217
|
+
var isImageRight = final.layout === 'imageRight';
|
|
226
218
|
var positionStyles = {
|
|
227
219
|
'top-left': { top: '-100px', left: '-100px' },
|
|
228
220
|
'top-right': { top: '-100px', right: '-100px' },
|
|
@@ -233,14 +225,29 @@ var Vista = function (localProps) {
|
|
|
233
225
|
var primaryColor = (0, getCssVariable_1.getCssVariableValue)('primary');
|
|
234
226
|
var secondaryColor = (0, getCssVariable_1.getCssVariableValue)('secondary');
|
|
235
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
|
+
};
|
|
236
243
|
// Get fade style
|
|
237
244
|
var getFadeStyle = function () {
|
|
238
|
-
|
|
245
|
+
var fadeColor = getFadeColor();
|
|
246
|
+
if (!fadeColor)
|
|
239
247
|
return {};
|
|
240
|
-
var bgColor = (0, getCssVariable_1.getCssVariableValue)('page-bg') || '#ffffff';
|
|
241
248
|
if (final.fadeRadial) {
|
|
242
249
|
return {
|
|
243
|
-
background: "radial-gradient(circle, transparent 0%, ".concat(
|
|
250
|
+
background: "radial-gradient(circle, transparent 0%, ".concat(fadeColor, " 100%)"),
|
|
244
251
|
};
|
|
245
252
|
}
|
|
246
253
|
var direction = final.fadeDirection || 'bottom';
|
|
@@ -251,7 +258,7 @@ var Vista = function (localProps) {
|
|
|
251
258
|
right: 'to right'
|
|
252
259
|
};
|
|
253
260
|
return {
|
|
254
|
-
background: "linear-gradient(".concat(toDirectionMap[direction], ", transparent 0%, ").concat(
|
|
261
|
+
background: "linear-gradient(".concat(toDirectionMap[direction], ", transparent 0%, ").concat(fadeColor, " 100%)"),
|
|
255
262
|
};
|
|
256
263
|
};
|
|
257
264
|
return (react_1.default.createElement("div", { ref: sectionRef, className: "vista \n ".concat(final.pattern === 'grid' ? 'grid-bg' :
|
|
@@ -292,10 +299,10 @@ var Vista = function (localProps) {
|
|
|
292
299
|
react_1.default.createElement("div", { style: { flex: 1 } },
|
|
293
300
|
react_1.default.createElement(MediaContent, null)),
|
|
294
301
|
react_1.default.createElement("div", { style: { flex: 1 } }, TextContent))) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
295
|
-
|
|
302
|
+
isImageLeft && (react_1.default.createElement("div", { style: { flex: 1 } },
|
|
296
303
|
react_1.default.createElement(MediaContent, null))),
|
|
297
304
|
react_1.default.createElement("div", { style: { flex: 1 } }, TextContent),
|
|
298
|
-
|
|
305
|
+
isImageRight && (react_1.default.createElement("div", { style: { flex: 1 } },
|
|
299
306
|
react_1.default.createElement(MediaContent, null))))))));
|
|
300
307
|
};
|
|
301
308
|
exports.default = Vista;
|