@cryptofi/core-ui 0.19.0 → 0.21.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.
@@ -1,8 +1,8 @@
1
1
  import * as _chakra_ui_system_dist_system_types from '@chakra-ui/system/dist/system.types';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import { SVGProps } from 'react';
3
+ import { SVGProps, Dispatch, SetStateAction } from 'react';
4
4
  import { CurveType } from 'recharts/types/shape/Curve';
5
- import { CardProps, CheckboxProps, InputProps, ChakraComponent, SelectProps, TagProps, UseToastOptions } from '@chakra-ui/react';
5
+ import { CardProps, CheckboxProps, InputProps, ChakraComponent, FlexProps, SelectProps, TagProps, UseToastOptions } from '@chakra-ui/react';
6
6
  import { FieldValues, UseFormRegister } from 'react-hook-form';
7
7
 
8
8
  declare const SvgIconAlert: _chakra_ui_system_dist_system_types.ChakraComponent<(props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element, {}>;
@@ -202,28 +202,28 @@ declare const convertToUTCEpochTime: ({ timeString, toEndDate }: {
202
202
  type SignDisplay = 'auto' | 'always' | 'exceptZero' | 'never';
203
203
  /**
204
204
  *
205
- * @param amount - A finite number
205
+ * @param amount - Number or string to format
206
206
  * @param signDisplay - Setting for minus / plus sign, defaults to exceptZero
207
207
  * @param isDecimal - Is the number a percentage in its decimal form? defaults to true
208
208
  */
209
209
  declare const formatPercentage: ({ number, signDisplay, isDecimal, }: {
210
- number: number;
210
+ number: number | string;
211
211
  signDisplay?: SignDisplay | undefined;
212
212
  isDecimal?: boolean | undefined;
213
- }) => string;
213
+ }) => string | number;
214
214
  //# sourceMappingURL=formatPercentage.d.ts.map
215
215
 
216
216
  /**
217
217
  *
218
- * @param amount - A finite number
218
+ * @param amount - Number or string to format
219
219
  * @param precision - The number of decimals to display
220
220
  * @signDisplay - Whether to display a plus sign for positive amounts
221
221
  */
222
222
  declare const formatUSD: ({ amount, precision, signDisplay, }: {
223
- amount: number;
223
+ amount: number | string;
224
224
  precision?: number | undefined;
225
225
  signDisplay?: boolean | undefined;
226
- }) => string;
226
+ }) => string | number;
227
227
  //# sourceMappingURL=formatUSD.d.ts.map
228
228
 
