@app-studio/web 0.8.80 → 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.
@@ -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
 
@@ -3497,78 +3497,6 @@
3497
3497
  padding: 14
3498
3498
  }
3499
3499
  };
3500
- /**
3501
- * Button variants with consistent styling
3502
- */
3503
- var getButtonVariants = (color, isLight) => ({
3504
- filled: {
3505
- backgroundColor: color,
3506
- color: isLight ? 'color.gray.900' : 'color.white',
3507
- borderWidth: 1,
3508
- borderStyle: 'solid',
3509
- borderColor: 'transparent',
3510
- on: {
3511
- hover: {
3512
- filter: 'brightness(0.9)',
3513
- transform: 'translateY(-1px)'
3514
- },
3515
- active: {
3516
- filter: 'brightness(0.85)',
3517
- transform: 'translateY(0)'
3518
- }
3519
- },
3520
- transition: 'all 0.2s ease'
3521
- },
3522
- outline: {
3523
- backgroundColor: 'transparent',
3524
- borderWidth: 1,
3525
- borderStyle: 'solid',
3526
- borderColor: color,
3527
- color: color,
3528
- on: {
3529
- hover: {
3530
- backgroundColor: color + "10",
3531
- transform: 'translateY(-1px)'
3532
- },
3533
- active: {
3534
- backgroundColor: color + "20",
3535
- transform: 'translateY(0)'
3536
- }
3537
- },
3538
- transition: 'all 0.2s ease'
3539
- },
3540
- ghost: {
3541
- backgroundColor: 'transparent',
3542
- color: color,
3543
- borderWidth: 0,
3544
- borderStyle: 'none',
3545
- borderColor: 'transparent',
3546
- on: {
3547
- hover: {
3548
- backgroundColor: color + "10",
3549
- transform: 'translateY(-1px)'
3550
- },
3551
- active: {
3552
- backgroundColor: color + "20",
3553
- transform: 'translateY(0)'
3554
- }
3555
- },
3556
- transition: 'all 0.2s ease'
3557
- },
3558
- link: {
3559
- backgroundColor: 'transparent',
3560
- color: color,
3561
- textDecoration: 'underline',
3562
- textUnderlineOffset: 2,
3563
- on: {
3564
- hover: {
3565
- textDecoration: 'underline',
3566
- textDecorationThickness: 2
3567
- }
3568
- },
3569
- transition: 'all 0.2s ease'
3570
- }
3571
- });
3572
3500
 
3573
3501
  // Defines a mapping of spinning speed labels to their respective duration in seconds for the Loader component animations.
3574
3502
  // Sets up a scale of sizes, mapping size labels to numerical values to be used for Loader component dimensions.
@@ -3762,7 +3690,9 @@
3762
3690
  // Exports the LoaderComponent as Loader, making it available for use in other parts of the application.
3763
3691
  var Loader = LoaderComponent;
3764
3692
 
3765
- var _excluded$a = ["icon", "shadow", "children", "ariaLabel", "to", "isAuto", "isFilled", "isIconRounded", "isLoading", "isDisabled", "size", "variant", "iconPosition", "shape", "onClick", "loaderProps", "loaderPosition", "effect", "isHovered", "setIsHovered", "isExternal", "themeMode", "containerProps", "linkProps", "views"];
3693
+ var _excluded$a = ["icon", "shadow", "children", "ariaLabel", "to", "isAuto", "isFilled", "isIconRounded", "isLoading", "isDisabled", "size", "variant", "iconPosition", "shape", "onClick", "loaderProps", "loaderPosition", "effect", "isHovered", "setIsHovered", "isExternal", "themeMode", "views", "colorScheme"],
3694
+ _excluded2$3 = ["_hover", "_active"],
3695
+ _excluded3$3 = ["height"];
3766
3696
  var contrast = /*#__PURE__*/require('contrast');
3767
3697
  var ButtonView = _ref => {
3768
3698
  var _props$onClick;
@@ -3785,11 +3715,12 @@
3785
3715
  loaderProps = {},
3786
3716
  loaderPosition = 'left',
3787
3717
  effect = 'default',
3718
+ isHovered,
3788
3719
  setIsHovered = () => {},
3789
3720
  isExternal = false,
3790
3721
  themeMode: elementMode,
3791
- linkProps,
3792
- views
3722
+ views,
3723
+ colorScheme = 'theme.primary'
3793
3724
  } = _ref,
3794
3725
  props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
