@app-studio/web 0.8.85 → 0.8.87
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.style.d.ts +0 -3
- package/dist/components/Button/Button/Button.view.d.ts +3 -3
- package/dist/web.cjs.development.js +341 -434
- 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 +341 -434
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +345 -438
- 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 +2 -2
- package/dist/assets/svg/index.d.ts +0 -2
|
@@ -16,6 +16,7 @@ var appStudio = require('app-studio');
|
|
|
16
16
|
require('core-js/modules/es.symbol.description.js');
|
|
17
17
|
require('core-js/modules/es.parse-float.js');
|
|
18
18
|
var reactRouterDom = require('react-router-dom');
|
|
19
|
+
var contrast = _interopDefault(require('contrast'));
|
|
19
20
|
require('core-js/modules/es.promise.js');
|
|
20
21
|
require('core-js/modules/es.array.reduce.js');
|
|
21
22
|
require('core-js/modules/es.number.to-fixed.js');
|
|
@@ -3380,18 +3381,21 @@ var LinkView = _ref => {
|
|
|
3380
3381
|
};
|
|
3381
3382
|
return /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
3382
3383
|
to: to,
|
|
3383
|
-
target: isExternal ? '_blank' : '_self'
|
|
3384
|
-
|
|
3384
|
+
target: isExternal ? '_blank' : '_self',
|
|
3385
|
+
style: {
|
|
3386
|
+
textDecoration: 'inherit',
|
|
3387
|
+
color: 'inherit'
|
|
3388
|
+
}
|
|
3389
|
+
}, /*#__PURE__*/React__default.createElement(appStudio.Horizontal, Object.assign({
|
|
3385
3390
|
onMouseEnter: handleHover,
|
|
3386
3391
|
onMouseLeave: handleHover,
|
|
3387
|
-
textDecoration: isHovered || underline === 'underline' ? 'underline !important' : 'none'
|
|
3388
|
-
}, views.text, props), /*#__PURE__*/React__default.createElement(appStudio.Horizontal, {
|
|
3389
3392
|
gap: 3,
|
|
3390
3393
|
alignItems: "center",
|
|
3391
|
-
flexWrap: "nowrap"
|
|
3392
|
-
|
|
3394
|
+
flexWrap: "nowrap",
|
|
3395
|
+
textDecoration: 'none'
|
|
3396
|
+
}, views.text, props), children, isExternal && /*#__PURE__*/React__default.createElement(ExternalLinkIcon, {
|
|
3393
3397
|
widthHeight: IconSizes[iconSize]
|
|
3394
|
-
})))
|
|
3398
|
+
})));
|
|
3395
3399
|
};
|
|
3396
3400
|
|
|
3397
3401
|
// Defines the 'LinkComponent' as a functional component with props typed to 'LinkProps'
|
|
@@ -3404,125 +3408,6 @@ var LinkComponent = props => {
|
|
|
3404
3408
|
// Exports 'LinkComponent' as 'Link' for use in other parts of the application
|
|
3405
3409
|
var Link = LinkComponent;
|
|
3406
3410
|
|
|
3407
|
-
/**
|
|
3408
|
-
* Button Styles
|
|
3409
|
-
*
|
|
3410
|
-
* Defines the styles for the Button component following the design guidelines:
|
|
3411
|
-
* - Typography: Inter/Geist font, specific sizes/weights
|
|
3412
|
-
* - Spacing: 4px grid system
|
|
3413
|
-
* - Colors: Neutral palette with semantic colors
|
|
3414
|
-
* - Rounded corners: Consistent border radius
|
|
3415
|
-
* - Transitions: Subtle animations
|
|
3416
|
-
*/
|
|
3417
|
-
/**
|
|
3418
|
-
* Button sizes following the 4px grid system
|
|
3419
|
-
*/
|
|
3420
|
-
var ButtonSizes = {
|
|
3421
|
-
xs: {
|
|
3422
|
-
// Height: 24px (6 × 4px)
|
|
3423
|
-
height: 24,
|
|
3424
|
-
paddingTop: 2,
|
|
3425
|
-
paddingBottom: 2,
|
|
3426
|
-
paddingLeft: 6,
|
|
3427
|
-
paddingRight: 6,
|
|
3428
|
-
// Typography
|
|
3429
|
-
fontSize: 12,
|
|
3430
|
-
fontWeight: '500',
|
|
3431
|
-
lineHeight: 20,
|
|
3432
|
-
letterSpacing: '-0.01em'
|
|
3433
|
-
},
|
|
3434
|
-
sm: {
|
|
3435
|
-
// Height: 32px (8 × 4px)
|
|
3436
|
-
height: 32,
|
|
3437
|
-
paddingTop: 6,
|
|
3438
|
-
paddingBottom: 6,
|
|
3439
|
-
paddingLeft: 12,
|
|
3440
|
-
paddingRight: 12,
|
|
3441
|
-
// Typography
|
|
3442
|
-
fontSize: 14,
|
|
3443
|
-
fontWeight: '500',
|
|
3444
|
-
lineHeight: 20,
|
|
3445
|
-
letterSpacing: '-0.01em'
|
|
3446
|
-
},
|
|
3447
|
-
md: {
|
|
3448
|
-
// Height: 40px (10 × 4px) - standard height for interactive elements
|
|
3449
|
-
height: 40,
|
|
3450
|
-
paddingTop: 8,
|
|
3451
|
-
paddingBottom: 8,
|
|
3452
|
-
paddingLeft: 16,
|
|
3453
|
-
paddingRight: 16,
|
|
3454
|
-
// Typography
|
|
3455
|
-
fontSize: 14,
|
|
3456
|
-
fontWeight: '500',
|
|
3457
|
-
lineHeight: 24,
|
|
3458
|
-
letterSpacing: '-0.01em'
|
|
3459
|
-
},
|
|
3460
|
-
lg: {
|
|
3461
|
-
// Height: 48px (12 × 4px)
|
|
3462
|
-
height: 48,
|
|
3463
|
-
paddingTop: 12,
|
|
3464
|
-
paddingBottom: 12,
|
|
3465
|
-
paddingLeft: 20,
|
|
3466
|
-
paddingRight: 20,
|
|
3467
|
-
// Typography
|
|
3468
|
-
fontSize: 16,
|
|
3469
|
-
fontWeight: '500',
|
|
3470
|
-
lineHeight: 24,
|
|
3471
|
-
letterSpacing: '-0.01em'
|
|
3472
|
-
},
|
|
3473
|
-
xl: {
|
|
3474
|
-
// Height: 60px (15 × 4px)
|
|
3475
|
-
height: 60,
|
|
3476
|
-
paddingTop: 16,
|
|
3477
|
-
paddingBottom: 16,
|
|
3478
|
-
paddingLeft: 28,
|
|
3479
|
-
paddingRight: 28,
|
|
3480
|
-
// Typography
|
|
3481
|
-
fontSize: 18,
|
|
3482
|
-
fontWeight: '500',
|
|
3483
|
-
lineHeight: 28,
|
|
3484
|
-
letterSpacing: '-0.01em'
|
|
3485
|
-
}
|
|
3486
|
-
};
|
|
3487
|
-
/**
|
|
3488
|
-
* Button shapes with consistent border radius
|
|
3489
|
-
*/
|
|
3490
|
-
var ButtonShapes = {
|
|
3491
|
-
sharp: 0,
|
|
3492
|
-
rounded: 8,
|
|
3493
|
-
pillShaped: 999
|
|
3494
|
-
};
|
|
3495
|
-
/**
|
|
3496
|
-
* Icon sizes for different button sizes
|
|
3497
|
-
*/
|
|
3498
|
-
var IconSizes$1 = {
|
|
3499
|
-
xs: {
|
|
3500
|
-
width: 16,
|
|
3501
|
-
height: 16,
|
|
3502
|
-
padding: 6
|
|
3503
|
-
},
|
|
3504
|
-
sm: {
|
|
3505
|
-
width: 20,
|
|
3506
|
-
height: 20,
|
|
3507
|
-
padding: 6
|
|
3508
|
-
},
|
|
3509
|
-
md: {
|
|
3510
|
-
width: 24,
|
|
3511
|
-
height: 24,
|
|
3512
|
-
padding: 8
|
|
3513
|
-
},
|
|
3514
|
-
lg: {
|
|
3515
|
-
width: 24,
|
|
3516
|
-
height: 24,
|
|
3517
|
-
padding: 12
|
|
3518
|
-
},
|
|
3519
|
-
xl: {
|
|
3520
|
-
width: 28,
|
|
3521
|
-
height: 28,
|
|
3522
|
-
padding: 14
|
|
3523
|
-
}
|
|
3524
|
-
};
|
|
3525
|
-
|
|
3526
3411
|
// Defines a mapping of spinning speed labels to their respective duration in seconds for the Loader component animations.
|
|
3527
3412
|
// Sets up a scale of sizes, mapping size labels to numerical values to be used for Loader component dimensions.
|
|
3528
3413
|
var DefaultSizes = {
|
|
@@ -3721,290 +3606,312 @@ React__default.createElement(LoaderView, Object.assign({}, props)));
|
|
|
3721
3606
|
// Exports the LoaderComponent as Loader, making it available for use in other parts of the application.
|
|
3722
3607
|
var Loader = LoaderComponent;
|
|
3723
3608
|
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3609
|
+
/**
|
|
3610
|
+
* Button Styles
|
|
3611
|
+
*
|
|
3612
|
+
* Defines the styles for the Button component following the design guidelines:
|
|
3613
|
+
* - Typography: Inter/Geist font, specific sizes/weights
|
|
3614
|
+
* - Spacing: 4px grid system
|
|
3615
|
+
* - Colors: Neutral palette with semantic colors
|
|
3616
|
+
* - Rounded corners: Consistent border radius
|
|
3617
|
+
* - Transitions: Subtle animations
|
|
3618
|
+
*/
|
|
3619
|
+
/**
|
|
3620
|
+
* Button sizes following the 4px grid system
|
|
3621
|
+
*/
|
|
3622
|
+
var ButtonSizes = {
|
|
3623
|
+
xs: {
|
|
3624
|
+
// Height: 24px (6 × 4px)
|
|
3625
|
+
minHeight: 4 * 4,
|
|
3626
|
+
paddingTop: 2,
|
|
3627
|
+
paddingBottom: 2,
|
|
3628
|
+
paddingLeft: 4,
|
|
3629
|
+
paddingRight: 4,
|
|
3630
|
+
// Typography
|
|
3631
|
+
fontSize: 12,
|
|
3632
|
+
fontWeight: '500',
|
|
3633
|
+
lineHeight: 20,
|
|
3634
|
+
letterSpacing: '-0.01em'
|
|
3635
|
+
},
|
|
3636
|
+
sm: {
|
|
3637
|
+
// Height: 32px (8 × 4px)
|
|
3638
|
+
minHeight: 6 * 4,
|
|
3639
|
+
paddingTop: 6,
|
|
3640
|
+
paddingBottom: 6,
|
|
3641
|
+
paddingLeft: 12,
|
|
3642
|
+
paddingRight: 12,
|
|
3643
|
+
// Typography
|
|
3644
|
+
fontSize: 12,
|
|
3645
|
+
fontWeight: '500',
|
|
3646
|
+
lineHeight: 12,
|
|
3647
|
+
letterSpacing: '-0.01em'
|
|
3648
|
+
},
|
|
3649
|
+
md: {
|
|
3650
|
+
// Height: 40px (10 × 4px) - standard height for interactive elements
|
|
3651
|
+
minHeight: 8 * 4,
|
|
3652
|
+
paddingTop: 8,
|
|
3653
|
+
paddingBottom: 8,
|
|
3654
|
+
paddingLeft: 16,
|
|
3655
|
+
paddingRight: 16,
|
|
3656
|
+
// Typography
|
|
3657
|
+
fontSize: 16,
|
|
3658
|
+
fontWeight: '500',
|
|
3659
|
+
lineHeight: 16,
|
|
3660
|
+
letterSpacing: '-0.01em'
|
|
3661
|
+
},
|
|
3662
|
+
lg: {
|
|
3663
|
+
minHeight: 10 * 4,
|
|
3664
|
+
paddingTop: 10,
|
|
3665
|
+
paddingBottom: 10,
|
|
3666
|
+
paddingLeft: 20,
|
|
3667
|
+
paddingRight: 20,
|
|
3668
|
+
// Typography
|
|
3669
|
+
fontSize: 16,
|
|
3670
|
+
fontWeight: '500',
|
|
3671
|
+
lineHeight: 20,
|
|
3672
|
+
letterSpacing: '-0.01em'
|
|
3673
|
+
},
|
|
3674
|
+
xl: {
|
|
3675
|
+
// Height: 60px (15 × 4px)
|
|
3676
|
+
minHeight: 12 * 4,
|
|
3677
|
+
paddingTop: 12,
|
|
3678
|
+
paddingBottom: 12,
|
|
3679
|
+
paddingLeft: 24,
|
|
3680
|
+
paddingRight: 24,
|
|
3681
|
+
// Typography
|
|
3682
|
+
fontSize: 18,
|
|
3683
|
+
fontWeight: '500',
|
|
3684
|
+
lineHeight: 24,
|
|
3685
|
+
letterSpacing: '-0.01em'
|
|
3686
|
+
}
|
|
3687
|
+
};
|
|
3688
|
+
/**
|
|
3689
|
+
* Button shapes with consistent border radius
|
|
3690
|
+
*/
|
|
3691
|
+
var ButtonShapes = {
|
|
3692
|
+
sharp: 0,
|
|
3693
|
+
rounded: 8,
|
|
3694
|
+
pillShaped: 999
|
|
3695
|
+
};
|
|
3696
|
+
/**
|
|
3697
|
+
* Icon sizes for different button sizes
|
|
3698
|
+
*/
|
|
3699
|
+
var IconSizes$1 = {
|
|
3700
|
+
xs: {
|
|
3701
|
+
width: 16,
|
|
3702
|
+
height: 16,
|
|
3703
|
+
padding: 6
|
|
3704
|
+
},
|
|
3705
|
+
sm: {
|
|
3706
|
+
width: 20,
|
|
3707
|
+
height: 20,
|
|
3708
|
+
padding: 6
|
|
3709
|
+
},
|
|
3710
|
+
md: {
|
|
3711
|
+
width: 24,
|
|
3712
|
+
height: 24,
|
|
3713
|
+
padding: 8
|
|
3714
|
+
},
|
|
3715
|
+
lg: {
|
|
3716
|
+
width: 24,
|
|
3717
|
+
height: 24,
|
|
3718
|
+
padding: 12
|
|
3719
|
+
},
|
|
3720
|
+
xl: {
|
|
3721
|
+
width: 28,
|
|
3722
|
+
height: 28,
|
|
3723
|
+
padding: 14
|
|
3724
|
+
}
|
|
3725
|
+
};
|
|
3726
|
+
var getButtonVariants = (color, isLight) => ({
|
|
3727
|
+
filled: {
|
|
3728
|
+
backgroundColor: color,
|
|
3729
|
+
color: isLight ? 'color.black' : 'color.white',
|
|
3730
|
+
borderWidth: 1,
|
|
3731
|
+
borderStyle: 'solid',
|
|
3732
|
+
borderColor: 'transparent',
|
|
3733
|
+
_hover: {
|
|
3734
|
+
transform: 'translateY(-1px)',
|
|
3735
|
+
textDecoration: 'underline',
|
|
3736
|
+
textUnderlineOffset: '1px',
|
|
3737
|
+
textDecorationThickness: '1px'
|
|
3738
|
+
},
|
|
3739
|
+
_active: {
|
|
3740
|
+
transform: 'translateY(-1px)',
|
|
3741
|
+
textDecoration: 'underline',
|
|
3742
|
+
textUnderlineOffset: '1px',
|
|
3743
|
+
textDecorationThickness: '1px'
|
|
3744
|
+
},
|
|
3745
|
+
transition: 'all 0.2s ease'
|
|
3746
|
+
},
|
|
3747
|
+
outline: {
|
|
3748
|
+
backgroundColor: 'transparent',
|
|
3749
|
+
color: color,
|
|
3750
|
+
borderWidth: 1,
|
|
3751
|
+
borderStyle: 'solid',
|
|
3752
|
+
borderColor: color,
|
|
3753
|
+
_hover: {
|
|
3754
|
+
backgroundColor: color,
|
|
3755
|
+
color: isLight ? 'light.black' : 'light.white',
|
|
3756
|
+
transform: 'translateY(-1px)',
|
|
3757
|
+
textDecoration: 'underline',
|
|
3758
|
+
textUnderlineOffset: '1px',
|
|
3759
|
+
textDecorationThickness: '1px'
|
|
3760
|
+
},
|
|
3761
|
+
_active: {
|
|
3762
|
+
backgroundColor: color,
|
|
3763
|
+
color: isLight ? 'light.black' : 'light.white',
|
|
3764
|
+
transform: 'translateY(0)',
|
|
3765
|
+
textDecoration: 'underline',
|
|
3766
|
+
textUnderlineOffset: '1px',
|
|
3767
|
+
textDecorationThickness: '1px'
|
|
3768
|
+
},
|
|
3769
|
+
transition: 'all 0.2s ease'
|
|
3770
|
+
},
|
|
3771
|
+
ghost: {
|
|
3772
|
+
backgroundColor: 'transparent',
|
|
3773
|
+
color: color,
|
|
3774
|
+
borderWidth: 0,
|
|
3775
|
+
borderStyle: 'none',
|
|
3776
|
+
borderColor: 'transparent',
|
|
3777
|
+
_hover: {
|
|
3778
|
+
backgroundColor: color,
|
|
3779
|
+
color: isLight ? 'light.black' : 'light.white',
|
|
3780
|
+
transform: 'translateY(-1px)',
|
|
3781
|
+
textDecoration: 'underline',
|
|
3782
|
+
textUnderlineOffset: '1px',
|
|
3783
|
+
textDecorationThickness: '1px'
|
|
3784
|
+
},
|
|
3785
|
+
_active: {
|
|
3786
|
+
backgroundColor: color,
|
|
3787
|
+
color: isLight ? 'light.black' : 'light.white',
|
|
3788
|
+
transform: 'translateY(0)',
|
|
3789
|
+
textDecoration: 'underline',
|
|
3790
|
+
textUnderlineOffset: '1px',
|
|
3791
|
+
textDecorationThickness: '1px'
|
|
3792
|
+
},
|
|
3793
|
+
transition: 'all 0.2s ease'
|
|
3794
|
+
},
|
|
3795
|
+
link: {
|
|
3796
|
+
backgroundColor: 'transparent',
|
|
3797
|
+
color: isLight ? color : 'light.black',
|
|
3798
|
+
borderWidth: 0,
|
|
3799
|
+
borderStyle: 'none',
|
|
3800
|
+
borderColor: 'transparent',
|
|
3801
|
+
textDecoration: 'underline',
|
|
3802
|
+
textUnderlineOffset: '1px',
|
|
3803
|
+
textDecorationThickness: '1px',
|
|
3804
|
+
_hover: {
|
|
3805
|
+
textDecorationThickness: '2px'
|
|
3806
|
+
},
|
|
3807
|
+
_active: {
|
|
3808
|
+
textDecorationThickness: '2px'
|
|
3809
|
+
},
|
|
3810
|
+
transition: 'all 0.2s ease'
|
|
3811
|
+
}
|
|
3812
|
+
});
|
|
3813
|
+
|
|
3814
|
+
var _excluded$a = ["variant", "size", "shape", "iconPosition", "loaderPosition", "backgroundColor", "color", "isAuto", "isFilled", "isDisabled", "isLoading", "isIconRounded", "icon", "children", "to", "isExternal", "shadow", "onClick", "views", "themeMode"];
|
|
3729
3815
|
var ButtonView = _ref => {
|
|
3730
|
-
var
|
|
3816
|
+
var _ref2;
|
|
3731
3817
|
var {
|
|
3732
|
-
|
|
3733
|
-
shadow,
|
|
3734
|
-
children,
|
|
3735
|
-
ariaLabel,
|
|
3736
|
-
to,
|
|
3737
|
-
isAuto = false,
|
|
3738
|
-
isFilled = false,
|
|
3739
|
-
isIconRounded = false,
|
|
3740
|
-
isLoading = false,
|
|
3741
|
-
isDisabled = false,
|
|
3742
|
-
size = 'md',
|
|
3818
|
+
/* behaviour */
|
|
3743
3819
|
variant = 'filled',
|
|
3744
|
-
|
|
3820
|
+
size = 'md',
|
|
3745
3821
|
shape = 'rounded',
|
|
3746
|
-
|
|
3747
|
-
loaderProps = {},
|
|
3822
|
+
iconPosition = 'left',
|
|
3748
3823
|
loaderPosition = 'left',
|
|
3749
|
-
|
|
3824
|
+
backgroundColor,
|
|
3825
|
+
// primary candidate for main color
|
|
3826
|
+
color // 2nd candidate for main color (NOT text‑color)
|
|
3750
3827
|
,
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3828
|
+
isDisabled,
|
|
3829
|
+
isLoading,
|
|
3830
|
+
isIconRounded,
|
|
3831
|
+
/* content */
|
|
3832
|
+
icon,
|
|
3833
|
+
children,
|
|
3834
|
+
/* nav */
|
|
3835
|
+
to,
|
|
3836
|
+
isExternal,
|
|
3837
|
+
/* misc */
|
|
3838
|
+
shadow,
|
|
3839
|
+
onClick,
|
|
3840
|
+
views = {},
|
|
3841
|
+
themeMode: elementMode
|
|
3759
3842
|
} = _ref,
|
|
3760
3843
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
3844
|
+
/* theme helpers */
|
|
3761
3845
|
var {
|
|
3762
3846
|
getColor,
|
|
3763
3847
|
themeMode
|
|
3764
3848
|
} = appStudio.useTheme();
|
|
3765
|
-
var
|
|
3766
|
-
|
|
3767
|
-
var
|
|
3768
|
-
|
|
3769
|
-
};
|
|
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', {
|
|
3849
|
+
var mode = elementMode != null ? elementMode : themeMode;
|
|
3850
|
+
/* MAIN COLOR – determines the entire palette */
|
|
3851
|
+
var mainColorKey = (_ref2 = backgroundColor != null ? backgroundColor : color) != null ? _ref2 : 'theme.primary';
|
|
3852
|
+
var mainTone = getColor(isDisabled ? 'theme.disabled' : mainColorKey, {
|
|
3812
3853
|
themeMode: mode
|
|
3813
3854
|
});
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
var
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
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'
|
|
3838
|
-
},
|
|
3839
|
-
outline: {
|
|
3840
|
-
backgroundColor: 'transparent',
|
|
3841
|
-
color: resolvedBaseTextColor,
|
|
3842
|
-
borderWidth: 1,
|
|
3843
|
-
borderStyle: 'solid',
|
|
3844
|
-
borderColor: resolvedBorderColor
|
|
3845
|
-
},
|
|
3846
|
-
link: {
|
|
3847
|
-
backgroundColor: 'transparent',
|
|
3848
|
-
color: resolvedBg,
|
|
3849
|
-
borderWidth: 0,
|
|
3850
|
-
borderStyle: 'none',
|
|
3851
|
-
borderColor: 'transparent',
|
|
3852
|
-
textDecoration: 'underline'
|
|
3853
|
-
},
|
|
3854
|
-
ghost: {
|
|
3855
|
-
backgroundColor: 'transparent',
|
|
3856
|
-
color: resolvedBaseTextColor,
|
|
3857
|
-
borderWidth: 0,
|
|
3858
|
-
borderStyle: 'none',
|
|
3859
|
-
borderColor: 'transparent'
|
|
3860
|
-
}
|
|
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
|
|
3870
|
-
},
|
|
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'
|
|
3892
|
-
}
|
|
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
|
-
});
|
|
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);
|
|
3933
|
-
var buttonSizeStyles = ButtonSizes[size];
|
|
3934
|
-
var scaleWidth = {
|
|
3935
|
-
width: isAuto === true ? 'fit-content' : isFilled ? '100%' : buttonSizeStyles.width
|
|
3936
|
-
};
|
|
3937
|
-
var changePadding = isIconRounded ? IconSizes$1[size] : ButtonSizes[size];
|
|
3938
|
-
// Use Horizontal or Vertical container based on icon position
|
|
3939
|
-
var Container = ['left', 'right'].includes(iconPosition) ? appStudio.Horizontal : appStudio.Vertical;
|
|
3940
|
-
// Create the button content with proper spacing and alignment
|
|
3941
|
-
var content = /*#__PURE__*/React__default.createElement(Container, Object.assign({
|
|
3855
|
+
var tone = contrast(mainTone);
|
|
3856
|
+
/* variant palette */
|
|
3857
|
+
var palette = React.useMemo(() => getButtonVariants(mainTone, tone == 'light'), [mainTone, tone]);
|
|
3858
|
+
var base = palette[variant];
|
|
3859
|
+
/* layout helpers */
|
|
3860
|
+
var Wrapper = ['left', 'right'].includes(iconPosition) ? appStudio.Horizontal : appStudio.Vertical;
|
|
3861
|
+
var sizeStyles = ButtonSizes[size];
|
|
3862
|
+
var iconPad = isIconRounded ? IconSizes$1[size] : {};
|
|
3863
|
+
var content = /*#__PURE__*/React__default.createElement(Wrapper, Object.assign({
|
|
3942
3864
|
gap: 8,
|
|
3943
3865
|
alignItems: "center",
|
|
3944
|
-
justifyContent: "center"
|
|
3945
|
-
|
|
3866
|
+
justifyContent: "center",
|
|
3867
|
+
color: 'inherit',
|
|
3868
|
+
_hover: {
|
|
3869
|
+
color: 'inherit'
|
|
3870
|
+
}
|
|
3871
|
+
}, sizeStyles, views == null ? void 0 : views.content), isLoading && loaderPosition === 'left' && (/*#__PURE__*/React__default.createElement(Loader, Object.assign({
|
|
3946
3872
|
size: size === 'xs' || size === 'sm' ? 'sm' : 'md',
|
|
3947
|
-
color:
|
|
3873
|
+
color: 'inherit',
|
|
3874
|
+
_hover: {
|
|
3875
|
+
color: 'inherit'
|
|
3876
|
+
}
|
|
3948
3877
|
}, views == null ? void 0 : views.loader))), icon && ['left', 'top'].includes(iconPosition) && !isLoading && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3878
|
+
color: 'inherit',
|
|
3879
|
+
_hover: {
|
|
3880
|
+
color: 'inherit'
|
|
3881
|
+
}
|
|
3953
3882
|
}, views == null ? void 0 : views.icon), icon)), children, icon && ['right', 'bottom'].includes(iconPosition) && !isLoading && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3883
|
+
color: 'inherit',
|
|
3884
|
+
_hover: {
|
|
3885
|
+
color: 'inherit'
|
|
3886
|
+
}
|
|
3958
3887
|
}, views == null ? void 0 : views.icon), icon)), isLoading && loaderPosition === 'right' && (/*#__PURE__*/React__default.createElement(Loader, Object.assign({
|
|
3959
3888
|
size: size === 'xs' || size === 'sm' ? 'sm' : 'md',
|
|
3960
|
-
color:
|
|
3889
|
+
color: 'inherit',
|
|
3890
|
+
_hover: {
|
|
3891
|
+
color: 'inherit'
|
|
3892
|
+
}
|
|
3961
3893
|
}, views == null ? void 0 : views.loader))));
|
|
3962
|
-
// Determine if the button should render as a Link or a button Element
|
|
3963
|
-
var isLink = variant === 'link' && to;
|
|
3964
3894
|
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3895
|
+
as: variant === 'link' && to ? 'div' : 'button',
|
|
3896
|
+
type: variant === 'link' && to ? undefined : 'button',
|
|
3897
|
+
disabled: Boolean(isDisabled || isLoading)
|
|
3898
|
+
}, sizeStyles, iconPad, {
|
|
3968
3899
|
display: "flex",
|
|
3969
3900
|
alignItems: "center",
|
|
3970
3901
|
justifyContent: "center",
|
|
3971
|
-
|
|
3972
|
-
|
|
3902
|
+
// width={isAuto ? 'fit-content' : isFilled ? '100%' : undefined}
|
|
3903
|
+
/* visuals */
|
|
3973
3904
|
borderRadius: ButtonShapes[shape],
|
|
3974
|
-
|
|
3975
|
-
onMouseEnter: () => handleHover(true),
|
|
3976
|
-
onMouseLeave: () => handleHover(false),
|
|
3977
|
-
cursor: isActive ? isLink ? 'pointer' : 'pointer' : 'default',
|
|
3905
|
+
boxShadow: shadow,
|
|
3978
3906
|
transition: "all 0.2s ease",
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
}, defaultNativeProps, (_ref3 => {
|
|
3983
|
-
var rest = _objectWithoutPropertiesLoose(_ref3, _excluded3$3);
|
|
3984
|
-
return rest;
|
|
3985
|
-
})(props), buttonSizeStyles, baseButtonVariantStyles, scaleWidth, props.padding || props.paddingHorizontal || props.paddingVertical || props.paddingLeft || props.paddingRight || props.paddingTop || props.paddingBottom ? {} : changePadding, {
|
|
3986
|
-
// Apply hover and active styles
|
|
3987
|
-
_hover: _hover,
|
|
3988
|
-
_active: _active
|
|
3989
|
-
}, props, views == null ? void 0 : views.container), to ? (/*#__PURE__*/React__default.createElement(Link, Object.assign({
|
|
3907
|
+
cursor: isDisabled ? 'default' : 'pointer',
|
|
3908
|
+
onClick: onClick
|
|
3909
|
+
}, base, views == null ? void 0 : views.container, props), to ? (/*#__PURE__*/React__default.createElement(Link, Object.assign({
|
|
3990
3910
|
to: to,
|
|
3991
3911
|
isExternal: isExternal,
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
textDecoration: baseButtonVariantStyles.textDecoration,
|
|
3996
|
-
textDecorationColor: baseButtonVariantStyles.color,
|
|
3997
|
-
textDecorationThickness: "1px" // Base thickness
|
|
3998
|
-
,
|
|
3999
|
-
textUnderlineOffset: "2px",
|
|
4000
|
-
transition: "all 0.2s ease",
|
|
4001
|
-
// Apply Link-specific hover/active styles if needed, or let Element's _hover/_active handle it
|
|
4002
|
-
_hover: Object.assign({}, _hover, {
|
|
4003
|
-
textDecorationThickness: '2px'
|
|
4004
|
-
}),
|
|
4005
|
-
_active: Object.assign({}, _active, {
|
|
4006
|
-
textDecorationThickness: '2px'
|
|
4007
|
-
})
|
|
3912
|
+
color: 'inherit',
|
|
3913
|
+
textDecoration: 'inherit',
|
|
3914
|
+
textDecorationColor: 'inherit'
|
|
4008
3915
|
}, views == null ? void 0 : views.link), content)) : content);
|
|
4009
3916
|
};
|
|
4010
3917
|
|
|
@@ -4124,8 +4031,8 @@ var useCardContext = () => {
|
|
|
4124
4031
|
};
|
|
4125
4032
|
|
|
4126
4033
|
var _excluded$b = ["children", "views", "style", "themeMode"],
|
|
4127
|
-
_excluded2$
|
|
4128
|
-
_excluded3$
|
|
4034
|
+
_excluded2$3 = ["children", "views", "style", "themeMode"],
|
|
4035
|
+
_excluded3$3 = ["children", "views", "style", "themeMode"],
|
|
4129
4036
|
_excluded4$3 = ["variant", "size", "shape", "children", "header", "footer", "isFullWidth", "views", "style", "themeMode"];
|
|
4130
4037
|
var CardHeader = _ref => {
|
|
4131
4038
|
var _contextStyles$header;
|
|
@@ -4151,7 +4058,7 @@ var CardContent = _ref2 => {
|
|
|
4151
4058
|
children,
|
|
4152
4059
|
style
|
|
4153
4060
|
} = _ref2,
|
|
4154
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$
|
|
4061
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$3);
|
|
4155
4062
|
var theme = appStudio.useTheme();
|
|
4156
4063
|
var {
|
|
4157
4064
|
styles: contextStyles
|
|
@@ -4169,7 +4076,7 @@ var CardFooter = _ref3 => {
|
|
|
4169
4076
|
children,
|
|
4170
4077
|
style
|
|
4171
4078
|
} = _ref3,
|
|
4172
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded3$
|
|
4079
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded3$3);
|
|
4173
4080
|
var theme = appStudio.useTheme();
|
|
4174
4081
|
var {
|
|
4175
4082
|
styles: contextStyles
|
|
@@ -4528,8 +4435,8 @@ var useCarouselContext = () => {
|
|
|
4528
4435
|
};
|
|
4529
4436
|
|
|
4530
4437
|
var _excluded$c = ["children", "isActive", "views"],
|
|
4531
|
-
_excluded2$
|
|
4532
|
-
_excluded3$
|
|
4438
|
+
_excluded2$4 = ["views", "children"],
|
|
4439
|
+
_excluded3$4 = ["views", "children"],
|
|
4533
4440
|
_excluded4$4 = ["children", "views"],
|
|
4534
4441
|
_excluded5$1 = ["children", "views", "style"],
|
|
4535
4442
|
_excluded6$1 = ["children", "defaultActiveIndex", "activeIndex", "onChange", "showNavigation", "navigationPosition", "prevButton", "nextButton", "showIndicators", "indicatorPosition", "indicatorVariant", "autoPlay", "autoPlayInterval", "pauseOnHover", "infinite", "direction", "transitionDuration", "views", "stepIndices", "themeMode"];
|
|
@@ -4555,7 +4462,7 @@ var CarouselPreviousComponent = _ref2 => {
|
|
|
4555
4462
|
children // Allow custom content/icon
|
|
4556
4463
|
// Spread remaining ButtonProps
|
|
4557
4464
|
} = _ref2,
|
|
4558
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$
|
|
4465
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$4);
|
|
4559
4466
|
var {
|
|
4560
4467
|
goToPrevious,
|
|
4561
4468
|
canGoPrevious,
|
|
@@ -4578,7 +4485,7 @@ var CarouselNextComponent = _ref3 => {
|
|
|
4578
4485
|
views,
|
|
4579
4486
|
children
|
|
4580
4487
|
} = _ref3,
|
|
4581
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded3$
|
|
4488
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded3$4);
|
|
4582
4489
|
var {
|
|
4583
4490
|
goToNext,
|
|
4584
4491
|
canGoNext,
|
|
@@ -5822,8 +5729,8 @@ var calculateMenuPosition = function calculateMenuPosition(x, y, menuWidth, menu
|
|
|
5822
5729
|
};
|
|
5823
5730
|
|
|
5824
5731
|
var _excluded$e = ["children", "disableNativeContextMenu", "asChild", "isDisabled", "views"],
|
|
5825
|
-
_excluded2$
|
|
5826
|
-
_excluded3$
|
|
5732
|
+
_excluded2$5 = ["items", "children", "position", "side", "align", "views", "style"],
|
|
5733
|
+
_excluded3$5 = ["item", "children", "onSelect", "isDisabled", "views"],
|
|
5827
5734
|
_excluded4$5 = ["views"],
|
|
5828
5735
|
_excluded5$2 = ["views"],
|
|
5829
5736
|
_excluded6$2 = ["children", "items", "size", "variant", "disableNativeContextMenu", "views", "themeMode"];
|
|
@@ -5931,7 +5838,7 @@ var ContextMenuContent = _ref3 => {
|
|
|
5931
5838
|
views,
|
|
5932
5839
|
style // Capture user-provided style
|
|
5933
5840
|
} = _ref3,
|
|
5934
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$
|
|
5841
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$5);
|
|
5935
5842
|
var {
|
|
5936
5843
|
isOpen,
|
|
5937
5844
|
position: contextPosition,
|
|
@@ -6002,7 +5909,7 @@ var ContextMenuItem = _ref4 => {
|
|
|
6002
5909
|
isDisabled = false,
|
|
6003
5910
|
views
|
|
6004
5911
|
} = _ref4,
|
|
6005
|
-
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$
|
|
5912
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$5);
|
|
6006
5913
|
var {
|
|
6007
5914
|
activeSubmenuId,
|
|
6008
5915
|
setActiveSubmenuId,
|
|
@@ -6228,7 +6135,7 @@ ContextMenu.Divider = ContextMenuDivider;
|
|
|
6228
6135
|
ContextMenu.Separator = ContextMenuSeparator; // Add the Separator component
|
|
6229
6136
|
|
|
6230
6137
|
var _excluded$g = ["src", "color", "views", "themeMode"],
|
|
6231
|
-
_excluded2$
|
|
6138
|
+
_excluded2$6 = ["path"];
|
|
6232
6139
|
var FileSVG = _ref => {
|
|
6233
6140
|
var {
|
|
6234
6141
|
src,
|
|
@@ -6258,7 +6165,7 @@ var FileImage = _ref2 => {
|
|
|
6258
6165
|
var {
|
|
6259
6166
|
path
|
|
6260
6167
|
} = _ref2,
|
|
6261
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$
|
|
6168
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$6);
|
|
6262
6169
|
return /*#__PURE__*/React__default.createElement(appStudio.Image, Object.assign({
|
|
6263
6170
|
src: path
|
|
6264
6171
|
}, props));
|
|
@@ -6690,8 +6597,8 @@ var IconSizes$2 = {
|
|
|
6690
6597
|
};
|
|
6691
6598
|
|
|
6692
6599
|
var _excluded$o = ["isHovered", "setIsHovered", "option", "size", "callback", "style"],
|
|
6693
|
-
_excluded2$
|
|
6694
|
-
_excluded3$
|
|
6600
|
+
_excluded2$7 = ["id", "name", "value", "onChange", "isMulti", "isDisabled", "isReadOnly", "options"],
|
|
6601
|
+
_excluded3$6 = ["option", "size", "removeOption"],
|
|
6695
6602
|
_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"];
|
|
6696
6603
|
/**
|
|
6697
6604
|
* Item Component
|
|
@@ -6808,7 +6715,7 @@ var HiddenSelect = _ref4 => {
|
|
|
6808
6715
|
isReadOnly = false,
|
|
6809
6716
|
options = []
|
|
6810
6717
|
} = _ref4,
|
|
6811
|
-
props = _objectWithoutPropertiesLoose(_ref4, _excluded2$
|
|
6718
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded2$7);
|
|
6812
6719
|
var handleChange = event => {
|
|
6813
6720
|
if (onChange) onChange(event);
|
|
6814
6721
|
};
|
|
@@ -6911,7 +6818,7 @@ var MultiSelect = _ref6 => {
|
|
|
6911
6818
|
size = 'md',
|
|
6912
6819
|
removeOption = () => {}
|
|
6913
6820
|
} = _ref6,
|
|
6914
|
-
props = _objectWithoutPropertiesLoose(_ref6, _excluded3$
|
|
6821
|
+
props = _objectWithoutPropertiesLoose(_ref6, _excluded3$6);
|
|
6915
6822
|
var handleClick = () => removeOption(option);
|
|
6916
6823
|
return /*#__PURE__*/React__default.createElement(appStudio.Horizontal, Object.assign({
|
|
6917
6824
|
gap: 8,
|
|
@@ -9443,8 +9350,8 @@ var IconSizes$4 = {
|
|
|
9443
9350
|
};
|
|
9444
9351
|
|
|
9445
9352
|
var _excluded$t = ["size"],
|
|
9446
|
-
_excluded2$
|
|
9447
|
-
_excluded3$
|
|
9353
|
+
_excluded2$8 = ["size"],
|
|
9354
|
+
_excluded3$7 = ["id", "name", "label", "value", "placeholder", "helperText", "hide", "error", "isHovered", "isFocused", "isAutoFocus", "isDisabled", "isReadOnly", "shadow", "newOptions", "size", "variant", "shape", "onChange", "onBlur", "setHide", "setNewOptions", "setIsHovered", "setIsFocused", "setValue", "views", "themeMode"];
|
|
9448
9355
|
var CountryList = _ref => {
|
|
9449
9356
|
var props = _objectWithoutPropertiesLoose(_ref, _excluded$t);
|
|
9450
9357
|
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
|
|
@@ -9455,7 +9362,7 @@ var CountrySelector = props => (/*#__PURE__*/React__default.createElement(appStu
|
|
|
9455
9362
|
type: "country"
|
|
9456
9363
|
}, props)));
|
|
9457
9364
|
var CountryItem = _ref2 => {
|
|
9458
|
-
var props = _objectWithoutPropertiesLoose(_ref2, _excluded2$
|
|
9365
|
+
var props = _objectWithoutPropertiesLoose(_ref2, _excluded2$8);
|
|
9459
9366
|
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
|
|
9460
9367
|
as: "li"
|
|
9461
9368
|
}, props));
|
|
@@ -9557,7 +9464,7 @@ var CountryPickerView = _ref5 => {
|
|
|
9557
9464
|
},
|
|
9558
9465
|
themeMode: elementMode
|
|
9559
9466
|
} = _ref5,
|
|
9560
|
-
props = _objectWithoutPropertiesLoose(_ref5, _excluded3$
|
|
9467
|
+
props = _objectWithoutPropertiesLoose(_ref5, _excluded3$7);
|
|
9561
9468
|
var {
|
|
9562
9469
|
getColor,
|
|
9563
9470
|
themeMode
|
|
@@ -9808,7 +9715,7 @@ var usePasswordState = props => {
|
|
|
9808
9715
|
};
|
|
9809
9716
|
|
|
9810
9717
|
var _excluded$v = ["visibleIcon", "hiddenIcon"],
|
|
9811
|
-
_excluded2$
|
|
9718
|
+
_excluded2$9 = ["isVisible", "setIsVisible"];
|
|
9812
9719
|
var PasswordComponent = _ref => {
|
|
9813
9720
|
var {
|
|
9814
9721
|
visibleIcon = /*#__PURE__*/React__default.createElement(OpenEyeIcon, {
|
|
@@ -9824,7 +9731,7 @@ var PasswordComponent = _ref => {
|
|
|
9824
9731
|
isVisible,
|
|
9825
9732
|
setIsVisible
|
|
9826
9733
|
} = _usePasswordState,
|
|
9827
|
-
passwordProps = _objectWithoutPropertiesLoose(_usePasswordState, _excluded2$
|
|
9734
|
+
passwordProps = _objectWithoutPropertiesLoose(_usePasswordState, _excluded2$9);
|
|
9828
9735
|
return /*#__PURE__*/React__default.createElement(TextFieldView, Object.assign({}, passwordProps, {
|
|
9829
9736
|
type: isVisible ? 'text' : 'password',
|
|
9830
9737
|
isClearable: false,
|
|
@@ -10857,7 +10764,7 @@ var TextFieldComponent$1 = props => {
|
|
|
10857
10764
|
var FormikTextField = TextFieldComponent$1;
|
|
10858
10765
|
|
|
10859
10766
|
var _excluded$D = ["visibleIcon", "hiddenIcon"],
|
|
10860
|
-
_excluded2$
|
|
10767
|
+
_excluded2$a = ["isVisible", "setIsVisible"];
|
|
10861
10768
|
var PasswordComponent$1 = _ref => {
|
|
10862
10769
|
var {
|
|
10863
10770
|
visibleIcon = /*#__PURE__*/React__default.createElement(OpenEyeIcon, {
|
|
@@ -10874,7 +10781,7 @@ var PasswordComponent$1 = _ref => {
|
|
|
10874
10781
|
isVisible,
|
|
10875
10782
|
setIsVisible
|
|
10876
10783
|
} = _usePasswordState,
|
|
10877
|
-
passwordProps = _objectWithoutPropertiesLoose(_usePasswordState, _excluded2$
|
|
10784
|
+
passwordProps = _objectWithoutPropertiesLoose(_usePasswordState, _excluded2$a);
|
|
10878
10785
|
return /*#__PURE__*/React__default.createElement(TextFieldView, Object.assign({}, passwordProps, {
|
|
10879
10786
|
type: isVisible ? 'text' : 'password',
|
|
10880
10787
|
isClearable: false,
|
|
@@ -12306,8 +12213,8 @@ var ModalTypography = {
|
|
|
12306
12213
|
};
|
|
12307
12214
|
|
|
12308
12215
|
var _excluded$H = ["children", "blur", "isOpen", "isClosePrevented", "onClose", "position", "views"],
|
|
12309
|
-
_excluded2$
|
|
12310
|
-
_excluded3$
|
|
12216
|
+
_excluded2$b = ["children", "shadow", "isFullScreen", "shape", "views", "isOpen"],
|
|
12217
|
+
_excluded3$8 = ["children", "buttonColor", "iconSize", "buttonPosition", "views"],
|
|
12311
12218
|
_excluded4$7 = ["children", "views"],
|
|
12312
12219
|
_excluded5$3 = ["children", "views"];
|
|
12313
12220
|
var ModalOverlay = _ref => {
|
|
@@ -12356,7 +12263,7 @@ var ModalContainer = _ref2 => {
|
|
|
12356
12263
|
shape = 'rounded',
|
|
12357
12264
|
views
|
|
12358
12265
|
} = _ref2,
|
|
12359
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$
|
|
12266
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$b);
|
|
12360
12267
|
var defaultShadow = typeof document !== undefined ? {
|
|
12361
12268
|
boxShadow: '0px 4px 16px rgba(0, 0, 0, 0.15)'
|
|
12362
12269
|
} : {
|
|
@@ -12389,7 +12296,7 @@ var ModalHeader = _ref3 => {
|
|
|
12389
12296
|
buttonPosition = 'right',
|
|
12390
12297
|
views
|
|
12391
12298
|
} = _ref3,
|
|
12392
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded3$
|
|
12299
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded3$8);
|
|
12393
12300
|
var onClose = props.onClose ? props.onClose : hideModal;
|
|
12394
12301
|
var buttonIcon = /*#__PURE__*/React__default.createElement(appStudio.View, {
|
|
12395
12302
|
onClick: onClose
|
|
@@ -13866,8 +13773,8 @@ var getDropdownPosition = function getDropdownPosition(side, align) {
|
|
|
13866
13773
|
};
|
|
13867
13774
|
|
|
13868
13775
|
var _excluded$M = ["children", "views"],
|
|
13869
|
-
_excluded2$
|
|
13870
|
-
_excluded3$
|
|
13776
|
+
_excluded2$c = ["items", "side", "align", "views"],
|
|
13777
|
+
_excluded3$9 = ["item", "views"],
|
|
13871
13778
|
_excluded4$8 = ["views"],
|
|
13872
13779
|
_excluded5$4 = ["trigger", "items", "side", "align", "views", "themeMode"];
|
|
13873
13780
|
// Create context for the DropdownMenu
|
|
@@ -13928,7 +13835,7 @@ var DropdownMenuContent = _ref3 => {
|
|
|
13928
13835
|
align = 'start',
|
|
13929
13836
|
views
|
|
13930
13837
|
} = _ref3,
|
|
13931
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$
|
|
13838
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$c);
|
|
13932
13839
|
var {
|
|
13933
13840
|
isOpen,
|
|
13934
13841
|
//activeSubmenuId, setActiveSubmenuId, size,
|
|
@@ -13964,7 +13871,7 @@ var DropdownMenuItem = _ref4 => {
|
|
|
13964
13871
|
item,
|
|
13965
13872
|
views
|
|
13966
13873
|
} = _ref4,
|
|
13967
|
-
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$
|
|
13874
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$9);
|
|
13968
13875
|
var {
|
|
13969
13876
|
activeSubmenuId,
|
|
13970
13877
|
setActiveSubmenuId,
|
|
@@ -14013,8 +13920,8 @@ var DropdownMenuItem = _ref4 => {
|
|
|
14013
13920
|
}, item.label), hasSubmenu && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
14014
13921
|
marginLeft: 8
|
|
14015
13922
|
}, views == null ? void 0 : views.submenuIndicator), /*#__PURE__*/React__default.createElement("svg", {
|
|
14016
|
-
width: "
|
|
14017
|
-
height: "
|
|
13923
|
+
width: "16px",
|
|
13924
|
+
height: "16px",
|
|
14018
13925
|
viewBox: "0 0 24 24",
|
|
14019
13926
|
fill: "none",
|
|
14020
13927
|
xmlns: "http://www.w3.org/2000/svg"
|
|
@@ -14277,7 +14184,7 @@ var useRect = ref => {
|
|
|
14277
14184
|
};
|
|
14278
14185
|
|
|
14279
14186
|
var _excluded$O = ["children", "views", "asChild"],
|
|
14280
|
-
_excluded2$
|
|
14187
|
+
_excluded2$d = ["children", "views", "side", "align", "sideOffset", "style", "backgroundColor", "borderRadius", "boxShadow", "padding", "minWidth", "maxWidth"];
|
|
14281
14188
|
// Create context for the HoverCard
|
|
14282
14189
|
var HoverCardContext = /*#__PURE__*/React.createContext({
|
|
14283
14190
|
isOpen: false,
|
|
@@ -14363,7 +14270,7 @@ var HoverCardContent = _ref3 => {
|
|
|
14363
14270
|
minWidth = '200px',
|
|
14364
14271
|
maxWidth = '300px'
|
|
14365
14272
|
} = _ref3,
|
|
14366
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$
|
|
14273
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$d);
|
|
14367
14274
|
var {
|
|
14368
14275
|
isOpen,
|
|
14369
14276
|
cancelCloseTimer,
|
|
@@ -15426,8 +15333,8 @@ var SidebarTransitions = {
|
|
|
15426
15333
|
};
|
|
15427
15334
|
|
|
15428
15335
|
var _excluded$V = ["children", "showToggleButton", "views"],
|
|
15429
|
-
_excluded2$
|
|
15430
|
-
_excluded3$
|
|
15336
|
+
_excluded2$e = ["children", "views"],
|
|
15337
|
+
_excluded3$a = ["children", "views"],
|
|
15431
15338
|
_excluded4$9 = ["children", "position", "size", "variant", "fixed", "hasBackdrop", "expandedWidth", "collapsedWidth", "breakpointBehavior", "elevation", "transitionPreset", "ariaLabel", "isExpanded", "isMobile", "collapse", "views", "themeMode"];
|
|
15432
15339
|
// Create context for the Sidebar
|
|
15433
15340
|
var SidebarContext = /*#__PURE__*/React.createContext({
|
|
@@ -15525,7 +15432,7 @@ var SidebarContent = _ref3 => {
|
|
|
15525
15432
|
children,
|
|
15526
15433
|
views
|
|
15527
15434
|
} = _ref3,
|
|
15528
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$
|
|
15435
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$e);
|
|
15529
15436
|
var {
|
|
15530
15437
|
isExpanded
|
|
15531
15438
|
} = useSidebarContext();
|
|
@@ -15543,7 +15450,7 @@ var SidebarFooter = _ref4 => {
|
|
|
15543
15450
|
children,
|
|
15544
15451
|
views
|
|
15545
15452
|
} = _ref4,
|
|
15546
|
-
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$
|
|
15453
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$a);
|
|
15547
15454
|
var {
|
|
15548
15455
|
isExpanded
|
|
15549
15456
|
} = useSidebarContext();
|
|
@@ -16101,8 +16008,8 @@ var HandleIconStyles = {
|
|
|
16101
16008
|
};
|
|
16102
16009
|
|
|
16103
16010
|
var _excluded$X = ["children", "id", "defaultSize", "minSize", "maxSize", "collapsible", "defaultCollapsed", "onCollapseChange", "views"],
|
|
16104
|
-
_excluded2$
|
|
16105
|
-
_excluded3$
|
|
16011
|
+
_excluded2$f = ["id", "position", "disabled", "withVisualIndicator", "withCollapseButton", "collapseTarget", "views"],
|
|
16012
|
+
_excluded3$b = ["children", "orientation", "size", "variant", "defaultSizes", "minSize", "maxSize", "collapsible", "containerRef", "autoSaveId", "views"];
|
|
16106
16013
|
// Create context for the Resizable component
|
|
16107
16014
|
var ResizableContext = /*#__PURE__*/React.createContext({
|
|
16108
16015
|
orientation: 'horizontal',
|
|
@@ -16209,7 +16116,7 @@ var ResizableHandle = _ref3 => {
|
|
|
16209
16116
|
collapseTarget,
|
|
16210
16117
|
views
|
|
16211
16118
|
} = _ref3,
|
|
16212
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$
|
|
16119
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$f);
|
|
16213
16120
|
var {
|
|
16214
16121
|
orientation,
|
|
16215
16122
|
size,
|
|
@@ -16349,7 +16256,7 @@ var ResizableView = _ref4 => {
|
|
|
16349
16256
|
containerRef,
|
|
16350
16257
|
views
|
|
16351
16258
|
} = _ref4,
|
|
16352
|
-
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$
|
|
16259
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$b);
|
|
16353
16260
|
var Container = orientation === 'horizontal' ? appStudio.Horizontal : appStudio.Vertical;
|
|
16354
16261
|
return /*#__PURE__*/React__default.createElement(Container, Object.assign({
|
|
16355
16262
|
ref: containerRef,
|
|
@@ -17149,8 +17056,8 @@ var CommandFooterStyles = {
|
|
|
17149
17056
|
};
|
|
17150
17057
|
|
|
17151
17058
|
var _excluded$Z = ["value", "onValueChange", "placeholder", "views"],
|
|
17152
|
-
_excluded2$
|
|
17153
|
-
_excluded3$
|
|
17059
|
+
_excluded2$g = ["children", "views"],
|
|
17060
|
+
_excluded3$c = ["heading", "children", "views"],
|
|
17154
17061
|
_excluded4$a = ["item", "selected", "onSelect", "views"],
|
|
17155
17062
|
_excluded5$5 = ["children", "views"],
|
|
17156
17063
|
_excluded6$3 = ["open", "onOpenChange", "groups", "commands", "placeholder", "size", "variant", "emptyState", "footer", "search", "setSearch", "selectedIndex", "setSelectedIndex", "filteredCommands", "filteredGroups", "listRef", "views", "filter"];
|
|
@@ -17212,7 +17119,7 @@ var CommandList = _ref3 => {
|
|
|
17212
17119
|
children,
|
|
17213
17120
|
views
|
|
17214
17121
|
} = _ref3,
|
|
17215
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$
|
|
17122
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$g);
|
|
17216
17123
|
return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, CommandListStyles, views == null ? void 0 : views.container, props), children);
|
|
17217
17124
|
};
|
|
17218
17125
|
// Command Group component
|
|
@@ -17222,7 +17129,7 @@ var CommandGroup = _ref4 => {
|
|
|
17222
17129
|
children,
|
|
17223
17130
|
views
|
|
17224
17131
|
} = _ref4,
|
|
17225
|
-
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$
|
|
17132
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$c);
|
|
17226
17133
|
return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, CommandGroupStyles, views == null ? void 0 : views.container, props), /*#__PURE__*/React__default.createElement(Text, Object.assign({}, CommandGroupHeadingStyles, views == null ? void 0 : views.heading), heading), children);
|
|
17227
17134
|
};
|
|
17228
17135
|
// Command Item component
|
|
@@ -17669,8 +17576,8 @@ var getArrowStyles = position => {
|
|
|
17669
17576
|
};
|
|
17670
17577
|
|
|
17671
17578
|
var _excluded$$ = ["children", "views", "asChild"],
|
|
17672
|
-
_excluded2$
|
|
17673
|
-
_excluded3$
|
|
17579
|
+
_excluded2$h = ["children", "views"],
|
|
17580
|
+
_excluded3$d = ["content", "children", "position", "align", "size", "variant", "showArrow", "views", "themeMode"];
|
|
17674
17581
|
// Create context for the Tooltip
|
|
17675
17582
|
var TooltipContext = /*#__PURE__*/React.createContext({
|
|
17676
17583
|
isOpen: false,
|
|
@@ -17740,7 +17647,7 @@ var TooltipContent = _ref3 => {
|
|
|
17740
17647
|
children,
|
|
17741
17648
|
views
|
|
17742
17649
|
} = _ref3,
|
|
17743
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$
|
|
17650
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded2$h);
|
|
17744
17651
|
var {
|
|
17745
17652
|
isOpen,
|
|
17746
17653
|
contentRef,
|
|
@@ -17770,7 +17677,7 @@ var TooltipView = _ref4 => {
|
|
|
17770
17677
|
showArrow = true,
|
|
17771
17678
|
views
|
|
17772
17679
|
} = _ref4,
|
|
17773
|
-
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$
|
|
17680
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded3$d);
|
|
17774
17681
|
var {
|
|
17775
17682
|
isOpen,
|
|
17776
17683
|
// openTooltip,
|