funuicss 3.7.14 → 3.7.16

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.
@@ -0,0 +1,130 @@
1
+ import React from 'react';
2
+ type FeatureItem = {
3
+ icon?: string | React.ReactNode;
4
+ iconColor?: string;
5
+ iconSize?: number;
6
+ iconClassName?: string;
7
+ title?: React.ReactNode;
8
+ titleSize?: string;
9
+ titleWeight?: number;
10
+ titleColor?: string;
11
+ titleClassName?: string;
12
+ titleVariant?: string;
13
+ description?: React.ReactNode;
14
+ descriptionSize?: string;
15
+ descriptionWeight?: number;
16
+ descriptionColor?: string;
17
+ descriptionClassName?: string;
18
+ descriptionVariant?: string;
19
+ imageUrl?: string;
20
+ imageAlt?: string;
21
+ imageClassName?: string;
22
+ imageStyle?: React.CSSProperties;
23
+ content?: React.ReactNode;
24
+ className?: string;
25
+ style?: React.CSSProperties;
26
+ cardBg?: string;
27
+ cardPadding?: string;
28
+ cardRounded?: string;
29
+ cardShadow?: 'sm' | 'md' | 'lg' | 'xl' | 'none';
30
+ cardBorder?: boolean;
31
+ cardBorderColor?: string;
32
+ cardHoverEffect?: 'lift' | 'glow' | 'scale' | 'none';
33
+ ctaText?: string;
34
+ ctaUrl?: string;
35
+ ctaVariant?: 'primary' | 'secondary' | 'accent' | 'text' | 'outline';
36
+ ctaOnClick?: () => void;
37
+ ctaCss?: string;
38
+ ctaClassName?: string;
39
+ customRender?: () => React.ReactNode;
40
+ };
41
+ type FeatureProps = {
42
+ variant?: string;
43
+ layout?: 'checklist' | 'centered' | 'grid';
44
+ title?: React.ReactNode;
45
+ titleSize?: string;
46
+ titleWeight?: number;
47
+ titleColor?: string;
48
+ titleClassName?: string;
49
+ titleAlign?: 'left' | 'center' | 'right';
50
+ titleVariant?: string;
51
+ subtitle?: React.ReactNode;
52
+ subtitleSize?: string;
53
+ subtitleWeight?: number;
54
+ subtitleColor?: string;
55
+ subtitleClassName?: string;
56
+ subtitleVariant?: string;
57
+ description?: React.ReactNode;
58
+ descriptionSize?: string;
59
+ descriptionWeight?: number;
60
+ descriptionColor?: string;
61
+ descriptionClassName?: string;
62
+ descriptionVariant?: string;
63
+ features?: FeatureItem[] | string;
64
+ columns?: number;
65
+ gap?: string;
66
+ itemGap?: string;
67
+ align?: 'start' | 'center' | 'end' | 'stretch';
68
+ justify?: 'start' | 'center' | 'end' | 'between' | 'around';
69
+ wrap?: boolean;
70
+ bg?: string;
71
+ padding?: string;
72
+ className?: string;
73
+ style?: React.CSSProperties;
74
+ containerClassName?: string;
75
+ containerStyle?: React.CSSProperties;
76
+ cardBg?: string;
77
+ cardPadding?: string;
78
+ cardRounded?: string;
79
+ cardShadow?: 'sm' | 'md' | 'lg' | 'xl' | 'none';
80
+ cardBorder?: boolean;
81
+ cardBorderColor?: string;
82
+ cardHoverEffect?: 'lift' | 'glow' | 'scale' | 'none';
83
+ cardClassName?: string;
84
+ iconColor?: string;
85
+ iconSize?: number;
86
+ iconClassName?: string;
87
+ itemTitleSize?: string;
88
+ itemTitleWeight?: number;
89
+ itemTitleColor?: string;
90
+ itemTitleVariant?: string;
91
+ itemDescriptionSize?: string;
92
+ itemDescriptionWeight?: number;
93
+ itemDescriptionColor?: string;
94
+ itemDescriptionVariant?: string;
95
+ checkmarkIcon?: string;
96
+ checkmarkColor?: string;
97
+ checkmarkSize?: number;
98
+ checkmarkClassName?: string;
99
+ ctaText?: string;
100
+ ctaUrl?: string;
101
+ ctaVariant?: 'primary' | 'secondary' | 'accent' | 'text' | 'outline';
102
+ ctaOnClick?: () => void;
103
+ ctaClassName?: string;
104
+ ctaCss?: string;
105
+ ctaAlign?: 'left' | 'center' | 'right';
106
+ ctaStringPrefix?: string;
107
+ ctaStringSuffix?: string;
108
+ ctaStartIcon?: React.ReactNode;
109
+ ctaEndIcon?: React.ReactNode;
110
+ ctaIconSize?: number;
111
+ ctaIsLoading?: boolean;
112
+ ctaStatus?: 'success' | 'warning' | 'info' | 'error';
113
+ pattern?: 'grid' | 'dots' | 'diagonal' | 'none';
114
+ patternOpacity?: number;
115
+ patternColor?: string;
116
+ patternSize?: string;
117
+ fade?: boolean;
118
+ fadeColor?: string;
119
+ fadeDirection?: 'top' | 'bottom' | 'left' | 'right';
120
+ fadeRadial?: boolean;
121
+ hoverEffect?: 'lift' | 'glow' | 'scale' | 'none';
122
+ children?: React.ReactNode;
123
+ id?: string;
124
+ funcss?: string;
125
+ sectionClass?: string;
126
+ maxWidth?: string;
127
+ responsiveColumns?: string;
128
+ };
129
+ declare const Feature: React.FC<FeatureProps>;
130
+ export default Feature;
@@ -0,0 +1,380 @@
1
+ "use strict";
2
+ 'use client';
3
+ var __assign = (this && this.__assign) || function () {
4
+ __assign = Object.assign || function(t) {
5
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
6
+ s = arguments[i];
7
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
8
+ t[p] = s[p];
9
+ }
10
+ return t;
11
+ };
12
+ return __assign.apply(this, arguments);
13
+ };
14
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
15
+ if (k2 === undefined) k2 = k;
16
+ var desc = Object.getOwnPropertyDescriptor(m, k);
17
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
18
+ desc = { enumerable: true, get: function() { return m[k]; } };
19
+ }
20
+ Object.defineProperty(o, k2, desc);
21
+ }) : (function(o, m, k, k2) {
22
+ if (k2 === undefined) k2 = k;
23
+ o[k2] = m[k];
24
+ }));
25
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
26
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
27
+ }) : function(o, v) {
28
+ o["default"] = v;
29
+ });
30
+ var __importStar = (this && this.__importStar) || (function () {
31
+ var ownKeys = function(o) {
32
+ ownKeys = Object.getOwnPropertyNames || function (o) {
33
+ var ar = [];
34
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
35
+ return ar;
36
+ };
37
+ return ownKeys(o);
38
+ };
39
+ return function (mod) {
40
+ if (mod && mod.__esModule) return mod;
41
+ var result = {};
42
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
43
+ __setModuleDefault(result, mod);
44
+ return result;
45
+ };
46
+ })();
47
+ var __importDefault = (this && this.__importDefault) || function (mod) {
48
+ return (mod && mod.__esModule) ? mod : { "default": mod };
49
+ };
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ var react_1 = __importStar(require("react"));
52
+ var getCssVariable_1 = require("../../utils/getCssVariable");
53
+ var componentUtils_1 = require("../../utils/componentUtils");
54
+ var Text_1 = __importDefault(require("../text/Text"));
55
+ var Button_1 = __importDefault(require("../button/Button"));
56
+ var getDynamicIcon_1 = require("../../utils/getDynamicIcon");
57
+ var useDynamicIcon = function (iconString) {
58
+ var _a = (0, react_1.useState)(null), iconNode = _a[0], setIconNode = _a[1];
59
+ var _b = (0, react_1.useState)(false), hasValidIcon = _b[0], setHasValidIcon = _b[1];
60
+ (0, react_1.useEffect)(function () {
61
+ if (!iconString || typeof iconString !== 'string' || iconString.trim() === '') {
62
+ setIconNode(null);
63
+ setHasValidIcon(false);
64
+ return;
65
+ }
66
+ (0, getDynamicIcon_1.getDynamicIcon)(iconString).then(function (node) {
67
+ if (node) {
68
+ setIconNode(node);
69
+ setHasValidIcon(true);
70
+ }
71
+ else {
72
+ setIconNode(null);
73
+ setHasValidIcon(false);
74
+ }
75
+ });
76
+ }, [iconString]);
77
+ return { iconNode: iconNode, hasValidIcon: hasValidIcon };
78
+ };
79
+ var FeatureIcon = function (_a) {
80
+ var icon = _a.icon, iconColor = _a.iconColor, _b = _a.iconSize, iconSize = _b === void 0 ? 24 : _b, _c = _a.iconClassName, iconClassName = _c === void 0 ? '' : _c, layout = _a.layout, _d = _a.checklistIcon, checklistIcon = _d === void 0 ? 'PiCheck' : _d, _e = _a.checklistColor, checklistColor = _e === void 0 ? 'success' : _e, _f = _a.checklistSize, checklistSize = _f === void 0 ? 20 : _f, _g = _a.checklistClassName, checklistClassName = _g === void 0 ? '' : _g;
81
+ var isStringIcon = icon && typeof icon === 'string';
82
+ var _h = useDynamicIcon(isStringIcon ? icon : undefined), dynamicIconNode = _h.iconNode, hasValidDynamicIcon = _h.hasValidIcon;
83
+ var _j = useDynamicIcon(layout === 'checklist' ? checklistIcon : undefined), checkmarkIconNode = _j.iconNode, hasValidCheckmarkIcon = _j.hasValidIcon;
84
+ var getIconColorStyle = function (color) {
85
+ if (!color)
86
+ return {};
87
+ if (color.startsWith('text-') || color.startsWith('bg-') || color.startsWith('border-')) {
88
+ return {};
89
+ }
90
+ var colorNames = ['primary', 'secondary', 'accent', 'success', 'warning', 'error', 'info', 'dark', 'light'];
91
+ if (colorNames.includes(color)) {
92
+ var cssValue = (0, getCssVariable_1.getCssVariableValue)(color);
93
+ if (cssValue) {
94
+ return { color: cssValue };
95
+ }
96
+ }
97
+ return { color: color };
98
+ };
99
+ var iconColorStyle = getIconColorStyle(iconColor);
100
+ var checklistColorStyle = getIconColorStyle(checklistColor);
101
+ var renderIconWithProps = function (iconElement, className, style, size) {
102
+ if (!react_1.default.isValidElement(iconElement))
103
+ return iconElement;
104
+ var props = {
105
+ className: className,
106
+ style: __assign(__assign({}, style), iconElement.props.style),
107
+ };
108
+ if (size !== undefined) {
109
+ props.size = size;
110
+ }
111
+ return react_1.default.cloneElement(iconElement, props);
112
+ };
113
+ if (icon && typeof icon !== 'string' && react_1.default.isValidElement(icon)) {
114
+ return renderIconWithProps(icon, "feature-section__icon ".concat(iconClassName), iconColorStyle, iconSize);
115
+ }
116
+ if (isStringIcon && hasValidDynamicIcon && dynamicIconNode) {
117
+ return renderIconWithProps(dynamicIconNode, "feature-section__icon ".concat(iconClassName), iconColorStyle, iconSize);
118
+ }
119
+ if (layout === 'checklist' && hasValidCheckmarkIcon && checkmarkIconNode) {
120
+ return renderIconWithProps(checkmarkIconNode, "feature-section__checkmark ".concat(checklistClassName), checklistColorStyle, checklistSize);
121
+ }
122
+ return null;
123
+ };
124
+ var Feature = function (localProps) {
125
+ var mergeWithLocal = (0, componentUtils_1.useComponentConfiguration)('Feature', localProps.variant).mergeWithLocal;
126
+ var mergedProps = mergeWithLocal(localProps).props;
127
+ var final = mergedProps;
128
+ var _a = (0, react_1.useState)([]), featuresArray = _a[0], setFeaturesArray = _a[1];
129
+ var _b = (0, react_1.useState)({}), responsiveColumns = _b[0], setResponsiveColumns = _b[1];
130
+ // Parse features
131
+ (0, react_1.useEffect)(function () {
132
+ if (typeof final.features === 'string') {
133
+ try {
134
+ var parsed = JSON.parse(final.features);
135
+ setFeaturesArray(Array.isArray(parsed) ? parsed : [parsed]);
136
+ }
137
+ catch (error) {
138
+ console.error('Error parsing features JSON:', error);
139
+ setFeaturesArray([]);
140
+ }
141
+ }
142
+ else if (Array.isArray(final.features)) {
143
+ setFeaturesArray(final.features);
144
+ }
145
+ else {
146
+ setFeaturesArray([]);
147
+ }
148
+ }, [final.features]);
149
+ // Parse responsive columns
150
+ (0, react_1.useEffect)(function () {
151
+ if (final.responsiveColumns) {
152
+ try {
153
+ var parsed = JSON.parse(final.responsiveColumns);
154
+ if (parsed && typeof parsed === 'object') {
155
+ setResponsiveColumns(parsed);
156
+ }
157
+ }
158
+ catch (error) {
159
+ console.error('Error parsing responsive columns:', error);
160
+ setResponsiveColumns({});
161
+ }
162
+ }
163
+ }, [final.responsiveColumns]);
164
+ var getSpacingValue = function (value, defaultValue) {
165
+ if (defaultValue === void 0) { defaultValue = '0'; }
166
+ if (!value)
167
+ return defaultValue;
168
+ if (/^\d+$/.test(value)) {
169
+ return "".concat(parseInt(value) * 0.25, "rem");
170
+ }
171
+ return value;
172
+ };
173
+ var getButtonVariantClass = function (variant) {
174
+ if (!variant)
175
+ return '';
176
+ var variantClasses = {
177
+ 'primary': 'btn-primary',
178
+ 'secondary': 'btn-secondary',
179
+ 'accent': 'btn-accent',
180
+ 'text': 'btn-text',
181
+ 'outline': 'btn-outline',
182
+ };
183
+ return variantClasses[variant] || "btn-".concat(variant);
184
+ };
185
+ var renderItemCTA = function (item) {
186
+ if (!item.ctaText)
187
+ return null;
188
+ var ctaVariant = item.ctaVariant || 'text';
189
+ var ctaClassName = item.ctaClassName || '';
190
+ var ctaCss = item.ctaCss || '';
191
+ var buttonClass = getButtonVariantClass(ctaVariant);
192
+ return (react_1.default.createElement("a", { href: item.ctaUrl, onClick: item.ctaOnClick, className: "btn ".concat(buttonClass, " ").concat(ctaClassName, " ").concat(ctaCss, " feature-section__item-cta text-sm"), style: {
193
+ marginTop: '1rem',
194
+ display: 'inline-block',
195
+ textDecoration: 'none',
196
+ } }, item.ctaText));
197
+ };
198
+ var renderFeatureItem = function (item, index) {
199
+ var _a, _b;
200
+ if (item.customRender) {
201
+ return item.customRender();
202
+ }
203
+ var iconColor = item.iconColor || final.iconColor;
204
+ var iconSize = item.iconSize || final.iconSize || 24;
205
+ var iconClassName = item.iconClassName || final.iconClassName || '';
206
+ var checkmarkIcon = final.checkmarkIcon || 'PiCheck';
207
+ var checkmarkColor = final.checkmarkColor || 'success';
208
+ var checkmarkSize = final.checkmarkSize || 20;
209
+ var checkmarkClassName = final.checkmarkClassName || '';
210
+ var cardBg = item.cardBg || final.cardBg;
211
+ var cardPadding = item.cardPadding || final.cardPadding || '1.5rem';
212
+ var cardRounded = item.cardRounded || final.cardRounded || '0.5rem';
213
+ var cardShadow = item.cardShadow || final.cardShadow || 'md';
214
+ var cardBorder = (_b = (_a = item.cardBorder) !== null && _a !== void 0 ? _a : final.cardBorder) !== null && _b !== void 0 ? _b : true;
215
+ var cardBorderColor = item.cardBorderColor || final.cardBorderColor || 'var(--borderRgb)';
216
+ var cardHoverEffect = item.cardHoverEffect || final.cardHoverEffect || 'none';
217
+ var titleSize = item.titleSize || final.itemTitleSize || '1.125rem';
218
+ var titleWeight = item.titleWeight || final.itemTitleWeight || 600;
219
+ var titleColor = item.titleColor || final.itemTitleColor || 'var(--text-color)';
220
+ var titleClassName = item.titleClassName || '';
221
+ var titleVariant = item.titleVariant || final.itemTitleVariant; // Updated
222
+ var descriptionSize = item.descriptionSize || final.itemDescriptionSize || '0.875rem';
223
+ var descriptionWeight = item.descriptionWeight || final.itemDescriptionWeight || 400;
224
+ var descriptionColor = item.descriptionColor || final.itemDescriptionColor || 'var(--text-muted)';
225
+ var descriptionClassName = item.descriptionClassName || '';
226
+ var descriptionVariant = item.descriptionVariant || final.itemDescriptionVariant; // Updated
227
+ var isGridLayout = final.layout === 'grid';
228
+ var featureContent = (react_1.default.createElement("div", { className: "feature-section__item ".concat(item.className || ''), style: item.style },
229
+ (item.icon || item.imageUrl || final.layout === 'checklist') && (react_1.default.createElement("div", { className: "feature-section__icon-container", style: { marginBottom: '1rem' } }, item.imageUrl ? (react_1.default.createElement("img", { src: item.imageUrl, alt: item.imageAlt || '', className: "feature-section__image ".concat(item.imageClassName || final.imageClassName || ''), style: __assign(__assign({ width: "".concat(iconSize, "px"), height: "".concat(iconSize, "px"), objectFit: 'cover', borderRadius: '50%' }, item.imageStyle), final.imageStyle) })) : (react_1.default.createElement("div", { className: "feature-section__icon-wrapper" },
230
+ react_1.default.createElement(FeatureIcon, { icon: item.icon, iconColor: iconColor, iconSize: iconSize, iconClassName: iconClassName, layout: final.layout, checklistIcon: checkmarkIcon, checklistColor: checkmarkColor, checklistSize: checkmarkSize, checklistClassName: checkmarkClassName }))))),
231
+ item.title && (react_1.default.createElement(Text_1.default, { variant: titleVariant, block: true, size: titleSize, weight: titleWeight, color: titleColor, funcss: "feature-section__title ".concat(titleClassName), style: { marginBottom: '0.75rem' } }, item.title)),
232
+ item.description && (react_1.default.createElement(Text_1.default, { variant: descriptionVariant, block: true, size: descriptionSize, weight: descriptionWeight, color: descriptionColor, funcss: "feature-section__description ".concat(descriptionClassName) }, item.description)),
233
+ item.content && (react_1.default.createElement("div", { className: "feature-section__additional-content", style: { marginTop: '1rem' } }, item.content)),
234
+ renderItemCTA(item)));
235
+ // For grid layout with cards
236
+ if (isGridLayout && cardBg) {
237
+ var cardClasses = [
238
+ 'feature-section__card',
239
+ cardHoverEffect !== 'none' ? "feature-section__card--hover-".concat(cardHoverEffect) : '',
240
+ item.className || '',
241
+ ].filter(Boolean).join(' ');
242
+ var cardStyles = __assign({ padding: getSpacingValue(cardPadding, '1.5rem'), borderRadius: cardRounded, backgroundColor: cardBg ? (0, getCssVariable_1.getCssVariableValue)(cardBg) || cardBg : undefined, boxShadow: cardShadow !== 'none' ? (0, getCssVariable_1.getCssVariableValue)("shadow-".concat(cardShadow)) || undefined : undefined, border: cardBorder ? "1px solid ".concat((0, getCssVariable_1.getCssVariableValue)(cardBorderColor) || cardBorderColor) : 'none', height: '100%' }, item.style);
243
+ return (react_1.default.createElement("div", { key: index, className: cardClasses, style: cardStyles }, featureContent));
244
+ }
245
+ return featureContent;
246
+ };
247
+ var getResponsiveGridColumns = function () {
248
+ var defaultColumns = final.columns || 3;
249
+ if (Object.keys(responsiveColumns).length === 0) {
250
+ return "repeat(".concat(defaultColumns, ", 1fr)");
251
+ }
252
+ return {
253
+ base: "repeat(".concat(responsiveColumns.sm || defaultColumns, ", 1fr)"),
254
+ sm: "repeat(".concat(responsiveColumns.sm || defaultColumns, ", 1fr)"),
255
+ md: "repeat(".concat(responsiveColumns.md || responsiveColumns.sm || defaultColumns, ", 1fr)"),
256
+ lg: "repeat(".concat(responsiveColumns.lg || responsiveColumns.md || responsiveColumns.sm || defaultColumns, ", 1fr)"),
257
+ xl: "repeat(".concat(responsiveColumns.xl || responsiveColumns.lg || responsiveColumns.md || responsiveColumns.sm || defaultColumns, ", 1fr)"),
258
+ };
259
+ };
260
+ var getGridStyles = function () {
261
+ var gap = getSpacingValue(final.gap, '2rem');
262
+ var itemGap = getSpacingValue(final.itemGap, '1rem');
263
+ var baseStyle = {
264
+ display: 'grid',
265
+ gap: gap,
266
+ alignItems: final.align || 'stretch',
267
+ justifyContent: final.justify || 'start',
268
+ };
269
+ var columns = getResponsiveGridColumns();
270
+ if (typeof columns === 'string') {
271
+ return __assign(__assign({}, baseStyle), { gridTemplateColumns: columns });
272
+ }
273
+ return baseStyle;
274
+ };
275
+ var getPatternStyle = function () {
276
+ if (!final.pattern || final.pattern === 'none')
277
+ return {};
278
+ var opacity = final.patternOpacity || 0.05;
279
+ var color = final.patternColor || 'borderRgb';
280
+ var size = final.patternSize || '20px';
281
+ var colorValue = (0, getCssVariable_1.getCssVariableValue)(color) || 'rgba(var(--borderRgb), 0.1)';
282
+ var backgroundImage = '';
283
+ var backgroundSize = size;
284
+ switch (final.pattern) {
285
+ case 'grid':
286
+ backgroundImage = "linear-gradient(to right, ".concat(colorValue, " ").concat(opacity, " 1px, transparent 1px),\n linear-gradient(to bottom, ").concat(colorValue, " ").concat(opacity, " 1px, transparent 1px)");
287
+ backgroundSize = "".concat(size, " ").concat(size);
288
+ break;
289
+ case 'dots':
290
+ backgroundImage = "radial-gradient(".concat(colorValue, " ").concat(opacity, " 1px, transparent 1px)");
291
+ backgroundSize = "".concat(size, " ").concat(size);
292
+ break;
293
+ case 'diagonal':
294
+ backgroundImage = "repeating-linear-gradient(45deg, ".concat(colorValue, " ").concat(opacity, ", ").concat(colorValue, " ").concat(opacity, " 1px, transparent 1px, transparent 20px)");
295
+ backgroundSize = "".concat(size, " ").concat(size);
296
+ break;
297
+ }
298
+ return {
299
+ backgroundImage: backgroundImage,
300
+ backgroundSize: backgroundSize,
301
+ };
302
+ };
303
+ var getFadeStyle = function () {
304
+ if (!final.fade)
305
+ return {};
306
+ var color = final.fadeColor || 'page-bg';
307
+ var fadeColor = (0, getCssVariable_1.getCssVariableValue)(color) || color;
308
+ if (final.fadeRadial) {
309
+ return {
310
+ background: "radial-gradient(ellipse at center, transparent 30%, ".concat(fadeColor, " 70%)"),
311
+ };
312
+ }
313
+ var direction = final.fadeDirection || 'bottom';
314
+ var gradients = {
315
+ top: 'to top',
316
+ bottom: 'to bottom',
317
+ left: 'to left',
318
+ right: 'to right',
319
+ };
320
+ return {
321
+ background: "linear-gradient(".concat(gradients[direction], ", transparent 0%, ").concat(fadeColor, " 90%)"),
322
+ };
323
+ };
324
+ var getTextAlign = function (align) {
325
+ return {
326
+ textAlign: align || 'center',
327
+ };
328
+ };
329
+ var renderFeaturesContent = function () {
330
+ if (featuresArray.length === 0)
331
+ return null;
332
+ var gridStyles = getGridStyles();
333
+ var isCentered = final.layout === 'centered';
334
+ var maxWidth = final.maxWidth || (isCentered ? '48rem' : '100%');
335
+ if (isCentered) {
336
+ return (react_1.default.createElement("div", { className: "feature-section__centered-container", style: {
337
+ maxWidth: maxWidth,
338
+ margin: '0 auto',
339
+ } }, featuresArray.map(function (item, index) { return renderFeatureItem(item, index); })));
340
+ }
341
+ return (react_1.default.createElement("div", { className: "feature-section__grid", style: __assign(__assign({}, gridStyles), { maxWidth: final.maxWidth || '100%', margin: '0 auto' }) }, featuresArray.map(function (item, index) { return (react_1.default.createElement("div", { key: index, className: "feature-section__grid-item" }, renderFeatureItem(item, index))); })));
342
+ };
343
+ var getLayoutClasses = function () {
344
+ var classes = ['feature-section'];
345
+ if (final.layout) {
346
+ classes.push("feature-section--".concat(final.layout));
347
+ }
348
+ if (final.className) {
349
+ classes.push(final.className);
350
+ }
351
+ if (final.sectionClass) {
352
+ classes.push(final.sectionClass);
353
+ }
354
+ if (final.funcss) {
355
+ classes.push(final.funcss);
356
+ }
357
+ return classes.filter(Boolean).join(' ');
358
+ };
359
+ var getContainerStyles = function () {
360
+ var padding = getSpacingValue(final.padding, '3rem 0');
361
+ return __assign(__assign({ position: 'relative', padding: padding, backgroundColor: final.bg ? (0, getCssVariable_1.getCssVariableValue)(final.bg) || final.bg : undefined, overflow: 'hidden' }, getPatternStyle()), final.style);
362
+ };
363
+ return (react_1.default.createElement("section", { id: final.id, className: getLayoutClasses(), style: getContainerStyles() },
364
+ final.fade && (react_1.default.createElement("div", { className: "feature-section__fade-overlay", style: __assign(__assign({ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0, width: '100%', height: '100%' }, getFadeStyle()), { zIndex: 0, pointerEvents: 'none' }) })),
365
+ react_1.default.createElement("div", { className: "feature-section__container ".concat(final.containerClassName || ''), style: __assign({ position: 'relative', zIndex: 1, maxWidth: final.maxWidth || '1280px', margin: '0 auto', padding: '0 1rem' }, final.containerStyle) },
366
+ (final.title || final.subtitle || final.description) && (react_1.default.createElement("div", { className: "feature-section__header", style: __assign({ marginBottom: '3rem', maxWidth: final.layout === 'centered' ? '48rem' : '100%', marginLeft: 'auto', marginRight: 'auto' }, getTextAlign(final.titleAlign)) },
367
+ final.subtitle && (react_1.default.createElement(Text_1.default, { variant: final.subtitleVariant, block: true, size: final.subtitleSize || 'sm', weight: final.subtitleWeight || 600, color: final.subtitleColor || 'var(--primary)', funcss: "feature-section__subtitle ".concat(final.subtitleClassName || ''), style: {
368
+ textTransform: 'uppercase',
369
+ letterSpacing: '0.05em',
370
+ marginBottom: '0.5rem',
371
+ }, text: final.subtitle })),
372
+ final.title && (react_1.default.createElement(Text_1.default, { variant: final.titleVariant, block: true, size: final.titleSize || 'xl', weight: final.titleWeight || 700, color: final.titleColor || 'var(--text-color)', funcss: "feature-section__main-title ".concat(final.titleClassName || ''), style: { marginBottom: '1rem' }, text: final.title })),
373
+ final.description && (react_1.default.createElement(Text_1.default, { variant: final.descriptionVariant, block: true, size: final.descriptionSize || 'sm', weight: final.descriptionWeight || 400, color: final.descriptionColor || 'var(--text-muted)', funcss: "feature-section__section-description ".concat(final.descriptionClassName || ''), text: final.description })))),
374
+ react_1.default.createElement("div", { className: "feature-section__content" },
375
+ renderFeaturesContent(),
376
+ final.children),
377
+ final.ctaText && (react_1.default.createElement("div", { className: "feature-section__cta-container", style: __assign({ marginTop: '2.5rem' }, getTextAlign(final.ctaAlign)) },
378
+ react_1.default.createElement(Button_1.default, { variant: final.ctaVariant, onClick: final.ctaOnClick || (function () { return final.ctaUrl && (window.location.href = final.ctaUrl); }), funcss: "feature-section__cta ".concat(final.ctaClassName || '', " ").concat(final.ctaCss || ''), stringPrefix: final.ctaStringPrefix, stringSuffix: final.ctaStringSuffix, startIcon: final.ctaStartIcon, endIcon: final.ctaEndIcon, iconSize: final.ctaIconSize, isLoading: final.ctaIsLoading, status: final.ctaStatus, url: final.ctaUrl }, final.ctaText))))));
379
+ };
380
+ exports.default = Feature;
@@ -0,0 +1,89 @@
1
+ import React from 'react';
2
+ type LinkItem = {
3
+ label: string;
4
+ url: string;
5
+ external?: boolean;
6
+ icon?: string;
7
+ };
8
+ type LinkSection = {
9
+ title: string;
10
+ links: LinkItem[];
11
+ };
12
+ type SocialMedia = {
13
+ facebook?: React.ReactNode | string;
14
+ instagram?: React.ReactNode | string;
15
+ twitter?: React.ReactNode | string;
16
+ x?: React.ReactNode | string;
17
+ youtube?: React.ReactNode | string;
18
+ linkedin?: React.ReactNode | string;
19
+ github?: React.ReactNode | string;
20
+ [key: string]: React.ReactNode | string | undefined;
21
+ };
22
+ type FooterProps = {
23
+ logo?: React.ReactNode;
24
+ logoUrl?: string;
25
+ logoSize?: string;
26
+ logoClass?: string;
27
+ logoLinkUrl?: string;
28
+ companyName?: string;
29
+ description?: React.ReactNode | string;
30
+ descriptionClass?: string;
31
+ descriptionVariant?: string;
32
+ year?: number | string;
33
+ showYear?: boolean;
34
+ showRightsReserved?: boolean;
35
+ copyrightText?: string;
36
+ sections?: LinkSection[] | string;
37
+ privacyUrl?: string;
38
+ termsUrl?: string;
39
+ cookiesUrl?: string;
40
+ privacyText?: string;
41
+ termsText?: string;
42
+ cookiesText?: string;
43
+ facebookUrl?: string;
44
+ instagramUrl?: string;
45
+ twitterUrl?: string;
46
+ xUrl?: string;
47
+ youtubeUrl?: string;
48
+ linkedinUrl?: string;
49
+ githubUrl?: string;
50
+ facebookIcon?: React.ReactNode | string;
51
+ instagramIcon?: React.ReactNode | string;
52
+ twitterIcon?: React.ReactNode | string;
53
+ xIcon?: React.ReactNode | string;
54
+ youtubeIcon?: React.ReactNode | string;
55
+ linkedinIcon?: React.ReactNode | string;
56
+ githubIcon?: React.ReactNode | string;
57
+ socialMedia?: SocialMedia;
58
+ socialIconSize?: number;
59
+ email?: string;
60
+ phone?: string;
61
+ address?: string;
62
+ showContactInfo?: boolean;
63
+ emailIcon?: React.ReactNode | string;
64
+ phoneIcon?: React.ReactNode | string;
65
+ addressIcon?: React.ReactNode | string;
66
+ bg?: string;
67
+ textColor?: string;
68
+ borderColor?: string;
69
+ linkHoverColor?: string;
70
+ layout?: 'default' | 'centered' | 'compact' | 'stacked';
71
+ showDivider?: boolean;
72
+ padding?: string;
73
+ gap?: string;
74
+ maxWidth?: string;
75
+ mobileBreakpoint?: string;
76
+ tabletBreakpoint?: string;
77
+ funcss?: string;
78
+ containerClass?: string;
79
+ topSectionClass?: string;
80
+ bottomSectionClass?: string;
81
+ sectionTitleClass?: string;
82
+ linkClass?: string;
83
+ socialContainerClass?: string;
84
+ legalLinksClass?: string;
85
+ children?: React.ReactNode;
86
+ variant?: string;
87
+ };
88
+ declare const Footer: React.FC<FooterProps>;
89
+ export default Footer;