3795
3726
  var {
@@ -3801,13 +3732,81 @@
3801
3732
  var defaultNativeProps = {
3802
3733
  disabled: !isActive
3803
3734
  };
3804
- var buttonColor = isActive ? 'theme.primary' : 'theme.disabled';
3805
- // We'll handle hover effects through CSS transitions in the style
3735
+ var buttonColor = isActive ? colorScheme : 'theme.disabled';
3736
+ var hovering = isHovered && effect === 'hover';
3737
+ var reverse = isHovered && effect === 'reverse';
3806
3738
  // Determine if the button color is light or dark for proper contrast
3807
- var isLight = contrast(getColor(buttonColor, elementMode ? elementMode : themeMode)) == 'light';
3808
- // Get button variants based on color and light/dark status
3809
- var ButtonVariants = getButtonVariants(buttonColor, isLight);
3810
- // Note: Effects are now handled through CSS transitions in the style definitions
3739
+ var buttonMode = elementMode ? elementMode : themeMode;
3740
+ var reverseMode = reverse && buttonMode == 'light' ? 'dark' : "light"; // Slightly darker
3741
+ var isLight = contrast(getColor(buttonColor, buttonMode)) == 'light';
3742
+ // Define button variants with effect support
3743
+ var ButtonVariants = {
3744
+ filled: {
3745
+ backgroundColor: reverse ? 'transparent' : buttonColor,
3746
+ color: reverse ? isLight ? 'white' : buttonColor : isLight ? buttonColor : 'white',
3747
+ borderWidth: 1,
3748
+ borderStyle: 'solid',
3749
+ borderColor: reverse ? buttonColor : 'transparent',
3750
+ _hover: {
3751
+ themeMode: reverse && buttonMode == 'light' ? 'light' : "dark",
3752
+ transform: 'translateY(-1px)',
3753
+ boxShadow: '0 4px 8px rgba(0, 0, 0, 0.1)'
3754
+ },
3755
+ _active: {
3756
+ themeMode: reverse && buttonMode == 'light' ? 'light' : "dark",
3757
+ transform: 'translateY(0)',
3758
+ boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)'
3759
+ }
3760
+ },
3761
+ outline: {
3762
+ backgroundColor: reverse ? buttonColor : 'transparent',
3763
+ borderWidth: 1,
3764
+ borderStyle: 'solid',
3765
+ borderColor: reverse ? buttonColor : colorScheme,
3766
+ color: reverse ? 'white' : buttonColor,
3767
+ _hover: {
3768
+ themeMode: reverse ? reverseMode : buttonMode,
3769
+ transform: 'translateY(-1px)',
3770
+ boxShadow: '0 4px 8px rgba(0, 0, 0, 0.05)'
3771
+ },
3772
+ _active: {
3773
+ themeMode: reverse ? reverseMode : buttonMode,
3774
+ transform: 'translateY(0)',
3775
+ boxShadow: '0 2px 4px rgba(0, 0, 0, 0.05)'
3776
+ }
3777
+ },
3778
+ link: {
3779
+ backgroundColor: 'transparent',
3780
+ borderWidth: 0,
3781
+ borderStyle: 'none',
3782
+ borderColor: 'transparent',
3783
+ color: buttonColor,
3784
+ textDecoration: reverse ? 'none' : 'underline',
3785
+ _hover: {
3786
+ opacity: 0.8,
3787
+ textDecorationThickness: '2px'
3788
+ },
3789
+ _active: {
3790
+ opacity: 0.8,
3791
+ textDecorationThickness: '2px'
3792
+ }
3793
+ },
3794
+ ghost: {
3795
+ backgroundColor: reverse ? buttonColor : 'transparent',
3796
+ color: reverse ? 'white' : buttonColor,
3797
+ borderWidth: 0,
3798
+ borderStyle: 'none',
3799
+ borderColor: 'transparent',
3800
+ _hover: {
3801
+ themeMode: reverse ? reverseMode : buttonMode,
3802
+ transform: 'translateY(-1px)'
3803
+ },
3804
+ _active: {
3805
+ themeMode: reverse ? reverseMode : buttonMode,
3806
+ transform: 'translateY(0)'
3807
+ }
3808
+ }
3809
+ };
3811
3810
  var buttonSizeStyles = ButtonSizes[size];
3812
3811
  var buttonVariant = ButtonVariants[variant];
3813
3812
  var scaleWidth = {
@@ -3834,6 +3833,13 @@
3834
3833
  }, views == null ? void 0 : views.icon), icon)), isLoading && loaderPosition === 'right' && (/*#__PURE__*/React__default.createElement(Loader, Object.assign({
3835
3834
  size: size === 'xs' || size === 'sm' ? 'sm' : 'md'
3836
3835
  }, loaderProps))));
3836
+ // Extract hover and active styles from buttonVariant
3837
+ var _ref2 = buttonVariant || {},
3838
+ {
3839
+ _hover,
3840
+ _active
3841
+ } = _ref2,
3842
+ baseButtonVariant = _objectWithoutPropertiesLoose(_ref2, _excluded2$3);
3837
3843
  return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
3838
3844
  gap: 8,
3839
3845
  as: "button",
@@ -3848,12 +3854,22 @@
3848
3854
  onMouseEnter: () => handleHover(true),
3849
3855
  onMouseLeave: () => handleHover(false),
3850
3856
  cursor: isActive ? 'pointer' : 'default',
3857
+ filter: hovering && effect === 'hover' ? 'brightness(0.85)' : 'brightness(1)',
3858
+ transition: "all 0.2s ease",
3859
+ transform: hovering && effect === 'hover' && !isDisabled ? 'translateY(-5px)' : '',
3851
3860
  // Apply consistent styling according to design guidelines
3852
3861
  // Apply shadow if provided
3853
3862
  boxShadow: shadow ? shadow : undefined
3854
- }, defaultNativeProps, buttonSizeStyles, buttonVariant, scaleWidth, props.padding || props.paddingHorizontal || props.paddingVertical || props.paddingLeft || props.paddingRight || props.paddingTop || props.paddingBottom ? {} : changePadding, props, views == null ? void 0 : views.container), variant === 'link' && to ? (/*#__PURE__*/React__default.createElement(Link, Object.assign({
3863
+ }, defaultNativeProps, (_ref3 => {
3864
+ var rest = _objectWithoutPropertiesLoose(_ref3, _excluded3$3);
3865
+ return rest;
3866
+ })(props), buttonSizeStyles, baseButtonVariant, scaleWidth, props.padding || props.paddingHorizontal || props.paddingVertical || props.paddingLeft || props.paddingRight || props.paddingTop || props.paddingBottom ? {} : changePadding, {
3867
+ // Apply hover and active styles
3868
+ _hover: _hover,
3869
+ _active: _active
3870
+ }, views == null ? void 0 : views.container), variant === 'link' && to ? (/*#__PURE__*/React__default.createElement(Link, Object.assign({
3855
3871
  to: to,
3856
- textDecorationColor: 'theme.primary',
3872
+ textDecorationColor: colorScheme,
3857
3873
  textDecorationThickness: "1px",
3858
3874
  textUnderlineOffset: "2px",
3859
3875
  transition: "all 0.2s ease",
@@ -3861,7 +3877,7 @@
3861
3877
  _hover: {
3862
3878
  textDecorationThickness: '2px'
3863
3879
  }
3864
- }, linkProps, views == null ? void 0 : views.link), content)) : content);
3880
+ }, views == null ? void 0 : views.link), content)) : content);
3865
3881
  };
3866
3882
 
3867
3883
  // Importing a custom hook to manage the state specific to the button component.
