@app-studio/web 0.9.56 → 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 +153 -108
- 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 +153 -108
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +157 -111
- 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/Center.mdx +2 -2
- package/docs/components/ChatInput.mdx +133 -0
- package/docs/components/Vertical.mdx +1 -1
- package/package.json +3 -2
|
@@ -40,7 +40,6 @@ require('core-js/modules/es.regexp.constructor.js');
|
|
|
40
40
|
require('core-js/modules/es.regexp.exec.js');
|
|
41
41
|
var formik = require('formik');
|
|
42
42
|
require('core-js/modules/es.string.replace.js');
|
|
43
|
-
var api = require('src/services/api');
|
|
44
43
|
require('core-js/modules/es.promise.finally.js');
|
|
45
44
|
require('core-js/modules/es.string.match.js');
|
|
46
45
|
require('core-js/modules/es.string.search.js');
|
|
@@ -8847,7 +8846,7 @@ var Item = _ref => {
|
|
|
8847
8846
|
fontSize: appStudio.Typography.fontSizes[size],
|
|
8848
8847
|
fontWeight: "400" // Regular weight
|
|
8849
8848
|
,
|
|
8850
|
-
lineHeight: "
|
|
8849
|
+
lineHeight: "15px"
|
|
8851
8850
|
}, style), option.label));
|
|
8852
8851
|
};
|
|
8853
8852
|
/**
|
|
@@ -10366,7 +10365,7 @@ var CheckboxView = _ref => {
|
|
|
10366
10365
|
size: "sm",
|
|
10367
10366
|
fontWeight: "400" // Regular weight
|
|
10368
10367
|
,
|
|
10369
|
-
lineHeight: "
|
|
10368
|
+
lineHeight: "15"
|
|
10370
10369
|
}, views == null ? void 0 : views.infoText), infoText))), error && (/*#__PURE__*/React__default.createElement(appStudio.Text, {
|
|
10371
10370
|
size: "xs",
|
|
10372
10371
|
marginTop: 4,
|
|
@@ -13987,7 +13986,6 @@ var OTPInputView = _ref => {
|
|
|
13987
13986
|
border: '0 solid transparent',
|
|
13988
13987
|
outline: '0 solid transparent',
|
|
13989
13988
|
boxShadow: 'none',
|
|
13990
|
-
lineHeight: '1',
|
|
13991
13989
|
letterSpacing: '-.5em',
|
|
13992
13990
|
fontSize: 'var(--root-height)',
|
|
13993
13991
|
fontFamily: 'monospace',
|
|
@@ -14278,7 +14276,11 @@ var useChatInputState = props => {
|
|
|
14278
14276
|
disabled = false,
|
|
14279
14277
|
isAgentRunning = false,
|
|
14280
14278
|
onStopAgent,
|
|
14281
|
-
sandboxId
|
|
14279
|
+
sandboxId,
|
|
14280
|
+
onUploadProgress,
|
|
14281
|
+
onUploadSuccess,
|
|
14282
|
+
onUploadError,
|
|
14283
|
+
onFileUpload
|
|
14282
14284
|
} = props;
|
|
14283
14285
|
// Determine if the component is controlled
|
|
14284
14286
|
var isControlled = controlledValue !== undefined && controlledOnChange !== undefined;
|
|
@@ -14394,28 +14396,6 @@ var useChatInputState = props => {
|
|
|
14394
14396
|
e.stopPropagation();
|
|
14395
14397
|
setIsDraggingOver(false);
|
|
14396
14398
|
};
|
|
14397
|
-
// Upload service hook (single file at a time)
|
|
14398
|
-
var uploadFileRequest = api.UploadService.useUploadControllerFileService({
|
|
14399
|
-
onProgress: p => setUploadProgress(p || 0),
|
|
14400
|
-
onSuccess: () => {
|
|
14401
|
-
// Advance the queue
|
|
14402
|
-
setUploadQueue(prev => prev.slice(1));
|
|
14403
|
-
setIsProcessingQueue(false);
|
|
14404
|
-
currentUploadRef.current = null;
|
|
14405
|
-
setUploadProgress(0);
|
|
14406
|
-
// If queue emptied, stop uploading state
|
|
14407
|
-
setIsUploading(prev => uploadQueue.length - 1 > 0 || false);
|
|
14408
|
-
},
|
|
14409
|
-
onError: _err => {
|
|
14410
|
-
// Remove the failed file from queue and continue
|
|
14411
|
-
setUploadQueue(prev => prev.slice(1));
|
|
14412
|
-
setIsProcessingQueue(false);
|
|
14413
|
-
currentUploadRef.current = null;
|
|
14414
|
-
setUploadProgress(0);
|
|
14415
|
-
// If queue emptied, stop uploading state
|
|
14416
|
-
setIsUploading(prev => uploadQueue.length - 1 > 0 || false);
|
|
14417
|
-
}
|
|
14418
|
-
});
|
|
14419
14399
|
// Start uploading a batch of files (enqueue and process)
|
|
14420
14400
|
var startUpload = React.useCallback(files => {
|
|
14421
14401
|
if (!files || files.length === 0) return;
|
|
@@ -14428,25 +14408,33 @@ var useChatInputState = props => {
|
|
|
14428
14408
|
}, [setPendingFiles, setUploadedFiles]);
|
|
14429
14409
|
// Process upload queue sequentially
|
|
14430
14410
|
var processUploadQueue = React.useCallback(() => {
|
|
14431
|
-
if (uploadQueue.length > 0 && !isProcessingQueue &&
|
|
14411
|
+
if (uploadQueue.length > 0 && !isProcessingQueue && onFileUpload) {
|
|
14432
14412
|
setIsProcessingQueue(true);
|
|
14433
14413
|
var nextFile = uploadQueue[0];
|
|
14434
14414
|
currentUploadRef.current = nextFile;
|
|
14435
14415
|
setUploadProgress(0);
|
|
14436
|
-
//
|
|
14437
|
-
|
|
14438
|
-
|
|
14439
|
-
})
|
|
14416
|
+
// Execute user-provided upload function
|
|
14417
|
+
try {
|
|
14418
|
+
onFileUpload(nextFile);
|
|
14419
|
+
} catch (err) {
|
|
14420
|
+
// Handle synchronous errors
|
|
14421
|
+
setUploadQueue(prev => prev.slice(1));
|
|
14422
|
+
setIsProcessingQueue(false);
|
|
14423
|
+
currentUploadRef.current = null;
|
|
14424
|
+
setUploadProgress(0);
|
|
14425
|
+
setIsUploading(prev => uploadQueue.length - 1 > 0 || false);
|
|
14426
|
+
onUploadError == null || onUploadError(err);
|
|
14427
|
+
}
|
|
14440
14428
|
} else if (uploadQueue.length === 0 && isUploading) {
|
|
14441
14429
|
// Nothing left to upload
|
|
14442
14430
|
setIsUploading(false);
|
|
14443
14431
|
setUploadProgress(0);
|
|
14444
14432
|
}
|
|
14445
|
-
}, [uploadQueue, isProcessingQueue,
|
|
14446
|
-
// Effect: process whenever queue
|
|
14433
|
+
}, [uploadQueue, isProcessingQueue, onFileUpload, isUploading, onUploadError]);
|
|
14434
|
+
// Effect: process whenever queue changes
|
|
14447
14435
|
React.useEffect(() => {
|
|
14448
14436
|
processUploadQueue();
|
|
14449
|
-
}, [uploadQueue, isProcessingQueue,
|
|
14437
|
+
}, [uploadQueue, isProcessingQueue, processUploadQueue]);
|
|
14450
14438
|
// Mock function for subscription status
|
|
14451
14439
|
var subscriptionStatus = 'active';
|
|
14452
14440
|
// Mock function to check if user can access a model
|
|
@@ -14585,7 +14573,7 @@ var DefaultAgentChatStyles = {
|
|
|
14585
14573
|
marginBottom: '4px'
|
|
14586
14574
|
},
|
|
14587
14575
|
messageContent: {
|
|
14588
|
-
lineHeight:
|
|
14576
|
+
lineHeight: 15
|
|
14589
14577
|
},
|
|
14590
14578
|
messageFooter: {
|
|
14591
14579
|
marginTop: '8px'
|
|
@@ -14757,7 +14745,7 @@ var DefaultChatInputStyles = {
|
|
|
14757
14745
|
maxHeight: '200px',
|
|
14758
14746
|
padding: '8px 12px',
|
|
14759
14747
|
fontSize: '14px',
|
|
14760
|
-
lineHeight: '
|
|
14748
|
+
lineHeight: '15px',
|
|
14761
14749
|
color: 'color.gray.900',
|
|
14762
14750
|
backgroundColor: 'color.white',
|
|
14763
14751
|
border: 'none',
|
|
@@ -15589,7 +15577,6 @@ var EditableInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
15589
15577
|
color: "color.gray.400",
|
|
15590
15578
|
pointerEvents: "none",
|
|
15591
15579
|
fontSize: "14px",
|
|
15592
|
-
lineHeight: "1.5",
|
|
15593
15580
|
zIndex: 1
|
|
15594
15581
|
}, views == null ? void 0 : views.placeholder), placeholder)), /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
15595
15582
|
as: "div",
|
|
@@ -15610,7 +15597,6 @@ var EditableInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
15610
15597
|
whiteSpace: "pre-wrap",
|
|
15611
15598
|
wordBreak: "break-word",
|
|
15612
15599
|
fontSize: "14px",
|
|
15613
|
-
lineHeight: "1.5",
|
|
15614
15600
|
color: "color.gray.900",
|
|
15615
15601
|
backgroundColor: "transparent"
|
|
15616
15602
|
}, views == null ? void 0 : views.input))), showMentions && filteredMentions.length > 0 && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
@@ -16955,11 +16941,6 @@ var OTPInputComponent$1 = props => {
|
|
|
16955
16941
|
var FormikOTPInput = OTPInputComponent$1;
|
|
16956
16942
|
|
|
16957
16943
|
var _excluded$T = ["name", "uploadFile", "onUploadSuccess", "onUploadError", "transformResponse", "onMultipleFileSelect", "onFileSelect", "multiple"];
|
|
16958
|
-
var defaultUploadFile = (file, onProgress) => {
|
|
16959
|
-
return api.UploadService.uploadControllerFile({
|
|
16960
|
-
file
|
|
16961
|
-
}, onProgress);
|
|
16962
|
-
};
|
|
16963
16944
|
var toArrayValue = value => {
|
|
16964
16945
|
if (Array.isArray(value)) {
|
|
16965
16946
|
return value;
|
|
@@ -16972,7 +16953,7 @@ var toArrayValue = value => {
|
|
|
16972
16953
|
var FormikUploader = _ref => {
|
|
16973
16954
|
var {
|
|
16974
16955
|
name,
|
|
16975
|
-
uploadFile
|
|
16956
|
+
uploadFile,
|
|
16976
16957
|
onUploadSuccess,
|
|
16977
16958
|
onUploadError,
|
|
16978
16959
|
transformResponse,
|
|
@@ -19512,7 +19493,7 @@ var SlideEffect = _ref => {
|
|
|
19512
19493
|
})));
|
|
19513
19494
|
};
|
|
19514
19495
|
|
|
19515
|
-
var _excluded$$ = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "responsive", "
|
|
19496
|
+
var _excluded$$ = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "responsive", "views", "highlightAnimate", "animate", "animationLoop", "highlightAnimationLoop", "highlightTypewriter", "highlightTypewriterDuration", "highlightSlide", "highlightSlideDuration", "highlightSlideStagger", "highlightSlideSequential"];
|
|
19516
19497
|
function escapeRegExp(string) {
|
|
19517
19498
|
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
19518
19499
|
}
|
|
@@ -19525,7 +19506,6 @@ var TitleView = _ref => {
|
|
|
19525
19506
|
highlightSecondaryColor,
|
|
19526
19507
|
size = 'lg',
|
|
19527
19508
|
responsive = true,
|
|
19528
|
-
centered = false,
|
|
19529
19509
|
views,
|
|
19530
19510
|
highlightAnimate,
|
|
19531
19511
|
animate,
|
|
@@ -19640,7 +19620,6 @@ var TitleView = _ref => {
|
|
|
19640
19620
|
fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
|
|
19641
19621
|
letterSpacing: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.letterSpacing : undefined,
|
|
19642
19622
|
marginBottom: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.marginBottom : undefined,
|
|
19643
|
-
textAlign: centered ? 'center' : 'left',
|
|
19644
19623
|
animate: inView ? controlledAnimate : undefined,
|
|
19645
19624
|
media: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.media : undefined
|
|
19646
19625
|
}, views == null ? void 0 : views.container, props), parts.map((part, idx) => typeof part === 'string' ? part : (/*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
|
|
@@ -19674,7 +19653,6 @@ var TitleView = _ref => {
|
|
|
19674
19653
|
fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
|
|
19675
19654
|
letterSpacing: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.letterSpacing : undefined,
|
|
19676
19655
|
marginBottom: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.marginBottom : undefined,
|
|
19677
|
-
textAlign: centered ? 'center' : 'left',
|
|
19678
19656
|
animate: inView ? controlledAnimate : undefined,
|
|
19679
19657
|
media: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.media : undefined
|
|
19680
19658
|
}, views == null ? void 0 : views.container, props), /*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
|
|
@@ -19706,7 +19684,6 @@ var TitleView = _ref => {
|
|
|
19706
19684
|
fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
|
|
19707
19685
|
letterSpacing: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.letterSpacing : undefined,
|
|
19708
19686
|
marginBottom: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.marginBottom : undefined,
|
|
19709
|
-
textAlign: centered ? 'center' : 'left',
|
|
19710
19687
|
animate: inView ? controlledAnimate : undefined,
|
|
19711
19688
|
media: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.media : undefined
|
|
19712
19689
|
}, views == null ? void 0 : views.container, props), text);
|
|
@@ -24317,15 +24294,22 @@ var PaginationComponent = _ref => {
|
|
|
24317
24294
|
};
|
|
24318
24295
|
var Pagination = PaginationComponent;
|
|
24319
24296
|
|
|
24320
|
-
var _excluded$1a = ["value", "max", "color", "backgroundColor", "height", "radius", "views", "themeMode"];
|
|
24297
|
+
var _excluded$1a = ["shape", "value", "max", "color", "backgroundColor", "height", "size", "radius", "strokeWidth", "showLabel", "labelColor", "animated", "animationDuration", "views", "themeMode"];
|
|
24321
24298
|
var ProgressBarView = _ref => {
|
|
24322
24299
|
var {
|
|
24300
|
+
shape = 'linear',
|
|
24323
24301
|
value = 0,
|
|
24324
24302
|
max = 100,
|
|
24325
24303
|
color = 'theme.primary',
|
|
24326
24304
|
backgroundColor = 'color.gray.200',
|
|
24327
|
-
height
|
|
24305
|
+
height,
|
|
24306
|
+
size,
|
|
24328
24307
|
radius = 4,
|
|
24308
|
+
strokeWidth = 10,
|
|
24309
|
+
showLabel = false,
|
|
24310
|
+
labelColor = 'theme.text.primary',
|
|
24311
|
+
animated = true,
|
|
24312
|
+
animationDuration = '0.5s',
|
|
24329
24313
|
views,
|
|
24330
24314
|
themeMode: elementMode
|
|
24331
24315
|
} = _ref,
|
|
@@ -24335,20 +24319,78 @@ var ProgressBarView = _ref => {
|
|
|
24335
24319
|
themeMode
|
|
24336
24320
|
} = appStudio.useTheme();
|
|
24337
24321
|
var currentMode = elementMode ? elementMode : themeMode;
|
|
24338
|
-
var
|
|
24322
|
+
var validValue = Math.min(max, Math.max(0, value));
|
|
24323
|
+
var percentage = validValue / max * 100;
|
|
24339
24324
|
var trackColor = getColor(backgroundColor, {
|
|
24340
24325
|
themeMode: currentMode
|
|
24341
24326
|
});
|
|
24342
24327
|
var barColor = getColor(color, {
|
|
24343
24328
|
themeMode: currentMode
|
|
24344
24329
|
});
|
|
24330
|
+
if (shape === 'circle') {
|
|
24331
|
+
var circleSize = size || (typeof height === 'number' ? height : 100);
|
|
24332
|
+
var radiusCalc = (circleSize - strokeWidth) / 2;
|
|
24333
|
+
var circumference = 2 * Math.PI * radiusCalc;
|
|
24334
|
+
var offset = circumference - percentage / 100 * circumference;
|
|
24335
|
+
return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
24336
|
+
width: circleSize,
|
|
24337
|
+
height: circleSize,
|
|
24338
|
+
position: "relative",
|
|
24339
|
+
display: "flex",
|
|
24340
|
+
alignItems: "center",
|
|
24341
|
+
justifyContent: "center"
|
|
24342
|
+
}, views == null ? void 0 : views.container, props), /*#__PURE__*/React__default.createElement("svg", {
|
|
24343
|
+
width: circleSize,
|
|
24344
|
+
height: circleSize,
|
|
24345
|
+
viewBox: "0 0 " + circleSize + " " + circleSize,
|
|
24346
|
+
style: {
|
|
24347
|
+
transform: 'rotate(-90deg)'
|
|
24348
|
+
}
|
|
24349
|
+
}, /*#__PURE__*/React__default.createElement("circle", Object.assign({
|
|
24350
|
+
cx: circleSize / 2,
|
|
24351
|
+
cy: circleSize / 2,
|
|
24352
|
+
r: radiusCalc,
|
|
24353
|
+
stroke: trackColor,
|
|
24354
|
+
strokeWidth: strokeWidth,
|
|
24355
|
+
fill: "transparent"
|
|
24356
|
+
}, views == null ? void 0 : views.track)), /*#__PURE__*/React__default.createElement("circle", Object.assign({
|
|
24357
|
+
cx: circleSize / 2,
|
|
24358
|
+
cy: circleSize / 2,
|
|
24359
|
+
r: radiusCalc,
|
|
24360
|
+
stroke: barColor,
|
|
24361
|
+
strokeWidth: strokeWidth,
|
|
24362
|
+
strokeDasharray: circumference,
|
|
24363
|
+
strokeDashoffset: offset,
|
|
24364
|
+
strokeLinecap: "round",
|
|
24365
|
+
fill: "transparent",
|
|
24366
|
+
style: {
|
|
24367
|
+
transition: animated ? "stroke-dashoffset " + animationDuration + " ease-in-out" : 'none'
|
|
24368
|
+
}
|
|
24369
|
+
}, views == null ? void 0 : views.indicator))), showLabel && (/*#__PURE__*/React__default.createElement(appStudio.View, {
|
|
24370
|
+
position: "absolute",
|
|
24371
|
+
top: 0,
|
|
24372
|
+
left: 0,
|
|
24373
|
+
right: 0,
|
|
24374
|
+
bottom: 0,
|
|
24375
|
+
display: "flex",
|
|
24376
|
+
alignItems: "center",
|
|
24377
|
+
justifyContent: "center",
|
|
24378
|
+
pointerEvents: "none"
|
|
24379
|
+
}, /*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
|
|
24380
|
+
color: labelColor,
|
|
24381
|
+
fontSize: circleSize * 0.2 + "px",
|
|
24382
|
+
fontWeight: "bold"
|
|
24383
|
+
}, views == null ? void 0 : views.text), Math.round(percentage), "%"))));
|
|
24384
|
+
}
|
|
24385
|
+
// Linear Progress Bar
|
|
24386
|
+
var linearHeight = height || 8;
|
|
24345
24387
|
return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
24346
24388
|
role: "progressbar",
|
|
24347
24389
|
"aria-valuenow": value,
|
|
24348
24390
|
"aria-valuemin": 0,
|
|
24349
24391
|
"aria-valuemax": max,
|
|
24350
24392
|
width: "100%",
|
|
24351
|
-
height:
|
|
24393
|
+
height: linearHeight,
|
|
24352
24394
|
backgroundColor: trackColor,
|
|
24353
24395
|
borderRadius: radius,
|
|
24354
24396
|
overflow: "hidden"
|
|
@@ -24356,12 +24398,16 @@ var ProgressBarView = _ref => {
|
|
|
24356
24398
|
width: percentage + "%",
|
|
24357
24399
|
height: "100%",
|
|
24358
24400
|
backgroundColor: barColor,
|
|
24359
|
-
borderRadius: radius
|
|
24401
|
+
borderRadius: radius,
|
|
24402
|
+
style: {
|
|
24403
|
+
transition: animated ? "width " + animationDuration + " ease-in-out" : 'none'
|
|
24404
|
+
}
|
|
24360
24405
|
}, views == null ? void 0 : views.bar)));
|
|
24361
24406
|
};
|
|
24362
24407
|
|
|
24363
24408
|
/**
|
|
24364
24409
|
* ProgressBar component displays completion status of a task or process.
|
|
24410
|
+
* Supports both linear and circular shapes.
|
|
24365
24411
|
*/
|
|
24366
24412
|
var ProgressBarComponent = props => (/*#__PURE__*/React__default.createElement(ProgressBarView, Object.assign({}, props)));
|
|
24367
24413
|
var ProgressBar = ProgressBarComponent;
|
|
@@ -26173,14 +26219,12 @@ var ToastView = _ref => {
|
|
|
26173
26219
|
fontWeight: "600" // Semi-bold for better readability
|
|
26174
26220
|
,
|
|
26175
26221
|
color: Theme[variant].content.color,
|
|
26176
|
-
lineHeight: "1.4",
|
|
26177
26222
|
bgColor: Theme[variant].container.backgroundColor
|
|
26178
26223
|
}, views == null ? void 0 : views.title), title), description && (/*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
|
|
26179
26224
|
size: "sm",
|
|
26180
26225
|
color: Theme[variant].content.color,
|
|
26181
26226
|
fontWeight: "400" // Regular weight
|
|
26182
26227
|
,
|
|
26183
|
-
lineHeight: "1.5",
|
|
26184
26228
|
bgColor: Theme[variant].container.backgroundColor
|
|
26185
26229
|
}, views == null ? void 0 : views.description), description)), action && actionText && (/*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
|
|
26186
26230
|
size: "sm",
|
|
@@ -27413,16 +27457,10 @@ var BackgroundImageStyles = {
|
|
|
27413
27457
|
backgroundRepeat: 'no-repeat',
|
|
27414
27458
|
backgroundAttachment: 'scroll'
|
|
27415
27459
|
},
|
|
27416
|
-
overlay: {
|
|
27417
|
-
position: 'absolute',
|
|
27418
|
-
top: 0,
|
|
27419
|
-
left: 0,
|
|
27420
|
-
width: '100%',
|
|
27421
|
-
height: '100%',
|
|
27422
|
-
pointerEvents: 'none'
|
|
27423
|
-
},
|
|
27424
27460
|
content: {
|
|
27425
27461
|
position: 'relative',
|
|
27462
|
+
width: '100%',
|
|
27463
|
+
height: '100%',
|
|
27426
27464
|
zIndex: 2
|
|
27427
27465
|
}
|
|
27428
27466
|
};
|
|
@@ -27446,14 +27484,6 @@ var BackgroundVideoStyles = {
|
|
|
27446
27484
|
height: '100%',
|
|
27447
27485
|
objectFit: 'cover'
|
|
27448
27486
|
},
|
|
27449
|
-
overlay: {
|
|
27450
|
-
position: 'absolute',
|
|
27451
|
-
top: 0,
|
|
27452
|
-
left: 0,
|
|
27453
|
-
width: '100%',
|
|
27454
|
-
height: '100%',
|
|
27455
|
-
pointerEvents: 'none'
|
|
27456
|
-
},
|
|
27457
27487
|
content: {
|
|
27458
27488
|
position: 'relative',
|
|
27459
27489
|
zIndex: 2
|
|
@@ -27722,7 +27752,8 @@ var _excluded$1o = ["children", "showRadialGradient", "views", "themeMode"],
|
|
|
27722
27752
|
_excluded7$1 = ["children", "src", "backgroundSize", "backgroundPosition", "backgroundRepeat", "backgroundAttachment", "imageOpacity", "overlay", "blendMode", "views", "themeMode"],
|
|
27723
27753
|
_excluded8$1 = ["children", "src", "autoPlay", "loop", "muted", "playsInline", "overlay", "blendMode", "views", "themeMode"],
|
|
27724
27754
|
_excluded9$1 = ["children"],
|
|
27725
|
-
_excluded10$1 = ["
|
|
27755
|
+
_excluded10$1 = ["contentPosition"],
|
|
27756
|
+
_excluded11$1 = ["children", "views"];
|
|
27726
27757
|
// Background Context
|
|
27727
27758
|
var BackgroundContext = /*#__PURE__*/React.createContext({});
|
|
27728
27759
|
/**
|
|
@@ -28116,15 +28147,11 @@ var BackgroundImage = _ref7 => {
|
|
|
28116
28147
|
backgroundRepeat = 'no-repeat',
|
|
28117
28148
|
backgroundAttachment = 'scroll',
|
|
28118
28149
|
imageOpacity = 1,
|
|
28119
|
-
overlay,
|
|
28150
|
+
overlay = null,
|
|
28120
28151
|
blendMode = 'normal',
|
|
28121
|
-
views
|
|
28122
|
-
themeMode: elementMode
|
|
28152
|
+
views
|
|
28123
28153
|
} = _ref7,
|
|
28124
28154
|
props = _objectWithoutPropertiesLoose(_ref7, _excluded7$1);
|
|
28125
|
-
var {
|
|
28126
|
-
getColor
|
|
28127
|
-
} = appStudio.useTheme();
|
|
28128
28155
|
var imageStyle = Object.assign({}, BackgroundImageStyles.image, {
|
|
28129
28156
|
backgroundImage: "url(" + src + ")",
|
|
28130
28157
|
backgroundSize,
|
|
@@ -28133,17 +28160,9 @@ var BackgroundImage = _ref7 => {
|
|
|
28133
28160
|
backgroundAttachment,
|
|
28134
28161
|
opacity: imageOpacity
|
|
28135
28162
|
});
|
|
28136
|
-
var overlayStyle = overlay ? Object.assign({}, BackgroundImageStyles.overlay, {
|
|
28137
|
-
backgroundColor: getColor(overlay, elementMode ? {
|
|
28138
|
-
themeMode: elementMode
|
|
28139
|
-
} : undefined),
|
|
28140
|
-
mixBlendMode: blendMode
|
|
28141
|
-
}) : {};
|
|
28142
28163
|
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({
|
|
28143
28164
|
style: imageStyle
|
|
28144
|
-
}, views == null ? void 0 : views.image)), overlay && /*#__PURE__*/React__default.createElement(appStudio.View, {
|
|
28145
|
-
style: overlayStyle
|
|
28146
|
-
}), children && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, BackgroundImageStyles.content, views == null ? void 0 : views.content), children)));
|
|
28165
|
+
}, views == null ? void 0 : views.image)), overlay, children && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, BackgroundImageStyles.content, views == null ? void 0 : views.content), children)));
|
|
28147
28166
|
};
|
|
28148
28167
|
/**
|
|
28149
28168
|
* Background Video Component
|
|
@@ -28156,21 +28175,11 @@ var BackgroundVideo = _ref8 => {
|
|
|
28156
28175
|
loop = true,
|
|
28157
28176
|
muted = true,
|
|
28158
28177
|
playsInline = true,
|
|
28159
|
-
overlay,
|
|
28178
|
+
overlay = null,
|
|
28160
28179
|
blendMode = 'normal',
|
|
28161
|
-
views
|
|
28162
|
-
themeMode: elementMode
|
|
28180
|
+
views
|
|
28163
28181
|
} = _ref8,
|
|
28164
28182
|
props = _objectWithoutPropertiesLoose(_ref8, _excluded8$1);
|
|
28165
|
-
var {
|
|
28166
|
-
getColor
|
|
28167
|
-
} = appStudio.useTheme();
|
|
28168
|
-
var overlayStyle = overlay ? Object.assign({}, BackgroundVideoStyles.overlay, {
|
|
28169
|
-
backgroundColor: getColor(overlay, elementMode ? {
|
|
28170
|
-
themeMode: elementMode
|
|
28171
|
-
} : undefined),
|
|
28172
|
-
mixBlendMode: blendMode
|
|
28173
|
-
}) : {};
|
|
28174
28183
|
return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, BackgroundVideoStyles.container, views == null ? void 0 : views.container, props), /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
28175
28184
|
as: "video",
|
|
28176
28185
|
src: src,
|
|
@@ -28179,9 +28188,7 @@ var BackgroundVideo = _ref8 => {
|
|
|
28179
28188
|
muted: muted,
|
|
28180
28189
|
playsInline: playsInline,
|
|
28181
28190
|
style: BackgroundVideoStyles.video
|
|
28182
|
-
}, views == null ? void 0 : views.video)), overlay && /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
28183
|
-
style: overlayStyle
|
|
28184
|
-
}, views == null ? void 0 : views.overlay)), children && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, BackgroundVideoStyles.content, views == null ? void 0 : views.content), children)));
|
|
28191
|
+
}, views == null ? void 0 : views.video)), overlay, children && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, BackgroundVideoStyles.content, views == null ? void 0 : views.content), children)));
|
|
28185
28192
|
};
|
|
28186
28193
|
/**
|
|
28187
28194
|
* Background Gradient Component
|
|
@@ -28194,12 +28201,48 @@ var BackgroundGradient = _ref9 => {
|
|
|
28194
28201
|
gradientProps = _objectWithoutPropertiesLoose(_ref9, _excluded9$1);
|
|
28195
28202
|
return /*#__PURE__*/React__default.createElement(Gradient, Object.assign({}, gradientProps), children);
|
|
28196
28203
|
};
|
|
28197
|
-
|
|
28204
|
+
/**
|
|
28205
|
+
* Background Overlay Component
|
|
28206
|
+
*/
|
|
28207
|
+
var BackgroundOverlay = _ref10 => {
|
|
28198
28208
|
var {
|
|
28199
|
-
|
|
28200
|
-
views
|
|
28209
|
+
contentPosition
|
|
28201
28210
|
} = _ref10,
|
|
28202
28211
|
props = _objectWithoutPropertiesLoose(_ref10, _excluded10$1);
|
|
28212
|
+
var getDefaultOverlay = () => {
|
|
28213
|
+
switch (contentPosition) {
|
|
28214
|
+
case 'left':
|
|
28215
|
+
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%)';
|
|
28216
|
+
case 'right':
|
|
28217
|
+
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%)';
|
|
28218
|
+
case 'top':
|
|
28219
|
+
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%)';
|
|
28220
|
+
case 'bottom':
|
|
28221
|
+
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%)';
|
|
28222
|
+
case 'center':
|
|
28223
|
+
return 'radial-gradient(circle at 50% 90%, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%)';
|
|
28224
|
+
default:
|
|
28225
|
+
return 'rgba(0,0,0,0.5)';
|
|
28226
|
+
}
|
|
28227
|
+
};
|
|
28228
|
+
var background = getDefaultOverlay();
|
|
28229
|
+
return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
28230
|
+
position: "absolute",
|
|
28231
|
+
top: 0,
|
|
28232
|
+
left: 0,
|
|
28233
|
+
width: "100%",
|
|
28234
|
+
height: "100%",
|
|
28235
|
+
background: background,
|
|
28236
|
+
pointerEvents: "none",
|
|
28237
|
+
zIndex: 1
|
|
28238
|
+
}, props));
|
|
28239
|
+
};
|
|
28240
|
+
var BackgroundViewBase = _ref11 => {
|
|
28241
|
+
var {
|
|
28242
|
+
children,
|
|
28243
|
+
views
|
|
28244
|
+
} = _ref11,
|
|
28245
|
+
props = _objectWithoutPropertiesLoose(_ref11, _excluded11$1);
|
|
28203
28246
|
return /*#__PURE__*/React__default.createElement(BackgroundContext.Provider, {
|
|
28204
28247
|
value: {}
|
|
28205
28248
|
}, /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, DefaultBackgroundStyles.container, views == null ? void 0 : views.container, props), children));
|
|
@@ -28216,6 +28259,7 @@ BackgroundView.Ripples = Ripples;
|
|
|
28216
28259
|
BackgroundView.Image = BackgroundImage;
|
|
28217
28260
|
BackgroundView.Video = BackgroundVideo;
|
|
28218
28261
|
BackgroundView.Gradient = BackgroundGradient;
|
|
28262
|
+
BackgroundView.Overlay = BackgroundOverlay;
|
|
28219
28263
|
|
|
28220
28264
|
/**
|
|
28221
28265
|
* Background Component with compound pattern
|
|
@@ -28277,7 +28321,8 @@ var Background = /*#__PURE__*/Object.assign(BackgroundComponent, {
|
|
|
28277
28321
|
Ripples: BackgroundView.Ripples,
|
|
28278
28322
|
Image: BackgroundView.Image,
|
|
28279
28323
|
Video: BackgroundView.Video,
|
|
28280
|
-
Gradient: BackgroundView.Gradient
|
|
28324
|
+
Gradient: BackgroundView.Gradient,
|
|
28325
|
+
Overlay: BackgroundView.Overlay
|
|
28281
28326
|
});
|
|
28282
28327
|
Background.displayName = 'Background';
|
|
28283
28328
|
|