229
229
  /**
@@ -236,8 +236,8 @@ declare const getDelta: ({ data, dataKey }: {
236
236
  data: any[] | undefined;
237
237
  dataKey: string;
238
238
  }) => {
239
- startingAmount: any;
240
- endingAmount: any;
239
+ startingAmount: number;
240
+ endingAmount: number;
241
241
  delta: number;
242
242
  percentChange: number;
243
243
  isNetGain: boolean;
@@ -257,7 +257,7 @@ declare const uiColors: {
257
257
  };
258
258
  //# sourceMappingURL=uiColors.d.ts.map
259
259
 
260
- declare const CfAreaChart: ({ data, dataKey, width, height, areaType, showTooltip, isAnimated, }: {
260
+ declare const CfAreaChart: ({ data, dataKey, width, height, areaType, showTooltip, isAnimated, formatter, }: {
261
261
  data: any[] | undefined;
262
262
  dataKey: string;
263
263
  width?: string | undefined;
@@ -265,6 +265,7 @@ declare const CfAreaChart: ({ data, dataKey, width, height, areaType, showToolti
265
265
  areaType?: CurveType | undefined;
266
266
  showTooltip?: boolean | undefined;
267
267
  isAnimated?: boolean | undefined;
268
+ formatter?: ((value: number) => string) | undefined;
268
269
  }) => react_jsx_runtime.JSX.Element;
269
270
  //# sourceMappingURL=AreaChart.d.ts.map
270
271
 
@@ -305,6 +306,22 @@ declare const CfLineChart: ({ data, dataKey, width, height, lineType, showToolti
305
306
  }) => react_jsx_runtime.JSX.Element;
306
307
  //# sourceMappingURL=LineChart.d.ts.map
307
308
 
309
+ interface LastEvaluatedKeyParams {
310
+ lastEvaluatedPKey?: string;
311
+ lastEvaluatedSKey?: string;
312
+ }
313
+ interface LastEvaluatedKey {
314
+ pKey: string;
315
+ sKey: string;
316
+ }
317
+ interface PaginationProps extends FlexProps {
318
+ setLastEvaluatedKeyParams: Dispatch<SetStateAction<LastEvaluatedKeyParams | undefined>>;
319
+ isLoading?: boolean;
320
+ hasMore?: boolean;
321
+ lastEvaluatedKey?: LastEvaluatedKey;
322
+ }
323
+ declare const Pagination: ({ isLoading, hasMore, setLastEvaluatedKeyParams, lastEvaluatedKey, ...rest }: PaginationProps) => react_jsx_runtime.JSX.Element;
324
+
308
325
  interface CfSelectProps<T extends FieldValues> extends SelectProps {
309
326
  register?: UseFormRegister<T>;
310
327
  errorMessage?: string;
@@ -330,4 +347,4 @@ interface CfToastProps extends UseToastOptions {
330
347
  }
331
348
  declare const CfToast: (props: CfToastProps) => react_jsx_runtime.JSX.Element;
332
349
 
333
- export { CfAreaChart, CfBreakpointDebugger, CfCard, CfCheckbox, type CfCheckboxProps, CfInput, type CfInputProps, CfLineChart, CfSelect, type CfSelectOption, type CfSelectProps, CfTag, type CfTagProps, CfToast, SvgIconAlert as IconAlert, SvgIconArrowDown as IconArrowDown, SvgIconArrowUp as IconArrowUp, SvgIconAvax as IconAvax, SvgIconBank as IconBank, SvgIconBarChart as IconBarChart, SvgIconBch as IconBch, SvgIconBtc as IconBtc, SvgIconCalendar as IconCalendar, SvgIconCaretDown as IconCaretDown, SvgIconCaretLeft as IconCaretLeft, SvgIconCaretRight as IconCaretRight, SvgIconCaretUp as IconCaretUp, SvgIconCent as IconCent, SvgIconCheck as IconCheck, SvgIconChecking as IconChecking, SvgIconClose as IconClose, SvgIconConnect as IconConnect, SvgIconCopy as IconCopy, SvgIconDollar as IconDollar, SvgIconDownload as IconDownload, SvgIconEdit as IconEdit, SvgIconEnter as IconEnter, SvgIconEnterInverted as IconEnterInverted, SvgIconEth as IconEth, SvgIconExchange as IconExchange, SvgIconFilter as IconFilter, SvgIconHelp as IconHelp, SvgIconHistory as IconHistory, SvgIconHome as IconHome, SvgIconIndicatorDown as IconIndicatorDown, SvgIconIndicatorUp as IconIndicatorUp, SvgIconInfo as IconInfo, SvgIconLink as IconLink, SvgIconLtc as IconLtc, SvgIconMail as IconMail, SvgIconMenu as IconMenu, SvgIconMore as IconMore, SvgIconNotification as IconNotification, SvgIconOverview as IconOverview, SvgIconPercent as IconPercent, SvgIconPieChart as IconPieChart, SvgIconPlus as IconPlus, SvgIconReports as IconReports, SvgIconReservesSuccess as IconReservesSuccess, SvgIconReservesWarning as IconReservesWarning, SvgIconSearch as IconSearch, SvgIconSettings as IconSettings, SvgIconSettlement as IconSettlement, SvgIconSignIn as IconSignIn, SvgIconSignOut as IconSignOut, SvgIconSort as IconSort, SvgIconSpinner as IconSpinner, SvgIconSupport as IconSupport, SvgIconTrash as IconTrash, SvgIconUpload as IconUpload, SvgIconUser as IconUser, SvgIconXlm as IconXlm, convertToUTCEpochTime, exportedTheme as coreTheme, formatPercentage, formatUSD, getDelta, uiColors };
350
+ export { CfAreaChart, CfBreakpointDebugger, CfCard, CfCheckbox, type CfCheckboxProps, CfInput, type CfInputProps, CfLineChart, CfSelect, type CfSelectOption, type CfSelectProps, CfTag, type CfTagProps, CfToast, SvgIconAlert as IconAlert, SvgIconArrowDown as IconArrowDown, SvgIconArrowUp as IconArrowUp, SvgIconAvax as IconAvax, SvgIconBank as IconBank, SvgIconBarChart as IconBarChart, SvgIconBch as IconBch, SvgIconBtc as IconBtc, SvgIconCalendar as IconCalendar, SvgIconCaretDown as IconCaretDown, SvgIconCaretLeft as IconCaretLeft, SvgIconCaretRight as IconCaretRight, SvgIconCaretUp as IconCaretUp, SvgIconCent as IconCent, SvgIconCheck as IconCheck, SvgIconChecking as IconChecking, SvgIconClose as IconClose, SvgIconConnect as IconConnect, SvgIconCopy as IconCopy, SvgIconDollar as IconDollar, SvgIconDownload as IconDownload, SvgIconEdit as IconEdit, SvgIconEnter as IconEnter, SvgIconEnterInverted as IconEnterInverted, SvgIconEth as IconEth, SvgIconExchange as IconExchange, SvgIconFilter as IconFilter, SvgIconHelp as IconHelp, SvgIconHistory as IconHistory, SvgIconHome as IconHome, SvgIconIndicatorDown as IconIndicatorDown, SvgIconIndicatorUp as IconIndicatorUp, SvgIconInfo as IconInfo, SvgIconLink as IconLink, SvgIconLtc as IconLtc, SvgIconMail as IconMail, SvgIconMenu as IconMenu, SvgIconMore as IconMore, SvgIconNotification as IconNotification, SvgIconOverview as IconOverview, SvgIconPercent as IconPercent, SvgIconPieChart as IconPieChart, SvgIconPlus as IconPlus, SvgIconReports as IconReports, SvgIconReservesSuccess as IconReservesSuccess, SvgIconReservesWarning as IconReservesWarning, SvgIconSearch as IconSearch, SvgIconSettings as IconSettings, SvgIconSettlement as IconSettlement, SvgIconSignIn as IconSignIn, SvgIconSignOut as IconSignOut, SvgIconSort as IconSort, SvgIconSpinner as IconSpinner, SvgIconSupport as IconSupport, SvgIconTrash as IconTrash, SvgIconUpload as IconUpload, SvgIconUser as IconUser, SvgIconXlm as IconXlm, Pagination, convertToUTCEpochTime, exportedTheme as coreTheme, formatPercentage, formatUSD, getDelta, uiColors };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cryptofi/core-ui",
3
- "version": "0.19.0",
3
+ "version": "0.21.0",
4
4
  "author": {
5
5
  "name": "CryptoFi"
6
6
  },