@@ -3984,8 +4000,8 @@
3984
4000
  };
3985
4001
 
3986
4002
  var _excluded$b = ["children", "views", "style", "themeMode"],
3987
- _excluded2$3 = ["children", "views", "style", "themeMode"],
3988
- _excluded3$3 = ["children", "views", "style", "themeMode"],
4003
+ _excluded2$4 = ["children", "views", "style", "themeMode"],
4004
+ _excluded3$4 = ["children", "views", "style", "themeMode"],
3989
4005
  _excluded4$3 = ["variant", "size", "shape", "children", "header", "footer", "isFullWidth", "views", "style", "themeMode"];
3990
4006
  var CardHeader = _ref => {
3991
4007
  var _contextStyles$header;
@@ -4011,7 +4027,7 @@
4011
4027
  children,
4012
4028
  style
4013
4029
  } = _ref2,
4014
- props = _objectWithoutPropertiesLoose(_ref2, _excluded2$3);
4030
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded2$4);
4015
4031
  var theme = appStudio.useTheme();
4016
4032
  var {
4017
4033
  styles: contextStyles
@@ -4029,7 +4045,7 @@
4029
4045
  children,
4030
4046
  style
4031
4047
  } = _ref3,
4032
- props = _objectWithoutPropertiesLoose(_ref3, _excluded3$3);
4048
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded3$4);
4033
4049
  var theme = appStudio.useTheme();
4034
4050
  var {
4035
4051
  styles: contextStyles
@@ -4393,11 +4409,11 @@
4393
4409
  };
4394
4410
 
4395
4411
  var _excluded$c = ["children", "isActive", "views"],
4396
- _excluded2$4 = ["views", "children"],
4397
- _excluded3$4 = ["views", "children"],
4412
+ _excluded2$5 = ["views", "children"],
4413
+ _excluded3$5 = ["views", "children"],
4398
4414
  _excluded4$4 = ["children", "views"],
4399
4415
  _excluded5$1 = ["children", "views", "style"],
4400
- _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"];
4401
4417
  var CarouselSlide = _ref => {
4402
4418
  var {
4403
4419
  children,
@@ -4420,7 +4436,7 @@
4420
4436
  children // Allow custom content/icon
4421
4437
  // Spread remaining ButtonProps
4422
4438
  } = _ref2,
4423
- props = _objectWithoutPropertiesLoose(_ref2, _excluded2$4);
4439
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded2$5);
4424
4440
  var {
4425
4441
  goToPrevious,
4426
4442
  canGoPrevious,
@@ -4443,7 +4459,7 @@
4443
4459
  views,
4444
4460
  children
4445
4461
  } = _ref3,
4446
- props = _objectWithoutPropertiesLoose(_ref3, _excluded3$4);
4462
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded3$5);
4447
4463
  var {
4448
4464
  goToNext,
4449
4465
  canGoNext,
@@ -5687,8 +5703,8 @@
5687
5703
  };
5688
5704
 
5689
5705
  var _excluded$e = ["children", "disableNativeContextMenu", "asChild", "isDisabled", "views"],
5690
- _excluded2$5 = ["items", "children", "position", "side", "align", "views", "style"],
5691
- _excluded3$5 = ["item", "children", "onSelect", "isDisabled", "views"],
5706
+ _excluded2$6 = ["items", "children", "position", "side", "align", "views", "style"],
5707
+ _excluded3$6 = ["item", "children", "onSelect", "isDisabled", "views"],
5692
5708
  _excluded4$5 = ["views"],
5693
5709
  _excluded5$2 = ["views"],
5694
5710
  _excluded6$2 = ["children", "items", "size", "variant", "disableNativeContextMenu", "views", "themeMode"];
@@ -5796,7 +5812,7 @@
5796
5812
  views,
5797
5813
  style // Capture user-provided style
5798
5814
  } = _ref3,
5799
- props = _objectWithoutPropertiesLoose(_ref3, _excluded2$5);
5815
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded2$6);
5800
5816
  var {
5801
5817
  isOpen,
5802
5818
  position: contextPosition,
@@ -5867,7 +5883,7 @@
5867
5883
  isDisabled = false,
5868
5884
  views
5869
5885
  } = _ref4,
5870
- props = _objectWithoutPropertiesLoose(_ref4, _excluded3$5);
5886
+ props = _objectWithoutPropertiesLoose(_ref4, _excluded3$6);
5871
5887
  var {
5872
5888
  activeSubmenuId,
5873
5889
  setActiveSubmenuId,
@@ -6093,7 +6109,7 @@
6093
6109
  ContextMenu.Separator = ContextMenuSeparator; // Add the Separator component
6094
6110
 
6095
6111
  var _excluded$g = ["src", "color", "views", "themeMode"],
6096
- _excluded2$6 = ["path"];
6112
+ _excluded2$7 = ["path"];
6097
6113
  var FileSVG = _ref => {
6098
6114
  var {
6099
6115
  src,
@@ -6123,7 +6139,7 @@
6123
6139
  var {
6124
6140
  path
6125
6141
  } = _ref2,
6126
- props = _objectWithoutPropertiesLoose(_ref2, _excluded2$6);
6142
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded2$7);
6127
6143
  return /*#__PURE__*/React__default.createElement(appStudio.Image, Object.assign({
6128
6144
  src: path
6129
6145
  }, props));
@@ -6290,17 +6306,6 @@
6290
6306
  _focus: {
6291
6307
  borderColor: 'theme.primary',
6292
6308
  boxShadow: '0 0 0 1px rgba(66, 153, 225, 0.2)'
6293
- },
6294
- '@media (prefers-color-scheme: dark)': {
6295
- backgroundColor: 'color.gray.800',
6296
- borderColor: 'color.gray.700',
6297
- _hover: {
6298
- borderColor: 'color.gray.600'
6299
- },
6300
- _focus: {
6301
- borderColor: 'theme.primary',
6302
- boxShadow: '0 0 0 1px rgba(66, 153, 225, 0.4)'
6303
- }
6304
6309
  }
6305
6310
  },
6306
6311
  default: {
@@ -6316,16 +6321,6 @@
6316
6321
  },
6317
6322
  _focus: {
6318
6323
  borderBottomColor: 'theme.primary'
6319
- },
6320
- '@media (prefers-color-scheme: dark)': {
6321
- backgroundColor: 'color.gray.800',
6322
- borderBottomColor: 'color.gray.700',
6323
- _hover: {
6324
- borderBottomColor: 'color.gray.600'
6325
- },
6326
- _focus: {
6327
- borderBottomColor: 'theme.primary'
6328
- }
6329
6324
  }
6330
6325
  },
