@app-studio/web 0.8.81 → 0.8.82
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/Gradient/Gradient/Gradient.style.d.ts +16 -15
- package/dist/components/OTPInput/OTPInput/OTPInput.props.d.ts +3 -0
- package/dist/components/OTPInput/OTPInput/OTPInput.state.d.ts +2 -1
- package/dist/components/OTPInput/OTPInput/OTPInput.view.d.ts +1 -0
- package/dist/components/Sidebar/Sidebar/Sidebar.view.d.ts +1 -1
- package/dist/web.cjs.development.js +99 -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 +99 -108
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +100 -110
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
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.parse-float.js'), require('react-router-dom'), 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('core-js/modules/es.string.starts-with.js'), require('date-fns/format'), require('core-js/modules/es.parse-int.js'), require('core-js/modules/es.regexp.constructor.js'), require('core-js/modules/es.regexp.exec.js'), require('formik'), 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.string.ends-with.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.parse-float.js', 'react-router-dom', 'core-js/modules/es.promise.js', 'core-js/modules/es.array.reduce.js', 'core-js/modules/es.number.to-fixed.js', 'core-js/modules/es.string.starts-with.js', 'date-fns/format', 'core-js/modules/es.parse-int.js', 'core-js/modules/es.regexp.constructor.js', 'core-js/modules/es.regexp.exec.js', 'formik', '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.string.ends-with.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) :
|
|
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.parse-float.js'), require('react-router-dom'), 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('core-js/modules/es.string.starts-with.js'), require('date-fns/format'), require('core-js/modules/es.parse-int.js'), require('core-js/modules/es.regexp.constructor.js'), require('core-js/modules/es.regexp.exec.js'), require('formik'), 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.string.ends-with.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'), require('core-js/modules/es.string.trim.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.parse-float.js', 'react-router-dom', 'core-js/modules/es.promise.js', 'core-js/modules/es.array.reduce.js', 'core-js/modules/es.number.to-fixed.js', 'core-js/modules/es.string.starts-with.js', 'date-fns/format', 'core-js/modules/es.parse-int.js', 'core-js/modules/es.regexp.constructor.js', 'core-js/modules/es.regexp.exec.js', 'formik', '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.string.ends-with.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', 'core-js/modules/es.string.trim.js'], factory) :
|
|
4
4
|
(global = global || self, factory(global['@app-studio/web'] = {}, null, global.React, null, null, null, null, null, global.appStudio, null, null, global.reactRouterDom, null, null, null, null, global.format, null, null, null, global.formik, null, null, null, global.zustand));
|
|
5
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_parseFloat_js, reactRouterDom, es_promise_js, es_array_reduce_js, es_number_toFixed_js, es_string_startsWith_js, format, es_parseInt_js, es_regexp_constructor_js, es_regexp_exec_js, formik, web_url_js, web_url_toJson_js, web_urlSearchParams_js, zustand) { 'use strict';
|
|
6
6
|
|
|
@@ -3736,7 +3736,9 @@
|
|
|
3736
3736
|
var hovering = isHovered && effect === 'hover';
|
|
3737
3737
|
var reverse = isHovered && effect === 'reverse';
|
|
3738
3738
|
// Determine if the button color is light or dark for proper contrast
|
|
3739
|
-
var
|
|
3739
|
+
var buttonMode = elementMode ? elementMode : themeMode;
|
|
3740
|
+
var reverseMode = reverse && buttonMode == 'light' ? 'dark' : "light"; // Slightly darker
|
|
3741
|
+
var isLight = contrast(getColor(buttonColor, buttonMode)) == 'light';
|
|
3740
3742
|
// Define button variants with effect support
|
|
3741
3743
|
var ButtonVariants = {
|
|
3742
3744
|
filled: {
|
|
@@ -3746,12 +3748,12 @@
|
|
|
3746
3748
|
borderStyle: 'solid',
|
|
3747
3749
|
borderColor: reverse ? buttonColor : 'transparent',
|
|
3748
3750
|
_hover: {
|
|
3749
|
-
|
|
3750
|
-
transform: 'translateY(-
|
|
3751
|
+
themeMode: reverse && buttonMode == 'light' ? 'light' : "dark",
|
|
3752
|
+
transform: 'translateY(-1px)',
|
|
3751
3753
|
boxShadow: '0 4px 8px rgba(0, 0, 0, 0.1)'
|
|
3752
3754
|
},
|
|
3753
3755
|
_active: {
|
|
3754
|
-
|
|
3756
|
+
themeMode: reverse && buttonMode == 'light' ? 'light' : "dark",
|
|
3755
3757
|
transform: 'translateY(0)',
|
|
3756
3758
|
boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)'
|
|
3757
3759
|
}
|
|
@@ -3763,12 +3765,12 @@
|
|
|
3763
3765
|
borderColor: reverse ? buttonColor : colorScheme,
|
|
3764
3766
|
color: reverse ? 'white' : buttonColor,
|
|
3765
3767
|
_hover: {
|
|
3766
|
-
|
|
3767
|
-
transform: 'translateY(-
|
|
3768
|
+
themeMode: reverse ? reverseMode : buttonMode,
|
|
3769
|
+
transform: 'translateY(-1px)',
|
|
3768
3770
|
boxShadow: '0 4px 8px rgba(0, 0, 0, 0.05)'
|
|
3769
3771
|
},
|
|
3770
3772
|
_active: {
|
|
3771
|
-
|
|
3773
|
+
themeMode: reverse ? reverseMode : buttonMode,
|
|
3772
3774
|
transform: 'translateY(0)',
|
|
3773
3775
|
boxShadow: '0 2px 4px rgba(0, 0, 0, 0.05)'
|
|
3774
3776
|
}
|
|
@@ -3796,11 +3798,11 @@
|
|
|
3796
3798
|
borderStyle: 'none',
|
|
3797
3799
|
borderColor: 'transparent',
|
|
3798
3800
|
_hover: {
|
|
3799
|
-
|
|
3800
|
-
transform: 'translateY(-
|
|
3801
|
+
themeMode: reverse ? reverseMode : buttonMode,
|
|
3802
|
+
transform: 'translateY(-1px)'
|
|
3801
3803
|
},
|
|
3802
3804
|
_active: {
|
|
3803
|
-
|
|
3805
|
+
themeMode: reverse ? reverseMode : buttonMode,
|
|
3804
3806
|
transform: 'translateY(0)'
|
|
3805
3807
|
}
|
|
3806
3808
|
}
|
|
@@ -4411,7 +4413,7 @@
|
|
|
4411
4413
|
_excluded3$5 = ["views", "children"],
|
|
4412
4414
|
_excluded4$4 = ["children", "views"],
|
|
4413
4415
|
_excluded5$1 = ["children", "views", "style"],
|
|
4414
|
-
_excluded6$1 = ["children", "defaultActiveIndex", "activeIndex", "onChange", "showNavigation", "navigationPosition", "prevButton", "nextButton", "showIndicators", "indicatorPosition", "indicatorVariant", "autoPlay", "autoPlayInterval", "pauseOnHover", "infinite", "direction", "transitionDuration", "views", "themeMode"];
|
|
4416
|
+
_excluded6$1 = ["children", "defaultActiveIndex", "activeIndex", "onChange", "showNavigation", "navigationPosition", "prevButton", "nextButton", "showIndicators", "indicatorPosition", "indicatorVariant", "autoPlay", "autoPlayInterval", "pauseOnHover", "infinite", "direction", "transitionDuration", "views", "stepIndices", "themeMode"];
|
|
4415
4417
|
var CarouselSlide = _ref => {
|
|
4416
4418
|
var {
|
|
4417
4419
|
children,
|
|
@@ -6304,17 +6306,6 @@
|
|
|
6304
6306
|
_focus: {
|
|
6305
6307
|
borderColor: 'theme.primary',
|
|
6306
6308
|
boxShadow: '0 0 0 1px rgba(66, 153, 225, 0.2)'
|
|
6307
|
-
},
|
|
6308
|
-
'@media (prefers-color-scheme: dark)': {
|
|
6309
|
-
backgroundColor: 'color.gray.800',
|
|
6310
|
-
borderColor: 'color.gray.700',
|
|
6311
|
-
_hover: {
|
|
6312
|
-
borderColor: 'color.gray.600'
|
|
6313
|
-
},
|
|
6314
|
-
_focus: {
|
|
6315
|
-
borderColor: 'theme.primary',
|
|
6316
|
-
boxShadow: '0 0 0 1px rgba(66, 153, 225, 0.4)'
|
|
6317
|
-
}
|
|
6318
6309
|
}
|
|
6319
6310
|
},
|
|
6320
6311
|
default: {
|
|
@@ -6330,16 +6321,6 @@
|
|
|
6330
6321
|
},
|
|
6331
6322
|
_focus: {
|
|
6332
6323
|
borderBottomColor: 'theme.primary'
|
|
6333
|
-
},
|
|
6334
|
-
'@media (prefers-color-scheme: dark)': {
|
|
6335
|
-
backgroundColor: 'color.gray.800',
|
|
6336
|
-
borderBottomColor: 'color.gray.700',
|
|
6337
|
-
_hover: {
|
|
6338
|
-
borderBottomColor: 'color.gray.600'
|
|
6339
|
-
},
|
|
6340
|
-
_focus: {
|
|
6341
|
-
borderBottomColor: 'theme.primary'
|
|
6342
|
-
}
|
|
6343
6324
|
}
|
|
6344
6325
|
},
|
|
6345
6326
|
none: {
|
|
@@ -6471,7 +6452,7 @@
|
|
|
6471
6452
|
}
|
|
6472
6453
|
};
|
|
6473
6454
|
|
|
6474
|
-
var _excluded$l = ["children", "heading", "isItalic", "isUnderlined", "isStriked", "weight", "size"];
|
|
6455
|
+
var _excluded$l = ["children", "heading", "isItalic", "isUnderlined", "isStriked", "weight", "size", "dropDown"];
|
|
6475
6456
|
var LabelView = _ref => {
|
|
6476
6457
|
var {
|
|
6477
6458
|
children,
|
|
@@ -6681,11 +6662,7 @@
|
|
|
6681
6662
|
// State properties
|
|
6682
6663
|
cursor: isDisabled ? 'not-allowed' : 'pointer',
|
|
6683
6664
|
// Animation
|
|
6684
|
-
transition: 'all 0.2s ease'
|
|
6685
|
-
// Dark mode support
|
|
6686
|
-
'@media (prefers-color-scheme: dark)': {
|
|
6687
|
-
color: isDisabled ? 'color.gray.600' : 'color.gray.100'
|
|
6688
|
-
}
|
|
6665
|
+
transition: 'all 0.2s ease'
|
|
6689
6666
|
}, views['field'], views['text']);
|
|
6690
6667
|
var option = options.length > 0 && options.find(option => option.value === value);
|
|
6691
6668
|
return /*#__PURE__*/React__default.createElement(Text, Object.assign({}, fieldStyles), (value === '' || Array.isArray(value) && value.length === 0) && !!placeholder ? placeholder : (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, typeof value === 'string' ? (_ref3 = option && option.label) != null ? _ref3 : value :
|
|
@@ -6744,9 +6721,7 @@
|
|
|
6744
6721
|
var DropDown = _ref5 => {
|
|
6745
6722
|
var {
|
|
6746
6723
|
size,
|
|
6747
|
-
views = {
|
|
6748
|
-
dropDown: {}
|
|
6749
|
-
},
|
|
6724
|
+
views = {},
|
|
6750
6725
|
options,
|
|
6751
6726
|
callback = () => {},
|
|
6752
6727
|
highlightedIndex,
|
|
@@ -6796,7 +6771,7 @@
|
|
|
6796
6771
|
borderRadius: '4px'
|
|
6797
6772
|
}
|
|
6798
6773
|
}
|
|
6799
|
-
}, shadow, views
|
|
6774
|
+
}, shadow, views == null ? void 0 : views.dropDown), options.length > 0 && options.map((option, index) => (/*#__PURE__*/React__default.createElement(Item, Object.assign({
|
|
6800
6775
|
key: option.value,
|
|
6801
6776
|
size: size,
|
|
6802
6777
|
style: views['text'],
|
|
@@ -7106,7 +7081,7 @@
|
|
|
7106
7081
|
}
|
|
7107
7082
|
};
|
|
7108
7083
|
|
|
7109
|
-
var _excluded$p = ["id", "name", "label", "inActiveChild", "activeChild", "labelPosition", "shadow", "size", "value", "isHovered", "isDisabled", "isReadOnly", "on", "setOn", "onChange", "setValue", "setIsHovered", "helperText", "views"];
|
|
7084
|
+
var _excluded$p = ["id", "name", "label", "inActiveChild", "isChecked", "activeChild", "labelPosition", "shadow", "size", "value", "isHovered", "isDisabled", "isReadOnly", "on", "setOn", "onChange", "setValue", "setIsHovered", "helperText", "views"];
|
|
7110
7085
|
var SwitchContent = props => /*#__PURE__*/React__default.createElement(appStudio.Input, Object.assign({
|
|
7111
7086
|
type: "checkbox"
|
|
7112
7087
|
}, props));
|
|
@@ -7513,11 +7488,7 @@
|
|
|
7513
7488
|
// State properties
|
|
7514
7489
|
cursor: isDisabled ? 'not-allowed' : 'text',
|
|
7515
7490
|
// Animation
|
|
7516
|
-
transition: 'all 0.2s ease'
|
|
7517
|
-
// Dark mode support
|
|
7518
|
-
'@media (prefers-color-scheme: dark)': {
|
|
7519
|
-
color: isDisabled ? 'color.gray.600' : 'color.gray.100'
|
|
7520
|
-
}
|
|
7491
|
+
transition: 'all 0.2s ease'
|
|
7521
7492
|
}, views['field']);
|
|
7522
7493
|
var handleFocus = () => {
|
|
7523
7494
|
setIsFocused(true);
|
|
@@ -9498,8 +9469,8 @@
|
|
|
9498
9469
|
var showLabel = !!(label && (isFocused || value));
|
|
9499
9470
|
var fieldStyles = Object.assign({
|
|
9500
9471
|
margin: 0,
|
|
9501
|
-
|
|
9502
|
-
|
|
9472
|
+
paddingVertical: 8,
|
|
9473
|
+
paddingHorizontal: 0,
|
|
9503
9474
|
width: '100%',
|
|
9504
9475
|
heigth: '100%',
|
|
9505
9476
|
border: 'none',
|
|
@@ -9963,6 +9934,12 @@
|
|
|
9963
9934
|
onChange,
|
|
9964
9935
|
onChangeText,
|
|
9965
9936
|
onComplete,
|
|
9937
|
+
onKeyDown,
|
|
9938
|
+
onKeyPress,
|
|
9939
|
+
onBlur,
|
|
9940
|
+
onFocus,
|
|
9941
|
+
isReadOnly,
|
|
9942
|
+
isDisabled,
|
|
9966
9943
|
pattern,
|
|
9967
9944
|
stepValues,
|
|
9968
9945
|
pasteTransformer
|
|
@@ -10076,6 +10053,16 @@
|
|
|
10076
10053
|
var handleKeyDown = React.useCallback(_ => {
|
|
10077
10054
|
// Handle special keys like backspace, arrows, etc.
|
|
10078
10055
|
// This is handled by the browser for the single input
|
|
10056
|
+
if (onKeyDown) {
|
|
10057
|
+
onKeyDown(_);
|
|
10058
|
+
}
|
|
10059
|
+
}, []);
|
|
10060
|
+
var handleKeyPress = React.useCallback(e => {
|
|
10061
|
+
// Handle key press events
|
|
10062
|
+
// This is handled by the browser for the single input
|
|
10063
|
+
if (onKeyPress) {
|
|
10064
|
+
onKeyPress(e);
|
|
10065
|
+
}
|
|
10079
10066
|
}, []);
|
|
10080
10067
|
var handlePaste = React.useCallback(e => {
|
|
10081
10068
|
var input = inputRef.current;
|
|
@@ -10232,11 +10219,12 @@
|
|
|
10232
10219
|
handleFocus,
|
|
10233
10220
|
handleBlur,
|
|
10234
10221
|
handleKeyDown,
|
|
10222
|
+
handleKeyPress,
|
|
10235
10223
|
handlePaste
|
|
10236
10224
|
};
|
|
10237
10225
|
};
|
|
10238
10226
|
|
|
10239
|
-
var _excluded$y = ["id", "name", "label", "value", "length", "onChange", "onChangeText", "onComplete", "helperText", "placeholder", "shadow", "views", "size", "shape", "variant", "gap", "type", "error", "isFocused", "isHovered", "isDisabled", "isReadOnly", "isAutoFocus", "setValue", "setIsFocused", "setIsHovered", "inputRef", "containerRef", "mirrorSelectionStart", "mirrorSelectionEnd", "setMirrorSelectionStart", "setMirrorSelectionEnd", "handlePaste", "handleChange", "handleFocus", "handleBlur", "handleKeyDown", "stepValues", "setInputRef", "onBlur", "onClick", "onFocus"];
|
|
10227
|
+
var _excluded$y = ["id", "name", "label", "value", "length", "onChange", "onChangeText", "onComplete", "helperText", "placeholder", "shadow", "views", "size", "shape", "variant", "gap", "type", "error", "isFocused", "isHovered", "isDisabled", "isReadOnly", "isAutoFocus", "setValue", "setIsFocused", "setIsHovered", "inputRef", "containerRef", "mirrorSelectionStart", "mirrorSelectionEnd", "setMirrorSelectionStart", "setMirrorSelectionEnd", "handlePaste", "handleChange", "handleFocus", "handleBlur", "handleKeyDown", "handleKeyPress", "secureTextEntry", "isFirstColumn", "stepValues", "setInputRef", "onBlur", "onClick", "onFocus"];
|
|
10240
10228
|
// Create a context for OTP input slots
|
|
10241
10229
|
var OTPInputContext = /*#__PURE__*/React.createContext({
|
|
10242
10230
|
slots: [],
|
|
@@ -10244,7 +10232,7 @@
|
|
|
10244
10232
|
isHovering: false
|
|
10245
10233
|
});
|
|
10246
10234
|
// CSS for noscript fallback
|
|
10247
|
-
var NOSCRIPT_CSS_FALLBACK = "\n@keyframes blink {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0; }\n}\n\n[data-input-otp] {\n --nojs-bg: white !important;\n --nojs-fg: black !important;\n\n background-color: var(--nojs-bg) !important;\n color: var(--nojs-fg) !important;\n caret-color: var(--nojs-fg) !important;\n letter-spacing: .25em !important;\n text-align: center !important;\n border: 1px solid var(--nojs-fg) !important;\n border-radius: 4px !important;\n width: 100% !important;\n}\n
|
|
10235
|
+
var NOSCRIPT_CSS_FALLBACK = "\n@keyframes blink {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0; }\n}\n\n[data-input-otp] {\n --nojs-bg: white !important;\n --nojs-fg: black !important;\n\n background-color: var(--nojs-bg) !important;\n color: var(--nojs-fg) !important;\n caret-color: var(--nojs-fg) !important;\n letter-spacing: .25em !important;\n text-align: center !important;\n border: 1px solid var(--nojs-fg) !important;\n border-radius: 4px !important;\n width: 100% !important;\n}\n";
|
|
10248
10236
|
// Helper function to safely insert CSS rules
|
|
10249
10237
|
function safeInsertRule(sheet, rule) {
|
|
10250
10238
|
try {
|
|
@@ -10492,7 +10480,8 @@
|
|
|
10492
10480
|
handleFocus,
|
|
10493
10481
|
handleBlur,
|
|
10494
10482
|
handleKeyDown,
|
|
10495
|
-
handlePaste
|
|
10483
|
+
handlePaste,
|
|
10484
|
+
handleKeyPress
|
|
10496
10485
|
} = useOTPInputState(props);
|
|
10497
10486
|
// Use the controlled value if it exists, otherwise use the internal state value
|
|
10498
10487
|
var displayValue = controlledValue !== undefined ? controlledValue : value;
|
|
@@ -10514,6 +10503,7 @@
|
|
|
10514
10503
|
handleFocus: handleFocus,
|
|
10515
10504
|
handleBlur: handleBlur,
|
|
10516
10505
|
handleKeyDown: handleKeyDown,
|
|
10506
|
+
handleKeyPress: handleKeyPress,
|
|
10517
10507
|
handlePaste: handlePaste,
|
|
10518
10508
|
stepValues: props.stepValues
|
|
10519
10509
|
}));
|
|
@@ -11931,12 +11921,12 @@
|
|
|
11931
11921
|
} = _ref;
|
|
11932
11922
|
var finalPreviewUrl = externalPreviewUrl || previewUrl;
|
|
11933
11923
|
// Debug log to help troubleshoot
|
|
11934
|
-
console.log('Uploader state:', {
|
|
11935
|
-
|
|
11936
|
-
|
|
11937
|
-
|
|
11938
|
-
|
|
11939
|
-
});
|
|
11924
|
+
// console.log('Uploader state:', {
|
|
11925
|
+
// fileType,
|
|
11926
|
+
// finalPreviewUrl,
|
|
11927
|
+
// selectedFile: selectedFile?.name,
|
|
11928
|
+
// progress,
|
|
11929
|
+
// });
|
|
11940
11930
|
return /*#__PURE__*/React__default.createElement(appStudio.Center, Object.assign({
|
|
11941
11931
|
onClick: handleClick,
|
|
11942
11932
|
cursor: "pointer",
|
|
@@ -12187,7 +12177,7 @@
|
|
|
12187
12177
|
};
|
|
12188
12178
|
|
|
12189
12179
|
var _excluded$H = ["children", "blur", "isOpen", "isClosePrevented", "onClose", "position", "views"],
|
|
12190
|
-
_excluded2$c = ["children", "shadow", "isFullScreen", "shape", "views"],
|
|
12180
|
+
_excluded2$c = ["children", "shadow", "isFullScreen", "shape", "views", "isOpen"],
|
|
12191
12181
|
_excluded3$9 = ["children", "buttonColor", "iconSize", "buttonPosition", "views"],
|
|
12192
12182
|
_excluded4$7 = ["children", "views"],
|
|
12193
12183
|
_excluded5$3 = ["children", "views"];
|
|
@@ -13073,7 +13063,9 @@
|
|
|
13073
13063
|
return foundTab;
|
|
13074
13064
|
}
|
|
13075
13065
|
// Warn if initialTabValue is provided but not found
|
|
13076
|
-
console.warn(
|
|
13066
|
+
// console.warn(
|
|
13067
|
+
// `Tabs: initialTabValue "${initialTabValue}" not found in tabs. Defaulting to the first tab.`
|
|
13068
|
+
// );
|
|
13077
13069
|
}
|
|
13078
13070
|
return propTabs[0]; // Default to the first tab
|
|
13079
13071
|
};
|
|
@@ -15981,7 +15973,7 @@
|
|
|
15981
15973
|
|
|
15982
15974
|
var _excluded$X = ["children", "id", "defaultSize", "minSize", "maxSize", "collapsible", "defaultCollapsed", "onCollapseChange", "views"],
|
|
15983
15975
|
_excluded2$g = ["id", "position", "disabled", "withVisualIndicator", "withCollapseButton", "collapseTarget", "views"],
|
|
15984
|
-
_excluded3$c = ["children", "orientation", "size", "variant", "defaultSizes", "minSize", "maxSize", "collapsible", "containerRef", "views"];
|
|
15976
|
+
_excluded3$c = ["children", "orientation", "size", "variant", "defaultSizes", "minSize", "maxSize", "collapsible", "containerRef", "autoSaveId", "views"];
|
|
15985
15977
|
// Create context for the Resizable component
|
|
15986
15978
|
var ResizableContext = /*#__PURE__*/React.createContext({
|
|
15987
15979
|
orientation: 'horizontal',
|
|
@@ -16777,6 +16769,16 @@
|
|
|
16777
16769
|
// Export the hook for component usage
|
|
16778
16770
|
var useToast$1 = useToast;
|
|
16779
16771
|
|
|
16772
|
+
// Default filter function defined outside the hook to avoid recreating it on each render
|
|
16773
|
+
var defaultFilterFn = (value, item) => {
|
|
16774
|
+
var _item$description, _item$keywords;
|
|
16775
|
+
if (!value) return true;
|
|
16776
|
+
var searchValue = value.toLowerCase();
|
|
16777
|
+
var matchesName = item.name.toLowerCase().includes(searchValue);
|
|
16778
|
+
var matchesDescription = ((_item$description = item.description) == null ? void 0 : _item$description.toLowerCase().includes(searchValue)) || false;
|
|
16779
|
+
var matchesKeywords = ((_item$keywords = item.keywords) == null ? void 0 : _item$keywords.some(keyword => keyword.toLowerCase().includes(searchValue))) || false;
|
|
16780
|
+
return matchesName || matchesDescription || matchesKeywords;
|
|
16781
|
+
};
|
|
16780
16782
|
var useCommandState = _ref => {
|
|
16781
16783
|
var {
|
|
16782
16784
|
open,
|
|
@@ -16785,46 +16787,36 @@
|
|
|
16785
16787
|
commands = [],
|
|
16786
16788
|
filter
|
|
16787
16789
|
} = _ref;
|
|
16788
|
-
// Combine commands from groups and flat list
|
|
16789
|
-
var allCommands = React.useCallback(() => {
|
|
16790
|
-
var groupCommands = groups.flatMap(group => group.commands);
|
|
16791
|
-
return [...groupCommands, ...commands];
|
|
16792
|
-
}, [groups, commands]);
|
|
16793
16790
|
// State for search input
|
|
16794
16791
|
var [search, setSearch] = React.useState('');
|
|
16795
16792
|
// State for selected item index
|
|
16796
16793
|
var [selectedIndex, setSelectedIndex] = React.useState(0);
|
|
16797
16794
|
// Ref for the command list element
|
|
16798
16795
|
var listRef = React.useRef(null);
|
|
16799
|
-
//
|
|
16800
|
-
var
|
|
16801
|
-
|
|
16802
|
-
|
|
16803
|
-
var
|
|
16804
|
-
|
|
16805
|
-
|
|
16806
|
-
|
|
16807
|
-
|
|
16808
|
-
|
|
16809
|
-
|
|
16810
|
-
|
|
16811
|
-
|
|
16812
|
-
|
|
16813
|
-
}, [allCommands, filter, defaultFilter]);
|
|
16814
|
-
// Filtered commands based on search
|
|
16815
|
-
var [filteredCommands, setFilteredCommands] = React.useState(allCommands());
|
|
16816
|
-
// Filtered groups based on search
|
|
16817
|
-
var filteredGroups = React.useCallback(() => {
|
|
16796
|
+
// Use the provided filter or fall back to the default
|
|
16797
|
+
var filterFn = React.useMemo(() => filter || defaultFilterFn, [filter]);
|
|
16798
|
+
// Combine and memoize all commands from groups and flat list
|
|
16799
|
+
var allCommands = React.useMemo(() => {
|
|
16800
|
+
var groupCommands = groups.flatMap(group => group.commands);
|
|
16801
|
+
return [...groupCommands, ...commands];
|
|
16802
|
+
}, [groups, commands]);
|
|
16803
|
+
// Filter and memoize commands based on search
|
|
16804
|
+
var filteredCommands = React.useMemo(() => {
|
|
16805
|
+
if (!search.trim()) return allCommands;
|
|
16806
|
+
return allCommands.filter(item => filterFn(search, item));
|
|
16807
|
+
}, [allCommands, search, filterFn]);
|
|
16808
|
+
// Filter and memoize groups based on search
|
|
16809
|
+
var filteredGroups = React.useMemo(() => {
|
|
16818
16810
|
if (!search) return groups;
|
|
16819
|
-
|
|
16820
|
-
|
|
16821
|
-
|
|
16822
|
-
|
|
16823
|
-
|
|
16811
|
+
var filterFn = filter || defaultFilterFn;
|
|
16812
|
+
return groups.map(g => Object.assign({}, g, {
|
|
16813
|
+
commands: g.commands.filter(c => filterFn(search, c))
|
|
16814
|
+
})).filter(g => g.commands.length);
|
|
16815
|
+
}, [groups, search, filter]);
|
|
16816
|
+
// Reset selected index when filtered commands change
|
|
16824
16817
|
React.useEffect(() => {
|
|
16825
|
-
setFilteredCommands(filterCommands(search));
|
|
16826
16818
|
setSelectedIndex(0);
|
|
16827
|
-
}, [
|
|
16819
|
+
}, [filteredCommands.length]);
|
|
16828
16820
|
// Handle keyboard navigation
|
|
16829
16821
|
var handleKeyDown = React.useCallback(e => {
|
|
16830
16822
|
if (!open) return;
|
|
@@ -16874,6 +16866,9 @@
|
|
|
16874
16866
|
React.useEffect(() => {
|
|
16875
16867
|
if (open) {
|
|
16876
16868
|
setSelectedIndex(0);
|
|
16869
|
+
} else {
|
|
16870
|
+
// Clear search when closed
|
|
16871
|
+
setSearch('');
|
|
16877
16872
|
}
|
|
16878
16873
|
}, [open]);
|
|
16879
16874
|
return {
|
|
@@ -16882,7 +16877,7 @@
|
|
|
16882
16877
|
selectedIndex,
|
|
16883
16878
|
setSelectedIndex,
|
|
16884
16879
|
filteredCommands,
|
|
16885
|
-
filteredGroups
|
|
16880
|
+
filteredGroups,
|
|
16886
16881
|
listRef
|
|
16887
16882
|
};
|
|
16888
16883
|
};
|
|
@@ -17151,26 +17146,21 @@
|
|
|
17151
17146
|
} = _ref7,
|
|
17152
17147
|
props = _objectWithoutPropertiesLoose(_ref7, _excluded6$3);
|
|
17153
17148
|
if (!open) return null;
|
|
17154
|
-
var handleItemSelect = item => {
|
|
17155
|
-
if (
|
|
17156
|
-
|
|
17157
|
-
|
|
17158
|
-
|
|
17159
|
-
|
|
17160
|
-
|
|
17161
|
-
var
|
|
17162
|
-
if (e.target === e.currentTarget) {
|
|
17163
|
-
onOpenChange(false);
|
|
17164
|
-
}
|
|
17165
|
-
};
|
|
17166
|
-
var contextValue = {
|
|
17149
|
+
var handleItemSelect = React__default.useCallback(item => {
|
|
17150
|
+
if (item.disabled) return;
|
|
17151
|
+
item.onSelect();
|
|
17152
|
+
onOpenChange(false);
|
|
17153
|
+
setSearch('');
|
|
17154
|
+
}, [onOpenChange, setSearch]);
|
|
17155
|
+
var handleBackdropClick = React__default.useCallback(e => e.target === e.currentTarget && onOpenChange(false), [onOpenChange]);
|
|
17156
|
+
var contextValue = React__default.useMemo(() => ({
|
|
17167
17157
|
search,
|
|
17168
17158
|
setSearch,
|
|
17169
17159
|
selectedIndex,
|
|
17170
17160
|
setSelectedIndex,
|
|
17171
17161
|
filteredCommands,
|
|
17172
17162
|
onSelect: handleItemSelect
|
|
17173
|
-
};
|
|
17163
|
+
}), [search, selectedIndex, filteredCommands, handleItemSelect, setSearch, setSelectedIndex]);
|
|
17174
17164
|
var hasGroups = groups.length > 0;
|
|
17175
17165
|
// const hasCommands = commands.length > 0;
|
|
17176
17166
|
var isEmpty = filteredCommands.length === 0;
|