@app-studio/web 0.9.9 → 0.9.11
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/dist/components/Background/Background/Background.props.d.ts +62 -0
- package/dist/components/Background/Background/Background.style.d.ts +9 -0
- package/dist/components/Background/Background/Background.type.d.ts +17 -1
- package/dist/components/Background/Background/Background.view.d.ts +3 -1
- package/dist/components/Background/Background.d.ts +6 -2
- package/dist/components/Background/index.d.ts +2 -2
- package/dist/web.cjs.development.js +370 -35
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +370 -35
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +370 -35
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -15270,7 +15270,7 @@
|
|
|
15270
15270
|
*/
|
|
15271
15271
|
var LineHeights$1 = {
|
|
15272
15272
|
xs: 32,
|
|
15273
|
-
sm:
|
|
15273
|
+
sm: 48,
|
|
15274
15274
|
md: 56,
|
|
15275
15275
|
lg: 72,
|
|
15276
15276
|
xl: 80
|
|
@@ -16184,13 +16184,7 @@
|
|
|
16184
16184
|
item: item,
|
|
16185
16185
|
views: views
|
|
16186
16186
|
});
|
|
16187
|
-
})
|
|
16188
|
-
style: {
|
|
16189
|
-
fontSize: '10px',
|
|
16190
|
-
opacity: 0.7,
|
|
16191
|
-
padding: '4px'
|
|
16192
|
-
}
|
|
16193
|
-
}, "Placement: ", optimalPosition.placement)));
|
|
16187
|
+
}));
|
|
16194
16188
|
};
|
|
16195
16189
|
// DropdownMenu Item component
|
|
16196
16190
|
var DropdownMenuItem = _ref4 => {
|
|
@@ -19495,13 +19489,7 @@
|
|
|
19495
19489
|
maxWidth: maxWidth,
|
|
19496
19490
|
// Combine intelligent position styles with user styles
|
|
19497
19491
|
style: Object.assign({}, positionStyles, userStyle)
|
|
19498
|
-
}, views == null ? void 0 : views.container, props), children
|
|
19499
|
-
style: {
|
|
19500
|
-
fontSize: '10px',
|
|
19501
|
-
opacity: 0.7,
|
|
19502
|
-
marginTop: '4px'
|
|
19503
|
-
}
|
|
19504
|
-
}, "Placement: ", optimalPosition.placement)));
|
|
19492
|
+
}, views == null ? void 0 : views.container, props), children);
|
|
19505
19493
|
};
|
|
19506
19494
|
|
|
19507
19495
|
var _excluded$X = ["children", "views", "openDelay", "closeDelay"];
|
|
@@ -19900,13 +19888,7 @@
|
|
|
19900
19888
|
boxShadow: "0px 2px 8px rgba(0, 0, 0, 0.15)",
|
|
19901
19889
|
overflow: "hidden",
|
|
19902
19890
|
style: positionStyles
|
|
19903
|
-
}, views == null ? void 0 : views.content), children
|
|
19904
|
-
style: {
|
|
19905
|
-
fontSize: '8px',
|
|
19906
|
-
opacity: 0.7,
|
|
19907
|
-
padding: '4px'
|
|
19908
|
-
}
|
|
19909
|
-
}, "Placement: ", optimalPosition.placement)));
|
|
19891
|
+
}, views == null ? void 0 : views.content), children);
|
|
19910
19892
|
};
|
|
19911
19893
|
// Menubar Item component
|
|
19912
19894
|
var MenubarItem = _ref6 => {
|
|
@@ -23067,13 +23049,7 @@
|
|
|
23067
23049
|
borderRadius: 4,
|
|
23068
23050
|
boxShadow: "0px 2px 8px rgba(0, 0, 0, 0.15)",
|
|
23069
23051
|
style: positionStyles
|
|
23070
|
-
}, TooltipSizes[size], TooltipVariants[variant], views == null ? void 0 : views.content), typeof content === 'string' ? (/*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({}, views == null ? void 0 : views.text), content)) : content, showArrow && /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, arrowStyles, views == null ? void 0 : views.arrow))
|
|
23071
|
-
style: {
|
|
23072
|
-
fontSize: '8px',
|
|
23073
|
-
opacity: 0.7,
|
|
23074
|
-
marginTop: '2px'
|
|
23075
|
-
}
|
|
23076
|
-
}, "Placement: ", optimalPosition.placement)))));
|
|
23052
|
+
}, TooltipSizes[size], TooltipVariants[variant], views == null ? void 0 : views.content), typeof content === 'string' ? (/*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({}, views == null ? void 0 : views.text), content)) : content, showArrow && /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, arrowStyles, views == null ? void 0 : views.arrow)))));
|
|
23077
23053
|
};
|
|
23078
23054
|
|
|
23079
23055
|
var _excluded$18 = ["content", "children", "position", "align", "size", "variant", "openDelay", "closeDelay", "showArrow", "defaultOpen", "isDisabled", "views"];
|
|
@@ -26571,14 +26547,305 @@
|
|
|
26571
26547
|
backgroundPosition: '50% 50%, 50% 50%'
|
|
26572
26548
|
}
|
|
26573
26549
|
};
|
|
26550
|
+
/**
|
|
26551
|
+
* Background Image styles
|
|
26552
|
+
*/
|
|
26553
|
+
var BackgroundImageStyles = {
|
|
26554
|
+
container: {
|
|
26555
|
+
position: 'relative',
|
|
26556
|
+
display: 'flex',
|
|
26557
|
+
flexDirection: 'column',
|
|
26558
|
+
alignItems: 'center',
|
|
26559
|
+
justifyContent: 'center',
|
|
26560
|
+
overflow: 'hidden'
|
|
26561
|
+
},
|
|
26562
|
+
image: {
|
|
26563
|
+
position: 'absolute',
|
|
26564
|
+
top: 0,
|
|
26565
|
+
left: 0,
|
|
26566
|
+
width: '100%',
|
|
26567
|
+
height: '100%',
|
|
26568
|
+
backgroundSize: 'cover',
|
|
26569
|
+
backgroundPosition: 'center',
|
|
26570
|
+
backgroundRepeat: 'no-repeat',
|
|
26571
|
+
backgroundAttachment: 'scroll'
|
|
26572
|
+
},
|
|
26573
|
+
overlay: {
|
|
26574
|
+
position: 'absolute',
|
|
26575
|
+
top: 0,
|
|
26576
|
+
left: 0,
|
|
26577
|
+
width: '100%',
|
|
26578
|
+
height: '100%',
|
|
26579
|
+
pointerEvents: 'none'
|
|
26580
|
+
},
|
|
26581
|
+
content: {
|
|
26582
|
+
position: 'relative',
|
|
26583
|
+
zIndex: 2
|
|
26584
|
+
}
|
|
26585
|
+
};
|
|
26574
26586
|
|
|
26575
|
-
|
|
26587
|
+
/**
|
|
26588
|
+
* Gradient Styles
|
|
26589
|
+
*
|
|
26590
|
+
* Defines the styles for the Gradient component following the design guidelines:
|
|
26591
|
+
* - Typography: Inter/Geist font, specific sizes/weights
|
|
26592
|
+
* - Spacing: 4px grid system
|
|
26593
|
+
* - Colors: Neutral palette with semantic colors
|
|
26594
|
+
* - Rounded corners: Consistent border radius
|
|
26595
|
+
* - Transitions: Subtle animations
|
|
26596
|
+
*/
|
|
26597
|
+
/**
|
|
26598
|
+
* Maps direction strings to CSS gradient directions
|
|
26599
|
+
*/
|
|
26600
|
+
var DirectionMap = {
|
|
26601
|
+
'to-right': 'to right',
|
|
26602
|
+
'to-left': 'to left',
|
|
26603
|
+
'to-bottom': 'to bottom',
|
|
26604
|
+
'to-top': 'to top',
|
|
26605
|
+
'to-top-right': 'to top right',
|
|
26606
|
+
'to-top-left': 'to top left',
|
|
26607
|
+
'to-bottom-right': 'to bottom right',
|
|
26608
|
+
'to-bottom-left': 'to bottom left'
|
|
26609
|
+
};
|
|
26610
|
+
/**
|
|
26611
|
+
* Maps position strings to CSS position values
|
|
26612
|
+
*/
|
|
26613
|
+
var PositionMap = {
|
|
26614
|
+
center: 'center',
|
|
26615
|
+
top: 'top',
|
|
26616
|
+
right: 'right',
|
|
26617
|
+
bottom: 'bottom',
|
|
26618
|
+
left: 'left',
|
|
26619
|
+
'top-right': 'top right',
|
|
26620
|
+
'top-left': 'top left',
|
|
26621
|
+
'bottom-right': 'bottom right',
|
|
26622
|
+
'bottom-left': 'bottom left'
|
|
26623
|
+
};
|
|
26624
|
+
/**
|
|
26625
|
+
* Default color stops for different gradient types
|
|
26626
|
+
*/
|
|
26627
|
+
var DefaultColorStops = {
|
|
26628
|
+
linear: [{
|
|
26629
|
+
color: 'color.blue.500',
|
|
26630
|
+
position: '0%'
|
|
26631
|
+
}, {
|
|
26632
|
+
color: 'color.purple.500',
|
|
26633
|
+
position: '100%'
|
|
26634
|
+
}],
|
|
26635
|
+
radial: [{
|
|
26636
|
+
color: 'color.blue.500',
|
|
26637
|
+
position: '0%'
|
|
26638
|
+
}, {
|
|
26639
|
+
color: 'color.purple.500',
|
|
26640
|
+
position: '100%'
|
|
26641
|
+
}],
|
|
26642
|
+
conic: [{
|
|
26643
|
+
color: 'color.red.500',
|
|
26644
|
+
position: '0deg'
|
|
26645
|
+
}, {
|
|
26646
|
+
color: 'color.yellow.500',
|
|
26647
|
+
position: '90deg'
|
|
26648
|
+
}, {
|
|
26649
|
+
color: 'color.green.500',
|
|
26650
|
+
position: '180deg'
|
|
26651
|
+
}, {
|
|
26652
|
+
color: 'color.blue.500',
|
|
26653
|
+
position: '270deg'
|
|
26654
|
+
}, {
|
|
26655
|
+
color: 'color.red.500',
|
|
26656
|
+
position: '360deg'
|
|
26657
|
+
}]
|
|
26658
|
+
};
|
|
26659
|
+
/**
|
|
26660
|
+
* Generates a CSS gradient string based on the provided parameters
|
|
26661
|
+
*/
|
|
26662
|
+
var generateGradientString = (type, colors, direction, shape, position) => {
|
|
26663
|
+
// Format color stops
|
|
26664
|
+
var colorStopsString = colors.map(stop => stop.color + " " + (stop.position || '')).join(', ');
|
|
26665
|
+
// Generate the appropriate gradient string based on type
|
|
26666
|
+
switch (type) {
|
|
26667
|
+
case 'linear':
|
|
26668
|
+
var dir = direction && DirectionMap[direction] ? DirectionMap[direction] : direction || 'to right';
|
|
26669
|
+
return "linear-gradient(" + dir + ", " + colorStopsString + ")";
|
|
26670
|
+
case 'radial':
|
|
26671
|
+
var pos = position && PositionMap[position] ? PositionMap[position] : position || 'center';
|
|
26672
|
+
var shapeValue = shape || 'circle';
|
|
26673
|
+
return "radial-gradient(" + shapeValue + " at " + pos + ", " + colorStopsString + ")";
|
|
26674
|
+
case 'conic':
|
|
26675
|
+
var conicPos = position && PositionMap[position] ? PositionMap[position] : position || 'center';
|
|
26676
|
+
return "conic-gradient(from 0deg at " + conicPos + ", " + colorStopsString + ")";
|
|
26677
|
+
default:
|
|
26678
|
+
return "linear-gradient(to right, " + colorStopsString + ")";
|
|
26679
|
+
}
|
|
26680
|
+
};
|
|
26681
|
+
/**
|
|
26682
|
+
* Animation styles for animated gradients using app-studio's animation system
|
|
26683
|
+
*/
|
|
26684
|
+
var GradientAnimations = {
|
|
26685
|
+
linear: {
|
|
26686
|
+
backgroundSize: '200% 200%',
|
|
26687
|
+
transition: 'background-position 3s ease-in-out',
|
|
26688
|
+
animate: {
|
|
26689
|
+
from: {
|
|
26690
|
+
backgroundPosition: '0% 50%'
|
|
26691
|
+
},
|
|
26692
|
+
'50%': {
|
|
26693
|
+
backgroundPosition: '100% 50%'
|
|
26694
|
+
},
|
|
26695
|
+
to: {
|
|
26696
|
+
backgroundPosition: '0% 50%'
|
|
26697
|
+
}
|
|
26698
|
+
}
|
|
26699
|
+
},
|
|
26700
|
+
radial: {
|
|
26701
|
+
backgroundSize: '100% 100%',
|
|
26702
|
+
transition: 'all 3s ease-in-out',
|
|
26703
|
+
animate: {
|
|
26704
|
+
from: {
|
|
26705
|
+
backgroundPosition: 'center',
|
|
26706
|
+
backgroundSize: '100% 100%'
|
|
26707
|
+
},
|
|
26708
|
+
'50%': {
|
|
26709
|
+
backgroundSize: '120% 120%'
|
|
26710
|
+
},
|
|
26711
|
+
to: {
|
|
26712
|
+
backgroundPosition: 'center',
|
|
26713
|
+
backgroundSize: '100% 100%'
|
|
26714
|
+
}
|
|
26715
|
+
}
|
|
26716
|
+
},
|
|
26717
|
+
conic: {
|
|
26718
|
+
transition: 'transform 3s linear',
|
|
26719
|
+
animate: {
|
|
26720
|
+
from: {
|
|
26721
|
+
transform: 'rotate(0deg)'
|
|
26722
|
+
},
|
|
26723
|
+
to: {
|
|
26724
|
+
transform: 'rotate(360deg)'
|
|
26725
|
+
}
|
|
26726
|
+
}
|
|
26727
|
+
}
|
|
26728
|
+
};
|
|
26729
|
+
/**
|
|
26730
|
+
* Default styles for the Gradient component
|
|
26731
|
+
*/
|
|
26732
|
+
var DefaultGradientStyles = {
|
|
26733
|
+
container: {
|
|
26734
|
+
position: 'relative',
|
|
26735
|
+
overflow: 'hidden',
|
|
26736
|
+
borderRadius: '8px',
|
|
26737
|
+
transition: 'all 0.2s ease'
|
|
26738
|
+
},
|
|
26739
|
+
content: {
|
|
26740
|
+
position: 'relative',
|
|
26741
|
+
zIndex: 1,
|
|
26742
|
+
width: '100%',
|
|
26743
|
+
height: '100%',
|
|
26744
|
+
padding: '16px'
|
|
26745
|
+
}
|
|
26746
|
+
};
|
|
26747
|
+
|
|
26748
|
+
var _excluded$1e = ["type", "direction", "shape", "position", "from", "to", "colors", "animate", "animationDuration", "children", "views", "themeMode"];
|
|
26749
|
+
var GradientView = _ref => {
|
|
26750
|
+
var {
|
|
26751
|
+
type = 'linear',
|
|
26752
|
+
direction = 'to-right',
|
|
26753
|
+
shape = 'circle',
|
|
26754
|
+
position = 'center',
|
|
26755
|
+
from,
|
|
26756
|
+
to,
|
|
26757
|
+
colors,
|
|
26758
|
+
animate = false,
|
|
26759
|
+
animationDuration = 3,
|
|
26760
|
+
children,
|
|
26761
|
+
views,
|
|
26762
|
+
themeMode: elementMode
|
|
26763
|
+
} = _ref,
|
|
26764
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$1e);
|
|
26765
|
+
var {
|
|
26766
|
+
getColor,
|
|
26767
|
+
themeMode
|
|
26768
|
+
} = appStudio.useTheme();
|
|
26769
|
+
// Determine color stops to use
|
|
26770
|
+
var colorStops = React.useMemo(() => {
|
|
26771
|
+
// If colors array is provided, use it
|
|
26772
|
+
if (colors && colors.length > 0) {
|
|
26773
|
+
return colors;
|
|
26774
|
+
}
|
|
26775
|
+
// If from and to are provided, create a two-color gradient
|
|
26776
|
+
if (from && to) {
|
|
26777
|
+
return [{
|
|
26778
|
+
color: from,
|
|
26779
|
+
position: '0%'
|
|
26780
|
+
}, {
|
|
26781
|
+
color: to,
|
|
26782
|
+
position: '100%'
|
|
26783
|
+
}];
|
|
26784
|
+
}
|
|
26785
|
+
// Otherwise use default colors for the selected gradient type
|
|
26786
|
+
return DefaultColorStops[type];
|
|
26787
|
+
}, [colors, from, to, type]);
|
|
26788
|
+
// Generate the gradient string
|
|
26789
|
+
var gradientString = React.useMemo(() => {
|
|
26790
|
+
// Process color stops to resolve theme colors
|
|
26791
|
+
var processedColorStops = colorStops.map(stop => Object.assign({}, stop, {
|
|
26792
|
+
color: getColor(stop.color, elementMode ? {
|
|
26793
|
+
themeMode: elementMode
|
|
26794
|
+
} : undefined)
|
|
26795
|
+
}));
|
|
26796
|
+
return generateGradientString(type, processedColorStops, direction, shape, position);
|
|
26797
|
+
}, [type, colorStops, direction, shape, position, getColor, themeMode, elementMode]);
|
|
26798
|
+
// Prepare animation styles if animation is enabled
|
|
26799
|
+
var animationStyles = React.useMemo(() => {
|
|
26800
|
+
if (!animate) return {};
|
|
26801
|
+
var baseAnimation = GradientAnimations[type];
|
|
26802
|
+
return Object.assign({}, baseAnimation, {
|
|
26803
|
+
transition: baseAnimation.transition.replace('3s', animationDuration + "s"),
|
|
26804
|
+
// Apply animation properties
|
|
26805
|
+
animationDuration: animationDuration + "s",
|
|
26806
|
+
animationIterationCount: 'infinite',
|
|
26807
|
+
animationTimingFunction: type === 'conic' ? 'linear' : 'ease-in-out'
|
|
26808
|
+
});
|
|
26809
|
+
}, [animate, animationDuration, type]);
|
|
26810
|
+
return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
26811
|
+
background: gradientString
|
|
26812
|
+
}, DefaultGradientStyles.container, animationStyles, views == null ? void 0 : views.container, props), children && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, DefaultGradientStyles.content, views == null ? void 0 : views.content), children)));
|
|
26813
|
+
};
|
|
26814
|
+
|
|
26815
|
+
/**
|
|
26816
|
+
* Gradient Component
|
|
26817
|
+
*
|
|
26818
|
+
* @example
|
|
26819
|
+
* // Basic linear gradient
|
|
26820
|
+
* <Gradient from="blue.500" to="purple.500" height="200px" width="100%" />
|
|
26821
|
+
*
|
|
26822
|
+
* @example
|
|
26823
|
+
* // Radial gradient with content
|
|
26824
|
+
* <Gradient
|
|
26825
|
+
* type="radial"
|
|
26826
|
+
* colors={[
|
|
26827
|
+
* { color: 'red.500', position: '0%' },
|
|
26828
|
+
* { color: 'orange.500', position: '50%' },
|
|
26829
|
+
* { color: 'yellow.500', position: '100%' }
|
|
26830
|
+
* ]}
|
|
26831
|
+
* height="200px"
|
|
26832
|
+
* >
|
|
26833
|
+
* <Text color="white">Content inside gradient</Text>
|
|
26834
|
+
* </Gradient>
|
|
26835
|
+
*/
|
|
26836
|
+
var Gradient = props => {
|
|
26837
|
+
return /*#__PURE__*/React__default.createElement(GradientView, Object.assign({}, props));
|
|
26838
|
+
};
|
|
26839
|
+
|
|
26840
|
+
var _excluded$1f = ["children", "showRadialGradient", "views", "themeMode"],
|
|
26576
26841
|
_excluded2$l = ["number"],
|
|
26577
26842
|
_excluded3$g = ["rows", "cols", "squareSize"],
|
|
26578
26843
|
_excluded4$d = ["count", "colors", "speed", "shapes"],
|
|
26579
26844
|
_excluded5$6 = ["gridSize", "lineColor", "pulseColor", "animationSpeed"],
|
|
26580
26845
|
_excluded6$4 = ["rippleCount", "colors", "maxSize", "frequency"],
|
|
26581
|
-
_excluded7$1 = ["children", "views"]
|
|
26846
|
+
_excluded7$1 = ["children", "src", "backgroundSize", "backgroundPosition", "backgroundRepeat", "backgroundAttachment", "imageOpacity", "overlay", "blendMode", "views", "themeMode"],
|
|
26847
|
+
_excluded8$1 = ["children"],
|
|
26848
|
+
_excluded9$1 = ["children", "views"];
|
|
26582
26849
|
// Background Context
|
|
26583
26850
|
var BackgroundContext = /*#__PURE__*/React.createContext({});
|
|
26584
26851
|
/**
|
|
@@ -26590,7 +26857,7 @@
|
|
|
26590
26857
|
showRadialGradient = true,
|
|
26591
26858
|
views
|
|
26592
26859
|
} = _ref,
|
|
26593
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
26860
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$1f);
|
|
26594
26861
|
var gradientColors = {
|
|
26595
26862
|
white: 'rgba(255,255,255,1)',
|
|
26596
26863
|
transparent: 'rgba(255,255,255,0)'
|
|
@@ -26951,12 +27218,64 @@
|
|
|
26951
27218
|
}
|
|
26952
27219
|
}))));
|
|
26953
27220
|
};
|
|
26954
|
-
|
|
27221
|
+
/**
|
|
27222
|
+
* Background Image Component
|
|
27223
|
+
*/
|
|
27224
|
+
var BackgroundImage = _ref7 => {
|
|
26955
27225
|
var {
|
|
26956
27226
|
children,
|
|
26957
|
-
|
|
27227
|
+
src,
|
|
27228
|
+
backgroundSize = 'cover',
|
|
27229
|
+
backgroundPosition = 'center',
|
|
27230
|
+
backgroundRepeat = 'no-repeat',
|
|
27231
|
+
backgroundAttachment = 'scroll',
|
|
27232
|
+
imageOpacity = 1,
|
|
27233
|
+
overlay,
|
|
27234
|
+
blendMode = 'normal',
|
|
27235
|
+
views,
|
|
27236
|
+
themeMode: elementMode
|
|
26958
27237
|
} = _ref7,
|
|
26959
27238
|
props = _objectWithoutPropertiesLoose(_ref7, _excluded7$1);
|
|
27239
|
+
var {
|
|
27240
|
+
getColor
|
|
27241
|
+
} = appStudio.useTheme();
|
|
27242
|
+
var imageStyle = Object.assign({}, BackgroundImageStyles.image, {
|
|
27243
|
+
backgroundImage: "url(" + src + ")",
|
|
27244
|
+
backgroundSize,
|
|
27245
|
+
backgroundPosition,
|
|
27246
|
+
backgroundRepeat,
|
|
27247
|
+
backgroundAttachment,
|
|
27248
|
+
opacity: imageOpacity
|
|
27249
|
+
});
|
|
27250
|
+
var overlayStyle = overlay ? Object.assign({}, BackgroundImageStyles.overlay, {
|
|
27251
|
+
backgroundColor: getColor(overlay, elementMode ? {
|
|
27252
|
+
themeMode: elementMode
|
|
27253
|
+
} : undefined),
|
|
27254
|
+
mixBlendMode: blendMode
|
|
27255
|
+
}) : {};
|
|
27256
|
+
return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, BackgroundImageStyles.container, views == null ? void 0 : views.container, props), /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
27257
|
+
style: imageStyle
|
|
27258
|
+
}, views == null ? void 0 : views.image)), overlay && /*#__PURE__*/React__default.createElement(appStudio.View, {
|
|
27259
|
+
style: overlayStyle
|
|
27260
|
+
}), children && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, BackgroundImageStyles.content, views == null ? void 0 : views.content), children)));
|
|
27261
|
+
};
|
|
27262
|
+
/**
|
|
27263
|
+
* Background Gradient Component
|
|
27264
|
+
* Uses the existing Gradient component as a background
|
|
27265
|
+
*/
|
|
27266
|
+
var BackgroundGradient = _ref8 => {
|
|
27267
|
+
var {
|
|
27268
|
+
children
|
|
27269
|
+
} = _ref8,
|
|
27270
|
+
gradientProps = _objectWithoutPropertiesLoose(_ref8, _excluded8$1);
|
|
27271
|
+
return /*#__PURE__*/React__default.createElement(Gradient, Object.assign({}, gradientProps), children);
|
|
27272
|
+
};
|
|
27273
|
+
var BackgroundViewBase = _ref9 => {
|
|
27274
|
+
var {
|
|
27275
|
+
children,
|
|
27276
|
+
views
|
|
27277
|
+
} = _ref9,
|
|
27278
|
+
props = _objectWithoutPropertiesLoose(_ref9, _excluded9$1);
|
|
26960
27279
|
return /*#__PURE__*/React__default.createElement(BackgroundContext.Provider, {
|
|
26961
27280
|
value: {}
|
|
26962
27281
|
}, /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, DefaultBackgroundStyles.container, views == null ? void 0 : views.container, props), children));
|
|
@@ -26970,6 +27289,8 @@
|
|
|
26970
27289
|
BackgroundView.Particles = Particles;
|
|
26971
27290
|
BackgroundView.Grid = Grid;
|
|
26972
27291
|
BackgroundView.Ripples = Ripples;
|
|
27292
|
+
BackgroundView.Image = BackgroundImage;
|
|
27293
|
+
BackgroundView.Gradient = BackgroundGradient;
|
|
26973
27294
|
|
|
26974
27295
|
/**
|
|
26975
27296
|
* Background Component with compound pattern
|
|
@@ -26999,6 +27320,18 @@
|
|
|
26999
27320
|
* @example
|
|
27000
27321
|
* // Ripples effect
|
|
27001
27322
|
* <Background.Ripples rippleCount={5} maxSize={200} frequency={3} />
|
|
27323
|
+
*
|
|
27324
|
+
* @example
|
|
27325
|
+
* // Background Image
|
|
27326
|
+
* <Background.Image src="/path/to/image.jpg" size="cover" overlay="rgba(0,0,0,0.5)">
|
|
27327
|
+
* <Text color="white">Content over image</Text>
|
|
27328
|
+
* </Background.Image>
|
|
27329
|
+
*
|
|
27330
|
+
* @example
|
|
27331
|
+
* // Background Gradient
|
|
27332
|
+
* <Background.Gradient from="blue.500" to="purple.500" animate={true}>
|
|
27333
|
+
* <Text color="white">Content over gradient</Text>
|
|
27334
|
+
* </Background.Gradient>
|
|
27002
27335
|
*/
|
|
27003
27336
|
var BackgroundComponent = /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(BackgroundView, Object.assign({}, props, {
|
|
27004
27337
|
ref: ref
|
|
@@ -27010,7 +27343,9 @@
|
|
|
27010
27343
|
Wall: BackgroundView.Wall,
|
|
27011
27344
|
Particles: BackgroundView.Particles,
|
|
27012
27345
|
Grid: BackgroundView.Grid,
|
|
27013
|
-
Ripples: BackgroundView.Ripples
|
|
27346
|
+
Ripples: BackgroundView.Ripples,
|
|
27347
|
+
Image: BackgroundView.Image,
|
|
27348
|
+
Gradient: BackgroundView.Gradient
|
|
27014
27349
|
});
|
|
27015
27350
|
Background.displayName = 'Background';
|
|
27016
27351
|
|