6331
6326
  none: {
@@ -6457,7 +6452,7 @@
6457
6452
  }
6458
6453
  };
6459
6454
 
6460
- var _excluded$l = ["children", "heading", "isItalic", "isUnderlined", "isStriked", "weight", "size"];
6455
+ var _excluded$l = ["children", "heading", "isItalic", "isUnderlined", "isStriked", "weight", "size", "dropDown"];
6461
6456
  var LabelView = _ref => {
6462
6457
  var {
6463
6458
  children,
@@ -6576,8 +6571,8 @@
6576
6571
  };
6577
6572
 
6578
6573
  var _excluded$o = ["isHovered", "setIsHovered", "option", "size", "callback", "style"],
6579
- _excluded2$7 = ["id", "name", "value", "onChange", "isMulti", "isDisabled", "isReadOnly", "options"],
6580
- _excluded3$6 = ["option", "size", "removeOption"],
6574
+ _excluded2$8 = ["id", "name", "value", "onChange", "isMulti", "isDisabled", "isReadOnly", "options"],
6575
+ _excluded3$7 = ["option", "size", "removeOption"],
6581
6576
  _excluded4$6 = ["id", "name", "label", "value", "placeholder", "helperText", "hide", "error", "isMulti", "isFocused", "isHovered", "isDisabled", "isReadOnly", "options", "shadow", "size", "shape", "variant", "views", "onChange", "setHide", "setValue", "setIsHovered", "setIsFocused", "setHighlightedIndex", "highlightedIndex"];
6582
6577
  /**
6583
6578
  * Item Component
@@ -6667,11 +6662,7 @@
6667
6662
  // State properties
6668
6663
  cursor: isDisabled ? 'not-allowed' : 'pointer',
6669
6664
  // Animation
6670
- transition: 'all 0.2s ease',
6671
- // Dark mode support
6672
- '@media (prefers-color-scheme: dark)': {
6673
- color: isDisabled ? 'color.gray.600' : 'color.gray.100'
6674
- }
6665
+ transition: 'all 0.2s ease'
6675
6666
  }, views['field'], views['text']);
6676
6667
  var option = options.length > 0 && options.find(option => option.value === value);
6677
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 :
@@ -6698,7 +6689,7 @@
6698
6689
  isReadOnly = false,
6699
6690
  options = []
6700
6691
  } = _ref4,
6701
- props = _objectWithoutPropertiesLoose(_ref4, _excluded2$7);
6692
+ props = _objectWithoutPropertiesLoose(_ref4, _excluded2$8);
6702
6693
  var handleChange = event => {
6703
6694
  if (onChange) onChange(event);
6704
6695
  };
@@ -6730,9 +6721,7 @@
6730
6721
  var DropDown = _ref5 => {
6731
6722
  var {
6732
6723
  size,
6733
- views = {
6734
- dropDown: {}
6735
- },
6724
+ views = {},
6736
6725
  options,
6737
6726
  callback = () => {},
6738
6727
  highlightedIndex,
@@ -6782,7 +6771,7 @@
6782
6771
  borderRadius: '4px'
6783
6772
  }
6784
6773
  }
6785
- }, shadow, views['dropDown']), options.length > 0 && options.map((option, index) => (/*#__PURE__*/React__default.createElement(Item, Object.assign({
6774
+ }, shadow, views == null ? void 0 : views.dropDown), options.length > 0 && options.map((option, index) => (/*#__PURE__*/React__default.createElement(Item, Object.assign({
6786
6775
  key: option.value,
6787
6776
  size: size,
6788
6777
  style: views['text'],
@@ -6803,7 +6792,7 @@
6803
6792
  size = 'md',
6804
6793
  removeOption = () => {}
6805
6794
  } = _ref6,
6806
- props = _objectWithoutPropertiesLoose(_ref6, _excluded3$6);
6795
+ props = _objectWithoutPropertiesLoose(_ref6, _excluded3$7);
6807
6796
  var handleClick = () => removeOption(option);
6808
6797
  return /*#__PURE__*/React__default.createElement(appStudio.Horizontal, Object.assign({
6809
6798
  gap: 8,
@@ -7092,7 +7081,7 @@
7092
7081
  }
7093
7082
  };
7094
7083
 
7095
- 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"];
7096
7085
  var SwitchContent = props => /*#__PURE__*/React__default.createElement(appStudio.Input, Object.assign({
7097
7086
  type: "checkbox"
7098
7087
  }, props));
@@ -7499,11 +7488,7 @@
7499
7488
  // State properties
7500
7489
  cursor: isDisabled ? 'not-allowed' : 'text',
7501
7490
  // Animation
7502
- transition: 'all 0.2s ease',
7503
- // Dark mode support
7504
- '@media (prefers-color-scheme: dark)': {
7505
- color: isDisabled ? 'color.gray.600' : 'color.gray.100'
7506
- }
7491
+ transition: 'all 0.2s ease'
7507
7492
  }, views['field']);
7508
7493
  var handleFocus = () => {
7509
7494
  setIsFocused(true);
@@ -9337,8 +9322,8 @@
9337
9322
  };
9338
9323
 
9339
9324
  var _excluded$t = ["size"],
9340
- _excluded2$8 = ["size"],
9341
- _excluded3$7 = ["id", "name", "label", "value", "placeholder", "helperText", "hide", "error", "isHovered", "isFocused", "isAutoFocus", "isDisabled", "isReadOnly", "shadow", "newOptions", "size", "variant", "shape", "onChange", "onBlur", "setHide", "setNewOptions", "setIsHovered", "setIsFocused", "setValue", "views", "themeMode"];
9325
+ _excluded2$9 = ["size"],
9326
+ _excluded3$8 = ["id", "name", "label", "value", "placeholder", "helperText", "hide", "error", "isHovered", "isFocused", "isAutoFocus", "isDisabled", "isReadOnly", "shadow", "newOptions", "size", "variant", "shape", "onChange", "onBlur", "setHide", "setNewOptions", "setIsHovered", "setIsFocused", "setValue", "views", "themeMode"];
9342
9327
  var CountryList = _ref => {
9343
9328
  var props = _objectWithoutPropertiesLoose(_ref, _excluded$t);
9344
9329
  return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
@@ -9349,7 +9334,7 @@
9349
9334
  type: "country"
9350
9335
  }, props)));
9351
9336
  var CountryItem = _ref2 => {
9352
- var props = _objectWithoutPropertiesLoose(_ref2, _excluded2$8);
9337
+ var props = _objectWithoutPropertiesLoose(_ref2, _excluded2$9);
9353
9338
  return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
9354
9339
  as: "li"
9355
9340
  }, props));
