@app-studio/web 0.8.82 → 0.8.84
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 -1
- package/dist/components/Button/Button/Button.view.d.ts +1 -3
- package/dist/components/Slider/Slider/Slider.props.d.ts +0 -4
- package/dist/web.cjs.development.js +294 -194
- 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 +294 -194
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +294 -194
- 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
|
@@ -2821,71 +2821,70 @@ var Icon = {
|
|
|
2821
2821
|
* Get theme styles for different alert variants based on theme mode
|
|
2822
2822
|
*/
|
|
2823
2823
|
var getThemes = themeMode => {
|
|
2824
|
-
var isDarkMode = themeMode === 'dark';
|
|
2825
2824
|
return {
|
|
2826
2825
|
default: {
|
|
2827
2826
|
container: {
|
|
2828
|
-
backgroundColor:
|
|
2829
|
-
borderColor:
|
|
2830
|
-
boxShadow:
|
|
2827
|
+
backgroundColor: 'color.gray.50',
|
|
2828
|
+
borderColor: 'color.gray.200',
|
|
2829
|
+
boxShadow: '0 1px 2px rgba(0, 0, 0, 0.05)'
|
|
2831
2830
|
},
|
|
2832
2831
|
content: {
|
|
2833
|
-
color:
|
|
2832
|
+
color: 'color.gray.700'
|
|
2834
2833
|
},
|
|
2835
2834
|
icon: {
|
|
2836
|
-
color:
|
|
2835
|
+
color: 'color.gray.500'
|
|
2837
2836
|
}
|
|
2838
2837
|
},
|
|
2839
2838
|
info: {
|
|
2840
2839
|
container: {
|
|
2841
|
-
backgroundColor:
|
|
2842
|
-
borderColor:
|
|
2843
|
-
boxShadow:
|
|
2840
|
+
backgroundColor: 'color.blue.50',
|
|
2841
|
+
borderColor: 'color.blue.200',
|
|
2842
|
+
boxShadow: '0 1px 2px rgba(59, 130, 246, 0.05)'
|
|
2844
2843
|
},
|
|
2845
2844
|
content: {
|
|
2846
|
-
color:
|
|
2845
|
+
color: 'color.blue.700'
|
|
2847
2846
|
},
|
|
2848
2847
|
icon: {
|
|
2849
|
-
color:
|
|
2848
|
+
color: 'color.blue.500'
|
|
2850
2849
|
}
|
|
2851
2850
|
},
|
|
2852
2851
|
success: {
|
|
2853
2852
|
container: {
|
|
2854
|
-
backgroundColor:
|
|
2855
|
-
borderColor:
|
|
2856
|
-
boxShadow:
|
|
2853
|
+
backgroundColor: 'color.green.50',
|
|
2854
|
+
borderColor: 'color.green.200',
|
|
2855
|
+
boxShadow: '0 1px 2px rgba(34, 197, 94, 0.05)'
|
|
2857
2856
|
},
|
|
2858
2857
|
content: {
|
|
2859
|
-
color:
|
|
2858
|
+
color: 'color.green.700'
|
|
2860
2859
|
},
|
|
2861
2860
|
icon: {
|
|
2862
|
-
color:
|
|
2861
|
+
color: 'color.green.500'
|
|
2863
2862
|
}
|
|
2864
2863
|
},
|
|
2865
2864
|
error: {
|
|
2866
2865
|
container: {
|
|
2867
|
-
backgroundColor:
|
|
2868
|
-
borderColor:
|
|
2869
|
-
boxShadow:
|
|
2866
|
+
backgroundColor: 'color.red.50',
|
|
2867
|
+
borderColor: 'color.red.200',
|
|
2868
|
+
boxShadow: '0 1px 2px rgba(239, 68, 68, 0.05)'
|
|
2870
2869
|
},
|
|
2871
2870
|
content: {
|
|
2872
|
-
color:
|
|
2871
|
+
color: 'color.red.700'
|
|
2873
2872
|
},
|
|
2874
2873
|
icon: {
|
|
2875
|
-
color:
|
|
2874
|
+
color: 'color.red.500'
|
|
2876
2875
|
}
|
|
2877
2876
|
},
|
|
2878
2877
|
warning: {
|
|
2879
2878
|
container: {
|
|
2880
|
-
backgroundColor:
|
|
2881
|
-
borderColor:
|
|
2882
|
-
boxShadow:
|
|
2879
|
+
backgroundColor: 'color.orange.50',
|
|
2880
|
+
borderColor: 'color.orange.200',
|
|
2881
|
+
boxShadow: '0 1px 2px rgba(249, 115, 22, 0.05)'
|
|
2883
2882
|
},
|
|
2884
2883
|
content: {
|
|
2885
|
-
color:
|
|
2884
|
+
color: 'color.orange.700'
|
|
2886
2885
|
},
|
|
2887
2886
|
icon: {
|
|
2888
|
-
color:
|
|
2887
|
+
color: 'color.orange.500'
|
|
2889
2888
|
}
|
|
2890
2889
|
}
|
|
2891
2890
|
};
|
|
@@ -2908,8 +2907,7 @@ var AlertView = _ref => {
|
|
|
2908
2907
|
var {
|
|
2909
2908
|
themeMode
|
|
2910
2909
|
} = appStudio.useTheme();
|
|
2911
|
-
var
|
|
2912
|
-
var themes = getThemes(currentThemeMode);
|
|
2910
|
+
var themes = getThemes();
|
|
2913
2911
|
// Select the appropriate icon based on the variant
|
|
2914
2912
|
var getIcon = () => {
|
|
2915
2913
|
var _views$icon$color, _views$icon;
|
|
@@ -3238,11 +3236,10 @@ var PositionStyles = {
|
|
|
3238
3236
|
* Get badge variants with consistent styling based on theme mode
|
|
3239
3237
|
*/
|
|
3240
3238
|
var getBadgeVariants = themeMode => {
|
|
3241
|
-
var isDarkMode = themeMode === 'dark';
|
|
3242
3239
|
return {
|
|
3243
3240
|
filled: {
|
|
3244
3241
|
backgroundColor: 'theme.primary',
|
|
3245
|
-
color:
|
|
3242
|
+
color: 'color.white',
|
|
3246
3243
|
borderWidth: '1px',
|
|
3247
3244
|
borderStyle: 'solid',
|
|
3248
3245
|
borderColor: 'transparent',
|
|
@@ -3268,7 +3265,7 @@ var getBadgeVariants = themeMode => {
|
|
|
3268
3265
|
},
|
|
3269
3266
|
ghost: {
|
|
3270
3267
|
backgroundColor: 'transparent',
|
|
3271
|
-
color:
|
|
3268
|
+
color: 'color.gray.500',
|
|
3272
3269
|
borderWidth: '1px',
|
|
3273
3270
|
borderStyle: 'solid',
|
|
3274
3271
|
borderColor: 'transparent',
|
|
@@ -3296,8 +3293,7 @@ var BadgeView = _ref => {
|
|
|
3296
3293
|
var {
|
|
3297
3294
|
themeMode
|
|
3298
3295
|
} = appStudio.useTheme();
|
|
3299
|
-
var
|
|
3300
|
-
var variantStyles = getBadgeVariants(currentThemeMode)[variant];
|
|
3296
|
+
var variantStyles = getBadgeVariants()[variant];
|
|
3301
3297
|
// Combine styles for the badge
|
|
3302
3298
|
var combinedStyles = Object.assign({
|
|
3303
3299
|
// Base styles
|
|
@@ -3559,7 +3555,9 @@ var DefaultSpinner = _ref => {
|
|
|
3559
3555
|
getColor,
|
|
3560
3556
|
themeMode
|
|
3561
3557
|
} = appStudio.useTheme();
|
|
3562
|
-
var colorStyle = getColor(color,
|
|
3558
|
+
var colorStyle = getColor(color, {
|
|
3559
|
+
themeMode: elementMode ? elementMode : themeMode
|
|
3560
|
+
});
|
|
3563
3561
|
var sizeStyle = typeof size === 'number' ? size : DefaultSizes[size];
|
|
3564
3562
|
var [angle, setAngle] = React.useState(0);
|
|
3565
3563
|
React.useEffect(() => {
|
|
@@ -3606,7 +3604,9 @@ var Dotted = _ref2 => {
|
|
|
3606
3604
|
getColor,
|
|
3607
3605
|
themeMode
|
|
3608
3606
|
} = appStudio.useTheme();
|
|
3609
|
-
var colorStyle = getColor(color,
|
|
3607
|
+
var colorStyle = getColor(color, {
|
|
3608
|
+
themeMode: elementMode ? elementMode : themeMode
|
|
3609
|
+
});
|
|
3610
3610
|
var sizeStyle = typeof size === 'number' ? size : DefaultSizes[size];
|
|
3611
3611
|
var [angle, setAngle] = React.useState(0);
|
|
3612
3612
|
React.useEffect(() => {
|
|
@@ -3652,7 +3652,9 @@ var Quarter = _ref3 => {
|
|
|
3652
3652
|
getColor,
|
|
3653
3653
|
themeMode
|
|
3654
3654
|
} = appStudio.useTheme();
|
|
3655
|
-
var colorStyle = getColor(color,
|
|
3655
|
+
var colorStyle = getColor(color, {
|
|
3656
|
+
themeMode: elementMode ? elementMode : themeMode
|
|
3657
|
+
});
|
|
3656
3658
|
var sizeStyle = typeof size === 'number' ? size : DefaultSizes[size];
|
|
3657
3659
|
var [angle, setAngle] = React.useState(0);
|
|
3658
3660
|
React.useEffect(() => {
|
|
@@ -3719,9 +3721,10 @@ React__default.createElement(LoaderView, Object.assign({}, props)));
|
|
|
3719
3721
|
// Exports the LoaderComponent as Loader, making it available for use in other parts of the application.
|
|
3720
3722
|
var Loader = LoaderComponent;
|
|
3721
3723
|
|
|
3722
|
-
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", "
|
|
3724
|
+
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", "color", "backgroundColor"],
|
|
3723
3725
|
_excluded2$3 = ["_hover", "_active"],
|
|
3724
3726
|
_excluded3$3 = ["height"];
|
|
3727
|
+
// Using require for contrast as it seems to be a common pattern in your code
|
|
3725
3728
|
var contrast = /*#__PURE__*/require('contrast');
|
|
3726
3729
|
var ButtonView = _ref => {
|
|
3727
3730
|
var _props$onClick;
|
|
@@ -3743,13 +3746,16 @@ var ButtonView = _ref => {
|
|
|
3743
3746
|
onClick = () => {},
|
|
3744
3747
|
loaderProps = {},
|
|
3745
3748
|
loaderPosition = 'left',
|
|
3746
|
-
effect = 'default',
|
|
3747
|
-
|
|
3749
|
+
effect = 'default' // 'default', 'hover', 'reverse'
|
|
3750
|
+
,
|
|
3748
3751
|
setIsHovered = () => {},
|
|
3749
3752
|
isExternal = false,
|
|
3750
3753
|
themeMode: elementMode,
|
|
3754
|
+
// Allow overriding themeMode for this element
|
|
3751
3755
|
views,
|
|
3752
|
-
|
|
3756
|
+
color,
|
|
3757
|
+
// Text color prop
|
|
3758
|
+
backgroundColor = 'theme.primary' // Background color prop
|
|
3753
3759
|
} = _ref,
|
|
3754
3760
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
3755
3761
|
var {
|
|
@@ -3761,83 +3767,170 @@ var ButtonView = _ref => {
|
|
|
3761
3767
|
var defaultNativeProps = {
|
|
3762
3768
|
disabled: !isActive
|
|
3763
3769
|
};
|
|
3764
|
-
|
|
3765
|
-
var
|
|
3766
|
-
|
|
3767
|
-
// Determine
|
|
3768
|
-
var
|
|
3769
|
-
|
|
3770
|
-
var
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3770
|
+
// Determine the base background color key/value, considering disabled state
|
|
3771
|
+
var buttonBackgroundColorKey = isActive ? backgroundColor : 'theme.disabled';
|
|
3772
|
+
// --- Provided Color Logic ---
|
|
3773
|
+
// Determine the effective theme mode for this button
|
|
3774
|
+
var mode = elementMode != null ? elementMode : themeMode; // effective mode
|
|
3775
|
+
// Resolve the base background color string
|
|
3776
|
+
var bg = getColor(buttonBackgroundColorKey, {
|
|
3777
|
+
themeMode: mode
|
|
3778
|
+
});
|
|
3779
|
+
// Resolve the background color string in the opposite theme mode (for reverse effect, though not directly used for ghost/outline text contrast)
|
|
3780
|
+
// const bgHover = getColor(buttonBackgroundColorKey, {
|
|
3781
|
+
// themeMode: mode === 'light' ? 'dark' : 'light',
|
|
3782
|
+
// }); // bgHover is not strictly needed for the text contrast logic below
|
|
3783
|
+
// Check contrast of base background
|
|
3784
|
+
var isBgLight = contrast(bg) === mode;
|
|
3785
|
+
// Determine contrasting text color key for the base background
|
|
3786
|
+
var txtOnBgKey = isBgLight ? 'color.black' : 'color.white';
|
|
3787
|
+
// --- End Provided Color Logic ---
|
|
3788
|
+
// Determine the default text color key/value if 'color' prop is not provided
|
|
3789
|
+
// For filled buttons, default text color should contrast with the background (use txtOnBgKey).
|
|
3790
|
+
// For outline/link/ghost, a theme-appropriate text color is usually better (e.g., theme.text or theme.primary).
|
|
3791
|
+
var defaultTextColorKey;
|
|
3792
|
+
if (variant === 'filled') {
|
|
3793
|
+
defaultTextColorKey = txtOnBgKey; // Use the calculated contrasting color key
|
|
3794
|
+
} else {
|
|
3795
|
+
// For non-filled variants, default to theme's text color or primary color
|
|
3796
|
+
defaultTextColorKey = 'theme.primary'; // Or 'theme.primary' depending on design system
|
|
3797
|
+
}
|
|
3798
|
+
// Determine the actual key/value for the base text color
|
|
3799
|
+
// Use the provided 'color' prop if available, otherwise use the calculated default
|
|
3800
|
+
var baseTextColorKey = color || defaultTextColorKey;
|
|
3801
|
+
// Resolve the actual base text color string
|
|
3802
|
+
var resolvedBaseTextColor = getColor(baseTextColorKey, {
|
|
3803
|
+
themeMode: mode
|
|
3804
|
+
});
|
|
3805
|
+
// Resolve the contrasting color string for the base background (used for text in outline/ghost reverse)
|
|
3806
|
+
var contrastingColorForBg = getColor(txtOnBgKey, {
|
|
3807
|
+
themeMode: mode
|
|
3808
|
+
});
|
|
3809
|
+
// Resolve the contrasting color string for the base text color (used for text in ghost reverse)
|
|
3810
|
+
var isBaseTextLight = contrast(resolvedBaseTextColor) === 'light';
|
|
3811
|
+
var contrastingColorForBaseText = getColor(isBaseTextLight ? 'color.black' : 'color.white', {
|
|
3812
|
+
themeMode: mode
|
|
3813
|
+
});
|
|
3814
|
+
// --- Button Variant Styles Function ---
|
|
3815
|
+
// This function calculates the styles based on the current state (base, hover, active)
|
|
3816
|
+
var getButtonVariantStyles = _ref2 => {
|
|
3817
|
+
var {
|
|
3818
|
+
currentVariant,
|
|
3819
|
+
currentEffect,
|
|
3820
|
+
resolvedBg,
|
|
3821
|
+
// Resolved base background color string (bg)
|
|
3822
|
+
resolvedBaseTextColor,
|
|
3823
|
+
// Resolved base text color string
|
|
3824
|
+
contrastingColorForBg,
|
|
3825
|
+
// Resolved contrasting color string for resolvedBg
|
|
3826
|
+
contrastingColorForBaseText,
|
|
3827
|
+
// Resolved contrasting color string for resolvedBaseTextColor
|
|
3828
|
+
resolvedBorderColor
|
|
3829
|
+
} = _ref2;
|
|
3830
|
+
// Define the base styles for each variant
|
|
3831
|
+
var baseStyles = {
|
|
3832
|
+
filled: {
|
|
3833
|
+
backgroundColor: resolvedBg,
|
|
3834
|
+
color: resolvedBaseTextColor,
|
|
3835
|
+
borderWidth: 1,
|
|
3836
|
+
borderStyle: 'solid',
|
|
3837
|
+
borderColor: 'transparent'
|
|
3783
3838
|
},
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
outline: {
|
|
3791
|
-
backgroundColor: reverse ? buttonColor : 'transparent',
|
|
3792
|
-
borderWidth: 1,
|
|
3793
|
-
borderStyle: 'solid',
|
|
3794
|
-
borderColor: reverse ? buttonColor : colorScheme,
|
|
3795
|
-
color: reverse ? 'white' : buttonColor,
|
|
3796
|
-
_hover: {
|
|
3797
|
-
themeMode: reverse ? reverseMode : buttonMode,
|
|
3798
|
-
transform: 'translateY(-1px)',
|
|
3799
|
-
boxShadow: '0 4px 8px rgba(0, 0, 0, 0.05)'
|
|
3839
|
+
outline: {
|
|
3840
|
+
backgroundColor: 'transparent',
|
|
3841
|
+
color: resolvedBaseTextColor,
|
|
3842
|
+
borderWidth: 1,
|
|
3843
|
+
borderStyle: 'solid',
|
|
3844
|
+
borderColor: resolvedBorderColor
|
|
3800
3845
|
},
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
backgroundColor: 'transparent',
|
|
3809
|
-
borderWidth: 0,
|
|
3810
|
-
borderStyle: 'none',
|
|
3811
|
-
borderColor: 'transparent',
|
|
3812
|
-
color: buttonColor,
|
|
3813
|
-
textDecoration: reverse ? 'none' : 'underline',
|
|
3814
|
-
_hover: {
|
|
3815
|
-
opacity: 0.8,
|
|
3816
|
-
textDecorationThickness: '2px'
|
|
3846
|
+
link: {
|
|
3847
|
+
backgroundColor: 'transparent',
|
|
3848
|
+
color: resolvedBg,
|
|
3849
|
+
borderWidth: 0,
|
|
3850
|
+
borderStyle: 'none',
|
|
3851
|
+
borderColor: 'transparent',
|
|
3852
|
+
textDecoration: 'underline'
|
|
3817
3853
|
},
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3854
|
+
ghost: {
|
|
3855
|
+
backgroundColor: 'transparent',
|
|
3856
|
+
color: resolvedBaseTextColor,
|
|
3857
|
+
borderWidth: 0,
|
|
3858
|
+
borderStyle: 'none',
|
|
3859
|
+
borderColor: 'transparent'
|
|
3821
3860
|
}
|
|
3822
|
-
}
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
transform: 'translateY(-1px)'
|
|
3861
|
+
};
|
|
3862
|
+
// Define the styles applied on hover/active when effect is 'reverse'
|
|
3863
|
+
var reverseHoverActiveStyles = {
|
|
3864
|
+
filled: {
|
|
3865
|
+
backgroundColor: 'transparent',
|
|
3866
|
+
color: resolvedBg,
|
|
3867
|
+
borderWidth: 1,
|
|
3868
|
+
borderStyle: 'solid',
|
|
3869
|
+
borderColor: resolvedBg
|
|
3832
3870
|
},
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3871
|
+
outline: {
|
|
3872
|
+
backgroundColor: resolvedBg,
|
|
3873
|
+
color: contrastingColorForBg,
|
|
3874
|
+
borderWidth: 1,
|
|
3875
|
+
borderStyle: 'solid',
|
|
3876
|
+
borderColor: 'transparent'
|
|
3877
|
+
},
|
|
3878
|
+
link: {
|
|
3879
|
+
backgroundColor: 'transparent',
|
|
3880
|
+
color: resolvedBg,
|
|
3881
|
+
borderWidth: 0,
|
|
3882
|
+
borderStyle: 'none',
|
|
3883
|
+
borderColor: 'transparent',
|
|
3884
|
+
textDecoration: 'none'
|
|
3885
|
+
},
|
|
3886
|
+
ghost: {
|
|
3887
|
+
backgroundColor: resolvedBg,
|
|
3888
|
+
color: contrastingColorForBaseText,
|
|
3889
|
+
borderWidth: 0,
|
|
3890
|
+
borderStyle: 'none',
|
|
3891
|
+
borderColor: 'transparent'
|
|
3836
3892
|
}
|
|
3837
|
-
}
|
|
3893
|
+
};
|
|
3894
|
+
// General hover/active effects (transform, shadow, opacity, etc.)
|
|
3895
|
+
var generalHoverStyles = {
|
|
3896
|
+
transform: 'translateY(2px)',
|
|
3897
|
+
boxShadow: currentVariant === 'link' ? undefined : '0 4px 8px rgba(0, 0, 0, 0.1)',
|
|
3898
|
+
// opacity: currentVariant === 'link' ? 0.8 : undefined,
|
|
3899
|
+
textDecorationThickness: currentVariant === 'link' ? '2px' : undefined
|
|
3900
|
+
};
|
|
3901
|
+
var generalActiveStyles = {
|
|
3902
|
+
transform: 'translateY(-1px)',
|
|
3903
|
+
boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)',
|
|
3904
|
+
opacity: currentVariant === 'link' ? 0.8 : undefined,
|
|
3905
|
+
textDecorationThickness: currentVariant === 'link' ? '2px' : undefined
|
|
3906
|
+
};
|
|
3907
|
+
// Combine base styles with conditional hover/active overrides
|
|
3908
|
+
return Object.assign({}, baseStyles[currentVariant], {
|
|
3909
|
+
_hover: Object.assign({}, currentEffect === 'reverse' ? reverseHoverActiveStyles[currentVariant] : {}, currentEffect === 'hover' ? {
|
|
3910
|
+
filter: 'brightness(0.85)'
|
|
3911
|
+
} : {}, generalHoverStyles),
|
|
3912
|
+
_active: Object.assign({}, currentEffect === 'reverse' ? reverseHoverActiveStyles[currentVariant] : {}, currentEffect === 'hover' ? {
|
|
3913
|
+
filter: 'brightness(0.7)'
|
|
3914
|
+
} : {}, generalActiveStyles)
|
|
3915
|
+
});
|
|
3838
3916
|
};
|
|
3917
|
+
// Get the calculated variant styles for the current state
|
|
3918
|
+
var buttonVariantStyles = getButtonVariantStyles({
|
|
3919
|
+
currentVariant: variant,
|
|
3920
|
+
currentEffect: effect,
|
|
3921
|
+
resolvedBg: bg,
|
|
3922
|
+
resolvedBaseTextColor: resolvedBaseTextColor,
|
|
3923
|
+
contrastingColorForBg: contrastingColorForBg,
|
|
3924
|
+
contrastingColorForBaseText: contrastingColorForBaseText,
|
|
3925
|
+
resolvedBorderColor: bg
|
|
3926
|
+
});
|
|
3927
|
+
// Extract hover and active styles from the calculated styles
|
|
3928
|
+
var {
|
|
3929
|
+
_hover,
|
|
3930
|
+
_active
|
|
3931
|
+
} = buttonVariantStyles,
|
|
3932
|
+
baseButtonVariantStyles = _objectWithoutPropertiesLoose(buttonVariantStyles, _excluded2$3);
|
|
3839
3933
|
var buttonSizeStyles = ButtonSizes[size];
|
|
3840
|
-
var buttonVariant = ButtonVariants[variant];
|
|
3841
3934
|
var scaleWidth = {
|
|
3842
3935
|
width: isAuto === true ? 'fit-content' : isFilled ? '100%' : buttonSizeStyles.width
|
|
3843
3936
|
};
|
|
@@ -3850,62 +3943,68 @@ var ButtonView = _ref => {
|
|
|
3850
3943
|
alignItems: "center",
|
|
3851
3944
|
justifyContent: "center"
|
|
3852
3945
|
}, views == null ? void 0 : views.container), isLoading && loaderPosition === 'left' && (/*#__PURE__*/React__default.createElement(Loader, Object.assign({
|
|
3853
|
-
size: size === 'xs' || size === 'sm' ? 'sm' : 'md'
|
|
3946
|
+
size: size === 'xs' || size === 'sm' ? 'sm' : 'md',
|
|
3947
|
+
color: baseButtonVariantStyles.color
|
|
3854
3948
|
}, loaderProps))), icon && ['left', 'top'].includes(iconPosition) && !isLoading && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
3855
3949
|
display: "flex",
|
|
3856
3950
|
alignItems: "center",
|
|
3857
|
-
justifyContent: "center"
|
|
3951
|
+
justifyContent: "center",
|
|
3952
|
+
color: baseButtonVariantStyles.color
|
|
3858
3953
|
}, views == null ? void 0 : views.icon), icon)), children, icon && ['right', 'bottom'].includes(iconPosition) && !isLoading && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
3859
3954
|
display: "flex",
|
|
3860
3955
|
alignItems: "center",
|
|
3861
|
-
justifyContent: "center"
|
|
3956
|
+
justifyContent: "center",
|
|
3957
|
+
color: baseButtonVariantStyles.color
|
|
3862
3958
|
}, views == null ? void 0 : views.icon), icon)), isLoading && loaderPosition === 'right' && (/*#__PURE__*/React__default.createElement(Loader, Object.assign({
|
|
3863
|
-
size: size === 'xs' || size === 'sm' ? 'sm' : 'md'
|
|
3959
|
+
size: size === 'xs' || size === 'sm' ? 'sm' : 'md',
|
|
3960
|
+
color: baseButtonVariantStyles.color
|
|
3864
3961
|
}, loaderProps))));
|
|
3865
|
-
//
|
|
3866
|
-
var
|
|
3867
|
-
{
|
|
3868
|
-
_hover,
|
|
3869
|
-
_active
|
|
3870
|
-
} = _ref2,
|
|
3871
|
-
baseButtonVariant = _objectWithoutPropertiesLoose(_ref2, _excluded2$3);
|
|
3962
|
+
// Determine if the button should render as a Link or a button Element
|
|
3963
|
+
var isLink = variant === 'link' && to;
|
|
3872
3964
|
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
|
|
3873
3965
|
gap: 8,
|
|
3874
|
-
as:
|
|
3875
|
-
type:
|
|
3966
|
+
as: isLink ? 'div' : 'button',
|
|
3967
|
+
type: isLink ? undefined : 'button',
|
|
3876
3968
|
display: "flex",
|
|
3877
3969
|
alignItems: "center",
|
|
3878
3970
|
justifyContent: "center",
|
|
3879
3971
|
"aria-label": ariaLabel,
|
|
3880
|
-
backgroundColor
|
|
3972
|
+
// backgroundColor="transparent" // Remove this unless it's intended to override variant styles
|
|
3881
3973
|
borderRadius: ButtonShapes[shape],
|
|
3882
3974
|
onClick: (_props$onClick = props.onClick) != null ? _props$onClick : onClick,
|
|
3883
3975
|
onMouseEnter: () => handleHover(true),
|
|
3884
3976
|
onMouseLeave: () => handleHover(false),
|
|
3885
|
-
cursor: isActive ? 'pointer' : 'default',
|
|
3886
|
-
filter: hovering && effect === 'hover' ? 'brightness(0.85)' : 'brightness(1)',
|
|
3977
|
+
cursor: isActive ? isLink ? 'pointer' : 'pointer' : 'default',
|
|
3887
3978
|
transition: "all 0.2s ease",
|
|
3888
|
-
|
|
3889
|
-
// Apply consistent styling according to design guidelines
|
|
3979
|
+
// filter and transform are now handled within _hover/_active styles
|
|
3890
3980
|
// Apply shadow if provided
|
|
3891
3981
|
boxShadow: shadow ? shadow : undefined
|
|
3892
3982
|
}, defaultNativeProps, (_ref3 => {
|
|
3893
3983
|
var rest = _objectWithoutPropertiesLoose(_ref3, _excluded3$3);
|
|
3894
3984
|
return rest;
|
|
3895
|
-
})(props), buttonSizeStyles,
|
|
3985
|
+
})(props), buttonSizeStyles, baseButtonVariantStyles, scaleWidth, props.padding || props.paddingHorizontal || props.paddingVertical || props.paddingLeft || props.paddingRight || props.paddingTop || props.paddingBottom ? {} : changePadding, {
|
|
3896
3986
|
// Apply hover and active styles
|
|
3897
3987
|
_hover: _hover,
|
|
3898
3988
|
_active: _active
|
|
3899
|
-
}, views == null ? void 0 : views.container),
|
|
3989
|
+
}, props, views == null ? void 0 : views.container), to ? (/*#__PURE__*/React__default.createElement(Link, Object.assign({
|
|
3900
3990
|
to: to,
|
|
3901
|
-
|
|
3902
|
-
|
|
3991
|
+
isExternal: isExternal,
|
|
3992
|
+
// Link styles should inherit from the button's calculated styles or be defined here
|
|
3993
|
+
// Let's apply relevant styles from the button variant to the Link
|
|
3994
|
+
color: baseButtonVariantStyles.color,
|
|
3995
|
+
textDecoration: baseButtonVariantStyles.textDecoration,
|
|
3996
|
+
textDecorationColor: baseButtonVariantStyles.color,
|
|
3997
|
+
textDecorationThickness: "1px" // Base thickness
|
|
3998
|
+
,
|
|
3903
3999
|
textUnderlineOffset: "2px",
|
|
3904
4000
|
transition: "all 0.2s ease",
|
|
3905
|
-
|
|
3906
|
-
_hover: {
|
|
4001
|
+
// Apply Link-specific hover/active styles if needed, or let Element's _hover/_active handle it
|
|
4002
|
+
_hover: Object.assign({}, _hover, {
|
|
3907
4003
|
textDecorationThickness: '2px'
|
|
3908
|
-
}
|
|
4004
|
+
}),
|
|
4005
|
+
_active: Object.assign({}, _active, {
|
|
4006
|
+
textDecorationThickness: '2px'
|
|
4007
|
+
})
|
|
3909
4008
|
}, views == null ? void 0 : views.link), content)) : content);
|
|
3910
4009
|
};
|
|
3911
4010
|
|
|
@@ -3958,30 +4057,29 @@ var CardShapes = {
|
|
|
3958
4057
|
* Get card variants with consistent styling based on theme mode
|
|
3959
4058
|
*/
|
|
3960
4059
|
var getCardVariants = themeMode => {
|
|
3961
|
-
var isDarkMode = themeMode === 'dark';
|
|
3962
4060
|
return {
|
|
3963
4061
|
default: {
|
|
3964
|
-
backgroundColor:
|
|
4062
|
+
backgroundColor: 'color.white',
|
|
3965
4063
|
border: 'none',
|
|
3966
4064
|
transition: 'all 0.2s ease'
|
|
3967
4065
|
},
|
|
3968
4066
|
outlined: {
|
|
3969
|
-
backgroundColor:
|
|
4067
|
+
backgroundColor: 'color.white',
|
|
3970
4068
|
borderWidth: '1px',
|
|
3971
4069
|
borderStyle: 'solid',
|
|
3972
|
-
borderColor:
|
|
4070
|
+
borderColor: 'color.gray.200',
|
|
3973
4071
|
transition: 'all 0.2s ease',
|
|
3974
4072
|
_hover: {
|
|
3975
|
-
borderColor:
|
|
4073
|
+
borderColor: 'color.gray.300'
|
|
3976
4074
|
}
|
|
3977
4075
|
},
|
|
3978
4076
|
elevated: {
|
|
3979
|
-
backgroundColor:
|
|
3980
|
-
boxShadow:
|
|
4077
|
+
backgroundColor: 'color.white',
|
|
4078
|
+
boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.08)',
|
|
3981
4079
|
border: 'none',
|
|
3982
4080
|
transition: 'all 0.2s ease',
|
|
3983
4081
|
_hover: {
|
|
3984
|
-
boxShadow:
|
|
4082
|
+
boxShadow: '0px 4px 12px rgba(0, 0, 0, 0.12)',
|
|
3985
4083
|
transform: 'translateY(-2px)'
|
|
3986
4084
|
}
|
|
3987
4085
|
}
|
|
@@ -3992,14 +4090,10 @@ var getCardVariants = themeMode => {
|
|
|
3992
4090
|
* @param theme - Theme object from useTheme hook
|
|
3993
4091
|
*/
|
|
3994
4092
|
var getDefaultCardStyles = theme => {
|
|
3995
|
-
var {
|
|
3996
|
-
themeMode
|
|
3997
|
-
} = theme;
|
|
3998
|
-
var isDarkMode = themeMode === 'dark';
|
|
3999
4093
|
return {
|
|
4000
4094
|
container: {
|
|
4001
|
-
backgroundColor:
|
|
4002
|
-
color:
|
|
4095
|
+
backgroundColor: 'color.white',
|
|
4096
|
+
color: 'color.black',
|
|
4003
4097
|
borderRadius: '8px',
|
|
4004
4098
|
overflow: 'hidden',
|
|
4005
4099
|
transition: 'all 0.2s ease'
|
|
@@ -4008,17 +4102,18 @@ var getDefaultCardStyles = theme => {
|
|
|
4008
4102
|
padding: '16px',
|
|
4009
4103
|
borderBottomWidth: '1px',
|
|
4010
4104
|
borderBottomStyle: 'solid',
|
|
4011
|
-
borderBottomColor:
|
|
4105
|
+
borderBottomColor: 'color.gray.200',
|
|
4106
|
+
color: 'color.black'
|
|
4012
4107
|
},
|
|
4013
4108
|
content: {
|
|
4014
4109
|
padding: '16px',
|
|
4015
|
-
color:
|
|
4110
|
+
color: 'color.black'
|
|
4016
4111
|
},
|
|
4017
4112
|
footer: {
|
|
4018
4113
|
padding: '16px',
|
|
4019
4114
|
borderTopWidth: '1px',
|
|
4020
4115
|
borderTopStyle: 'solid',
|
|
4021
|
-
borderTopColor:
|
|
4116
|
+
borderTopColor: 'color.gray.200'
|
|
4022
4117
|
}
|
|
4023
4118
|
};
|
|
4024
4119
|
};
|
|
@@ -4043,7 +4138,7 @@ var CardHeader = _ref => {
|
|
|
4043
4138
|
var {
|
|
4044
4139
|
styles: contextStyles
|
|
4045
4140
|
} = useCardContext();
|
|
4046
|
-
var defaultStyles = getDefaultCardStyles(
|
|
4141
|
+
var defaultStyles = getDefaultCardStyles().header;
|
|
4047
4142
|
// Merge styles: Default < Context Override < Direct Props/Style
|
|
4048
4143
|
var mergedProps = Object.assign({}, defaultStyles, contextStyles == null ? void 0 : contextStyles.header, props, {
|
|
4049
4144
|
style: Object.assign({}, defaultStyles == null ? void 0 : defaultStyles.style, contextStyles == null || (_contextStyles$header = contextStyles.header) == null ? void 0 : _contextStyles$header.style, style)
|
|
@@ -4061,7 +4156,7 @@ var CardContent = _ref2 => {
|
|
|
4061
4156
|
var {
|
|
4062
4157
|
styles: contextStyles
|
|
4063
4158
|
} = useCardContext();
|
|
4064
|
-
var defaultStyles = getDefaultCardStyles(
|
|
4159
|
+
var defaultStyles = getDefaultCardStyles().content;
|
|
4065
4160
|
// Merge styles: Default < Context Override < Direct Props/Style
|
|
4066
4161
|
var mergedProps = Object.assign({}, defaultStyles, contextStyles == null ? void 0 : contextStyles.content, props, {
|
|
4067
4162
|
style: Object.assign({}, defaultStyles == null ? void 0 : defaultStyles.style, contextStyles == null || (_contextStyles$conten = contextStyles.content) == null ? void 0 : _contextStyles$conten.style, style)
|
|
@@ -4079,7 +4174,7 @@ var CardFooter = _ref3 => {
|
|
|
4079
4174
|
var {
|
|
4080
4175
|
styles: contextStyles
|
|
4081
4176
|
} = useCardContext();
|
|
4082
|
-
var defaultStyles = getDefaultCardStyles(
|
|
4177
|
+
var defaultStyles = getDefaultCardStyles().footer;
|
|
4083
4178
|
// Merge styles: Default < Context Override < Direct Props/Style
|
|
4084
4179
|
var mergedProps = Object.assign({}, defaultStyles, contextStyles == null ? void 0 : contextStyles.footer, props, {
|
|
4085
4180
|
style: Object.assign({}, defaultStyles == null ? void 0 : defaultStyles.style, contextStyles == null || (_contextStyles$footer = contextStyles.footer) == null ? void 0 : _contextStyles$footer.style, style)
|
|
@@ -4102,7 +4197,7 @@ var CardView = _ref4 => {
|
|
|
4102
4197
|
} = _ref4,
|
|
4103
4198
|
props = _objectWithoutPropertiesLoose(_ref4, _excluded4$3);
|
|
4104
4199
|
var theme = appStudio.useTheme();
|
|
4105
|
-
var defaultStyles = getDefaultCardStyles(
|
|
4200
|
+
var defaultStyles = getDefaultCardStyles();
|
|
4106
4201
|
// Prepare context value, merging default styles with user's `views` overrides
|
|
4107
4202
|
var contextValue = React.useMemo(() => ({
|
|
4108
4203
|
styles: {
|
|
@@ -4115,12 +4210,7 @@ var CardView = _ref4 => {
|
|
|
4115
4210
|
// Determine if we have explicit Card.Header, Card.Content, Card.Footer components
|
|
4116
4211
|
// or if we need to wrap children in a default layout
|
|
4117
4212
|
var hasExplicitStructure = React__default.Children.toArray(children).some(child => /*#__PURE__*/React__default.isValidElement(child) && (child.type === CardHeader || child.type === CardContent || child.type === CardFooter));
|
|
4118
|
-
|
|
4119
|
-
var {
|
|
4120
|
-
themeMode
|
|
4121
|
-
} = theme;
|
|
4122
|
-
var currentThemeMode = elementMode || themeMode;
|
|
4123
|
-
var variantStyles = getCardVariants(currentThemeMode)[variant];
|
|
4213
|
+
var variantStyles = getCardVariants()[variant];
|
|
4124
4214
|
// Merge styles for the root element
|
|
4125
4215
|
var mergedRootProps = Object.assign({
|
|
4126
4216
|
width: isFullWidth ? '100%' : 'auto',
|
|
@@ -4367,7 +4457,7 @@ var ActiveIndicatorStyles = {
|
|
|
4367
4457
|
},
|
|
4368
4458
|
number: {
|
|
4369
4459
|
backgroundColor: 'theme.primary',
|
|
4370
|
-
color: 'white'
|
|
4460
|
+
color: 'color.white'
|
|
4371
4461
|
}
|
|
4372
4462
|
};
|
|
4373
4463
|
var NavigationButtonStyles = {
|
|
@@ -4812,7 +4902,7 @@ var LegendTextStyles = {
|
|
|
4812
4902
|
// Default styles for tooltip
|
|
4813
4903
|
var TooltipStyles = {
|
|
4814
4904
|
position: 'absolute',
|
|
4815
|
-
backgroundColor: 'white',
|
|
4905
|
+
backgroundColor: 'color.white',
|
|
4816
4906
|
padding: '8px 12px',
|
|
4817
4907
|
borderRadius: '4px',
|
|
4818
4908
|
boxShadow: '0 2px 5px rgba(0, 0, 0, 0.1)',
|
|
@@ -5649,7 +5739,7 @@ var ContextMenuSizes = {
|
|
|
5649
5739
|
};
|
|
5650
5740
|
var ContextMenuVariants = {
|
|
5651
5741
|
default: {
|
|
5652
|
-
backgroundColor: 'white',
|
|
5742
|
+
backgroundColor: 'color.white',
|
|
5653
5743
|
color: 'color.gray.800'
|
|
5654
5744
|
},
|
|
5655
5745
|
filled: {
|
|
@@ -5657,7 +5747,7 @@ var ContextMenuVariants = {
|
|
|
5657
5747
|
color: 'color.gray.800'
|
|
5658
5748
|
},
|
|
5659
5749
|
outline: {
|
|
5660
|
-
backgroundColor: 'white',
|
|
5750
|
+
backgroundColor: 'color.white',
|
|
5661
5751
|
borderWidth: '1px',
|
|
5662
5752
|
borderStyle: 'solid',
|
|
5663
5753
|
borderColor: 'color.gray.200',
|
|
@@ -6327,7 +6417,7 @@ var InputVariants = {
|
|
|
6327
6417
|
borderWidth: '1px',
|
|
6328
6418
|
borderStyle: 'solid',
|
|
6329
6419
|
borderColor: 'color.gray.200',
|
|
6330
|
-
backgroundColor: 'white',
|
|
6420
|
+
backgroundColor: 'color.white',
|
|
6331
6421
|
transition: 'all 0.2s ease',
|
|
6332
6422
|
_hover: {
|
|
6333
6423
|
borderColor: 'color.gray.300'
|
|
@@ -6343,7 +6433,7 @@ var InputVariants = {
|
|
|
6343
6433
|
borderBottomStyle: 'solid',
|
|
6344
6434
|
borderBottomColor: 'color.gray.200',
|
|
6345
6435
|
borderRadius: 0,
|
|
6346
|
-
backgroundColor: 'white',
|
|
6436
|
+
backgroundColor: 'color.white',
|
|
6347
6437
|
transition: 'all 0.2s ease',
|
|
6348
6438
|
_hover: {
|
|
6349
6439
|
borderBottomColor: 'color.gray.300'
|
|
@@ -6779,7 +6869,7 @@ var DropDown = _ref5 => {
|
|
|
6779
6869
|
,
|
|
6780
6870
|
overflowY: "auto",
|
|
6781
6871
|
zIndex: 1000,
|
|
6782
|
-
backgroundColor: "white",
|
|
6872
|
+
backgroundColor: "color.white",
|
|
6783
6873
|
borderRadius: "8px" // Consistent with design system (rounded-md)
|
|
6784
6874
|
,
|
|
6785
6875
|
borderWidth: "1px",
|
|
@@ -7488,7 +7578,9 @@ var TextFieldView = _ref => {
|
|
|
7488
7578
|
getColor,
|
|
7489
7579
|
themeMode
|
|
7490
7580
|
} = appStudio.useTheme();
|
|
7491
|
-
var IconColor = getColor('color.blueGray.700',
|
|
7581
|
+
var IconColor = getColor('color.blueGray.700', {
|
|
7582
|
+
themeMode: elementMode ? elementMode : themeMode
|
|
7583
|
+
});
|
|
7492
7584
|
var showLabel = !!(isFocused && label);
|
|
7493
7585
|
/**
|
|
7494
7586
|
* Styles for the input field
|
|
@@ -7674,19 +7766,19 @@ var VariantStyles = {
|
|
|
7674
7766
|
selected: {
|
|
7675
7767
|
backgroundColor: 'theme.primary',
|
|
7676
7768
|
borderColor: 'theme.primary',
|
|
7677
|
-
color: 'white'
|
|
7769
|
+
color: 'color.white'
|
|
7678
7770
|
},
|
|
7679
7771
|
unselected: {
|
|
7680
|
-
backgroundColor: '
|
|
7772
|
+
backgroundColor: 'color.white',
|
|
7681
7773
|
borderWidth: '2px',
|
|
7682
7774
|
borderStyle: 'solid',
|
|
7683
7775
|
borderColor: 'color.gray.300',
|
|
7684
|
-
color: '
|
|
7776
|
+
color: 'color.black'
|
|
7685
7777
|
},
|
|
7686
7778
|
indeterminate: {
|
|
7687
7779
|
backgroundColor: 'theme.primary',
|
|
7688
7780
|
borderColor: 'theme.primary',
|
|
7689
|
-
color: 'white'
|
|
7781
|
+
color: 'color.white'
|
|
7690
7782
|
}
|
|
7691
7783
|
};
|
|
7692
7784
|
/**
|
|
@@ -9420,7 +9512,7 @@ var DropDown$1 = _ref4 => {
|
|
|
9420
9512
|
borderRadius: 4,
|
|
9421
9513
|
position: "absolute",
|
|
9422
9514
|
flexDirection: "column",
|
|
9423
|
-
backgroundColor: "white",
|
|
9515
|
+
backgroundColor: "color.white",
|
|
9424
9516
|
boxShadow: "rgba(0, 0, 0, 0.07) 0px 1px 1px, rgba(0, 0, 0, 0.07) 0px 2px 2px, rgba(0, 0, 0, 0.07) 0px 4px 4px, rgba(0, 0, 0, 0.07) 0px 8px 8px, rgba(0, 0, 0, 0.07) 0px 16px 16px"
|
|
9425
9517
|
}, views['dropDown']), options.map(option => (/*#__PURE__*/React__default.createElement(DropDownItem, Object.assign({
|
|
9426
9518
|
key: option.code,
|
|
@@ -9470,7 +9562,9 @@ var CountryPickerView = _ref5 => {
|
|
|
9470
9562
|
getColor,
|
|
9471
9563
|
themeMode
|
|
9472
9564
|
} = appStudio.useTheme();
|
|
9473
|
-
var IconColor = getColor('color.blueGray.700',
|
|
9565
|
+
var IconColor = getColor('color.blueGray.700', {
|
|
9566
|
+
themeMode: elementMode ? elementMode : themeMode
|
|
9567
|
+
});
|
|
9474
9568
|
var handleHover = () => setIsHovered(!isHovered);
|
|
9475
9569
|
var handleFocus = () => setIsFocused(true);
|
|
9476
9570
|
var handleCallback = option => {
|
|
@@ -9847,7 +9941,7 @@ var ComboBoxView = _ref => {
|
|
|
9847
9941
|
position: "relative"
|
|
9848
9942
|
}, /*#__PURE__*/React__default.createElement(appStudio.Horizontal, Object.assign({
|
|
9849
9943
|
cursor: "pointer",
|
|
9850
|
-
backgroundColor: "white",
|
|
9944
|
+
backgroundColor: "color.white",
|
|
9851
9945
|
boxShadow: "rgba(0, 0, 0, 0.16) 0px 1px 4px",
|
|
9852
9946
|
padding: "12px",
|
|
9853
9947
|
display: "flex",
|
|
@@ -9869,7 +9963,7 @@ var ComboBoxView = _ref => {
|
|
|
9869
9963
|
}, views == null ? void 0 : views.label), selectedItem.label)), right, isDropdownVisible && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
9870
9964
|
id: "combobox-dropdown",
|
|
9871
9965
|
position: "absolute",
|
|
9872
|
-
backgroundColor: "white",
|
|
9966
|
+
backgroundColor: "color.white",
|
|
9873
9967
|
boxShadow: "rgba(0, 0 ,0 ,0.16) 0px 1px 4px",
|
|
9874
9968
|
width: "100%",
|
|
9875
9969
|
overflowY: "auto",
|
|
@@ -11086,7 +11180,7 @@ var OrientationStyles = {
|
|
|
11086
11180
|
}
|
|
11087
11181
|
};
|
|
11088
11182
|
|
|
11089
|
-
var _excluded$F = ["min", "max", "step", "currentValue", "stepValues", "shape", "size", "variant", "orientation", "isDisabled", "showValue", "showTooltip", "
|
|
11183
|
+
var _excluded$F = ["min", "max", "step", "currentValue", "stepValues", "shape", "size", "variant", "orientation", "isDisabled", "showValue", "showTooltip", "backgroundColor", "label", "helperText", "themeMode", "shadow", "isDragging", "isHovered", "setIsHovered", "trackRef", "thumbRef", "handleThumbMouseDown", "handleTrackMouseDown", "handleKeyDown", "thumbPositionPercent", "ariaLabel", "views"];
|
|
11090
11184
|
var SliderView = _ref => {
|
|
11091
11185
|
var _views$tooltip, _views$tooltip2;
|
|
11092
11186
|
var {
|
|
@@ -11102,7 +11196,7 @@ var SliderView = _ref => {
|
|
|
11102
11196
|
isDisabled = false,
|
|
11103
11197
|
showValue = false,
|
|
11104
11198
|
showTooltip = false,
|
|
11105
|
-
|
|
11199
|
+
backgroundColor = 'theme.primary',
|
|
11106
11200
|
label,
|
|
11107
11201
|
helperText,
|
|
11108
11202
|
themeMode: elementMode,
|
|
@@ -11134,9 +11228,15 @@ var SliderView = _ref => {
|
|
|
11134
11228
|
getColor,
|
|
11135
11229
|
themeMode
|
|
11136
11230
|
} = appStudio.useTheme();
|
|
11137
|
-
var themeColor = getColor(
|
|
11138
|
-
|
|
11139
|
-
|
|
11231
|
+
var themeColor = getColor(backgroundColor, {
|
|
11232
|
+
themeMode: elementMode || themeMode
|
|
11233
|
+
});
|
|
11234
|
+
var disabledColor = getColor('theme.disabled', {
|
|
11235
|
+
themeMode: elementMode || themeMode
|
|
11236
|
+
});
|
|
11237
|
+
var trackColor = getColor(SliderVariants[variant].backgroundColor, {
|
|
11238
|
+
themeMode: elementMode || themeMode
|
|
11239
|
+
});
|
|
11140
11240
|
var isVertical = orientation === 'vertical';
|
|
11141
11241
|
var {
|
|
11142
11242
|
trackCrossAxisSize,
|
|
@@ -11206,7 +11306,7 @@ var SliderView = _ref => {
|
|
|
11206
11306
|
top: "50%",
|
|
11207
11307
|
left: thumbPositionPercent + "%",
|
|
11208
11308
|
borderRadius: "50%",
|
|
11209
|
-
backgroundColor: "white",
|
|
11309
|
+
backgroundColor: "color.white",
|
|
11210
11310
|
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.2)",
|
|
11211
11311
|
border: "2px solid " + (isDisabled ? disabledColor : themeColor),
|
|
11212
11312
|
transition: isDragging ? 'none' : 'transform 0.1s ease-in-out',
|
|
@@ -12274,7 +12374,7 @@ var ModalContainer = _ref2 => {
|
|
|
12274
12374
|
};
|
|
12275
12375
|
return /*#__PURE__*/React__default.createElement(appStudio.Vertical, Object.assign({
|
|
12276
12376
|
cursor: "default",
|
|
12277
|
-
backgroundColor: "white",
|
|
12377
|
+
backgroundColor: "color.white",
|
|
12278
12378
|
width: isFullScreen ? '100%' : 600,
|
|
12279
12379
|
height: isFullScreen ? '100%' : 'fit-content',
|
|
12280
12380
|
onClick: handleClick,
|
|
@@ -13681,7 +13781,7 @@ var DropdownMenuSizes = {
|
|
|
13681
13781
|
};
|
|
13682
13782
|
var DropdownMenuVariants = {
|
|
13683
13783
|
default: {
|
|
13684
|
-
backgroundColor: 'white',
|
|
13784
|
+
backgroundColor: 'color.white',
|
|
13685
13785
|
color: 'color.gray.800'
|
|
13686
13786
|
},
|
|
13687
13787
|
filled: {
|
|
@@ -13689,7 +13789,7 @@ var DropdownMenuVariants = {
|
|
|
13689
13789
|
color: 'color.gray.800'
|
|
13690
13790
|
},
|
|
13691
13791
|
outline: {
|
|
13692
|
-
backgroundColor: 'white',
|
|
13792
|
+
backgroundColor: 'color.white',
|
|
13693
13793
|
borderWidth: '1px',
|
|
13694
13794
|
borderStyle: 'solid',
|
|
13695
13795
|
borderColor: 'color.gray.200',
|
|
@@ -14569,7 +14669,7 @@ var MenubarContent = _ref5 => {
|
|
|
14569
14669
|
position: "absolute",
|
|
14570
14670
|
zIndex: 1000,
|
|
14571
14671
|
minWidth: "200px",
|
|
14572
|
-
backgroundColor: "white",
|
|
14672
|
+
backgroundColor: "color.white",
|
|
14573
14673
|
borderRadius: 4,
|
|
14574
14674
|
boxShadow: "0px 2px 8px rgba(0, 0, 0, 0.15)",
|
|
14575
14675
|
overflow: "hidden"
|
|
@@ -14821,7 +14921,7 @@ var PaginationShapes = {
|
|
|
14821
14921
|
};
|
|
14822
14922
|
var ActivePageButtonStyles = {
|
|
14823
14923
|
backgroundColor: 'color.blue.500',
|
|
14824
|
-
color: 'white',
|
|
14924
|
+
color: 'color.white',
|
|
14825
14925
|
_hover: {
|
|
14826
14926
|
backgroundColor: 'color.blue.600'
|
|
14827
14927
|
}
|
|
@@ -14974,7 +15074,7 @@ var PaginationView = _ref => {
|
|
|
14974
15074
|
borderWidth: "1px",
|
|
14975
15075
|
borderStyle: "solid",
|
|
14976
15076
|
borderColor: "color.gray.200",
|
|
14977
|
-
backgroundColor: "white",
|
|
15077
|
+
backgroundColor: "color.white",
|
|
14978
15078
|
cursor: "pointer",
|
|
14979
15079
|
value: pageSize,
|
|
14980
15080
|
onChange: handlePageSizeChange
|
|
@@ -15250,7 +15350,7 @@ var SidebarSizes = {
|
|
|
15250
15350
|
var getSidebar = themeMode => {
|
|
15251
15351
|
return {
|
|
15252
15352
|
default: {
|
|
15253
|
-
backgroundColor: 'white',
|
|
15353
|
+
backgroundColor: 'color.white',
|
|
15254
15354
|
color: 'color.gray.800',
|
|
15255
15355
|
transition: 'all 0.2s ease'
|
|
15256
15356
|
},
|
|
@@ -15260,7 +15360,7 @@ var getSidebar = themeMode => {
|
|
|
15260
15360
|
transition: 'all 0.2s ease'
|
|
15261
15361
|
},
|
|
15262
15362
|
outline: {
|
|
15263
|
-
backgroundColor: 'white',
|
|
15363
|
+
backgroundColor: 'color.white',
|
|
15264
15364
|
borderWidth: '1px',
|
|
15265
15365
|
borderStyle: 'solid',
|
|
15266
15366
|
borderColor: 'color.gray.200',
|
|
@@ -15273,7 +15373,7 @@ var getSidebar = themeMode => {
|
|
|
15273
15373
|
transition: 'all 0.2s ease'
|
|
15274
15374
|
},
|
|
15275
15375
|
elevated: {
|
|
15276
|
-
backgroundColor: 'white',
|
|
15376
|
+
backgroundColor: 'color.white',
|
|
15277
15377
|
boxShadow: '0px 4px 8px rgba(0, 0, 0, 0.1)',
|
|
15278
15378
|
color: 'color.gray.800',
|
|
15279
15379
|
transition: 'all 0.2s ease'
|
|
@@ -16928,7 +17028,7 @@ var CommandSizes = {
|
|
|
16928
17028
|
var getCommand = themeMode => {
|
|
16929
17029
|
return {
|
|
16930
17030
|
default: {
|
|
16931
|
-
backgroundColor: 'white',
|
|
17031
|
+
backgroundColor: 'color.white',
|
|
16932
17032
|
borderWidth: '1px',
|
|
16933
17033
|
borderStyle: 'solid',
|
|
16934
17034
|
borderColor: 'color.gray.200',
|
|
@@ -16942,7 +17042,7 @@ var getCommand = themeMode => {
|
|
|
16942
17042
|
boxShadow: '0px 4px 20px rgba(0, 0, 0, 0.1)'
|
|
16943
17043
|
},
|
|
16944
17044
|
outline: {
|
|
16945
|
-
backgroundColor: 'white',
|
|
17045
|
+
backgroundColor: 'color.white',
|
|
16946
17046
|
borderWidth: '2px',
|
|
16947
17047
|
borderStyle: 'solid',
|
|
16948
17048
|
borderColor: 'color.gray.300',
|