@cryptofi/core-ui 0.27.0 → 0.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.
@@ -76,6 +76,9 @@ declare const SvgIconExchange: _chakra_ui_system_dist_system_types.ChakraCompone
76
76
  declare const SvgIconFilter: _chakra_ui_system_dist_system_types.ChakraComponent<(props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element, {}>;
77
77
  //# sourceMappingURL=IconFilter.d.ts.map
78
78
 
79
+ declare const SvgIconFilterActive: _chakra_ui_system_dist_system_types.ChakraComponent<(props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element, {}>;
80
+ //# sourceMappingURL=IconFilterActive.d.ts.map
81
+
79
82
  declare const SvgIconHelp: _chakra_ui_system_dist_system_types.ChakraComponent<(props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element, {}>;
80
83
  //# sourceMappingURL=IconHelp.d.ts.map
81
84
 
@@ -252,6 +255,16 @@ declare const getDelta: ({ data, dataKey }: {
252
255
  };
253
256
  //# sourceMappingURL=getDelta.d.ts.map
254
257
 
258
+ /**
259
+ * @description Pulls every nth element from a time series array, starting from the end
260
+ * to ensure the most recent entry is included.
261
+ */
262
+ declare const pullFromEnd: <T>({ arr, n }: {
263
+ arr: T[];
264
+ n: number;
265
+ }) => T[];
266
+ //# sourceMappingURL=pullFromEnd.d.ts.map
267
+
255
268
  /**
256
269
  * @description An object with predefined UI colors, implemented as functions with optional alpha values.
257
270
  * Color names are assigned using https://colornamer.robertcooper.me/.
@@ -271,7 +284,7 @@ declare const uiColors: {
271
284
 
272
285
  declare const usdToNumber: (usd: string) => number;
273
286
 
274
- declare const CfAreaChart: ({ data, dataKey, width, height, areaType, showTooltip, isAnimated, formatter, }: {
287
+ declare const CfAreaChart: ({ data, dataKey, width, height, areaType, showTooltip, isAnimated, formatter, sampleRate, }: {
275
288
  data: any[] | undefined;
276
289
  dataKey: string;
277
290
  width?: string | undefined;
@@ -280,12 +293,13 @@ declare const CfAreaChart: ({ data, dataKey, width, height, areaType, showToolti
280
293
  showTooltip?: boolean | undefined;
281
294
  isAnimated?: boolean | undefined;
282
295
  formatter?: ((value: number) => string) | undefined;
296
+ sampleRate?: number | undefined;
283
297
  }) => react_jsx_runtime.JSX.Element;
284
298
  //# sourceMappingURL=AreaChart.d.ts.map
285
299
 
286
300
  /**
287
301
  *
288
- * @description use this component to visualize Chakra's breakpoints for debugging responsive styles.
302
+ * @description Use this component to visualize Chakra's breakpoints for debugging responsive styles.
289
303
  */
290
304
  declare const CfBreakpointDebugger: () => react_jsx_runtime.JSX.Element;
291
305
  //# sourceMappingURL=BreakpointDebugger.d.ts.map
@@ -345,7 +359,7 @@ type Props$1<T extends FieldValues> = {
345
359
  declare const CfInputArray: <T extends FieldValues>({ name, control, register, defaultValues, onArrayAppend, onArrayRemove, }: Props$1<T>) => react_jsx_runtime.JSX.Element;
346
360
  //# sourceMappingURL=InputArray.d.ts.map
347
361
 
348
- declare const CfLineChart: ({ data, dataKey, width, height, lineType, showTooltip, isAnimated, formatter, }: {
362
+ declare const CfLineChart: ({ data, dataKey, width, height, lineType, showTooltip, isAnimated, formatter, sampleRate, }: {
349
363
  data: any[] | undefined;
350
364
  dataKey: string;
351
365
  width?: string | undefined;
@@ -354,6 +368,7 @@ declare const CfLineChart: ({ data, dataKey, width, height, lineType, showToolti
354
368
  showTooltip?: boolean | undefined;
355
369
  isAnimated?: boolean | undefined;
356
370
  formatter?: ((value: number) => string) | undefined;
371
+ sampleRate?: number | undefined;
357
372
  }) => react_jsx_runtime.JSX.Element;
358
373
  //# sourceMappingURL=LineChart.d.ts.map
359
374
 
@@ -406,7 +421,17 @@ interface CfToastProps extends UseToastOptions {
406
421
  }
407
422
  declare const CfToast: ({ description, title, onClose, isClosable, status }: CfToastProps) => react_jsx_runtime.JSX.Element;
408
423
 
424
+ declare const useBreakpoint: () => {
425
+ breakpoint: string;
426
+ isSmallBreakpoint: boolean;
427
+ isMediumBreakpoint: boolean;
428
+ isLargeBreakpoint: boolean;
429
+ isAboveSmallBreakpoint: boolean;
430
+ isBelowLargeBreakpoint: boolean;
431
+ };
432
+ //# sourceMappingURL=useBreakpoint.d.ts.map
433
+
409
434
  type SVGIcon = ChakraComponent<'svg', object>;
410
435
  declare const layoutMinWidth = "22rem";
411
436
 
412
- export { CfAreaChart, CfBreakpointDebugger, CfButtonGroup, CfButtonGroupButton, CfCard, CfCheckbox, type CfCheckboxProps, CfForm, CfInput, CfInputArray, 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, SvgIconRefresh as IconRefresh, 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, type SVGIcon, aggregateAmounts, exportedTheme as coreTheme, dateToTimestamp, formatPercentage, formatUSD, getDelta, layoutMinWidth, uiColors, usdToNumber };
437
+ export { CfAreaChart, CfBreakpointDebugger, CfButtonGroup, CfButtonGroupButton, CfCard, CfCheckbox, type CfCheckboxProps, CfForm, CfInput, CfInputArray, 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, SvgIconFilterActive as IconFilterActive, 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, SvgIconRefresh as IconRefresh, 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, type SVGIcon, aggregateAmounts, exportedTheme as coreTheme, dateToTimestamp, formatPercentage, formatUSD, getDelta, layoutMinWidth, pullFromEnd, uiColors, usdToNumber, useBreakpoint as useCfBreakpoint };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cryptofi/core-ui",
3
- "version": "0.27.0",
3
+ "version": "0.29.0",
4
4
  "author": {
5
5
  "name": "CryptoFi"
6
6
  },
@@ -11,11 +11,11 @@
11
11
  "type": "module",
12
12
  "scripts": {
13
13
  "build": "rm -rf ./dist && rollup -c",
14
- "build-storybook": "storybook build -o dist",
15
- "dev": "yarn storybook",
14
+ "build-storybook": "storybook build --docs -o dist",
15
+ "dev": "yarn storybook dev --docs",
16
16
  "format": "prettier --config ./.prettierrc -w '**/*.{tsx,ts,js,cjs,json,yml}' && git update-index --again",
17
17
  "icons:gen": "yarn icons:clean && yarn icons:prefix && npx @svgr/cli --out-dir ./src/icons -- ./svg-icons",
18
- "icons:clean": "npx rimraf '**/Icon!(*.stories).tsx' ./src/icons/index.ts",
18
+ "icons:clean": "npx rimraf './src/icons/**/Icon!(*.stories).tsx' ./src/icons/index.ts",
19
19
  "icons:prefix": "node scripts/prefixIcons.cjs",
20
20
  "lint": "eslint src --ext .tsx --ext .ts",
21
21
  "lint:fix": "yarn lint --fix",
@@ -26,7 +26,7 @@
26
26
  "publish:npm": "yarn build && npm publish --access public && yarn publish:notifier",
27
27
  "storybook": "storybook dev -p 6006",
28
28
  "test": "jest --colors --passWithNoTests",
29
- "test:one": "yarn test src/__tests/\"$@\".test.ts",
29
+ "test:one": "node scripts/testOne.cjs",
30
30
  "test:watch": "yarn test --collectCoverage=false --watch"
31
31
  },
32
32
  "module": "dist/index.js",
@@ -52,7 +52,7 @@
52
52
  "decimal.js": "^10.4.3",
53
53
  "react-currency-input-field": "^3.7.0",
54
54
  "react-hook-form": "^7.49.3",
55
- "recharts": "^2.10.3",
55
+ "recharts": "^2.12.0",
56
56
  "yup": "^1.3.3"
57
57
  },
58
58
  "devDependencies": {
@@ -68,8 +68,8 @@
68
68
  "@storybook/addon-interactions": "^7.6.14",
69
69
  "@storybook/addon-links": "^7.6.14",
70
70
  "@storybook/addon-onboarding": "^1.0.8",
71
- "@storybook/blocks": "^7.6.14",
72
- "@storybook/components": "^7.6.14",
71
+ "@storybook/blocks": "^7.6.16",
72
+ "@storybook/components": "^7.6.17",
73
73
  "@storybook/manager-api": "^7.6.14",
74
74
  "@storybook/preview-api": "^7.6.14",
75
75
  "@storybook/react": "^7.6.14",
@@ -81,18 +81,18 @@
81
81
  "@svgr/plugin-jsx": "^8.1.0",
82
82
  "@svgr/plugin-prettier": "^8.1.0",
83
83
  "@svgr/plugin-svgo": "^8.1.0",
84
- "@testing-library/jest-dom": "^5.16.2",
84
+ "@testing-library/jest-dom": "^6.4.2",
85
85
  "@testing-library/react": "^13.4.0",
86
86
  "@types/jest": "^29.2.6",
87
- "@types/lodash.isempty": "^4",
88
87
  "@types/prop-types": "^15",
89
88
  "@types/react": "^18.2.55",
90
89
  "@types/react-dom": "^18.2.19",
91
90
  "@types/rollup-plugin-peer-deps-external": "^2",
92
91
  "@types/stringify-object": "^4.0.4",
93
- "@typescript-eslint/eslint-plugin": "^6.13.1",
94
- "@typescript-eslint/parser": "^6.13.1",
92
+ "@typescript-eslint/eslint-plugin": "^7.0.2",
93
+ "@typescript-eslint/parser": "^7.0.2",
95
94
  "chalk": "4.1.2",
95
+ "core-js": "^3.36.0",
96
96
  "cross-var": "^1.1.0",
97
97
  "dotenv-cli": "^7.3.0",
98
98
  "eslint": "^8.9.0",
@@ -106,11 +106,10 @@
106
106
  "eslint-plugin-react-hooks": "^4.3.0",
107
107
  "eslint-plugin-simple-import-sort": "^9.0.0",
108
108
  "eslint-plugin-storybook": "^0.6.15",
109
- "eslint-plugin-unused-imports": "^3.0.0",
109
+ "eslint-plugin-unused-imports": "^3.1.0",
110
110
  "framer-motion": "^10.16.4",
111
111
  "identity-obj-proxy": "^3.0.0",
112
112
  "jest": "^29.4.0",
113
- "lodash.isempty": "^4.4.0",
114
113
  "pnpapi": "^0.0.0",
115
114
  "prettier": "^3.1.0",
116
115
  "prop-types": "^15.8.1",