@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
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ViewProps } from 'app-studio';
|
|
3
|
+
import { GradientProps } from '../../Gradient/Gradient/Gradient.props';
|
|
4
|
+
import { BackgroundSize, BackgroundPosition, BackgroundRepeat, BlendMode } from './Background.type';
|
|
3
5
|
/**
|
|
4
6
|
* Base Background component props
|
|
5
7
|
*/
|
|
@@ -58,6 +60,64 @@ export interface RipplesProps extends Omit<ViewProps, 'colors'> {
|
|
|
58
60
|
maxSize?: number;
|
|
59
61
|
frequency?: number;
|
|
60
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Background Image component props
|
|
65
|
+
*/
|
|
66
|
+
export interface BackgroundImageProps extends Omit<BackgroundProps, 'position'> {
|
|
67
|
+
/**
|
|
68
|
+
* Image source URL
|
|
69
|
+
*/
|
|
70
|
+
src: string;
|
|
71
|
+
/**
|
|
72
|
+
* Background size
|
|
73
|
+
* @default 'cover'
|
|
74
|
+
*/
|
|
75
|
+
backgroundSize?: BackgroundSize;
|
|
76
|
+
/**
|
|
77
|
+
* Background position
|
|
78
|
+
* @default 'center'
|
|
79
|
+
*/
|
|
80
|
+
backgroundPosition?: BackgroundPosition;
|
|
81
|
+
/**
|
|
82
|
+
* Background repeat
|
|
83
|
+
* @default 'no-repeat'
|
|
84
|
+
*/
|
|
85
|
+
backgroundRepeat?: BackgroundRepeat;
|
|
86
|
+
/**
|
|
87
|
+
* Background attachment
|
|
88
|
+
* @default 'scroll'
|
|
89
|
+
*/
|
|
90
|
+
backgroundAttachment?: 'scroll' | 'fixed' | 'local';
|
|
91
|
+
/**
|
|
92
|
+
* Image opacity
|
|
93
|
+
* @default 1
|
|
94
|
+
*/
|
|
95
|
+
imageOpacity?: number;
|
|
96
|
+
/**
|
|
97
|
+
* Overlay color to blend with image
|
|
98
|
+
*/
|
|
99
|
+
overlay?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Blend mode for overlay
|
|
102
|
+
* @default 'normal'
|
|
103
|
+
*/
|
|
104
|
+
blendMode?: BlendMode;
|
|
105
|
+
/**
|
|
106
|
+
* Custom views for styling
|
|
107
|
+
*/
|
|
108
|
+
views?: {
|
|
109
|
+
container?: ViewProps;
|
|
110
|
+
content?: ViewProps;
|
|
111
|
+
image?: ViewProps;
|
|
112
|
+
overlay?: ViewProps;
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Background Gradient component props
|
|
117
|
+
* Extends GradientProps and adds Background-specific functionality
|
|
118
|
+
*/
|
|
119
|
+
export interface BackgroundGradientProps extends GradientProps {
|
|
120
|
+
}
|
|
61
121
|
/**
|
|
62
122
|
* Background styles for customization
|
|
63
123
|
*/
|
|
@@ -66,4 +126,6 @@ export interface BackgroundStyles {
|
|
|
66
126
|
content?: ViewProps;
|
|
67
127
|
aurora?: ViewProps;
|
|
68
128
|
meteors?: ViewProps;
|
|
129
|
+
image?: ViewProps;
|
|
130
|
+
gradient?: ViewProps;
|
|
69
131
|
}
|
|
@@ -13,6 +13,15 @@ export declare const AuroraStyles: {
|
|
|
13
13
|
container: ViewProps;
|
|
14
14
|
gradient: ViewProps;
|
|
15
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* Background Image styles
|
|
18
|
+
*/
|
|
19
|
+
export declare const BackgroundImageStyles: {
|
|
20
|
+
container: ViewProps;
|
|
21
|
+
image: ViewProps;
|
|
22
|
+
overlay: ViewProps;
|
|
23
|
+
content: ViewProps;
|
|
24
|
+
};
|
|
16
25
|
/**
|
|
17
26
|
* Meteors effect styles
|
|
18
27
|
*/
|
|
@@ -2,7 +2,7 @@ import { ViewProps } from 'app-studio';
|
|
|
2
2
|
/**
|
|
3
3
|
* Background effect types
|
|
4
4
|
*/
|
|
5
|
-
export declare type BackgroundEffect = 'aurora' | 'meteors' | 'borderMoving' | 'animatedStroke';
|
|
5
|
+
export declare type BackgroundEffect = 'aurora' | 'meteors' | 'particles' | 'grid' | 'ripples' | 'wall' | 'image' | 'gradient' | 'borderMoving' | 'animatedStroke';
|
|
6
6
|
/**
|
|
7
7
|
* Aurora gradient direction options
|
|
8
8
|
*/
|
|
@@ -32,6 +32,22 @@ export declare type StrokeAnimationStyles = {
|
|
|
32
32
|
rect?: ViewProps;
|
|
33
33
|
text?: ViewProps;
|
|
34
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* Background image sizing options
|
|
37
|
+
*/
|
|
38
|
+
export declare type BackgroundSize = 'auto' | 'cover' | 'contain' | string;
|
|
39
|
+
/**
|
|
40
|
+
* Background image positioning options
|
|
41
|
+
*/
|
|
42
|
+
export declare type BackgroundPosition = 'center' | 'top' | 'right' | 'bottom' | 'left' | 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | string;
|
|
43
|
+
/**
|
|
44
|
+
* Background image repeat options
|
|
45
|
+
*/
|
|
46
|
+
export declare type BackgroundRepeat = 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat' | 'space' | 'round';
|
|
47
|
+
/**
|
|
48
|
+
* CSS blend mode options for overlays
|
|
49
|
+
*/
|
|
50
|
+
export declare type BlendMode = 'normal' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'color-dodge' | 'color-burn' | 'hard-light' | 'soft-light' | 'difference' | 'exclusion';
|
|
35
51
|
/**
|
|
36
52
|
* Background context type for compound components
|
|
37
53
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BackgroundProps, AuroraBackgroundProps, MeteorsProps, WallProps, ParticlesProps, GridProps, RipplesProps } from './Background.props';
|
|
2
|
+
import { BackgroundProps, AuroraBackgroundProps, MeteorsProps, WallProps, ParticlesProps, GridProps, RipplesProps, BackgroundImageProps, BackgroundGradientProps } from './Background.props';
|
|
3
3
|
/**
|
|
4
4
|
* Main Background View Component with compound pattern
|
|
5
5
|
*/
|
|
@@ -10,6 +10,8 @@ interface BackgroundViewComponent extends React.FC<BackgroundProps> {
|
|
|
10
10
|
Particles: React.FC<ParticlesProps>;
|
|
11
11
|
Grid: React.FC<GridProps>;
|
|
12
12
|
Ripples: React.FC<RipplesProps>;
|
|
13
|
+
Image: React.FC<BackgroundImageProps>;
|
|
14
|
+
Gradient: React.FC<BackgroundGradientProps>;
|
|
13
15
|
}
|
|
14
16
|
export declare const BackgroundView: BackgroundViewComponent;
|
|
15
17
|
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Background Component
|
|
3
3
|
*
|
|
4
|
-
* A collection of
|
|
5
|
-
*
|
|
4
|
+
* A comprehensive collection of background effects including animated backgrounds
|
|
5
|
+
* (Aurora, Meteors, Particles, Grid, Ripples, Wall), background images with overlays,
|
|
6
|
+
* and gradient backgrounds. All components follow the design system guidelines and
|
|
7
|
+
* integrate seamlessly with the app-studio theme system.
|
|
6
8
|
*/
|
|
7
9
|
import React from 'react';
|
|
8
10
|
import { BackgroundProps } from './Background/Background.props';
|
|
@@ -13,4 +15,6 @@ export declare const Background: React.ForwardRefExoticComponent<Pick<Background
|
|
|
13
15
|
Particles: React.FC<import("./Background/Background.props").ParticlesProps>;
|
|
14
16
|
Grid: React.FC<import("./Background/Background.props").GridProps>;
|
|
15
17
|
Ripples: React.FC<import("./Background/Background.props").RipplesProps>;
|
|
18
|
+
Image: React.FC<import("./Background/Background.props").BackgroundImageProps>;
|
|
19
|
+
Gradient: React.FC<import("./Background/Background.props").BackgroundGradientProps>;
|
|
16
20
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Background } from './Background';
|
|
2
|
-
export type { BackgroundProps, AuroraBackgroundProps, MeteorsProps, WallProps, ParticlesProps, GridProps, RipplesProps, BackgroundStyles, } from './Background/Background.props';
|
|
3
|
-
export type { BackgroundEffect, AuroraDirection, MeteorTiming, BorderAnimationStyles, StrokeAnimationStyles, BackgroundContextType, } from './Background/Background.type';
|
|
2
|
+
export type { BackgroundProps, AuroraBackgroundProps, MeteorsProps, WallProps, ParticlesProps, GridProps, RipplesProps, BackgroundImageProps, BackgroundGradientProps, BackgroundStyles, } from './Background/Background.props';
|
|
3
|
+
export type { BackgroundEffect, AuroraDirection, MeteorTiming, BorderAnimationStyles, StrokeAnimationStyles, BackgroundContextType, BackgroundSize, BackgroundPosition, BackgroundRepeat, BlendMode, } from './Background/Background.type';
|
|
@@ -15301,7 +15301,7 @@ var TitleSizes = {
|
|
|
15301
15301
|
*/
|
|
15302
15302
|
var LineHeights$1 = {
|
|
15303
15303
|
xs: 32,
|
|
15304
|
-
sm:
|
|
15304
|
+
sm: 48,
|
|
15305
15305
|
md: 56,
|
|
15306
15306
|
lg: 72,
|
|
15307
15307
|
xl: 80
|
|
@@ -16215,13 +16215,7 @@ var DropdownMenuContent = _ref3 => {
|
|
|
16215
16215
|
item: item,
|
|
16216
16216
|
views: views
|
|
16217
16217
|
});
|
|
16218
|
-
})
|
|
16219
|
-
style: {
|
|
16220
|
-
fontSize: '10px',
|
|
16221
|
-
opacity: 0.7,
|
|
16222
|
-
padding: '4px'
|
|
16223
|
-
}
|
|
16224
|
-
}, "Placement: ", optimalPosition.placement)));
|
|
16218
|
+
}));
|
|
16225
16219
|
};
|
|
16226
16220
|
// DropdownMenu Item component
|
|
16227
16221
|
var DropdownMenuItem = _ref4 => {
|
|
@@ -19526,13 +19520,7 @@ var HoverCardContent = _ref3 => {
|
|
|
19526
19520
|
maxWidth: maxWidth,
|
|
19527
19521
|
// Combine intelligent position styles with user styles
|
|
19528
19522
|
style: Object.assign({}, positionStyles, userStyle)
|
|
19529
|
-
}, views == null ? void 0 : views.container, props), children
|
|
19530
|
-
style: {
|
|
19531
|
-
fontSize: '10px',
|
|
19532
|
-
opacity: 0.7,
|
|
19533
|
-
marginTop: '4px'
|
|
19534
|
-
}
|
|
19535
|
-
}, "Placement: ", optimalPosition.placement)));
|
|
19523
|
+
}, views == null ? void 0 : views.container, props), children);
|
|
19536
19524
|
};
|
|
19537
19525
|
|
|
19538
19526
|
var _excluded$X = ["children", "views", "openDelay", "closeDelay"];
|
|
@@ -19931,13 +19919,7 @@ var MenubarContent = _ref5 => {
|
|
|
19931
19919
|
boxShadow: "0px 2px 8px rgba(0, 0, 0, 0.15)",
|
|
19932
19920
|
overflow: "hidden",
|
|
19933
19921
|
style: positionStyles
|
|
19934
|
-
}, views == null ? void 0 : views.content), children
|
|
19935
|
-
style: {
|
|
19936
|
-
fontSize: '8px',
|
|
19937
|
-
opacity: 0.7,
|
|
19938
|
-
padding: '4px'
|
|
19939
|
-
}
|
|
19940
|
-
}, "Placement: ", optimalPosition.placement)));
|
|
19922
|
+
}, views == null ? void 0 : views.content), children);
|
|
19941
19923
|
};
|
|
19942
19924
|
// Menubar Item component
|
|
19943
19925
|
var MenubarItem = _ref6 => {
|
|
@@ -23098,13 +23080,7 @@ var TooltipView = _ref4 => {
|
|
|
23098
23080
|
borderRadius: 4,
|
|
23099
23081
|
boxShadow: "0px 2px 8px rgba(0, 0, 0, 0.15)",
|
|
23100
23082
|
style: positionStyles
|
|
23101
|
-
}, 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))
|
|
23102
|
-
style: {
|
|
23103
|
-
fontSize: '8px',
|
|
23104
|
-
opacity: 0.7,
|
|
23105
|
-
marginTop: '2px'
|
|
23106
|
-
}
|
|
23107
|
-
}, "Placement: ", optimalPosition.placement)))));
|
|
23083
|
+
}, 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)))));
|
|
23108
23084
|
};
|
|
23109
23085
|
|
|
23110
23086
|
var _excluded$18 = ["content", "children", "position", "align", "size", "variant", "openDelay", "closeDelay", "showArrow", "defaultOpen", "isDisabled", "views"];
|
|
@@ -26602,14 +26578,305 @@ var AuroraStyles = {
|
|
|
26602
26578
|
backgroundPosition: '50% 50%, 50% 50%'
|
|
26603
26579
|
}
|
|
26604
26580
|
};
|
|
26581
|
+
/**
|
|
26582
|
+
* Background Image styles
|
|
26583
|
+
*/
|
|
26584
|
+
var BackgroundImageStyles = {
|
|
26585
|
+
container: {
|
|
26586
|
+
position: 'relative',
|
|
26587
|
+
display: 'flex',
|
|
26588
|
+
flexDirection: 'column',
|
|
26589
|
+
alignItems: 'center',
|
|
26590
|
+
justifyContent: 'center',
|
|
26591
|
+
overflow: 'hidden'
|
|
26592
|
+
},
|
|
26593
|
+
image: {
|
|
26594
|
+
position: 'absolute',
|
|
26595
|
+
top: 0,
|
|
26596
|
+
left: 0,
|
|
26597
|
+
width: '100%',
|
|
26598
|
+
height: '100%',
|
|
26599
|
+
backgroundSize: 'cover',
|
|
26600
|
+
backgroundPosition: 'center',
|
|
26601
|
+
backgroundRepeat: 'no-repeat',
|
|
26602
|
+
backgroundAttachment: 'scroll'
|
|
26603
|
+
},
|
|
26604
|
+
overlay: {
|
|
26605
|
+
position: 'absolute',
|
|
26606
|
+
top: 0,
|
|
26607
|
+
left: 0,
|
|
26608
|
+
width: '100%',
|
|
26609
|
+
height: '100%',
|
|
26610
|
+
pointerEvents: 'none'
|
|
26611
|
+
},
|
|
26612
|
+
content: {
|
|
26613
|
+
position: 'relative',
|
|
26614
|
+
zIndex: 2
|
|
26615
|
+
}
|
|
26616
|
+
};
|
|
26605
26617
|
|
|
26606
|
-
|
|
26618
|
+
/**
|
|
26619
|
+
* Gradient Styles
|
|
26620
|
+
*
|
|
26621
|
+
* Defines the styles for the Gradient component following the design guidelines:
|
|
26622
|
+
* - Typography: Inter/Geist font, specific sizes/weights
|
|
26623
|
+
* - Spacing: 4px grid system
|
|
26624
|
+
* - Colors: Neutral palette with semantic colors
|
|
26625
|
+
* - Rounded corners: Consistent border radius
|
|
26626
|
+
* - Transitions: Subtle animations
|
|
26627
|
+
*/
|
|
26628
|
+
/**
|
|
26629
|
+
* Maps direction strings to CSS gradient directions
|
|
26630
|
+
*/
|
|
26631
|
+
var DirectionMap = {
|
|
26632
|
+
'to-right': 'to right',
|
|
26633
|
+
'to-left': 'to left',
|
|
26634
|
+
'to-bottom': 'to bottom',
|
|
26635
|
+
'to-top': 'to top',
|
|
26636
|
+
'to-top-right': 'to top right',
|
|
26637
|
+
'to-top-left': 'to top left',
|
|
26638
|
+
'to-bottom-right': 'to bottom right',
|
|
26639
|
+
'to-bottom-left': 'to bottom left'
|
|
26640
|
+
};
|
|
26641
|
+
/**
|
|
26642
|
+
* Maps position strings to CSS position values
|
|
26643
|
+
*/
|
|
26644
|
+
var PositionMap = {
|
|
26645
|
+
center: 'center',
|
|
26646
|
+
top: 'top',
|
|
26647
|
+
right: 'right',
|
|
26648
|
+
bottom: 'bottom',
|
|
26649
|
+
left: 'left',
|
|
26650
|
+
'top-right': 'top right',
|
|
26651
|
+
'top-left': 'top left',
|
|
26652
|
+
'bottom-right': 'bottom right',
|
|
26653
|
+
'bottom-left': 'bottom left'
|
|
26654
|
+
};
|
|
26655
|
+
/**
|
|
26656
|
+
* Default color stops for different gradient types
|
|
26657
|
+
*/
|
|
26658
|
+
var DefaultColorStops = {
|
|
26659
|
+
linear: [{
|
|
26660
|
+
color: 'color.blue.500',
|
|
26661
|
+
position: '0%'
|
|
26662
|
+
}, {
|
|
26663
|
+
color: 'color.purple.500',
|
|
26664
|
+
position: '100%'
|
|
26665
|
+
}],
|
|
26666
|
+
radial: [{
|
|
26667
|
+
color: 'color.blue.500',
|
|
26668
|
+
position: '0%'
|
|
26669
|
+
}, {
|
|
26670
|
+
color: 'color.purple.500',
|
|
26671
|
+
position: '100%'
|
|
26672
|
+
}],
|
|
26673
|
+
conic: [{
|
|
26674
|
+
color: 'color.red.500',
|
|
26675
|
+
position: '0deg'
|
|
26676
|
+
}, {
|
|
26677
|
+
color: 'color.yellow.500',
|
|
26678
|
+
position: '90deg'
|
|
26679
|
+
}, {
|
|
26680
|
+
color: 'color.green.500',
|
|
26681
|
+
position: '180deg'
|
|
26682
|
+
}, {
|
|
26683
|
+
color: 'color.blue.500',
|
|
26684
|
+
position: '270deg'
|
|
26685
|
+
}, {
|
|
26686
|
+
color: 'color.red.500',
|
|
26687
|
+
position: '360deg'
|
|
26688
|
+
}]
|
|
26689
|
+
};
|
|
26690
|
+
/**
|
|
26691
|
+
* Generates a CSS gradient string based on the provided parameters
|
|
26692
|
+
*/
|
|
26693
|
+
var generateGradientString = (type, colors, direction, shape, position) => {
|
|
26694
|
+
// Format color stops
|
|
26695
|
+
var colorStopsString = colors.map(stop => stop.color + " " + (stop.position || '')).join(', ');
|
|
26696
|
+
// Generate the appropriate gradient string based on type
|
|
26697
|
+
switch (type) {
|
|
26698
|
+
case 'linear':
|
|
26699
|
+
var dir = direction && DirectionMap[direction] ? DirectionMap[direction] : direction || 'to right';
|
|
26700
|
+
return "linear-gradient(" + dir + ", " + colorStopsString + ")";
|
|
26701
|
+
case 'radial':
|
|
26702
|
+
var pos = position && PositionMap[position] ? PositionMap[position] : position || 'center';
|
|
26703
|
+
var shapeValue = shape || 'circle';
|
|
26704
|
+
return "radial-gradient(" + shapeValue + " at " + pos + ", " + colorStopsString + ")";
|
|
26705
|
+
case 'conic':
|
|
26706
|
+
var conicPos = position && PositionMap[position] ? PositionMap[position] : position || 'center';
|
|
26707
|
+
return "conic-gradient(from 0deg at " + conicPos + ", " + colorStopsString + ")";
|
|
26708
|
+
default:
|
|
26709
|
+
return "linear-gradient(to right, " + colorStopsString + ")";
|
|
26710
|
+
}
|
|
26711
|
+
};
|
|
26712
|
+
/**
|
|
26713
|
+
* Animation styles for animated gradients using app-studio's animation system
|
|
26714
|
+
*/
|
|
26715
|
+
var GradientAnimations = {
|
|
26716
|
+
linear: {
|
|
26717
|
+
backgroundSize: '200% 200%',
|
|
26718
|
+
transition: 'background-position 3s ease-in-out',
|
|
26719
|
+
animate: {
|
|
26720
|
+
from: {
|
|
26721
|
+
backgroundPosition: '0% 50%'
|
|
26722
|
+
},
|
|
26723
|
+
'50%': {
|
|
26724
|
+
backgroundPosition: '100% 50%'
|
|
26725
|
+
},
|
|
26726
|
+
to: {
|
|
26727
|
+
backgroundPosition: '0% 50%'
|
|
26728
|
+
}
|
|
26729
|
+
}
|
|
26730
|
+
},
|
|
26731
|
+
radial: {
|
|
26732
|
+
backgroundSize: '100% 100%',
|
|
26733
|
+
transition: 'all 3s ease-in-out',
|
|
26734
|
+
animate: {
|
|
26735
|
+
from: {
|
|
26736
|
+
backgroundPosition: 'center',
|
|
26737
|
+
backgroundSize: '100% 100%'
|
|
26738
|
+
},
|
|
26739
|
+
'50%': {
|
|
26740
|
+
backgroundSize: '120% 120%'
|
|
26741
|
+
},
|
|
26742
|
+
to: {
|
|
26743
|
+
backgroundPosition: 'center',
|
|
26744
|
+
backgroundSize: '100% 100%'
|
|
26745
|
+
}
|
|
26746
|
+
}
|
|
26747
|
+
},
|
|
26748
|
+
conic: {
|
|
26749
|
+
transition: 'transform 3s linear',
|
|
26750
|
+
animate: {
|
|
26751
|
+
from: {
|
|
26752
|
+
transform: 'rotate(0deg)'
|
|
26753
|
+
},
|
|
26754
|
+
to: {
|
|
26755
|
+
transform: 'rotate(360deg)'
|
|
26756
|
+
}
|
|
26757
|
+
}
|
|
26758
|
+
}
|
|
26759
|
+
};
|
|
26760
|
+
/**
|
|
26761
|
+
* Default styles for the Gradient component
|
|
26762
|
+
*/
|
|
26763
|
+
var DefaultGradientStyles = {
|
|
26764
|
+
container: {
|
|
26765
|
+
position: 'relative',
|
|
26766
|
+
overflow: 'hidden',
|
|
26767
|
+
borderRadius: '8px',
|
|
26768
|
+
transition: 'all 0.2s ease'
|
|
26769
|
+
},
|
|
26770
|
+
content: {
|
|
26771
|
+
position: 'relative',
|
|
26772
|
+
zIndex: 1,
|
|
26773
|
+
width: '100%',
|
|
26774
|
+
height: '100%',
|
|
26775
|
+
padding: '16px'
|
|
26776
|
+
}
|
|
26777
|
+
};
|
|
26778
|
+
|
|
26779
|
+
var _excluded$1e = ["type", "direction", "shape", "position", "from", "to", "colors", "animate", "animationDuration", "children", "views", "themeMode"];
|
|
26780
|
+
var GradientView = _ref => {
|
|
26781
|
+
var {
|
|
26782
|
+
type = 'linear',
|
|
26783
|
+
direction = 'to-right',
|
|
26784
|
+
shape = 'circle',
|
|
26785
|
+
position = 'center',
|
|
26786
|
+
from,
|
|
26787
|
+
to,
|
|
26788
|
+
colors,
|
|
26789
|
+
animate = false,
|
|
26790
|
+
animationDuration = 3,
|
|
26791
|
+
children,
|
|
26792
|
+
views,
|
|
26793
|
+
themeMode: elementMode
|
|
26794
|
+
} = _ref,
|
|
26795
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$1e);
|
|
26796
|
+
var {
|
|
26797
|
+
getColor,
|
|
26798
|
+
themeMode
|
|
26799
|
+
} = appStudio.useTheme();
|
|
26800
|
+
// Determine color stops to use
|
|
26801
|
+
var colorStops = React.useMemo(() => {
|
|
26802
|
+
// If colors array is provided, use it
|
|
26803
|
+
if (colors && colors.length > 0) {
|
|
26804
|
+
return colors;
|
|
26805
|
+
}
|
|
26806
|
+
// If from and to are provided, create a two-color gradient
|
|
26807
|
+
if (from && to) {
|
|
26808
|
+
return [{
|
|
26809
|
+
color: from,
|
|
26810
|
+
position: '0%'
|
|
26811
|
+
}, {
|
|
26812
|
+
color: to,
|
|
26813
|
+
position: '100%'
|
|
26814
|
+
}];
|
|
26815
|
+
}
|
|
26816
|
+
// Otherwise use default colors for the selected gradient type
|
|
26817
|
+
return DefaultColorStops[type];
|
|
26818
|
+
}, [colors, from, to, type]);
|
|
26819
|
+
// Generate the gradient string
|
|
26820
|
+
var gradientString = React.useMemo(() => {
|
|
26821
|
+
// Process color stops to resolve theme colors
|
|
26822
|
+
var processedColorStops = colorStops.map(stop => Object.assign({}, stop, {
|
|
26823
|
+
color: getColor(stop.color, elementMode ? {
|
|
26824
|
+
themeMode: elementMode
|
|
26825
|
+
} : undefined)
|
|
26826
|
+
}));
|
|
26827
|
+
return generateGradientString(type, processedColorStops, direction, shape, position);
|
|
26828
|
+
}, [type, colorStops, direction, shape, position, getColor, themeMode, elementMode]);
|
|
26829
|
+
// Prepare animation styles if animation is enabled
|
|
26830
|
+
var animationStyles = React.useMemo(() => {
|
|
26831
|
+
if (!animate) return {};
|
|
26832
|
+
var baseAnimation = GradientAnimations[type];
|
|
26833
|
+
return Object.assign({}, baseAnimation, {
|
|
26834
|
+
transition: baseAnimation.transition.replace('3s', animationDuration + "s"),
|
|
26835
|
+
// Apply animation properties
|
|
26836
|
+
animationDuration: animationDuration + "s",
|
|
26837
|
+
animationIterationCount: 'infinite',
|
|
26838
|
+
animationTimingFunction: type === 'conic' ? 'linear' : 'ease-in-out'
|
|
26839
|
+
});
|
|
26840
|
+
}, [animate, animationDuration, type]);
|
|
26841
|
+
return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
26842
|
+
background: gradientString
|
|
26843
|
+
}, 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)));
|
|
26844
|
+
};
|
|
26845
|
+
|
|
26846
|
+
/**
|
|
26847
|
+
* Gradient Component
|
|
26848
|
+
*
|
|
26849
|
+
* @example
|
|
26850
|
+
* // Basic linear gradient
|
|
26851
|
+
* <Gradient from="blue.500" to="purple.500" height="200px" width="100%" />
|
|
26852
|
+
*
|
|
26853
|
+
* @example
|
|
26854
|
+
* // Radial gradient with content
|
|
26855
|
+
* <Gradient
|
|
26856
|
+
* type="radial"
|
|
26857
|
+
* colors={[
|
|
26858
|
+
* { color: 'red.500', position: '0%' },
|
|
26859
|
+
* { color: 'orange.500', position: '50%' },
|
|
26860
|
+
* { color: 'yellow.500', position: '100%' }
|
|
26861
|
+
* ]}
|
|
26862
|
+
* height="200px"
|
|
26863
|
+
* >
|
|
26864
|
+
* <Text color="white">Content inside gradient</Text>
|
|
26865
|
+
* </Gradient>
|
|
26866
|
+
*/
|
|
26867
|
+
var Gradient = props => {
|
|
26868
|
+
return /*#__PURE__*/React__default.createElement(GradientView, Object.assign({}, props));
|
|
26869
|
+
};
|
|
26870
|
+
|
|
26871
|
+
var _excluded$1f = ["children", "showRadialGradient", "views", "themeMode"],
|
|
26607
26872
|
_excluded2$l = ["number"],
|
|
26608
26873
|
_excluded3$g = ["rows", "cols", "squareSize"],
|
|
26609
26874
|
_excluded4$d = ["count", "colors", "speed", "shapes"],
|
|
26610
26875
|
_excluded5$6 = ["gridSize", "lineColor", "pulseColor", "animationSpeed"],
|
|
26611
26876
|
_excluded6$4 = ["rippleCount", "colors", "maxSize", "frequency"],
|
|
26612
|
-
_excluded7$1 = ["children", "views"]
|
|
26877
|
+
_excluded7$1 = ["children", "src", "backgroundSize", "backgroundPosition", "backgroundRepeat", "backgroundAttachment", "imageOpacity", "overlay", "blendMode", "views", "themeMode"],
|
|
26878
|
+
_excluded8$1 = ["children"],
|
|
26879
|
+
_excluded9$1 = ["children", "views"];
|
|
26613
26880
|
// Background Context
|
|
26614
26881
|
var BackgroundContext = /*#__PURE__*/React.createContext({});
|
|
26615
26882
|
/**
|
|
@@ -26621,7 +26888,7 @@ var AuroraBackground = _ref => {
|
|
|
26621
26888
|
showRadialGradient = true,
|
|
26622
26889
|
views
|
|
26623
26890
|
} = _ref,
|
|
26624
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
26891
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$1f);
|
|
26625
26892
|
var gradientColors = {
|
|
26626
26893
|
white: 'rgba(255,255,255,1)',
|
|
26627
26894
|
transparent: 'rgba(255,255,255,0)'
|
|
@@ -26982,12 +27249,64 @@ var Ripples = _ref6 => {
|
|
|
26982
27249
|
}
|
|
26983
27250
|
}))));
|
|
26984
27251
|
};
|
|
26985
|
-
|
|
27252
|
+
/**
|
|
27253
|
+
* Background Image Component
|
|
27254
|
+
*/
|
|
27255
|
+
var BackgroundImage = _ref7 => {
|
|
26986
27256
|
var {
|
|
26987
27257
|
children,
|
|
26988
|
-
|
|
27258
|
+
src,
|
|
27259
|
+
backgroundSize = 'cover',
|
|
27260
|
+
backgroundPosition = 'center',
|
|
27261
|
+
backgroundRepeat = 'no-repeat',
|
|
27262
|
+
backgroundAttachment = 'scroll',
|
|
27263
|
+
imageOpacity = 1,
|
|
27264
|
+
overlay,
|
|
27265
|
+
blendMode = 'normal',
|
|
27266
|
+
views,
|
|
27267
|
+
themeMode: elementMode
|
|
26989
27268
|
} = _ref7,
|
|
26990
27269
|
props = _objectWithoutPropertiesLoose(_ref7, _excluded7$1);
|
|
27270
|
+
var {
|
|
27271
|
+
getColor
|
|
27272
|
+
} = appStudio.useTheme();
|
|
27273
|
+
var imageStyle = Object.assign({}, BackgroundImageStyles.image, {
|
|
27274
|
+
backgroundImage: "url(" + src + ")",
|
|
27275
|
+
backgroundSize,
|
|
27276
|
+
backgroundPosition,
|
|
27277
|
+
backgroundRepeat,
|
|
27278
|
+
backgroundAttachment,
|
|
27279
|
+
opacity: imageOpacity
|
|
27280
|
+
});
|
|
27281
|
+
var overlayStyle = overlay ? Object.assign({}, BackgroundImageStyles.overlay, {
|
|
27282
|
+
backgroundColor: getColor(overlay, elementMode ? {
|
|
27283
|
+
themeMode: elementMode
|
|
27284
|
+
} : undefined),
|
|
27285
|
+
mixBlendMode: blendMode
|
|
27286
|
+
}) : {};
|
|
27287
|
+
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({
|
|
27288
|
+
style: imageStyle
|
|
27289
|
+
}, views == null ? void 0 : views.image)), overlay && /*#__PURE__*/React__default.createElement(appStudio.View, {
|
|
27290
|
+
style: overlayStyle
|
|
27291
|
+
}), children && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, BackgroundImageStyles.content, views == null ? void 0 : views.content), children)));
|
|
27292
|
+
};
|
|
27293
|
+
/**
|
|
27294
|
+
* Background Gradient Component
|
|
27295
|
+
* Uses the existing Gradient component as a background
|
|
27296
|
+
*/
|
|
27297
|
+
var BackgroundGradient = _ref8 => {
|
|
27298
|
+
var {
|
|
27299
|
+
children
|
|
27300
|
+
} = _ref8,
|
|
27301
|
+
gradientProps = _objectWithoutPropertiesLoose(_ref8, _excluded8$1);
|
|
27302
|
+
return /*#__PURE__*/React__default.createElement(Gradient, Object.assign({}, gradientProps), children);
|
|
27303
|
+
};
|
|
27304
|
+
var BackgroundViewBase = _ref9 => {
|
|
27305
|
+
var {
|
|
27306
|
+
children,
|
|
27307
|
+
views
|
|
27308
|
+
} = _ref9,
|
|
27309
|
+
props = _objectWithoutPropertiesLoose(_ref9, _excluded9$1);
|
|
26991
27310
|
return /*#__PURE__*/React__default.createElement(BackgroundContext.Provider, {
|
|
26992
27311
|
value: {}
|
|
26993
27312
|
}, /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, DefaultBackgroundStyles.container, views == null ? void 0 : views.container, props), children));
|
|
@@ -27001,6 +27320,8 @@ BackgroundView.Wall = Wall;
|
|
|
27001
27320
|
BackgroundView.Particles = Particles;
|
|
27002
27321
|
BackgroundView.Grid = Grid;
|
|
27003
27322
|
BackgroundView.Ripples = Ripples;
|
|
27323
|
+
BackgroundView.Image = BackgroundImage;
|
|
27324
|
+
BackgroundView.Gradient = BackgroundGradient;
|
|
27004
27325
|
|
|
27005
27326
|
/**
|
|
27006
27327
|
* Background Component with compound pattern
|
|
@@ -27030,6 +27351,18 @@ BackgroundView.Ripples = Ripples;
|
|
|
27030
27351
|
* @example
|
|
27031
27352
|
* // Ripples effect
|
|
27032
27353
|
* <Background.Ripples rippleCount={5} maxSize={200} frequency={3} />
|
|
27354
|
+
*
|
|
27355
|
+
* @example
|
|
27356
|
+
* // Background Image
|
|
27357
|
+
* <Background.Image src="/path/to/image.jpg" size="cover" overlay="rgba(0,0,0,0.5)">
|
|
27358
|
+
* <Text color="white">Content over image</Text>
|
|
27359
|
+
* </Background.Image>
|
|
27360
|
+
*
|
|
27361
|
+
* @example
|
|
27362
|
+
* // Background Gradient
|
|
27363
|
+
* <Background.Gradient from="blue.500" to="purple.500" animate={true}>
|
|
27364
|
+
* <Text color="white">Content over gradient</Text>
|
|
27365
|
+
* </Background.Gradient>
|
|
27033
27366
|
*/
|
|
27034
27367
|
var BackgroundComponent = /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(BackgroundView, Object.assign({}, props, {
|
|
27035
27368
|
ref: ref
|
|
@@ -27041,7 +27374,9 @@ var Background = /*#__PURE__*/Object.assign(BackgroundComponent, {
|
|
|
27041
27374
|
Wall: BackgroundView.Wall,
|
|
27042
27375
|
Particles: BackgroundView.Particles,
|
|
27043
27376
|
Grid: BackgroundView.Grid,
|
|
27044
|
-
Ripples: BackgroundView.Ripples
|
|
27377
|
+
Ripples: BackgroundView.Ripples,
|
|
27378
|
+
Image: BackgroundView.Image,
|
|
27379
|
+
Gradient: BackgroundView.Gradient
|
|
27045
27380
|
});
|
|
27046
27381
|
Background.displayName = 'Background';
|
|
27047
27382
|
|