@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.
- package/dist/components/Button/Button/Button.props.d.ts +1 -2
- 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 +237 -232
- 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 +237 -232
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +238 -234
- 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
package/dist/web.esm.js
CHANGED
|
@@ -27,6 +27,7 @@ import 'core-js/modules/es.string.match.js';
|
|
|
27
27
|
import 'core-js/modules/es.string.search.js';
|
|
28
28
|
import 'core-js/modules/es.array.flat-map.js';
|
|
29
29
|
import 'core-js/modules/es.array.unscopables.flat-map.js';
|
|
30
|
+
import 'core-js/modules/es.string.trim.js';
|
|
30
31
|
|
|
31
32
|
function _objectWithoutPropertiesLoose(r, e) {
|
|
32
33
|
if (null == r) return {};
|
|
@@ -3518,78 +3519,6 @@ var IconSizes$1 = {
|
|
|
3518
3519
|
padding: 14
|
|
3519
3520
|
}
|
|
3520
3521
|
};
|
|
3521
|
-
/**
|
|
3522
|
-
* Button variants with consistent styling
|
|
3523
|
-
*/
|
|
3524
|
-
var getButtonVariants = (color, isLight) => ({
|
|
3525
|
-
filled: {
|
|
3526
|
-
backgroundColor: color,
|
|
3527
|
-
color: isLight ? 'color.gray.900' : 'color.white',
|
|
3528
|
-
borderWidth: 1,
|
|
3529
|
-
borderStyle: 'solid',
|
|
3530
|
-
borderColor: 'transparent',
|
|
3531
|
-
on: {
|
|
3532
|
-
hover: {
|
|
3533
|
-
filter: 'brightness(0.9)',
|
|
3534
|
-
transform: 'translateY(-1px)'
|
|
3535
|
-
},
|
|
3536
|
-
active: {
|
|
3537
|
-
filter: 'brightness(0.85)',
|
|
3538
|
-
transform: 'translateY(0)'
|
|
3539
|
-
}
|
|
3540
|
-
},
|
|
3541
|
-
transition: 'all 0.2s ease'
|
|
3542
|
-
},
|
|
3543
|
-
outline: {
|
|
3544
|
-
backgroundColor: 'transparent',
|
|
3545
|
-
borderWidth: 1,
|
|
3546
|
-
borderStyle: 'solid',
|
|
3547
|
-
borderColor: color,
|
|
3548
|
-
color: color,
|
|
3549
|
-
on: {
|
|
3550
|
-
hover: {
|
|
3551
|
-
backgroundColor: color + "10",
|
|
3552
|
-
transform: 'translateY(-1px)'
|
|
3553
|
-
},
|
|
3554
|
-
active: {
|
|
3555
|
-
backgroundColor: color + "20",
|
|
3556
|
-
transform: 'translateY(0)'
|
|
3557
|
-
}
|
|
3558
|
-
},
|
|
3559
|
-
transition: 'all 0.2s ease'
|
|
3560
|
-
},
|
|
3561
|
-
ghost: {
|
|
3562
|
-
backgroundColor: 'transparent',
|
|
3563
|
-
color: color,
|
|
3564
|
-
borderWidth: 0,
|
|
3565
|
-
borderStyle: 'none',
|
|
3566
|
-
borderColor: 'transparent',
|
|
3567
|
-
on: {
|
|
3568
|
-
hover: {
|
|
3569
|
-
backgroundColor: color + "10",
|
|
3570
|
-
transform: 'translateY(-1px)'
|
|
3571
|
-
},
|
|
3572
|
-
active: {
|
|
3573
|
-
backgroundColor: color + "20",
|
|
3574
|
-
transform: 'translateY(0)'
|
|
3575
|
-
}
|
|
3576
|
-
},
|
|
3577
|
-
transition: 'all 0.2s ease'
|
|
3578
|
-
},
|
|
3579
|
-
link: {
|
|
3580
|
-
backgroundColor: 'transparent',
|
|
3581
|
-
color: color,
|
|
3582
|
-
textDecoration: 'underline',
|
|
3583
|
-
textUnderlineOffset: 2,
|
|
3584
|
-
on: {
|
|
3585
|
-
hover: {
|
|
3586
|
-
textDecoration: 'underline',
|
|
3587
|
-
textDecorationThickness: 2
|
|
3588
|
-
}
|
|
3589
|
-
},
|
|
3590
|
-
transition: 'all 0.2s ease'
|
|
3591
|
-
}
|
|
3592
|
-
});
|
|
3593
3522
|
|
|
3594
3523
|
// Defines a mapping of spinning speed labels to their respective duration in seconds for the Loader component animations.
|
|
3595
3524
|
// Sets up a scale of sizes, mapping size labels to numerical values to be used for Loader component dimensions.
|
|
@@ -3783,7 +3712,9 @@ React.createElement(LoaderView, Object.assign({}, props)));
|
|
|
3783
3712
|
// Exports the LoaderComponent as Loader, making it available for use in other parts of the application.
|
|
3784
3713
|
var Loader = LoaderComponent;
|
|
3785
3714
|
|
|
3786
|
-
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", "
|
|
3715
|
+
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"],
|
|
3716
|
+
_excluded2$3 = ["_hover", "_active"],
|
|
3717
|
+
_excluded3$3 = ["height"];
|
|
3787
3718
|
var contrast = /*#__PURE__*/require('contrast');
|
|
3788
3719
|
var ButtonView = _ref => {
|
|
3789
3720
|
var _props$onClick;
|
|
@@ -3806,11 +3737,12 @@ var ButtonView = _ref => {
|
|
|
3806
3737
|
loaderProps = {},
|
|
3807
3738
|
loaderPosition = 'left',
|
|
3808
3739
|
effect = 'default',
|
|
3740
|
+
isHovered,
|
|
3809
3741
|
setIsHovered = () => {},
|
|
3810
3742
|
isExternal = false,
|
|
3811
3743
|
themeMode: elementMode,
|
|
3812
|
-
|
|
3813
|
-
|
|
3744
|
+
views,
|
|
3745
|
+
colorScheme = 'theme.primary'
|
|
3814
3746
|
} = _ref,
|
|
3815
3747
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
3816
3748
|
var {
|
|
@@ -3822,13 +3754,81 @@ var ButtonView = _ref => {
|
|
|
3822
3754
|
var defaultNativeProps = {
|
|
3823
3755
|
disabled: !isActive
|
|
3824
3756
|
};
|
|
3825
|
-
var buttonColor = isActive ?
|
|
3826
|
-
|
|
3757
|
+
var buttonColor = isActive ? colorScheme : 'theme.disabled';
|
|
3758
|
+
var hovering = isHovered && effect === 'hover';
|
|
3759
|
+
var reverse = isHovered && effect === 'reverse';
|
|
3827
3760
|
// Determine if the button color is light or dark for proper contrast
|
|
3828
|
-
var
|
|
3829
|
-
|
|
3830
|
-
var
|
|
3831
|
-
//
|
|
3761
|
+
var buttonMode = elementMode ? elementMode : themeMode;
|
|
3762
|
+
var reverseMode = reverse && buttonMode == 'light' ? 'dark' : "light"; // Slightly darker
|
|
3763
|
+
var isLight = contrast(getColor(buttonColor, buttonMode)) == 'light';
|
|
3764
|
+
// Define button variants with effect support
|
|
3765
|
+
var ButtonVariants = {
|
|
3766
|
+
filled: {
|
|
3767
|
+
backgroundColor: reverse ? 'transparent' : buttonColor,
|
|
3768
|
+
color: reverse ? isLight ? 'white' : buttonColor : isLight ? buttonColor : 'white',
|
|
3769
|
+
borderWidth: 1,
|
|
3770
|
+
borderStyle: 'solid',
|
|
3771
|
+
borderColor: reverse ? buttonColor : 'transparent',
|
|
3772
|
+
_hover: {
|
|
3773
|
+
themeMode: reverse && buttonMode == 'light' ? 'light' : "dark",
|
|
3774
|
+
transform: 'translateY(-1px)',
|
|
3775
|
+
boxShadow: '0 4px 8px rgba(0, 0, 0, 0.1)'
|
|
3776
|
+
},
|
|
3777
|
+
_active: {
|
|
3778
|
+
themeMode: reverse && buttonMode == 'light' ? 'light' : "dark",
|
|
3779
|
+
transform: 'translateY(0)',
|
|
3780
|
+
boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)'
|
|
3781
|
+
}
|
|
3782
|
+
},
|
|
3783
|
+
outline: {
|
|
3784
|
+
backgroundColor: reverse ? buttonColor : 'transparent',
|
|
3785
|
+
borderWidth: 1,
|
|
3786
|
+
borderStyle: 'solid',
|
|
3787
|
+
borderColor: reverse ? buttonColor : colorScheme,
|
|
3788
|
+
color: reverse ? 'white' : buttonColor,
|
|
3789
|
+
_hover: {
|
|
3790
|
+
themeMode: reverse ? reverseMode : buttonMode,
|
|
3791
|
+
transform: 'translateY(-1px)',
|
|
3792
|
+
boxShadow: '0 4px 8px rgba(0, 0, 0, 0.05)'
|
|
3793
|
+
},
|
|
3794
|
+
_active: {
|
|
3795
|
+
themeMode: reverse ? reverseMode : buttonMode,
|
|
3796
|
+
transform: 'translateY(0)',
|
|
3797
|
+
boxShadow: '0 2px 4px rgba(0, 0, 0, 0.05)'
|
|
3798
|
+
}
|
|
3799
|
+
},
|
|
3800
|
+
link: {
|
|
3801
|
+
backgroundColor: 'transparent',
|
|
3802
|
+
borderWidth: 0,
|
|
3803
|
+
borderStyle: 'none',
|
|
3804
|
+
borderColor: 'transparent',
|
|
3805
|
+
color: buttonColor,
|
|
3806
|
+
textDecoration: reverse ? 'none' : 'underline',
|
|
3807
|
+
_hover: {
|
|
3808
|
+
opacity: 0.8,
|
|
3809
|
+
textDecorationThickness: '2px'
|
|
3810
|
+
},
|
|
3811
|
+
_active: {
|
|
3812
|
+
opacity: 0.8,
|
|
3813
|
+
textDecorationThickness: '2px'
|
|
3814
|
+
}
|
|
3815
|
+
},
|
|
3816
|
+
ghost: {
|
|
3817
|
+
backgroundColor: reverse ? buttonColor : 'transparent',
|
|
3818
|
+
color: reverse ? 'white' : buttonColor,
|
|
3819
|
+
borderWidth: 0,
|
|
3820
|
+
borderStyle: 'none',
|
|
3821
|
+
borderColor: 'transparent',
|
|
3822
|
+
_hover: {
|
|
3823
|
+
themeMode: reverse ? reverseMode : buttonMode,
|
|
3824
|
+
transform: 'translateY(-1px)'
|
|
3825
|
+
},
|
|
3826
|
+
_active: {
|
|
3827
|
+
themeMode: reverse ? reverseMode : buttonMode,
|
|
3828
|
+
transform: 'translateY(0)'
|
|
3829
|
+
}
|
|
3830
|
+
}
|
|
3831
|
+
};
|
|
3832
3832
|
var buttonSizeStyles = ButtonSizes[size];
|
|
3833
3833
|
var buttonVariant = ButtonVariants[variant];
|
|
3834
3834
|
var scaleWidth = {
|
|
@@ -3855,6 +3855,13 @@ var ButtonView = _ref => {
|
|
|
3855
3855
|
}, views == null ? void 0 : views.icon), icon)), isLoading && loaderPosition === 'right' && (/*#__PURE__*/React.createElement(Loader, Object.assign({
|
|
3856
3856
|
size: size === 'xs' || size === 'sm' ? 'sm' : 'md'
|
|
3857
3857
|
}, loaderProps))));
|
|
3858
|
+
// Extract hover and active styles from buttonVariant
|
|
3859
|
+
var _ref2 = buttonVariant || {},
|
|
3860
|
+
{
|
|
3861
|
+
_hover,
|
|
3862
|
+
_active
|
|
3863
|
+
} = _ref2,
|
|
3864
|
+
baseButtonVariant = _objectWithoutPropertiesLoose(_ref2, _excluded2$3);
|
|
3858
3865
|
return /*#__PURE__*/React.createElement(Element, Object.assign({
|
|
3859
3866
|
gap: 8,
|
|
3860
3867
|
as: "button",
|
|
@@ -3869,12 +3876,22 @@ var ButtonView = _ref => {
|
|
|
3869
3876
|
onMouseEnter: () => handleHover(true),
|
|
3870
3877
|
onMouseLeave: () => handleHover(false),
|
|
3871
3878
|
cursor: isActive ? 'pointer' : 'default',
|
|
3879
|
+
filter: hovering && effect === 'hover' ? 'brightness(0.85)' : 'brightness(1)',
|
|
3880
|
+
transition: "all 0.2s ease",
|
|
3881
|
+
transform: hovering && effect === 'hover' && !isDisabled ? 'translateY(-5px)' : '',
|
|
3872
3882
|
// Apply consistent styling according to design guidelines
|
|
3873
3883
|
// Apply shadow if provided
|
|
3874
3884
|
boxShadow: shadow ? shadow : undefined
|
|
3875
|
-
}, defaultNativeProps,
|
|
3885
|
+
}, defaultNativeProps, (_ref3 => {
|
|
3886
|
+
var rest = _objectWithoutPropertiesLoose(_ref3, _excluded3$3);
|
|
3887
|
+
return rest;
|
|
3888
|
+
})(props), buttonSizeStyles, baseButtonVariant, scaleWidth, props.padding || props.paddingHorizontal || props.paddingVertical || props.paddingLeft || props.paddingRight || props.paddingTop || props.paddingBottom ? {} : changePadding, {
|
|
3889
|
+
// Apply hover and active styles
|
|
3890
|
+
_hover: _hover,
|
|
3891
|
+
_active: _active
|
|
3892
|
+
}, views == null ? void 0 : views.container), variant === 'link' && to ? (/*#__PURE__*/React.createElement(Link, Object.assign({
|
|
3876
3893
|
to: to,
|
|
3877
|
-
textDecorationColor:
|
|
3894
|
+
textDecorationColor: colorScheme,
|
|
3878
3895
|
textDecorationThickness: "1px",
|
|
3879
3896
|
textUnderlineOffset: "2px",
|
|
3880
3897
|
transition: "all 0.2s ease",
|
|
@@ -3882,7 +3899,7 @@ var ButtonView = _ref => {
|
|
|
3882
3899
|
_hover: {
|
|
3883
3900
|
textDecorationThickness: '2px'
|
|
3884
3901
|
}
|
|
3885
|
-
},
|
|
3902
|
+
}, views == null ? void 0 : views.link), content)) : content);
|
|
3886
3903
|
};
|
|
3887
3904
|
|
|
3888
3905
|
// Importing a custom hook to manage the state specific to the button component.
|
|
@@ -4005,8 +4022,8 @@ var useCardContext = () => {
|
|
|
4005
4022
|
};
|
|
4006
4023
|
|
|
4007
4024
|
var _excluded$b = ["children", "views", "style", "themeMode"],
|
|
4008
|
-
_excluded2$
|
|
4009
|
-
_excluded3$
|
|
4025
|
+
_excluded2$4 = ["children", "views", "style", "themeMode"],
|
|
4026
|
+
_excluded3$4 = ["children", "views", "style", "themeMode"],
|
|
4010
4027
|
_excluded4$3 = ["variant", "size", "shape", "children", "header", "footer", "isFullWidth", "views", "style", "themeMode"];
|
|
4011
4028
|
var CardHeader = _ref => {
|
|
4012
4029
|
var _contextStyles$header;
|
|
@@ -4032,7 +4049,7 @@ var CardContent = _ref2 => {
|
|
|
4032
4049
|
children,
|
|
4033
4050
|
style
|
|
4034
4051
|
} = _ref2,
|
|
4035
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$
|
|
4052
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$4);
|
|
4036
4053
|
var theme = useTheme();
|
|
4037
4054
|
var {
|
|
4038
4055
|
styles: contextStyles
|
|
@@ -4050,7 +4067,7 @@ var CardFooter = _ref3 => {
|
|
|
4050
4067
|
children,
|
|
4051
4068
|
style
|
|
4052
4069
|
} = _ref3,
|
|
4053
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded3$
|
|
4070
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded3$4);
|
|
4054
4071
|
var theme = useTheme();
|
|
4055
4072
|
var {
|
|
4056
4073
|
styles: contextStyles
|
|
@@ -4414,11 +4431,11 @@ var useCarouselContext = () => {
|
|
|
4414
4431
|
};
|
|
4415
4432
|
|
|
4416
4433
|
var _excluded$c = ["children", "isActive", "views"],
|
|
4417
|
-
_excluded2$
|
|
4418
|
-
_excluded3$
|
|
4434
|
+
_excluded2$5 = ["views", "children"],
|
|
4435
|
+
_excluded3$5 = ["views", "children"],
|
|
4419
4436
|
_excluded4$4 = ["children", "views"],
|
|
4420
4437
|
_excluded5$1 = ["children", "views", "style"],
|
|
4421
|
-
_excluded6$1 = ["children", "defaultActiveIndex", "activeIndex", "onChange", "showNavigation", "navigationPosition", "prevButton", "nextButton", "showIndicators", "indicatorPosition", "indicatorVariant", "autoPlay", "autoPlayInterval", "pauseOnHover", "infinite", "direction", "transitionDuration", "views", "themeMode"];
|
|
4438
|
+
_excluded6$1 = ["children", "defaultActiveIndex", "activeIndex", "onChange", "showNavigation", "navigationPosition", "prevButton", "nextButton", "showIndicators", "indicatorPosition", "indicatorVariant", "autoPlay", "autoPlayInterval", "pauseOnHover", "infinite", "direction", "transitionDuration", "views", "stepIndices", "themeMode"];
|
|
4422
4439
|
var CarouselSlide = _ref => {
|
|
4423
4440
|
var {
|
|
4424
4441
|
children,
|
|
@@ -4441,7 +4458,7 @@ var CarouselPreviousComponent = _ref2 => {
|
|
|
4441
4458
|
children // Allow custom content/icon
|
|
4442
4459
|
// Spread remaining ButtonProps
|
|
4443
4460
|
} = _ref2,
|
|
4444
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$
|
|
4461
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$5);
|
|
4445
4462
|
var {
|
|
4446
4463
|
goToPrevious,
|
|
4447
4464
|
canGoPrevious,
|
|
@@ -4464,7 +4481,7 @@ var CarouselNextComponent = _ref3 => {
|
|
|
4464
4481
|
views,
|
|
4465
4482
|
children
|
|
4466
4483
|
} = _ref3,
|
|
4467
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded3$
|
|
4484
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded3$5);
|
|
4468
4485
|
var {
|
|
4469
4486
|
goToNext,
|
|
4470
4487
|
canGoNext,
|
|
@@ -5708,8 +5725,8 @@ var calculateMenuPosition = function calculateMenuPosition(x, y, menuWidth, menu
|
|
|
5708
5725
|
};
|
|
5709
5726
|
|
|
5710
5727
|
var _excluded$e = ["children", "disableNativeContextMenu", "asChild", "isDisabled", "views"],
|
|
5711
|
-
_excluded2$
|
|
5712
|
-
_excluded3$
|
|
5728
|
+
_excluded2$6 = ["items", "children", "position", "side", "align", "views", "style"],
|
|
5729
|
+
_excluded3$6 = ["item", "children", "onSelect", "isDisabled", "views"],
|
|
5713
5730
|
_excluded4$5 = ["views"],
|
|
5714
5731
|
_excluded5$2 = ["views"],
|
|
5715
5732
|
_excluded6$2 = ["children", "items", "size", "variant", "disableNativeContextMenu", "views", "themeMode"];
|
|
@@ -5817,7 +5834,7 @@ var ContextMenuContent = _ref3 => {
|
|
|
5817
5834
|
views,
|
|
5818
5835
|
style // Capture user-provided style
|
|
5819
5836
|
} = _ref3,
|
|
5820
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$
|
|
5837
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$6);
|
|
5821
5838
|
var {
|
|
5822
5839
|
isOpen,
|
|
5823
5840
|
position: contextPosition,
|
|
@@ -5888,7 +5905,7 @@ var ContextMenuItem = _ref4 => {
|
|
|
5888
5905
|
isDisabled = false,
|
|
5889
5906
|
views
|
|
5890
5907
|
} = _ref4,
|
|
5891
|
-
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$
|
|
5908
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$6);
|
|
5892
5909
|
var {
|
|
5893
5910
|
activeSubmenuId,
|
|
5894
5911
|
setActiveSubmenuId,
|
|
@@ -6114,7 +6131,7 @@ ContextMenu.Divider = ContextMenuDivider;
|
|
|
6114
6131
|
ContextMenu.Separator = ContextMenuSeparator; // Add the Separator component
|
|
6115
6132
|
|
|
6116
6133
|
var _excluded$g = ["src", "color", "views", "themeMode"],
|
|
6117
|
-
_excluded2$
|
|
6134
|
+
_excluded2$7 = ["path"];
|
|
6118
6135
|
var FileSVG = _ref => {
|
|
6119
6136
|
var {
|
|
6120
6137
|
src,
|
|
@@ -6144,7 +6161,7 @@ var FileImage = _ref2 => {
|
|
|
6144
6161
|
var {
|
|
6145
6162
|
path
|
|
6146
6163
|
} = _ref2,
|
|
6147
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$
|
|
6164
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$7);
|
|
6148
6165
|
return /*#__PURE__*/React.createElement(Image, Object.assign({
|
|
6149
6166
|
src: path
|
|
6150
6167
|
}, props));
|
|
@@ -6311,17 +6328,6 @@ var InputVariants = {
|
|
|
6311
6328
|
_focus: {
|
|
6312
6329
|
borderColor: 'theme.primary',
|
|
6313
6330
|
boxShadow: '0 0 0 1px rgba(66, 153, 225, 0.2)'
|
|
6314
|
-
},
|
|
6315
|
-
'@media (prefers-color-scheme: dark)': {
|
|
6316
|
-
backgroundColor: 'color.gray.800',
|
|
6317
|
-
borderColor: 'color.gray.700',
|
|
6318
|
-
_hover: {
|
|
6319
|
-
borderColor: 'color.gray.600'
|
|
6320
|
-
},
|
|
6321
|
-
_focus: {
|
|
6322
|
-
borderColor: 'theme.primary',
|
|
6323
|
-
boxShadow: '0 0 0 1px rgba(66, 153, 225, 0.4)'
|
|
6324
|
-
}
|
|
6325
6331
|
}
|
|
6326
6332
|
},
|
|
6327
6333
|
default: {
|
|
@@ -6337,16 +6343,6 @@ var InputVariants = {
|
|
|
6337
6343
|
},
|
|
6338
6344
|
_focus: {
|
|
6339
6345
|
borderBottomColor: 'theme.primary'
|
|
6340
|
-
},
|
|
6341
|
-
'@media (prefers-color-scheme: dark)': {
|
|
6342
|
-
backgroundColor: 'color.gray.800',
|
|
6343
|
-
borderBottomColor: 'color.gray.700',
|
|
6344
|
-
_hover: {
|
|
6345
|
-
borderBottomColor: 'color.gray.600'
|
|
6346
|
-
},
|
|
6347
|
-
_focus: {
|
|
6348
|
-
borderBottomColor: 'theme.primary'
|
|
6349
|
-
}
|
|
6350
6346
|
}
|
|
6351
6347
|
},
|
|
6352
6348
|
none: {
|
|
@@ -6478,7 +6474,7 @@ var HeadingSizes$1 = {
|
|
|
6478
6474
|
}
|
|
6479
6475
|
};
|
|
6480
6476
|
|
|
6481
|
-
var _excluded$l = ["children", "heading", "isItalic", "isUnderlined", "isStriked", "weight", "size"];
|
|
6477
|
+
var _excluded$l = ["children", "heading", "isItalic", "isUnderlined", "isStriked", "weight", "size", "dropDown"];
|
|
6482
6478
|
var LabelView = _ref => {
|
|
6483
6479
|
var {
|
|
6484
6480
|
children,
|
|
@@ -6597,8 +6593,8 @@ var IconSizes$2 = {
|
|
|
6597
6593
|
};
|
|
6598
6594
|
|
|
6599
6595
|
var _excluded$o = ["isHovered", "setIsHovered", "option", "size", "callback", "style"],
|
|
6600
|
-
_excluded2$
|
|
6601
|
-
_excluded3$
|
|
6596
|
+
_excluded2$8 = ["id", "name", "value", "onChange", "isMulti", "isDisabled", "isReadOnly", "options"],
|
|
6597
|
+
_excluded3$7 = ["option", "size", "removeOption"],
|
|
6602
6598
|
_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"];
|
|
6603
6599
|
/**
|
|
6604
6600
|
* Item Component
|
|
@@ -6688,11 +6684,7 @@ var SelectBox = _ref2 => {
|
|
|
6688
6684
|
// State properties
|
|
6689
6685
|
cursor: isDisabled ? 'not-allowed' : 'pointer',
|
|
6690
6686
|
// Animation
|
|
6691
|
-
transition: 'all 0.2s ease'
|
|
6692
|
-
// Dark mode support
|
|
6693
|
-
'@media (prefers-color-scheme: dark)': {
|
|
6694
|
-
color: isDisabled ? 'color.gray.600' : 'color.gray.100'
|
|
6695
|
-
}
|
|
6687
|
+
transition: 'all 0.2s ease'
|
|
6696
6688
|
}, views['field'], views['text']);
|
|
6697
6689
|
var option = options.length > 0 && options.find(option => option.value === value);
|
|
6698
6690
|
return /*#__PURE__*/React.createElement(Text, Object.assign({}, fieldStyles), (value === '' || Array.isArray(value) && value.length === 0) && !!placeholder ? placeholder : (/*#__PURE__*/React.createElement(React.Fragment, null, typeof value === 'string' ? (_ref3 = option && option.label) != null ? _ref3 : value :
|
|
@@ -6719,7 +6711,7 @@ var HiddenSelect = _ref4 => {
|
|
|
6719
6711
|
isReadOnly = false,
|
|
6720
6712
|
options = []
|
|
6721
6713
|
} = _ref4,
|
|
6722
|
-
props = _objectWithoutPropertiesLoose(_ref4, _excluded2$
|
|
6714
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded2$8);
|
|
6723
6715
|
var handleChange = event => {
|
|
6724
6716
|
if (onChange) onChange(event);
|
|
6725
6717
|
};
|
|
@@ -6751,9 +6743,7 @@ var HiddenSelect = _ref4 => {
|
|
|
6751
6743
|
var DropDown = _ref5 => {
|
|
6752
6744
|
var {
|
|
6753
6745
|
size,
|
|
6754
|
-
views = {
|
|
6755
|
-
dropDown: {}
|
|
6756
|
-
},
|
|
6746
|
+
views = {},
|
|
6757
6747
|
options,
|
|
6758
6748
|
callback = () => {},
|
|
6759
6749
|
highlightedIndex,
|
|
@@ -6803,7 +6793,7 @@ var DropDown = _ref5 => {
|
|
|
6803
6793
|
borderRadius: '4px'
|
|
6804
6794
|
}
|
|
6805
6795
|
}
|
|
6806
|
-
}, shadow, views
|
|
6796
|
+
}, shadow, views == null ? void 0 : views.dropDown), options.length > 0 && options.map((option, index) => (/*#__PURE__*/React.createElement(Item, Object.assign({
|
|
6807
6797
|
key: option.value,
|
|
6808
6798
|
size: size,
|
|
6809
6799
|
style: views['text'],
|
|
@@ -6824,7 +6814,7 @@ var MultiSelect = _ref6 => {
|
|
|
6824
6814
|
size = 'md',
|
|
6825
6815
|
removeOption = () => {}
|
|
6826
6816
|
} = _ref6,
|
|
6827
|
-
props = _objectWithoutPropertiesLoose(_ref6, _excluded3$
|
|
6817
|
+
props = _objectWithoutPropertiesLoose(_ref6, _excluded3$7);
|
|
6828
6818
|
var handleClick = () => removeOption(option);
|
|
6829
6819
|
return /*#__PURE__*/React.createElement(Horizontal, Object.assign({
|
|
6830
6820
|
gap: 8,
|
|
@@ -7113,7 +7103,7 @@ var ColorSchemes = {
|
|
|
7113
7103
|
}
|
|
7114
7104
|
};
|
|
7115
7105
|
|
|
7116
|
-
var _excluded$p = ["id", "name", "label", "inActiveChild", "activeChild", "labelPosition", "shadow", "size", "value", "isHovered", "isDisabled", "isReadOnly", "on", "setOn", "onChange", "setValue", "setIsHovered", "helperText", "views"];
|
|
7106
|
+
var _excluded$p = ["id", "name", "label", "inActiveChild", "isChecked", "activeChild", "labelPosition", "shadow", "size", "value", "isHovered", "isDisabled", "isReadOnly", "on", "setOn", "onChange", "setValue", "setIsHovered", "helperText", "views"];
|
|
7117
7107
|
var SwitchContent = props => /*#__PURE__*/React.createElement(Input, Object.assign({
|
|
7118
7108
|
type: "checkbox"
|
|
7119
7109
|
}, props));
|
|
@@ -7520,11 +7510,7 @@ var TextFieldView = _ref => {
|
|
|
7520
7510
|
// State properties
|
|
7521
7511
|
cursor: isDisabled ? 'not-allowed' : 'text',
|
|
7522
7512
|
// Animation
|
|
7523
|
-
transition: 'all 0.2s ease'
|
|
7524
|
-
// Dark mode support
|
|
7525
|
-
'@media (prefers-color-scheme: dark)': {
|
|
7526
|
-
color: isDisabled ? 'color.gray.600' : 'color.gray.100'
|
|
7527
|
-
}
|
|
7513
|
+
transition: 'all 0.2s ease'
|
|
7528
7514
|
}, views['field']);
|
|
7529
7515
|
var handleFocus = () => {
|
|
7530
7516
|
setIsFocused(true);
|
|
@@ -9358,8 +9344,8 @@ var IconSizes$4 = {
|
|
|
9358
9344
|
};
|
|
9359
9345
|
|
|
9360
9346
|
var _excluded$t = ["size"],
|
|
9361
|
-
_excluded2$
|
|
9362
|
-
_excluded3$
|
|
9347
|
+
_excluded2$9 = ["size"],
|
|
9348
|
+
_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"];
|
|
9363
9349
|
var CountryList = _ref => {
|
|
9364
9350
|
var props = _objectWithoutPropertiesLoose(_ref, _excluded$t);
|
|
9365
9351
|
return /*#__PURE__*/React.createElement(Element, Object.assign({
|
|
@@ -9370,7 +9356,7 @@ var CountrySelector = props => (/*#__PURE__*/React.createElement(Input, Object.a
|
|
|
9370
9356
|
type: "country"
|
|
9371
9357
|
}, props)));
|
|
9372
9358
|
var CountryItem = _ref2 => {
|
|
9373
|
-
var props = _objectWithoutPropertiesLoose(_ref2, _excluded2$
|
|
9359
|
+
var props = _objectWithoutPropertiesLoose(_ref2, _excluded2$9);
|
|
9374
9360
|
return /*#__PURE__*/React.createElement(Element, Object.assign({
|
|
9375
9361
|
as: "li"
|
|
9376
9362
|
}, props));
|
|
@@ -9472,7 +9458,7 @@ var CountryPickerView = _ref5 => {
|
|
|
9472
9458
|
},
|
|
9473
9459
|
themeMode: elementMode
|
|
9474
9460
|
} = _ref5,
|
|
9475
|
-
props = _objectWithoutPropertiesLoose(_ref5, _excluded3$
|
|
9461
|
+
props = _objectWithoutPropertiesLoose(_ref5, _excluded3$8);
|
|
9476
9462
|
var {
|
|
9477
9463
|
getColor,
|
|
9478
9464
|
themeMode
|
|
@@ -9505,8 +9491,8 @@ var CountryPickerView = _ref5 => {
|
|
|
9505
9491
|
var showLabel = !!(label && (isFocused || value));
|
|
9506
9492
|
var fieldStyles = Object.assign({
|
|
9507
9493
|
margin: 0,
|
|
9508
|
-
|
|
9509
|
-
|
|
9494
|
+
paddingVertical: 8,
|
|
9495
|
+
paddingHorizontal: 0,
|
|
9510
9496
|
width: '100%',
|
|
9511
9497
|
heigth: '100%',
|
|
9512
9498
|
border: 'none',
|
|
@@ -9721,7 +9707,7 @@ var usePasswordState = props => {
|
|
|
9721
9707
|
};
|
|
9722
9708
|
|
|
9723
9709
|
var _excluded$v = ["visibleIcon", "hiddenIcon"],
|
|
9724
|
-
_excluded2$
|
|
9710
|
+
_excluded2$a = ["isVisible", "setIsVisible"];
|
|
9725
9711
|
var PasswordComponent = _ref => {
|
|
9726
9712
|
var {
|
|
9727
9713
|
visibleIcon = /*#__PURE__*/React.createElement(OpenEyeIcon, {
|
|
@@ -9737,7 +9723,7 @@ var PasswordComponent = _ref => {
|
|
|
9737
9723
|
isVisible,
|
|
9738
9724
|
setIsVisible
|
|
9739
9725
|
} = _usePasswordState,
|
|
9740
|
-
passwordProps = _objectWithoutPropertiesLoose(_usePasswordState, _excluded2$
|
|
9726
|
+
passwordProps = _objectWithoutPropertiesLoose(_usePasswordState, _excluded2$a);
|
|
9741
9727
|
return /*#__PURE__*/React.createElement(TextFieldView, Object.assign({}, passwordProps, {
|
|
9742
9728
|
type: isVisible ? 'text' : 'password',
|
|
9743
9729
|
isClearable: false,
|
|
@@ -9970,6 +9956,12 @@ var useOTPInputState = _ref => {
|
|
|
9970
9956
|
onChange,
|
|
9971
9957
|
onChangeText,
|
|
9972
9958
|
onComplete,
|
|
9959
|
+
onKeyDown,
|
|
9960
|
+
onKeyPress,
|
|
9961
|
+
onBlur,
|
|
9962
|
+
onFocus,
|
|
9963
|
+
isReadOnly,
|
|
9964
|
+
isDisabled,
|
|
9973
9965
|
pattern,
|
|
9974
9966
|
stepValues,
|
|
9975
9967
|
pasteTransformer
|
|
@@ -10083,6 +10075,16 @@ var useOTPInputState = _ref => {
|
|
|
10083
10075
|
var handleKeyDown = useCallback(_ => {
|
|
10084
10076
|
// Handle special keys like backspace, arrows, etc.
|
|
10085
10077
|
// This is handled by the browser for the single input
|
|
10078
|
+
if (onKeyDown) {
|
|
10079
|
+
onKeyDown(_);
|
|
10080
|
+
}
|
|
10081
|
+
}, []);
|
|
10082
|
+
var handleKeyPress = useCallback(e => {
|
|
10083
|
+
// Handle key press events
|
|
10084
|
+
// This is handled by the browser for the single input
|
|
10085
|
+
if (onKeyPress) {
|
|
10086
|
+
onKeyPress(e);
|
|
10087
|
+
}
|
|
10086
10088
|
}, []);
|
|
10087
10089
|
var handlePaste = useCallback(e => {
|
|
10088
10090
|
var input = inputRef.current;
|
|
@@ -10239,11 +10241,12 @@ var useOTPInputState = _ref => {
|
|
|
10239
10241
|
handleFocus,
|
|
10240
10242
|
handleBlur,
|
|
10241
10243
|
handleKeyDown,
|
|
10244
|
+
handleKeyPress,
|
|
10242
10245
|
handlePaste
|
|
10243
10246
|
};
|
|
10244
10247
|
};
|
|
10245
10248
|
|
|
10246
|
-
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"];
|
|
10249
|
+
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"];
|
|
10247
10250
|
// Create a context for OTP input slots
|
|
10248
10251
|
var OTPInputContext = /*#__PURE__*/createContext({
|
|
10249
10252
|
slots: [],
|
|
@@ -10251,7 +10254,7 @@ var OTPInputContext = /*#__PURE__*/createContext({
|
|
|
10251
10254
|
isHovering: false
|
|
10252
10255
|
});
|
|
10253
10256
|
// CSS for noscript fallback
|
|
10254
|
-
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
|
|
10257
|
+
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";
|
|
10255
10258
|
// Helper function to safely insert CSS rules
|
|
10256
10259
|
function safeInsertRule(sheet, rule) {
|
|
10257
10260
|
try {
|
|
@@ -10499,7 +10502,8 @@ var OTPInputComponent = props => {
|
|
|
10499
10502
|
handleFocus,
|
|
10500
10503
|
handleBlur,
|
|
10501
10504
|
handleKeyDown,
|
|
10502
|
-
handlePaste
|
|
10505
|
+
handlePaste,
|
|
10506
|
+
handleKeyPress
|
|
10503
10507
|
} = useOTPInputState(props);
|
|
10504
10508
|
// Use the controlled value if it exists, otherwise use the internal state value
|
|
10505
10509
|
var displayValue = controlledValue !== undefined ? controlledValue : value;
|
|
@@ -10521,6 +10525,7 @@ var OTPInputComponent = props => {
|
|
|
10521
10525
|
handleFocus: handleFocus,
|
|
10522
10526
|
handleBlur: handleBlur,
|
|
10523
10527
|
handleKeyDown: handleKeyDown,
|
|
10528
|
+
handleKeyPress: handleKeyPress,
|
|
10524
10529
|
handlePaste: handlePaste,
|
|
10525
10530
|
stepValues: props.stepValues
|
|
10526
10531
|
}));
|
|
@@ -10751,7 +10756,7 @@ var TextFieldComponent$1 = props => {
|
|
|
10751
10756
|
var FormikTextField = TextFieldComponent$1;
|
|
10752
10757
|
|
|
10753
10758
|
var _excluded$D = ["visibleIcon", "hiddenIcon"],
|
|
10754
|
-
_excluded2$
|
|
10759
|
+
_excluded2$b = ["isVisible", "setIsVisible"];
|
|
10755
10760
|
var PasswordComponent$1 = _ref => {
|
|
10756
10761
|
var {
|
|
10757
10762
|
visibleIcon = /*#__PURE__*/React.createElement(OpenEyeIcon, {
|
|
@@ -10768,7 +10773,7 @@ var PasswordComponent$1 = _ref => {
|
|
|
10768
10773
|
isVisible,
|
|
10769
10774
|
setIsVisible
|
|
10770
10775
|
} = _usePasswordState,
|
|
10771
|
-
passwordProps = _objectWithoutPropertiesLoose(_usePasswordState, _excluded2$
|
|
10776
|
+
passwordProps = _objectWithoutPropertiesLoose(_usePasswordState, _excluded2$b);
|
|
10772
10777
|
return /*#__PURE__*/React.createElement(TextFieldView, Object.assign({}, passwordProps, {
|
|
10773
10778
|
type: isVisible ? 'text' : 'password',
|
|
10774
10779
|
isClearable: false,
|
|
@@ -11938,12 +11943,12 @@ var UploadView = _ref => {
|
|
|
11938
11943
|
} = _ref;
|
|
11939
11944
|
var finalPreviewUrl = externalPreviewUrl || previewUrl;
|
|
11940
11945
|
// Debug log to help troubleshoot
|
|
11941
|
-
console.log('Uploader state:', {
|
|
11942
|
-
|
|
11943
|
-
|
|
11944
|
-
|
|
11945
|
-
|
|
11946
|
-
});
|
|
11946
|
+
// console.log('Uploader state:', {
|
|
11947
|
+
// fileType,
|
|
11948
|
+
// finalPreviewUrl,
|
|
11949
|
+
// selectedFile: selectedFile?.name,
|
|
11950
|
+
// progress,
|
|
11951
|
+
// });
|
|
11947
11952
|
return /*#__PURE__*/React.createElement(Center, Object.assign({
|
|
11948
11953
|
onClick: handleClick,
|
|
11949
11954
|
cursor: "pointer",
|
|
@@ -12194,8 +12199,8 @@ var ModalTypography = {
|
|
|
12194
12199
|
};
|
|
12195
12200
|
|
|
12196
12201
|
var _excluded$H = ["children", "blur", "isOpen", "isClosePrevented", "onClose", "position", "views"],
|
|
12197
|
-
_excluded2$
|
|
12198
|
-
_excluded3$
|
|
12202
|
+
_excluded2$c = ["children", "shadow", "isFullScreen", "shape", "views", "isOpen"],
|
|
12203
|
+
_excluded3$9 = ["children", "buttonColor", "iconSize", "buttonPosition", "views"],
|
|
12199
12204
|
_excluded4$7 = ["children", "views"],
|
|
12200
12205
|
_excluded5$3 = ["children", "views"];
|
|
12201
12206
|
var ModalOverlay = _ref => {
|
|
@@ -12244,7 +12249,7 @@ var ModalContainer = _ref2 => {
|
|
|
12244
12249
|
shape = 'rounded',
|
|
12245
12250
|
views
|
|
12246
12251
|
} = _ref2,
|
|
12247
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$
|
|
12252
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$c);
|
|
12248
12253
|
var defaultShadow = typeof document !== undefined ? {
|
|
12249
12254
|
boxShadow: '0px 4px 16px rgba(0, 0, 0, 0.15)'
|
|
12250
12255
|
} : {
|
|
@@ -12277,7 +12282,7 @@ var ModalHeader = _ref3 => {
|
|
|
12277
12282
|
buttonPosition = 'right',
|
|
12278
12283
|
views
|
|
12279
12284
|
} = _ref3,
|
|
12280
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded3$
|
|
12285
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded3$9);
|
|
12281
12286
|
var onClose = props.onClose ? props.onClose : hideModal;
|
|
12282
12287
|
var buttonIcon = /*#__PURE__*/React.createElement(View, {
|
|
12283
12288
|
onClick: onClose
|
|
@@ -13080,7 +13085,9 @@ var useTabsState = (propTabs, initialTabValue) => {
|
|
|
13080
13085
|
return foundTab;
|
|
13081
13086
|
}
|
|
13082
13087
|
// Warn if initialTabValue is provided but not found
|
|
13083
|
-
console.warn(
|
|
13088
|
+
// console.warn(
|
|
13089
|
+
// `Tabs: initialTabValue "${initialTabValue}" not found in tabs. Defaulting to the first tab.`
|
|
13090
|
+
// );
|
|
13084
13091
|
}
|
|
13085
13092
|
return propTabs[0]; // Default to the first tab
|
|
13086
13093
|
};
|
|
@@ -13752,8 +13759,8 @@ var getDropdownPosition = function getDropdownPosition(side, align) {
|
|
|
13752
13759
|
};
|
|
13753
13760
|
|
|
13754
13761
|
var _excluded$M = ["children", "views"],
|
|
13755
|
-
_excluded2$
|
|
13756
|
-
_excluded3$
|
|
13762
|
+
_excluded2$d = ["items", "side", "align", "views"],
|
|
13763
|
+
_excluded3$a = ["item", "views"],
|
|
13757
13764
|
_excluded4$8 = ["views"],
|
|
13758
13765
|
_excluded5$4 = ["trigger", "items", "side", "align", "views", "themeMode"];
|
|
13759
13766
|
// Create context for the DropdownMenu
|
|
@@ -13814,7 +13821,7 @@ var DropdownMenuContent = _ref3 => {
|
|
|
13814
13821
|
align = 'start',
|
|
13815
13822
|
views
|
|
13816
13823
|
} = _ref3,
|
|
13817
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$
|
|
13824
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$d);
|
|
13818
13825
|
var {
|
|
13819
13826
|
isOpen,
|
|
13820
13827
|
//activeSubmenuId, setActiveSubmenuId, size,
|
|
@@ -13850,7 +13857,7 @@ var DropdownMenuItem = _ref4 => {
|
|
|
13850
13857
|
item,
|
|
13851
13858
|
views
|
|
13852
13859
|
} = _ref4,
|
|
13853
|
-
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$
|
|
13860
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$a);
|
|
13854
13861
|
var {
|
|
13855
13862
|
activeSubmenuId,
|
|
13856
13863
|
setActiveSubmenuId,
|
|
@@ -14163,7 +14170,7 @@ var useRect = ref => {
|
|
|
14163
14170
|
};
|
|
14164
14171
|
|
|
14165
14172
|
var _excluded$O = ["children", "views", "asChild"],
|
|
14166
|
-
_excluded2$
|
|
14173
|
+
_excluded2$e = ["children", "views", "side", "align", "sideOffset", "style", "backgroundColor", "borderRadius", "boxShadow", "padding", "minWidth", "maxWidth"];
|
|
14167
14174
|
// Create context for the HoverCard
|
|
14168
14175
|
var HoverCardContext = /*#__PURE__*/createContext({
|
|
14169
14176
|
isOpen: false,
|
|
@@ -14249,7 +14256,7 @@ var HoverCardContent = _ref3 => {
|
|
|
14249
14256
|
minWidth = '200px',
|
|
14250
14257
|
maxWidth = '300px'
|
|
14251
14258
|
} = _ref3,
|
|
14252
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$
|
|
14259
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$e);
|
|
14253
14260
|
var {
|
|
14254
14261
|
isOpen,
|
|
14255
14262
|
cancelCloseTimer,
|
|
@@ -15312,8 +15319,8 @@ var SidebarTransitions = {
|
|
|
15312
15319
|
};
|
|
15313
15320
|
|
|
15314
15321
|
var _excluded$V = ["children", "showToggleButton", "views"],
|
|
15315
|
-
_excluded2$
|
|
15316
|
-
_excluded3$
|
|
15322
|
+
_excluded2$f = ["children", "views"],
|
|
15323
|
+
_excluded3$b = ["children", "views"],
|
|
15317
15324
|
_excluded4$9 = ["children", "position", "size", "variant", "fixed", "hasBackdrop", "expandedWidth", "collapsedWidth", "breakpointBehavior", "elevation", "transitionPreset", "ariaLabel", "isExpanded", "isMobile", "collapse", "views", "themeMode"];
|
|
15318
15325
|
// Create context for the Sidebar
|
|
15319
15326
|
var SidebarContext = /*#__PURE__*/createContext({
|
|
@@ -15411,7 +15418,7 @@ var SidebarContent = _ref3 => {
|
|
|
15411
15418
|
children,
|
|
15412
15419
|
views
|
|
15413
15420
|
} = _ref3,
|
|
15414
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$
|
|
15421
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$f);
|
|
15415
15422
|
var {
|
|
15416
15423
|
isExpanded
|
|
15417
15424
|
} = useSidebarContext();
|
|
@@ -15429,7 +15436,7 @@ var SidebarFooter = _ref4 => {
|
|
|
15429
15436
|
children,
|
|
15430
15437
|
views
|
|
15431
15438
|
} = _ref4,
|
|
15432
|
-
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$
|
|
15439
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$b);
|
|
15433
15440
|
var {
|
|
15434
15441
|
isExpanded
|
|
15435
15442
|
} = useSidebarContext();
|
|
@@ -15987,8 +15994,8 @@ var HandleIconStyles = {
|
|
|
15987
15994
|
};
|
|
15988
15995
|
|
|
15989
15996
|
var _excluded$X = ["children", "id", "defaultSize", "minSize", "maxSize", "collapsible", "defaultCollapsed", "onCollapseChange", "views"],
|
|
15990
|
-
_excluded2$
|
|
15991
|
-
_excluded3$
|
|
15997
|
+
_excluded2$g = ["id", "position", "disabled", "withVisualIndicator", "withCollapseButton", "collapseTarget", "views"],
|
|
15998
|
+
_excluded3$c = ["children", "orientation", "size", "variant", "defaultSizes", "minSize", "maxSize", "collapsible", "containerRef", "autoSaveId", "views"];
|
|
15992
15999
|
// Create context for the Resizable component
|
|
15993
16000
|
var ResizableContext = /*#__PURE__*/createContext({
|
|
15994
16001
|
orientation: 'horizontal',
|
|
@@ -16095,7 +16102,7 @@ var ResizableHandle = _ref3 => {
|
|
|
16095
16102
|
collapseTarget,
|
|
16096
16103
|
views
|
|
16097
16104
|
} = _ref3,
|
|
16098
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$
|
|
16105
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$g);
|
|
16099
16106
|
var {
|
|
16100
16107
|
orientation,
|
|
16101
16108
|
size,
|
|
@@ -16235,7 +16242,7 @@ var ResizableView = _ref4 => {
|
|
|
16235
16242
|
containerRef,
|
|
16236
16243
|
views
|
|
16237
16244
|
} = _ref4,
|
|
16238
|
-
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$
|
|
16245
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$c);
|
|
16239
16246
|
var Container = orientation === 'horizontal' ? Horizontal : Vertical;
|
|
16240
16247
|
return /*#__PURE__*/React.createElement(Container, Object.assign({
|
|
16241
16248
|
ref: containerRef,
|
|
@@ -16784,6 +16791,16 @@ var Toast = /*#__PURE__*/Object.assign(ToastComponent, {
|
|
|
16784
16791
|
// Export the hook for component usage
|
|
16785
16792
|
var useToast$1 = useToast;
|
|
16786
16793
|
|
|
16794
|
+
// Default filter function defined outside the hook to avoid recreating it on each render
|
|
16795
|
+
var defaultFilterFn = (value, item) => {
|
|
16796
|
+
var _item$description, _item$keywords;
|
|
16797
|
+
if (!value) return true;
|
|
16798
|
+
var searchValue = value.toLowerCase();
|
|
16799
|
+
var matchesName = item.name.toLowerCase().includes(searchValue);
|
|
16800
|
+
var matchesDescription = ((_item$description = item.description) == null ? void 0 : _item$description.toLowerCase().includes(searchValue)) || false;
|
|
16801
|
+
var matchesKeywords = ((_item$keywords = item.keywords) == null ? void 0 : _item$keywords.some(keyword => keyword.toLowerCase().includes(searchValue))) || false;
|
|
16802
|
+
return matchesName || matchesDescription || matchesKeywords;
|
|
16803
|
+
};
|
|
16787
16804
|
var useCommandState = _ref => {
|
|
16788
16805
|
var {
|
|
16789
16806
|
open,
|
|
@@ -16792,46 +16809,36 @@ var useCommandState = _ref => {
|
|
|
16792
16809
|
commands = [],
|
|
16793
16810
|
filter
|
|
16794
16811
|
} = _ref;
|
|
16795
|
-
// Combine commands from groups and flat list
|
|
16796
|
-
var allCommands = useCallback(() => {
|
|
16797
|
-
var groupCommands = groups.flatMap(group => group.commands);
|
|
16798
|
-
return [...groupCommands, ...commands];
|
|
16799
|
-
}, [groups, commands]);
|
|
16800
16812
|
// State for search input
|
|
16801
16813
|
var [search, setSearch] = useState('');
|
|
16802
16814
|
// State for selected item index
|
|
16803
16815
|
var [selectedIndex, setSelectedIndex] = useState(0);
|
|
16804
16816
|
// Ref for the command list element
|
|
16805
16817
|
var listRef = useRef(null);
|
|
16806
|
-
//
|
|
16807
|
-
var
|
|
16808
|
-
|
|
16809
|
-
|
|
16810
|
-
var
|
|
16811
|
-
|
|
16812
|
-
|
|
16813
|
-
|
|
16814
|
-
|
|
16815
|
-
|
|
16816
|
-
|
|
16817
|
-
|
|
16818
|
-
|
|
16819
|
-
|
|
16820
|
-
}, [allCommands, filter, defaultFilter]);
|
|
16821
|
-
// Filtered commands based on search
|
|
16822
|
-
var [filteredCommands, setFilteredCommands] = useState(allCommands());
|
|
16823
|
-
// Filtered groups based on search
|
|
16824
|
-
var filteredGroups = useCallback(() => {
|
|
16818
|
+
// Use the provided filter or fall back to the default
|
|
16819
|
+
var filterFn = useMemo(() => filter || defaultFilterFn, [filter]);
|
|
16820
|
+
// Combine and memoize all commands from groups and flat list
|
|
16821
|
+
var allCommands = useMemo(() => {
|
|
16822
|
+
var groupCommands = groups.flatMap(group => group.commands);
|
|
16823
|
+
return [...groupCommands, ...commands];
|
|
16824
|
+
}, [groups, commands]);
|
|
16825
|
+
// Filter and memoize commands based on search
|
|
16826
|
+
var filteredCommands = useMemo(() => {
|
|
16827
|
+
if (!search.trim()) return allCommands;
|
|
16828
|
+
return allCommands.filter(item => filterFn(search, item));
|
|
16829
|
+
}, [allCommands, search, filterFn]);
|
|
16830
|
+
// Filter and memoize groups based on search
|
|
16831
|
+
var filteredGroups = useMemo(() => {
|
|
16825
16832
|
if (!search) return groups;
|
|
16826
|
-
|
|
16827
|
-
|
|
16828
|
-
|
|
16829
|
-
|
|
16830
|
-
|
|
16833
|
+
var filterFn = filter || defaultFilterFn;
|
|
16834
|
+
return groups.map(g => Object.assign({}, g, {
|
|
16835
|
+
commands: g.commands.filter(c => filterFn(search, c))
|
|
16836
|
+
})).filter(g => g.commands.length);
|
|
16837
|
+
}, [groups, search, filter]);
|
|
16838
|
+
// Reset selected index when filtered commands change
|
|
16831
16839
|
useEffect(() => {
|
|
16832
|
-
setFilteredCommands(filterCommands(search));
|
|
16833
16840
|
setSelectedIndex(0);
|
|
16834
|
-
}, [
|
|
16841
|
+
}, [filteredCommands.length]);
|
|
16835
16842
|
// Handle keyboard navigation
|
|
16836
16843
|
var handleKeyDown = useCallback(e => {
|
|
16837
16844
|
if (!open) return;
|
|
@@ -16881,6 +16888,9 @@ var useCommandState = _ref => {
|
|
|
16881
16888
|
useEffect(() => {
|
|
16882
16889
|
if (open) {
|
|
16883
16890
|
setSelectedIndex(0);
|
|
16891
|
+
} else {
|
|
16892
|
+
// Clear search when closed
|
|
16893
|
+
setSearch('');
|
|
16884
16894
|
}
|
|
16885
16895
|
}, [open]);
|
|
16886
16896
|
return {
|
|
@@ -16889,7 +16899,7 @@ var useCommandState = _ref => {
|
|
|
16889
16899
|
selectedIndex,
|
|
16890
16900
|
setSelectedIndex,
|
|
16891
16901
|
filteredCommands,
|
|
16892
|
-
filteredGroups
|
|
16902
|
+
filteredGroups,
|
|
16893
16903
|
listRef
|
|
16894
16904
|
};
|
|
16895
16905
|
};
|
|
@@ -17032,8 +17042,8 @@ var CommandFooterStyles = {
|
|
|
17032
17042
|
};
|
|
17033
17043
|
|
|
17034
17044
|
var _excluded$Z = ["value", "onValueChange", "placeholder", "views"],
|
|
17035
|
-
_excluded2$
|
|
17036
|
-
_excluded3$
|
|
17045
|
+
_excluded2$h = ["children", "views"],
|
|
17046
|
+
_excluded3$d = ["heading", "children", "views"],
|
|
17037
17047
|
_excluded4$a = ["item", "selected", "onSelect", "views"],
|
|
17038
17048
|
_excluded5$5 = ["children", "views"],
|
|
17039
17049
|
_excluded6$3 = ["open", "onOpenChange", "groups", "commands", "placeholder", "size", "variant", "emptyState", "footer", "search", "setSearch", "selectedIndex", "setSelectedIndex", "filteredCommands", "filteredGroups", "listRef", "views", "filter"];
|
|
@@ -17095,7 +17105,7 @@ var CommandList = _ref3 => {
|
|
|
17095
17105
|
children,
|
|
17096
17106
|
views
|
|
17097
17107
|
} = _ref3,
|
|
17098
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$
|
|
17108
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$h);
|
|
17099
17109
|
return /*#__PURE__*/React.createElement(View, Object.assign({}, CommandListStyles, views == null ? void 0 : views.container, props), children);
|
|
17100
17110
|
};
|
|
17101
17111
|
// Command Group component
|
|
@@ -17105,7 +17115,7 @@ var CommandGroup = _ref4 => {
|
|
|
17105
17115
|
children,
|
|
17106
17116
|
views
|
|
17107
17117
|
} = _ref4,
|
|
17108
|
-
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$
|
|
17118
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$d);
|
|
17109
17119
|
return /*#__PURE__*/React.createElement(View, Object.assign({}, CommandGroupStyles, views == null ? void 0 : views.container, props), /*#__PURE__*/React.createElement(Text, Object.assign({}, CommandGroupHeadingStyles, views == null ? void 0 : views.heading), heading), children);
|
|
17110
17120
|
};
|
|
17111
17121
|
// Command Item component
|
|
@@ -17158,26 +17168,21 @@ var CommandView = _ref7 => {
|
|
|
17158
17168
|
} = _ref7,
|
|
17159
17169
|
props = _objectWithoutPropertiesLoose(_ref7, _excluded6$3);
|
|
17160
17170
|
if (!open) return null;
|
|
17161
|
-
var handleItemSelect = item => {
|
|
17162
|
-
if (
|
|
17163
|
-
|
|
17164
|
-
|
|
17165
|
-
|
|
17166
|
-
|
|
17167
|
-
|
|
17168
|
-
var
|
|
17169
|
-
if (e.target === e.currentTarget) {
|
|
17170
|
-
onOpenChange(false);
|
|
17171
|
-
}
|
|
17172
|
-
};
|
|
17173
|
-
var contextValue = {
|
|
17171
|
+
var handleItemSelect = React.useCallback(item => {
|
|
17172
|
+
if (item.disabled) return;
|
|
17173
|
+
item.onSelect();
|
|
17174
|
+
onOpenChange(false);
|
|
17175
|
+
setSearch('');
|
|
17176
|
+
}, [onOpenChange, setSearch]);
|
|
17177
|
+
var handleBackdropClick = React.useCallback(e => e.target === e.currentTarget && onOpenChange(false), [onOpenChange]);
|
|
17178
|
+
var contextValue = React.useMemo(() => ({
|
|
17174
17179
|
search,
|
|
17175
17180
|
setSearch,
|
|
17176
17181
|
selectedIndex,
|
|
17177
17182
|
setSelectedIndex,
|
|
17178
17183
|
filteredCommands,
|
|
17179
17184
|
onSelect: handleItemSelect
|
|
17180
|
-
};
|
|
17185
|
+
}), [search, selectedIndex, filteredCommands, handleItemSelect, setSearch, setSelectedIndex]);
|
|
17181
17186
|
var hasGroups = groups.length > 0;
|
|
17182
17187
|
// const hasCommands = commands.length > 0;
|
|
17183
17188
|
var isEmpty = filteredCommands.length === 0;
|
|
@@ -17557,8 +17562,8 @@ var getArrowStyles = position => {
|
|
|
17557
17562
|
};
|
|
17558
17563
|
|
|
17559
17564
|
var _excluded$$ = ["children", "views", "asChild"],
|
|
17560
|
-
_excluded2$
|
|
17561
|
-
_excluded3$
|
|
17565
|
+
_excluded2$i = ["children", "views"],
|
|
17566
|
+
_excluded3$e = ["content", "children", "position", "align", "size", "variant", "showArrow", "views", "themeMode"];
|
|
17562
17567
|
// Create context for the Tooltip
|
|
17563
17568
|
var TooltipContext = /*#__PURE__*/createContext({
|
|
17564
17569
|
isOpen: false,
|
|
@@ -17628,7 +17633,7 @@ var TooltipContent = _ref3 => {
|
|
|
17628
17633
|
children,
|
|
17629
17634
|
views
|
|
17630
17635
|
} = _ref3,
|
|
17631
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$
|
|
17636
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$i);
|
|
17632
17637
|
var {
|
|
17633
17638
|
isOpen,
|
|
17634
17639
|
contentRef,
|
|
@@ -17658,7 +17663,7 @@ var TooltipView = _ref4 => {
|
|
|
17658
17663
|
showArrow = true,
|
|
17659
17664
|
views
|
|
17660
17665
|
} = _ref4,
|
|
17661
|
-
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$
|
|
17666
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$e);
|
|
17662
17667
|
var {
|
|
17663
17668
|
isOpen,
|
|
17664
17669
|
// openTooltip,
|