@cryptofi/core-ui 0.20.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,9 +1,9 @@
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';
6
- import { UseFormRegister } from 'react-hook-form';
5
+ import { CardProps, CheckboxProps, InputProps, ChakraComponent, FlexProps, SelectProps, TagProps, UseToastOptions } from '@chakra-ui/react';
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, {}>;
9
9
  //# sourceMappingURL=IconAlert.d.ts.map
@@ -158,6 +158,27 @@ declare const SvgIconUpload: _chakra_ui_system_dist_system_types.ChakraComponent
158
158
  declare const SvgIconUser: _chakra_ui_system_dist_system_types.ChakraComponent<(props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element, {}>;
159
159
  //# sourceMappingURL=IconUser.d.ts.map
160
160
 
161
+ declare const SvgIconAvax: _chakra_ui_system_dist_system_types.ChakraComponent<(props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element, {}>;
162
+ //# sourceMappingURL=IconAvax.d.ts.map
163
+
164
+ declare const SvgIconBch: _chakra_ui_system_dist_system_types.ChakraComponent<(props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element, {}>;
165
+ //# sourceMappingURL=IconBch.d.ts.map
166
+
167
+ declare const SvgIconBtc: _chakra_ui_system_dist_system_types.ChakraComponent<(props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element, {}>;
168
+ //# sourceMappingURL=IconBtc.d.ts.map
169
+
170
+ declare const SvgIconEth: _chakra_ui_system_dist_system_types.ChakraComponent<(props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element, {}>;
171
+ //# sourceMappingURL=IconEth.d.ts.map
172
+
173
+ declare const SvgIconLink: _chakra_ui_system_dist_system_types.ChakraComponent<(props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element, {}>;
174
+ //# sourceMappingURL=IconLink.d.ts.map
175
+
176
+ declare const SvgIconLtc: _chakra_ui_system_dist_system_types.ChakraComponent<(props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element, {}>;
177
+ //# sourceMappingURL=IconLtc.d.ts.map
178
+
179
+ declare const SvgIconXlm: _chakra_ui_system_dist_system_types.ChakraComponent<(props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element, {}>;
180
+ //# sourceMappingURL=IconXlm.d.ts.map
181
+
161
182
  /**
162
183
  * This is a partial Chakra theme and should be extended by the consuming application using
163
184
  * Chakra's extendTheme method.
@@ -178,30 +199,31 @@ declare const convertToUTCEpochTime: ({ timeString, toEndDate }: {
178
199
  }) => string;
179
200
  //# sourceMappingURL=convertToUTCEpochTime.d.ts.map
180
201
 
181
- type SignDisplay$1 = 'auto' | 'always' | 'exceptZero' | 'never';
202
+ type SignDisplay = 'auto' | 'always' | 'exceptZero' | 'never';
182
203
  /**
183
204
  *
184
- * @param amount - A finite number
205
+ * @param amount - Number or string to format
185
206
  * @param signDisplay - Setting for minus / plus sign, defaults to exceptZero
186
207
  * @param isDecimal - Is the number a percentage in its decimal form? defaults to true
187
208
  */
188
209
  declare const formatPercentage: ({ number, signDisplay, isDecimal, }: {
189
- number: number;
190
- signDisplay?: SignDisplay$1 | undefined;
210
+ number: number | string;
211
+ signDisplay?: SignDisplay | undefined;
191
212
  isDecimal?: boolean | undefined;
192
- }) => string;
213
+ }) => string | number;
193
214
  //# sourceMappingURL=formatPercentage.d.ts.map
194
215
 
195
- type SignDisplay = 'auto' | 'always' | 'exceptZero' | 'never';
196
216
  /**
197
217
  *
198
- * @param amount - A finite number
199
- * @param signDisplay - Setting for minus / plus sign, defaults to auto
218
+ * @param amount - Number or string to format
219
+ * @param precision - The number of decimals to display
220
+ * @signDisplay - Whether to display a plus sign for positive amounts
200
221
  */
201
- declare const formatUSD: ({ amount, signDisplay }: {
202
- amount: number;
203
- signDisplay?: SignDisplay | undefined;
204
- }) => string;
222
+ declare const formatUSD: ({ amount, precision, signDisplay, }: {
223
+ amount: number | string;
224
+ precision?: number | undefined;
225
+ signDisplay?: boolean | undefined;
226
+ }) => string | number;
205
227
  //# sourceMappingURL=formatUSD.d.ts.map
206
228
 
207
229
  /**
@@ -214,20 +236,14 @@ declare const getDelta: ({ data, dataKey }: {
214
236
  data: any[] | undefined;
215
237
  dataKey: string;
216
238
  }) => {
217
- startingAmount: any;
218
- endingAmount: any;
239
+ startingAmount: number;
240
+ endingAmount: number;
219
241
  delta: number;
220
242
  percentChange: number;
221
243
  isNetGain: boolean;
222
244
  };
223
245
  //# sourceMappingURL=getDelta.d.ts.map
224
246
 
225
- declare const getFormDataQuery: (obj: unknown) => string | undefined;
226
- //# sourceMappingURL=getFormDataQuery.d.ts.map
227
-
228
- declare const isFormDataEmpty: (obj: unknown) => boolean;
229
- //# sourceMappingURL=isFormDataEmpty.d.ts.map
230
-
231
247
  declare const uiColors: {
232
248
  redRemains(alpha?: number): string;
233
249
  heroicRed(alpha?: number): string;
@@ -241,15 +257,21 @@ declare const uiColors: {
241
257
  };
242
258
  //# sourceMappingURL=uiColors.d.ts.map
243
259
 
244
- declare const CfAreaChart: ({ data, dataKey, width, height, areaType, }: {
260
+ declare const CfAreaChart: ({ data, dataKey, width, height, areaType, showTooltip, isAnimated, formatter, }: {
245
261
  data: any[] | undefined;
246
262
  dataKey: string;
247
263
  width?: string | undefined;
248
264
  height?: string | undefined;
249
265
  areaType?: CurveType | undefined;
266
+ showTooltip?: boolean | undefined;
267
+ isAnimated?: boolean | undefined;
268
+ formatter?: ((value: number) => string) | undefined;
250
269
  }) => react_jsx_runtime.JSX.Element;
251
270
  //# sourceMappingURL=AreaChart.d.ts.map
252
271
 
272
+ declare const CfBreakpointDebugger: () => react_jsx_runtime.JSX.Element;
273
+ //# sourceMappingURL=BreakpointDebugger.d.ts.map
274
+
253
275
  declare const CfCard: ({ children, ...rest }: CardProps) => react_jsx_runtime.JSX.Element;
254
276
  //# sourceMappingURL=Card.d.ts.map
255
277
 
@@ -262,37 +284,55 @@ interface CfCheckboxProps extends CheckboxProps {
262
284
  }
263
285
  declare const CfCheckbox: (props: CfCheckboxProps) => react_jsx_runtime.JSX.Element;
264
286
 
265
- interface CfInputProps extends InputProps {
287
+ interface CfInputProps<T extends FieldValues> extends InputProps {
288
+ register?: UseFormRegister<T>;
266
289
  errorMessage?: string;
267
290
  helperText?: string;
268
291
  label?: string;
269
- spellCheck?: boolean;
270
292
  IconLeft?: ChakraComponent<'svg', object>;
271
293
  IconRight?: ChakraComponent<'svg', object>;
272
- name: string;
273
- register: UseFormRegister<any>;
274
- rules?: object;
275
294
  }
276
- declare const CfInput: (props: CfInputProps) => react_jsx_runtime.JSX.Element;
295
+ declare const CfInput: <T extends FieldValues>(props: CfInputProps<T>) => react_jsx_runtime.JSX.Element;
277
296
 
278
- declare const CfLineChart: ({ data, dataKey, width, height, lineType, }: {
297
+ declare const CfLineChart: ({ data, dataKey, width, height, lineType, showTooltip, isAnimated, formatter, }: {
279
298
  data: any[] | undefined;
280
299
  dataKey: string;
281
300
  width?: string | undefined;
282
301
  height?: string | undefined;
283
302
  lineType?: CurveType | undefined;
303
+ showTooltip?: boolean | undefined;
304
+ isAnimated?: boolean | undefined;
305
+ formatter?: ((value: number) => string) | undefined;
284
306
  }) => react_jsx_runtime.JSX.Element;
285
307
  //# sourceMappingURL=LineChart.d.ts.map
286
308
 
287
- interface CfSelectProps extends SelectProps {
288
- register: UseFormRegister<any>;
289
- name: string;
290
- rules?: object;
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
+
325
+ interface CfSelectProps<T extends FieldValues> extends SelectProps {
326
+ register?: UseFormRegister<T>;
291
327
  errorMessage?: string;
292
328
  helperText?: string;
293
329
  label?: string;
294
330
  }
295
- declare const CfSelect: (props: CfSelectProps) => react_jsx_runtime.JSX.Element;
331
+ interface CfSelectOption {
332
+ name: string;
333
+ value?: string;
334
+ }
335
+ declare const CfSelect: <T extends FieldValues>(props: CfSelectProps<T>) => react_jsx_runtime.JSX.Element;
296
336
 
297
337
  interface CfTagProps extends TagProps {
298
338
  label: string;
@@ -307,4 +347,4 @@ interface CfToastProps extends UseToastOptions {
307
347
  }
308
348
  declare const CfToast: (props: CfToastProps) => react_jsx_runtime.JSX.Element;
309
349
 
310
- export { CfAreaChart, CfCard, CfCheckbox, type CfCheckboxProps, CfInput, type CfInputProps, CfLineChart, CfSelect, type CfSelectProps, CfTag, type CfTagProps, CfToast, SvgIconAlert as IconAlert, SvgIconArrowDown as IconArrowDown, SvgIconArrowUp as IconArrowUp, SvgIconBank as IconBank, SvgIconBarChart as IconBarChart, 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, SvgIconExchange as IconExchange, SvgIconFilter as IconFilter, SvgIconHelp as IconHelp, SvgIconHistory as IconHistory, SvgIconHome as IconHome, SvgIconIndicatorDown as IconIndicatorDown, SvgIconIndicatorUp as IconIndicatorUp, SvgIconInfo as IconInfo, 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, convertToUTCEpochTime, exportedTheme as coreTheme, formatPercentage, formatUSD, getDelta, getFormDataQuery, isFormDataEmpty, 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.20.0",
3
+ "version": "0.21.0",
4
4
  "author": {
5
5
  "name": "CryptoFi"
6
6
  },