@@ -9451,7 +9436,7 @@
9451
9436
  },
9452
9437
  themeMode: elementMode
9453
9438
  } = _ref5,
9454
- props = _objectWithoutPropertiesLoose(_ref5, _excluded3$7);
9439
+ props = _objectWithoutPropertiesLoose(_ref5, _excluded3$8);
9455
9440
  var {
9456
9441
  getColor,
9457
9442
  themeMode
@@ -9484,8 +9469,8 @@
9484
9469
  var showLabel = !!(label && (isFocused || value));
9485
9470
  var fieldStyles = Object.assign({
9486
9471
  margin: 0,
9487
- paddingVerical: 8,
9488
- paddingHorizonatl: 0,
9472
+ paddingVertical: 8,
9473
+ paddingHorizontal: 0,
9489
9474
  width: '100%',
9490
9475
  heigth: '100%',
9491
9476
  border: 'none',
@@ -9700,7 +9685,7 @@
9700
9685
  };
9701
9686
 
9702
9687
  var _excluded$v = ["visibleIcon", "hiddenIcon"],
9703
- _excluded2$9 = ["isVisible", "setIsVisible"];
9688
+ _excluded2$a = ["isVisible", "setIsVisible"];
9704
9689
  var PasswordComponent = _ref => {
9705
9690
  var {
9706
9691
  visibleIcon = /*#__PURE__*/React__default.createElement(OpenEyeIcon, {
@@ -9716,7 +9701,7 @@
9716
9701
  isVisible,
9717
9702
  setIsVisible
9718
9703
  } = _usePasswordState,
9719
- passwordProps = _objectWithoutPropertiesLoose(_usePasswordState, _excluded2$9);
9704
+ passwordProps = _objectWithoutPropertiesLoose(_usePasswordState, _excluded2$a);
9720
9705
  return /*#__PURE__*/React__default.createElement(TextFieldView, Object.assign({}, passwordProps, {
9721
9706
  type: isVisible ? 'text' : 'password',
9722
9707
  isClearable: false,
@@ -9949,6 +9934,12 @@
9949
9934
  onChange,
9950
9935
  onChangeText,
9951
9936
  onComplete,
9937
+ onKeyDown,
9938
+ onKeyPress,
9939
+ onBlur,
9940
+ onFocus,
9941
+ isReadOnly,
9942
+ isDisabled,
9952
9943
  pattern,
9953
9944
  stepValues,
9954
9945
  pasteTransformer
@@ -10062,6 +10053,16 @@
10062
10053
  var handleKeyDown = React.useCallback(_ => {
10063
10054
  // Handle special keys like backspace, arrows, etc.
10064
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
+ }
10065
10066
  }, []);
10066
10067
  var handlePaste = React.useCallback(e => {
10067
10068
  var input = inputRef.current;
@@ -10218,11 +10219,12 @@
10218
10219
  handleFocus,
10219
10220
  handleBlur,
10220
10221
  handleKeyDown,
10222
+ handleKeyPress,
10221
10223
  handlePaste
10222
10224
  };
10223
10225
  };
10224
10226
 
10225
- 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"];
10226
10228
  // Create a context for OTP input slots
10227
10229
  var OTPInputContext = /*#__PURE__*/React.createContext({
10228
10230
  slots: [],
@@ -10230,7 +10232,7 @@
10230
10232
  isHovering: false
10231
10233
  });
10232
10234
  // CSS for noscript fallback
10233
- 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@media (prefers-color-scheme: dark) {\n [data-input-otp] {\n --nojs-bg: black !important;\n --nojs-fg: white !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";
10234
10236
  // Helper function to safely insert CSS rules
10235
10237
  function safeInsertRule(sheet, rule) {
10236
10238
  try {
@@ -10478,7 +10480,8 @@
10478
10480
  handleFocus,
10479
10481
  handleBlur,
10480
10482
  handleKeyDown,
10481
- handlePaste
10483
+ handlePaste,
10484
+ handleKeyPress
10482
10485
  } = useOTPInputState(props);
10483
10486
  // Use the controlled value if it exists, otherwise use the internal state value
10484
10487
  var displayValue = controlledValue !== undefined ? controlledValue : value;
@@ -10500,6 +10503,7 @@
10500
10503
  handleFocus: handleFocus,
10501
10504
  handleBlur: handleBlur,
10502
10505
  handleKeyDown: handleKeyDown,
10506
+ handleKeyPress: handleKeyPress,
10503
10507
  handlePaste: handlePaste,
10504
10508
  stepValues: props.stepValues
10505
10509
  }));
@@ -10730,7 +10734,7 @@
10730
10734
  var FormikTextField = TextFieldComponent$1;
10731
10735
 
10732
10736
  var _excluded$D = ["visibleIcon", "hiddenIcon"],
10733
- _excluded2$a = ["isVisible", "setIsVisible"];
10737
+ _excluded2$b = ["isVisible", "setIsVisible"];
10734
10738
  var PasswordComponent$1 = _ref => {
10735
10739
  var {
10736
10740
  visibleIcon = /*#__PURE__*/React__default.createElement(OpenEyeIcon, {
@@ -10747,7 +10751,7 @@
10747
10751
  isVisible,
10748
10752
  setIsVisible
10749
10753
  } = _usePasswordState,
10750
- passwordProps = _objectWithoutPropertiesLoose(_usePasswordState, _excluded2$a);
10754
+ passwordProps = _objectWithoutPropertiesLoose(_usePasswordState, _excluded2$b);
10751
10755
  return /*#__PURE__*/React__default.createElement(TextFieldView, Object.assign({}, passwordProps, {
10752
10756
  type: isVisible ? 'text' : 'password',
10753
10757
  isClearable: false,
@@ -11917,12 +11921,12 @@
11917
11921
  } = _ref;
11918
11922
  var finalPreviewUrl = externalPreviewUrl || previewUrl;
11919
11923
  // Debug log to help troubleshoot
11920
- console.log('Uploader state:', {
11921
- fileType,
11922
- finalPreviewUrl,
11923
- selectedFile: selectedFile == null ? void 0 : selectedFile.name,
11924
- progress
11925
- });
11924
+ // console.log('Uploader state:', {
11925
+ // fileType,
11926
+ // finalPreviewUrl,
11927
+ // selectedFile: selectedFile?.name,
11928
+ // progress,
11929
+ // });
11926
11930
  return /*#__PURE__*/React__default.createElement(appStudio.Center, Object.assign({
11927
11931
  onClick: handleClick,
11928
11932
  cursor: "pointer",
@@ -12173,8 +12177,8 @@
12173
12177
  };
12174
12178
 
12175
12179
  var _excluded$H = ["children", "blur", "isOpen", "isClosePrevented", "onClose", "position", "views"],
12176
- _excluded2$b = ["children", "shadow", "isFullScreen", "shape", "views"],
12177
- _excluded3$8 = ["children", "buttonColor", "iconSize", "buttonPosition", "views"],
12180
+ _excluded2$c = ["children", "shadow", "isFullScreen", "shape", "views", "isOpen"],
12181
+ _excluded3$9 = ["children", "buttonColor", "iconSize", "buttonPosition", "views"],
12178
12182
  _excluded4$7 = ["children", "views"],
12179
12183
  _excluded5$3 = ["children", "views"];
12180
12184
  var ModalOverlay = _ref => {
@@ -12223,7 +12227,7 @@
12223
12227
  shape = 'rounded',
12224
12228
  views
12225
12229
  } = _ref2,
12226
- props = _objectWithoutPropertiesLoose(_ref2, _excluded2$b);
12230
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded2$c);
12227
12231
  var defaultShadow = typeof document !== undefined ? {
12228
12232
  boxShadow: '0px 4px 16px rgba(0, 0, 0, 0.15)'
12229
12233
  } : {
@@ -12256,7 +12260,7 @@
12256
12260
  buttonPosition = 'right',
12257
12261
  views
12258
12262
  } = _ref3,
12259
- props = _objectWithoutPropertiesLoose(_ref3, _excluded3$8);
12263
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded3$9);
12260
12264
  var onClose = props.onClose ? props.onClose : hideModal;
12261
12265
  var buttonIcon = /*#__PURE__*/React__default.createElement(appStudio.View, {
12262
12266
  onClick: onClose
@@ -13059,7 +13063,9 @@
13059
13063
  return foundTab;
13060
13064
  }
13061
13065
  // Warn if initialTabValue is provided but not found
13062
- console.warn("Tabs: initialTabValue \"" + initialTabValue + "\" not found in tabs. Defaulting to the first tab.");
13066
+ // console.warn(
13067
+ // `Tabs: initialTabValue "${initialTabValue}" not found in tabs. Defaulting to the first tab.`
13068
+ // );
13063
13069
  }
13064
13070
  return propTabs[0]; // Default to the first tab
13065
13071
  };
@@ -13731,8 +13737,8 @@
13731
13737
  };
13732
13738
 
13733
13739
  var _excluded$M = ["children", "views"],
13734
- _excluded2$c = ["items", "side", "align", "views"],
13735
- _excluded3$9 = ["item", "views"],
13740
+ _excluded2$d = ["items", "side", "align", "views"],
13741
+ _excluded3$a = ["item", "views"],
13736
13742
  _excluded4$8 = ["views"],
13737
13743
  _excluded5$4 = ["trigger", "items", "side", "align", "views", "themeMode"];
13738
13744
  // Create context for the DropdownMenu
@@ -13793,7 +13799,7 @@
13793
13799
  align = 'start',
13794
13800
  views
13795
13801
  } = _ref3,
13796
- props = _objectWithoutPropertiesLoose(_ref3, _excluded2$c);
13802
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded2$d);
13797
13803
  var {
13798
13804
  isOpen,
13799
13805
  //activeSubmenuId, setActiveSubmenuId, size,
@@ -13829,7 +13835,7 @@
13829
13835
  item,
13830
13836
  views
13831
13837
  } = _ref4,
13832
- props = _objectWithoutPropertiesLoose(_ref4, _excluded3$9);
13838
+ props = _objectWithoutPropertiesLoose(_ref4, _excluded3$a);
13833
13839
  var {
13834
13840
  activeSubmenuId,
13835
13841
  setActiveSubmenuId,
@@ -14142,7 +14148,7 @@
14142
14148
  };
14143
14149
 
14144
14150
  var _excluded$O = ["children", "views", "asChild"],
14145
- _excluded2$d = ["children", "views", "side", "align", "sideOffset", "style", "backgroundColor", "borderRadius", "boxShadow", "padding", "minWidth", "maxWidth"];
14151
+ _excluded2$e = ["children", "views", "side", "align", "sideOffset", "style", "backgroundColor", "borderRadius", "boxShadow", "padding", "minWidth", "maxWidth"];
14146
14152
  // Create context for the HoverCard
14147
14153
  var HoverCardContext = /*#__PURE__*/React.createContext({
14148
14154
  isOpen: false,
@@ -14228,7 +14234,7 @@
14228
14234
  minWidth = '200px',
14229
14235
  maxWidth = '300px'
14230
14236
  } = _ref3,
14231
- props = _objectWithoutPropertiesLoose(_ref3, _excluded2$d);
14237
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded2$e);
14232
14238
  var {
14233
14239
  isOpen,
14234
14240
  cancelCloseTimer,
@@ -15291,8 +15297,8 @@
15291
15297
  };
15292
15298
 
15293
15299
  var _excluded$V = ["children", "showToggleButton", "views"],
15294
- _excluded2$e = ["children", "views"],
15295
- _excluded3$a = ["children", "views"],
15300
+ _excluded2$f = ["children", "views"],
15301
+ _excluded3$b = ["children", "views"],
15296
15302
  _excluded4$9 = ["children", "position", "size", "variant", "fixed", "hasBackdrop", "expandedWidth", "collapsedWidth", "breakpointBehavior", "elevation", "transitionPreset", "ariaLabel", "isExpanded", "isMobile", "collapse", "views", "themeMode"];
15297
15303
  // Create context for the Sidebar
15298
15304
  var SidebarContext = /*#__PURE__*/React.createContext({
@@ -15390,7 +15396,7 @@
15390
15396
  children,
15391
15397
  views
15392
15398
  } = _ref3,
15393
- props = _objectWithoutPropertiesLoose(_ref3, _excluded2$e);
15399
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded2$f);
15394
15400
  var {
15395
15401
  isExpanded
15396
15402
  } = useSidebarContext();
@@ -15408,7 +15414,7 @@
15408
15414
  children,
15409
15415
  views
15410
15416
  } = _ref4,
15411
- props = _objectWithoutPropertiesLoose(_ref4, _excluded3$a);
15417
+ props = _objectWithoutPropertiesLoose(_ref4, _excluded3$b);
15412
15418
  var {
15413
15419
  isExpanded
15414
15420
  } = useSidebarContext();
@@ -15966,8 +15972,8 @@
15966
15972
  };
15967
15973
 
15968
15974
  var _excluded$X = ["children", "id", "defaultSize", "minSize", "maxSize", "collapsible", "defaultCollapsed", "onCollapseChange", "views"],
15969
- _excluded2$f = ["id", "position", "disabled", "withVisualIndicator", "withCollapseButton", "collapseTarget", "views"],
15970
- _excluded3$b = ["children", "orientation", "size", "variant", "defaultSizes", "minSize", "maxSize", "collapsible", "containerRef", "views"];
15975
+ _excluded2$g = ["id", "position", "disabled", "withVisualIndicator", "withCollapseButton", "collapseTarget", "views"],
15976
+ _excluded3$c = ["children", "orientation", "size", "variant", "defaultSizes", "minSize", "maxSize", "collapsible", "containerRef", "autoSaveId", "views"];
15971
15977
  // Create context for the Resizable component
15972
15978
  var ResizableContext = /*#__PURE__*/React.createContext({
15973
15979
  orientation: 'horizontal',
@@ -16074,7 +16080,7 @@
16074
16080
  collapseTarget,
16075
16081
  views
16076
16082
  } = _ref3,
16077
- props = _objectWithoutPropertiesLoose(_ref3, _excluded2$f);
16083
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded2$g);
16078
16084
  var {
16079
16085
  orientation,
16080
16086
  size,
@@ -16214,7 +16220,7 @@
16214
16220
  containerRef,
16215
16221
  views
16216
16222
  } = _ref4,
16217
- props = _objectWithoutPropertiesLoose(_ref4, _excluded3$b);
16223
+ props = _objectWithoutPropertiesLoose(_ref4, _excluded3$c);
16218
16224
  var Container = orientation === 'horizontal' ? appStudio.Horizontal : appStudio.Vertical;
16219
16225
  return /*#__PURE__*/React__default.createElement(Container, Object.assign({
16220
16226
  ref: containerRef,
@@ -16763,6 +16769,16 @@
16763
16769
  // Export the hook for component usage
16764
16770
  var useToast$1 = useToast;
16765
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
+ };
16766
16782
  var useCommandState = _ref => {
16767
16783
  var {
16768
16784
  open,
@@ -16771,46 +16787,36 @@
16771
16787
  commands = [],
16772
16788
  filter
16773
16789
  } = _ref;
16774
- // Combine commands from groups and flat list
16775
- var allCommands = React.useCallback(() => {
16776
- var groupCommands = groups.flatMap(group => group.commands);
16777
- return [...groupCommands, ...commands];
16778
- }, [groups, commands]);
16779
16790
  // State for search input
16780
16791
  var [search, setSearch] = React.useState('');
16781
16792
  // State for selected item index
16782
16793
  var [selectedIndex, setSelectedIndex] = React.useState(0);
16783
16794
  // Ref for the command list element
16784
16795
  var listRef = React.useRef(null);
16785
- // Default filter function
16786
- var defaultFilter = (value, item) => {
16787
- var _item$description, _item$keywords;
16788
- if (!value) return true;
16789
- var searchValue = value.toLowerCase();
16790
- var matchesName = item.name.toLowerCase().includes(searchValue);
16791
- var matchesDescription = ((_item$description = item.description) == null ? void 0 : _item$description.toLowerCase().includes(searchValue)) || false;
16792
- var matchesKeywords = ((_item$keywords = item.keywords) == null ? void 0 : _item$keywords.some(keyword => keyword.toLowerCase().includes(searchValue))) || false;
16793
- return matchesName || matchesDescription || matchesKeywords;
16794
- };
16795
- // Filter commands based on search
16796
- var filterCommands = React.useCallback(searchValue => {
16797
- var filterFn = filter || defaultFilter;
16798
- return allCommands().filter(item => filterFn(searchValue, item));
16799
- }, [allCommands, filter, defaultFilter]);
16800
- // Filtered commands based on search
16801
- var [filteredCommands, setFilteredCommands] = React.useState(allCommands());
16802
- // Filtered groups based on search
16803
- 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(() => {
16804
16810
  if (!search) return groups;
16805
- return groups.map(group => Object.assign({}, group, {
16806
- commands: group.commands.filter(command => (filter || defaultFilter)(search, command))
16807
- })).filter(group => group.commands.length > 0);
16808
- }, [groups, search, filter, defaultFilter]);
16809
- // Update filtered commands when search changes
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
16810
16817
  React.useEffect(() => {
16811
- setFilteredCommands(filterCommands(search));
16812
16818
  setSelectedIndex(0);
16813
- }, [search, filterCommands]);
16819
+ }, [filteredCommands.length]);
16814
16820
  // Handle keyboard navigation
16815
16821
  var handleKeyDown = React.useCallback(e => {
16816
16822
  if (!open) return;
@@ -16860,6 +16866,9 @@
16860
16866
  React.useEffect(() => {
16861
16867
  if (open) {
16862
16868
  setSelectedIndex(0);
16869
+ } else {
16870
+ // Clear search when closed
16871
+ setSearch('');
16863
16872
  }
16864
16873
  }, [open]);
16865
16874
  return {
@@ -16868,7 +16877,7 @@
16868
16877
  selectedIndex,
16869
16878
  setSelectedIndex,
16870
16879
  filteredCommands,
16871
- filteredGroups: filteredGroups(),
16880
+ filteredGroups,
16872
16881
  listRef
16873
16882
  };
16874
16883
  };
@@ -17011,8 +17020,8 @@
17011
17020
  };
17012
17021
 
17013
17022
  var _excluded$Z = ["value", "onValueChange", "placeholder", "views"],
17014
- _excluded2$g = ["children", "views"],
17015
- _excluded3$c = ["heading", "children", "views"],
17023
+ _excluded2$h = ["children", "views"],
17024
+ _excluded3$d = ["heading", "children", "views"],
17016
17025
  _excluded4$a = ["item", "selected", "onSelect", "views"],
17017
17026
  _excluded5$5 = ["children", "views"],
17018
17027
  _excluded6$3 = ["open", "onOpenChange", "groups", "commands", "placeholder", "size", "variant", "emptyState", "footer", "search", "setSearch", "selectedIndex", "setSelectedIndex", "filteredCommands", "filteredGroups", "listRef", "views", "filter"];
@@ -17074,7 +17083,7 @@
17074
17083
  children,
17075
17084
  views
17076
17085
  } = _ref3,
17077
- props = _objectWithoutPropertiesLoose(_ref3, _excluded2$g);
17086
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded2$h);
17078
17087
  return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, CommandListStyles, views == null ? void 0 : views.container, props), children);
17079
17088
  };
17080
17089
  // Command Group component
@@ -17084,7 +17093,7 @@
17084
17093
  children,
17085
17094
  views
17086
17095
  } = _ref4,
17087
- props = _objectWithoutPropertiesLoose(_ref4, _excluded3$c);
17096
+ props = _objectWithoutPropertiesLoose(_ref4, _excluded3$d);
17088
17097
  return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, CommandGroupStyles, views == null ? void 0 : views.container, props), /*#__PURE__*/React__default.createElement(Text, Object.assign({}, CommandGroupHeadingStyles, views == null ? void 0 : views.heading), heading), children);
