@tangle-network/sandbox-ui 0.133.6 → 0.133.7
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/dist/pages.js +14 -9
- package/package.json +1 -1
package/dist/pages.js
CHANGED
|
@@ -7,7 +7,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
import * as React$1 from "react";
|
|
8
8
|
import { useState } from "react";
|
|
9
9
|
import { AlertCircle, CheckCircle, ChevronDown, ChevronUp, Clock, Cpu, Eye, EyeOff, GripVertical, Key, Layers, Lock, MemoryStick, Pencil, Plus, Power, PowerOff, Terminal, Trash2, Upload } from "lucide-react";
|
|
10
|
-
import { focusField } from "@tangle-network/ui/utils";
|
|
10
|
+
import { cn, focusField, focusRing, ixControl, ixControlSoft, ixField } from "@tangle-network/ui/utils";
|
|
11
11
|
//#region src/pages/auth-page.tsx
|
|
12
12
|
const C = {
|
|
13
13
|
pageBg: "hsl(var(--background, 240 5% 97%))",
|
|
@@ -15,8 +15,6 @@ const C = {
|
|
|
15
15
|
border: "hsl(var(--border, 214 32% 91%))",
|
|
16
16
|
text: "hsl(var(--card-foreground, 222 47% 11%))",
|
|
17
17
|
muted: "hsl(var(--muted-foreground, 240 4% 46%))",
|
|
18
|
-
inputBg: "var(--well-card, var(--bg-input, #f5f5f4))",
|
|
19
|
-
inputBorder: "var(--field-border, hsl(var(--border, 214 32% 91%)))",
|
|
20
18
|
hover: "hsl(var(--muted, 240 5% 96%))",
|
|
21
19
|
danger: "hsl(var(--destructive, 0 72% 42%))",
|
|
22
20
|
ink: "hsl(var(--foreground, 222 47% 11%))",
|
|
@@ -66,6 +64,9 @@ function GoogleIcon() {
|
|
|
66
64
|
]
|
|
67
65
|
});
|
|
68
66
|
}
|
|
67
|
+
const OUTLINE_CONTROL = cn("border border-border", focusRing, ixControl);
|
|
68
|
+
const FIELD = cn("border", focusField, ixField);
|
|
69
|
+
const FILLED_CONTROL = cn("border border-transparent", focusRing, ixControl);
|
|
69
70
|
const SOCIAL_LABEL = {
|
|
70
71
|
github: "GitHub",
|
|
71
72
|
google: "Google"
|
|
@@ -109,19 +110,16 @@ function AuthPage({ product, tagline, mode = "signin", tangleAuthUrl = "/auth/ta
|
|
|
109
110
|
width: "100%",
|
|
110
111
|
padding: "0 16px",
|
|
111
112
|
...CONTROL,
|
|
112
|
-
border: `1px solid ${C.border}`,
|
|
113
113
|
background: "transparent",
|
|
114
114
|
color: C.text,
|
|
115
115
|
fontWeight: 500,
|
|
116
116
|
cursor: "pointer",
|
|
117
|
-
transition: "background 120ms"
|
|
117
|
+
transition: "background 120ms, border-color 120ms, box-shadow 120ms"
|
|
118
118
|
};
|
|
119
119
|
const inputStyle = {
|
|
120
120
|
width: "100%",
|
|
121
121
|
padding: "0 16px",
|
|
122
122
|
...CONTROL,
|
|
123
|
-
border: `1px solid ${C.inputBorder}`,
|
|
124
|
-
background: C.inputBg,
|
|
125
123
|
color: C.text
|
|
126
124
|
};
|
|
127
125
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -134,6 +132,7 @@ function AuthPage({ product, tagline, mode = "signin", tangleAuthUrl = "/auth/ta
|
|
|
134
132
|
background: C.pageBg
|
|
135
133
|
},
|
|
136
134
|
children: /* @__PURE__ */ jsxs("div", {
|
|
135
|
+
"data-slot": "card",
|
|
137
136
|
className,
|
|
138
137
|
style: {
|
|
139
138
|
width: "100%",
|
|
@@ -164,6 +163,7 @@ function AuthPage({ product, tagline, mode = "signin", tangleAuthUrl = "/auth/ta
|
|
|
164
163
|
}),
|
|
165
164
|
/* @__PURE__ */ jsxs("a", {
|
|
166
165
|
href: tangleAuthUrl,
|
|
166
|
+
className: FILLED_CONTROL,
|
|
167
167
|
style: {
|
|
168
168
|
display: "flex",
|
|
169
169
|
alignItems: "center",
|
|
@@ -173,11 +173,10 @@ function AuthPage({ product, tagline, mode = "signin", tangleAuthUrl = "/auth/ta
|
|
|
173
173
|
padding: "0 16px",
|
|
174
174
|
...CONTROL,
|
|
175
175
|
background: buttonBg,
|
|
176
|
-
border: "1px solid transparent",
|
|
177
176
|
color: buttonFg,
|
|
178
177
|
fontWeight: 600,
|
|
179
178
|
textDecoration: "none",
|
|
180
|
-
transition: "background 120ms"
|
|
179
|
+
transition: "background 120ms, border-color 120ms, box-shadow 120ms"
|
|
181
180
|
},
|
|
182
181
|
onMouseEnter: (e) => e.currentTarget.style.background = buttonHoverBg,
|
|
183
182
|
onMouseLeave: (e) => e.currentTarget.style.background = buttonBg,
|
|
@@ -192,6 +191,7 @@ function AuthPage({ product, tagline, mode = "signin", tangleAuthUrl = "/auth/ta
|
|
|
192
191
|
},
|
|
193
192
|
children: providers.map((p) => /* @__PURE__ */ jsxs("button", {
|
|
194
193
|
type: "button",
|
|
194
|
+
className: OUTLINE_CONTROL,
|
|
195
195
|
style: outlineBtn,
|
|
196
196
|
onClick: () => {
|
|
197
197
|
window.location.href = socialHref(p);
|
|
@@ -247,6 +247,7 @@ function AuthPage({ product, tagline, mode = "signin", tangleAuthUrl = "/auth/ta
|
|
|
247
247
|
autoComplete: "name",
|
|
248
248
|
value: name,
|
|
249
249
|
onChange: (e) => setName(e.target.value),
|
|
250
|
+
className: FIELD,
|
|
250
251
|
style: inputStyle
|
|
251
252
|
}),
|
|
252
253
|
/* @__PURE__ */ jsx("input", {
|
|
@@ -256,6 +257,7 @@ function AuthPage({ product, tagline, mode = "signin", tangleAuthUrl = "/auth/ta
|
|
|
256
257
|
placeholder: "Email",
|
|
257
258
|
value: email,
|
|
258
259
|
onChange: (e) => setEmail(e.target.value),
|
|
260
|
+
className: FIELD,
|
|
259
261
|
style: inputStyle
|
|
260
262
|
}),
|
|
261
263
|
/* @__PURE__ */ jsx("input", {
|
|
@@ -265,6 +267,7 @@ function AuthPage({ product, tagline, mode = "signin", tangleAuthUrl = "/auth/ta
|
|
|
265
267
|
placeholder: "Password",
|
|
266
268
|
value: password,
|
|
267
269
|
onChange: (e) => setPassword(e.target.value),
|
|
270
|
+
className: FIELD,
|
|
268
271
|
style: inputStyle
|
|
269
272
|
}),
|
|
270
273
|
error && /* @__PURE__ */ jsx("p", {
|
|
@@ -278,6 +281,7 @@ function AuthPage({ product, tagline, mode = "signin", tangleAuthUrl = "/auth/ta
|
|
|
278
281
|
/* @__PURE__ */ jsx("button", {
|
|
279
282
|
type: "submit",
|
|
280
283
|
disabled: loading,
|
|
284
|
+
className: OUTLINE_CONTROL,
|
|
281
285
|
style: {
|
|
282
286
|
...outlineBtn,
|
|
283
287
|
opacity: loading ? .5 : 1
|
|
@@ -296,6 +300,7 @@ function AuthPage({ product, tagline, mode = "signin", tangleAuthUrl = "/auth/ta
|
|
|
296
300
|
},
|
|
297
301
|
children: [isSignup ? "Already have an account? " : `New to Tangle${product ? ` ${product}` : ""}? `, /* @__PURE__ */ jsx("a", {
|
|
298
302
|
href: altHref,
|
|
303
|
+
className: cn("rounded-sm", focusRing, ixControlSoft),
|
|
299
304
|
style: {
|
|
300
305
|
fontWeight: 500,
|
|
301
306
|
color: C.text
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox-ui",
|
|
3
|
-
"version": "0.133.
|
|
3
|
+
"version": "0.133.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Unified UI component library for Tangle Sandbox — primitives, chat, dashboard, terminal, editor, and workspace components",
|
|
6
6
|
"repository": {
|