funuicss 3.7.2 → 3.7.3
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 +72 -8
- package/index.d.ts +1 -0
- package/index.js +3 -1
- package/package.json +1 -1
- package/ui/chart/Bar.js +16 -170
- package/ui/chart/Line.js +19 -124
- package/ui/chart/Pie.js +25 -138
- package/ui/input/FileUpload.d.ts +21 -0
- package/ui/input/FileUpload.js +235 -0
- package/ui/input/Input.d.ts +0 -7
- package/ui/input/Input.js +16 -132
- package/ui/text/Text.d.ts +1 -0
- package/ui/text/Text.js +2 -2
- package/ui/vista/Vista.js +12 -181
package/ui/input/Input.js
CHANGED
|
@@ -55,18 +55,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
55
55
|
}
|
|
56
56
|
return t;
|
|
57
57
|
};
|
|
58
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
59
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
60
|
-
};
|
|
61
58
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
|
-
exports.
|
|
59
|
+
exports.TextareaInput = exports.SelectInput = exports.TextInput = void 0;
|
|
63
60
|
var react_1 = __importStar(require("react"));
|
|
64
61
|
var pi_1 = require("react-icons/pi");
|
|
65
|
-
var Button_1 = __importDefault(require("../button/Button"));
|
|
66
62
|
var theme_1 = require("../theme/theme");
|
|
67
63
|
var componentUtils_1 = require("../../utils/componentUtils");
|
|
68
64
|
var getDynamicIcon_1 = require("../../utils/getDynamicIcon");
|
|
69
|
-
var
|
|
65
|
+
var FileUpload_1 = require("./FileUpload"); // Import the FileUpload component
|
|
70
66
|
// Status icons mapping
|
|
71
67
|
var statusIcons = {
|
|
72
68
|
success: react_1.default.createElement(pi_1.PiCheckCircle, null),
|
|
@@ -105,9 +101,9 @@ var IconicInputWrapper = function (_a) {
|
|
|
105
101
|
};
|
|
106
102
|
// Input Container with Floating Label
|
|
107
103
|
var InputContainer = function (_a) {
|
|
108
|
-
var label = _a.label, status = _a.status, helperText = _a.helperText, children = _a.children, isFocused = _a.isFocused, hasValue = _a.hasValue, fullWidth = _a.fullWidth, id = _a.id, startIcon = _a.startIcon, prefix = _a.prefix, _b = _a.
|
|
109
|
-
// For select inputs, label is always active
|
|
110
|
-
var showFloatingLabel = label && (
|
|
104
|
+
var label = _a.label, status = _a.status, helperText = _a.helperText, children = _a.children, isFocused = _a.isFocused, hasValue = _a.hasValue, fullWidth = _a.fullWidth, id = _a.id, startIcon = _a.startIcon, prefix = _a.prefix, _b = _a.alwaysActiveLabel, alwaysActiveLabel = _b === void 0 ? false : _b;
|
|
105
|
+
// For select inputs and date/time inputs, label is always active
|
|
106
|
+
var showFloatingLabel = label && (alwaysActiveLabel || isFocused || hasValue);
|
|
111
107
|
return (react_1.default.createElement("div", { className: "input-wrapper ".concat(fullWidth ? 'full-width' : '') },
|
|
112
108
|
react_1.default.createElement("div", { className: "input-container-with-label" },
|
|
113
109
|
label && (react_1.default.createElement("label", { htmlFor: id, className: "floating-label ".concat(startIcon || prefix ? "label-left" : "", " ").concat(showFloatingLabel ? 'active' : '', " ").concat(status ? "label-".concat(status) : '') }, label)),
|
|
@@ -124,6 +120,8 @@ var TextInput = function (_a) {
|
|
|
124
120
|
var _g = (0, react_1.useState)(null), prefixNode = _g[0], setPrefixNode = _g[1];
|
|
125
121
|
var _h = (0, react_1.useState)(null), suffixNode = _h[0], setSuffixNode = _h[1];
|
|
126
122
|
var inputRef = (0, react_1.useRef)(null);
|
|
123
|
+
// Check if this is a date/time input type for always active label
|
|
124
|
+
var isDateTimeInput = ['date', 'time', 'month', 'week', 'datetime-local'].includes(type || '');
|
|
127
125
|
// Handle value changes - only update if value is truly defined (not empty string)
|
|
128
126
|
(0, react_1.useEffect)(function () {
|
|
129
127
|
if (value !== undefined && value !== '') {
|
|
@@ -239,7 +237,7 @@ var TextInput = function (_a) {
|
|
|
239
237
|
var showPlaceholder = placeholder && label && (isFocused || !!inputValue);
|
|
240
238
|
var inputElement = (react_1.default.createElement("input", __assign({ ref: inputRef, id: id, name: name, className: className, onChange: handleChange, onFocus: handleFocus, onBlur: handleBlur, defaultValue: defaultValue, type: type, placeholder: showPlaceholder ? placeholder : (!label ? placeholder : ''), style: style, value: inputValue }, rest)));
|
|
241
239
|
var wrappedInput = (react_1.default.createElement(IconicInputWrapper, { startIcon: effectivePrefix, endIcon: effectiveSuffix, iconicBg: final.iconicBg, funcss: final.funcss }, inputElement));
|
|
242
|
-
return (react_1.default.createElement(InputContainer, { startIcon: effectivePrefix, label: label, status: final.status, helperText: helperText, isFocused: isFocused, hasValue: !!inputValue, fullWidth: final.fullWidth, id: id }, wrappedInput));
|
|
240
|
+
return (react_1.default.createElement(InputContainer, { startIcon: effectivePrefix, label: label, status: final.status, helperText: helperText, isFocused: isFocused, hasValue: !!inputValue, fullWidth: final.fullWidth, id: id, alwaysActiveLabel: isDateTimeInput }, wrappedInput));
|
|
243
241
|
};
|
|
244
242
|
exports.TextInput = TextInput;
|
|
245
243
|
// Select Component
|
|
@@ -363,7 +361,7 @@ var SelectInput = function (_a) {
|
|
|
363
361
|
};
|
|
364
362
|
var selectElement = (react_1.default.createElement("select", __assign({ id: id, name: name, className: className, onChange: handleChange, onFocus: handleFocus, onBlur: handleBlur, defaultValue: defaultValue, value: selectValue, style: style }, rest), options.map(function (option) { return (react_1.default.createElement("option", { key: option.value, value: option.value }, option.text)); })));
|
|
365
363
|
var wrappedSelect = (react_1.default.createElement(IconicInputWrapper, { startIcon: effectivePrefix, endIcon: effectiveSuffix, iconicBg: final.iconicBg, funcss: final.funcss }, selectElement));
|
|
366
|
-
return (react_1.default.createElement(InputContainer, { startIcon: effectivePrefix, label: label, status: final.status, helperText: helperText, isFocused: isFocused, hasValue: selectHasValue, fullWidth: final.fullWidth, id: id,
|
|
364
|
+
return (react_1.default.createElement(InputContainer, { startIcon: effectivePrefix, label: label, status: final.status, helperText: helperText, isFocused: isFocused, hasValue: selectHasValue, fullWidth: final.fullWidth, id: id, alwaysActiveLabel: true }, wrappedSelect));
|
|
367
365
|
};
|
|
368
366
|
exports.SelectInput = SelectInput;
|
|
369
367
|
// Textarea Component
|
|
@@ -491,137 +489,23 @@ var TextareaInput = function (_a) {
|
|
|
491
489
|
return (react_1.default.createElement(InputContainer, { startIcon: effectivePrefix, label: label, status: final.status, helperText: helperText, isFocused: isFocused, hasValue: !!textValue, fullWidth: final.fullWidth, id: id }, wrappedTextarea));
|
|
492
490
|
};
|
|
493
491
|
exports.TextareaInput = TextareaInput;
|
|
494
|
-
// File Input Component (updated with no_prefix and no_label logic)
|
|
495
|
-
var FileInput = function (_a) {
|
|
496
|
-
var _b = _a.id, id = _b === void 0 ? 'fileInput' : _b, name = _a.name, onChange = _a.onChange, status = _a.status, funcss = _a.funcss, bg = _a.bg, fullWidth = _a.fullWidth, flat = _a.flat, rounded = _a.rounded, leftRounded = _a.leftRounded, rightRounded = _a.rightRounded, startIcon = _a.startIcon, endIcon = _a.endIcon, prefix = _a.prefix, suffix = _a.suffix, stringPrefix = _a.stringPrefix, stringSuffix = _a.stringSuffix, iconicBg = _a.iconicBg, _c = _a.label, label = _c === void 0 ? 'Upload File' : _c, helperText = _a.helperText, icon = _a.icon, extra = _a.extra, button = _a.button, btn = _a.btn, value = _a.value, _d = _a.variant, variant = _d === void 0 ? '' : _d, rest = __rest(_a, ["id", "name", "onChange", "status", "funcss", "bg", "fullWidth", "flat", "rounded", "leftRounded", "rightRounded", "startIcon", "endIcon", "prefix", "suffix", "stringPrefix", "stringSuffix", "iconicBg", "label", "helperText", "icon", "extra", "button", "btn", "value", "variant"]);
|
|
497
|
-
var _e = (0, react_1.useState)(''), fileName = _e[0], setFileName = _e[1];
|
|
498
|
-
var _f = (0, react_1.useState)(null), prefixNode = _f[0], setPrefixNode = _f[1];
|
|
499
|
-
var _g = (0, react_1.useState)(null), suffixNode = _g[0], setSuffixNode = _g[1];
|
|
500
|
-
var mergeWithLocal = (0, componentUtils_1.useComponentConfiguration)('Input', variant).mergeWithLocal;
|
|
501
|
-
// Create local props object including stringPrefix/stringSuffix
|
|
502
|
-
var localProps = {
|
|
503
|
-
status: status,
|
|
504
|
-
funcss: funcss,
|
|
505
|
-
bg: bg,
|
|
506
|
-
fullWidth: fullWidth,
|
|
507
|
-
flat: flat,
|
|
508
|
-
rounded: rounded,
|
|
509
|
-
leftRounded: leftRounded,
|
|
510
|
-
rightRounded: rightRounded,
|
|
511
|
-
startIcon: startIcon,
|
|
512
|
-
endIcon: endIcon,
|
|
513
|
-
prefix: prefix,
|
|
514
|
-
suffix: suffix,
|
|
515
|
-
iconicBg: iconicBg,
|
|
516
|
-
stringPrefix: stringPrefix, // Include in local props
|
|
517
|
-
stringSuffix: stringSuffix, // Include in local props
|
|
518
|
-
bordered: rest.bordered,
|
|
519
|
-
borderless: rest.borderless,
|
|
520
|
-
};
|
|
521
|
-
// Merge with config - LOCAL PROPS OVERRIDE CONFIG
|
|
522
|
-
var mergedProps = mergeWithLocal(localProps).props;
|
|
523
|
-
// Extract final values - local props take precedence
|
|
524
|
-
var final = {
|
|
525
|
-
status: status !== undefined ? status : mergedProps.status,
|
|
526
|
-
funcss: funcss !== undefined ? funcss : mergedProps.funcss,
|
|
527
|
-
bg: bg !== undefined ? bg : mergedProps.bg,
|
|
528
|
-
fullWidth: fullWidth !== undefined ? fullWidth : mergedProps.fullWidth,
|
|
529
|
-
flat: flat !== undefined ? flat : mergedProps.flat,
|
|
530
|
-
rounded: rounded !== undefined ? rounded : mergedProps.rounded,
|
|
531
|
-
leftRounded: leftRounded !== undefined ? leftRounded : mergedProps.leftRounded,
|
|
532
|
-
rightRounded: rightRounded !== undefined ? rightRounded : mergedProps.rightRounded,
|
|
533
|
-
startIcon: startIcon !== undefined ? startIcon : mergedProps.startIcon,
|
|
534
|
-
endIcon: endIcon !== undefined ? endIcon : mergedProps.endIcon,
|
|
535
|
-
prefix: prefix !== undefined ? prefix : mergedProps.prefix,
|
|
536
|
-
suffix: suffix !== undefined ? suffix : mergedProps.suffix,
|
|
537
|
-
iconicBg: iconicBg !== undefined ? iconicBg : mergedProps.iconicBg,
|
|
538
|
-
stringPrefix: stringPrefix !== undefined ? stringPrefix : mergedProps.stringPrefix, // Handle both local and config
|
|
539
|
-
stringSuffix: stringSuffix !== undefined ? stringSuffix : mergedProps.stringSuffix, // Handle both local and config
|
|
540
|
-
};
|
|
541
|
-
// Handle stringPrefix - use final value (local or config)
|
|
542
|
-
(0, react_1.useEffect)(function () {
|
|
543
|
-
var effectiveStringPrefix = final.stringPrefix;
|
|
544
|
-
if (effectiveStringPrefix) {
|
|
545
|
-
(0, getDynamicIcon_1.getDynamicIcon)(effectiveStringPrefix).then(function (node) { return setPrefixNode(node); });
|
|
546
|
-
}
|
|
547
|
-
else {
|
|
548
|
-
setPrefixNode(null);
|
|
549
|
-
}
|
|
550
|
-
}, [final.stringPrefix]);
|
|
551
|
-
// Handle stringSuffix - use final value (local or config)
|
|
552
|
-
(0, react_1.useEffect)(function () {
|
|
553
|
-
var effectiveStringSuffix = final.stringSuffix;
|
|
554
|
-
if (effectiveStringSuffix) {
|
|
555
|
-
(0, getDynamicIcon_1.getDynamicIcon)(effectiveStringSuffix).then(function (node) { return setSuffixNode(node); });
|
|
556
|
-
}
|
|
557
|
-
else {
|
|
558
|
-
setSuffixNode(null);
|
|
559
|
-
}
|
|
560
|
-
}, [final.stringSuffix]);
|
|
561
|
-
var handleChange = function (e) {
|
|
562
|
-
var _a;
|
|
563
|
-
var file = (_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0];
|
|
564
|
-
if (file) {
|
|
565
|
-
setFileName(file.name);
|
|
566
|
-
}
|
|
567
|
-
if (onChange)
|
|
568
|
-
onChange(e);
|
|
569
|
-
};
|
|
570
|
-
var effectivePrefix = prefixNode || final.prefix || final.startIcon;
|
|
571
|
-
var effectiveSuffix = suffixNode || final.suffix || final.endIcon;
|
|
572
|
-
// Check if there's no start icon or prefix
|
|
573
|
-
var hasNoPrefix = !effectivePrefix;
|
|
574
|
-
// Check if there's no label (file inputs typically don't have labels in the same way)
|
|
575
|
-
var hasNoLabel = true; // File inputs use their own label system
|
|
576
|
-
if (btn) {
|
|
577
|
-
var className = generateInputClasses({
|
|
578
|
-
status: final.status,
|
|
579
|
-
rounded: final.rounded,
|
|
580
|
-
bg: final.bg,
|
|
581
|
-
funcss: final.funcss,
|
|
582
|
-
flat: final.flat,
|
|
583
|
-
leftRounded: final.leftRounded,
|
|
584
|
-
rightRounded: final.rightRounded,
|
|
585
|
-
bordered: true,
|
|
586
|
-
borderless: false,
|
|
587
|
-
additionalClasses: 'filedInput',
|
|
588
|
-
hasNoPrefix: hasNoPrefix, // Add no_prefix class when no start icon/prefix
|
|
589
|
-
hasNoLabel: hasNoLabel,
|
|
590
|
-
});
|
|
591
|
-
var style = final.fullWidth ? { width: '100%' } : undefined;
|
|
592
|
-
var fileInputElement = (react_1.default.createElement("div", { className: "fileInput" },
|
|
593
|
-
button || (react_1.default.createElement(Button_1.default, { funcss: final.funcss, startIcon: icon || react_1.default.createElement(pi_1.PiCloudArrowUp, null), bg: "primary", fullWidth: true, raised: true }, fileName || label)),
|
|
594
|
-
react_1.default.createElement("input", __assign({ id: id, name: name, className: className, onChange: handleChange, type: "file", style: style, value: value }, rest))));
|
|
595
|
-
var wrappedFileInput = (react_1.default.createElement(IconicInputWrapper, { startIcon: effectivePrefix, endIcon: effectiveSuffix, iconicBg: final.iconicBg, funcss: final.funcss }, fileInputElement));
|
|
596
|
-
return (react_1.default.createElement(InputContainer, { startIcon: effectivePrefix, label: undefined, status: final.status, helperText: helperText, isFocused: false, hasValue: !!fileName, fullWidth: final.fullWidth, id: id }, wrappedFileInput));
|
|
597
|
-
}
|
|
598
|
-
var uploadElement = (react_1.default.createElement("div", { className: "_upload_container" },
|
|
599
|
-
react_1.default.createElement("label", { htmlFor: id, className: "_upload_label" },
|
|
600
|
-
react_1.default.createElement("div", { className: "_upload_icon" }, icon || react_1.default.createElement(pi_1.PiCloudArrowUp, null)),
|
|
601
|
-
react_1.default.createElement("div", { className: "_upload_text fit" },
|
|
602
|
-
react_1.default.createElement(Text_1.default, { text: fileName || label, truncate: 1, block: true })),
|
|
603
|
-
extra && react_1.default.createElement("div", { className: "text-small opacity-3" }, extra)),
|
|
604
|
-
react_1.default.createElement("input", __assign({ onChange: handleChange, type: "file", id: id, className: "_upload_input" }, rest))));
|
|
605
|
-
return (react_1.default.createElement(InputContainer, { startIcon: effectivePrefix, label: undefined, status: final.status, helperText: helperText, isFocused: false, hasValue: !!fileName, fullWidth: final.fullWidth, id: id }, uploadElement));
|
|
606
|
-
};
|
|
607
|
-
exports.FileInput = FileInput;
|
|
608
492
|
var Input = function (_a) {
|
|
609
|
-
var select = _a.select, multiline = _a.multiline, file = _a.file, noBorder = _a.noBorder, startIcon = _a.startIcon, endIcon = _a.endIcon, prefix = _a.prefix, suffix = _a.suffix, stringPrefix = _a.stringPrefix, stringSuffix = _a.stringSuffix, iconicBg = _a.iconicBg, _b = _a.variant, variant = _b === void 0 ? '' : _b, props = __rest(_a, ["select", "multiline", "file", "noBorder", "startIcon", "endIcon", "prefix", "suffix", "stringPrefix", "stringSuffix", "iconicBg", "variant"]);
|
|
493
|
+
var select = _a.select, multiline = _a.multiline, file = _a.file, noBorder = _a.noBorder, startIcon = _a.startIcon, endIcon = _a.endIcon, prefix = _a.prefix, suffix = _a.suffix, stringPrefix = _a.stringPrefix, stringSuffix = _a.stringSuffix, iconicBg = _a.iconicBg, type = _a.type, _b = _a.variant, variant = _b === void 0 ? '' : _b, props = __rest(_a, ["select", "multiline", "file", "noBorder", "startIcon", "endIcon", "prefix", "suffix", "stringPrefix", "stringSuffix", "iconicBg", "type", "variant"]);
|
|
610
494
|
var mergeWithLocal = (0, componentUtils_1.useComponentConfiguration)('Input', variant).mergeWithLocal;
|
|
611
495
|
// Create local props object including stringPrefix/stringSuffix
|
|
612
|
-
var localProps = __assign(__assign({}, props), { startIcon: startIcon, endIcon: endIcon, prefix: prefix, suffix: suffix, iconicBg: iconicBg, stringPrefix: stringPrefix,
|
|
613
|
-
stringSuffix: stringSuffix });
|
|
496
|
+
var localProps = __assign(__assign({}, props), { startIcon: startIcon, endIcon: endIcon, prefix: prefix, suffix: suffix, iconicBg: iconicBg, stringPrefix: stringPrefix, stringSuffix: stringSuffix, type: type });
|
|
614
497
|
var mergedProps = mergeWithLocal(localProps).props;
|
|
615
|
-
var inputProps = __assign(__assign(__assign({}, props), mergedProps), { variant: variant, borderless: noBorder !== undefined ? noBorder : (props.borderless !== undefined ? props.borderless : mergedProps.borderless) });
|
|
498
|
+
var inputProps = __assign(__assign(__assign({}, props), mergedProps), { variant: variant, borderless: noBorder !== undefined ? noBorder : (props.borderless !== undefined ? props.borderless : mergedProps.borderless), type: type });
|
|
499
|
+
// If type is file or file prop is true, use FileUpload component
|
|
500
|
+
if (file || type === 'file') {
|
|
501
|
+
return react_1.default.createElement(FileUpload_1.FileUpload, __assign({}, inputProps));
|
|
502
|
+
}
|
|
616
503
|
if (select) {
|
|
617
504
|
return react_1.default.createElement(exports.SelectInput, __assign({}, inputProps));
|
|
618
505
|
}
|
|
619
506
|
if (multiline) {
|
|
620
507
|
return react_1.default.createElement(exports.TextareaInput, __assign({}, inputProps));
|
|
621
508
|
}
|
|
622
|
-
if (file) {
|
|
623
|
-
return react_1.default.createElement(exports.FileInput, __assign({}, inputProps));
|
|
624
|
-
}
|
|
625
509
|
return react_1.default.createElement(exports.TextInput, __assign({}, inputProps));
|
|
626
510
|
};
|
|
627
511
|
exports.default = Input;
|
package/ui/text/Text.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ type TypographyProps = {
|
|
|
42
42
|
variant?: string;
|
|
43
43
|
margin?: string;
|
|
44
44
|
padding?: string;
|
|
45
|
+
style?: React.CSSProperties;
|
|
45
46
|
size?: "xs" | "sm" | "base" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | string;
|
|
46
47
|
};
|
|
47
48
|
declare const Text: React.FC<TypographyProps>;
|
package/ui/text/Text.js
CHANGED
|
@@ -31,7 +31,7 @@ var pi_1 = require("react-icons/pi");
|
|
|
31
31
|
var componentUtils_1 = require("../../utils/componentUtils");
|
|
32
32
|
var Text = function (_a) {
|
|
33
33
|
var _b;
|
|
34
|
-
var id = _a.id, bg = _a.bg, color = _a.color, children = _a.children, hoverBg = _a.hoverBg, hoverText = _a.hoverText, text = _a.text, funcss = _a.funcss, emp = _a.emp, bold = _a.bold, block = _a.block, body = _a.body, article = _a.article, light = _a.light, lighter = _a.lighter, italic = _a.italic, weight = _a.weight, underline = _a.underline, align = _a.align, lineHeight = _a.lineHeight, letterSpacing = _a.letterSpacing, uppercase = _a.uppercase, lowercase = _a.lowercase, capitalize = _a.capitalize, textDecoration = _a.textDecoration, textTransform = _a.textTransform, whiteSpace = _a.whiteSpace, wordBreak = _a.wordBreak, fontFamily = _a.fontFamily, truncate = _a.truncate, textShadow = _a.textShadow, textAlign = _a.textAlign, customStyles = _a.customStyles, monospace = _a.monospace, quote = _a.quote, opacity = _a.opacity, _c = _a.variant, variant = _c === void 0 ? '' : _c, size = _a.size, margin = _a.margin, padding = _a.padding, rest = __rest(_a, ["id", "bg", "color", "children", "hoverBg", "hoverText", "text", "funcss", "emp", "bold", "block", "body", "article", "light", "lighter", "italic", "weight", "underline", "align", "lineHeight", "letterSpacing", "uppercase", "lowercase", "capitalize", "textDecoration", "textTransform", "whiteSpace", "wordBreak", "fontFamily", "truncate", "textShadow", "textAlign", "customStyles", "monospace", "quote", "opacity", "variant", "size", "margin", "padding"]);
|
|
34
|
+
var id = _a.id, bg = _a.bg, color = _a.color, children = _a.children, hoverBg = _a.hoverBg, hoverText = _a.hoverText, text = _a.text, funcss = _a.funcss, emp = _a.emp, bold = _a.bold, block = _a.block, body = _a.body, article = _a.article, light = _a.light, lighter = _a.lighter, italic = _a.italic, weight = _a.weight, underline = _a.underline, align = _a.align, lineHeight = _a.lineHeight, letterSpacing = _a.letterSpacing, uppercase = _a.uppercase, lowercase = _a.lowercase, capitalize = _a.capitalize, textDecoration = _a.textDecoration, textTransform = _a.textTransform, whiteSpace = _a.whiteSpace, wordBreak = _a.wordBreak, fontFamily = _a.fontFamily, truncate = _a.truncate, textShadow = _a.textShadow, textAlign = _a.textAlign, customStyles = _a.customStyles, monospace = _a.monospace, quote = _a.quote, opacity = _a.opacity, _c = _a.variant, variant = _c === void 0 ? '' : _c, size = _a.size, margin = _a.margin, style = _a.style, padding = _a.padding, rest = __rest(_a, ["id", "bg", "color", "children", "hoverBg", "hoverText", "text", "funcss", "emp", "bold", "block", "body", "article", "light", "lighter", "italic", "weight", "underline", "align", "lineHeight", "letterSpacing", "uppercase", "lowercase", "capitalize", "textDecoration", "textTransform", "whiteSpace", "wordBreak", "fontFamily", "truncate", "textShadow", "textAlign", "customStyles", "monospace", "quote", "opacity", "variant", "size", "margin", "style", "padding"]);
|
|
35
35
|
// Use component configuration (simplified - let the hook handle empty variant)
|
|
36
36
|
var mergeWithLocal = (0, componentUtils_1.useComponentConfiguration)('Text', variant).mergeWithLocal;
|
|
37
37
|
// Create local props object - include ALL props
|
|
@@ -88,7 +88,7 @@ var Text = function (_a) {
|
|
|
88
88
|
final.size === 'h5' ? "h5" :
|
|
89
89
|
final.size === 'h6' ? "h6" :
|
|
90
90
|
"text-".concat(final.size));
|
|
91
|
-
var mergedStyles = __assign(__assign({ display: shouldBeBlock ? 'block' : undefined, fontWeight: final.bold ? 'bold' : final.weight ? final.weight : undefined, lineHeight: final.lineHeight, letterSpacing: final.letterSpacing, textTransform: final.textTransform, textDecoration: final.textDecoration, fontFamily: final.fontFamily, textShadow: final.textShadow, textAlign: final.textAlign, whiteSpace: final.whiteSpace, wordBreak: final.wordBreak, margin: final.margin, padding: final.padding }, customStyles), (final.truncate
|
|
91
|
+
var mergedStyles = __assign(__assign(__assign({ display: shouldBeBlock ? 'block' : undefined, fontWeight: final.bold ? 'bold' : final.weight ? final.weight : undefined, lineHeight: final.lineHeight, letterSpacing: final.letterSpacing, textTransform: final.textTransform, textDecoration: final.textDecoration, fontFamily: final.fontFamily, textShadow: final.textShadow, textAlign: final.textAlign, whiteSpace: final.whiteSpace, wordBreak: final.wordBreak, margin: final.margin, padding: final.padding }, customStyles), style), (final.truncate
|
|
92
92
|
? {
|
|
93
93
|
display: '-webkit-box',
|
|
94
94
|
WebkitBoxOrient: 'vertical',
|
package/ui/vista/Vista.js
CHANGED
|
@@ -23,187 +23,18 @@ var Text_1 = __importDefault(require("../text/Text"));
|
|
|
23
23
|
var Col_1 = __importDefault(require("../grid/Col"));
|
|
24
24
|
var Button_1 = __importDefault(require("../button/Button"));
|
|
25
25
|
var Flex_1 = __importDefault(require("../flex/Flex"));
|
|
26
|
-
var Vista = function (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
heading = _a.heading, _l = _a.headingSize, headingSize = _l === void 0 ? '5xl' : _l, _m = _a.headingWeight, headingWeight = _m === void 0 ? 700 : _m, _o = _a.headingColor, headingColor = _o === void 0 ? '' : _o, _p = _a.headingClass, headingClass = _p === void 0 ? '' : _p, subheading = _a.subheading, _q = _a.subheadingSize, subheadingSize = _q === void 0 ? 'lg' : _q, _r = _a.subheadingWeight, subheadingWeight = _r === void 0 ? 400 : _r, _s = _a.subheadingColor, subheadingColor = _s === void 0 ? 'light' : _s, _t = _a.subheadingClass, subheadingClass = _t === void 0 ? '' : _t, content = _a.content, _u = _a.contentSize, contentSize = _u === void 0 ? 'base' : _u, _v = _a.contentWeight, contentWeight = _v === void 0 ? 400 : _v, _w = _a.contentColor, contentColor = _w === void 0 ? '' : _w, _x = _a.contentClass, contentClass = _x === void 0 ? '' : _x, image = _a.image, _y = _a.imageUrl, imageUrl = _y === void 0 ? '' : _y, _z = _a.imageAlt, imageAlt = _z === void 0 ? '' : _z, _0 = _a.imageClass, imageClass = _0 === void 0 ? '' : _0, _1 = _a.imageSize, imageSize = _1 === void 0 ? '100%' : _1, cta = _a.cta, _2 = _a.ctaClass, ctaClass = _2 === void 0 ? '' : _2, _3 = _a.sectionClass, sectionClass = _3 === void 0 ? '' : _3, _4 = _a.containerClass, containerClass = _4 === void 0 ? '' : _4, _5 = _a.textWrapperClass, textWrapperClass = _5 === void 0 ? '' : _5, _6 = _a.gap, gap = _6 === void 0 ? '2rem' : _6, _7 = _a.imageWrapperClass, imageWrapperClass = _7 === void 0 ? '' : _7, children = _a.children,
|
|
30
|
-
// Gradient Props
|
|
31
|
-
_8 = _a.showGradient,
|
|
32
|
-
// Gradient Props
|
|
33
|
-
showGradient = _8 === void 0 ? false : _8, _9 = _a.gradientPosition, gradientPosition = _9 === void 0 ? 'bottom-right' : _9, _10 = _a.gradientSize, gradientSize = _10 === void 0 ? '300px' : _10, _11 = _a.blurry, blurry = _11 === void 0 ? 100 : _11, _12 = _a.opacity, opacity = _12 === void 0 ? 0.4 : _12, gradientColors = _a.gradientColors, _13 = _a.fade, fade = _13 === void 0 ? false : _13, _14 = _a.fadeDirection, fadeDirection = _14 === void 0 ? 'bottom' : _14, _15 = _a.fadeRadial, fadeRadial = _15 === void 0 ? false : _15, _16 = _a.fadeOverlayDarken, fadeOverlayDarken = _16 === void 0 ? 0.5 : _16, _17 = _a.backgroundImage, backgroundImage = _17 === void 0 ? '' : _17, _18 = _a.variant, variant = _18 === void 0 ? '' : _18,
|
|
34
|
-
// New CTA Button Props
|
|
35
|
-
_19 = _a.showPrimaryCTA,
|
|
36
|
-
// New CTA Button Props
|
|
37
|
-
showPrimaryCTA = _19 === void 0 ? false : _19, _20 = _a.showSecondaryCTA, showSecondaryCTA = _20 === void 0 ? false : _20, _21 = _a.showAccentCTA, showAccentCTA = _21 === void 0 ? false : _21, _22 = _a.primaryButtonOutlined, primaryButtonOutlined = _22 === void 0 ? false : _22, _23 = _a.secondaryButtonOutlined, secondaryButtonOutlined = _23 === void 0 ? false : _23, _24 = _a.accentButtonOutlined, accentButtonOutlined = _24 === void 0 ? false : _24, _25 = _a.ctaPrimaryUrl, ctaPrimaryUrl = _25 === void 0 ? '' : _25, _26 = _a.ctaSecondaryUrl, ctaSecondaryUrl = _26 === void 0 ? '' : _26, _27 = _a.ctaAccentUrl, ctaAccentUrl = _27 === void 0 ? '' : _27, _28 = _a.ctaPrimaryText, ctaPrimaryText = _28 === void 0 ? 'Primary Action' : _28, _29 = _a.ctaSecondaryText, ctaSecondaryText = _29 === void 0 ? 'Secondary Action' : _29, _30 = _a.ctaAccentText, ctaAccentText = _30 === void 0 ? 'Accent Action' : _30, _31 = _a.ctaGap, ctaGap = _31 === void 0 ? 1 : _31, _32 = _a.ctaFlexJustify, ctaFlexJustify = _32 === void 0 ? 'center' : _32, _33 = _a.ctaPrimaryRounded, ctaPrimaryRounded = _33 === void 0 ? false : _33, _34 = _a.ctaPrimaryFlat, ctaPrimaryFlat = _34 === void 0 ? false : _34, _35 = _a.ctaPrimaryPrefix, ctaPrimaryPrefix = _35 === void 0 ? '' : _35, _36 = _a.ctaPrimarySuffix, ctaPrimarySuffix = _36 === void 0 ? '' : _36, _37 = _a.ctaSecondaryRounded, ctaSecondaryRounded = _37 === void 0 ? false : _37, _38 = _a.ctaSecondaryFlat, ctaSecondaryFlat = _38 === void 0 ? false : _38, _39 = _a.ctaSecondaryPrefix, ctaSecondaryPrefix = _39 === void 0 ? '' : _39, _40 = _a.ctaSecondarySuffix, ctaSecondarySuffix = _40 === void 0 ? '' : _40, _41 = _a.ctaAccentRounded, ctaAccentRounded = _41 === void 0 ? false : _41, _42 = _a.ctaAccentFlat, ctaAccentFlat = _42 === void 0 ? false : _42, _43 = _a.ctaAccentPrefix, ctaAccentPrefix = _43 === void 0 ? '' : _43, _44 = _a.ctaAccentSuffix, ctaAccentSuffix = _44 === void 0 ? '' : _44, primaryIconSize = _a.primaryIconSize, secondaryIconSize = _a.secondaryIconSize, accentIconSize = _a.accentIconSize;
|
|
38
|
-
// Use the component config hook
|
|
39
|
-
var mergeWithLocal = (0, componentUtils_1.useComponentConfiguration)('Vista', variant).mergeWithLocal;
|
|
40
|
-
// Create local props object
|
|
41
|
-
var localProps = {
|
|
42
|
-
layout: layout,
|
|
43
|
-
reverse: reverse,
|
|
44
|
-
bg: bg,
|
|
45
|
-
padding: padding,
|
|
46
|
-
textAlign: textAlign,
|
|
47
|
-
imgPosition: imgPosition,
|
|
48
|
-
funcss: funcss,
|
|
49
|
-
pattern: pattern,
|
|
50
|
-
patternOpacity: patternOpacity,
|
|
51
|
-
showGradient: showGradient,
|
|
52
|
-
gradientPosition: gradientPosition,
|
|
53
|
-
gradientSize: gradientSize,
|
|
54
|
-
blurry: blurry,
|
|
55
|
-
opacity: opacity,
|
|
56
|
-
gradientColors: gradientColors,
|
|
57
|
-
fade: fade,
|
|
58
|
-
fadeDirection: fadeDirection,
|
|
59
|
-
fadeRadial: fadeRadial,
|
|
60
|
-
fadeOverlayDarken: fadeOverlayDarken,
|
|
61
|
-
backgroundImage: backgroundImage,
|
|
62
|
-
sectionClass: sectionClass,
|
|
63
|
-
containerClass: containerClass,
|
|
64
|
-
textWrapperClass: textWrapperClass,
|
|
65
|
-
imageWrapperClass: imageWrapperClass,
|
|
66
|
-
gap: gap,
|
|
67
|
-
// Enhanced content props
|
|
68
|
-
heading: heading,
|
|
69
|
-
headingSize: headingSize,
|
|
70
|
-
headingWeight: headingWeight,
|
|
71
|
-
headingColor: headingColor,
|
|
72
|
-
headingClass: headingClass,
|
|
73
|
-
subheading: subheading,
|
|
74
|
-
subheadingSize: subheadingSize,
|
|
75
|
-
subheadingWeight: subheadingWeight,
|
|
76
|
-
subheadingColor: subheadingColor,
|
|
77
|
-
subheadingClass: subheadingClass,
|
|
78
|
-
content: content,
|
|
79
|
-
contentSize: contentSize,
|
|
80
|
-
contentWeight: contentWeight,
|
|
81
|
-
contentColor: contentColor,
|
|
82
|
-
contentClass: contentClass,
|
|
83
|
-
image: image,
|
|
84
|
-
imageUrl: imageUrl,
|
|
85
|
-
imageSize: imageSize,
|
|
86
|
-
imageAlt: imageAlt,
|
|
87
|
-
imageClass: imageClass,
|
|
88
|
-
cta: cta,
|
|
89
|
-
ctaClass: ctaClass,
|
|
90
|
-
// CTA Button props
|
|
91
|
-
showPrimaryCTA: showPrimaryCTA,
|
|
92
|
-
showSecondaryCTA: showSecondaryCTA,
|
|
93
|
-
showAccentCTA: showAccentCTA,
|
|
94
|
-
primaryButtonOutlined: primaryButtonOutlined,
|
|
95
|
-
secondaryButtonOutlined: secondaryButtonOutlined,
|
|
96
|
-
accentButtonOutlined: accentButtonOutlined,
|
|
97
|
-
ctaPrimaryUrl: ctaPrimaryUrl,
|
|
98
|
-
ctaSecondaryUrl: ctaSecondaryUrl,
|
|
99
|
-
ctaAccentUrl: ctaAccentUrl,
|
|
100
|
-
ctaPrimaryText: ctaPrimaryText,
|
|
101
|
-
ctaSecondaryText: ctaSecondaryText,
|
|
102
|
-
ctaAccentText: ctaAccentText,
|
|
103
|
-
ctaGap: ctaGap,
|
|
104
|
-
ctaFlexJustify: ctaFlexJustify,
|
|
105
|
-
ctaPrimaryRounded: ctaPrimaryRounded,
|
|
106
|
-
ctaPrimaryFlat: ctaPrimaryFlat,
|
|
107
|
-
ctaPrimaryPrefix: ctaPrimaryPrefix,
|
|
108
|
-
ctaPrimarySuffix: ctaPrimarySuffix,
|
|
109
|
-
ctaSecondaryRounded: ctaSecondaryRounded,
|
|
110
|
-
ctaSecondaryFlat: ctaSecondaryFlat,
|
|
111
|
-
ctaSecondaryPrefix: ctaSecondaryPrefix,
|
|
112
|
-
ctaSecondarySuffix: ctaSecondarySuffix,
|
|
113
|
-
ctaAccentRounded: ctaAccentRounded,
|
|
114
|
-
ctaAccentFlat: ctaAccentFlat,
|
|
115
|
-
ctaAccentPrefix: ctaAccentPrefix,
|
|
116
|
-
ctaAccentSuffix: ctaAccentSuffix,
|
|
117
|
-
primaryIconSize: primaryIconSize,
|
|
118
|
-
secondaryIconSize: secondaryIconSize,
|
|
119
|
-
accentIconSize: accentIconSize,
|
|
120
|
-
};
|
|
26
|
+
var Vista = function (localProps) {
|
|
27
|
+
// Use the component config hook with the variant from localProps
|
|
28
|
+
var mergeWithLocal = (0, componentUtils_1.useComponentConfiguration)('Vista', localProps.variant).mergeWithLocal;
|
|
121
29
|
// Merge config with local props - local props override config
|
|
122
30
|
var mergedProps = mergeWithLocal(localProps).props;
|
|
123
|
-
//
|
|
124
|
-
var final =
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
textAlign: textAlign !== null && textAlign !== void 0 ? textAlign : mergedProps.textAlign,
|
|
131
|
-
imgPosition: imgPosition !== null && imgPosition !== void 0 ? imgPosition : mergedProps.imgPosition,
|
|
132
|
-
funcss: funcss !== null && funcss !== void 0 ? funcss : mergedProps.funcss,
|
|
133
|
-
pattern: pattern !== null && pattern !== void 0 ? pattern : mergedProps.pattern,
|
|
134
|
-
patternOpacity: patternOpacity !== null && patternOpacity !== void 0 ? patternOpacity : mergedProps.patternOpacity,
|
|
135
|
-
// Gradient & effects
|
|
136
|
-
showGradient: showGradient !== null && showGradient !== void 0 ? showGradient : mergedProps.showGradient,
|
|
137
|
-
gradientPosition: gradientPosition !== null && gradientPosition !== void 0 ? gradientPosition : mergedProps.gradientPosition,
|
|
138
|
-
gradientSize: gradientSize !== null && gradientSize !== void 0 ? gradientSize : mergedProps.gradientSize,
|
|
139
|
-
blurry: blurry !== null && blurry !== void 0 ? blurry : mergedProps.blurry,
|
|
140
|
-
opacity: opacity !== null && opacity !== void 0 ? opacity : mergedProps.opacity,
|
|
141
|
-
gradientColors: gradientColors !== null && gradientColors !== void 0 ? gradientColors : mergedProps.gradientColors,
|
|
142
|
-
fade: fade !== null && fade !== void 0 ? fade : mergedProps.fade,
|
|
143
|
-
fadeDirection: fadeDirection !== null && fadeDirection !== void 0 ? fadeDirection : mergedProps.fadeDirection,
|
|
144
|
-
fadeRadial: fadeRadial !== null && fadeRadial !== void 0 ? fadeRadial : mergedProps.fadeRadial,
|
|
145
|
-
fadeOverlayDarken: fadeOverlayDarken !== null && fadeOverlayDarken !== void 0 ? fadeOverlayDarken : mergedProps.fadeOverlayDarken,
|
|
146
|
-
backgroundImage: backgroundImage !== null && backgroundImage !== void 0 ? backgroundImage : mergedProps.backgroundImage,
|
|
147
|
-
// Classes
|
|
148
|
-
sectionClass: sectionClass !== null && sectionClass !== void 0 ? sectionClass : mergedProps.sectionClass,
|
|
149
|
-
containerClass: containerClass !== null && containerClass !== void 0 ? containerClass : mergedProps.containerClass,
|
|
150
|
-
textWrapperClass: textWrapperClass !== null && textWrapperClass !== void 0 ? textWrapperClass : mergedProps.textWrapperClass,
|
|
151
|
-
imageWrapperClass: imageWrapperClass !== null && imageWrapperClass !== void 0 ? imageWrapperClass : mergedProps.imageWrapperClass,
|
|
152
|
-
gap: gap !== null && gap !== void 0 ? gap : mergedProps.gap,
|
|
153
|
-
// Content
|
|
154
|
-
heading: heading !== null && heading !== void 0 ? heading : mergedProps.heading,
|
|
155
|
-
headingSize: headingSize !== null && headingSize !== void 0 ? headingSize : mergedProps.headingSize,
|
|
156
|
-
headingWeight: headingWeight !== null && headingWeight !== void 0 ? headingWeight : mergedProps.headingWeight,
|
|
157
|
-
headingColor: headingColor !== null && headingColor !== void 0 ? headingColor : mergedProps.headingColor,
|
|
158
|
-
headingClass: headingClass !== null && headingClass !== void 0 ? headingClass : mergedProps.headingClass,
|
|
159
|
-
subheading: subheading !== null && subheading !== void 0 ? subheading : mergedProps.subheading,
|
|
160
|
-
subheadingSize: subheadingSize !== null && subheadingSize !== void 0 ? subheadingSize : mergedProps.subheadingSize,
|
|
161
|
-
subheadingWeight: subheadingWeight !== null && subheadingWeight !== void 0 ? subheadingWeight : mergedProps.subheadingWeight,
|
|
162
|
-
subheadingColor: subheadingColor !== null && subheadingColor !== void 0 ? subheadingColor : mergedProps.subheadingColor,
|
|
163
|
-
subheadingClass: subheadingClass !== null && subheadingClass !== void 0 ? subheadingClass : mergedProps.subheadingClass,
|
|
164
|
-
content: content !== null && content !== void 0 ? content : mergedProps.content,
|
|
165
|
-
contentSize: contentSize !== null && contentSize !== void 0 ? contentSize : mergedProps.contentSize,
|
|
166
|
-
contentWeight: contentWeight !== null && contentWeight !== void 0 ? contentWeight : mergedProps.contentWeight,
|
|
167
|
-
contentColor: contentColor !== null && contentColor !== void 0 ? contentColor : mergedProps.contentColor,
|
|
168
|
-
contentClass: contentClass !== null && contentClass !== void 0 ? contentClass : mergedProps.contentClass,
|
|
169
|
-
image: image !== null && image !== void 0 ? image : mergedProps.image,
|
|
170
|
-
imageUrl: imageUrl !== null && imageUrl !== void 0 ? imageUrl : mergedProps.imageUrl,
|
|
171
|
-
imageAlt: imageAlt !== null && imageAlt !== void 0 ? imageAlt : mergedProps.imageAlt,
|
|
172
|
-
imageClass: imageClass !== null && imageClass !== void 0 ? imageClass : mergedProps.imageClass,
|
|
173
|
-
imageSize: imageSize !== null && imageSize !== void 0 ? imageSize : mergedProps.imageSize,
|
|
174
|
-
cta: cta !== null && cta !== void 0 ? cta : mergedProps.cta,
|
|
175
|
-
ctaClass: ctaClass !== null && ctaClass !== void 0 ? ctaClass : mergedProps.ctaClass,
|
|
176
|
-
// CTA Buttons
|
|
177
|
-
showPrimaryCTA: showPrimaryCTA !== null && showPrimaryCTA !== void 0 ? showPrimaryCTA : mergedProps.showPrimaryCTA,
|
|
178
|
-
showSecondaryCTA: showSecondaryCTA !== null && showSecondaryCTA !== void 0 ? showSecondaryCTA : mergedProps.showSecondaryCTA,
|
|
179
|
-
showAccentCTA: showAccentCTA !== null && showAccentCTA !== void 0 ? showAccentCTA : mergedProps.showAccentCTA,
|
|
180
|
-
primaryButtonOutlined: primaryButtonOutlined !== null && primaryButtonOutlined !== void 0 ? primaryButtonOutlined : mergedProps.primaryButtonOutlined,
|
|
181
|
-
secondaryButtonOutlined: secondaryButtonOutlined !== null && secondaryButtonOutlined !== void 0 ? secondaryButtonOutlined : mergedProps.secondaryButtonOutlined,
|
|
182
|
-
accentButtonOutlined: accentButtonOutlined !== null && accentButtonOutlined !== void 0 ? accentButtonOutlined : mergedProps.accentButtonOutlined,
|
|
183
|
-
ctaPrimaryUrl: ctaPrimaryUrl !== null && ctaPrimaryUrl !== void 0 ? ctaPrimaryUrl : mergedProps.ctaPrimaryUrl,
|
|
184
|
-
ctaSecondaryUrl: ctaSecondaryUrl !== null && ctaSecondaryUrl !== void 0 ? ctaSecondaryUrl : mergedProps.ctaSecondaryUrl,
|
|
185
|
-
ctaAccentUrl: ctaAccentUrl !== null && ctaAccentUrl !== void 0 ? ctaAccentUrl : mergedProps.ctaAccentUrl,
|
|
186
|
-
ctaPrimaryText: ctaPrimaryText !== null && ctaPrimaryText !== void 0 ? ctaPrimaryText : mergedProps.ctaPrimaryText,
|
|
187
|
-
ctaSecondaryText: ctaSecondaryText !== null && ctaSecondaryText !== void 0 ? ctaSecondaryText : mergedProps.ctaSecondaryText,
|
|
188
|
-
ctaAccentText: ctaAccentText !== null && ctaAccentText !== void 0 ? ctaAccentText : mergedProps.ctaAccentText,
|
|
189
|
-
ctaGap: ctaGap !== null && ctaGap !== void 0 ? ctaGap : mergedProps.ctaGap,
|
|
190
|
-
ctaFlexJustify: ctaFlexJustify !== null && ctaFlexJustify !== void 0 ? ctaFlexJustify : mergedProps.ctaFlexJustify,
|
|
191
|
-
ctaPrimaryRounded: ctaPrimaryRounded !== null && ctaPrimaryRounded !== void 0 ? ctaPrimaryRounded : mergedProps.ctaPrimaryRounded,
|
|
192
|
-
ctaPrimaryFlat: ctaPrimaryFlat !== null && ctaPrimaryFlat !== void 0 ? ctaPrimaryFlat : mergedProps.ctaPrimaryFlat,
|
|
193
|
-
ctaPrimaryPrefix: ctaPrimaryPrefix !== null && ctaPrimaryPrefix !== void 0 ? ctaPrimaryPrefix : mergedProps.ctaPrimaryPrefix,
|
|
194
|
-
ctaPrimarySuffix: ctaPrimarySuffix !== null && ctaPrimarySuffix !== void 0 ? ctaPrimarySuffix : mergedProps.ctaPrimarySuffix,
|
|
195
|
-
ctaSecondaryRounded: ctaSecondaryRounded !== null && ctaSecondaryRounded !== void 0 ? ctaSecondaryRounded : mergedProps.ctaSecondaryRounded,
|
|
196
|
-
ctaSecondaryFlat: ctaSecondaryFlat !== null && ctaSecondaryFlat !== void 0 ? ctaSecondaryFlat : mergedProps.ctaSecondaryFlat,
|
|
197
|
-
ctaSecondaryPrefix: ctaSecondaryPrefix !== null && ctaSecondaryPrefix !== void 0 ? ctaSecondaryPrefix : mergedProps.ctaSecondaryPrefix,
|
|
198
|
-
ctaSecondarySuffix: ctaSecondarySuffix !== null && ctaSecondarySuffix !== void 0 ? ctaSecondarySuffix : mergedProps.ctaSecondarySuffix,
|
|
199
|
-
ctaAccentRounded: ctaAccentRounded !== null && ctaAccentRounded !== void 0 ? ctaAccentRounded : mergedProps.ctaAccentRounded,
|
|
200
|
-
ctaAccentFlat: ctaAccentFlat !== null && ctaAccentFlat !== void 0 ? ctaAccentFlat : mergedProps.ctaAccentFlat,
|
|
201
|
-
ctaAccentPrefix: ctaAccentPrefix !== null && ctaAccentPrefix !== void 0 ? ctaAccentPrefix : mergedProps.ctaAccentPrefix,
|
|
202
|
-
ctaAccentSuffix: ctaAccentSuffix !== null && ctaAccentSuffix !== void 0 ? ctaAccentSuffix : mergedProps.ctaAccentSuffix,
|
|
203
|
-
primaryIconSize: primaryIconSize !== null && primaryIconSize !== void 0 ? primaryIconSize : mergedProps.primaryIconSize,
|
|
204
|
-
secondaryIconSize: secondaryIconSize !== null && secondaryIconSize !== void 0 ? secondaryIconSize : mergedProps.secondaryIconSize,
|
|
205
|
-
accentIconSize: accentIconSize !== null && accentIconSize !== void 0 ? accentIconSize : mergedProps.accentIconSize,
|
|
206
|
-
};
|
|
31
|
+
// Use mergedProps directly - they already have the correct merge logic applied
|
|
32
|
+
var final = mergedProps;
|
|
33
|
+
// Debug: Log what props are actually coming through
|
|
34
|
+
react_1.default.useEffect(function () {
|
|
35
|
+
console.log('Vista merged props:', mergedProps);
|
|
36
|
+
console.log('Vista config available:', Object.keys(mergedProps).length > 0);
|
|
37
|
+
}, [mergedProps]);
|
|
207
38
|
var layoutClass = [
|
|
208
39
|
final.layout,
|
|
209
40
|
final.reverse ? 'reverse' : '',
|
|
@@ -225,7 +56,7 @@ var Vista = function (_a) {
|
|
|
225
56
|
var TextContent = (react_1.default.createElement("div", { className: "vista-text ".concat(final.layout === 'centered' ? "text-center" : "", " ").concat(final.textWrapperClass) },
|
|
226
57
|
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)),
|
|
227
58
|
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)),
|
|
228
|
-
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 }, children || (typeof final.content === 'string' ? react_1.default.createElement("div", { dangerouslySetInnerHTML: { __html: final.content } }) : final.content))),
|
|
59
|
+
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))),
|
|
229
60
|
final.cta ? (react_1.default.createElement("div", { className: "mt-6 ".concat(final.ctaClass) }, final.cta)) : (react_1.default.createElement(CTAButtons, null))));
|
|
230
61
|
// Enhanced Image Content - uses imageUrl if no image component provided
|
|
231
62
|
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: {
|
|
@@ -244,7 +75,7 @@ var Vista = function (_a) {
|
|
|
244
75
|
};
|
|
245
76
|
var primaryColor = (0, getCssVariable_1.getCssVariableValue)('primary');
|
|
246
77
|
var secondaryColor = (0, getCssVariable_1.getCssVariableValue)('secondary');
|
|
247
|
-
var gradientStyle = __assign({ position: 'absolute', width: final.gradientSize, height: final.gradientSize, background: final.gradientColors || "radial-gradient(circle, ".concat(primaryColor, ", ").concat(secondaryColor, ")"), opacity: final.opacity, filter: "blur(".concat(final.blurry, "
|
|
78
|
+
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]);
|
|
248
79
|
return (react_1.default.createElement(ScrollInView_1.default, null,
|
|
249
80
|
react_1.default.createElement("div", { className: "vista \n ".concat(final.pattern === 'grid' ? 'grid-bg' :
|
|
250
81
|
final.pattern === 'dots' ? 'bg-pattern-dots' :
|