funuicss 3.6.8 → 3.6.10
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 +9 -25
- package/package.json +1 -1
- package/ui/accordion/Accordion.d.ts +1 -0
- package/ui/accordion/Accordion.js +4 -4
- package/ui/input/Input.js +83 -20
- package/ui/sidebar/SideBar.js +6 -4
- package/ui/theme/theme.d.ts +2 -0
- package/ui/theme/theme.js +9 -9
- package/ui/vista/Vista.d.ts +19 -0
- package/ui/vista/Vista.js +102 -42
- package/utils/componentUtils.js +3 -3
package/css/fun.css
CHANGED
|
@@ -1953,7 +1953,9 @@ link:hover {
|
|
|
1953
1953
|
.text-dark{
|
|
1954
1954
|
color: var(--dark) !important;
|
|
1955
1955
|
}
|
|
1956
|
-
|
|
1956
|
+
.text-default{
|
|
1957
|
+
color: var(--text-color) !important;
|
|
1958
|
+
}
|
|
1957
1959
|
.text-gradient,
|
|
1958
1960
|
.hover-text-gradient:hover {
|
|
1959
1961
|
background: -webkit-linear-gradient(var(--gradientColors));
|
|
@@ -1987,7 +1989,7 @@ body {
|
|
|
1987
1989
|
background-color: var(--page-bg) !important;
|
|
1988
1990
|
color: var(--text-color) !important;
|
|
1989
1991
|
}
|
|
1990
|
-
.bg{
|
|
1992
|
+
.bg, .page-bg{
|
|
1991
1993
|
background-color: var(--page-bg) !important;
|
|
1992
1994
|
}
|
|
1993
1995
|
|
|
@@ -3223,16 +3225,13 @@ border-radius: var(--borderRadius);
|
|
|
3223
3225
|
|
|
3224
3226
|
.main-content {
|
|
3225
3227
|
flex: 1;
|
|
3226
|
-
padding: 1rem 5px;
|
|
3227
3228
|
overflow-y: auto;
|
|
3228
3229
|
}
|
|
3229
3230
|
|
|
3230
3231
|
.sidebar-link {
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
gap: 0.5rem;
|
|
3232
|
+
text-align: left !important;
|
|
3233
|
+
justify-content: flex-start !important;
|
|
3234
3234
|
text-decoration: none;
|
|
3235
|
-
border-radius: 0.3rem;
|
|
3236
3235
|
}
|
|
3237
3236
|
|
|
3238
3237
|
|
|
@@ -3493,7 +3492,6 @@ border-radius: var(--borderRadius);
|
|
|
3493
3492
|
}
|
|
3494
3493
|
|
|
3495
3494
|
|
|
3496
|
-
.button
|
|
3497
3495
|
/*inputs*/
|
|
3498
3496
|
.input {
|
|
3499
3497
|
padding: var(--inputPadding);
|
|
@@ -3559,17 +3557,6 @@ border-radius: var(--borderRadius);
|
|
|
3559
3557
|
display: none;
|
|
3560
3558
|
}
|
|
3561
3559
|
|
|
3562
|
-
.input.success-input{
|
|
3563
|
-
border-bottom:var(--inputBorder) solid var(--success) !important;
|
|
3564
|
-
}
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
.input.warning-input{
|
|
3568
|
-
border-bottom:var(--inputBorder) solid var(--warning) !important;
|
|
3569
|
-
}
|
|
3570
|
-
.input.danger-input{
|
|
3571
|
-
border-bottom:var(--inputBorder) solid var(--danger) !important;
|
|
3572
|
-
}
|
|
3573
3560
|
.input.success-input ,
|
|
3574
3561
|
.warning-input,
|
|
3575
3562
|
.input.danger-input:focus
|
|
@@ -3578,8 +3565,7 @@ outline: none !important;
|
|
|
3578
3565
|
}
|
|
3579
3566
|
input , select {height: var(--inputButtonHeight); border-radius: var(--radius);}
|
|
3580
3567
|
textarea{border-radius: var(--radius) !important; height: fit-content !important;}
|
|
3581
|
-
.input.flat{border-radius: 0;}
|
|
3582
|
-
|
|
3568
|
+
.input.flat{border-radius: 0 !important;}
|
|
3583
3569
|
.input:focus {
|
|
3584
3570
|
border-bottom: var(--inputBorder) solid var(--primary);
|
|
3585
3571
|
}
|
|
@@ -3625,9 +3611,7 @@ background-color: rgba(var(--borderRgb), 0.3);
|
|
|
3625
3611
|
box-shadow: 0 0 0 3px rgba(var(--borderRgb), 0.1);
|
|
3626
3612
|
}
|
|
3627
3613
|
|
|
3628
|
-
.input.borderless {
|
|
3629
|
-
border: none;
|
|
3630
|
-
}
|
|
3614
|
+
.input.borderless {border: none !important;}
|
|
3631
3615
|
.input.borderless:focus {
|
|
3632
3616
|
border: none;
|
|
3633
3617
|
}
|
|
@@ -4671,6 +4655,7 @@ th {
|
|
|
4671
4655
|
|
|
4672
4656
|
.accordion {
|
|
4673
4657
|
width: 100%;
|
|
4658
|
+
overflow: visible !important;
|
|
4674
4659
|
}
|
|
4675
4660
|
|
|
4676
4661
|
.accordion-item {
|
|
@@ -4705,7 +4690,6 @@ cursor: pointer;
|
|
|
4705
4690
|
|
|
4706
4691
|
.accordion-content {
|
|
4707
4692
|
max-height: 0;
|
|
4708
|
-
overflow: hidden;
|
|
4709
4693
|
transition: max-height 1s ease-in-out, opacity 0.3s ease;
|
|
4710
4694
|
opacity: 0;
|
|
4711
4695
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "3.6.
|
|
2
|
+
"version": "3.6.10",
|
|
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",
|
|
@@ -59,14 +59,14 @@ var AccordionItem = function (_a) {
|
|
|
59
59
|
react_1.default.createElement("div", { className: "col fit" }, title)),
|
|
60
60
|
react_1.default.createElement("div", { style: { lineHeight: 0 }, className: "".concat(iconClass, " ").concat(isOpen ? 'accordion-rotated' : '') },
|
|
61
61
|
react_1.default.createElement(pi_1.PiCaretDown, null))),
|
|
62
|
-
react_1.default.createElement("div", { className: "accordion-content ".concat(contentClass, " ").concat(isOpen ? 'open' : '') },
|
|
62
|
+
react_1.default.createElement("div", { style: { overflow: isOpen ? 'visible' : 'hidden' }, className: "accordion-content ".concat(contentClass, " ").concat(isOpen ? 'open' : '') },
|
|
63
63
|
react_1.default.createElement("div", { className: "accordion-inner" }, content))));
|
|
64
64
|
};
|
|
65
65
|
exports.AccordionItem = AccordionItem;
|
|
66
66
|
var Accordion = function (_a) {
|
|
67
67
|
var _b;
|
|
68
|
-
var items = _a.items, _c = _a.allowMultiple, allowMultiple = _c === void 0 ? false : _c, _d = _a.defaultOpenIndexes, defaultOpenIndexes = _d === void 0 ? [] : _d, itemClass = _a.itemClass, titleClass = _a.titleClass, iconClass = _a.iconClass, contentClass = _a.contentClass, activeClass = _a.activeClass;
|
|
69
|
-
var
|
|
68
|
+
var items = _a.items, _c = _a.allowMultiple, allowMultiple = _c === void 0 ? false : _c, _d = _a.defaultOpenIndexes, defaultOpenIndexes = _d === void 0 ? [] : _d, itemClass = _a.itemClass, titleClass = _a.titleClass, iconClass = _a.iconClass, contentClass = _a.contentClass, activeClass = _a.activeClass, _e = _a.funcss, funcss = _e === void 0 ? '' : _e;
|
|
69
|
+
var _f = (0, react_1.useState)(allowMultiple ? defaultOpenIndexes : [(_b = defaultOpenIndexes[0]) !== null && _b !== void 0 ? _b : -1]), openIndexes = _f[0], setOpenIndexes = _f[1];
|
|
70
70
|
var toggleIndex = function (index) {
|
|
71
71
|
if (allowMultiple) {
|
|
72
72
|
if (openIndexes.includes(index)) {
|
|
@@ -80,6 +80,6 @@ var Accordion = function (_a) {
|
|
|
80
80
|
setOpenIndexes(openIndexes.includes(index) ? [] : [index]);
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
|
-
return (react_1.default.createElement("div", { className: "accordion" }, items.map(function (item, index) { return (react_1.default.createElement(exports.AccordionItem, { key: index, index: index, icon: item.icon, title: item.title, content: item.content, isOpen: openIndexes.includes(index), onToggle: function () { return toggleIndex(index); }, itemClass: itemClass, titleClass: titleClass, iconClass: iconClass, contentClass: contentClass, activeClass: activeClass })); })));
|
|
83
|
+
return (react_1.default.createElement("div", { className: "accordion ".concat(funcss) }, items.map(function (item, index) { return (react_1.default.createElement(exports.AccordionItem, { key: index, index: index, icon: item.icon, title: item.title, content: item.content, isOpen: openIndexes.includes(index), onToggle: function () { return toggleIndex(index); }, itemClass: itemClass, titleClass: titleClass, iconClass: iconClass, contentClass: contentClass, activeClass: activeClass })); })));
|
|
84
84
|
};
|
|
85
85
|
exports.default = Accordion;
|
package/ui/input/Input.js
CHANGED
|
@@ -73,7 +73,7 @@ var generateInputClasses = function (_a) {
|
|
|
73
73
|
var bgClass = bg || '';
|
|
74
74
|
var flatClass = flat ? 'flat' : '';
|
|
75
75
|
var cornerClass = leftRounded ? 'leftRounded' : rightRounded ? 'rightRounded' : '';
|
|
76
|
-
var borderClass = bordered ? 'borderedInput' : borderless ? 'borderless' : '';
|
|
76
|
+
var borderClass = bordered ? 'borderedInput' : borderless ? 'borderless' : (!bordered && !borderless ? 'borderedInput' : '');
|
|
77
77
|
return "\n ".concat(statusClass, "\n ").concat(roundedClass, "\n ").concat(bgClass, "\n ").concat(funcss || '', "\n ").concat(flatClass, "\n ").concat(cornerClass, "\n ").concat(borderClass, "\n ").concat(additionalClasses, "\n input\n ").trim().replace(/\s+/g, ' ');
|
|
78
78
|
};
|
|
79
79
|
// Iconic Input Wrapper Component
|
|
@@ -95,8 +95,24 @@ var TextInput = function (_a) {
|
|
|
95
95
|
var id = _a.id, name = _a.name, value = _a.value, defaultValue = _a.defaultValue, onChange = _a.onChange, status = _a.status, funcss = _a.funcss, bg = _a.bg, _b = _a.fullWidth, fullWidth = _b === void 0 ? true : _b, flat = _a.flat, bordered = _a.bordered, borderless = _a.borderless, rounded = _a.rounded, leftRounded = _a.leftRounded, rightRounded = _a.rightRounded, startIcon = _a.startIcon, endIcon = _a.endIcon, iconicBg = _a.iconicBg, _c = _a.type, type = _c === void 0 ? 'text' : _c, label = _a.label, _d = _a.variant, variant = _d === void 0 ? '' : _d, rest = __rest(_a, ["id", "name", "value", "defaultValue", "onChange", "status", "funcss", "bg", "fullWidth", "flat", "bordered", "borderless", "rounded", "leftRounded", "rightRounded", "startIcon", "endIcon", "iconicBg", "type", "label", "variant"]);
|
|
96
96
|
// Use the component config hook
|
|
97
97
|
var mergeWithLocal = (0, componentUtils_1.useComponentConfiguration)('Input', variant).mergeWithLocal;
|
|
98
|
-
// Merge config with local props - local props
|
|
99
|
-
var mergedProps = mergeWithLocal(
|
|
98
|
+
// Merge config with local props - local props override config
|
|
99
|
+
var mergedProps = mergeWithLocal({
|
|
100
|
+
status: status,
|
|
101
|
+
funcss: funcss,
|
|
102
|
+
bg: bg,
|
|
103
|
+
fullWidth: fullWidth,
|
|
104
|
+
flat: flat,
|
|
105
|
+
bordered: bordered,
|
|
106
|
+
borderless: borderless,
|
|
107
|
+
rounded: rounded,
|
|
108
|
+
leftRounded: leftRounded,
|
|
109
|
+
rightRounded: rightRounded,
|
|
110
|
+
startIcon: startIcon,
|
|
111
|
+
endIcon: endIcon,
|
|
112
|
+
iconicBg: iconicBg,
|
|
113
|
+
}).props;
|
|
114
|
+
// Use theme variant for fallback
|
|
115
|
+
var themeVariant = (0, theme_1.useVariant)().variant;
|
|
100
116
|
var className = generateInputClasses({
|
|
101
117
|
status: mergedProps.status,
|
|
102
118
|
rounded: mergedProps.rounded,
|
|
@@ -106,10 +122,10 @@ var TextInput = function (_a) {
|
|
|
106
122
|
leftRounded: mergedProps.leftRounded,
|
|
107
123
|
rightRounded: mergedProps.rightRounded,
|
|
108
124
|
bordered: mergedProps.bordered,
|
|
109
|
-
borderless: mergedProps.borderless
|
|
125
|
+
borderless: mergedProps.borderless,
|
|
110
126
|
});
|
|
111
127
|
var style = mergedProps.fullWidth ? { width: '100%' } : undefined;
|
|
112
|
-
var inputElement = (react_1.default.createElement("input", __assign({ id: id, name: name, className: className, onChange: onChange, defaultValue: defaultValue, type: type, placeholder: label, style: style, value: value }, mergedProps)));
|
|
128
|
+
var inputElement = (react_1.default.createElement("input", __assign({ id: id, name: name, className: className, onChange: onChange, defaultValue: defaultValue, type: type, placeholder: label, style: style, value: value }, rest, mergedProps)));
|
|
113
129
|
return (react_1.default.createElement(IconicInputWrapper, { startIcon: mergedProps.startIcon, endIcon: mergedProps.endIcon, iconicBg: mergedProps.iconicBg, funcss: mergedProps.funcss }, inputElement));
|
|
114
130
|
};
|
|
115
131
|
exports.TextInput = TextInput;
|
|
@@ -118,8 +134,24 @@ var SelectInput = function (_a) {
|
|
|
118
134
|
var id = _a.id, name = _a.name, value = _a.value, defaultValue = _a.defaultValue, onChange = _a.onChange, status = _a.status, funcss = _a.funcss, bg = _a.bg, fullWidth = _a.fullWidth, flat = _a.flat, bordered = _a.bordered, borderless = _a.borderless, rounded = _a.rounded, leftRounded = _a.leftRounded, rightRounded = _a.rightRounded, startIcon = _a.startIcon, endIcon = _a.endIcon, iconicBg = _a.iconicBg, _b = _a.options, options = _b === void 0 ? [] : _b, _c = _a.variant, variant = _c === void 0 ? '' : _c, rest = __rest(_a, ["id", "name", "value", "defaultValue", "onChange", "status", "funcss", "bg", "fullWidth", "flat", "bordered", "borderless", "rounded", "leftRounded", "rightRounded", "startIcon", "endIcon", "iconicBg", "options", "variant"]);
|
|
119
135
|
// Use the component config hook
|
|
120
136
|
var mergeWithLocal = (0, componentUtils_1.useComponentConfiguration)('Input', variant).mergeWithLocal;
|
|
121
|
-
// Merge config with local props
|
|
122
|
-
var mergedProps = mergeWithLocal(
|
|
137
|
+
// Merge config with local props
|
|
138
|
+
var mergedProps = mergeWithLocal({
|
|
139
|
+
status: status,
|
|
140
|
+
funcss: funcss,
|
|
141
|
+
bg: bg,
|
|
142
|
+
fullWidth: fullWidth,
|
|
143
|
+
flat: flat,
|
|
144
|
+
bordered: bordered,
|
|
145
|
+
borderless: borderless,
|
|
146
|
+
rounded: rounded,
|
|
147
|
+
leftRounded: leftRounded,
|
|
148
|
+
rightRounded: rightRounded,
|
|
149
|
+
startIcon: startIcon,
|
|
150
|
+
endIcon: endIcon,
|
|
151
|
+
iconicBg: iconicBg,
|
|
152
|
+
}).props;
|
|
153
|
+
// Use theme variant for fallback
|
|
154
|
+
var themeVariant = (0, theme_1.useVariant)().variant;
|
|
123
155
|
var className = generateInputClasses({
|
|
124
156
|
status: mergedProps.status,
|
|
125
157
|
rounded: mergedProps.rounded,
|
|
@@ -129,10 +161,10 @@ var SelectInput = function (_a) {
|
|
|
129
161
|
leftRounded: mergedProps.leftRounded,
|
|
130
162
|
rightRounded: mergedProps.rightRounded,
|
|
131
163
|
bordered: mergedProps.bordered,
|
|
132
|
-
borderless: mergedProps.borderless
|
|
164
|
+
borderless: mergedProps.borderless,
|
|
133
165
|
});
|
|
134
166
|
var style = mergedProps.fullWidth ? { width: '100%' } : undefined;
|
|
135
|
-
var selectElement = (react_1.default.createElement("select", __assign({ id: id, name: name, className: className, onChange: onChange, defaultValue: defaultValue, value: value, style: style }, mergedProps), options.map(function (option) { return (react_1.default.createElement("option", { key: option.value, value: option.value }, option.text)); })));
|
|
167
|
+
var selectElement = (react_1.default.createElement("select", __assign({ id: id, name: name, className: className, onChange: onChange, defaultValue: defaultValue, value: value, style: style }, rest, mergedProps), options.map(function (option) { return (react_1.default.createElement("option", { key: option.value, value: option.value }, option.text)); })));
|
|
136
168
|
return (react_1.default.createElement(IconicInputWrapper, { startIcon: mergedProps.startIcon, endIcon: mergedProps.endIcon, iconicBg: mergedProps.iconicBg, funcss: mergedProps.funcss }, selectElement));
|
|
137
169
|
};
|
|
138
170
|
exports.SelectInput = SelectInput;
|
|
@@ -141,8 +173,24 @@ var TextareaInput = function (_a) {
|
|
|
141
173
|
var id = _a.id, name = _a.name, value = _a.value, defaultValue = _a.defaultValue, onChange = _a.onChange, status = _a.status, funcss = _a.funcss, bg = _a.bg, fullWidth = _a.fullWidth, flat = _a.flat, bordered = _a.bordered, borderless = _a.borderless, rounded = _a.rounded, leftRounded = _a.leftRounded, rightRounded = _a.rightRounded, startIcon = _a.startIcon, endIcon = _a.endIcon, iconicBg = _a.iconicBg, label = _a.label, _b = _a.rows, rows = _b === void 0 ? 2 : _b, _c = _a.variant, variant = _c === void 0 ? '' : _c, rest = __rest(_a, ["id", "name", "value", "defaultValue", "onChange", "status", "funcss", "bg", "fullWidth", "flat", "bordered", "borderless", "rounded", "leftRounded", "rightRounded", "startIcon", "endIcon", "iconicBg", "label", "rows", "variant"]);
|
|
142
174
|
// Use the component config hook
|
|
143
175
|
var mergeWithLocal = (0, componentUtils_1.useComponentConfiguration)('Input', variant).mergeWithLocal;
|
|
144
|
-
// Merge config with local props
|
|
145
|
-
var mergedProps = mergeWithLocal(
|
|
176
|
+
// Merge config with local props
|
|
177
|
+
var mergedProps = mergeWithLocal({
|
|
178
|
+
status: status,
|
|
179
|
+
funcss: funcss,
|
|
180
|
+
bg: bg,
|
|
181
|
+
fullWidth: fullWidth,
|
|
182
|
+
flat: flat,
|
|
183
|
+
bordered: bordered,
|
|
184
|
+
borderless: borderless,
|
|
185
|
+
rounded: rounded,
|
|
186
|
+
leftRounded: leftRounded,
|
|
187
|
+
rightRounded: rightRounded,
|
|
188
|
+
startIcon: startIcon,
|
|
189
|
+
endIcon: endIcon,
|
|
190
|
+
iconicBg: iconicBg,
|
|
191
|
+
}).props;
|
|
192
|
+
// Use theme variant for fallback
|
|
193
|
+
var themeVariant = (0, theme_1.useVariant)().variant;
|
|
146
194
|
var className = generateInputClasses({
|
|
147
195
|
status: mergedProps.status,
|
|
148
196
|
rounded: mergedProps.rounded,
|
|
@@ -152,10 +200,10 @@ var TextareaInput = function (_a) {
|
|
|
152
200
|
leftRounded: mergedProps.leftRounded,
|
|
153
201
|
rightRounded: mergedProps.rightRounded,
|
|
154
202
|
bordered: mergedProps.bordered,
|
|
155
|
-
borderless: mergedProps.borderless
|
|
203
|
+
borderless: mergedProps.borderless,
|
|
156
204
|
});
|
|
157
205
|
var style = mergedProps.fullWidth ? { width: '100%' } : undefined;
|
|
158
|
-
var textareaElement = (react_1.default.createElement("textarea", __assign({ id: id, name: name, className: className, onChange: onChange, defaultValue: defaultValue, placeholder: label, style: style, value: value, rows: rows }, mergedProps)));
|
|
206
|
+
var textareaElement = (react_1.default.createElement("textarea", __assign({ id: id, name: name, className: className, onChange: onChange, defaultValue: defaultValue, placeholder: label, style: style, value: value, rows: rows }, rest, mergedProps)));
|
|
159
207
|
return (react_1.default.createElement(IconicInputWrapper, { startIcon: mergedProps.startIcon, endIcon: mergedProps.endIcon, iconicBg: mergedProps.iconicBg, funcss: mergedProps.funcss }, textareaElement));
|
|
160
208
|
};
|
|
161
209
|
exports.TextareaInput = TextareaInput;
|
|
@@ -165,8 +213,24 @@ var FileInput = function (_a) {
|
|
|
165
213
|
var _e = (0, react_1.useState)(''), fileName = _e[0], setFileName = _e[1];
|
|
166
214
|
// Use the component config hook
|
|
167
215
|
var mergeWithLocal = (0, componentUtils_1.useComponentConfiguration)('Input', variant).mergeWithLocal;
|
|
168
|
-
// Merge config with local props
|
|
169
|
-
var mergedProps = mergeWithLocal(
|
|
216
|
+
// Merge config with local props
|
|
217
|
+
var mergedProps = mergeWithLocal({
|
|
218
|
+
status: status,
|
|
219
|
+
funcss: funcss,
|
|
220
|
+
bg: bg,
|
|
221
|
+
fullWidth: fullWidth,
|
|
222
|
+
flat: flat,
|
|
223
|
+
rounded: rounded,
|
|
224
|
+
leftRounded: leftRounded,
|
|
225
|
+
rightRounded: rightRounded,
|
|
226
|
+
startIcon: startIcon,
|
|
227
|
+
endIcon: endIcon,
|
|
228
|
+
iconicBg: iconicBg,
|
|
229
|
+
bordered: rest.bordered,
|
|
230
|
+
borderless: rest.borderless,
|
|
231
|
+
}).props;
|
|
232
|
+
// Use theme variant for fallback
|
|
233
|
+
var themeVariant = (0, theme_1.useVariant)().variant;
|
|
170
234
|
var handleChange = function (e) {
|
|
171
235
|
var _a;
|
|
172
236
|
var file = (_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0];
|
|
@@ -192,7 +256,7 @@ var FileInput = function (_a) {
|
|
|
192
256
|
var style = mergedProps.fullWidth ? { width: '100%' } : undefined;
|
|
193
257
|
var fileInputElement = (react_1.default.createElement("div", { className: "fileInput" },
|
|
194
258
|
button || (react_1.default.createElement(Button_1.default, { funcss: mergedProps.funcss, startIcon: icon || react_1.default.createElement(pi_1.PiCloudArrowUp, null), bg: "primary", fullWidth: true, raised: true }, fileName || label)),
|
|
195
|
-
react_1.default.createElement("input", __assign({ id: id, name: name, className: className, onChange: handleChange, type: "file", style: style, value: value }, mergedProps))));
|
|
259
|
+
react_1.default.createElement("input", __assign({ id: id, name: name, className: className, onChange: handleChange, type: "file", style: style, value: value }, rest, mergedProps))));
|
|
196
260
|
return (react_1.default.createElement(IconicInputWrapper, { startIcon: mergedProps.startIcon, endIcon: mergedProps.endIcon, iconicBg: mergedProps.iconicBg, funcss: mergedProps.funcss }, fileInputElement));
|
|
197
261
|
}
|
|
198
262
|
var uploadElement = (react_1.default.createElement("div", { className: "_upload_container" },
|
|
@@ -206,7 +270,7 @@ var FileInput = function (_a) {
|
|
|
206
270
|
width: '100%',
|
|
207
271
|
} }, fileName || label),
|
|
208
272
|
extra && react_1.default.createElement("div", { className: "text-small opacity-3" }, extra)),
|
|
209
|
-
react_1.default.createElement("input", __assign({ onChange: handleChange, type: "file", id: id, className: "_upload_input" }, mergedProps))));
|
|
273
|
+
react_1.default.createElement("input", __assign({ onChange: handleChange, type: "file", id: id, className: "_upload_input" }, rest, mergedProps))));
|
|
210
274
|
return (react_1.default.createElement(IconicInputWrapper, { startIcon: mergedProps.startIcon, endIcon: mergedProps.endIcon, iconicBg: mergedProps.iconicBg, funcss: mergedProps.funcss }, uploadElement));
|
|
211
275
|
};
|
|
212
276
|
exports.FileInput = FileInput;
|
|
@@ -216,9 +280,8 @@ var Input = function (_a) {
|
|
|
216
280
|
var mergeWithLocal = (0, componentUtils_1.useComponentConfiguration)('Input', variant).mergeWithLocal;
|
|
217
281
|
// Merge config with local props
|
|
218
282
|
var mergedProps = mergeWithLocal(__assign(__assign({}, props), { startIcon: startIcon, endIcon: endIcon, iconicBg: iconicBg })).props;
|
|
219
|
-
// Handle legacy noBorder prop
|
|
220
|
-
var
|
|
221
|
-
var inputProps = __assign(__assign({}, mergedProps), { variant: variant, bordered: themeVariant === 'standard' ? true : mergedProps.bordered, borderless: themeVariant === 'minimal' ? true : noBorder || mergedProps.borderless });
|
|
283
|
+
// Handle legacy noBorder prop
|
|
284
|
+
var inputProps = __assign(__assign(__assign({}, props), mergedProps), { variant: variant, borderless: noBorder !== undefined ? noBorder : (props.borderless !== undefined ? props.borderless : mergedProps.borderless) });
|
|
222
285
|
if (select) {
|
|
223
286
|
return react_1.default.createElement(exports.SelectInput, __assign({}, inputProps));
|
|
224
287
|
}
|
package/ui/sidebar/SideBar.js
CHANGED
|
@@ -43,6 +43,7 @@ var RowFlex_1 = __importDefault(require("../specials/RowFlex"));
|
|
|
43
43
|
var Text_1 = __importDefault(require("../text/Text"));
|
|
44
44
|
var navigation_1 = require("next/navigation");
|
|
45
45
|
var theme_1 = require("../theme/theme");
|
|
46
|
+
var Button_1 = __importDefault(require("../button/Button"));
|
|
46
47
|
function SideBar(_a) {
|
|
47
48
|
var _b;
|
|
48
49
|
var _c = _a.funcss, funcss = _c === void 0 ? '' : _c, _d = _a.position, position = _d === void 0 ? 'left' : _d, _e = _a.open, open = _e === void 0 ? false : _e, header = _a.header, content = _a.content, footer = _a.footer, _f = _a.top, top = _f === void 0 ? 0 : _f, _g = _a.sidebarWidth, sidebarWidth = _g === void 0 ? 250 : _g, _h = _a.iconCSS, iconCSS = _h === void 0 ? '' : _h, _j = _a.sidebarCss, sidebarCss = _j === void 0 ? '' : _j, activeCss = _a.activeCss, _k = _a.bodyCss, bodyCss = _k === void 0 ? '' : _k, _l = _a.popIcon, popIcon = _l === void 0 ? false : _l, _m = _a.dividers, dividers = _m === void 0 ? false : _m, _o = _a.links, links = _o === void 0 ? [] : _o, children = _a.children, onClose = _a.onClose;
|
|
@@ -113,21 +114,22 @@ function SideBar(_a) {
|
|
|
113
114
|
return (react_1.default.createElement("div", { key: section, className: "sidebar-section ".concat(dividers ? "bt" : "", " pt-2 pb-2") },
|
|
114
115
|
react_1.default.createElement(Text_1.default, { size: "sm", funcss: "opacity-6 p-1 pl-2 pr-2" }, section),
|
|
115
116
|
sectionLinks.map(function (link, index) {
|
|
116
|
-
var isActive = link.onClick
|
|
117
|
+
var isActive = link.onClick
|
|
118
|
+
? selectedOption === "".concat(section, "-").concat(index)
|
|
119
|
+
: pathname === link.uri;
|
|
117
120
|
return (react_1.default.createElement("div", { onClick: function () {
|
|
118
121
|
if (isMobile) {
|
|
119
122
|
handleClose();
|
|
120
123
|
}
|
|
121
124
|
if (link === null || link === void 0 ? void 0 : link.onClick) {
|
|
122
125
|
link.onClick();
|
|
123
|
-
setselectedOption(
|
|
126
|
+
setselectedOption("".concat(section, "-").concat(index));
|
|
124
127
|
}
|
|
125
128
|
else {
|
|
126
129
|
window.location.href = link.uri;
|
|
127
130
|
}
|
|
128
131
|
}, key: link.uri },
|
|
129
|
-
react_1.default.createElement(
|
|
130
|
-
react_1.default.createElement("span", { className: "".concat(iconCSS || '', " \n ").concat((variant === 'standard' || popIcon) ? "p-1 ".concat(isActive ? "primary" : "lighter border", " central") : (variant === "minimal" && !isActive) ? "p1 central lighter " : ""), style: { lineHeight: 0, borderRadius: "0.4rem" } }, link.icon),
|
|
132
|
+
react_1.default.createElement(Button_1.default, { fullWidth: true, small: true, funcss: "p-1 pl-2 pr-2 sidebar-link text-left ".concat(isActive ? "primary ".concat(activeCss || '') : 'hoverable'), startIcon: react_1.default.createElement("span", { className: "".concat(iconCSS || '', " \n ").concat((variant === 'standard' || popIcon) ? "p-1 ".concat(isActive ? "primary" : "lighter border", " central") : (variant === "minimal" && !isActive) ? "p-1 central lighter " : ""), style: { lineHeight: 0, borderRadius: "0.4rem" } }, link.icon) },
|
|
131
133
|
react_1.default.createElement(Text_1.default, { text: link.text, size: "sm", weight: 400 }))));
|
|
132
134
|
})));
|
|
133
135
|
}))),
|
package/ui/theme/theme.d.ts
CHANGED
package/ui/theme/theme.js
CHANGED
|
@@ -190,13 +190,13 @@ var subscribeToTheme = function (projectId, callback) {
|
|
|
190
190
|
/* COMPONENT */
|
|
191
191
|
/* -------------------------------------------------------------------------- */
|
|
192
192
|
var ThemeProvider = function (_a) {
|
|
193
|
-
var theme = _a.theme, children = _a.children, projectId = _a.projectId;
|
|
194
|
-
var
|
|
195
|
-
var
|
|
196
|
-
var
|
|
197
|
-
var
|
|
198
|
-
var
|
|
199
|
-
var
|
|
193
|
+
var theme = _a.theme, children = _a.children, _b = _a.funcss, funcss = _b === void 0 ? '' : _b, _c = _a.minHeight, minHeight = _c === void 0 ? '100vh' : _c, projectId = _a.projectId;
|
|
194
|
+
var _d = (0, react_1.useState)('standard'), variant = _d[0], setVariant = _d[1];
|
|
195
|
+
var _e = (0, react_1.useState)({}), themeConfig = _e[0], setThemeConfig = _e[1];
|
|
196
|
+
var _f = (0, react_1.useState)(null), projectData = _f[0], setProjectData = _f[1];
|
|
197
|
+
var _g = (0, react_1.useState)(true), isLoading = _g[0], setIsLoading = _g[1];
|
|
198
|
+
var _h = (0, react_1.useState)(true), isInitialLoad = _h[0], setIsInitialLoad = _h[1];
|
|
199
|
+
var _j = (0, react_1.useState)(null), error = _j[0], setError = _j[1];
|
|
200
200
|
/* -------------------------- Apply base theme --------------------------- */
|
|
201
201
|
(0, react_1.useEffect)(function () {
|
|
202
202
|
var root = document.documentElement;
|
|
@@ -303,10 +303,10 @@ var ThemeProvider = function (_a) {
|
|
|
303
303
|
}); }, [variant, themeConfig, projectData, isLoading, isInitialLoad, error]);
|
|
304
304
|
/* ------------------------------- Render ------------------------------- */
|
|
305
305
|
return (react_1.default.createElement(ThemeContext.Provider, { value: contextValue },
|
|
306
|
-
react_1.default.createElement("div", { className: "theme-".concat(theme), style: {
|
|
306
|
+
react_1.default.createElement("div", { className: "theme-".concat(theme, " ").concat(funcss), style: {
|
|
307
307
|
backgroundColor: 'var(--page-bg)',
|
|
308
308
|
color: 'var(--text-color)',
|
|
309
|
-
minHeight:
|
|
309
|
+
minHeight: minHeight,
|
|
310
310
|
// Smooth transition when theme changes
|
|
311
311
|
transition: isInitialLoad ? 'none' : 'background-color 0.3s ease, color 0.3s ease',
|
|
312
312
|
} }, children)));
|
package/ui/vista/Vista.d.ts
CHANGED
|
@@ -12,12 +12,30 @@ type VistaProps = {
|
|
|
12
12
|
blurry?: number;
|
|
13
13
|
opacity?: number;
|
|
14
14
|
heading?: React.ReactNode;
|
|
15
|
+
headingSize?: string;
|
|
16
|
+
headingWeight?: number;
|
|
17
|
+
headingColor?: string;
|
|
18
|
+
headingClass?: string;
|
|
15
19
|
subheading?: React.ReactNode;
|
|
20
|
+
subheadingSize?: string;
|
|
21
|
+
subheadingWeight?: number;
|
|
22
|
+
subheadingColor?: string;
|
|
23
|
+
subheadingClass?: string;
|
|
16
24
|
content?: React.ReactNode;
|
|
25
|
+
contentSize?: string;
|
|
26
|
+
contentWeight?: number;
|
|
27
|
+
contentColor?: string;
|
|
28
|
+
contentClass?: string;
|
|
17
29
|
image?: React.ReactNode;
|
|
30
|
+
imageUrl?: string;
|
|
31
|
+
imageAlt?: string;
|
|
32
|
+
imageClass?: string;
|
|
33
|
+
imageSize?: string;
|
|
18
34
|
cta?: React.ReactNode;
|
|
35
|
+
ctaClass?: string;
|
|
19
36
|
sectionClass?: string;
|
|
20
37
|
containerClass?: string;
|
|
38
|
+
gap?: string;
|
|
21
39
|
textWrapperClass?: string;
|
|
22
40
|
imageWrapperClass?: string;
|
|
23
41
|
children?: React.ReactNode;
|
|
@@ -30,6 +48,7 @@ type VistaProps = {
|
|
|
30
48
|
fadeRadial?: boolean;
|
|
31
49
|
fadeOverlayDarken?: number;
|
|
32
50
|
backgroundImage?: string;
|
|
51
|
+
variant?: string;
|
|
33
52
|
};
|
|
34
53
|
declare const Vista: React.FC<VistaProps>;
|
|
35
54
|
export default Vista;
|
package/ui/vista/Vista.js
CHANGED
|
@@ -18,28 +18,86 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
var react_1 = __importDefault(require("react"));
|
|
19
19
|
var ScrollInView_1 = __importDefault(require("../ScrollInView/ScrollInView"));
|
|
20
20
|
var getCssVariable_1 = require("../../utils/getCssVariable");
|
|
21
|
+
var componentUtils_1 = require("../../utils/componentUtils");
|
|
22
|
+
var Text_1 = __importDefault(require("../text/Text"));
|
|
23
|
+
var Col_1 = __importDefault(require("../grid/Col"));
|
|
21
24
|
var Vista = function (_a) {
|
|
22
|
-
var _b = _a.layout, layout = _b === void 0 ? 'imageRight' : _b, _c = _a.reverse, reverse = _c === void 0 ? false : _c, _d = _a.bg, bg = _d === void 0 ? '' : _d, _e = _a.padding, padding = _e === void 0 ? 'padding-lg' : _e, _f = _a.textAlign, textAlign = _f === void 0 ? 'left' : _f, _g = _a.imgPosition, imgPosition = _g === void 0 ? 'top' : _g, _h = _a.funcss, funcss = _h === void 0 ? '' : _h, _j = _a.pattern, pattern = _j === void 0 ? '' : _j, _k = _a.patternOpacity, patternOpacity = _k === void 0 ? pattern === 'grid' ? 0.15 : pattern === 'dots' ? 0.4 : pattern === 'diagonal' ? 0.2 : pattern === 'checkerboard' ? 0.2 : pattern === 'horizontal' ? 0.2 : pattern === 'vertical' ? 0.2 : 0.1 : _k,
|
|
25
|
+
var _b = _a.layout, layout = _b === void 0 ? 'imageRight' : _b, _c = _a.reverse, reverse = _c === void 0 ? false : _c, _d = _a.bg, bg = _d === void 0 ? '' : _d, _e = _a.padding, padding = _e === void 0 ? 'padding-lg' : _e, _f = _a.textAlign, textAlign = _f === void 0 ? 'left' : _f, _g = _a.imgPosition, imgPosition = _g === void 0 ? 'top' : _g, _h = _a.funcss, funcss = _h === void 0 ? '' : _h, _j = _a.pattern, pattern = _j === void 0 ? '' : _j, _k = _a.patternOpacity, patternOpacity = _k === void 0 ? pattern === 'grid' ? 0.15 : pattern === 'dots' ? 0.4 : pattern === 'diagonal' ? 0.2 : pattern === 'checkerboard' ? 0.2 : pattern === 'horizontal' ? 0.2 : pattern === 'vertical' ? 0.2 : 0.1 : _k,
|
|
26
|
+
// Enhanced Content
|
|
27
|
+
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,
|
|
23
28
|
// Gradient Props
|
|
24
|
-
|
|
29
|
+
_8 = _a.showGradient,
|
|
25
30
|
// Gradient Props
|
|
26
|
-
showGradient =
|
|
31
|
+
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;
|
|
32
|
+
// Use the component config hook
|
|
33
|
+
var mergeWithLocal = (0, componentUtils_1.useComponentConfiguration)('Vista', variant).mergeWithLocal;
|
|
34
|
+
// Merge config with local props - local props should override config
|
|
35
|
+
var mergedProps = mergeWithLocal({
|
|
36
|
+
layout: layout,
|
|
37
|
+
reverse: reverse,
|
|
38
|
+
bg: bg,
|
|
39
|
+
padding: padding,
|
|
40
|
+
textAlign: textAlign,
|
|
41
|
+
imgPosition: imgPosition,
|
|
42
|
+
funcss: funcss,
|
|
43
|
+
pattern: pattern,
|
|
44
|
+
patternOpacity: patternOpacity,
|
|
45
|
+
showGradient: showGradient,
|
|
46
|
+
gradientPosition: gradientPosition,
|
|
47
|
+
gradientSize: gradientSize,
|
|
48
|
+
blurry: blurry,
|
|
49
|
+
opacity: opacity,
|
|
50
|
+
gradientColors: gradientColors,
|
|
51
|
+
fade: fade,
|
|
52
|
+
fadeDirection: fadeDirection,
|
|
53
|
+
fadeRadial: fadeRadial,
|
|
54
|
+
fadeOverlayDarken: fadeOverlayDarken,
|
|
55
|
+
backgroundImage: backgroundImage,
|
|
56
|
+
sectionClass: sectionClass,
|
|
57
|
+
containerClass: containerClass,
|
|
58
|
+
textWrapperClass: textWrapperClass,
|
|
59
|
+
imageWrapperClass: imageWrapperClass,
|
|
60
|
+
// Enhanced content props
|
|
61
|
+
headingSize: headingSize,
|
|
62
|
+
headingWeight: headingWeight,
|
|
63
|
+
headingColor: headingColor,
|
|
64
|
+
headingClass: headingClass,
|
|
65
|
+
subheadingSize: subheadingSize,
|
|
66
|
+
subheadingWeight: subheadingWeight,
|
|
67
|
+
subheadingColor: subheadingColor,
|
|
68
|
+
subheadingClass: subheadingClass,
|
|
69
|
+
contentSize: contentSize,
|
|
70
|
+
contentWeight: contentWeight,
|
|
71
|
+
contentColor: contentColor,
|
|
72
|
+
contentClass: contentClass,
|
|
73
|
+
imageUrl: imageUrl,
|
|
74
|
+
imageSize: imageSize,
|
|
75
|
+
imageAlt: imageAlt,
|
|
76
|
+
imageClass: imageClass,
|
|
77
|
+
gap: gap,
|
|
78
|
+
ctaClass: ctaClass
|
|
79
|
+
}).props;
|
|
27
80
|
var layoutClass = [
|
|
28
|
-
layout,
|
|
29
|
-
reverse ? 'reverse' : '',
|
|
30
|
-
"text-".concat(textAlign),
|
|
81
|
+
mergedProps.layout,
|
|
82
|
+
mergedProps.reverse ? 'reverse' : '',
|
|
83
|
+
"text-".concat(mergedProps.textAlign),
|
|
31
84
|
]
|
|
32
85
|
.filter(Boolean)
|
|
33
86
|
.join(' ');
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
var
|
|
42
|
-
|
|
87
|
+
// Enhanced Text Content with flexible styling
|
|
88
|
+
var TextContent = (react_1.default.createElement("div", { className: "vista-text ".concat(mergedProps.layout === 'centered' ? "text-center" : "", " ").concat(mergedProps.textWrapperClass) },
|
|
89
|
+
heading && (react_1.default.createElement(Text_1.default, { block: true, size: mergedProps.headingSize, weight: mergedProps.headingWeight, color: mergedProps.headingColor, funcss: mergedProps.headingClass }, heading)),
|
|
90
|
+
subheading && (react_1.default.createElement(Text_1.default, { block: true, size: mergedProps.subheadingSize, weight: mergedProps.subheadingWeight, color: mergedProps.subheadingColor, funcss: "mt-2 ".concat(mergedProps.subheadingClass) }, subheading)),
|
|
91
|
+
content && (react_1.default.createElement(Text_1.default, { block: true, size: mergedProps.contentSize, weight: mergedProps.contentWeight, color: mergedProps.contentColor, funcss: "mt-4 ".concat(mergedProps.contentClass), article: true }, content || children)),
|
|
92
|
+
cta && (react_1.default.createElement("div", { className: "mt-6 ".concat(mergedProps.ctaClass) }, cta))));
|
|
93
|
+
// Enhanced Image Content - uses imageUrl if no image component provided
|
|
94
|
+
var ImageContent = (image || mergedProps.imageUrl) && (react_1.default.createElement("div", { className: "vista-image ".concat(mergedProps.imageWrapperClass) }, image ? (image) : (react_1.default.createElement("img", { src: mergedProps.imageUrl, alt: mergedProps.imageAlt || 'Vista image', className: "".concat(mergedProps.imageClass), style: {
|
|
95
|
+
objectFit: 'cover',
|
|
96
|
+
maxWidth: imageSize,
|
|
97
|
+
borderRadius: 'inherit'
|
|
98
|
+
} }))));
|
|
99
|
+
var isCentered = mergedProps.layout === 'centered';
|
|
100
|
+
var isStacked = mergedProps.layout === 'stacked';
|
|
43
101
|
var positionStyles = {
|
|
44
102
|
'top-left': { top: '-100px', left: '-100px' },
|
|
45
103
|
'top-right': { top: '-100px', right: '-100px' },
|
|
@@ -49,59 +107,61 @@ var Vista = function (_a) {
|
|
|
49
107
|
};
|
|
50
108
|
var primaryColor = (0, getCssVariable_1.getCssVariableValue)('primary');
|
|
51
109
|
var secondaryColor = (0, getCssVariable_1.getCssVariableValue)('secondary');
|
|
52
|
-
var gradientStyle = __assign({ position: 'absolute', width: gradientSize, height: gradientSize, background: gradientColors || "radial-gradient(circle, ".concat(primaryColor, ", ").concat(secondaryColor, ")"), opacity: opacity, filter: "blur(".concat(blurry, "px)"), pointerEvents: 'none', zIndex: 0 }, positionStyles[gradientPosition]);
|
|
110
|
+
var gradientStyle = __assign({ position: 'absolute', width: mergedProps.gradientSize, height: mergedProps.gradientSize, background: mergedProps.gradientColors || "radial-gradient(circle, ".concat(primaryColor, ", ").concat(secondaryColor, ")"), opacity: mergedProps.opacity, filter: "blur(".concat(mergedProps.blurry, "px)"), pointerEvents: 'none', zIndex: 0 }, positionStyles[mergedProps.gradientPosition]);
|
|
53
111
|
return (react_1.default.createElement(ScrollInView_1.default, null,
|
|
54
|
-
react_1.default.createElement("div", { className: "vista \n ".concat(pattern === 'grid' ? 'grid-bg' :
|
|
55
|
-
pattern === 'dots' ? 'bg-pattern-dots' :
|
|
56
|
-
pattern === 'diagonal' ? 'bg-pattern-diagonal' :
|
|
57
|
-
pattern === 'checkerboard' ? 'bg-pattern-checkerboard' :
|
|
58
|
-
pattern === 'horizontal' ? 'bg-pattern-horizontal' :
|
|
59
|
-
pattern === 'vertical' ? 'bg-pattern-vertical' : '', " \n ").concat(bg, " ").concat(padding, " ").concat(layoutClass, " ").concat(sectionClass, " ").concat(funcss), style: {
|
|
112
|
+
react_1.default.createElement("div", { className: "vista \n ".concat(mergedProps.pattern === 'grid' ? 'grid-bg' :
|
|
113
|
+
mergedProps.pattern === 'dots' ? 'bg-pattern-dots' :
|
|
114
|
+
mergedProps.pattern === 'diagonal' ? 'bg-pattern-diagonal' :
|
|
115
|
+
mergedProps.pattern === 'checkerboard' ? 'bg-pattern-checkerboard' :
|
|
116
|
+
mergedProps.pattern === 'horizontal' ? 'bg-pattern-horizontal' :
|
|
117
|
+
mergedProps.pattern === 'vertical' ? 'bg-pattern-vertical' : '', " \n ").concat(mergedProps.bg, " p-").concat(mergedProps.padding, " ").concat(layoutClass, " ").concat(mergedProps.sectionClass, " ").concat(mergedProps.funcss), style: {
|
|
118
|
+
position: 'relative',
|
|
60
119
|
overflow: 'hidden',
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
120
|
+
minHeight: "90vh",
|
|
121
|
+
backgroundImage: mergedProps.pattern === 'grid' ? "linear-gradient(to right, rgba(var(--borderRgb), ".concat(mergedProps.patternOpacity, ") 1px, transparent 1px),\n linear-gradient(to bottom, rgba(var(--borderRgb), ").concat(mergedProps.patternOpacity, ") 1px, transparent 1px)") :
|
|
122
|
+
mergedProps.pattern === 'dots' ? "radial-gradient(rgba(var(--borderRgb), ".concat(mergedProps.patternOpacity, ") 1px, transparent 1px)") :
|
|
123
|
+
mergedProps.pattern === 'diagonal' ? "repeating-linear-gradient(45deg, rgba(var(--borderRgb), ".concat(mergedProps.patternOpacity, "), rgba(var(--borderRgb), ").concat(mergedProps.patternOpacity, ") 1px, transparent 1px, transparent 10px)") :
|
|
124
|
+
mergedProps.pattern === 'checkerboard' ? "linear-gradient(45deg, rgba(var(--borderRgb), ".concat(mergedProps.patternOpacity, ") 25%, transparent 25%), linear-gradient(-45deg, rgba(var(--borderRgb), ").concat(mergedProps.patternOpacity, ") 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(var(--borderRgb), ").concat(mergedProps.patternOpacity, ") 75%), linear-gradient(-45deg, transparent 75%, rgba(var(--borderRgb), ").concat(mergedProps.patternOpacity, ") 75%)") :
|
|
125
|
+
mergedProps.pattern === 'horizontal' ? "linear-gradient(to bottom, rgba(var(--borderRgb), ".concat(mergedProps.patternOpacity, ") 1px, transparent 1px)") :
|
|
126
|
+
mergedProps.pattern === 'vertical' ? "linear-gradient(to right, rgba(var(--borderRgb), ".concat(mergedProps.patternOpacity, ") 1px, transparent 1px)") : ''
|
|
67
127
|
} },
|
|
68
|
-
showGradient && react_1.default.createElement("div", { style: gradientStyle }),
|
|
69
|
-
react_1.default.createElement("div", { className: "vista-container ".concat(containerClass), style: { position: 'relative', zIndex: 1 } }, isCentered || isStacked ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
70
|
-
(imgPosition === 'top') && ImageContent,
|
|
128
|
+
mergedProps.showGradient && react_1.default.createElement("div", { style: gradientStyle }),
|
|
129
|
+
react_1.default.createElement("div", { className: "vista-container ".concat(mergedProps.containerClass), style: { position: 'relative', zIndex: 1, gap: mergedProps.gap || "2rem" } }, isCentered || isStacked ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
130
|
+
(mergedProps.imgPosition === 'top') && ImageContent,
|
|
71
131
|
TextContent,
|
|
72
|
-
(imgPosition === 'bottom') && ImageContent)) : reverse ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
132
|
+
(mergedProps.imgPosition === 'bottom') && ImageContent)) : mergedProps.reverse ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
73
133
|
ImageContent,
|
|
74
134
|
TextContent)) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
75
|
-
(layout === 'imageLeft') && ImageContent,
|
|
135
|
+
(mergedProps.layout === 'imageLeft') && react_1.default.createElement(Col_1.default, null, ImageContent),
|
|
76
136
|
TextContent,
|
|
77
|
-
(layout === 'imageRight') && ImageContent))),
|
|
78
|
-
fade && (react_1.default.createElement("div", { style: {
|
|
137
|
+
(mergedProps.layout === 'imageRight') && react_1.default.createElement(Col_1.default, null, ImageContent)))),
|
|
138
|
+
mergedProps.fade && (react_1.default.createElement("div", { style: {
|
|
79
139
|
position: 'absolute',
|
|
80
140
|
inset: 0,
|
|
81
141
|
width: '100%',
|
|
82
142
|
height: '100%',
|
|
83
|
-
background: fadeRadial
|
|
84
|
-
? "radial-gradient(circle, transparent 0%, ".concat((0, getCssVariable_1.getCssVariableValue)(bg || 'page-bg'), " 100%)")
|
|
85
|
-
: "linear-gradient(to ".concat(fadeDirection || 'bottom', ", ").concat((0, getCssVariable_1.getCssVariableValue)(bg || 'page-bg'), " 0%, transparent 100%)"),
|
|
143
|
+
background: mergedProps.fadeRadial
|
|
144
|
+
? "radial-gradient(circle, transparent 0%, ".concat((0, getCssVariable_1.getCssVariableValue)(mergedProps.bg || 'page-bg'), " 100%)")
|
|
145
|
+
: "linear-gradient(to ".concat(mergedProps.fadeDirection || 'bottom', ", ").concat((0, getCssVariable_1.getCssVariableValue)(mergedProps.bg || 'page-bg'), " 0%, transparent 100%)"),
|
|
86
146
|
zIndex: 0,
|
|
87
147
|
pointerEvents: 'none'
|
|
88
148
|
} })),
|
|
89
|
-
backgroundImage && (react_1.default.createElement("div", { style: {
|
|
149
|
+
mergedProps.backgroundImage && (react_1.default.createElement("div", { style: {
|
|
90
150
|
position: 'absolute',
|
|
91
151
|
inset: 0,
|
|
92
|
-
backgroundImage: "url(".concat(backgroundImage, ")"),
|
|
152
|
+
backgroundImage: "url(".concat(mergedProps.backgroundImage, ")"),
|
|
93
153
|
backgroundSize: 'cover',
|
|
94
154
|
backgroundPosition: 'center',
|
|
95
155
|
zIndex: -1,
|
|
96
156
|
width: '100%',
|
|
97
157
|
height: '100%',
|
|
98
158
|
} })),
|
|
99
|
-
backgroundImage && fadeOverlayDarken !== undefined && (react_1.default.createElement("div", { style: {
|
|
159
|
+
mergedProps.backgroundImage && mergedProps.fadeOverlayDarken !== undefined && (react_1.default.createElement("div", { style: {
|
|
100
160
|
position: 'absolute',
|
|
101
161
|
width: '100%',
|
|
102
162
|
height: '100%',
|
|
103
163
|
inset: 0,
|
|
104
|
-
backgroundColor: "rgba(0, 0, 0, ".concat(fadeOverlayDarken, ")"),
|
|
164
|
+
backgroundColor: "rgba(0, 0, 0, ".concat(mergedProps.fadeOverlayDarken, ")"),
|
|
105
165
|
zIndex: -1,
|
|
106
166
|
} })))));
|
|
107
167
|
};
|
package/utils/componentUtils.js
CHANGED
|
@@ -74,9 +74,9 @@ var mergeComponentConfig = function (config, localProps) {
|
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
return {
|
|
77
|
-
//
|
|
78
|
-
props: __assign(__assign({},
|
|
79
|
-
|
|
77
|
+
// FIXED: Local props should override config (correct order)
|
|
78
|
+
props: __assign(__assign({}, config.componentProps), localProps // Local props second (higher priority)
|
|
79
|
+
),
|
|
80
80
|
variant: config.actualVariant,
|
|
81
81
|
hasConfig: true
|
|
82
82
|
};
|