@coin-voyage/swapkit 0.5.0 → 0.5.1

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.
@@ -2,23 +2,23 @@ import { css } from "styled-components";
2
2
  import styled from "./styled";
3
3
  import { darkTheme, lightTheme } from "./theme";
4
4
  function variables(theme) {
5
- return css `
6
- --sk-font-family: ${theme.fontFamily};
7
- --sk-background: ${theme.background};
8
- --sk-surface: ${theme.surface};
9
- --sk-surface-elevated: ${theme.surfaceElevated};
10
- --sk-border: ${theme.border};
11
- --sk-text: ${theme.text};
12
- --sk-text-muted: ${theme.textMuted};
13
- --sk-accent: ${theme.accent};
14
- --sk-accent-hover: ${theme.accentHover};
15
- --sk-accent-text: ${theme.accentText};
16
- --sk-danger: ${theme.danger};
17
- --sk-warning: ${theme.warning};
18
- --sk-success: ${theme.success};
19
- --sk-overlay: ${theme.overlay};
20
- --sk-shadow: ${theme.shadow};
21
- --sk-radius: ${theme.radius};
5
+ return css `
6
+ --sk-font-family: ${theme.fontFamily};
7
+ --sk-background: ${theme.background};
8
+ --sk-surface: ${theme.surface};
9
+ --sk-surface-elevated: ${theme.surfaceElevated};
10
+ --sk-border: ${theme.border};
11
+ --sk-text: ${theme.text};
12
+ --sk-text-muted: ${theme.textMuted};
13
+ --sk-accent: ${theme.accent};
14
+ --sk-accent-hover: ${theme.accentHover};
15
+ --sk-accent-text: ${theme.accentText};
16
+ --sk-danger: ${theme.danger};
17
+ --sk-warning: ${theme.warning};
18
+ --sk-success: ${theme.success};
19
+ --sk-overlay: ${theme.overlay};
20
+ --sk-shadow: ${theme.shadow};
21
+ --sk-radius: ${theme.radius};
22
22
  `;
23
23
  }
24
24
  function modeVariables(mode, customTheme) {
@@ -28,48 +28,48 @@ function modeVariables(mode, customTheme) {
28
28
  return variables(light);
29
29
  if (mode === "dark")
30
30
  return variables(dark);
31
- return css `
32
- ${variables(light)}
33
- @media (prefers-color-scheme: dark) {
34
- ${variables(dark)}
35
- }
31
+ return css `
32
+ ${variables(light)}
33
+ @media (prefers-color-scheme: dark) {
34
+ ${variables(dark)}
35
+ }
36
36
  `;
37
37
  }
38
- export const SwapKitRoot = styled.div `
39
- ${({ $mode, $customTheme }) => modeVariables($mode, $customTheme)}
40
-
41
- all: initial;
42
- display: block;
43
- width: 100%;
44
- color: var(--sk-text);
45
- background: ${({ $customTheme }) => $customTheme.background ?? "transparent"};
46
- font-family: var(--sk-font-family);
47
- font-size: 16px;
48
- text-align: left;
49
- text-rendering: optimizeLegibility;
50
- -webkit-font-smoothing: antialiased;
51
-
52
- &,
53
- * {
54
- box-sizing: border-box;
55
- font-family: var(--sk-font-family);
56
- }
57
-
58
- button,
59
- input {
60
- font-family: var(--sk-font-family);
61
- }
62
-
63
- button:focus-visible,
64
- input:focus-visible,
65
- a:focus-visible {
66
- outline: 2px solid var(--sk-accent);
67
- outline-offset: 2px;
68
- }
69
-
70
- img,
71
- svg {
72
- display: block;
73
- max-width: 100%;
74
- }
38
+ export const SwapKitRoot = styled.div `
39
+ ${({ $mode, $customTheme }) => modeVariables($mode, $customTheme)}
40
+
41
+ all: initial;
42
+ display: block;
43
+ width: 100%;
44
+ color: var(--sk-text);
45
+ background: ${({ $customTheme }) => $customTheme.background ?? "transparent"};
46
+ font-family: var(--sk-font-family);
47
+ font-size: 16px;
48
+ text-align: left;
49
+ text-rendering: optimizeLegibility;
50
+ -webkit-font-smoothing: antialiased;
51
+
52
+ &,
53
+ * {
54
+ box-sizing: border-box;
55
+ font-family: var(--sk-font-family);
56
+ }
57
+
58
+ button,
59
+ input {
60
+ font-family: var(--sk-font-family);
61
+ }
62
+
63
+ button:focus-visible,
64
+ input:focus-visible,
65
+ a:focus-visible {
66
+ outline: 2px solid var(--sk-accent);
67
+ outline-offset: 2px;
68
+ }
69
+
70
+ img,
71
+ svg {
72
+ display: block;
73
+ max-width: 100%;
74
+ }
75
75
  `;
package/package.json CHANGED
@@ -1,19 +1,25 @@
1
1
  {
2
2
  "name": "@coin-voyage/swapkit",
3
3
  "description": "A reusable cross-chain swap component for CoinVoyage.",
4
- "version": "0.5.0",
4
+ "version": "0.5.1",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "author": "Lars <lars@coinvoyage.io>",
8
8
  "homepage": "https://coinvoyage.io",
9
9
  "license": "BSD-2-Clause",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/coin-voyage/coin-voyage-pay.git",
13
+ "directory": "packages/swapkit"
14
+ },
10
15
  "type": "module",
11
16
  "main": "./dist/index.js",
12
17
  "types": "./dist/index.d.ts",
13
18
  "exports": {
14
19
  ".": {
20
+ "types": "./dist/index.d.ts",
15
21
  "import": "./dist/index.js",
16
- "types": "./dist/index.d.ts"
22
+ "default": "./dist/index.js"
17
23
  }
18
24
  },
19
25
  "files": [
@@ -22,8 +28,8 @@
22
28
  "LICENSE"
23
29
  ],
24
30
  "dependencies": {
25
- "@coin-voyage/crypto": "3.7.0",
26
- "@coin-voyage/shared": "3.7.0"
31
+ "@coin-voyage/shared": "3.7.2",
32
+ "@coin-voyage/crypto": "3.7.2"
27
33
  },
28
34
  "devDependencies": {
29
35
  "@testing-library/react": "^16.3.0",