17089
17098
  };
17090
17099
  // Command Item component
@@ -17137,26 +17146,21 @@
17137
17146
  } = _ref7,
17138
17147
  props = _objectWithoutPropertiesLoose(_ref7, _excluded6$3);
17139
17148
  if (!open) return null;
17140
- var handleItemSelect = item => {
17141
- if (!item.disabled) {
17142
- item.onSelect();
17143
- onOpenChange(false);
17144
- setSearch('');
17145
- }
17146
- };
17147
- var handleBackdropClick = e => {
17148
- if (e.target === e.currentTarget) {
17149
- onOpenChange(false);
17150
- }
17151
- };
17152
- 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(() => ({
17153
17157
  search,
17154
17158
  setSearch,
17155
17159
  selectedIndex,
17156
17160
  setSelectedIndex,
17157
17161
  filteredCommands,
17158
17162
  onSelect: handleItemSelect
17159
- };
17163
+ }), [search, selectedIndex, filteredCommands, handleItemSelect, setSearch, setSelectedIndex]);
17160
17164
  var hasGroups = groups.length > 0;
17161
17165
  // const hasCommands = commands.length > 0;
17162
17166
  var isEmpty = filteredCommands.length === 0;
@@ -17536,8 +17540,8 @@
17536
17540
  };
