@ssa-ui-kit/templates 2.28.3 → 2.29.0
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.js +239 -3
- package/dist/index.js.map +1 -1
- package/dist/projects/fintech/components/MarginInfo/MarginInfo.d.ts +5 -0
- package/dist/projects/fintech/components/MarginInfo/index.d.ts +2 -0
- package/dist/projects/fintech/components/MarginInfo/styles.d.ts +60 -0
- package/dist/projects/fintech/components/MarginInfo/types.d.ts +17 -0
- package/dist/projects/fintech/components/index.d.ts +1 -0
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -4073,6 +4073,205 @@ const KeeperRunsWithLoader = ({
|
|
|
4073
4073
|
...props
|
|
4074
4074
|
})
|
|
4075
4075
|
});
|
|
4076
|
+
;// ./src/projects/fintech/components/MarginInfo/styles.ts
|
|
4077
|
+
|
|
4078
|
+
function MarginInfo_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
4079
|
+
|
|
4080
|
+
|
|
4081
|
+
const Table = /*#__PURE__*/base_default()("div", true ? {
|
|
4082
|
+
target: "e1squpxt10"
|
|
4083
|
+
} : 0)( true ? {
|
|
4084
|
+
name: "b6wrti",
|
|
4085
|
+
styles: "display:flex;flex-direction:column;width:100%"
|
|
4086
|
+
} : 0);
|
|
4087
|
+
const TableHeader = /*#__PURE__*/base_default()("div", true ? {
|
|
4088
|
+
target: "e1squpxt9"
|
|
4089
|
+
} : 0)( true ? {
|
|
4090
|
+
name: "261bi6",
|
|
4091
|
+
styles: "display:flex;flex-direction:row;align-items:center;margin-bottom:5px"
|
|
4092
|
+
} : 0);
|
|
4093
|
+
const HeaderRow = /*#__PURE__*/base_default()("div", true ? {
|
|
4094
|
+
target: "e1squpxt8"
|
|
4095
|
+
} : 0)( true ? {
|
|
4096
|
+
name: "1cdny4y",
|
|
4097
|
+
styles: "display:flex;flex-direction:row;gap:16px;flex:1;justify-content:flex-start"
|
|
4098
|
+
} : 0);
|
|
4099
|
+
const HeaderLabel = /*#__PURE__*/base_default()("div", true ? {
|
|
4100
|
+
target: "e1squpxt7"
|
|
4101
|
+
} : 0)( true ? {
|
|
4102
|
+
name: "82a6rk",
|
|
4103
|
+
styles: "flex:1"
|
|
4104
|
+
} : 0);
|
|
4105
|
+
const HeaderCell = /*#__PURE__*/base_default()("div", true ? {
|
|
4106
|
+
target: "e1squpxt6"
|
|
4107
|
+
} : 0)("font-size:14px;font-weight:600;color:", ({
|
|
4108
|
+
theme
|
|
4109
|
+
}) => theme.colors.greyDarker, ";flex:1;text-align:left;margin-right:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" + ( true ? "" : 0));
|
|
4110
|
+
const TableBody = /*#__PURE__*/base_default()("div", true ? {
|
|
4111
|
+
target: "e1squpxt5"
|
|
4112
|
+
} : 0)( true ? {
|
|
4113
|
+
name: "1xc5zxn",
|
|
4114
|
+
styles: "display:flex;flex-direction:column;gap:6px"
|
|
4115
|
+
} : 0);
|
|
4116
|
+
const TableRow = /*#__PURE__*/base_default()("div", true ? {
|
|
4117
|
+
target: "e1squpxt4"
|
|
4118
|
+
} : 0)("display:flex;flex-direction:row;align-items:center;background:", ({
|
|
4119
|
+
theme
|
|
4120
|
+
}) => theme.colors.greyLighter, ";border-radius:8px;padding:5px 7px;" + ( true ? "" : 0));
|
|
4121
|
+
const RowLabel = /*#__PURE__*/base_default()("div", true ? {
|
|
4122
|
+
target: "e1squpxt3"
|
|
4123
|
+
} : 0)("font-size:13px;font-weight:600;color:", ({
|
|
4124
|
+
theme
|
|
4125
|
+
}) => theme.colors.greyDarker, ";flex:1;" + ( true ? "" : 0));
|
|
4126
|
+
const RowCells = /*#__PURE__*/base_default()("div", true ? {
|
|
4127
|
+
target: "e1squpxt2"
|
|
4128
|
+
} : 0)( true ? {
|
|
4129
|
+
name: "z08xak",
|
|
4130
|
+
styles: "display:flex;flex-direction:row;gap:16px;flex:2;justify-content:flex-start"
|
|
4131
|
+
} : 0);
|
|
4132
|
+
const Cell = /*#__PURE__*/base_default()("div", true ? {
|
|
4133
|
+
target: "e1squpxt1"
|
|
4134
|
+
} : 0)("font-size:13px;font-weight:400;color:", ({
|
|
4135
|
+
theme
|
|
4136
|
+
}) => theme.colors.greyDarker, ";flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" + ( true ? "" : 0));
|
|
4137
|
+
const ButtonsWrapper = /*#__PURE__*/base_default()(core_namespaceObject.Wrapper, true ? {
|
|
4138
|
+
target: "e1squpxt0"
|
|
4139
|
+
} : 0)( true ? {
|
|
4140
|
+
name: "1qxwwz4",
|
|
4141
|
+
styles: "display:flex;flex-direction:row;gap:12px;width:100%;margin-top:auto"
|
|
4142
|
+
} : 0);
|
|
4143
|
+
const baseButtonStyles = theme => /*#__PURE__*/(0,react_namespaceObject.css)("flex:1;display:flex;justify-content:center;height:34px;font-size:14px;font-weight:500;color:", theme.colors.white, ";border:none;border-radius:8px;cursor:pointer;&:disabled{background:", theme.colors.grey, ";cursor:not-allowed;}&>span,&>*{color:inherit;}" + ( true ? "" : 0), true ? "" : 0);
|
|
4144
|
+
const BorrowButton = theme => /*#__PURE__*/(0,react_namespaceObject.css)(baseButtonStyles(theme), ";background:linear-gradient(\n 247deg,\n ", theme.colors.blueLighter, " 14.71%,\n ", theme.colors.blue, " 85.29%\n );&:hover{background:linear-gradient(\n 247deg,\n ", theme.colors.blueButtonHoverGradientFrom, " 14.71%,\n ", theme.colors.blueButtonHoverGradientTo, " 85.29%\n );box-shadow:0 4px 12px ", theme.colors.blueLighter40, ";}&:active{background:", theme.colors.blueButtonActive, ";}" + ( true ? "" : 0), true ? "" : 0);
|
|
4145
|
+
const RepayButton = theme => /*#__PURE__*/(0,react_namespaceObject.css)(baseButtonStyles(theme), ";background:linear-gradient(\n 99.26deg,\n ", theme.colors.green, " -7.01%,\n ", theme.colors.greenLighter, " 92.87%\n );&:hover{background:linear-gradient(\n 99.26deg,\n ", theme.colors.greenDark, " -7.01%,\n ", theme.colors.green, " 92.87%\n );box-shadow:0 4px 12px ", theme.colors.green40, ";}&:active{background:", theme.colors.greenDark, ";}" + ( true ? "" : 0), true ? "" : 0);
|
|
4146
|
+
const widgetCardStyles = true ? {
|
|
4147
|
+
name: "1fx6k7",
|
|
4148
|
+
styles: "grid-area:margin-info"
|
|
4149
|
+
} : 0;
|
|
4150
|
+
const wrapperStyles = true ? {
|
|
4151
|
+
name: "1fx6k7",
|
|
4152
|
+
styles: "grid-area:margin-info"
|
|
4153
|
+
} : 0;
|
|
4154
|
+
const headerStyles = true ? {
|
|
4155
|
+
name: "1ykowef",
|
|
4156
|
+
styles: "margin-bottom:0"
|
|
4157
|
+
} : 0;
|
|
4158
|
+
const contentStyles = true ? {
|
|
4159
|
+
name: "4rbiyk",
|
|
4160
|
+
styles: "display:flex;flex-direction:column;max-width:initial;height:100%"
|
|
4161
|
+
} : 0;
|
|
4162
|
+
;// ./src/projects/fintech/components/MarginInfo/MarginInfo.tsx
|
|
4163
|
+
function MarginInfo_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
4164
|
+
|
|
4165
|
+
|
|
4166
|
+
|
|
4167
|
+
|
|
4168
|
+
|
|
4169
|
+
|
|
4170
|
+
const MarginInfo = ({
|
|
4171
|
+
multiplier,
|
|
4172
|
+
base,
|
|
4173
|
+
quote,
|
|
4174
|
+
baseBorrowed,
|
|
4175
|
+
baseInterestRate,
|
|
4176
|
+
baseTotalInterest,
|
|
4177
|
+
quoteBorrowed,
|
|
4178
|
+
quoteInterestRate,
|
|
4179
|
+
quoteTotalInterest,
|
|
4180
|
+
showInterestRate = false,
|
|
4181
|
+
disableBorrow = false,
|
|
4182
|
+
disableRepay = false,
|
|
4183
|
+
onBorrow,
|
|
4184
|
+
onRepay
|
|
4185
|
+
}) => {
|
|
4186
|
+
const {
|
|
4187
|
+
t
|
|
4188
|
+
} = useTranslation();
|
|
4189
|
+
const theme = (0,react_namespaceObject.useTheme)();
|
|
4190
|
+
const title = multiplier ? `${t('marginInfo.title')} (x${multiplier})` : t('marginInfo.title');
|
|
4191
|
+
return (0,jsx_runtime_namespaceObject.jsx)(react_namespaceObject.ClassNames, {
|
|
4192
|
+
children: ({
|
|
4193
|
+
css
|
|
4194
|
+
}) => (0,jsx_runtime_namespaceObject.jsxs)(WidgetCard, {
|
|
4195
|
+
title: title,
|
|
4196
|
+
css: widgetCardStyles,
|
|
4197
|
+
wrapperClassName: css(wrapperStyles),
|
|
4198
|
+
headerClassName: css(headerStyles),
|
|
4199
|
+
contentClassName: css(contentStyles),
|
|
4200
|
+
children: [(0,jsx_runtime_namespaceObject.jsxs)(Table, {
|
|
4201
|
+
children: [(0,jsx_runtime_namespaceObject.jsx)(TableHeader, {
|
|
4202
|
+
children: (0,jsx_runtime_namespaceObject.jsxs)(HeaderRow, {
|
|
4203
|
+
children: [(0,jsx_runtime_namespaceObject.jsx)(HeaderLabel, {}), (0,jsx_runtime_namespaceObject.jsx)(HeaderCell, {
|
|
4204
|
+
children: base
|
|
4205
|
+
}), (0,jsx_runtime_namespaceObject.jsx)(HeaderCell, {
|
|
4206
|
+
children: quote
|
|
4207
|
+
})]
|
|
4208
|
+
})
|
|
4209
|
+
}), (0,jsx_runtime_namespaceObject.jsxs)(TableBody, {
|
|
4210
|
+
children: [(0,jsx_runtime_namespaceObject.jsxs)(TableRow, {
|
|
4211
|
+
children: [(0,jsx_runtime_namespaceObject.jsx)(RowLabel, {
|
|
4212
|
+
children: "Borrowed"
|
|
4213
|
+
}), (0,jsx_runtime_namespaceObject.jsxs)(RowCells, {
|
|
4214
|
+
children: [(0,jsx_runtime_namespaceObject.jsx)(Cell, {
|
|
4215
|
+
children: baseBorrowed
|
|
4216
|
+
}), (0,jsx_runtime_namespaceObject.jsx)(Cell, {
|
|
4217
|
+
children: quoteBorrowed
|
|
4218
|
+
})]
|
|
4219
|
+
})]
|
|
4220
|
+
}), showInterestRate && (0,jsx_runtime_namespaceObject.jsxs)(TableRow, {
|
|
4221
|
+
children: [(0,jsx_runtime_namespaceObject.jsx)(RowLabel, {
|
|
4222
|
+
children: "Interest Rate"
|
|
4223
|
+
}), (0,jsx_runtime_namespaceObject.jsxs)(RowCells, {
|
|
4224
|
+
children: [(0,jsx_runtime_namespaceObject.jsx)(Cell, {
|
|
4225
|
+
children: baseInterestRate
|
|
4226
|
+
}), (0,jsx_runtime_namespaceObject.jsx)(Cell, {
|
|
4227
|
+
children: quoteInterestRate
|
|
4228
|
+
})]
|
|
4229
|
+
})]
|
|
4230
|
+
}), (0,jsx_runtime_namespaceObject.jsxs)(TableRow, {
|
|
4231
|
+
children: [(0,jsx_runtime_namespaceObject.jsx)(RowLabel, {
|
|
4232
|
+
children: "Total Interest"
|
|
4233
|
+
}), (0,jsx_runtime_namespaceObject.jsxs)(RowCells, {
|
|
4234
|
+
children: [(0,jsx_runtime_namespaceObject.jsx)(Cell, {
|
|
4235
|
+
children: baseTotalInterest
|
|
4236
|
+
}), (0,jsx_runtime_namespaceObject.jsx)(Cell, {
|
|
4237
|
+
children: quoteTotalInterest
|
|
4238
|
+
})]
|
|
4239
|
+
})]
|
|
4240
|
+
})]
|
|
4241
|
+
})]
|
|
4242
|
+
}), (0,jsx_runtime_namespaceObject.jsxs)(ButtonsWrapper, {
|
|
4243
|
+
children: [(0,jsx_runtime_namespaceObject.jsx)(core_namespaceObject.Button, {
|
|
4244
|
+
variant: "custom",
|
|
4245
|
+
css: BorrowButton(theme),
|
|
4246
|
+
onClick: onBorrow,
|
|
4247
|
+
isDisabled: disableBorrow || !onBorrow,
|
|
4248
|
+
text: "Borrow"
|
|
4249
|
+
}), (0,jsx_runtime_namespaceObject.jsx)(core_namespaceObject.Button, {
|
|
4250
|
+
variant: "custom",
|
|
4251
|
+
css: RepayButton(theme),
|
|
4252
|
+
onClick: onRepay,
|
|
4253
|
+
isDisabled: disableRepay || !onRepay,
|
|
4254
|
+
text: "Repay"
|
|
4255
|
+
})]
|
|
4256
|
+
})]
|
|
4257
|
+
})
|
|
4258
|
+
});
|
|
4259
|
+
};
|
|
4260
|
+
var MarginInfo_ref = true ? {
|
|
4261
|
+
name: "1fx6k7",
|
|
4262
|
+
styles: "grid-area:margin-info"
|
|
4263
|
+
} : 0;
|
|
4264
|
+
const MarginInfoWithLoader = ({
|
|
4265
|
+
isFetching,
|
|
4266
|
+
...props
|
|
4267
|
+
}) => (0,jsx_runtime_namespaceObject.jsx)(WithWidgetLoader, {
|
|
4268
|
+
title: 'marginInfo.title',
|
|
4269
|
+
css: MarginInfo_ref,
|
|
4270
|
+
isFetching: isFetching,
|
|
4271
|
+
children: (0,jsx_runtime_namespaceObject.jsx)(MarginInfo, {
|
|
4272
|
+
...props
|
|
4273
|
+
})
|
|
4274
|
+
});
|
|
4076
4275
|
;// ./src/projects/fintech/pages/BotPage/components/InformationTab/styles.ts
|
|
4077
4276
|
|
|
4078
4277
|
const infoCardWrapper = theme => /*#__PURE__*/(0,react_namespaceObject.css)("position:relative;display:flex;flex-direction:column;align-items:flex-start;width:max-content;min-width:100%;background:", theme.colors.greyLighter, ";padding:4px 10px;border-radius:6px;text-decoration:none;cursor:pointer;white-space:nowrap;box-shadow:none;user-select:none;&::before{position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%;box-shadow:0 10px 40px 0 ", theme.colors.greyShadow, ";content:'';}&:active{background:", theme.colors.white, ";&::before{border-radius:6px;box-shadow:0 10px 40px 0 ", theme.colors.greyShadow24, ";}}" + ( true ? "" : 0), true ? "" : 0);
|
|
@@ -8037,9 +8236,9 @@ const WidgetsCustomLayoutTemplate = /*#__PURE__*/(/* unused pure expression or s
|
|
|
8037
8236
|
|
|
8038
8237
|
const WidgetLayoutDashboard = /*#__PURE__*/base_default()(WidgetsLayoutTemplate, true ? {
|
|
8039
8238
|
target: "e1uw7r3m0"
|
|
8040
|
-
} : 0)("grid-template-rows:repeat(12, 215px);grid-template-areas:'balance balance' 'max max' 'funds-place-order roles' 'hourly bots' 'weighted-mean-prices-btc weighted-mean-prices-eth' 'orders orders' 'turnover turnover' 'pnl pnl' 'cumulative cumulative' 'rebalancing rebalancing' 'positions profitability' 'keeper-runs
|
|
8239
|
+
} : 0)("grid-template-rows:repeat(12, 215px);grid-template-areas:'balance balance' 'max max' 'funds-place-order roles' 'hourly bots' 'weighted-mean-prices-btc weighted-mean-prices-eth' 'orders orders' 'turnover turnover' 'pnl pnl' 'cumulative cumulative' 'rebalancing rebalancing' 'positions profitability' 'keeper-runs margin-info';", ({
|
|
8041
8240
|
theme
|
|
8042
|
-
}) => theme.mediaQueries.md, "{grid-template-columns:calc(36% - 7px) calc(14% - 7px) calc(25% - 7px) calc(25% - 7px);grid-template-rows:repeat(6, 215px);grid-template-areas:'balance max funds-place-order roles' 'hourly bots weighted-mean-prices-btc weighted-mean-prices-eth' 'orders orders pnl pnl' 'turnover turnover cumulative cumulative' 'rebalancing rebalancing positions profitability' 'keeper-runs keeper-runs
|
|
8241
|
+
}) => theme.mediaQueries.md, "{grid-template-columns:calc(36% - 7px) calc(14% - 7px) calc(25% - 7px) calc(25% - 7px);grid-template-rows:repeat(6, 215px);grid-template-areas:'balance max funds-place-order roles' 'hourly bots weighted-mean-prices-btc weighted-mean-prices-eth' 'orders orders pnl pnl' 'turnover turnover cumulative cumulative' 'rebalancing rebalancing positions profitability' 'keeper-runs keeper-runs margin-info margin-info';margin-bottom:20px;}" + ( true ? "" : 0));
|
|
8043
8242
|
;// ./src/projects/fintech/pages/Dashboard/FinTechDashboard.tsx
|
|
8044
8243
|
function FinTechDashboard_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
8045
8244
|
|
|
@@ -8318,7 +8517,44 @@ const FinTechDashboard = () => {
|
|
|
8318
8517
|
data: graphsData,
|
|
8319
8518
|
period: period,
|
|
8320
8519
|
isFetching: isGraphStatLoading
|
|
8321
|
-
}, "keeperRuns")
|
|
8520
|
+
}, "keeperRuns"), (0,jsx_runtime_namespaceObject.jsx)(MarginInfoWithLoader, {
|
|
8521
|
+
multiplier: 3,
|
|
8522
|
+
base: "USDT",
|
|
8523
|
+
quote: "BTC",
|
|
8524
|
+
baseBorrowed: (0,jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
8525
|
+
children: ["100 ", (0,jsx_runtime_namespaceObject.jsx)("strong", {
|
|
8526
|
+
children: "USD"
|
|
8527
|
+
}), " \u22480.000000001 ", (0,jsx_runtime_namespaceObject.jsx)("strong", {
|
|
8528
|
+
children: "BTC"
|
|
8529
|
+
}), " (x2)"]
|
|
8530
|
+
}),
|
|
8531
|
+
baseInterestRate: "5.2%",
|
|
8532
|
+
baseTotalInterest: (0,jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
8533
|
+
children: ["25 ", (0,jsx_runtime_namespaceObject.jsx)("strong", {
|
|
8534
|
+
children: "USDT"
|
|
8535
|
+
}), " (x1.5)"]
|
|
8536
|
+
}),
|
|
8537
|
+
quoteBorrowed: (0,jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
8538
|
+
children: ["\u22480.000000001 ", (0,jsx_runtime_namespaceObject.jsx)("strong", {
|
|
8539
|
+
children: "BTC"
|
|
8540
|
+
})]
|
|
8541
|
+
}),
|
|
8542
|
+
quoteInterestRate: "4.8%",
|
|
8543
|
+
quoteTotalInterest: (0,jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
8544
|
+
children: ["0.0024 ", (0,jsx_runtime_namespaceObject.jsx)("strong", {
|
|
8545
|
+
children: "BTC"
|
|
8546
|
+
})]
|
|
8547
|
+
}),
|
|
8548
|
+
disableBorrow: false,
|
|
8549
|
+
disableRepay: false,
|
|
8550
|
+
onBorrow: () => {
|
|
8551
|
+
alert('Borrow action triggered');
|
|
8552
|
+
},
|
|
8553
|
+
onRepay: () => {
|
|
8554
|
+
alert('Repay action triggered');
|
|
8555
|
+
},
|
|
8556
|
+
isFetching: isStatLoading
|
|
8557
|
+
})]
|
|
8322
8558
|
})]
|
|
8323
8559
|
});
|
|
8324
8560
|
};
|