@app-studio/web 0.9.57 → 0.9.60
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 +18 -1
- package/dist/components/ColorPicker/ColorPicker/ColorPicker.props.d.ts +1 -1
- package/dist/components/DragAndDrop/DragAndDrop/DragAndDrop.props.d.ts +1 -1
- package/dist/components/EmojiPicker/EmojiPicker/EmojiPicker.props.d.ts +1 -1
- 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/Slider/Slider/Slider.props.d.ts +1 -1
- package/dist/components/Title/Title/SlideEffect.d.ts +1 -0
- package/dist/components/Title/Title/Title.props.d.ts +0 -5
- package/dist/pages/title.page.d.ts +0 -3
- package/dist/web.cjs.development.js +238 -223
- 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 +238 -223
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +242 -226
- 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';
|
|
@@ -9805,7 +9804,7 @@ var TextAreaView = _ref => {
|
|
|
9805
9804
|
maxHeight: 'calc(100vh - 100px)',
|
|
9806
9805
|
height: 'calc(5em)',
|
|
9807
9806
|
border: 'none',
|
|
9808
|
-
resize
|
|
9807
|
+
// resize property removed to avoid type error, added via style prop
|
|
9809
9808
|
// Focus state
|
|
9810
9809
|
on: {
|
|
9811
9810
|
focus: {
|
|
@@ -9882,8 +9881,12 @@ var TextAreaView = _ref => {
|
|
|
9882
9881
|
onBlur: handleBlur,
|
|
9883
9882
|
onFocus: handleFocus,
|
|
9884
9883
|
multiline: "" + !!isMultiline.toString(),
|
|
9885
|
-
onChange: handleChange
|
|
9886
|
-
}, fieldStyles,
|
|
9884
|
+
onChange: e => handleChange(e)
|
|
9885
|
+
}, fieldStyles, {
|
|
9886
|
+
style: {
|
|
9887
|
+
resize: 'vertical'
|
|
9888
|
+
}
|
|
9889
|
+
}, views == null ? void 0 : views.textarea)))));
|
|
9887
9890
|
};
|
|
9888
9891
|
|
|
9889
9892
|
// Defines the TextAreaComponent as a functional component that accepts TextAreaProps for type safety and structure.
|
|
@@ -10740,7 +10743,7 @@ var DefaultColorPalette = [
|
|
|
10740
10743
|
value: 'transparent'
|
|
10741
10744
|
}];
|
|
10742
10745
|
|
|
10743
|
-
var _excluded$y = ["id", "name", "label", "placeholder", "helperText", "views", "size", "shape", "variant", "shadow", "error", "isDisabled", "isReadOnly", "isFocused", "isHovered", "predefinedColors", "showCustomInput", "showRecentColors", "isOpen", "selectedColor", "recentColors", "customColor", "handleToggle", "handleColorSelect", "handleCustomColorChange", "handleCustomColorSubmit", "setIsFocused", "setIsHovered", "triggerRef", "dropdownRef"];
|
|
10746
|
+
var _excluded$y = ["id", "name", "label", "placeholder", "helperText", "views", "size", "shape", "variant", "shadow", "error", "isDisabled", "isReadOnly", "isFocused", "isHovered", "predefinedColors", "showCustomInput", "showRecentColors", "isOpen", "selectedColor", "recentColors", "customColor", "handleToggle", "handleColorSelect", "handleCustomColorChange", "handleCustomColorSubmit", "setIsFocused", "setIsHovered", "triggerRef", "dropdownRef", "onChange"];
|
|
10744
10747
|
var ColorInputView = _ref => {
|
|
10745
10748
|
var {
|
|
10746
10749
|
// Basic props
|
|
@@ -14270,7 +14273,11 @@ var useChatInputState = props => {
|
|
|
14270
14273
|
disabled = false,
|
|
14271
14274
|
isAgentRunning = false,
|
|
14272
14275
|
onStopAgent,
|
|
14273
|
-
sandboxId
|
|
14276
|
+
sandboxId,
|
|
14277
|
+
onUploadProgress,
|
|
14278
|
+
onUploadSuccess,
|
|
14279
|
+
onUploadError,
|
|
14280
|
+
onFileUpload
|
|
14274
14281
|
} = props;
|
|
14275
14282
|
// Determine if the component is controlled
|
|
14276
14283
|
var isControlled = controlledValue !== undefined && controlledOnChange !== undefined;
|
|
@@ -14386,28 +14393,6 @@ var useChatInputState = props => {
|
|
|
14386
14393
|
e.stopPropagation();
|
|
14387
14394
|
setIsDraggingOver(false);
|
|
14388
14395
|
};
|
|
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
14396
|
// Start uploading a batch of files (enqueue and process)
|
|
14412
14397
|
var startUpload = useCallback(files => {
|
|
14413
14398
|
if (!files || files.length === 0) return;
|
|
@@ -14420,25 +14405,33 @@ var useChatInputState = props => {
|
|
|
14420
14405
|
}, [setPendingFiles, setUploadedFiles]);
|
|
14421
14406
|
// Process upload queue sequentially
|
|
14422
14407
|
var processUploadQueue = useCallback(() => {
|
|
14423
|
-
if (uploadQueue.length > 0 && !isProcessingQueue &&
|
|
14408
|
+
if (uploadQueue.length > 0 && !isProcessingQueue && onFileUpload) {
|
|
14424
14409
|
setIsProcessingQueue(true);
|
|
14425
14410
|
var nextFile = uploadQueue[0];
|
|
14426
14411
|
currentUploadRef.current = nextFile;
|
|
14427
14412
|
setUploadProgress(0);
|
|
14428
|
-
//
|
|
14429
|
-
|
|
14430
|
-
|
|
14431
|
-
})
|
|
14413
|
+
// Execute user-provided upload function
|
|
14414
|
+
try {
|
|
14415
|
+
onFileUpload(nextFile);
|
|
14416
|
+
} catch (err) {
|
|
14417
|
+
// Handle synchronous errors
|
|
14418
|
+
setUploadQueue(prev => prev.slice(1));
|
|
14419
|
+
setIsProcessingQueue(false);
|
|
14420
|
+
currentUploadRef.current = null;
|
|
14421
|
+
setUploadProgress(0);
|
|
14422
|
+
setIsUploading(prev => uploadQueue.length - 1 > 0 || false);
|
|
14423
|
+
onUploadError == null || onUploadError(err);
|
|
14424
|
+
}
|
|
14432
14425
|
} else if (uploadQueue.length === 0 && isUploading) {
|
|
14433
14426
|
// Nothing left to upload
|
|
14434
14427
|
setIsUploading(false);
|
|
14435
14428
|
setUploadProgress(0);
|
|
14436
14429
|
}
|
|
14437
|
-
}, [uploadQueue, isProcessingQueue,
|
|
14438
|
-
// Effect: process whenever queue
|
|
14430
|
+
}, [uploadQueue, isProcessingQueue, onFileUpload, isUploading, onUploadError]);
|
|
14431
|
+
// Effect: process whenever queue changes
|
|
14439
14432
|
useEffect(() => {
|
|
14440
14433
|
processUploadQueue();
|
|
14441
|
-
}, [uploadQueue, isProcessingQueue,
|
|
14434
|
+
}, [uploadQueue, isProcessingQueue, processUploadQueue]);
|
|
14442
14435
|
// Mock function for subscription status
|
|
14443
14436
|
var subscriptionStatus = 'active';
|
|
14444
14437
|
// Mock function to check if user can access a model
|
|
@@ -15798,7 +15791,7 @@ var AudioRecorder = _ref => {
|
|
|
15798
15791
|
}))));
|
|
15799
15792
|
};
|
|
15800
15793
|
|
|
15801
|
-
var _excluded$M = ["onSubmit", "placeholder", "loading", "disabled", "isAgentRunning", "enableAudioRecording", "leftButtons", "rightButtons", "onStopAgent", "loadingText", "autoFocus", "sandboxId", "hideAttachments", "attachmentText", "promptExamples", "suggestions", "errorMessage", "size", "shape", "variant", "views", "mentionData", "mentionTrigger", "onMentionSelect", "onAudioRecordingStart", "onAudioRecordingStop", "value", "handleChange", "handleSubmit", "editableRef", "fileInputRef", "isUploading", "uploadProgress", "isDraggingOver", "uploadedFiles", "removeUploadedFile", "setPendingFiles", "setUploadedFiles", "setIsUploading", "startUpload", "selectedModel", "handleModelChange", "modelOptions", "subscriptionStatus", "canAccessModel", "isGuideTipShown", "hideGuideTip", "handlePromptExampleSelect", "handleDragOver", "handleDragLeave"];
|
|
15794
|
+
var _excluded$M = ["onSubmit", "placeholder", "loading", "disabled", "isAgentRunning", "enableAudioRecording", "leftButtons", "rightButtons", "onStopAgent", "loadingText", "autoFocus", "sandboxId", "hideAttachments", "attachmentText", "promptExamples", "suggestions", "errorMessage", "size", "shape", "variant", "views", "mentionData", "mentionTrigger", "onMentionSelect", "onAudioRecordingStart", "onAudioRecordingStop", "value", "handleChange", "handleSubmit", "editableRef", "fileInputRef", "isUploading", "uploadProgress", "isDraggingOver", "uploadedFiles", "removeUploadedFile", "setPendingFiles", "setUploadedFiles", "setIsUploading", "startUpload", "selectedModel", "handleModelChange", "modelOptions", "subscriptionStatus", "canAccessModel", "isGuideTipShown", "hideGuideTip", "handlePromptExampleSelect", "handleDragOver", "handleDragLeave", "onChange"];
|
|
15802
15795
|
var ChatInputView = _ref => {
|
|
15803
15796
|
var _value$trim$length;
|
|
15804
15797
|
var {
|
|
@@ -16578,7 +16571,7 @@ var OrientationStyles = {
|
|
|
16578
16571
|
}
|
|
16579
16572
|
};
|
|
16580
16573
|
|
|
16581
|
-
var _excluded$S = ["min", "max", "step", "currentValue", "stepValues", "shape", "size", "variant", "orientation", "isDisabled", "showValue", "showTooltip", "backgroundColor", "label", "helperText", "themeMode", "shadow", "isDragging", "isHovered", "setIsHovered", "trackRef", "thumbRef", "handleThumbMouseDown", "handleTrackMouseDown", "handleKeyDown", "thumbPositionPercent", "ariaLabel", "views"];
|
|
16574
|
+
var _excluded$S = ["min", "max", "step", "currentValue", "stepValues", "shape", "size", "variant", "orientation", "isDisabled", "showValue", "showTooltip", "backgroundColor", "label", "helperText", "themeMode", "shadow", "isDragging", "isHovered", "setIsHovered", "trackRef", "thumbRef", "handleThumbMouseDown", "handleTrackMouseDown", "handleKeyDown", "thumbPositionPercent", "ariaLabel", "views", "onChange", "onDrag"];
|
|
16582
16575
|
var SliderView = _ref => {
|
|
16583
16576
|
var _views$tooltip, _views$tooltip2;
|
|
16584
16577
|
var {
|
|
@@ -16945,11 +16938,6 @@ var OTPInputComponent$1 = props => {
|
|
|
16945
16938
|
var FormikOTPInput = OTPInputComponent$1;
|
|
16946
16939
|
|
|
16947
16940
|
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
16941
|
var toArrayValue = value => {
|
|
16954
16942
|
if (Array.isArray(value)) {
|
|
16955
16943
|
return value;
|
|
@@ -16962,7 +16950,7 @@ var toArrayValue = value => {
|
|
|
16962
16950
|
var FormikUploader = _ref => {
|
|
16963
16951
|
var {
|
|
16964
16952
|
name,
|
|
16965
|
-
uploadFile
|
|
16953
|
+
uploadFile,
|
|
16966
16954
|
onUploadSuccess,
|
|
16967
16955
|
onUploadError,
|
|
16968
16956
|
transformResponse,
|
|
@@ -19210,10 +19198,12 @@ var ResponsiveTypography = {
|
|
|
19210
19198
|
*/
|
|
19211
19199
|
var HighlightStyles = {
|
|
19212
19200
|
underline: color => ({
|
|
19213
|
-
|
|
19214
|
-
|
|
19215
|
-
|
|
19216
|
-
|
|
19201
|
+
style: {
|
|
19202
|
+
textDecoration: 'underline',
|
|
19203
|
+
textDecorationColor: color,
|
|
19204
|
+
textDecorationThickness: '4px',
|
|
19205
|
+
textUnderlineOffset: '4px'
|
|
19206
|
+
}
|
|
19217
19207
|
}),
|
|
19218
19208
|
background: color => ({
|
|
19219
19209
|
backgroundColor: color,
|
|
@@ -19222,17 +19212,21 @@ var HighlightStyles = {
|
|
|
19222
19212
|
borderRadius: '4px'
|
|
19223
19213
|
}),
|
|
19224
19214
|
gradient: (color, secondaryColor) => ({
|
|
19225
|
-
|
|
19226
|
-
|
|
19227
|
-
|
|
19215
|
+
style: {
|
|
19216
|
+
background: "linear-gradient(135deg, " + color + ", " + (secondaryColor || color) + ")",
|
|
19217
|
+
backgroundClip: 'text',
|
|
19218
|
+
WebkitBackgroundClip: 'text',
|
|
19219
|
+
WebkitTextFillColor: 'transparent'
|
|
19220
|
+
},
|
|
19228
19221
|
color: 'transparent',
|
|
19229
|
-
webkitTextFillColor: 'transparent',
|
|
19230
19222
|
display: 'inline-block',
|
|
19231
19223
|
textShadow: 'none'
|
|
19232
19224
|
}),
|
|
19233
19225
|
outline: color => ({
|
|
19234
|
-
|
|
19235
|
-
|
|
19226
|
+
style: {
|
|
19227
|
+
WebkitTextStroke: "1px " + color,
|
|
19228
|
+
WebkitTextFillColor: 'transparent'
|
|
19229
|
+
},
|
|
19236
19230
|
color: 'transparent',
|
|
19237
19231
|
textShadow: 'none'
|
|
19238
19232
|
}),
|
|
@@ -19502,7 +19496,7 @@ var SlideEffect = _ref => {
|
|
|
19502
19496
|
})));
|
|
19503
19497
|
};
|
|
19504
19498
|
|
|
19505
|
-
var _excluded$$ = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "responsive", "
|
|
19499
|
+
var _excluded$$ = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "responsive", "views", "highlightAnimate", "animate", "animationLoop", "highlightAnimationLoop", "highlightTypewriter", "highlightTypewriterDuration", "highlightSlide", "highlightSlideDuration", "highlightSlideStagger", "highlightSlideSequential"];
|
|
19506
19500
|
function escapeRegExp(string) {
|
|
19507
19501
|
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
19508
19502
|
}
|
|
@@ -19515,7 +19509,6 @@ var TitleView = _ref => {
|
|
|
19515
19509
|
highlightSecondaryColor,
|
|
19516
19510
|
size = 'lg',
|
|
19517
19511
|
responsive = true,
|
|
19518
|
-
centered = false,
|
|
19519
19512
|
views,
|
|
19520
19513
|
highlightAnimate,
|
|
19521
19514
|
animate,
|
|
@@ -19533,31 +19526,6 @@ var TitleView = _ref => {
|
|
|
19533
19526
|
ref,
|
|
19534
19527
|
inView
|
|
19535
19528
|
} = useInView();
|
|
19536
|
-
var {
|
|
19537
|
-
getColor,
|
|
19538
|
-
themeMode: ctxMode
|
|
19539
|
-
} = useTheme();
|
|
19540
|
-
var themeMode = props.themeMode || ctxMode;
|
|
19541
|
-
// Resolve colors, handling both theme colors and direct hex values
|
|
19542
|
-
var resolveColorValue = colorValue => {
|
|
19543
|
-
// If it's already a hex color, return it directly
|
|
19544
|
-
if (colorValue.startsWith('#')) {
|
|
19545
|
-
return colorValue;
|
|
19546
|
-
}
|
|
19547
|
-
// Otherwise, use the theme's getColor function
|
|
19548
|
-
return getColor(colorValue, {
|
|
19549
|
-
themeMode
|
|
19550
|
-
});
|
|
19551
|
-
};
|
|
19552
|
-
var resolvedColor = resolveColorValue(highlightColor);
|
|
19553
|
-
var resolvedSecondary = highlightSecondaryColor ? resolveColorValue(highlightSecondaryColor) : undefined;
|
|
19554
|
-
var baseHighlightProps = HighlightStyles[highlightStyle](resolvedColor, resolvedSecondary);
|
|
19555
|
-
var highlightViewProps = highlightStyle === 'background' ? Object.assign({}, baseHighlightProps, {
|
|
19556
|
-
color: undefined
|
|
19557
|
-
}) : baseHighlightProps;
|
|
19558
|
-
var highlightBackgroundOverrides = highlightStyle === 'background' ? {
|
|
19559
|
-
bgColor: resolvedColor
|
|
19560
|
-
} : {};
|
|
19561
19529
|
var {
|
|
19562
19530
|
finalDisplayedText,
|
|
19563
19531
|
activeHighlightTarget,
|
|
@@ -19577,12 +19545,13 @@ var TitleView = _ref => {
|
|
|
19577
19545
|
highlightSlideStagger,
|
|
19578
19546
|
highlightSlideSequential
|
|
19579
19547
|
}, props));
|
|
19580
|
-
//
|
|
19581
|
-
var useResponsive = responsive && !props.media;
|
|
19548
|
+
// Common style calculations
|
|
19549
|
+
var useResponsive = responsive && !props.media;
|
|
19582
19550
|
var fontSize = TitleSizes[size];
|
|
19583
|
-
// Get responsive styles if responsive prop is true
|
|
19584
19551
|
var responsiveStyles = useResponsive ? ResponsiveTypography[size] : null;
|
|
19585
|
-
//
|
|
19552
|
+
// Highlight style props
|
|
19553
|
+
var highlightProps = HighlightStyles[highlightStyle](highlightColor, highlightSecondaryColor);
|
|
19554
|
+
// Apply loop control to animations
|
|
19586
19555
|
var applyAnimationLoop = (animation, loopControl) => {
|
|
19587
19556
|
if (!animation) return animation;
|
|
19588
19557
|
if (Array.isArray(animation)) {
|
|
@@ -19594,112 +19563,88 @@ var TitleView = _ref => {
|
|
|
19594
19563
|
iterationCount: loopControl.toString()
|
|
19595
19564
|
});
|
|
19596
19565
|
};
|
|
19597
|
-
// Apply loop control to animations
|
|
19598
19566
|
var controlledAnimate = applyAnimationLoop(animate, animationLoop);
|
|
19599
19567
|
var controlledHighlightAnimate = applyAnimationLoop(highlightAnimate, highlightAnimationLoop);
|
|
19600
19568
|
// Get the text to display
|
|
19601
19569
|
var text = typeof finalDisplayedText === 'string' ? finalDisplayedText : typeof children === 'string' ? children : '';
|
|
19570
|
+
// Common container props
|
|
19571
|
+
var containerProps = {
|
|
19572
|
+
ref,
|
|
19573
|
+
as: 'h1',
|
|
19574
|
+
fontSize: useResponsive ? undefined : fontSize,
|
|
19575
|
+
fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
|
|
19576
|
+
letterSpacing: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.letterSpacing : undefined,
|
|
19577
|
+
marginBottom: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.marginBottom : undefined,
|
|
19578
|
+
animate: inView ? controlledAnimate : undefined,
|
|
19579
|
+
media: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.media : undefined
|
|
19580
|
+
};
|
|
19581
|
+
// Render highlighted text content (typewriter, slide, or plain)
|
|
19582
|
+
var renderHighlightedContent = content => {
|
|
19583
|
+
// If animations are enabled but not in view, render invisible placeholder
|
|
19584
|
+
// This holds layout space and prevents animations (like typewriter) from running off-screen
|
|
19585
|
+
if (!inView && (highlightTypewriter || highlightSlide)) {
|
|
19586
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
19587
|
+
style: {
|
|
19588
|
+
opacity: 0
|
|
19589
|
+
}
|
|
19590
|
+
}, content);
|
|
19591
|
+
}
|
|
19592
|
+
if (highlightTypewriter) {
|
|
19593
|
+
return /*#__PURE__*/React.createElement(TypewriterEffect, Object.assign({
|
|
19594
|
+
text: content,
|
|
19595
|
+
typingSpeed: Math.max(30, highlightTypewriterDuration / (content.length * 10)),
|
|
19596
|
+
showCursor: true,
|
|
19597
|
+
cursorColor: "currentColor"
|
|
19598
|
+
}, highlightProps));
|
|
19599
|
+
}
|
|
19600
|
+
if (highlightSlide) {
|
|
19601
|
+
return /*#__PURE__*/React.createElement(SlideEffect, {
|
|
19602
|
+
text: content,
|
|
19603
|
+
duration: stateHighlightSlideDuration,
|
|
19604
|
+
stagger: stateHighlightSlideStagger,
|
|
19605
|
+
sequential: stateHighlightSlideSequential,
|
|
19606
|
+
direction: "up",
|
|
19607
|
+
fontSize: useResponsive ? undefined : fontSize,
|
|
19608
|
+
fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
|
|
19609
|
+
wordProps: highlightProps
|
|
19610
|
+
});
|
|
19611
|
+
}
|
|
19612
|
+
return content;
|
|
19613
|
+
};
|
|
19614
|
+
// Case 1: Has highlight target - render with highlighted parts
|
|
19602
19615
|
if (typeof text === 'string' && activeHighlightTarget) {
|
|
19603
|
-
var pattern = (
|
|
19604
|
-
if (Array.isArray(activeHighlightTarget)) {
|
|
19605
|
-
var escaped = activeHighlightTarget.map(t => escapeRegExp(String(t)));
|
|
19606
|
-
return new RegExp("(" + escaped.join('|') + ")", 'gi');
|
|
19607
|
-
}
|
|
19608
|
-
return new RegExp("(" + escapeRegExp(String(activeHighlightTarget)) + ")", 'gi');
|
|
19609
|
-
})();
|
|
19616
|
+
var pattern = Array.isArray(activeHighlightTarget) ? new RegExp("(" + activeHighlightTarget.map(t => escapeRegExp(String(t))).join('|') + ")", 'gi') : new RegExp("(" + escapeRegExp(String(activeHighlightTarget)) + ")", 'gi');
|
|
19610
19617
|
var parts = [];
|
|
19611
19618
|
var lastIndex = 0;
|
|
19612
19619
|
var match;
|
|
19613
19620
|
while (match = pattern.exec(text)) {
|
|
19614
|
-
if (match.index > lastIndex)
|
|
19615
|
-
parts.push(text.substring(lastIndex, match.index));
|
|
19616
|
-
}
|
|
19621
|
+
if (match.index > lastIndex) parts.push(text.substring(lastIndex, match.index));
|
|
19617
19622
|
parts.push({
|
|
19618
19623
|
highlight: true,
|
|
19619
19624
|
text: match[0]
|
|
19620
19625
|
});
|
|
19621
19626
|
lastIndex = match.index + match[0].length;
|
|
19622
19627
|
}
|
|
19623
|
-
if (lastIndex < text.length)
|
|
19624
|
-
|
|
19625
|
-
}
|
|
19626
|
-
return /*#__PURE__*/React.createElement(Element, Object.assign({
|
|
19627
|
-
ref: ref,
|
|
19628
|
-
as: "h1",
|
|
19629
|
-
fontSize: useResponsive ? undefined : fontSize,
|
|
19630
|
-
fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
|
|
19631
|
-
letterSpacing: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.letterSpacing : undefined,
|
|
19632
|
-
marginBottom: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.marginBottom : undefined,
|
|
19633
|
-
textAlign: centered ? 'center' : 'left',
|
|
19634
|
-
animate: inView ? controlledAnimate : undefined,
|
|
19635
|
-
media: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.media : undefined
|
|
19636
|
-
}, views == null ? void 0 : views.container, props), parts.map((part, idx) => typeof part === 'string' ? part : (/*#__PURE__*/React.createElement(Text, Object.assign({
|
|
19628
|
+
if (lastIndex < text.length) parts.push(text.substring(lastIndex));
|
|
19629
|
+
return /*#__PURE__*/React.createElement(Element, Object.assign({}, containerProps, views == null ? void 0 : views.container, props), parts.map((part, idx) => typeof part === 'string' ? part : (/*#__PURE__*/React.createElement(Text, Object.assign({
|
|
19637
19630
|
key: "highlight-" + idx,
|
|
19638
19631
|
as: "span",
|
|
19639
19632
|
display: "inline",
|
|
19640
19633
|
animate: inView ? controlledHighlightAnimate : undefined,
|
|
19641
19634
|
fontSize: useResponsive ? undefined : fontSize
|
|
19642
|
-
}, !highlightSlide ?
|
|
19643
|
-
text: part.text,
|
|
19644
|
-
typingSpeed: Math.max(30, highlightTypewriterDuration / (part.text.length * 10)),
|
|
19645
|
-
showCursor: true,
|
|
19646
|
-
cursorColor: "currentColor"
|
|
19647
|
-
})) : highlightSlide ? (/*#__PURE__*/React.createElement(SlideEffect, {
|
|
19648
|
-
text: part.text,
|
|
19649
|
-
duration: stateHighlightSlideDuration,
|
|
19650
|
-
stagger: stateHighlightSlideStagger,
|
|
19651
|
-
sequential: stateHighlightSlideSequential,
|
|
19652
|
-
direction: "up",
|
|
19653
|
-
fontSize: useResponsive ? undefined : fontSize,
|
|
19654
|
-
fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
|
|
19655
|
-
wordProps: highlightViewProps
|
|
19656
|
-
})) : part.text))));
|
|
19635
|
+
}, !highlightSlide ? highlightProps : {}, views == null ? void 0 : views.highlight), renderHighlightedContent(part.text)))));
|
|
19657
19636
|
}
|
|
19658
|
-
//
|
|
19637
|
+
// Case 2: Has highlight style but no highlight target - apply style to entire title
|
|
19659
19638
|
if (highlightStyle && !activeHighlightTarget) {
|
|
19660
|
-
return /*#__PURE__*/React.createElement(Element, Object.assign({
|
|
19661
|
-
ref: ref,
|
|
19662
|
-
as: "h1",
|
|
19663
|
-
fontSize: useResponsive ? undefined : fontSize,
|
|
19664
|
-
fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
|
|
19665
|
-
letterSpacing: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.letterSpacing : undefined,
|
|
19666
|
-
marginBottom: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.marginBottom : undefined,
|
|
19667
|
-
textAlign: centered ? 'center' : 'left',
|
|
19668
|
-
animate: inView ? controlledAnimate : undefined,
|
|
19669
|
-
media: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.media : undefined
|
|
19670
|
-
}, views == null ? void 0 : views.container, props), /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
19639
|
+
return /*#__PURE__*/React.createElement(Element, Object.assign({}, containerProps, views == null ? void 0 : views.container, props), /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
19671
19640
|
as: "span",
|
|
19672
19641
|
fontSize: fontSize,
|
|
19673
19642
|
display: "inline",
|
|
19674
19643
|
animate: inView ? controlledHighlightAnimate : undefined
|
|
19675
|
-
}, !highlightSlide ?
|
|
19676
|
-
text: text,
|
|
19677
|
-
typingSpeed: Math.max(30, highlightTypewriterDuration / (text.length * 10)),
|
|
19678
|
-
showCursor: true,
|
|
19679
|
-
cursorColor: "currentColor"
|
|
19680
|
-
})) : highlightSlide ? (/*#__PURE__*/React.createElement(SlideEffect, {
|
|
19681
|
-
text: text,
|
|
19682
|
-
duration: stateHighlightSlideDuration,
|
|
19683
|
-
stagger: stateHighlightSlideStagger,
|
|
19684
|
-
sequential: stateHighlightSlideSequential,
|
|
19685
|
-
direction: "up",
|
|
19686
|
-
fontSize: fontSize,
|
|
19687
|
-
fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
|
|
19688
|
-
wordProps: highlightViewProps
|
|
19689
|
-
})) : text));
|
|
19644
|
+
}, !highlightSlide ? highlightProps : {}, views == null ? void 0 : views.highlight), renderHighlightedContent(text)));
|
|
19690
19645
|
}
|
|
19691
|
-
// Default
|
|
19692
|
-
return /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
19693
|
-
ref: ref,
|
|
19694
|
-
as: "h1",
|
|
19695
|
-
fontSize: fontSize,
|
|
19696
|
-
fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
|
|
19697
|
-
letterSpacing: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.letterSpacing : undefined,
|
|
19698
|
-
marginBottom: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.marginBottom : undefined,
|
|
19699
|
-
textAlign: centered ? 'center' : 'left',
|
|
19700
|
-
animate: inView ? controlledAnimate : undefined,
|
|
19701
|
-
media: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.media : undefined
|
|
19702
|
-
}, views == null ? void 0 : views.container, props), text);
|
|
19646
|
+
// Case 3: Default - no highlighting
|
|
19647
|
+
return /*#__PURE__*/React.createElement(Text, Object.assign({}, containerProps, views == null ? void 0 : views.container, props), text);
|
|
19703
19648
|
};
|
|
19704
19649
|
|
|
19705
19650
|
/**
|
|
@@ -20966,7 +20911,7 @@ var DefaultColorPalette$1 = [
|
|
|
20966
20911
|
category: 'neutral'
|
|
20967
20912
|
}];
|
|
20968
20913
|
|
|
20969
|
-
var _excluded$14 = ["id", "name", "label", "placeholder", "helperText", "views", "size", "shape", "variant", "error", "isDisabled", "isReadOnly", "predefinedColors", "showCustomInput", "showRecentColors", "isOpen", "selectedColor", "recentColors", "customColor", "handleToggle", "handleColorSelect", "handleCustomColorChange", "handleCustomColorSubmit", "triggerRef", "dropdownRef"];
|
|
20914
|
+
var _excluded$14 = ["id", "name", "label", "placeholder", "helperText", "views", "size", "shape", "variant", "error", "isDisabled", "isReadOnly", "predefinedColors", "showCustomInput", "showRecentColors", "isOpen", "selectedColor", "recentColors", "customColor", "handleToggle", "handleColorSelect", "handleCustomColorChange", "handleCustomColorSubmit", "triggerRef", "dropdownRef", "onChange"];
|
|
20970
20915
|
var ColorPickerView = _ref => {
|
|
20971
20916
|
var {
|
|
20972
20917
|
// Basic props
|
|
@@ -23333,7 +23278,7 @@ var useEmojiPickerState = props => {
|
|
|
23333
23278
|
};
|
|
23334
23279
|
};
|
|
23335
23280
|
|
|
23336
|
-
var _excluded$15 = ["id", "name", "label", "placeholder", "helperText", "views", "size", "shape", "variant", "error", "isDisabled", "isReadOnly", "showSearch", "showCategories", "showRecentEmojis", "enabledCategories", "isOpen", "selectedEmoji", "recentEmojis", "searchQuery", "activeCategory", "filteredEmojis", "handleToggle", "handleEmojiSelect", "handleSearchChange", "handleCategoryChange", "triggerRef", "dropdownRef"];
|
|
23281
|
+
var _excluded$15 = ["id", "name", "label", "placeholder", "helperText", "views", "size", "shape", "variant", "error", "isDisabled", "isReadOnly", "showSearch", "showCategories", "showRecentEmojis", "enabledCategories", "isOpen", "selectedEmoji", "recentEmojis", "searchQuery", "activeCategory", "filteredEmojis", "handleToggle", "handleEmojiSelect", "handleSearchChange", "handleCategoryChange", "triggerRef", "dropdownRef", "onChange"];
|
|
23337
23282
|
var EmojiPickerView = _ref => {
|
|
23338
23283
|
var {
|
|
23339
23284
|
// Basic props
|
|
@@ -24307,15 +24252,22 @@ var PaginationComponent = _ref => {
|
|
|
24307
24252
|
};
|
|
24308
24253
|
var Pagination = PaginationComponent;
|
|
24309
24254
|
|
|
24310
|
-
var _excluded$1a = ["value", "max", "color", "backgroundColor", "height", "radius", "views", "themeMode"];
|
|
24255
|
+
var _excluded$1a = ["shape", "value", "max", "color", "backgroundColor", "height", "size", "radius", "strokeWidth", "showLabel", "labelColor", "animated", "animationDuration", "views", "themeMode"];
|
|
24311
24256
|
var ProgressBarView = _ref => {
|
|
24312
24257
|
var {
|
|
24258
|
+
shape = 'linear',
|
|
24313
24259
|
value = 0,
|
|
24314
24260
|
max = 100,
|
|
24315
24261
|
color = 'theme.primary',
|
|
24316
24262
|
backgroundColor = 'color.gray.200',
|
|
24317
|
-
height
|
|
24263
|
+
height,
|
|
24264
|
+
size,
|
|
24318
24265
|
radius = 4,
|
|
24266
|
+
strokeWidth = 10,
|
|
24267
|
+
showLabel = false,
|
|
24268
|
+
labelColor = 'theme.text.primary',
|
|
24269
|
+
animated = true,
|
|
24270
|
+
animationDuration = '0.5s',
|
|
24319
24271
|
views,
|
|
24320
24272
|
themeMode: elementMode
|
|
24321
24273
|
} = _ref,
|
|
@@ -24325,20 +24277,78 @@ var ProgressBarView = _ref => {
|
|
|
24325
24277
|
themeMode
|
|
24326
24278
|
} = useTheme();
|
|
24327
24279
|
var currentMode = elementMode ? elementMode : themeMode;
|
|
24328
|
-
var
|
|
24280
|
+
var validValue = Math.min(max, Math.max(0, value));
|
|
24281
|
+
var percentage = validValue / max * 100;
|
|
24329
24282
|
var trackColor = getColor(backgroundColor, {
|
|
24330
24283
|
themeMode: currentMode
|
|
24331
24284
|
});
|
|
24332
24285
|
var barColor = getColor(color, {
|
|
24333
24286
|
themeMode: currentMode
|
|
24334
24287
|
});
|
|
24288
|
+
if (shape === 'circle') {
|
|
24289
|
+
var circleSize = size || (typeof height === 'number' ? height : 100);
|
|
24290
|
+
var radiusCalc = (circleSize - strokeWidth) / 2;
|
|
24291
|
+
var circumference = 2 * Math.PI * radiusCalc;
|
|
24292
|
+
var offset = circumference - percentage / 100 * circumference;
|
|
24293
|
+
return /*#__PURE__*/React.createElement(View, Object.assign({
|
|
24294
|
+
width: circleSize,
|
|
24295
|
+
height: circleSize,
|
|
24296
|
+
position: "relative",
|
|
24297
|
+
display: "flex",
|
|
24298
|
+
alignItems: "center",
|
|
24299
|
+
justifyContent: "center"
|
|
24300
|
+
}, views == null ? void 0 : views.container, props), /*#__PURE__*/React.createElement("svg", {
|
|
24301
|
+
width: circleSize,
|
|
24302
|
+
height: circleSize,
|
|
24303
|
+
viewBox: "0 0 " + circleSize + " " + circleSize,
|
|
24304
|
+
style: {
|
|
24305
|
+
transform: 'rotate(-90deg)'
|
|
24306
|
+
}
|
|
24307
|
+
}, /*#__PURE__*/React.createElement("circle", Object.assign({
|
|
24308
|
+
cx: circleSize / 2,
|
|
24309
|
+
cy: circleSize / 2,
|
|
24310
|
+
r: radiusCalc,
|
|
24311
|
+
stroke: trackColor,
|
|
24312
|
+
strokeWidth: strokeWidth,
|
|
24313
|
+
fill: "transparent"
|
|
24314
|
+
}, views == null ? void 0 : views.track)), /*#__PURE__*/React.createElement("circle", Object.assign({
|
|
24315
|
+
cx: circleSize / 2,
|
|
24316
|
+
cy: circleSize / 2,
|
|
24317
|
+
r: radiusCalc,
|
|
24318
|
+
stroke: barColor,
|
|
24319
|
+
strokeWidth: strokeWidth,
|
|
24320
|
+
strokeDasharray: circumference,
|
|
24321
|
+
strokeDashoffset: offset,
|
|
24322
|
+
strokeLinecap: "round",
|
|
24323
|
+
fill: "transparent",
|
|
24324
|
+
style: {
|
|
24325
|
+
transition: animated ? "stroke-dashoffset " + animationDuration + " ease-in-out" : 'none'
|
|
24326
|
+
}
|
|
24327
|
+
}, views == null ? void 0 : views.indicator))), showLabel && (/*#__PURE__*/React.createElement(View, {
|
|
24328
|
+
position: "absolute",
|
|
24329
|
+
top: 0,
|
|
24330
|
+
left: 0,
|
|
24331
|
+
right: 0,
|
|
24332
|
+
bottom: 0,
|
|
24333
|
+
display: "flex",
|
|
24334
|
+
alignItems: "center",
|
|
24335
|
+
justifyContent: "center",
|
|
24336
|
+
pointerEvents: "none"
|
|
24337
|
+
}, /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
24338
|
+
color: labelColor,
|
|
24339
|
+
fontSize: circleSize * 0.2 + "px",
|
|
24340
|
+
fontWeight: "bold"
|
|
24341
|
+
}, views == null ? void 0 : views.text), Math.round(percentage), "%"))));
|
|
24342
|
+
}
|
|
24343
|
+
// Linear Progress Bar
|
|
24344
|
+
var linearHeight = height || 8;
|
|
24335
24345
|
return /*#__PURE__*/React.createElement(View, Object.assign({
|
|
24336
24346
|
role: "progressbar",
|
|
24337
24347
|
"aria-valuenow": value,
|
|
24338
24348
|
"aria-valuemin": 0,
|
|
24339
24349
|
"aria-valuemax": max,
|
|
24340
24350
|
width: "100%",
|
|
24341
|
-
height:
|
|
24351
|
+
height: linearHeight,
|
|
24342
24352
|
backgroundColor: trackColor,
|
|
24343
24353
|
borderRadius: radius,
|
|
24344
24354
|
overflow: "hidden"
|
|
@@ -24346,12 +24356,16 @@ var ProgressBarView = _ref => {
|
|
|
24346
24356
|
width: percentage + "%",
|
|
24347
24357
|
height: "100%",
|
|
24348
24358
|
backgroundColor: barColor,
|
|
24349
|
-
borderRadius: radius
|
|
24359
|
+
borderRadius: radius,
|
|
24360
|
+
style: {
|
|
24361
|
+
transition: animated ? "width " + animationDuration + " ease-in-out" : 'none'
|
|
24362
|
+
}
|
|
24350
24363
|
}, views == null ? void 0 : views.bar)));
|
|
24351
24364
|
};
|
|
24352
24365
|
|
|
24353
24366
|
/**
|
|
24354
24367
|
* ProgressBar component displays completion status of a task or process.
|
|
24368
|
+
* Supports both linear and circular shapes.
|
|
24355
24369
|
*/
|
|
24356
24370
|
var ProgressBarComponent = props => (/*#__PURE__*/React.createElement(ProgressBarView, Object.assign({}, props)));
|
|
24357
24371
|
var ProgressBar = ProgressBarComponent;
|
|
@@ -24432,7 +24446,7 @@ var SeparatorView = _ref => {
|
|
|
24432
24446
|
var borderWidth = SeparatorThicknesses[thickness];
|
|
24433
24447
|
// Set appropriate ARIA attributes based on decorative prop
|
|
24434
24448
|
var ariaProps = decorative ? {
|
|
24435
|
-
'aria-hidden':
|
|
24449
|
+
'aria-hidden': true
|
|
24436
24450
|
} : {
|
|
24437
24451
|
role: 'separator',
|
|
24438
24452
|
'aria-orientation': orientation
|
|
@@ -27401,16 +27415,10 @@ var BackgroundImageStyles = {
|
|
|
27401
27415
|
backgroundRepeat: 'no-repeat',
|
|
27402
27416
|
backgroundAttachment: 'scroll'
|
|
27403
27417
|
},
|
|
27404
|
-
overlay: {
|
|
27405
|
-
position: 'absolute',
|
|
27406
|
-
top: 0,
|
|
27407
|
-
left: 0,
|
|
27408
|
-
width: '100%',
|
|
27409
|
-
height: '100%',
|
|
27410
|
-
pointerEvents: 'none'
|
|
27411
|
-
},
|
|
27412
27418
|
content: {
|
|
27413
27419
|
position: 'relative',
|
|
27420
|
+
width: '100%',
|
|
27421
|
+
height: '100%',
|
|
27414
27422
|
zIndex: 2
|
|
27415
27423
|
}
|
|
27416
27424
|
};
|
|
@@ -27434,14 +27442,6 @@ var BackgroundVideoStyles = {
|
|
|
27434
27442
|
height: '100%',
|
|
27435
27443
|
objectFit: 'cover'
|
|
27436
27444
|
},
|
|
27437
|
-
overlay: {
|
|
27438
|
-
position: 'absolute',
|
|
27439
|
-
top: 0,
|
|
27440
|
-
left: 0,
|
|
27441
|
-
width: '100%',
|
|
27442
|
-
height: '100%',
|
|
27443
|
-
pointerEvents: 'none'
|
|
27444
|
-
},
|
|
27445
27445
|
content: {
|
|
27446
27446
|
position: 'relative',
|
|
27447
27447
|
zIndex: 2
|
|
@@ -27710,7 +27710,8 @@ var _excluded$1o = ["children", "showRadialGradient", "views", "themeMode"],
|
|
|
27710
27710
|
_excluded7$1 = ["children", "src", "backgroundSize", "backgroundPosition", "backgroundRepeat", "backgroundAttachment", "imageOpacity", "overlay", "blendMode", "views", "themeMode"],
|
|
27711
27711
|
_excluded8$1 = ["children", "src", "autoPlay", "loop", "muted", "playsInline", "overlay", "blendMode", "views", "themeMode"],
|
|
27712
27712
|
_excluded9$1 = ["children"],
|
|
27713
|
-
_excluded10$1 = ["
|
|
27713
|
+
_excluded10$1 = ["contentPosition"],
|
|
27714
|
+
_excluded11$1 = ["children", "views"];
|
|
27714
27715
|
// Background Context
|
|
27715
27716
|
var BackgroundContext = /*#__PURE__*/createContext({});
|
|
27716
27717
|
/**
|
|
@@ -28104,15 +28105,11 @@ var BackgroundImage = _ref7 => {
|
|
|
28104
28105
|
backgroundRepeat = 'no-repeat',
|
|
28105
28106
|
backgroundAttachment = 'scroll',
|
|
28106
28107
|
imageOpacity = 1,
|
|
28107
|
-
overlay,
|
|
28108
|
+
overlay = null,
|
|
28108
28109
|
blendMode = 'normal',
|
|
28109
|
-
views
|
|
28110
|
-
themeMode: elementMode
|
|
28110
|
+
views
|
|
28111
28111
|
} = _ref7,
|
|
28112
28112
|
props = _objectWithoutPropertiesLoose(_ref7, _excluded7$1);
|
|
28113
|
-
var {
|
|
28114
|
-
getColor
|
|
28115
|
-
} = useTheme();
|
|
28116
28113
|
var imageStyle = Object.assign({}, BackgroundImageStyles.image, {
|
|
28117
28114
|
backgroundImage: "url(" + src + ")",
|
|
28118
28115
|
backgroundSize,
|
|
@@ -28121,17 +28118,9 @@ var BackgroundImage = _ref7 => {
|
|
|
28121
28118
|
backgroundAttachment,
|
|
28122
28119
|
opacity: imageOpacity
|
|
28123
28120
|
});
|
|
28124
|
-
var overlayStyle = overlay ? Object.assign({}, BackgroundImageStyles.overlay, {
|
|
28125
|
-
backgroundColor: getColor(overlay, elementMode ? {
|
|
28126
|
-
themeMode: elementMode
|
|
28127
|
-
} : undefined),
|
|
28128
|
-
mixBlendMode: blendMode
|
|
28129
|
-
}) : {};
|
|
28130
28121
|
return /*#__PURE__*/React.createElement(View, Object.assign({}, BackgroundImageStyles.container, views == null ? void 0 : views.container, props), /*#__PURE__*/React.createElement(View, Object.assign({
|
|
28131
28122
|
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)));
|
|
28123
|
+
}, views == null ? void 0 : views.image)), overlay, children && (/*#__PURE__*/React.createElement(View, Object.assign({}, BackgroundImageStyles.content, views == null ? void 0 : views.content), children)));
|
|
28135
28124
|
};
|
|
28136
28125
|
/**
|
|
28137
28126
|
* Background Video Component
|
|
@@ -28144,21 +28133,11 @@ var BackgroundVideo = _ref8 => {
|
|
|
28144
28133
|
loop = true,
|
|
28145
28134
|
muted = true,
|
|
28146
28135
|
playsInline = true,
|
|
28147
|
-
overlay,
|
|
28136
|
+
overlay = null,
|
|
28148
28137
|
blendMode = 'normal',
|
|
28149
|
-
views
|
|
28150
|
-
themeMode: elementMode
|
|
28138
|
+
views
|
|
28151
28139
|
} = _ref8,
|
|
28152
28140
|
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
28141
|
return /*#__PURE__*/React.createElement(View, Object.assign({}, BackgroundVideoStyles.container, views == null ? void 0 : views.container, props), /*#__PURE__*/React.createElement(View, Object.assign({
|
|
28163
28142
|
as: "video",
|
|
28164
28143
|
src: src,
|
|
@@ -28167,9 +28146,7 @@ var BackgroundVideo = _ref8 => {
|
|
|
28167
28146
|
muted: muted,
|
|
28168
28147
|
playsInline: playsInline,
|
|
28169
28148
|
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)));
|
|
28149
|
+
}, views == null ? void 0 : views.video)), overlay, children && (/*#__PURE__*/React.createElement(View, Object.assign({}, BackgroundVideoStyles.content, views == null ? void 0 : views.content), children)));
|
|
28173
28150
|
};
|
|
28174
28151
|
/**
|
|
28175
28152
|
* Background Gradient Component
|
|
@@ -28182,12 +28159,48 @@ var BackgroundGradient = _ref9 => {
|
|
|
28182
28159
|
gradientProps = _objectWithoutPropertiesLoose(_ref9, _excluded9$1);
|
|
28183
28160
|
return /*#__PURE__*/React.createElement(Gradient, Object.assign({}, gradientProps), children);
|
|
28184
28161
|
};
|
|
28185
|
-
|
|
28162
|
+
/**
|
|
28163
|
+
* Background Overlay Component
|
|
28164
|
+
*/
|
|
28165
|
+
var BackgroundOverlay = _ref10 => {
|
|
28186
28166
|
var {
|
|
28187
|
-
|
|
28188
|
-
views
|
|
28167
|
+
contentPosition
|
|
28189
28168
|
} = _ref10,
|
|
28190
28169
|
props = _objectWithoutPropertiesLoose(_ref10, _excluded10$1);
|
|
28170
|
+
var getDefaultOverlay = () => {
|
|
28171
|
+
switch (contentPosition) {
|
|
28172
|
+
case 'left':
|
|
28173
|
+
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%)';
|
|
28174
|
+
case 'right':
|
|
28175
|
+
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%)';
|
|
28176
|
+
case 'top':
|
|
28177
|
+
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%)';
|
|
28178
|
+
case 'bottom':
|
|
28179
|
+
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%)';
|
|
28180
|
+
case 'center':
|
|
28181
|
+
return 'radial-gradient(circle at 50% 90%, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%)';
|
|
28182
|
+
default:
|
|
28183
|
+
return 'rgba(0,0,0,0.5)';
|
|
28184
|
+
}
|
|
28185
|
+
};
|
|
28186
|
+
var background = getDefaultOverlay();
|
|
28187
|
+
return /*#__PURE__*/React.createElement(View, Object.assign({
|
|
28188
|
+
position: "absolute",
|
|
28189
|
+
top: 0,
|
|
28190
|
+
left: 0,
|
|
28191
|
+
width: "100%",
|
|
28192
|
+
height: "100%",
|
|
28193
|
+
background: background,
|
|
28194
|
+
pointerEvents: "none",
|
|
28195
|
+
zIndex: 1
|
|
28196
|
+
}, props));
|
|
28197
|
+
};
|
|
28198
|
+
var BackgroundViewBase = _ref11 => {
|
|
28199
|
+
var {
|
|
28200
|
+
children,
|
|
28201
|
+
views
|
|
28202
|
+
} = _ref11,
|
|
28203
|
+
props = _objectWithoutPropertiesLoose(_ref11, _excluded11$1);
|
|
28191
28204
|
return /*#__PURE__*/React.createElement(BackgroundContext.Provider, {
|
|
28192
28205
|
value: {}
|
|
28193
28206
|
}, /*#__PURE__*/React.createElement(View, Object.assign({}, DefaultBackgroundStyles.container, views == null ? void 0 : views.container, props), children));
|
|
@@ -28204,6 +28217,7 @@ BackgroundView.Ripples = Ripples;
|
|
|
28204
28217
|
BackgroundView.Image = BackgroundImage;
|
|
28205
28218
|
BackgroundView.Video = BackgroundVideo;
|
|
28206
28219
|
BackgroundView.Gradient = BackgroundGradient;
|
|
28220
|
+
BackgroundView.Overlay = BackgroundOverlay;
|
|
28207
28221
|
|
|
28208
28222
|
/**
|
|
28209
28223
|
* Background Component with compound pattern
|
|
@@ -28265,7 +28279,8 @@ var Background = /*#__PURE__*/Object.assign(BackgroundComponent, {
|
|
|
28265
28279
|
Ripples: BackgroundView.Ripples,
|
|
28266
28280
|
Image: BackgroundView.Image,
|
|
28267
28281
|
Video: BackgroundView.Video,
|
|
28268
|
-
Gradient: BackgroundView.Gradient
|
|
28282
|
+
Gradient: BackgroundView.Gradient,
|
|
28283
|
+
Overlay: BackgroundView.Overlay
|
|
28269
28284
|
});
|
|
28270
28285
|
Background.displayName = 'Background';
|
|
28271
28286
|
|