17537
17541
 
17538
17542
  var _excluded$$ = ["children", "views", "asChild"],
17539
- _excluded2$h = ["children", "views"],
17540
- _excluded3$d = ["content", "children", "position", "align", "size", "variant", "showArrow", "views", "themeMode"];
17543
+ _excluded2$i = ["children", "views"],
17544
+ _excluded3$e = ["content", "children", "position", "align", "size", "variant", "showArrow", "views", "themeMode"];
17541
17545
  // Create context for the Tooltip
17542
17546
  var TooltipContext = /*#__PURE__*/React.createContext({
17543
17547
  isOpen: false,
@@ -17607,7 +17611,7 @@
17607
17611
  children,
17608
17612
  views
17609
17613
  } = _ref3,
17610
- props = _objectWithoutPropertiesLoose(_ref3, _excluded2$h);
17614
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded2$i);
17611
17615
  var {
17612
17616
  isOpen,
17613
17617
  contentRef,
@@ -17637,7 +17641,7 @@
17637
17641
  showArrow = true,
17638
17642
  views
17639
17643
  } = _ref4,
17640
- props = _objectWithoutPropertiesLoose(_ref4, _excluded3$d);
17644
+ props = _objectWithoutPropertiesLoose(_ref4, _excluded3$e);
17641
17645
  var {
17642
17646
  isOpen,
17643
17647
  // openTooltip,