@app-studio/web 0.9.57 → 0.9.59
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 +15 -8
- package/dist/components/Background/Background/Background.style.d.ts +0 -2
- package/dist/components/Background/Background/Background.view.d.ts +2 -1
- package/dist/components/Background/Background.d.ts +1 -0
- package/dist/components/ChatInput/ChatInput/ChatInput.props.d.ts +17 -0
- package/dist/components/Formik/Formik.Uploader.d.ts +1 -1
- package/dist/components/ProgressBar/ProgressBar/ProgressBar.props.d.ts +36 -2
- package/dist/components/ProgressBar/ProgressBar.d.ts +1 -0
- package/dist/components/Title/Title/Title.props.d.ts +0 -5
- package/dist/web.cjs.development.js +149 -99
- 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 +149 -99
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +153 -102
- 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/docs/app-studio/Animation.md +241 -0
- package/docs/app-studio/Components.md +192 -0
- package/docs/app-studio/Design.md +121 -0
- package/docs/app-studio/Events.md +296 -0
- package/docs/app-studio/Hooks.md +469 -0
- package/docs/app-studio/Providers.md +186 -0
- package/docs/app-studio/README.md +781 -0
- package/docs/app-studio/Responsive.md +135 -0
- package/docs/app-studio/Theming.md +488 -0
- package/docs/components/Background.mdx +2 -2
- package/docs/components/ChatInput.mdx +133 -0
- package/package.json +3 -2
package/dist/web.esm.js
CHANGED
|
@@ -33,7 +33,6 @@ import 'core-js/modules/es.regexp.constructor.js';
|
|
|
33
33
|
import 'core-js/modules/es.regexp.exec.js';
|
|
34
34
|
import { useFormikContext, getIn } from 'formik';
|
|
35
35
|
import 'core-js/modules/es.string.replace.js';
|
|
36
|
-
import { UploadService } from 'src/services/api';
|
|
37
36
|
import 'core-js/modules/es.promise.finally.js';
|
|
38
37
|
import 'core-js/modules/es.string.match.js';
|
|
39
38
|
import 'core-js/modules/es.string.search.js';
|
|
@@ -14270,7 +14269,11 @@ var useChatInputState = props => {
|
|
|
14270
14269
|
disabled = false,
|
|
14271
14270
|
isAgentRunning = false,
|
|
14272
14271
|
onStopAgent,
|
|
14273
|
-
sandboxId
|
|
14272
|
+
sandboxId,
|
|
14273
|
+
onUploadProgress,
|
|
14274
|
+
onUploadSuccess,
|
|
14275
|
+
onUploadError,
|
|
14276
|
+
onFileUpload
|
|
14274
14277
|
} = props;
|
|
14275
14278
|
// Determine if the component is controlled
|
|
14276
14279
|
var isControlled = controlledValue !== undefined && controlledOnChange !== undefined;
|
|
@@ -14386,28 +14389,6 @@ var useChatInputState = props => {
|
|
|
14386
14389
|
e.stopPropagation();
|
|
14387
14390
|
setIsDraggingOver(false);
|
|
14388
14391
|
};
|
|
14389
|
-
// Upload service hook (single file at a time)
|
|
14390
|
-
var uploadFileRequest = UploadService.useUploadControllerFileService({
|
|
14391
|
-
onProgress: p => setUploadProgress(p || 0),
|
|
14392
|
-
onSuccess: () => {
|
|
14393
|
-
// Advance the queue
|
|
14394
|
-
setUploadQueue(prev => prev.slice(1));
|
|
14395
|
-
setIsProcessingQueue(false);
|
|
14396
|
-
currentUploadRef.current = null;
|
|
14397
|
-
setUploadProgress(0);
|
|
14398
|
-
// If queue emptied, stop uploading state
|
|
14399
|
-
setIsUploading(prev => uploadQueue.length - 1 > 0 || false);
|
|
14400
|
-
},
|
|
14401
|
-
onError: _err => {
|
|
14402
|
-
// Remove the failed file from queue and continue
|
|
14403
|
-
setUploadQueue(prev => prev.slice(1));
|
|
14404
|
-
setIsProcessingQueue(false);
|
|
14405
|
-
currentUploadRef.current = null;
|
|
14406
|
-
setUploadProgress(0);
|
|
14407
|
-
// If queue emptied, stop uploading state
|
|
14408
|
-
setIsUploading(prev => uploadQueue.length - 1 > 0 || false);
|
|
14409
|
-
}
|
|
14410
|
-
});
|
|
14411
14392
|
// Start uploading a batch of files (enqueue and process)
|
|
14412
14393
|
var startUpload = useCallback(files => {
|
|
14413
14394
|
if (!files || files.length === 0) return;
|
|
@@ -14420,25 +14401,33 @@ var useChatInputState = props => {
|
|
|
14420
14401
|
}, [setPendingFiles, setUploadedFiles]);
|
|
14421
14402
|
// Process upload queue sequentially
|
|
14422
14403
|
var processUploadQueue = useCallback(() => {
|
|
14423
|
-
if (uploadQueue.length > 0 && !isProcessingQueue &&
|
|
14404
|
+
if (uploadQueue.length > 0 && !isProcessingQueue && onFileUpload) {
|
|
14424
14405
|
setIsProcessingQueue(true);
|
|
14425
14406
|
var nextFile = uploadQueue[0];
|
|
14426
14407
|
currentUploadRef.current = nextFile;
|
|
14427
14408
|
setUploadProgress(0);
|
|
14428
|
-
//
|
|
14429
|
-
|
|
14430
|
-
|
|
14431
|
-
})
|
|
14409
|
+
// Execute user-provided upload function
|
|
14410
|
+
try {
|
|
14411
|
+
onFileUpload(nextFile);
|
|
14412
|
+
} catch (err) {
|
|
14413
|
+
// Handle synchronous errors
|
|
14414
|
+
setUploadQueue(prev => prev.slice(1));
|
|
14415
|
+
setIsProcessingQueue(false);
|
|
14416
|
+
currentUploadRef.current = null;
|
|
14417
|
+
setUploadProgress(0);
|
|
14418
|
+
setIsUploading(prev => uploadQueue.length - 1 > 0 || false);
|
|
14419
|
+
onUploadError == null || onUploadError(err);
|
|
14420
|
+
}
|
|
14432
14421
|
} else if (uploadQueue.length === 0 && isUploading) {
|
|
14433
14422
|
// Nothing left to upload
|
|
14434
14423
|
setIsUploading(false);
|
|
14435
14424
|
setUploadProgress(0);
|
|
14436
14425
|
}
|
|
14437
|
-
}, [uploadQueue, isProcessingQueue,
|
|
14438
|
-
// Effect: process whenever queue
|
|
14426
|
+
}, [uploadQueue, isProcessingQueue, onFileUpload, isUploading, onUploadError]);
|
|
14427
|
+
// Effect: process whenever queue changes
|
|
14439
14428
|
useEffect(() => {
|
|
14440
14429
|
processUploadQueue();
|
|
14441
|
-
}, [uploadQueue, isProcessingQueue,
|
|
14430
|
+
}, [uploadQueue, isProcessingQueue, processUploadQueue]);
|
|
14442
14431
|
// Mock function for subscription status
|
|
14443
14432
|
var subscriptionStatus = 'active';
|
|
14444
14433
|
// Mock function to check if user can access a model
|
|
@@ -16945,11 +16934,6 @@ var OTPInputComponent$1 = props => {
|
|
|
16945
16934
|
var FormikOTPInput = OTPInputComponent$1;
|
|
16946
16935
|
|
|
16947
16936
|
var _excluded$T = ["name", "uploadFile", "onUploadSuccess", "onUploadError", "transformResponse", "onMultipleFileSelect", "onFileSelect", "multiple"];
|
|
16948
|
-
var defaultUploadFile = (file, onProgress) => {
|
|
16949
|
-
return UploadService.uploadControllerFile({
|
|
16950
|
-
file
|
|
16951
|
-
}, onProgress);
|
|
16952
|
-
};
|
|
16953
16937
|
var toArrayValue = value => {
|
|
16954
16938
|
if (Array.isArray(value)) {
|
|
16955
16939
|
return value;
|
|
@@ -16962,7 +16946,7 @@ var toArrayValue = value => {
|
|
|
16962
16946
|
var FormikUploader = _ref => {
|
|
16963
16947
|
var {
|
|
16964
16948
|
name,
|
|
16965
|
-
uploadFile
|
|
16949
|
+
uploadFile,
|
|
16966
16950
|
onUploadSuccess,
|
|
16967
16951
|
onUploadError,
|
|
16968
16952
|
transformResponse,
|
|
@@ -19502,7 +19486,7 @@ var SlideEffect = _ref => {
|
|
|
19502
19486
|
})));
|
|
19503
19487
|
};
|
|
19504
19488
|
|
|
19505
|
-
var _excluded$$ = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "responsive", "
|
|
19489
|
+
var _excluded$$ = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "responsive", "views", "highlightAnimate", "animate", "animationLoop", "highlightAnimationLoop", "highlightTypewriter", "highlightTypewriterDuration", "highlightSlide", "highlightSlideDuration", "highlightSlideStagger", "highlightSlideSequential"];
|
|
19506
19490
|
function escapeRegExp(string) {
|
|
19507
19491
|
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
19508
19492
|
}
|
|
@@ -19515,7 +19499,6 @@ var TitleView = _ref => {
|
|
|
19515
19499
|
highlightSecondaryColor,
|
|
19516
19500
|
size = 'lg',
|
|
19517
19501
|
responsive = true,
|
|
19518
|
-
centered = false,
|
|
19519
19502
|
views,
|
|
19520
19503
|
highlightAnimate,
|
|
19521
19504
|
animate,
|
|
@@ -19630,7 +19613,6 @@ var TitleView = _ref => {
|
|
|
19630
19613
|
fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
|
|
19631
19614
|
letterSpacing: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.letterSpacing : undefined,
|
|
19632
19615
|
marginBottom: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.marginBottom : undefined,
|
|
19633
|
-
textAlign: centered ? 'center' : 'left',
|
|
19634
19616
|
animate: inView ? controlledAnimate : undefined,
|
|
19635
19617
|
media: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.media : undefined
|
|
19636
19618
|
}, views == null ? void 0 : views.container, props), parts.map((part, idx) => typeof part === 'string' ? part : (/*#__PURE__*/React.createElement(Text, Object.assign({
|
|
@@ -19664,7 +19646,6 @@ var TitleView = _ref => {
|
|
|
19664
19646
|
fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
|
|
19665
19647
|
letterSpacing: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.letterSpacing : undefined,
|
|
19666
19648
|
marginBottom: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.marginBottom : undefined,
|
|
19667
|
-
textAlign: centered ? 'center' : 'left',
|
|
19668
19649
|
animate: inView ? controlledAnimate : undefined,
|
|
19669
19650
|
media: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.media : undefined
|
|
19670
19651
|
}, views == null ? void 0 : views.container, props), /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
@@ -19696,7 +19677,6 @@ var TitleView = _ref => {
|
|
|
19696
19677
|
fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
|
|
19697
19678
|
letterSpacing: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.letterSpacing : undefined,
|
|
19698
19679
|
marginBottom: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.marginBottom : undefined,
|
|
19699
|
-
textAlign: centered ? 'center' : 'left',
|
|
19700
19680
|
animate: inView ? controlledAnimate : undefined,
|
|
19701
19681
|
media: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.media : undefined
|
|
19702
19682
|
}, views == null ? void 0 : views.container, props), text);
|
|
@@ -24307,15 +24287,22 @@ var PaginationComponent = _ref => {
|
|
|
24307
24287
|
};
|
|
24308
24288
|
var Pagination = PaginationComponent;
|
|
24309
24289
|
|
|
24310
|
-
var _excluded$1a = ["value", "max", "color", "backgroundColor", "height", "radius", "views", "themeMode"];
|
|
24290
|
+
var _excluded$1a = ["shape", "value", "max", "color", "backgroundColor", "height", "size", "radius", "strokeWidth", "showLabel", "labelColor", "animated", "animationDuration", "views", "themeMode"];
|
|
24311
24291
|
var ProgressBarView = _ref => {
|
|
24312
24292
|
var {
|
|
24293
|
+
shape = 'linear',
|
|
24313
24294
|
value = 0,
|
|
24314
24295
|
max = 100,
|
|
24315
24296
|
color = 'theme.primary',
|
|
24316
24297
|
backgroundColor = 'color.gray.200',
|
|
24317
|
-
height
|
|
24298
|
+
height,
|
|
24299
|
+
size,
|
|
24318
24300
|
radius = 4,
|
|
24301
|
+
strokeWidth = 10,
|
|
24302
|
+
showLabel = false,
|
|
24303
|
+
labelColor = 'theme.text.primary',
|
|
24304
|
+
animated = true,
|
|
24305
|
+
animationDuration = '0.5s',
|
|
24319
24306
|
views,
|
|
24320
24307
|
themeMode: elementMode
|
|
24321
24308
|
} = _ref,
|
|
@@ -24325,20 +24312,78 @@ var ProgressBarView = _ref => {
|
|
|
24325
24312
|
themeMode
|
|
24326
24313
|
} = useTheme();
|
|
24327
24314
|
var currentMode = elementMode ? elementMode : themeMode;
|
|
24328
|
-
var
|
|
24315
|
+
var validValue = Math.min(max, Math.max(0, value));
|
|
24316
|
+
var percentage = validValue / max * 100;
|
|
24329
24317
|
var trackColor = getColor(backgroundColor, {
|
|
24330
24318
|
themeMode: currentMode
|
|
24331
24319
|
});
|
|
24332
24320
|
var barColor = getColor(color, {
|
|
24333
24321
|
themeMode: currentMode
|
|
24334
24322
|
});
|
|
24323
|
+
if (shape === 'circle') {
|
|
24324
|
+
var circleSize = size || (typeof height === 'number' ? height : 100);
|
|
24325
|
+
var radiusCalc = (circleSize - strokeWidth) / 2;
|
|
24326
|
+
var circumference = 2 * Math.PI * radiusCalc;
|
|
24327
|
+
var offset = circumference - percentage / 100 * circumference;
|
|
24328
|
+
return /*#__PURE__*/React.createElement(View, Object.assign({
|
|
24329
|
+
width: circleSize,
|
|
24330
|
+
height: circleSize,
|
|
24331
|
+
position: "relative",
|
|
24332
|
+
display: "flex",
|
|
24333
|
+
alignItems: "center",
|
|
24334
|
+
justifyContent: "center"
|
|
24335
|
+
}, views == null ? void 0 : views.container, props), /*#__PURE__*/React.createElement("svg", {
|
|
24336
|
+
width: circleSize,
|
|
24337
|
+
height: circleSize,
|
|
24338
|
+
viewBox: "0 0 " + circleSize + " " + circleSize,
|
|
24339
|
+
style: {
|
|
24340
|
+
transform: 'rotate(-90deg)'
|
|
24341
|
+
}
|
|
24342
|
+
}, /*#__PURE__*/React.createElement("circle", Object.assign({
|
|
24343
|
+
cx: circleSize / 2,
|
|
24344
|
+
cy: circleSize / 2,
|
|
24345
|
+
r: radiusCalc,
|
|
24346
|
+
stroke: trackColor,
|
|
24347
|
+
strokeWidth: strokeWidth,
|
|
24348
|
+
fill: "transparent"
|
|
24349
|
+
}, views == null ? void 0 : views.track)), /*#__PURE__*/React.createElement("circle", Object.assign({
|
|
24350
|
+
cx: circleSize / 2,
|
|
24351
|
+
cy: circleSize / 2,
|
|
24352
|
+
r: radiusCalc,
|
|
24353
|
+
stroke: barColor,
|
|
24354
|
+
strokeWidth: strokeWidth,
|
|
24355
|
+
strokeDasharray: circumference,
|
|
24356
|
+
strokeDashoffset: offset,
|
|
24357
|
+
strokeLinecap: "round",
|
|
24358
|
+
fill: "transparent",
|
|
24359
|
+
style: {
|
|
24360
|
+
transition: animated ? "stroke-dashoffset " + animationDuration + " ease-in-out" : 'none'
|
|
24361
|
+
}
|
|
24362
|
+
}, views == null ? void 0 : views.indicator))), showLabel && (/*#__PURE__*/React.createElement(View, {
|
|
24363
|
+
position: "absolute",
|
|
24364
|
+
top: 0,
|
|
24365
|
+
left: 0,
|
|
24366
|
+
right: 0,
|
|
24367
|
+
bottom: 0,
|
|
24368
|
+
display: "flex",
|
|
24369
|
+
alignItems: "center",
|
|
24370
|
+
justifyContent: "center",
|
|
24371
|
+
pointerEvents: "none"
|
|
24372
|
+
}, /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
24373
|
+
color: labelColor,
|
|
24374
|
+
fontSize: circleSize * 0.2 + "px",
|
|
24375
|
+
fontWeight: "bold"
|
|
24376
|
+
}, views == null ? void 0 : views.text), Math.round(percentage), "%"))));
|
|
24377
|
+
}
|
|
24378
|
+
// Linear Progress Bar
|
|
24379
|
+
var linearHeight = height || 8;
|
|
24335
24380
|
return /*#__PURE__*/React.createElement(View, Object.assign({
|
|
24336
24381
|
role: "progressbar",
|
|
24337
24382
|
"aria-valuenow": value,
|
|
24338
24383
|
"aria-valuemin": 0,
|
|
24339
24384
|
"aria-valuemax": max,
|
|
24340
24385
|
width: "100%",
|
|
24341
|
-
height:
|
|
24386
|
+
height: linearHeight,
|
|
24342
24387
|
backgroundColor: trackColor,
|
|
24343
24388
|
borderRadius: radius,
|
|
24344
24389
|
overflow: "hidden"
|
|
@@ -24346,12 +24391,16 @@ var ProgressBarView = _ref => {
|
|
|
24346
24391
|
width: percentage + "%",
|
|
24347
24392
|
height: "100%",
|
|
24348
24393
|
backgroundColor: barColor,
|
|
24349
|
-
borderRadius: radius
|
|
24394
|
+
borderRadius: radius,
|
|
24395
|
+
style: {
|
|
24396
|
+
transition: animated ? "width " + animationDuration + " ease-in-out" : 'none'
|
|
24397
|
+
}
|
|
24350
24398
|
}, views == null ? void 0 : views.bar)));
|
|
24351
24399
|
};
|
|
24352
24400
|
|
|
24353
24401
|
/**
|
|
24354
24402
|
* ProgressBar component displays completion status of a task or process.
|
|
24403
|
+
* Supports both linear and circular shapes.
|
|
24355
24404
|
*/
|
|
24356
24405
|
var ProgressBarComponent = props => (/*#__PURE__*/React.createElement(ProgressBarView, Object.assign({}, props)));
|
|
24357
24406
|
var ProgressBar = ProgressBarComponent;
|
|
@@ -27401,16 +27450,10 @@ var BackgroundImageStyles = {
|
|
|
27401
27450
|
backgroundRepeat: 'no-repeat',
|
|
27402
27451
|
backgroundAttachment: 'scroll'
|
|
27403
27452
|
},
|
|
27404
|
-
overlay: {
|
|
27405
|
-
position: 'absolute',
|
|
27406
|
-
top: 0,
|
|
27407
|
-
left: 0,
|
|
27408
|
-
width: '100%',
|
|
27409
|
-
height: '100%',
|
|
27410
|
-
pointerEvents: 'none'
|
|
27411
|
-
},
|
|
27412
27453
|
content: {
|
|
27413
27454
|
position: 'relative',
|
|
27455
|
+
width: '100%',
|
|
27456
|
+
height: '100%',
|
|
27414
27457
|
zIndex: 2
|
|
27415
27458
|
}
|
|
27416
27459
|
};
|
|
@@ -27434,14 +27477,6 @@ var BackgroundVideoStyles = {
|
|
|
27434
27477
|
height: '100%',
|
|
27435
27478
|
objectFit: 'cover'
|
|
27436
27479
|
},
|
|
27437
|
-
overlay: {
|
|
27438
|
-
position: 'absolute',
|
|
27439
|
-
top: 0,
|
|
27440
|
-
left: 0,
|
|
27441
|
-
width: '100%',
|
|
27442
|
-
height: '100%',
|
|
27443
|
-
pointerEvents: 'none'
|
|
27444
|
-
},
|
|
27445
27480
|
content: {
|
|
27446
27481
|
position: 'relative',
|
|
27447
27482
|
zIndex: 2
|
|
@@ -27710,7 +27745,8 @@ var _excluded$1o = ["children", "showRadialGradient", "views", "themeMode"],
|
|
|
27710
27745
|
_excluded7$1 = ["children", "src", "backgroundSize", "backgroundPosition", "backgroundRepeat", "backgroundAttachment", "imageOpacity", "overlay", "blendMode", "views", "themeMode"],
|
|
27711
27746
|
_excluded8$1 = ["children", "src", "autoPlay", "loop", "muted", "playsInline", "overlay", "blendMode", "views", "themeMode"],
|
|
27712
27747
|
_excluded9$1 = ["children"],
|
|
27713
|
-
_excluded10$1 = ["
|
|
27748
|
+
_excluded10$1 = ["contentPosition"],
|
|
27749
|
+
_excluded11$1 = ["children", "views"];
|
|
27714
27750
|
// Background Context
|
|
27715
27751
|
var BackgroundContext = /*#__PURE__*/createContext({});
|
|
27716
27752
|
/**
|
|
@@ -28104,15 +28140,11 @@ var BackgroundImage = _ref7 => {
|
|
|
28104
28140
|
backgroundRepeat = 'no-repeat',
|
|
28105
28141
|
backgroundAttachment = 'scroll',
|
|
28106
28142
|
imageOpacity = 1,
|
|
28107
|
-
overlay,
|
|
28143
|
+
overlay = null,
|
|
28108
28144
|
blendMode = 'normal',
|
|
28109
|
-
views
|
|
28110
|
-
themeMode: elementMode
|
|
28145
|
+
views
|
|
28111
28146
|
} = _ref7,
|
|
28112
28147
|
props = _objectWithoutPropertiesLoose(_ref7, _excluded7$1);
|
|
28113
|
-
var {
|
|
28114
|
-
getColor
|
|
28115
|
-
} = useTheme();
|
|
28116
28148
|
var imageStyle = Object.assign({}, BackgroundImageStyles.image, {
|
|
28117
28149
|
backgroundImage: "url(" + src + ")",
|
|
28118
28150
|
backgroundSize,
|
|
@@ -28121,17 +28153,9 @@ var BackgroundImage = _ref7 => {
|
|
|
28121
28153
|
backgroundAttachment,
|
|
28122
28154
|
opacity: imageOpacity
|
|
28123
28155
|
});
|
|
28124
|
-
var overlayStyle = overlay ? Object.assign({}, BackgroundImageStyles.overlay, {
|
|
28125
|
-
backgroundColor: getColor(overlay, elementMode ? {
|
|
28126
|
-
themeMode: elementMode
|
|
28127
|
-
} : undefined),
|
|
28128
|
-
mixBlendMode: blendMode
|
|
28129
|
-
}) : {};
|
|
28130
28156
|
return /*#__PURE__*/React.createElement(View, Object.assign({}, BackgroundImageStyles.container, views == null ? void 0 : views.container, props), /*#__PURE__*/React.createElement(View, Object.assign({
|
|
28131
28157
|
style: imageStyle
|
|
28132
|
-
}, views == null ? void 0 : views.image)), overlay && /*#__PURE__*/React.createElement(View, {
|
|
28133
|
-
style: overlayStyle
|
|
28134
|
-
}), children && (/*#__PURE__*/React.createElement(View, Object.assign({}, BackgroundImageStyles.content, views == null ? void 0 : views.content), children)));
|
|
28158
|
+
}, views == null ? void 0 : views.image)), overlay, children && (/*#__PURE__*/React.createElement(View, Object.assign({}, BackgroundImageStyles.content, views == null ? void 0 : views.content), children)));
|
|
28135
28159
|
};
|
|
28136
28160
|
/**
|
|
28137
28161
|
* Background Video Component
|
|
@@ -28144,21 +28168,11 @@ var BackgroundVideo = _ref8 => {
|
|
|
28144
28168
|
loop = true,
|
|
28145
28169
|
muted = true,
|
|
28146
28170
|
playsInline = true,
|
|
28147
|
-
overlay,
|
|
28171
|
+
overlay = null,
|
|
28148
28172
|
blendMode = 'normal',
|
|
28149
|
-
views
|
|
28150
|
-
themeMode: elementMode
|
|
28173
|
+
views
|
|
28151
28174
|
} = _ref8,
|
|
28152
28175
|
props = _objectWithoutPropertiesLoose(_ref8, _excluded8$1);
|
|
28153
|
-
var {
|
|
28154
|
-
getColor
|
|
28155
|
-
} = useTheme();
|
|
28156
|
-
var overlayStyle = overlay ? Object.assign({}, BackgroundVideoStyles.overlay, {
|
|
28157
|
-
backgroundColor: getColor(overlay, elementMode ? {
|
|
28158
|
-
themeMode: elementMode
|
|
28159
|
-
} : undefined),
|
|
28160
|
-
mixBlendMode: blendMode
|
|
28161
|
-
}) : {};
|
|
28162
28176
|
return /*#__PURE__*/React.createElement(View, Object.assign({}, BackgroundVideoStyles.container, views == null ? void 0 : views.container, props), /*#__PURE__*/React.createElement(View, Object.assign({
|
|
28163
28177
|
as: "video",
|
|
28164
28178
|
src: src,
|
|
@@ -28167,9 +28181,7 @@ var BackgroundVideo = _ref8 => {
|
|
|
28167
28181
|
muted: muted,
|
|
28168
28182
|
playsInline: playsInline,
|
|
28169
28183
|
style: BackgroundVideoStyles.video
|
|
28170
|
-
}, views == null ? void 0 : views.video)), overlay && /*#__PURE__*/React.createElement(View, Object.assign({
|
|
28171
|
-
style: overlayStyle
|
|
28172
|
-
}, views == null ? void 0 : views.overlay)), children && (/*#__PURE__*/React.createElement(View, Object.assign({}, BackgroundVideoStyles.content, views == null ? void 0 : views.content), children)));
|
|
28184
|
+
}, views == null ? void 0 : views.video)), overlay, children && (/*#__PURE__*/React.createElement(View, Object.assign({}, BackgroundVideoStyles.content, views == null ? void 0 : views.content), children)));
|
|
28173
28185
|
};
|
|
28174
28186
|
/**
|
|
28175
28187
|
* Background Gradient Component
|
|
@@ -28182,12 +28194,48 @@ var BackgroundGradient = _ref9 => {
|
|
|
28182
28194
|
gradientProps = _objectWithoutPropertiesLoose(_ref9, _excluded9$1);
|
|
28183
28195
|
return /*#__PURE__*/React.createElement(Gradient, Object.assign({}, gradientProps), children);
|
|
28184
28196
|
};
|
|
28185
|
-
|
|
28197
|
+
/**
|
|
28198
|
+
* Background Overlay Component
|
|
28199
|
+
*/
|
|
28200
|
+
var BackgroundOverlay = _ref10 => {
|
|
28186
28201
|
var {
|
|
28187
|
-
|
|
28188
|
-
views
|
|
28202
|
+
contentPosition
|
|
28189
28203
|
} = _ref10,
|
|
28190
28204
|
props = _objectWithoutPropertiesLoose(_ref10, _excluded10$1);
|
|
28205
|
+
var getDefaultOverlay = () => {
|
|
28206
|
+
switch (contentPosition) {
|
|
28207
|
+
case 'left':
|
|
28208
|
+
return 'radial-gradient(circle at 70% 50%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%), linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.2) 100%)';
|
|
28209
|
+
case 'right':
|
|
28210
|
+
return 'radial-gradient(circle at 30% 50%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%), linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.2) 100%)';
|
|
28211
|
+
case 'top':
|
|
28212
|
+
return 'radial-gradient(circle at 50% 80%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%), linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.1) 100%)';
|
|
28213
|
+
case 'bottom':
|
|
28214
|
+
return 'radial-gradient(circle at 50% 80%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%), linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.1) 100%)';
|
|
28215
|
+
case 'center':
|
|
28216
|
+
return 'radial-gradient(circle at 50% 90%, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%)';
|
|
28217
|
+
default:
|
|
28218
|
+
return 'rgba(0,0,0,0.5)';
|
|
28219
|
+
}
|
|
28220
|
+
};
|
|
28221
|
+
var background = getDefaultOverlay();
|
|
28222
|
+
return /*#__PURE__*/React.createElement(View, Object.assign({
|
|
28223
|
+
position: "absolute",
|
|
28224
|
+
top: 0,
|
|
28225
|
+
left: 0,
|
|
28226
|
+
width: "100%",
|
|
28227
|
+
height: "100%",
|
|
28228
|
+
background: background,
|
|
28229
|
+
pointerEvents: "none",
|
|
28230
|
+
zIndex: 1
|
|
28231
|
+
}, props));
|
|
28232
|
+
};
|
|
28233
|
+
var BackgroundViewBase = _ref11 => {
|
|
28234
|
+
var {
|
|
28235
|
+
children,
|
|
28236
|
+
views
|
|
28237
|
+
} = _ref11,
|
|
28238
|
+
props = _objectWithoutPropertiesLoose(_ref11, _excluded11$1);
|
|
28191
28239
|
return /*#__PURE__*/React.createElement(BackgroundContext.Provider, {
|
|
28192
28240
|
value: {}
|
|
28193
28241
|
}, /*#__PURE__*/React.createElement(View, Object.assign({}, DefaultBackgroundStyles.container, views == null ? void 0 : views.container, props), children));
|
|
@@ -28204,6 +28252,7 @@ BackgroundView.Ripples = Ripples;
|
|
|
28204
28252
|
BackgroundView.Image = BackgroundImage;
|
|
28205
28253
|
BackgroundView.Video = BackgroundVideo;
|
|
28206
28254
|
BackgroundView.Gradient = BackgroundGradient;
|
|
28255
|
+
BackgroundView.Overlay = BackgroundOverlay;
|
|
28207
28256
|
|
|
28208
28257
|
/**
|
|
28209
28258
|
* Background Component with compound pattern
|
|
@@ -28265,7 +28314,8 @@ var Background = /*#__PURE__*/Object.assign(BackgroundComponent, {
|
|
|
28265
28314
|
Ripples: BackgroundView.Ripples,
|
|
28266
28315
|
Image: BackgroundView.Image,
|
|
28267
28316
|
Video: BackgroundView.Video,
|
|
28268
|
-
Gradient: BackgroundView.Gradient
|
|
28317
|
+
Gradient: BackgroundView.Gradient,
|
|
28318
|
+
Overlay: BackgroundView.Overlay
|
|
28269
28319
|
});
|
|
28270
28320
|
Background.displayName = 'Background';
|
|
28271
28321
|
|