@svp-chain-sdk/ui 0.1.4 → 0.1.5
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.
- package/README.md +125 -87
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/feedback-widget/feedback-widget.d.ts +4 -0
- package/dist/components/feedback-widget/index.d.ts +2 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/notice-marquee/index.d.ts +2 -0
- package/dist/components/notice-marquee/notice-marquee.d.ts +18 -0
- package/dist/index.d.ts +3 -5
- package/dist/index.js +651 -736
- package/dist/styles.css +78 -60
- package/dist/tailwind.d.ts +90 -6
- package/dist/tailwind.js +57 -13
- package/package.json +6 -14
- package/dist/wallet.d.ts +0 -338
- /package/dist/{button.d.ts → components/button/button.d.ts} +0 -0
- /package/dist/{utils.d.ts → lib/utils.d.ts} +0 -0
package/dist/styles.css
CHANGED
|
@@ -1,91 +1,109 @@
|
|
|
1
1
|
@import "tailwindcss";
|
|
2
2
|
@theme { --color-background: oklch(0.99 0.01 220); --color-foreground: oklch(0.24 0.04 235); --color-primary: oklch(0.55 0.16 220); --color-primary-foreground: oklch(0.99 0.01 220); --color-secondary: oklch(0.93 0.04 205); --color-secondary-foreground: oklch(0.28 0.07 225); --color-accent: oklch(0.9 0.06 195); --color-accent-foreground: oklch(0.25 0.07 225); --color-destructive: oklch(0.58 0.2 25); --color-destructive-foreground: white; --color-input: oklch(0.86 0.03 220); --color-ring: oklch(0.6 0.14 195); }
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
min-width: 0;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: flex-end;
|
|
10
|
-
font-family: "Space Grotesk", "Inter", system-ui, -apple-system, sans-serif;
|
|
4
|
+
@keyframes ui-notice-marquee-scroll {
|
|
5
|
+
from { transform: translateX(0); }
|
|
6
|
+
to { transform: translateX(-50%); }
|
|
11
7
|
}
|
|
12
8
|
|
|
13
|
-
.
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
.ui-notice-marquee {
|
|
10
|
+
width: 16rem;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
color: var(--color-foreground, #17334a);
|
|
13
|
+
font-size: 0.75rem;
|
|
14
|
+
line-height: 1rem;
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
.
|
|
17
|
+
.ui-notice-marquee__track {
|
|
19
18
|
display: flex;
|
|
20
|
-
|
|
19
|
+
width: max-content;
|
|
20
|
+
flex-shrink: 0;
|
|
21
21
|
align-items: center;
|
|
22
|
-
|
|
22
|
+
animation: ui-notice-marquee-scroll var(--ui-notice-marquee-duration, 32s) linear infinite;
|
|
23
|
+
will-change: transform;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
.
|
|
26
|
-
|
|
27
|
-
flex:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
.ui-notice-marquee__group {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-shrink: 0;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: 1rem;
|
|
31
|
+
padding-inline-end: 1rem;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.ui-notice-marquee__item {
|
|
35
|
+
flex-shrink: 0;
|
|
33
36
|
white-space: nowrap;
|
|
34
|
-
transition: opacity 150ms, background 150ms;
|
|
35
37
|
}
|
|
36
38
|
|
|
37
|
-
.
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
.ui-notice-marquee:hover .ui-notice-marquee__track {
|
|
40
|
+
animation-play-state: paused;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@media (prefers-reduced-motion: reduce) {
|
|
44
|
+
.ui-notice-marquee__track {
|
|
45
|
+
animation: none;
|
|
46
|
+
will-change: auto;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.svp-contact-fab {
|
|
51
|
+
position: fixed;
|
|
52
|
+
right: 1.25rem;
|
|
53
|
+
top: 50%;
|
|
54
|
+
transform: translateY(-50%);
|
|
55
|
+
z-index: 1500;
|
|
56
|
+
width: 54px;
|
|
57
|
+
height: 54px;
|
|
58
|
+
border-radius: 16px;
|
|
59
|
+
border: none;
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
display: flex;
|
|
40
62
|
align-items: center;
|
|
41
63
|
justify-content: center;
|
|
42
|
-
|
|
43
|
-
padding: 0 1.2rem;
|
|
44
|
-
background: linear-gradient(90deg, #2563eb, #38bdf8);
|
|
45
|
-
box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
|
|
64
|
+
background: linear-gradient(135deg, var(--svp-primary, #2563eb), var(--svp-accent, #38bdf8));
|
|
46
65
|
color: #fff;
|
|
47
|
-
|
|
48
|
-
|
|
66
|
+
box-shadow: 0 12px 30px rgba(37,99,235,0.4);
|
|
67
|
+
transition: transform .18s ease, box-shadow .18s ease;
|
|
49
68
|
}
|
|
50
69
|
|
|
51
|
-
.svp-
|
|
52
|
-
|
|
70
|
+
.svp-contact-fab:hover {
|
|
71
|
+
transform: translateY(-50%) scale(1.06);
|
|
72
|
+
box-shadow: 0 16px 40px rgba(37,99,235,0.5);
|
|
53
73
|
}
|
|
54
74
|
|
|
55
|
-
.svp-
|
|
56
|
-
|
|
57
|
-
box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
|
|
75
|
+
.svp-contact-fab:active {
|
|
76
|
+
transform: translateY(-50%) scale(0.97);
|
|
58
77
|
}
|
|
59
78
|
|
|
60
|
-
.svp-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
align-items: center;
|
|
64
|
-
justify-content: center;
|
|
65
|
-
gap: 0.4rem;
|
|
66
|
-
border: 1px solid rgba(0, 0, 0, 0.08);
|
|
67
|
-
padding: 0 0.9rem;
|
|
68
|
-
background: #fff;
|
|
69
|
-
box-shadow: 0 2px 8px rgba(15, 30, 61, 0.08);
|
|
70
|
-
color: #0f1e3d;
|
|
71
|
-
font-size: 0.85rem;
|
|
72
|
-
font-weight: 600;
|
|
79
|
+
.svp-contact-fab:focus-visible {
|
|
80
|
+
outline: 2px solid var(--color-ring, #2563eb);
|
|
81
|
+
outline-offset: 3px;
|
|
73
82
|
}
|
|
74
83
|
|
|
75
|
-
.svp-
|
|
76
|
-
|
|
84
|
+
.svp-contact-fab-icon {
|
|
85
|
+
width: 26px;
|
|
86
|
+
height: 26px;
|
|
87
|
+
flex: 0 0 auto;
|
|
88
|
+
fill: currentColor;
|
|
77
89
|
}
|
|
78
90
|
|
|
79
|
-
@media (max-width:
|
|
80
|
-
.svp-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
font-size: 0.75rem;
|
|
91
|
+
@media (max-width: 560px) {
|
|
92
|
+
.svp-contact-fab {
|
|
93
|
+
width: 48px;
|
|
94
|
+
height: 48px;
|
|
95
|
+
right: 0.85rem;
|
|
96
|
+
border-radius: 14px;
|
|
86
97
|
}
|
|
87
98
|
|
|
88
|
-
.svp-
|
|
89
|
-
width:
|
|
99
|
+
.svp-contact-fab-icon {
|
|
100
|
+
width: 22px;
|
|
101
|
+
height: 22px;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@media (prefers-reduced-motion: reduce) {
|
|
106
|
+
.svp-contact-fab {
|
|
107
|
+
transition: none;
|
|
90
108
|
}
|
|
91
109
|
}
|
package/dist/tailwind.d.ts
CHANGED
|
@@ -36,8 +36,97 @@ export declare const uiButtonComponents: {
|
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
|
+
/** Explicit styles matching the website footer's 16rem infinite marquee. */
|
|
40
|
+
export declare const uiNoticeMarqueeComponents: {
|
|
41
|
+
'@keyframes ui-notice-marquee-scroll': {
|
|
42
|
+
from: {
|
|
43
|
+
transform: string;
|
|
44
|
+
};
|
|
45
|
+
to: {
|
|
46
|
+
transform: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
'.ui-notice-marquee': {
|
|
50
|
+
width: string;
|
|
51
|
+
overflow: string;
|
|
52
|
+
color: string;
|
|
53
|
+
'font-size': string;
|
|
54
|
+
'line-height': string;
|
|
55
|
+
};
|
|
56
|
+
'.ui-notice-marquee__track': {
|
|
57
|
+
display: string;
|
|
58
|
+
width: string;
|
|
59
|
+
'flex-shrink': string;
|
|
60
|
+
'align-items': string;
|
|
61
|
+
animation: string;
|
|
62
|
+
'will-change': string;
|
|
63
|
+
};
|
|
64
|
+
'.ui-notice-marquee__group': {
|
|
65
|
+
display: string;
|
|
66
|
+
'flex-shrink': string;
|
|
67
|
+
'align-items': string;
|
|
68
|
+
gap: string;
|
|
69
|
+
'padding-inline-end': string;
|
|
70
|
+
};
|
|
71
|
+
'.ui-notice-marquee__item': {
|
|
72
|
+
'flex-shrink': string;
|
|
73
|
+
'white-space': string;
|
|
74
|
+
};
|
|
75
|
+
'.ui-notice-marquee:hover .ui-notice-marquee__track': {
|
|
76
|
+
'animation-play-state': string;
|
|
77
|
+
};
|
|
78
|
+
'@media (prefers-reduced-motion: reduce)': {
|
|
79
|
+
'.ui-notice-marquee__track': {
|
|
80
|
+
animation: string;
|
|
81
|
+
'will-change': string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
39
85
|
/** Complete component configuration registered by the default SVP UI plugin. */
|
|
40
86
|
export declare const uiComponents: {
|
|
87
|
+
'@keyframes ui-notice-marquee-scroll': {
|
|
88
|
+
from: {
|
|
89
|
+
transform: string;
|
|
90
|
+
};
|
|
91
|
+
to: {
|
|
92
|
+
transform: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
'.ui-notice-marquee': {
|
|
96
|
+
width: string;
|
|
97
|
+
overflow: string;
|
|
98
|
+
color: string;
|
|
99
|
+
'font-size': string;
|
|
100
|
+
'line-height': string;
|
|
101
|
+
};
|
|
102
|
+
'.ui-notice-marquee__track': {
|
|
103
|
+
display: string;
|
|
104
|
+
width: string;
|
|
105
|
+
'flex-shrink': string;
|
|
106
|
+
'align-items': string;
|
|
107
|
+
animation: string;
|
|
108
|
+
'will-change': string;
|
|
109
|
+
};
|
|
110
|
+
'.ui-notice-marquee__group': {
|
|
111
|
+
display: string;
|
|
112
|
+
'flex-shrink': string;
|
|
113
|
+
'align-items': string;
|
|
114
|
+
gap: string;
|
|
115
|
+
'padding-inline-end': string;
|
|
116
|
+
};
|
|
117
|
+
'.ui-notice-marquee__item': {
|
|
118
|
+
'flex-shrink': string;
|
|
119
|
+
'white-space': string;
|
|
120
|
+
};
|
|
121
|
+
'.ui-notice-marquee:hover .ui-notice-marquee__track': {
|
|
122
|
+
'animation-play-state': string;
|
|
123
|
+
};
|
|
124
|
+
'@media (prefers-reduced-motion: reduce)': {
|
|
125
|
+
'.ui-notice-marquee__track': {
|
|
126
|
+
animation: string;
|
|
127
|
+
'will-change': string;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
41
130
|
'.ui-button': {
|
|
42
131
|
display: string;
|
|
43
132
|
'align-items': string;
|
|
@@ -74,11 +163,6 @@ export declare const uiComponents: {
|
|
|
74
163
|
};
|
|
75
164
|
};
|
|
76
165
|
};
|
|
77
|
-
/**
|
|
78
|
-
* Tailwind provider for the framework-agnostic SVP UI classes.
|
|
79
|
-
*
|
|
80
|
-
* Register this once in the consuming project's Tailwind configuration, then
|
|
81
|
-
* use `ui-button` classes from HTML, JSX, or any other markup.
|
|
82
|
-
*/
|
|
166
|
+
/** Tailwind provider for all framework-agnostic SVP UI classes. */
|
|
83
167
|
declare const svpUiPlugin: import("tailwindcss/plugin").PluginWithConfig;
|
|
84
168
|
export default svpUiPlugin;
|
package/dist/tailwind.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
function e
|
|
2
|
-
return { handler:
|
|
1
|
+
function i(e, r) {
|
|
2
|
+
return { handler: e, config: r };
|
|
3
3
|
}
|
|
4
|
-
|
|
5
|
-
function n
|
|
6
|
-
return { handler:
|
|
4
|
+
i.withOptions = function(e, r = () => ({})) {
|
|
5
|
+
function o(n) {
|
|
6
|
+
return { handler: e(n), config: r(n) };
|
|
7
7
|
}
|
|
8
|
-
return
|
|
8
|
+
return o.__isOptionsFunction = !0, o;
|
|
9
9
|
};
|
|
10
|
-
var
|
|
11
|
-
const
|
|
10
|
+
var t = i;
|
|
11
|
+
const a = {
|
|
12
12
|
".ui-button": {
|
|
13
13
|
display: "inline-flex",
|
|
14
14
|
"align-items": "center",
|
|
@@ -44,11 +44,55 @@ const c = {
|
|
|
44
44
|
"background-color": "color-mix(in srgb, var(--color-destructive, #e5484d) 90%, transparent)"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
},
|
|
48
|
-
|
|
47
|
+
}, c = {
|
|
48
|
+
"@keyframes ui-notice-marquee-scroll": {
|
|
49
|
+
from: { transform: "translateX(0)" },
|
|
50
|
+
to: { transform: "translateX(-50%)" }
|
|
51
|
+
},
|
|
52
|
+
".ui-notice-marquee": {
|
|
53
|
+
width: "16rem",
|
|
54
|
+
overflow: "hidden",
|
|
55
|
+
color: "var(--color-foreground, #17334a)",
|
|
56
|
+
"font-size": "0.75rem",
|
|
57
|
+
"line-height": "1rem"
|
|
58
|
+
},
|
|
59
|
+
".ui-notice-marquee__track": {
|
|
60
|
+
display: "flex",
|
|
61
|
+
width: "max-content",
|
|
62
|
+
"flex-shrink": "0",
|
|
63
|
+
"align-items": "center",
|
|
64
|
+
animation: "ui-notice-marquee-scroll var(--ui-notice-marquee-duration, 32s) linear infinite",
|
|
65
|
+
"will-change": "transform"
|
|
66
|
+
},
|
|
67
|
+
".ui-notice-marquee__group": {
|
|
68
|
+
display: "flex",
|
|
69
|
+
"flex-shrink": "0",
|
|
70
|
+
"align-items": "center",
|
|
71
|
+
gap: "1rem",
|
|
72
|
+
"padding-inline-end": "1rem"
|
|
73
|
+
},
|
|
74
|
+
".ui-notice-marquee__item": {
|
|
75
|
+
"flex-shrink": "0",
|
|
76
|
+
"white-space": "nowrap"
|
|
77
|
+
},
|
|
78
|
+
".ui-notice-marquee:hover .ui-notice-marquee__track": {
|
|
79
|
+
"animation-play-state": "paused"
|
|
80
|
+
},
|
|
81
|
+
"@media (prefers-reduced-motion: reduce)": {
|
|
82
|
+
".ui-notice-marquee__track": {
|
|
83
|
+
animation: "none",
|
|
84
|
+
"will-change": "auto"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}, u = {
|
|
88
|
+
...a,
|
|
89
|
+
...c
|
|
90
|
+
}, l = t(({ addBase: e, addComponents: r }) => {
|
|
91
|
+
e({ ":root": { "--svp-ui-brand": "#159bb5" } }), r(u);
|
|
49
92
|
});
|
|
50
93
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
94
|
+
l as default,
|
|
95
|
+
a as uiButtonComponents,
|
|
96
|
+
u as uiComponents,
|
|
97
|
+
c as uiNoticeMarqueeComponents
|
|
54
98
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@svp-chain-sdk/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Accessible UI primitives for SVP Chain SDK applications.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -21,12 +21,8 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@rainbow-me/rainbowkit": "2.2.11",
|
|
25
|
-
"@tanstack/react-query": "^5.62.11",
|
|
26
24
|
"react": ">=18",
|
|
27
|
-
"react-dom": ">=18"
|
|
28
|
-
"viem": "^2.21.54",
|
|
29
|
-
"wagmi": "^2.13.11"
|
|
25
|
+
"react-dom": ">=18"
|
|
30
26
|
},
|
|
31
27
|
"dependencies": {
|
|
32
28
|
"@radix-ui/react-slot": "^1.1.2",
|
|
@@ -35,12 +31,8 @@
|
|
|
35
31
|
"tailwind-merge": "^2.6.0"
|
|
36
32
|
},
|
|
37
33
|
"devDependencies": {
|
|
38
|
-
"@rainbow-me/rainbowkit": "2.2.11",
|
|
39
|
-
"@tailwindcss/vite": "^4.1.11",
|
|
40
|
-
"@tanstack/react-query": "^5.62.11",
|
|
41
|
-
"@testing-library/jest-dom": "^6.6.3",
|
|
42
34
|
"@testing-library/react": "^16.1.0",
|
|
43
|
-
"@
|
|
35
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
44
36
|
"@types/react": "^19.0.0",
|
|
45
37
|
"@types/react-dom": "^19.0.0",
|
|
46
38
|
"@vitejs/plugin-react": "^4.3.4",
|
|
@@ -48,11 +40,11 @@
|
|
|
48
40
|
"react": "^19.0.0",
|
|
49
41
|
"react-dom": "^19.0.0",
|
|
50
42
|
"tailwindcss": "^4.1.11",
|
|
43
|
+
"@tailwindcss/vite": "^4.1.11",
|
|
44
|
+
"@types/node": "^22.10.2",
|
|
51
45
|
"typescript": "^5.7.2",
|
|
52
|
-
"viem": "^2.21.54",
|
|
53
46
|
"vite": "^6.0.5",
|
|
54
|
-
"vitest": "^2.1.8"
|
|
55
|
-
"wagmi": "^2.13.11"
|
|
47
|
+
"vitest": "^2.1.8"
|
|
56
48
|
},
|
|
57
49
|
"scripts": {
|
|
58
50
|
"build": "rm -rf dist && vite build && vite build --config vite.tailwind.config.ts && cp src/styles.css dist/styles.css && tsc",
|