@cryptofi/core-ui 0.21.0 → 0.22.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,9 @@
1
+ /// <reference types="react" />
1
2
  import * as _chakra_ui_system_dist_system_types from '@chakra-ui/system/dist/system.types';
2
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
4
  import { SVGProps, Dispatch, SetStateAction } from 'react';
4
5
  import { CurveType } from 'recharts/types/shape/Curve';
5
- import { CardProps, CheckboxProps, InputProps, ChakraComponent, FlexProps, SelectProps, TagProps, UseToastOptions } from '@chakra-ui/react';
6
+ import { CardProps, CheckboxProps, InputProps, ChakraComponent, ModalProps, FlexProps, SelectProps, TagProps, UseToastOptions } from '@chakra-ui/react';
6
7
  import { FieldValues, UseFormRegister } from 'react-hook-form';
7
8
 
8
9
  declare const SvgIconAlert: _chakra_ui_system_dist_system_types.ChakraComponent<(props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element, {}>;
@@ -193,6 +194,9 @@ declare const exportedTheme: {
193
194
  };
194
195
  //# sourceMappingURL=exportedTheme.d.ts.map
195
196
 
197
+ declare const aggregateAmounts: (amounts: number[]) => number;
198
+ //# sourceMappingURL=aggregateAmounts.d.ts.map
199
+
196
200
  declare const convertToUTCEpochTime: ({ timeString, toEndDate }: {
197
201
  timeString: string;
198
202
  toEndDate?: boolean | undefined;
@@ -281,6 +285,7 @@ interface CfCheckboxProps extends CheckboxProps {
281
285
  label?: string;
282
286
  labelPosition?: 'left' | 'right';
283
287
  spaceBetween?: boolean;
288
+ name: string;
284
289
  }
285
290
  declare const CfCheckbox: (props: CfCheckboxProps) => react_jsx_runtime.JSX.Element;
286
291
 
@@ -291,6 +296,7 @@ interface CfInputProps<T extends FieldValues> extends InputProps {
291
296
  label?: string;
292
297
  IconLeft?: ChakraComponent<'svg', object>;
293
298
  IconRight?: ChakraComponent<'svg', object>;
299
+ name: string;
294
300
  }
295
301
  declare const CfInput: <T extends FieldValues>(props: CfInputProps<T>) => react_jsx_runtime.JSX.Element;
296
302
 
@@ -306,6 +312,13 @@ declare const CfLineChart: ({ data, dataKey, width, height, lineType, showToolti
306
312
  }) => react_jsx_runtime.JSX.Element;
307
313
  //# sourceMappingURL=LineChart.d.ts.map
308
314
 
315
+ interface Props extends ModalProps {
316
+ headerContent: React.ReactNode;
317
+ footerContent: React.ReactNode;
318
+ }
319
+ declare const CfModal: ({ isOpen, onClose, headerContent, footerContent, closeOnOverlayClick, children, ...rest }: Props) => react_jsx_runtime.JSX.Element;
320
+ //# sourceMappingURL=Modal.d.ts.map
321
+
309
322
  interface LastEvaluatedKeyParams {
310
323
  lastEvaluatedPKey?: string;
311
324
  lastEvaluatedSKey?: string;
@@ -314,19 +327,20 @@ interface LastEvaluatedKey {
314
327
  pKey: string;
315
328
  sKey: string;
316
329
  }
317
- interface PaginationProps extends FlexProps {
330
+ interface CfPaginationProps extends FlexProps {
318
331
  setLastEvaluatedKeyParams: Dispatch<SetStateAction<LastEvaluatedKeyParams | undefined>>;
319
332
  isLoading?: boolean;
320
333
  hasMore?: boolean;
321
334
  lastEvaluatedKey?: LastEvaluatedKey;
322
335
  }
323
- declare const Pagination: ({ isLoading, hasMore, setLastEvaluatedKeyParams, lastEvaluatedKey, ...rest }: PaginationProps) => react_jsx_runtime.JSX.Element;
336
+ declare const CfPagination: ({ isLoading, hasMore, setLastEvaluatedKeyParams, lastEvaluatedKey, ...rest }: CfPaginationProps) => react_jsx_runtime.JSX.Element;
324
337
 
325
338
  interface CfSelectProps<T extends FieldValues> extends SelectProps {
326
339
  register?: UseFormRegister<T>;
327
340
  errorMessage?: string;
328
341
  helperText?: string;
329
342
  label?: string;
343
+ name: string;
330
344
  }
331
345
  interface CfSelectOption {
332
346
  name: string;
@@ -347,4 +361,4 @@ interface CfToastProps extends UseToastOptions {
347
361
  }
348
362
  declare const CfToast: (props: CfToastProps) => react_jsx_runtime.JSX.Element;
349
363
 
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 };
364
+ export { CfAreaChart, CfBreakpointDebugger, CfCard, CfCheckbox, type CfCheckboxProps, CfInput, type CfInputProps, CfLineChart, CfModal, CfPagination, 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, aggregateAmounts, 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.21.0",
3
+ "version": "0.22.0",
4
4
  "author": {
5
5
  "name": "CryptoFi"
6
6
  },
@@ -10,23 +10,25 @@
10
10
  "license": "MIT",
11
11
  "type": "module",
12
12
  "scripts": {
13
- "dev": "yarn storybook",
14
13
  "build": "rm -rf ./dist && rollup -c",
14
+ "build-storybook": "storybook build",
15
+ "chromatic": "dotenv cross-var npx chromatic --project-token=%CHROMATIC_PROJECT_TOKEN%",
16
+ "dev": "yarn storybook",
17
+ "format": "prettier --config ./.prettierrc -w '**/*.{tsx,ts,js,cjs,json,yml}' && git update-index --again",
18
+ "icons:gen": "yarn icons:clean && yarn icons:prefix && npx @svgr/cli --out-dir ./src/icons -- ./svg-icons",
19
+ "icons:clean": "npx rimraf '**/Icon*.tsx' ./src/icons/index.ts",
20
+ "icons:prefix": "node scripts/prefixIcons.cjs",
15
21
  "lint": "eslint src --ext .tsx --ext .ts",
16
22
  "lint:fix": "yarn lint --fix",
17
- "format": "prettier --config ./.prettierrc -w '**/*.{tsx,ts,js,cjs,json,yml}' && git update-index --again",
18
- "pretest": "yarn lint:fix",
19
- "test": "jest --colors --passWithNoTests",
20
23
  "posttest": "npx http-server coverage/lcov-report",
21
- "test:watch": "yarn test --collectCoverage=false --watch",
22
- "storybook": "storybook dev -p 6006",
23
- "build:storybook": "storybook build",
24
+ "pretest": "yarn lint:fix",
24
25
  "publish:local": "yarn build && npx yalc publish --push",
25
- "publish:npm": "npm publish --access public && yarn publish:notifier",
26
- "icons:gen": "yarn icons:clean && yarn icons:prefix && npx @svgr/cli --out-dir ./src/icons -- ./svg-icons",
27
- "icons:clean": "rm -rf src/icons",
28
- "icons:prefix": "node scripts/prefixIcons.cjs",
29
- "publish:notifier": "dotenv cross-var node scripts/npmPublishNotifier.cjs %SLACK_WEBHOOK_URL%"
26
+ "publish:notifier": "dotenv cross-var node scripts/npmPublishNotifier.cjs %SLACK_WEBHOOK_URL%",
27
+ "publish:npm": "yarn build && npm publish --access public && yarn publish:notifier && yarn publish:storybook",
28
+ "publish:storybook": "yarn chromatic",
29
+ "storybook": "storybook dev -p 6006",
30
+ "test": "jest --colors --passWithNoTests",
31
+ "test:watch": "yarn test --collectCoverage=false --watch"
30
32
  },
31
33
  "module": "dist/index.js",
32
34
  "types": "dist/types/index.d.ts",