@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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('core-js/modules/es.object.assign.js'), require('react'), require('core-js/modules/es.array.includes.js'), require('core-js/modules/es.array.iterator.js'), require('core-js/modules/es.string.includes.js'), require('core-js/modules/web.dom-collections.iterator.js'), require('core-js/modules/es.regexp.to-string.js'), require('app-studio'), require('core-js/modules/es.symbol.description.js'), require('core-js/modules/es.array-buffer.constructor.js'), require('core-js/modules/es.array-buffer.slice.js'), require('core-js/modules/es.typed-array.uint8-array.js'), require('core-js/modules/es.typed-array.fill.js'), require('core-js/modules/es.typed-array.set.js'), require('core-js/modules/es.typed-array.sort.js'), require('core-js/modules/es.typed-array.to-locale-string.js'), require('core-js/modules/es.string.starts-with.js'), require('core-js/modules/web.url.js'), require('core-js/modules/web.url.to-json.js'), require('core-js/modules/web.url-search-params.js'), require('zustand'), require('core-js/modules/es.parse-int.js'), require('react-router-dom'), require('core-js/modules/es.parse-float.js'), require('core-js/modules/es.string.ends-with.js'), require('contrast'), require('core-js/modules/es.promise.js'), require('core-js/modules/es.array.reduce.js'), require('core-js/modules/es.number.to-fixed.js'), require('date-fns/format'), require('core-js/modules/es.string.trim.js'), require('core-js/modules/es.regexp.constructor.js'), require('core-js/modules/es.regexp.exec.js'), require('formik'), require('core-js/modules/es.string.replace.js'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'core-js/modules/es.object.assign.js', 'react', 'core-js/modules/es.array.includes.js', 'core-js/modules/es.array.iterator.js', 'core-js/modules/es.string.includes.js', 'core-js/modules/web.dom-collections.iterator.js', 'core-js/modules/es.regexp.to-string.js', 'app-studio', 'core-js/modules/es.symbol.description.js', 'core-js/modules/es.array-buffer.constructor.js', 'core-js/modules/es.array-buffer.slice.js', 'core-js/modules/es.typed-array.uint8-array.js', 'core-js/modules/es.typed-array.fill.js', 'core-js/modules/es.typed-array.set.js', 'core-js/modules/es.typed-array.sort.js', 'core-js/modules/es.typed-array.to-locale-string.js', 'core-js/modules/es.string.starts-with.js', 'core-js/modules/web.url.js', 'core-js/modules/web.url.to-json.js', 'core-js/modules/web.url-search-params.js', 'zustand', 'core-js/modules/es.parse-int.js', 'react-router-dom', 'core-js/modules/es.parse-float.js', 'core-js/modules/es.string.ends-with.js', 'contrast', 'core-js/modules/es.promise.js', 'core-js/modules/es.array.reduce.js', 'core-js/modules/es.number.to-fixed.js', 'date-fns/format', 'core-js/modules/es.string.trim.js', 'core-js/modules/es.regexp.constructor.js', 'core-js/modules/es.regexp.exec.js', 'formik', 'core-js/modules/es.string.replace.js', '
|
|
4
|
-
(global = global || self, factory(global['@app-studio/web'] = {}, null, global.React, null, null, null, null, null, global.appStudio, null, null, null, null, null, null, null, null, null, null, null, null, global.zustand, null, global.reactRouterDom, null, null, global.contrast, null, null, null, global.format, null, null, null, global.formik
|
|
5
|
-
}(this, (function (exports, es_object_assign_js, React, es_array_includes_js, es_array_iterator_js, es_string_includes_js, web_domCollections_iterator_js, es_regexp_toString_js, appStudio, es_symbol_description_js, es_arrayBuffer_constructor_js, es_arrayBuffer_slice_js, es_typedArray_uint8Array_js, es_typedArray_fill_js, es_typedArray_set_js, es_typedArray_sort_js, es_typedArray_toLocaleString_js, es_string_startsWith_js, web_url_js, web_url_toJson_js, web_urlSearchParams_js, zustand, es_parseInt_js, reactRouterDom, es_parseFloat_js, es_string_endsWith_js, contrast, es_promise_js, es_array_reduce_js, es_number_toFixed_js, format, es_string_trim_js, es_regexp_constructor_js, es_regexp_exec_js, formik
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('core-js/modules/es.object.assign.js'), require('react'), require('core-js/modules/es.array.includes.js'), require('core-js/modules/es.array.iterator.js'), require('core-js/modules/es.string.includes.js'), require('core-js/modules/web.dom-collections.iterator.js'), require('core-js/modules/es.regexp.to-string.js'), require('app-studio'), require('core-js/modules/es.symbol.description.js'), require('core-js/modules/es.array-buffer.constructor.js'), require('core-js/modules/es.array-buffer.slice.js'), require('core-js/modules/es.typed-array.uint8-array.js'), require('core-js/modules/es.typed-array.fill.js'), require('core-js/modules/es.typed-array.set.js'), require('core-js/modules/es.typed-array.sort.js'), require('core-js/modules/es.typed-array.to-locale-string.js'), require('core-js/modules/es.string.starts-with.js'), require('core-js/modules/web.url.js'), require('core-js/modules/web.url.to-json.js'), require('core-js/modules/web.url-search-params.js'), require('zustand'), require('core-js/modules/es.parse-int.js'), require('react-router-dom'), require('core-js/modules/es.parse-float.js'), require('core-js/modules/es.string.ends-with.js'), require('contrast'), require('core-js/modules/es.promise.js'), require('core-js/modules/es.array.reduce.js'), require('core-js/modules/es.number.to-fixed.js'), require('date-fns/format'), require('core-js/modules/es.string.trim.js'), require('core-js/modules/es.regexp.constructor.js'), require('core-js/modules/es.regexp.exec.js'), require('formik'), require('core-js/modules/es.string.replace.js'), require('core-js/modules/es.promise.finally.js'), require('core-js/modules/es.string.match.js'), require('core-js/modules/es.string.search.js'), require('core-js/modules/es.array.flat-map.js'), require('core-js/modules/es.array.unscopables.flat-map.js')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'core-js/modules/es.object.assign.js', 'react', 'core-js/modules/es.array.includes.js', 'core-js/modules/es.array.iterator.js', 'core-js/modules/es.string.includes.js', 'core-js/modules/web.dom-collections.iterator.js', 'core-js/modules/es.regexp.to-string.js', 'app-studio', 'core-js/modules/es.symbol.description.js', 'core-js/modules/es.array-buffer.constructor.js', 'core-js/modules/es.array-buffer.slice.js', 'core-js/modules/es.typed-array.uint8-array.js', 'core-js/modules/es.typed-array.fill.js', 'core-js/modules/es.typed-array.set.js', 'core-js/modules/es.typed-array.sort.js', 'core-js/modules/es.typed-array.to-locale-string.js', 'core-js/modules/es.string.starts-with.js', 'core-js/modules/web.url.js', 'core-js/modules/web.url.to-json.js', 'core-js/modules/web.url-search-params.js', 'zustand', 'core-js/modules/es.parse-int.js', 'react-router-dom', 'core-js/modules/es.parse-float.js', 'core-js/modules/es.string.ends-with.js', 'contrast', 'core-js/modules/es.promise.js', 'core-js/modules/es.array.reduce.js', 'core-js/modules/es.number.to-fixed.js', 'date-fns/format', 'core-js/modules/es.string.trim.js', 'core-js/modules/es.regexp.constructor.js', 'core-js/modules/es.regexp.exec.js', 'formik', 'core-js/modules/es.string.replace.js', 'core-js/modules/es.promise.finally.js', 'core-js/modules/es.string.match.js', 'core-js/modules/es.string.search.js', 'core-js/modules/es.array.flat-map.js', 'core-js/modules/es.array.unscopables.flat-map.js'], factory) :
|
|
4
|
+
(global = global || self, factory(global['@app-studio/web'] = {}, null, global.React, null, null, null, null, null, global.appStudio, null, null, null, null, null, null, null, null, null, null, null, null, global.zustand, null, global.reactRouterDom, null, null, global.contrast, null, null, null, global.format, null, null, null, global.formik));
|
|
5
|
+
}(this, (function (exports, es_object_assign_js, React, es_array_includes_js, es_array_iterator_js, es_string_includes_js, web_domCollections_iterator_js, es_regexp_toString_js, appStudio, es_symbol_description_js, es_arrayBuffer_constructor_js, es_arrayBuffer_slice_js, es_typedArray_uint8Array_js, es_typedArray_fill_js, es_typedArray_set_js, es_typedArray_sort_js, es_typedArray_toLocaleString_js, es_string_startsWith_js, web_url_js, web_url_toJson_js, web_urlSearchParams_js, zustand, es_parseInt_js, reactRouterDom, es_parseFloat_js, es_string_endsWith_js, contrast, es_promise_js, es_array_reduce_js, es_number_toFixed_js, format, es_string_trim_js, es_regexp_constructor_js, es_regexp_exec_js, formik) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var React__default = 'default' in React ? React['default'] : React;
|
|
8
8
|
contrast = contrast && Object.prototype.hasOwnProperty.call(contrast, 'default') ? contrast['default'] : contrast;
|
|
@@ -14238,7 +14238,11 @@
|
|
|
14238
14238
|
disabled = false,
|
|
14239
14239
|
isAgentRunning = false,
|
|
14240
14240
|
onStopAgent,
|
|
14241
|
-
sandboxId
|
|
14241
|
+
sandboxId,
|
|
14242
|
+
onUploadProgress,
|
|
14243
|
+
onUploadSuccess,
|
|
14244
|
+
onUploadError,
|
|
14245
|
+
onFileUpload
|
|
14242
14246
|
} = props;
|
|
14243
14247
|
// Determine if the component is controlled
|
|
14244
14248
|
var isControlled = controlledValue !== undefined && controlledOnChange !== undefined;
|
|
@@ -14354,28 +14358,6 @@
|
|
|
14354
14358
|
e.stopPropagation();
|
|
14355
14359
|
setIsDraggingOver(false);
|
|
14356
14360
|
};
|
|
14357
|
-
// Upload service hook (single file at a time)
|
|
14358
|
-
var uploadFileRequest = api.UploadService.useUploadControllerFileService({
|
|
14359
|
-
onProgress: p => setUploadProgress(p || 0),
|
|
14360
|
-
onSuccess: () => {
|
|
14361
|
-
// Advance the queue
|
|
14362
|
-
setUploadQueue(prev => prev.slice(1));
|
|
14363
|
-
setIsProcessingQueue(false);
|
|
14364
|
-
currentUploadRef.current = null;
|
|
14365
|
-
setUploadProgress(0);
|
|
14366
|
-
// If queue emptied, stop uploading state
|
|
14367
|
-
setIsUploading(prev => uploadQueue.length - 1 > 0 || false);
|
|
14368
|
-
},
|
|
14369
|
-
onError: _err => {
|
|
14370
|
-
// Remove the failed file from queue and continue
|
|
14371
|
-
setUploadQueue(prev => prev.slice(1));
|
|
14372
|
-
setIsProcessingQueue(false);
|
|
14373
|
-
currentUploadRef.current = null;
|
|
14374
|
-
setUploadProgress(0);
|
|
14375
|
-
// If queue emptied, stop uploading state
|
|
14376
|
-
setIsUploading(prev => uploadQueue.length - 1 > 0 || false);
|
|
14377
|
-
}
|
|
14378
|
-
});
|
|
14379
14361
|
// Start uploading a batch of files (enqueue and process)
|
|
14380
14362
|
var startUpload = React.useCallback(files => {
|
|
14381
14363
|
if (!files || files.length === 0) return;
|
|
@@ -14388,25 +14370,33 @@
|
|
|
14388
14370
|
}, [setPendingFiles, setUploadedFiles]);
|
|
14389
14371
|
// Process upload queue sequentially
|
|
14390
14372
|
var processUploadQueue = React.useCallback(() => {
|
|
14391
|
-
if (uploadQueue.length > 0 && !isProcessingQueue &&
|
|
14373
|
+
if (uploadQueue.length > 0 && !isProcessingQueue && onFileUpload) {
|
|
14392
14374
|
setIsProcessingQueue(true);
|
|
14393
14375
|
var nextFile = uploadQueue[0];
|
|
14394
14376
|
currentUploadRef.current = nextFile;
|
|
14395
14377
|
setUploadProgress(0);
|
|
14396
|
-
//
|
|
14397
|
-
|
|
14398
|
-
|
|
14399
|
-
})
|
|
14378
|
+
// Execute user-provided upload function
|
|
14379
|
+
try {
|
|
14380
|
+
onFileUpload(nextFile);
|
|
14381
|
+
} catch (err) {
|
|
14382
|
+
// Handle synchronous errors
|
|
14383
|
+
setUploadQueue(prev => prev.slice(1));
|
|
14384
|
+
setIsProcessingQueue(false);
|
|
14385
|
+
currentUploadRef.current = null;
|
|
14386
|
+
setUploadProgress(0);
|
|
14387
|
+
setIsUploading(prev => uploadQueue.length - 1 > 0 || false);
|
|
14388
|
+
onUploadError == null || onUploadError(err);
|
|
14389
|
+
}
|
|
14400
14390
|
} else if (uploadQueue.length === 0 && isUploading) {
|
|
14401
14391
|
// Nothing left to upload
|
|
14402
14392
|
setIsUploading(false);
|
|
14403
14393
|
setUploadProgress(0);
|
|
14404
14394
|
}
|
|
14405
|
-
}, [uploadQueue, isProcessingQueue,
|
|
14406
|
-
// Effect: process whenever queue
|
|
14395
|
+
}, [uploadQueue, isProcessingQueue, onFileUpload, isUploading, onUploadError]);
|
|
14396
|
+
// Effect: process whenever queue changes
|
|
14407
14397
|
React.useEffect(() => {
|
|
14408
14398
|
processUploadQueue();
|
|
14409
|
-
}, [uploadQueue, isProcessingQueue,
|
|
14399
|
+
}, [uploadQueue, isProcessingQueue, processUploadQueue]);
|
|
14410
14400
|
// Mock function for subscription status
|
|
14411
14401
|
var subscriptionStatus = 'active';
|
|
14412
14402
|
// Mock function to check if user can access a model
|
|
@@ -16913,11 +16903,6 @@
|
|
|
16913
16903
|
var FormikOTPInput = OTPInputComponent$1;
|
|
16914
16904
|
|
|
16915
16905
|
var _excluded$T = ["name", "uploadFile", "onUploadSuccess", "onUploadError", "transformResponse", "onMultipleFileSelect", "onFileSelect", "multiple"];
|
|
16916
|
-
var defaultUploadFile = (file, onProgress) => {
|
|
16917
|
-
return api.UploadService.uploadControllerFile({
|
|
16918
|
-
file
|
|
16919
|
-
}, onProgress);
|
|
16920
|
-
};
|
|
16921
16906
|
var toArrayValue = value => {
|
|
16922
16907
|
if (Array.isArray(value)) {
|
|
16923
16908
|
return value;
|
|
@@ -16930,7 +16915,7 @@
|
|
|
16930
16915
|
var FormikUploader = _ref => {
|
|
16931
16916
|
var {
|
|
16932
16917
|
name,
|
|
16933
|
-
uploadFile
|
|
16918
|
+
uploadFile,
|
|
16934
16919
|
onUploadSuccess,
|
|
16935
16920
|
onUploadError,
|
|
16936
16921
|
transformResponse,
|
|
@@ -19470,7 +19455,7 @@
|
|
|
19470
19455
|
})));
|
|
19471
19456
|
};
|
|
19472
19457
|
|
|
19473
|
-
var _excluded$$ = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "responsive", "
|
|
19458
|
+
var _excluded$$ = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "responsive", "views", "highlightAnimate", "animate", "animationLoop", "highlightAnimationLoop", "highlightTypewriter", "highlightTypewriterDuration", "highlightSlide", "highlightSlideDuration", "highlightSlideStagger", "highlightSlideSequential"];
|
|
19474
19459
|
function escapeRegExp(string) {
|
|
19475
19460
|
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
19476
19461
|
}
|
|
@@ -19483,7 +19468,6 @@
|
|
|
19483
19468
|
highlightSecondaryColor,
|
|
19484
19469
|
size = 'lg',
|
|
19485
19470
|
responsive = true,
|
|
19486
|
-
centered = false,
|
|
19487
19471
|
views,
|
|
19488
19472
|
highlightAnimate,
|
|
19489
19473
|
animate,
|
|
@@ -19598,7 +19582,6 @@
|
|
|
19598
19582
|
fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
|
|
19599
19583
|
letterSpacing: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.letterSpacing : undefined,
|
|
19600
19584
|
marginBottom: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.marginBottom : undefined,
|
|
19601
|
-
textAlign: centered ? 'center' : 'left',
|
|
19602
19585
|
animate: inView ? controlledAnimate : undefined,
|
|
19603
19586
|
media: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.media : undefined
|
|
19604
19587
|
}, views == null ? void 0 : views.container, props), parts.map((part, idx) => typeof part === 'string' ? part : (/*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
|
|
@@ -19632,7 +19615,6 @@
|
|
|
19632
19615
|
fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
|
|
19633
19616
|
letterSpacing: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.letterSpacing : undefined,
|
|
19634
19617
|
marginBottom: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.marginBottom : undefined,
|
|
19635
|
-
textAlign: centered ? 'center' : 'left',
|
|
19636
19618
|
animate: inView ? controlledAnimate : undefined,
|
|
19637
19619
|
media: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.media : undefined
|
|
19638
19620
|
}, views == null ? void 0 : views.container, props), /*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
|
|
@@ -19664,7 +19646,6 @@
|
|
|
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), text);
|
|
@@ -24275,15 +24256,22 @@
|
|
|
24275
24256
|
};
|
|
24276
24257
|
var Pagination = PaginationComponent;
|
|
24277
24258
|
|
|
24278
|
-
var _excluded$1a = ["value", "max", "color", "backgroundColor", "height", "radius", "views", "themeMode"];
|
|
24259
|
+
var _excluded$1a = ["shape", "value", "max", "color", "backgroundColor", "height", "size", "radius", "strokeWidth", "showLabel", "labelColor", "animated", "animationDuration", "views", "themeMode"];
|
|
24279
24260
|
var ProgressBarView = _ref => {
|
|
24280
24261
|
var {
|
|
24262
|
+
shape = 'linear',
|
|
24281
24263
|
value = 0,
|
|
24282
24264
|
max = 100,
|
|
24283
24265
|
color = 'theme.primary',
|
|
24284
24266
|
backgroundColor = 'color.gray.200',
|
|
24285
|
-
height
|
|
24267
|
+
height,
|
|
24268
|
+
size,
|
|
24286
24269
|
radius = 4,
|
|
24270
|
+
strokeWidth = 10,
|
|
24271
|
+
showLabel = false,
|
|
24272
|
+
labelColor = 'theme.text.primary',
|
|
24273
|
+
animated = true,
|
|
24274
|
+
animationDuration = '0.5s',
|
|
24287
24275
|
views,
|
|
24288
24276
|
themeMode: elementMode
|
|
24289
24277
|
} = _ref,
|
|
@@ -24293,20 +24281,78 @@
|
|
|
24293
24281
|
themeMode
|
|
24294
24282
|
} = appStudio.useTheme();
|
|
24295
24283
|
var currentMode = elementMode ? elementMode : themeMode;
|
|
24296
|
-
var
|
|
24284
|
+
var validValue = Math.min(max, Math.max(0, value));
|
|
24285
|
+
var percentage = validValue / max * 100;
|
|
24297
24286
|
var trackColor = getColor(backgroundColor, {
|
|
24298
24287
|
themeMode: currentMode
|
|
24299
24288
|
});
|
|
24300
24289
|
var barColor = getColor(color, {
|
|
24301
24290
|
themeMode: currentMode
|
|
24302
24291
|
});
|
|
24292
|
+
if (shape === 'circle') {
|
|
24293
|
+
var circleSize = size || (typeof height === 'number' ? height : 100);
|
|
24294
|
+
var radiusCalc = (circleSize - strokeWidth) / 2;
|
|
24295
|
+
var circumference = 2 * Math.PI * radiusCalc;
|
|
24296
|
+
var offset = circumference - percentage / 100 * circumference;
|
|
24297
|
+
return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
24298
|
+
width: circleSize,
|
|
24299
|
+
height: circleSize,
|
|
24300
|
+
position: "relative",
|
|
24301
|
+
display: "flex",
|
|
24302
|
+
alignItems: "center",
|
|
24303
|
+
justifyContent: "center"
|
|
24304
|
+
}, views == null ? void 0 : views.container, props), /*#__PURE__*/React__default.createElement("svg", {
|
|
24305
|
+
width: circleSize,
|
|
24306
|
+
height: circleSize,
|
|
24307
|
+
viewBox: "0 0 " + circleSize + " " + circleSize,
|
|
24308
|
+
style: {
|
|
24309
|
+
transform: 'rotate(-90deg)'
|
|
24310
|
+
}
|
|
24311
|
+
}, /*#__PURE__*/React__default.createElement("circle", Object.assign({
|
|
24312
|
+
cx: circleSize / 2,
|
|
24313
|
+
cy: circleSize / 2,
|
|
24314
|
+
r: radiusCalc,
|
|
24315
|
+
stroke: trackColor,
|
|
24316
|
+
strokeWidth: strokeWidth,
|
|
24317
|
+
fill: "transparent"
|
|
24318
|
+
}, views == null ? void 0 : views.track)), /*#__PURE__*/React__default.createElement("circle", Object.assign({
|
|
24319
|
+
cx: circleSize / 2,
|
|
24320
|
+
cy: circleSize / 2,
|
|
24321
|
+
r: radiusCalc,
|
|
24322
|
+
stroke: barColor,
|
|
24323
|
+
strokeWidth: strokeWidth,
|
|
24324
|
+
strokeDasharray: circumference,
|
|
24325
|
+
strokeDashoffset: offset,
|
|
24326
|
+
strokeLinecap: "round",
|
|
24327
|
+
fill: "transparent",
|
|
24328
|
+
style: {
|
|
24329
|
+
transition: animated ? "stroke-dashoffset " + animationDuration + " ease-in-out" : 'none'
|
|
24330
|
+
}
|
|
24331
|
+
}, views == null ? void 0 : views.indicator))), showLabel && (/*#__PURE__*/React__default.createElement(appStudio.View, {
|
|
24332
|
+
position: "absolute",
|
|
24333
|
+
top: 0,
|
|
24334
|
+
left: 0,
|
|
24335
|
+
right: 0,
|
|
24336
|
+
bottom: 0,
|
|
24337
|
+
display: "flex",
|
|
24338
|
+
alignItems: "center",
|
|
24339
|
+
justifyContent: "center",
|
|
24340
|
+
pointerEvents: "none"
|
|
24341
|
+
}, /*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
|
|
24342
|
+
color: labelColor,
|
|
24343
|
+
fontSize: circleSize * 0.2 + "px",
|
|
24344
|
+
fontWeight: "bold"
|
|
24345
|
+
}, views == null ? void 0 : views.text), Math.round(percentage), "%"))));
|
|
24346
|
+
}
|
|
24347
|
+
// Linear Progress Bar
|
|
24348
|
+
var linearHeight = height || 8;
|
|
24303
24349
|
return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
24304
24350
|
role: "progressbar",
|
|
24305
24351
|
"aria-valuenow": value,
|
|
24306
24352
|
"aria-valuemin": 0,
|
|
24307
24353
|
"aria-valuemax": max,
|
|
24308
24354
|
width: "100%",
|
|
24309
|
-
height:
|
|
24355
|
+
height: linearHeight,
|
|
24310
24356
|
backgroundColor: trackColor,
|
|
24311
24357
|
borderRadius: radius,
|
|
24312
24358
|
overflow: "hidden"
|
|
@@ -24314,12 +24360,16 @@
|
|
|
24314
24360
|
width: percentage + "%",
|
|
24315
24361
|
height: "100%",
|
|
24316
24362
|
backgroundColor: barColor,
|
|
24317
|
-
borderRadius: radius
|
|
24363
|
+
borderRadius: radius,
|
|
24364
|
+
style: {
|
|
24365
|
+
transition: animated ? "width " + animationDuration + " ease-in-out" : 'none'
|
|
24366
|
+
}
|
|
24318
24367
|
}, views == null ? void 0 : views.bar)));
|
|
24319
24368
|
};
|
|
24320
24369
|
|
|
24321
24370
|
/**
|
|
24322
24371
|
* ProgressBar component displays completion status of a task or process.
|
|
24372
|
+
* Supports both linear and circular shapes.
|
|
24323
24373
|
*/
|
|
24324
24374
|
var ProgressBarComponent = props => (/*#__PURE__*/React__default.createElement(ProgressBarView, Object.assign({}, props)));
|
|
24325
24375
|
var ProgressBar = ProgressBarComponent;
|
|
@@ -27369,16 +27419,10 @@
|
|
|
27369
27419
|
backgroundRepeat: 'no-repeat',
|
|
27370
27420
|
backgroundAttachment: 'scroll'
|
|
27371
27421
|
},
|
|
27372
|
-
overlay: {
|
|
27373
|
-
position: 'absolute',
|
|
27374
|
-
top: 0,
|
|
27375
|
-
left: 0,
|
|
27376
|
-
width: '100%',
|
|
27377
|
-
height: '100%',
|
|
27378
|
-
pointerEvents: 'none'
|
|
27379
|
-
},
|
|
27380
27422
|
content: {
|
|
27381
27423
|
position: 'relative',
|
|
27424
|
+
width: '100%',
|
|
27425
|
+
height: '100%',
|
|
27382
27426
|
zIndex: 2
|
|
27383
27427
|
}
|
|
27384
27428
|
};
|
|
@@ -27402,14 +27446,6 @@
|
|
|
27402
27446
|
height: '100%',
|
|
27403
27447
|
objectFit: 'cover'
|
|
27404
27448
|
},
|
|
27405
|
-
overlay: {
|
|
27406
|
-
position: 'absolute',
|
|
27407
|
-
top: 0,
|
|
27408
|
-
left: 0,
|
|
27409
|
-
width: '100%',
|
|
27410
|
-
height: '100%',
|
|
27411
|
-
pointerEvents: 'none'
|
|
27412
|
-
},
|
|
27413
27449
|
content: {
|
|
27414
27450
|
position: 'relative',
|
|
27415
27451
|
zIndex: 2
|
|
@@ -27678,7 +27714,8 @@
|
|
|
27678
27714
|
_excluded7$1 = ["children", "src", "backgroundSize", "backgroundPosition", "backgroundRepeat", "backgroundAttachment", "imageOpacity", "overlay", "blendMode", "views", "themeMode"],
|
|
27679
27715
|
_excluded8$1 = ["children", "src", "autoPlay", "loop", "muted", "playsInline", "overlay", "blendMode", "views", "themeMode"],
|
|
27680
27716
|
_excluded9$1 = ["children"],
|
|
27681
|
-
_excluded10$1 = ["
|
|
27717
|
+
_excluded10$1 = ["contentPosition"],
|
|
27718
|
+
_excluded11$1 = ["children", "views"];
|
|
27682
27719
|
// Background Context
|
|
27683
27720
|
var BackgroundContext = /*#__PURE__*/React.createContext({});
|
|
27684
27721
|
/**
|
|
@@ -28072,15 +28109,11 @@
|
|
|
28072
28109
|
backgroundRepeat = 'no-repeat',
|
|
28073
28110
|
backgroundAttachment = 'scroll',
|
|
28074
28111
|
imageOpacity = 1,
|
|
28075
|
-
overlay,
|
|
28112
|
+
overlay = null,
|
|
28076
28113
|
blendMode = 'normal',
|
|
28077
|
-
views
|
|
28078
|
-
themeMode: elementMode
|
|
28114
|
+
views
|
|
28079
28115
|
} = _ref7,
|
|
28080
28116
|
props = _objectWithoutPropertiesLoose(_ref7, _excluded7$1);
|
|
28081
|
-
var {
|
|
28082
|
-
getColor
|
|
28083
|
-
} = appStudio.useTheme();
|
|
28084
28117
|
var imageStyle = Object.assign({}, BackgroundImageStyles.image, {
|
|
28085
28118
|
backgroundImage: "url(" + src + ")",
|
|
28086
28119
|
backgroundSize,
|
|
@@ -28089,17 +28122,9 @@
|
|
|
28089
28122
|
backgroundAttachment,
|
|
28090
28123
|
opacity: imageOpacity
|
|
28091
28124
|
});
|
|
28092
|
-
var overlayStyle = overlay ? Object.assign({}, BackgroundImageStyles.overlay, {
|
|
28093
|
-
backgroundColor: getColor(overlay, elementMode ? {
|
|
28094
|
-
themeMode: elementMode
|
|
28095
|
-
} : undefined),
|
|
28096
|
-
mixBlendMode: blendMode
|
|
28097
|
-
}) : {};
|
|
28098
28125
|
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({
|
|
28099
28126
|
style: imageStyle
|
|
28100
|
-
}, views == null ? void 0 : views.image)), overlay && /*#__PURE__*/React__default.createElement(appStudio.View, {
|
|
28101
|
-
style: overlayStyle
|
|
28102
|
-
}), children && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, BackgroundImageStyles.content, views == null ? void 0 : views.content), children)));
|
|
28127
|
+
}, 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)));
|
|
28103
28128
|
};
|
|
28104
28129
|
/**
|
|
28105
28130
|
* Background Video Component
|
|
@@ -28112,21 +28137,11 @@
|
|
|
28112
28137
|
loop = true,
|
|
28113
28138
|
muted = true,
|
|
28114
28139
|
playsInline = true,
|
|
28115
|
-
overlay,
|
|
28140
|
+
overlay = null,
|
|
28116
28141
|
blendMode = 'normal',
|
|
28117
|
-
views
|
|
28118
|
-
themeMode: elementMode
|
|
28142
|
+
views
|
|
28119
28143
|
} = _ref8,
|
|
28120
28144
|
props = _objectWithoutPropertiesLoose(_ref8, _excluded8$1);
|
|
28121
|
-
var {
|
|
28122
|
-
getColor
|
|
28123
|
-
} = appStudio.useTheme();
|
|
28124
|
-
var overlayStyle = overlay ? Object.assign({}, BackgroundVideoStyles.overlay, {
|
|
28125
|
-
backgroundColor: getColor(overlay, elementMode ? {
|
|
28126
|
-
themeMode: elementMode
|
|
28127
|
-
} : undefined),
|
|
28128
|
-
mixBlendMode: blendMode
|
|
28129
|
-
}) : {};
|
|
28130
28145
|
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({
|
|
28131
28146
|
as: "video",
|
|
28132
28147
|
src: src,
|
|
@@ -28135,9 +28150,7 @@
|
|
|
28135
28150
|
muted: muted,
|
|
28136
28151
|
playsInline: playsInline,
|
|
28137
28152
|
style: BackgroundVideoStyles.video
|
|
28138
|
-
}, views == null ? void 0 : views.video)), overlay && /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
28139
|
-
style: overlayStyle
|
|
28140
|
-
}, views == null ? void 0 : views.overlay)), children && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, BackgroundVideoStyles.content, views == null ? void 0 : views.content), children)));
|
|
28153
|
+
}, 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)));
|
|
28141
28154
|
};
|
|
28142
28155
|
/**
|
|
28143
28156
|
* Background Gradient Component
|
|
@@ -28150,12 +28163,48 @@
|
|
|
28150
28163
|
gradientProps = _objectWithoutPropertiesLoose(_ref9, _excluded9$1);
|
|
28151
28164
|
return /*#__PURE__*/React__default.createElement(Gradient, Object.assign({}, gradientProps), children);
|
|
28152
28165
|
};
|
|
28153
|
-
|
|
28166
|
+
/**
|
|
28167
|
+
* Background Overlay Component
|
|
28168
|
+
*/
|
|
28169
|
+
var BackgroundOverlay = _ref10 => {
|
|
28154
28170
|
var {
|
|
28155
|
-
|
|
28156
|
-
views
|
|
28171
|
+
contentPosition
|
|
28157
28172
|
} = _ref10,
|
|
28158
28173
|
props = _objectWithoutPropertiesLoose(_ref10, _excluded10$1);
|
|
28174
|
+
var getDefaultOverlay = () => {
|
|
28175
|
+
switch (contentPosition) {
|
|
28176
|
+
case 'left':
|
|
28177
|
+
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%)';
|
|
28178
|
+
case 'right':
|
|
28179
|
+
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%)';
|
|
28180
|
+
case 'top':
|
|
28181
|
+
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%)';
|
|
28182
|
+
case 'bottom':
|
|
28183
|
+
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%)';
|
|
28184
|
+
case 'center':
|
|
28185
|
+
return 'radial-gradient(circle at 50% 90%, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%)';
|
|
28186
|
+
default:
|
|
28187
|
+
return 'rgba(0,0,0,0.5)';
|
|
28188
|
+
}
|
|
28189
|
+
};
|
|
28190
|
+
var background = getDefaultOverlay();
|
|
28191
|
+
return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
28192
|
+
position: "absolute",
|
|
28193
|
+
top: 0,
|
|
28194
|
+
left: 0,
|
|
28195
|
+
width: "100%",
|
|
28196
|
+
height: "100%",
|
|
28197
|
+
background: background,
|
|
28198
|
+
pointerEvents: "none",
|
|
28199
|
+
zIndex: 1
|
|
28200
|
+
}, props));
|
|
28201
|
+
};
|
|
28202
|
+
var BackgroundViewBase = _ref11 => {
|
|
28203
|
+
var {
|
|
28204
|
+
children,
|
|
28205
|
+
views
|
|
28206
|
+
} = _ref11,
|
|
28207
|
+
props = _objectWithoutPropertiesLoose(_ref11, _excluded11$1);
|
|
28159
28208
|
return /*#__PURE__*/React__default.createElement(BackgroundContext.Provider, {
|
|
28160
28209
|
value: {}
|
|
28161
28210
|
}, /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, DefaultBackgroundStyles.container, views == null ? void 0 : views.container, props), children));
|
|
@@ -28172,6 +28221,7 @@
|
|
|
28172
28221
|
BackgroundView.Image = BackgroundImage;
|
|
28173
28222
|
BackgroundView.Video = BackgroundVideo;
|
|
28174
28223
|
BackgroundView.Gradient = BackgroundGradient;
|
|
28224
|
+
BackgroundView.Overlay = BackgroundOverlay;
|
|
28175
28225
|
|
|
28176
28226
|
/**
|
|
28177
28227
|
* Background Component with compound pattern
|
|
@@ -28233,7 +28283,8 @@
|
|
|
28233
28283
|
Ripples: BackgroundView.Ripples,
|
|
28234
28284
|
Image: BackgroundView.Image,
|
|
28235
28285
|
Video: BackgroundView.Video,
|
|
28236
|
-
Gradient: BackgroundView.Gradient
|
|
28286
|
+
Gradient: BackgroundView.Gradient,
|
|
28287
|
+
Overlay: BackgroundView.Overlay
|
|
28237
28288
|
});
|
|
28238
28289
|
Background.displayName = 'Background';
|
|
28239
28290
|
|