@app-studio/web 0.8.86 → 0.8.88
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/Button/examples/index.d.ts +0 -1
- package/dist/web.cjs.development.js +51 -47
- 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 +51 -47
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +51 -47
- 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/components/Button/examples/effect.d.ts +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ButtonProps as $ButtonProps, Shadow, ViewProps } from 'app-studio';
|
|
3
3
|
import { Elevation } from '../../../utils/elevation';
|
|
4
|
-
import { IconPosition, Shape, Size, Variant, LoaderPosition
|
|
4
|
+
import { IconPosition, Shape, Size, Variant, LoaderPosition } from './Button.type';
|
|
5
5
|
import { LoaderProps } from '../../Loader/Loader/Loader.props';
|
|
6
6
|
export interface ButtonProps extends Omit<$ButtonProps, 'size'> {
|
|
7
7
|
children?: React.ReactNode;
|
|
@@ -21,7 +21,6 @@ export interface ButtonProps extends Omit<$ButtonProps, 'size'> {
|
|
|
21
21
|
shape?: Shape;
|
|
22
22
|
ariaLabel?: string;
|
|
23
23
|
variant?: Variant;
|
|
24
|
-
effect?: Effects;
|
|
25
24
|
color?: string;
|
|
26
25
|
views?: {
|
|
27
26
|
container?: ViewProps;
|
|
@@ -3622,11 +3622,11 @@ var Loader = LoaderComponent;
|
|
|
3622
3622
|
var ButtonSizes = {
|
|
3623
3623
|
xs: {
|
|
3624
3624
|
// Height: 24px (6 × 4px)
|
|
3625
|
-
minHeight:
|
|
3625
|
+
minHeight: 4 * 4,
|
|
3626
3626
|
paddingTop: 2,
|
|
3627
3627
|
paddingBottom: 2,
|
|
3628
|
-
paddingLeft:
|
|
3629
|
-
paddingRight:
|
|
3628
|
+
paddingLeft: 4,
|
|
3629
|
+
paddingRight: 4,
|
|
3630
3630
|
// Typography
|
|
3631
3631
|
fontSize: 12,
|
|
3632
3632
|
fontWeight: '500',
|
|
@@ -3635,54 +3635,53 @@ var ButtonSizes = {
|
|
|
3635
3635
|
},
|
|
3636
3636
|
sm: {
|
|
3637
3637
|
// Height: 32px (8 × 4px)
|
|
3638
|
-
minHeight:
|
|
3638
|
+
minHeight: 6 * 4,
|
|
3639
3639
|
paddingTop: 6,
|
|
3640
3640
|
paddingBottom: 6,
|
|
3641
3641
|
paddingLeft: 12,
|
|
3642
3642
|
paddingRight: 12,
|
|
3643
3643
|
// Typography
|
|
3644
|
-
fontSize:
|
|
3644
|
+
fontSize: 12,
|
|
3645
3645
|
fontWeight: '500',
|
|
3646
|
-
lineHeight:
|
|
3646
|
+
lineHeight: 12,
|
|
3647
3647
|
letterSpacing: '-0.01em'
|
|
3648
3648
|
},
|
|
3649
3649
|
md: {
|
|
3650
3650
|
// Height: 40px (10 × 4px) - standard height for interactive elements
|
|
3651
|
-
minHeight:
|
|
3651
|
+
minHeight: 8 * 4,
|
|
3652
3652
|
paddingTop: 8,
|
|
3653
3653
|
paddingBottom: 8,
|
|
3654
3654
|
paddingLeft: 16,
|
|
3655
3655
|
paddingRight: 16,
|
|
3656
3656
|
// Typography
|
|
3657
|
-
fontSize:
|
|
3657
|
+
fontSize: 16,
|
|
3658
3658
|
fontWeight: '500',
|
|
3659
|
-
lineHeight:
|
|
3659
|
+
lineHeight: 16,
|
|
3660
3660
|
letterSpacing: '-0.01em'
|
|
3661
3661
|
},
|
|
3662
3662
|
lg: {
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
paddingBottom: 12,
|
|
3663
|
+
minHeight: 10 * 4,
|
|
3664
|
+
paddingTop: 10,
|
|
3665
|
+
paddingBottom: 10,
|
|
3667
3666
|
paddingLeft: 20,
|
|
3668
3667
|
paddingRight: 20,
|
|
3669
3668
|
// Typography
|
|
3670
3669
|
fontSize: 16,
|
|
3671
3670
|
fontWeight: '500',
|
|
3672
|
-
lineHeight:
|
|
3671
|
+
lineHeight: 20,
|
|
3673
3672
|
letterSpacing: '-0.01em'
|
|
3674
3673
|
},
|
|
3675
3674
|
xl: {
|
|
3676
3675
|
// Height: 60px (15 × 4px)
|
|
3677
|
-
minHeight:
|
|
3678
|
-
paddingTop:
|
|
3679
|
-
paddingBottom:
|
|
3680
|
-
paddingLeft:
|
|
3681
|
-
paddingRight:
|
|
3676
|
+
minHeight: 12 * 4,
|
|
3677
|
+
paddingTop: 12,
|
|
3678
|
+
paddingBottom: 12,
|
|
3679
|
+
paddingLeft: 24,
|
|
3680
|
+
paddingRight: 24,
|
|
3682
3681
|
// Typography
|
|
3683
3682
|
fontSize: 18,
|
|
3684
3683
|
fontWeight: '500',
|
|
3685
|
-
lineHeight:
|
|
3684
|
+
lineHeight: 24,
|
|
3686
3685
|
letterSpacing: '-0.01em'
|
|
3687
3686
|
}
|
|
3688
3687
|
};
|
|
@@ -3732,15 +3731,16 @@ var getButtonVariants = (color, isLight) => ({
|
|
|
3732
3731
|
borderStyle: 'solid',
|
|
3733
3732
|
borderColor: 'transparent',
|
|
3734
3733
|
_hover: {
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3734
|
+
transform: 'translateY(-1px)',
|
|
3735
|
+
textDecoration: 'underline',
|
|
3736
|
+
textUnderlineOffset: '1px',
|
|
3737
|
+
textDecorationThickness: '1px'
|
|
3739
3738
|
},
|
|
3740
3739
|
_active: {
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3740
|
+
transform: 'translateY(-1px)',
|
|
3741
|
+
textDecoration: 'underline',
|
|
3742
|
+
textUnderlineOffset: '1px',
|
|
3743
|
+
textDecorationThickness: '1px'
|
|
3744
3744
|
},
|
|
3745
3745
|
transition: 'all 0.2s ease'
|
|
3746
3746
|
},
|
|
@@ -3753,12 +3753,18 @@ var getButtonVariants = (color, isLight) => ({
|
|
|
3753
3753
|
_hover: {
|
|
3754
3754
|
backgroundColor: color,
|
|
3755
3755
|
color: isLight ? 'light.black' : 'light.white',
|
|
3756
|
-
transform: 'translateY(-1px)'
|
|
3756
|
+
transform: 'translateY(-1px)',
|
|
3757
|
+
textDecoration: 'underline',
|
|
3758
|
+
textUnderlineOffset: '1px',
|
|
3759
|
+
textDecorationThickness: '1px'
|
|
3757
3760
|
},
|
|
3758
3761
|
_active: {
|
|
3759
3762
|
backgroundColor: color,
|
|
3760
3763
|
color: isLight ? 'light.black' : 'light.white',
|
|
3761
|
-
transform: 'translateY(0)'
|
|
3764
|
+
transform: 'translateY(0)',
|
|
3765
|
+
textDecoration: 'underline',
|
|
3766
|
+
textUnderlineOffset: '1px',
|
|
3767
|
+
textDecorationThickness: '1px'
|
|
3762
3768
|
},
|
|
3763
3769
|
transition: 'all 0.2s ease'
|
|
3764
3770
|
},
|
|
@@ -3771,12 +3777,18 @@ var getButtonVariants = (color, isLight) => ({
|
|
|
3771
3777
|
_hover: {
|
|
3772
3778
|
backgroundColor: color,
|
|
3773
3779
|
color: isLight ? 'light.black' : 'light.white',
|
|
3774
|
-
transform: 'translateY(-1px)'
|
|
3780
|
+
transform: 'translateY(-1px)',
|
|
3781
|
+
textDecoration: 'underline',
|
|
3782
|
+
textUnderlineOffset: '1px',
|
|
3783
|
+
textDecorationThickness: '1px'
|
|
3775
3784
|
},
|
|
3776
3785
|
_active: {
|
|
3777
3786
|
backgroundColor: color,
|
|
3778
3787
|
color: isLight ? 'light.black' : 'light.white',
|
|
3779
|
-
transform: 'translateY(0)'
|
|
3788
|
+
transform: 'translateY(0)',
|
|
3789
|
+
textDecoration: 'underline',
|
|
3790
|
+
textUnderlineOffset: '1px',
|
|
3791
|
+
textDecorationThickness: '1px'
|
|
3780
3792
|
},
|
|
3781
3793
|
transition: 'all 0.2s ease'
|
|
3782
3794
|
},
|
|
@@ -3787,12 +3799,13 @@ var getButtonVariants = (color, isLight) => ({
|
|
|
3787
3799
|
borderStyle: 'none',
|
|
3788
3800
|
borderColor: 'transparent',
|
|
3789
3801
|
textDecoration: 'underline',
|
|
3790
|
-
textUnderlineOffset:
|
|
3802
|
+
textUnderlineOffset: '1px',
|
|
3803
|
+
textDecorationThickness: '1px',
|
|
3791
3804
|
_hover: {
|
|
3792
|
-
textDecorationThickness:
|
|
3805
|
+
textDecorationThickness: '2px'
|
|
3793
3806
|
},
|
|
3794
3807
|
_active: {
|
|
3795
|
-
textDecorationThickness:
|
|
3808
|
+
textDecorationThickness: '2px'
|
|
3796
3809
|
},
|
|
3797
3810
|
transition: 'all 0.2s ease'
|
|
3798
3811
|
}
|
|
@@ -3810,10 +3823,8 @@ var ButtonView = _ref => {
|
|
|
3810
3823
|
loaderPosition = 'left',
|
|
3811
3824
|
backgroundColor,
|
|
3812
3825
|
// primary candidate for main color
|
|
3813
|
-
color
|
|
3814
|
-
|
|
3815
|
-
isAuto,
|
|
3816
|
-
isFilled,
|
|
3826
|
+
color // 2nd candidate for main color (NOT text‑color)
|
|
3827
|
+
,
|
|
3817
3828
|
isDisabled,
|
|
3818
3829
|
isLoading,
|
|
3819
3830
|
isIconRounded,
|
|
@@ -3888,21 +3899,14 @@ var ButtonView = _ref => {
|
|
|
3888
3899
|
display: "flex",
|
|
3889
3900
|
alignItems: "center",
|
|
3890
3901
|
justifyContent: "center",
|
|
3891
|
-
width
|
|
3902
|
+
// width={isAuto ? 'fit-content' : isFilled ? '100%' : undefined}
|
|
3892
3903
|
/* visuals */
|
|
3893
3904
|
borderRadius: ButtonShapes[shape],
|
|
3894
|
-
backgroundColor: base.backgroundColor,
|
|
3895
|
-
color: base.color,
|
|
3896
|
-
borderWidth: base.borderWidth,
|
|
3897
|
-
borderStyle: base.borderStyle,
|
|
3898
|
-
borderColor: base.borderColor,
|
|
3899
|
-
_hover: base._hover,
|
|
3900
|
-
_active: base._active,
|
|
3901
3905
|
boxShadow: shadow,
|
|
3902
3906
|
transition: "all 0.2s ease",
|
|
3903
3907
|
cursor: isDisabled ? 'default' : 'pointer',
|
|
3904
3908
|
onClick: onClick
|
|
3905
|
-
}, views == null ? void 0 : views.container, props), to ? (/*#__PURE__*/React__default.createElement(Link, Object.assign({
|
|
3909
|
+
}, base, views == null ? void 0 : views.container, props), to ? (/*#__PURE__*/React__default.createElement(Link, Object.assign({
|
|
3906
3910
|
to: to,
|
|
3907
3911
|
isExternal: isExternal,
|
|
3908
3912
|
color: 'inherit',
|