sag_components 2.0.0-beta75 → 2.0.0-beta76
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/index.esm.js +175 -181
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +175 -181
- package/dist/index.js.map +1 -1
- package/dist/types/components/BubbleChart/BubbleChart.stories.d.ts +1 -0
- package/dist/types/components/TabMenu/TabMenu.d.ts +1 -1
- package/dist/types/components/TabMenu/TabMenu.stories.d.ts +27 -37
- package/dist/types/components/TabMenu/TabMenu.style.d.ts +2 -34
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3472,154 +3472,6 @@ const LinnerDataBox = props => {
|
|
|
3472
3472
|
}))));
|
|
3473
3473
|
};
|
|
3474
3474
|
|
|
3475
|
-
const SagIconButtonWrapper = styled.button`
|
|
3476
|
-
height: ${props => props.height};
|
|
3477
|
-
font-size: 14px;
|
|
3478
|
-
font-weight: 400;
|
|
3479
|
-
display: flex;
|
|
3480
|
-
gap: 8px;
|
|
3481
|
-
align-items: center;
|
|
3482
|
-
justify-content: center;
|
|
3483
|
-
padding: 8px 18px;
|
|
3484
|
-
white-space: nowrap;
|
|
3485
|
-
color: ${props => props.color};
|
|
3486
|
-
border-radius: 8px;
|
|
3487
|
-
border: 1px solid ${props => props.color};
|
|
3488
|
-
background: ${props => props.backgroundColor ? props.backgroundColor : 'transparent'};
|
|
3489
|
-
transition: box-shadow 0.3s ease;
|
|
3490
|
-
&:hover, &:focus {
|
|
3491
|
-
cursor: pointer;
|
|
3492
|
-
box-shadow: 5px 5px 10px 0px rgba(0, 0, 0, 0.1);
|
|
3493
|
-
}
|
|
3494
|
-
`;
|
|
3495
|
-
const SpanText$1 = styled.span`
|
|
3496
|
-
`;
|
|
3497
|
-
|
|
3498
|
-
const SagIconButton = props => {
|
|
3499
|
-
const {
|
|
3500
|
-
iconName,
|
|
3501
|
-
color,
|
|
3502
|
-
backgroundColor,
|
|
3503
|
-
activeColor,
|
|
3504
|
-
height,
|
|
3505
|
-
buttonText,
|
|
3506
|
-
iconWidth,
|
|
3507
|
-
iconHeight,
|
|
3508
|
-
disabled,
|
|
3509
|
-
openState,
|
|
3510
|
-
onButtonClick,
|
|
3511
|
-
className
|
|
3512
|
-
} = props;
|
|
3513
|
-
const [activeState, setActiveState] = useState(openState);
|
|
3514
|
-
const onClickHandler = event => {
|
|
3515
|
-
onButtonClick(event);
|
|
3516
|
-
setActiveState(prevState => !prevState);
|
|
3517
|
-
};
|
|
3518
|
-
const getIcon = icon => {
|
|
3519
|
-
switch (icon.toLowerCase()) {
|
|
3520
|
-
case 'filter':
|
|
3521
|
-
return /*#__PURE__*/React$1.createElement(FilterIcon, {
|
|
3522
|
-
height: iconHeight,
|
|
3523
|
-
width: iconWidth,
|
|
3524
|
-
color: activeState ? activeColor : color
|
|
3525
|
-
});
|
|
3526
|
-
case 'options':
|
|
3527
|
-
return /*#__PURE__*/React$1.createElement(OptionsIcon, {
|
|
3528
|
-
height: iconHeight,
|
|
3529
|
-
width: iconWidth,
|
|
3530
|
-
color: activeState ? activeColor : color
|
|
3531
|
-
});
|
|
3532
|
-
case 'download':
|
|
3533
|
-
return /*#__PURE__*/React$1.createElement(DownloadIcon, {
|
|
3534
|
-
height: iconHeight,
|
|
3535
|
-
width: iconWidth,
|
|
3536
|
-
color: activeState ? activeColor : color
|
|
3537
|
-
});
|
|
3538
|
-
case 'document':
|
|
3539
|
-
return /*#__PURE__*/React$1.createElement(DocumentIcon, {
|
|
3540
|
-
height: iconHeight,
|
|
3541
|
-
width: iconWidth,
|
|
3542
|
-
color: activeState ? activeColor : color
|
|
3543
|
-
});
|
|
3544
|
-
case 'fly':
|
|
3545
|
-
return /*#__PURE__*/React$1.createElement(FlyIcon, {
|
|
3546
|
-
height: iconHeight,
|
|
3547
|
-
width: iconWidth,
|
|
3548
|
-
color: activeState ? activeColor : color
|
|
3549
|
-
});
|
|
3550
|
-
case 'bell':
|
|
3551
|
-
return /*#__PURE__*/React$1.createElement(BellIcon, {
|
|
3552
|
-
height: iconHeight,
|
|
3553
|
-
width: iconWidth,
|
|
3554
|
-
color: activeState ? activeColor : color
|
|
3555
|
-
});
|
|
3556
|
-
case 'maintenance':
|
|
3557
|
-
return /*#__PURE__*/React$1.createElement(MaintenanceIcon, {
|
|
3558
|
-
height: iconHeight,
|
|
3559
|
-
width: iconWidth,
|
|
3560
|
-
color: activeState ? activeColor : color
|
|
3561
|
-
});
|
|
3562
|
-
case 'exit':
|
|
3563
|
-
return /*#__PURE__*/React$1.createElement(ExitIcon, {
|
|
3564
|
-
height: iconHeight,
|
|
3565
|
-
width: iconWidth,
|
|
3566
|
-
color: activeState ? activeColor : color
|
|
3567
|
-
});
|
|
3568
|
-
case 'eye':
|
|
3569
|
-
return /*#__PURE__*/React$1.createElement(EyeIcon, {
|
|
3570
|
-
height: iconHeight,
|
|
3571
|
-
width: iconWidth,
|
|
3572
|
-
color: activeState ? activeColor : color
|
|
3573
|
-
});
|
|
3574
|
-
default:
|
|
3575
|
-
return /*#__PURE__*/React$1.createElement(EyeIcon, {
|
|
3576
|
-
height: iconHeight,
|
|
3577
|
-
width: iconWidth,
|
|
3578
|
-
color: activeState ? activeColor : color
|
|
3579
|
-
});
|
|
3580
|
-
}
|
|
3581
|
-
};
|
|
3582
|
-
return /*#__PURE__*/React$1.createElement(SagIconButtonWrapper, {
|
|
3583
|
-
className: className,
|
|
3584
|
-
height: height,
|
|
3585
|
-
color: activeState ? activeColor : color,
|
|
3586
|
-
backgroundColor: backgroundColor,
|
|
3587
|
-
disabled: disabled,
|
|
3588
|
-
onClick: event => {
|
|
3589
|
-
onClickHandler(event);
|
|
3590
|
-
}
|
|
3591
|
-
}, getIcon(iconName), buttonText && /*#__PURE__*/React$1.createElement(SpanText$1, null, buttonText));
|
|
3592
|
-
};
|
|
3593
|
-
SagIconButton.propTypes = {
|
|
3594
|
-
className: PropTypes.string,
|
|
3595
|
-
iconName: PropTypes.string,
|
|
3596
|
-
buttonText: PropTypes.string,
|
|
3597
|
-
height: PropTypes.string,
|
|
3598
|
-
color: PropTypes.string,
|
|
3599
|
-
backgroundColor: PropTypes.string,
|
|
3600
|
-
activeColor: PropTypes.string,
|
|
3601
|
-
iconHeight: PropTypes.number,
|
|
3602
|
-
iconWidth: PropTypes.number,
|
|
3603
|
-
openState: PropTypes.bool,
|
|
3604
|
-
disabled: PropTypes.bool,
|
|
3605
|
-
onButtonClick: PropTypes.func
|
|
3606
|
-
};
|
|
3607
|
-
SagIconButton.defaultProps = {
|
|
3608
|
-
className: '',
|
|
3609
|
-
iconName: 'filter',
|
|
3610
|
-
buttonText: 'Filter',
|
|
3611
|
-
height: '40px',
|
|
3612
|
-
color: '#212121',
|
|
3613
|
-
activeColor: '#229E38',
|
|
3614
|
-
backgroundColor: 'transparent',
|
|
3615
|
-
// '#E8F5EB',
|
|
3616
|
-
iconHeight: 12,
|
|
3617
|
-
iconWidth: 12,
|
|
3618
|
-
openState: false,
|
|
3619
|
-
disabled: false,
|
|
3620
|
-
onButtonClick: () => {}
|
|
3621
|
-
};
|
|
3622
|
-
|
|
3623
3475
|
const TextFieldContainer = styled.div`
|
|
3624
3476
|
position: relative;
|
|
3625
3477
|
width: ${props => props.width};
|
|
@@ -3728,16 +3580,6 @@ const TopRow = styled.div`
|
|
|
3728
3580
|
display: flex;
|
|
3729
3581
|
align-items: center;
|
|
3730
3582
|
gap: 20px;
|
|
3731
|
-
`;
|
|
3732
|
-
const Headline$1 = styled.span`
|
|
3733
|
-
font-size: 18px;
|
|
3734
|
-
font-weight: 500;
|
|
3735
|
-
margin-right: auto;
|
|
3736
|
-
`;
|
|
3737
|
-
const Nav = styled.nav`
|
|
3738
|
-
display: flex;
|
|
3739
|
-
flex-direction: row;
|
|
3740
|
-
|
|
3741
3583
|
`;
|
|
3742
3584
|
const TabActionLine = styled.div`
|
|
3743
3585
|
margin-left: auto;
|
|
@@ -3745,20 +3587,28 @@ const TabActionLine = styled.div`
|
|
|
3745
3587
|
align-items: center;
|
|
3746
3588
|
height: 100%;
|
|
3747
3589
|
`;
|
|
3590
|
+
const Headline$1 = styled.span`
|
|
3591
|
+
font-size: 18px;
|
|
3592
|
+
font-weight: 500;
|
|
3593
|
+
margin-right: auto;
|
|
3594
|
+
`;
|
|
3748
3595
|
const Tabs = styled.div`
|
|
3749
3596
|
position: relative;
|
|
3750
3597
|
display: flex;
|
|
3751
3598
|
align-items: center;
|
|
3752
3599
|
width: 100%;
|
|
3753
3600
|
`;
|
|
3754
|
-
const Tab = styled.
|
|
3601
|
+
const Tab = styled.button`
|
|
3755
3602
|
cursor: pointer;
|
|
3756
3603
|
position: relative;
|
|
3757
3604
|
text-align: center;
|
|
3758
3605
|
padding: 8px 12px;
|
|
3759
3606
|
font-size: 16px;
|
|
3760
3607
|
color: #000000;
|
|
3608
|
+
border: none;
|
|
3761
3609
|
border-bottom: 2px solid #D0D0D0;
|
|
3610
|
+
background: transparent;
|
|
3611
|
+
z-index: 2;
|
|
3762
3612
|
&.active {
|
|
3763
3613
|
font-weight: 600;
|
|
3764
3614
|
color: ${props => props.color};
|
|
@@ -3816,12 +3666,158 @@ const ActionsWrapper = styled.div`
|
|
|
3816
3666
|
gap: 10px;
|
|
3817
3667
|
width: 100%;
|
|
3818
3668
|
`;
|
|
3819
|
-
const SagIconButtonWrap = styled(SagIconButton)`
|
|
3820
|
-
`;
|
|
3821
3669
|
const SearchInputWrap = styled(SearchInput)`
|
|
3822
3670
|
margin-left: auto;
|
|
3823
3671
|
`;
|
|
3824
3672
|
|
|
3673
|
+
const SagIconButtonWrapper = styled.button`
|
|
3674
|
+
height: ${props => props.height};
|
|
3675
|
+
font-size: 14px;
|
|
3676
|
+
font-weight: 400;
|
|
3677
|
+
display: flex;
|
|
3678
|
+
gap: 8px;
|
|
3679
|
+
align-items: center;
|
|
3680
|
+
justify-content: center;
|
|
3681
|
+
padding: 8px 18px;
|
|
3682
|
+
white-space: nowrap;
|
|
3683
|
+
color: ${props => props.color};
|
|
3684
|
+
border-radius: 8px;
|
|
3685
|
+
border: 1px solid ${props => props.color};
|
|
3686
|
+
background: ${props => props.backgroundColor ? props.backgroundColor : 'transparent'};
|
|
3687
|
+
transition: box-shadow 0.3s ease;
|
|
3688
|
+
&:hover, &:focus {
|
|
3689
|
+
cursor: pointer;
|
|
3690
|
+
box-shadow: 5px 5px 10px 0px rgba(0, 0, 0, 0.1);
|
|
3691
|
+
}
|
|
3692
|
+
`;
|
|
3693
|
+
const SpanText$1 = styled.span`
|
|
3694
|
+
`;
|
|
3695
|
+
|
|
3696
|
+
const SagIconButton = props => {
|
|
3697
|
+
const {
|
|
3698
|
+
iconName,
|
|
3699
|
+
color,
|
|
3700
|
+
backgroundColor,
|
|
3701
|
+
activeColor,
|
|
3702
|
+
height,
|
|
3703
|
+
buttonText,
|
|
3704
|
+
iconWidth,
|
|
3705
|
+
iconHeight,
|
|
3706
|
+
disabled,
|
|
3707
|
+
openState,
|
|
3708
|
+
onButtonClick,
|
|
3709
|
+
className
|
|
3710
|
+
} = props;
|
|
3711
|
+
const [activeState, setActiveState] = useState(openState);
|
|
3712
|
+
const onClickHandler = event => {
|
|
3713
|
+
onButtonClick(event);
|
|
3714
|
+
setActiveState(prevState => !prevState);
|
|
3715
|
+
};
|
|
3716
|
+
const getIcon = icon => {
|
|
3717
|
+
switch (icon.toLowerCase()) {
|
|
3718
|
+
case 'filter':
|
|
3719
|
+
return /*#__PURE__*/React$1.createElement(FilterIcon, {
|
|
3720
|
+
height: iconHeight,
|
|
3721
|
+
width: iconWidth,
|
|
3722
|
+
color: activeState ? activeColor : color
|
|
3723
|
+
});
|
|
3724
|
+
case 'options':
|
|
3725
|
+
return /*#__PURE__*/React$1.createElement(OptionsIcon, {
|
|
3726
|
+
height: iconHeight,
|
|
3727
|
+
width: iconWidth,
|
|
3728
|
+
color: activeState ? activeColor : color
|
|
3729
|
+
});
|
|
3730
|
+
case 'download':
|
|
3731
|
+
return /*#__PURE__*/React$1.createElement(DownloadIcon, {
|
|
3732
|
+
height: iconHeight,
|
|
3733
|
+
width: iconWidth,
|
|
3734
|
+
color: activeState ? activeColor : color
|
|
3735
|
+
});
|
|
3736
|
+
case 'document':
|
|
3737
|
+
return /*#__PURE__*/React$1.createElement(DocumentIcon, {
|
|
3738
|
+
height: iconHeight,
|
|
3739
|
+
width: iconWidth,
|
|
3740
|
+
color: activeState ? activeColor : color
|
|
3741
|
+
});
|
|
3742
|
+
case 'fly':
|
|
3743
|
+
return /*#__PURE__*/React$1.createElement(FlyIcon, {
|
|
3744
|
+
height: iconHeight,
|
|
3745
|
+
width: iconWidth,
|
|
3746
|
+
color: activeState ? activeColor : color
|
|
3747
|
+
});
|
|
3748
|
+
case 'bell':
|
|
3749
|
+
return /*#__PURE__*/React$1.createElement(BellIcon, {
|
|
3750
|
+
height: iconHeight,
|
|
3751
|
+
width: iconWidth,
|
|
3752
|
+
color: activeState ? activeColor : color
|
|
3753
|
+
});
|
|
3754
|
+
case 'maintenance':
|
|
3755
|
+
return /*#__PURE__*/React$1.createElement(MaintenanceIcon, {
|
|
3756
|
+
height: iconHeight,
|
|
3757
|
+
width: iconWidth,
|
|
3758
|
+
color: activeState ? activeColor : color
|
|
3759
|
+
});
|
|
3760
|
+
case 'exit':
|
|
3761
|
+
return /*#__PURE__*/React$1.createElement(ExitIcon, {
|
|
3762
|
+
height: iconHeight,
|
|
3763
|
+
width: iconWidth,
|
|
3764
|
+
color: activeState ? activeColor : color
|
|
3765
|
+
});
|
|
3766
|
+
case 'eye':
|
|
3767
|
+
return /*#__PURE__*/React$1.createElement(EyeIcon, {
|
|
3768
|
+
height: iconHeight,
|
|
3769
|
+
width: iconWidth,
|
|
3770
|
+
color: activeState ? activeColor : color
|
|
3771
|
+
});
|
|
3772
|
+
default:
|
|
3773
|
+
return /*#__PURE__*/React$1.createElement(EyeIcon, {
|
|
3774
|
+
height: iconHeight,
|
|
3775
|
+
width: iconWidth,
|
|
3776
|
+
color: activeState ? activeColor : color
|
|
3777
|
+
});
|
|
3778
|
+
}
|
|
3779
|
+
};
|
|
3780
|
+
return /*#__PURE__*/React$1.createElement(SagIconButtonWrapper, {
|
|
3781
|
+
className: className,
|
|
3782
|
+
height: height,
|
|
3783
|
+
color: activeState ? activeColor : color,
|
|
3784
|
+
backgroundColor: backgroundColor,
|
|
3785
|
+
disabled: disabled,
|
|
3786
|
+
onClick: event => {
|
|
3787
|
+
onClickHandler(event);
|
|
3788
|
+
}
|
|
3789
|
+
}, getIcon(iconName), buttonText && /*#__PURE__*/React$1.createElement(SpanText$1, null, buttonText));
|
|
3790
|
+
};
|
|
3791
|
+
SagIconButton.propTypes = {
|
|
3792
|
+
className: PropTypes.string,
|
|
3793
|
+
iconName: PropTypes.string,
|
|
3794
|
+
buttonText: PropTypes.string,
|
|
3795
|
+
height: PropTypes.string,
|
|
3796
|
+
color: PropTypes.string,
|
|
3797
|
+
backgroundColor: PropTypes.string,
|
|
3798
|
+
activeColor: PropTypes.string,
|
|
3799
|
+
iconHeight: PropTypes.number,
|
|
3800
|
+
iconWidth: PropTypes.number,
|
|
3801
|
+
openState: PropTypes.bool,
|
|
3802
|
+
disabled: PropTypes.bool,
|
|
3803
|
+
onButtonClick: PropTypes.func
|
|
3804
|
+
};
|
|
3805
|
+
SagIconButton.defaultProps = {
|
|
3806
|
+
className: '',
|
|
3807
|
+
iconName: 'filter',
|
|
3808
|
+
buttonText: 'Filter',
|
|
3809
|
+
height: '40px',
|
|
3810
|
+
color: '#212121',
|
|
3811
|
+
activeColor: '#229E38',
|
|
3812
|
+
backgroundColor: 'transparent',
|
|
3813
|
+
// '#E8F5EB',
|
|
3814
|
+
iconHeight: 12,
|
|
3815
|
+
iconWidth: 12,
|
|
3816
|
+
openState: false,
|
|
3817
|
+
disabled: false,
|
|
3818
|
+
onButtonClick: () => {}
|
|
3819
|
+
};
|
|
3820
|
+
|
|
3825
3821
|
const TabMenu = props => {
|
|
3826
3822
|
const {
|
|
3827
3823
|
activeColor,
|
|
@@ -3829,7 +3825,6 @@ const TabMenu = props => {
|
|
|
3829
3825
|
className,
|
|
3830
3826
|
color,
|
|
3831
3827
|
currentTab,
|
|
3832
|
-
headlineInsteadTabs,
|
|
3833
3828
|
headlineText,
|
|
3834
3829
|
inputWidth,
|
|
3835
3830
|
onFilterButtonClick,
|
|
@@ -3861,14 +3856,14 @@ const TabMenu = props => {
|
|
|
3861
3856
|
}, [currentTab]);
|
|
3862
3857
|
return /*#__PURE__*/React$1.createElement(TabMenuContainer, {
|
|
3863
3858
|
className: className
|
|
3864
|
-
}, /*#__PURE__*/React$1.createElement(TopRow, null, showFilterButton && /*#__PURE__*/React$1.createElement(
|
|
3859
|
+
}, /*#__PURE__*/React$1.createElement(TopRow, null, showFilterButton && /*#__PURE__*/React$1.createElement(SagIconButton, {
|
|
3865
3860
|
id: "filterButton",
|
|
3866
3861
|
iconName: "Filter",
|
|
3867
3862
|
buttonText: "",
|
|
3868
3863
|
openState: panelIsOpen,
|
|
3869
3864
|
activeColor: activeColor,
|
|
3870
3865
|
onButtonClick: onFilterButtonClick
|
|
3871
|
-
}),
|
|
3866
|
+
}), headlineText && headlineText !== '' ? /*#__PURE__*/React$1.createElement(Headline$1, null, headlineText) : /*#__PURE__*/React$1.createElement("nav", {
|
|
3872
3867
|
className: "Nav"
|
|
3873
3868
|
}, /*#__PURE__*/React$1.createElement(Tabs, {
|
|
3874
3869
|
className: "Tabs"
|
|
@@ -24000,22 +23995,21 @@ const DeleteIcon = styled.div`
|
|
|
24000
23995
|
position: absolute;
|
|
24001
23996
|
`;
|
|
24002
23997
|
|
|
24003
|
-
const QuickFilterDropdownSingle =
|
|
24004
|
-
|
|
24005
|
-
|
|
24006
|
-
|
|
24007
|
-
|
|
24008
|
-
|
|
24009
|
-
|
|
24010
|
-
|
|
24011
|
-
|
|
24012
|
-
|
|
24013
|
-
|
|
24014
|
-
|
|
24015
|
-
|
|
24016
|
-
|
|
24017
|
-
|
|
24018
|
-
} = _ref;
|
|
23998
|
+
const QuickFilterDropdownSingle = ({
|
|
23999
|
+
label,
|
|
24000
|
+
hoverColor,
|
|
24001
|
+
options,
|
|
24002
|
+
selectedValue,
|
|
24003
|
+
placeHolder,
|
|
24004
|
+
onChange,
|
|
24005
|
+
disabled,
|
|
24006
|
+
width,
|
|
24007
|
+
error,
|
|
24008
|
+
errorMessage,
|
|
24009
|
+
xIconShow,
|
|
24010
|
+
labelColor,
|
|
24011
|
+
showLabelOnTop
|
|
24012
|
+
}) => {
|
|
24019
24013
|
const [isFocused, setIsFocused] = useState(false);
|
|
24020
24014
|
const [showOptions, setShowOptions] = useState(false);
|
|
24021
24015
|
const [inputValue, setInputValue] = useState("");
|
|
@@ -30795,7 +30789,7 @@ const BubbleChart = _ref => {
|
|
|
30795
30789
|
onMouseMove: handleChartMouseMove,
|
|
30796
30790
|
cursor: curosrMouse,
|
|
30797
30791
|
margin: {
|
|
30798
|
-
top:
|
|
30792
|
+
top: 100,
|
|
30799
30793
|
right: 190,
|
|
30800
30794
|
bottom: 50,
|
|
30801
30795
|
left: 180
|