@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
package/dist/ui.esm.js
CHANGED
|
@@ -2852,7 +2852,7 @@ var StyledSwitchThumb = /*#__PURE__*/styled(Thumb, {
|
|
|
2852
2852
|
width: '18px',
|
|
2853
2853
|
height: '18px',
|
|
2854
2854
|
backgroundColor: '$neutrals500',
|
|
2855
|
-
transition: ' transform
|
|
2855
|
+
transition: ' transform 300ms',
|
|
2856
2856
|
borderRadius: '999999px',
|
|
2857
2857
|
willChange: 'transform',
|
|
2858
2858
|
'&[data-state="checked"]': {
|
|
@@ -2911,29 +2911,9 @@ function LiquiditySourceList(props) {
|
|
|
2911
2911
|
return item.title != clickedItem.title;
|
|
2912
2912
|
});
|
|
2913
2913
|
});
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
var liquiditySource = _ref.liquiditySource,
|
|
2918
|
-
selected = _ref.selected;
|
|
2919
|
-
return React__default.createElement(Button, {
|
|
2920
|
-
size: "large",
|
|
2921
|
-
align: "start",
|
|
2922
|
-
variant: "outlined",
|
|
2923
|
-
prefix: React__default.createElement(LiquidityImage, {
|
|
2924
|
-
src: liquiditySource.logo
|
|
2925
|
-
}),
|
|
2926
|
-
suffix: React__default.createElement(Switch, {
|
|
2927
|
-
checked: selected
|
|
2928
|
-
}),
|
|
2929
|
-
style: {
|
|
2930
|
-
marginBottom: '12px'
|
|
2931
|
-
},
|
|
2932
|
-
type: selected ? 'primary' : undefined,
|
|
2933
|
-
onClick: changeLiquiditySources.bind(null, liquiditySource)
|
|
2934
|
-
}, React__default.createElement(Typography, {
|
|
2935
|
-
variant: "body1"
|
|
2936
|
-
}, liquiditySource.title));
|
|
2914
|
+
setTimeout(function () {
|
|
2915
|
+
onChange(clickedItem);
|
|
2916
|
+
}, 200);
|
|
2937
2917
|
};
|
|
2938
2918
|
var isSelected = function isSelected(liquiditySource) {
|
|
2939
2919
|
return !!selected.find(function (item) {
|
|
@@ -2953,7 +2933,8 @@ function LiquiditySourceList(props) {
|
|
|
2953
2933
|
return React__default.createElement(LiquiditySourceItem, {
|
|
2954
2934
|
liquiditySource: liquiditySource,
|
|
2955
2935
|
key: index,
|
|
2956
|
-
selected: isSelected(liquiditySource)
|
|
2936
|
+
selected: isSelected(liquiditySource),
|
|
2937
|
+
onChange: changeLiquiditySources
|
|
2957
2938
|
});
|
|
2958
2939
|
})), React__default.createElement("div", null, React__default.createElement(LiquiditySourceType, {
|
|
2959
2940
|
variant: "h5"
|
|
@@ -2964,10 +2945,34 @@ function LiquiditySourceList(props) {
|
|
|
2964
2945
|
return React__default.createElement(LiquiditySourceItem, {
|
|
2965
2946
|
liquiditySource: liquiditySource,
|
|
2966
2947
|
key: index,
|
|
2967
|
-
selected: isSelected(liquiditySource)
|
|
2948
|
+
selected: isSelected(liquiditySource),
|
|
2949
|
+
onChange: changeLiquiditySources
|
|
2968
2950
|
});
|
|
2969
2951
|
})));
|
|
2970
2952
|
}
|
|
2953
|
+
var LiquiditySourceItem = function LiquiditySourceItem(_ref) {
|
|
2954
|
+
var liquiditySource = _ref.liquiditySource,
|
|
2955
|
+
selected = _ref.selected,
|
|
2956
|
+
onChange = _ref.onChange;
|
|
2957
|
+
return React__default.createElement(Button, {
|
|
2958
|
+
size: "large",
|
|
2959
|
+
align: "start",
|
|
2960
|
+
variant: "outlined",
|
|
2961
|
+
prefix: React__default.createElement(LiquidityImage, {
|
|
2962
|
+
src: liquiditySource.logo
|
|
2963
|
+
}),
|
|
2964
|
+
suffix: React__default.createElement(Switch, {
|
|
2965
|
+
checked: selected
|
|
2966
|
+
}),
|
|
2967
|
+
style: {
|
|
2968
|
+
marginBottom: '12px'
|
|
2969
|
+
},
|
|
2970
|
+
type: selected ? 'primary' : undefined,
|
|
2971
|
+
onClick: onChange.bind(null, liquiditySource)
|
|
2972
|
+
}, React__default.createElement(Typography, {
|
|
2973
|
+
variant: "body1"
|
|
2974
|
+
}, liquiditySource.title));
|
|
2975
|
+
};
|
|
2971
2976
|
|
|
2972
2977
|
var filterLiquiditySources = function filterLiquiditySources(liquiditySources, searchedFor) {
|
|
2973
2978
|
return liquiditySources.filter(function (liquiditySource) {
|