@ssa-ui-kit/templates 2.29.0 → 2.30.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 CHANGED
@@ -4073,92 +4073,6 @@ 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
4076
  ;// ./src/projects/fintech/components/MarginInfo/MarginInfo.tsx
4163
4077
  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
4078
 
@@ -4166,112 +4080,46 @@ function MarginInfo_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to
4166
4080
 
4167
4081
 
4168
4082
 
4169
-
4170
- const MarginInfo = ({
4083
+ var MarginInfo_ref = true ? {
4084
+ name: "1fx6k7",
4085
+ styles: "grid-area:margin-info"
4086
+ } : 0;
4087
+ const MarginInfoWithLoader = ({
4088
+ isFetching,
4171
4089
  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
4090
+ ...props
4185
4091
  }) => {
4092
+ const theme = (0,react_namespaceObject.useTheme)();
4186
4093
  const {
4187
4094
  t
4188
4095
  } = 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
- })]
4096
+ const baseTitle = t('marginInfo.title');
4097
+ const title = multiplier ? `${baseTitle} (x${multiplier})` : baseTitle;
4098
+ return (0,jsx_runtime_namespaceObject.jsx)(WithWidgetLoader, {
4099
+ title: 'marginInfo.title',
4100
+ css: MarginInfo_ref,
4101
+ isFetching: isFetching,
4102
+ children: (0,jsx_runtime_namespaceObject.jsx)(react_namespaceObject.ClassNames, {
4103
+ children: ({
4104
+ css
4105
+ }) => (0,jsx_runtime_namespaceObject.jsx)("div", {
4106
+ css: css({
4107
+ gridArea: 'margin-info'
4108
+ }),
4109
+ children: (0,jsx_runtime_namespaceObject.jsx)(widgets_namespaceObject.MarginInfo, {
4110
+ ...props,
4111
+ title: title,
4112
+ headerClassName: css({
4113
+ marginBottom: 0,
4114
+ [theme.mediaQueries.md]: {
4115
+ marginBottom: '0'
4116
+ }
4208
4117
  })
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
- })]
4118
+ })
4119
+ })
4257
4120
  })
4258
4121
  });
4259
4122
  };
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
- });
4275
4123
  ;// ./src/projects/fintech/pages/BotPage/components/InformationTab/styles.ts
4276
4124
 
4277
4125
  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);