@rango-dev/ui 0.1.10-next.72 → 0.1.10-next.74
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/ui.cjs.development.js +31 -26
- package/dist/ui.cjs.development.js.map +1 -1
- package/dist/ui.cjs.production.min.js +1 -1
- package/dist/ui.cjs.production.min.js.map +1 -1
- package/dist/ui.esm.js +31 -26
- package/dist/ui.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/components/LiquiditySourceList/LiquiditySourceList.tsx +31 -25
- package/src/components/Switch/Switch.tsx +1 -1
|
@@ -2858,7 +2858,7 @@ var StyledSwitchThumb = /*#__PURE__*/styled(RadixSwitch.Thumb, {
|
|
|
2858
2858
|
width: '18px',
|
|
2859
2859
|
height: '18px',
|
|
2860
2860
|
backgroundColor: '$neutrals500',
|
|
2861
|
-
transition: ' transform
|
|
2861
|
+
transition: ' transform 300ms',
|
|
2862
2862
|
borderRadius: '999999px',
|
|
2863
2863
|
willChange: 'transform',
|
|
2864
2864
|
'&[data-state="checked"]': {
|
|
@@ -2917,29 +2917,9 @@ function LiquiditySourceList(props) {
|
|
|
2917
2917
|
return item.title != clickedItem.title;
|
|
2918
2918
|
});
|
|
2919
2919
|
});
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
var liquiditySource = _ref.liquiditySource,
|
|
2924
|
-
selected = _ref.selected;
|
|
2925
|
-
return React__default.createElement(Button, {
|
|
2926
|
-
size: "large",
|
|
2927
|
-
align: "start",
|
|
2928
|
-
variant: "outlined",
|
|
2929
|
-
prefix: React__default.createElement(LiquidityImage, {
|
|
2930
|
-
src: liquiditySource.logo
|
|
2931
|
-
}),
|
|
2932
|
-
suffix: React__default.createElement(Switch, {
|
|
2933
|
-
checked: selected
|
|
2934
|
-
}),
|
|
2935
|
-
style: {
|
|
2936
|
-
marginBottom: '12px'
|
|
2937
|
-
},
|
|
2938
|
-
type: selected ? 'primary' : undefined,
|
|
2939
|
-
onClick: changeLiquiditySources.bind(null, liquiditySource)
|
|
2940
|
-
}, React__default.createElement(Typography, {
|
|
2941
|
-
variant: "body1"
|
|
2942
|
-
}, liquiditySource.title));
|
|
2920
|
+
setTimeout(function () {
|
|
2921
|
+
onChange(clickedItem);
|
|
2922
|
+
}, 200);
|
|
2943
2923
|
};
|
|
2944
2924
|
var isSelected = function isSelected(liquiditySource) {
|
|
2945
2925
|
return !!selected.find(function (item) {
|
|
@@ -2959,7 +2939,8 @@ function LiquiditySourceList(props) {
|
|
|
2959
2939
|
return React__default.createElement(LiquiditySourceItem, {
|
|
2960
2940
|
liquiditySource: liquiditySource,
|
|
2961
2941
|
key: index,
|
|
2962
|
-
selected: isSelected(liquiditySource)
|
|
2942
|
+
selected: isSelected(liquiditySource),
|
|
2943
|
+
onChange: changeLiquiditySources
|
|
2963
2944
|
});
|
|
2964
2945
|
})), React__default.createElement("div", null, React__default.createElement(LiquiditySourceType, {
|
|
2965
2946
|
variant: "h5"
|
|
@@ -2970,10 +2951,34 @@ function LiquiditySourceList(props) {
|
|
|
2970
2951
|
return React__default.createElement(LiquiditySourceItem, {
|
|
2971
2952
|
liquiditySource: liquiditySource,
|
|
2972
2953
|
key: index,
|
|
2973
|
-
selected: isSelected(liquiditySource)
|
|
2954
|
+
selected: isSelected(liquiditySource),
|
|
2955
|
+
onChange: changeLiquiditySources
|
|
2974
2956
|
});
|
|
2975
2957
|
})));
|
|
2976
2958
|
}
|
|
2959
|
+
var LiquiditySourceItem = function LiquiditySourceItem(_ref) {
|
|
2960
|
+
var liquiditySource = _ref.liquiditySource,
|
|
2961
|
+
selected = _ref.selected,
|
|
2962
|
+
onChange = _ref.onChange;
|
|
2963
|
+
return React__default.createElement(Button, {
|
|
2964
|
+
size: "large",
|
|
2965
|
+
align: "start",
|
|
2966
|
+
variant: "outlined",
|
|
2967
|
+
prefix: React__default.createElement(LiquidityImage, {
|
|
2968
|
+
src: liquiditySource.logo
|
|
2969
|
+
}),
|
|
2970
|
+
suffix: React__default.createElement(Switch, {
|
|
2971
|
+
checked: selected
|
|
2972
|
+
}),
|
|
2973
|
+
style: {
|
|
2974
|
+
marginBottom: '12px'
|
|
2975
|
+
},
|
|
2976
|
+
type: selected ? 'primary' : undefined,
|
|
2977
|
+
onClick: onChange.bind(null, liquiditySource)
|
|
2978
|
+
}, React__default.createElement(Typography, {
|
|
2979
|
+
variant: "body1"
|
|
2980
|
+
}, liquiditySource.title));
|
|
2981
|
+
};
|
|
2977
2982
|
|
|
2978
2983
|
var filterLiquiditySources = function filterLiquiditySources(liquiditySources, searchedFor) {
|
|
2979
2984
|
return liquiditySources.filter(function (liquiditySource) {
|