@ssa-ui-kit/widgets 1.0.11 → 1.0.12

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.
Files changed (26) hide show
  1. package/dist/components/AccountKeys/AccountKeys.d.ts +2 -0
  2. package/dist/components/AccountKeys/index.d.ts +2 -0
  3. package/dist/components/{ExchangeAccountKeys → AccountKeys}/types.d.ts +1 -1
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/index.js.map +1 -1
  7. package/jest-setup.ts +3 -0
  8. package/package.json +4 -4
  9. package/src/components/{ExchangeAccountKeys/ExchangeAccountKeys.specBackup.tsx → AccountKeys/AccountKeys.specBackup.tsx} +1 -1
  10. package/src/components/AccountKeys/AccountKeys.stories.tsx +14 -0
  11. package/src/components/{ExchangeAccountKeys/ExchangeAccountKeys.tsx → AccountKeys/AccountKeys.tsx} +3 -3
  12. package/src/components/AccountKeys/index.ts +2 -0
  13. package/src/components/{ExchangeAccountKeys → AccountKeys}/stories/StoryComponent.tsx +2 -2
  14. package/src/components/{ExchangeAccountKeys → AccountKeys}/types.ts +1 -1
  15. package/src/components/TradingInfoCard/TradingInfoCardTooltip.tsx +1 -1
  16. package/src/index.ts +1 -1
  17. package/tsbuildcache +1 -1
  18. package/dist/components/ExchangeAccountKeys/ExchangeAccountKeys.d.ts +0 -2
  19. package/dist/components/ExchangeAccountKeys/index.d.ts +0 -2
  20. package/src/components/ExchangeAccountKeys/ExchangeAccountKeys.stories.tsx +0 -14
  21. package/src/components/ExchangeAccountKeys/index.ts +0 -2
  22. /package/dist/components/{ExchangeAccountKeys → AccountKeys}/helpers.d.ts +0 -0
  23. /package/dist/components/{ExchangeAccountKeys → AccountKeys}/stories/StoryComponent.d.ts +0 -0
  24. /package/dist/components/{ExchangeAccountKeys → AccountKeys}/styles.d.ts +0 -0
  25. /package/src/components/{ExchangeAccountKeys → AccountKeys}/helpers.ts +0 -0
  26. /package/src/components/{ExchangeAccountKeys → AccountKeys}/styles.ts +0 -0
package/jest-setup.ts CHANGED
@@ -15,3 +15,6 @@ global.render = customRender;
15
15
 
16
16
  expect.addSnapshotSerializer(createSerializer());
17
17
  expect.extend(matchers);
18
+
19
+ window.URL.createObjectURL = jest.fn();
20
+ window.HTMLCanvasElement.prototype.getContext = jest.fn();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssa-ui-kit/widgets",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "private": false,
@@ -29,9 +29,9 @@
29
29
  "js-tokens": "^4.0.0",
30
30
  "loose-envify": "^1.4.0",
31
31
  "scheduler": "^0.23.0",
32
- "@ssa-ui-kit/core": "^1.1.7",
33
- "@ssa-ui-kit/hooks": "^1.0.0",
34
- "@ssa-ui-kit/utils": "^1.0.0"
32
+ "@ssa-ui-kit/core": "^1.1.8",
33
+ "@ssa-ui-kit/utils": "^1.0.0",
34
+ "@ssa-ui-kit/hooks": "^1.0.0"
35
35
  },
36
36
  "browserslist": [
37
37
  ">0.1%",
@@ -1,7 +1,7 @@
1
1
  import userEvent from '@testing-library/user-event';
2
2
  import { StoryComponent } from './stories/StoryComponent';
3
3
 
4
- describe('ExchangeAccountKeys', () => {
4
+ describe('AccountKeys', () => {
5
5
  it('Renders with title', () => {
6
6
  const { getByText } = render(<StoryComponent onDelete={jest.fn()} />);
7
7
 
@@ -0,0 +1,14 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { AccountKeys } from './AccountKeys';
3
+ import { StoryComponent } from './stories/StoryComponent';
4
+
5
+ export default {
6
+ title: 'Trading/AccountKeys',
7
+ component: AccountKeys,
8
+ } as Meta<typeof AccountKeys>;
9
+
10
+ export const Default: StoryObj<typeof AccountKeys> = () => (
11
+ <StoryComponent onDelete={() => alert('Account Deleted!')} />
12
+ );
13
+
14
+ Default.args = {};
@@ -8,17 +8,17 @@ import {
8
8
  Icon,
9
9
  Typography,
10
10
  } from '@ssa-ui-kit/core';
11
- import { ExchangeAccountKeysProps } from './types';
11
+ import { AccountKeysProps } from './types';
12
12
  import * as S from './styles';
13
13
 
14
- export const ExchangeAccountKeys = ({
14
+ export const AccountKeys = ({
15
15
  title,
16
16
  apiKey,
17
17
  secretKey,
18
18
  onDelete,
19
19
  onVisibilityChange,
20
20
  isDisabled,
21
- }: ExchangeAccountKeysProps) => {
21
+ }: AccountKeysProps) => {
22
22
  const [isVisible, setIsVisible] = useState(false);
23
23
  const theme = useTheme();
24
24
  const placeholder = <span>******</span>;
@@ -0,0 +1,2 @@
1
+ export { AccountKeys } from './AccountKeys';
2
+ export * from './types';
@@ -1,5 +1,5 @@
1
1
  import { useState } from 'react';
2
- import { ExchangeAccountKeys } from '../ExchangeAccountKeys';
2
+ import { AccountKeys } from '../AccountKeys';
3
3
  import { getMockData } from '../helpers';
4
4
 
5
5
  interface onDelete {
@@ -21,7 +21,7 @@ export const StoryComponent = ({ onDelete }: onDelete) => {
21
21
  };
22
22
 
23
23
  return (
24
- <ExchangeAccountKeys
24
+ <AccountKeys
25
25
  title="Account Name"
26
26
  apiKey="123456789012345678901234567890"
27
27
  secretKey={secretKey}
@@ -1,4 +1,4 @@
1
- export interface ExchangeAccountKeysProps {
1
+ export interface AccountKeysProps {
2
2
  title: string | JSX.Element;
3
3
  apiKey: string;
4
4
  secretKey: string;
@@ -15,7 +15,7 @@ const TradingInfoCardTooltip = ({
15
15
  const theme = useTheme();
16
16
  return (
17
17
  <Tooltip
18
- offsetPx={0}
18
+ offsetOptions={0}
19
19
  enableHover={true}
20
20
  enableClick={false}
21
21
  arrowProps={{
package/src/index.ts CHANGED
@@ -33,4 +33,4 @@ export * from './components/TradingScoreboard';
33
33
  export * from './components/BotsTable';
34
34
  export * from './components/AccountBalance';
35
35
  export * from './components/ExchangeAccount';
36
- export * from './components/ExchangeAccountKeys';
36
+ export * from './components/AccountKeys';