astryx-dracula 0.4.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.
- package/astryx.integration.mjs +1 -1
- package/icons.mjs +17 -17
- package/icons.tsx +61 -62
- package/package.json +120 -116
- package/shared/auth-chrome-config.ts +6 -6
- package/shared/auth-chrome.tsx +168 -19
- package/shared/auth-copy.ts +14 -14
- package/shared/chaptered-doc-config.ts +48 -51
- package/shared/chaptered-doc.tsx +270 -292
- package/shared/chart-hues.ts +10 -15
- package/shared/chart-labels.tsx +31 -30
- package/shared/chart-legend.tsx +55 -57
- package/shared/chart-panel-style.ts +3 -3
- package/shared/data-bar.tsx +97 -102
- package/shared/format-money.ts +3 -0
- package/shared/gallery-image.ts +6 -6
- package/shared/login-demo.ts +1 -1
- package/shared/metric-card.tsx +123 -0
- package/shared/metric-delta.tsx +28 -27
- package/shared/order-desk.tsx +205 -216
- package/shared/revenue-chart.tsx +145 -165
- package/shared/scene-castle.tsx +206 -291
- package/shared/scene-frame.tsx +33 -32
- package/shared/scene-hues.ts +17 -25
- package/shared/scene-tile.tsx +88 -100
- package/shared/settings-data.ts +132 -104
- package/shared/settings-rows.tsx +143 -163
- package/shared/sparkline.tsx +75 -88
- package/shared/sso-icons.tsx +10 -22
- package/shared/stars.tsx +19 -0
- package/templates/ai-chat-landing.template.mjs +4 -4
- package/templates/ai-chat-landing.tsx +468 -447
- package/templates/ai-chat.template.mjs +4 -4
- package/templates/ai-chat.tsx +561 -645
- package/templates/blank.template.mjs +4 -4
- package/templates/blank.tsx +14 -12
- package/templates/centered-hero.template.mjs +4 -4
- package/templates/centered-hero.tsx +52 -67
- package/templates/classic-gallery.template.mjs +4 -4
- package/templates/classic-gallery.tsx +92 -101
- package/templates/contact-form.template.mjs +4 -4
- package/templates/contact-form.tsx +243 -280
- package/templates/dashboard-portfolio.template.mjs +4 -4
- package/templates/dashboard-portfolio.tsx +723 -634
- package/templates/dashboard.template.mjs +4 -4
- package/templates/dashboard.tsx +592 -682
- package/templates/detail-page.template.mjs +4 -4
- package/templates/detail-page.tsx +537 -598
- package/templates/documentation-design.template.mjs +4 -4
- package/templates/documentation-design.tsx +242 -709
- package/templates/documentation-technical.template.mjs +4 -4
- package/templates/documentation-technical.tsx +233 -258
- package/templates/documentation.template.mjs +4 -4
- package/templates/documentation.tsx +263 -277
- package/templates/editor.template.mjs +4 -4
- package/templates/editor.tsx +847 -899
- package/templates/file-explorer.template.mjs +4 -4
- package/templates/file-explorer.tsx +562 -602
- package/templates/form-two-column.template.mjs +4 -4
- package/templates/form-two-column.tsx +187 -208
- package/templates/gallery-hero.template.mjs +4 -4
- package/templates/gallery-hero.tsx +89 -112
- package/templates/ide.template.mjs +4 -4
- package/templates/ide.tsx +405 -462
- package/templates/incident-console.template.mjs +4 -4
- package/templates/incident-console.tsx +559 -581
- package/templates/kanban-board.template.mjs +4 -4
- package/templates/kanban-board.tsx +660 -729
- package/templates/library.template.mjs +4 -4
- package/templates/library.tsx +405 -452
- package/templates/login-card.template.mjs +4 -4
- package/templates/login-card.tsx +59 -163
- package/templates/login-split.template.mjs +4 -4
- package/templates/login-split.tsx +196 -232
- package/templates/login-sso.template.mjs +4 -4
- package/templates/login-sso.tsx +253 -277
- package/templates/login.template.mjs +4 -4
- package/templates/login.tsx +51 -149
- package/templates/messaging-shell.template.mjs +4 -4
- package/templates/messaging-shell.tsx +596 -624
- package/templates/mixed-gallery.template.mjs +4 -4
- package/templates/mixed-gallery.tsx +56 -56
- package/templates/payment-form.template.mjs +4 -4
- package/templates/payment-form.tsx +877 -990
- package/templates/product-detail.template.mjs +4 -4
- package/templates/product-detail.tsx +251 -302
- package/templates/product-gallery.template.mjs +4 -4
- package/templates/product-gallery.tsx +122 -135
- package/templates/product-tour.template.mjs +4 -4
- package/templates/product-tour.tsx +737 -794
- package/templates/settings-dialog.template.mjs +4 -4
- package/templates/settings-dialog.tsx +694 -747
- package/templates/settings-sidebar.template.mjs +4 -4
- package/templates/settings-sidebar.tsx +768 -848
- package/templates/settings.template.mjs +4 -4
- package/templates/settings.tsx +306 -230
- package/templates/shell-nav.template.mjs +4 -4
- package/templates/shell-nav.tsx +217 -277
- package/templates/shell-side-nav.template.mjs +4 -4
- package/templates/shell-side-nav.tsx +130 -231
- package/templates/shell-top-nav.template.mjs +4 -4
- package/templates/shell-top-nav.tsx +192 -248
- package/templates/side-gallery.template.mjs +4 -4
- package/templates/side-gallery.tsx +87 -94
- package/templates/table-grouped.template.mjs +4 -4
- package/templates/table-grouped.tsx +999 -1201
- package/templates/table-page-chart.template.mjs +4 -4
- package/templates/table-page-chart.tsx +398 -397
- package/templates/table-page-heatmap-status.template.mjs +4 -4
- package/templates/table-page-heatmap-status.tsx +479 -527
- package/templates/table-page-shoe-store-heatmap.template.mjs +4 -4
- package/templates/table-page-shoe-store-heatmap.tsx +746 -746
- package/templates/table-page.template.mjs +4 -4
- package/templates/table-page.tsx +393 -431
- package/templates/table.template.mjs +4 -4
- package/templates/table.tsx +93 -99
- package/templates/tech-report.template.mjs +4 -4
- package/templates/tech-report.tsx +1320 -1324
- package/templates/theme-showcase.template.mjs +4 -4
- package/templates/theme-showcase.tsx +869 -1246
- package/tokens.css +340 -343
package/templates/login.tsx
CHANGED
|
@@ -2,156 +2,58 @@
|
|
|
2
2
|
// XLE (canonical structure, validated with `bunx astryx layout check`):
|
|
3
3
|
// Ctr > V[g=4 a=center] > (V[g=2 a=center] > Ic + Tx"Castle Dracula"[t=body]) + (C[p=4] > V[g=4] > (V[g=1 a=center] > Hd"Welcome back to the night"[level=1] + Tx"Sign in to your crypt"[t=body]) + TI"Email"[t=email] + (V[g=1] > TI"Password"[t=password] + Lk"Forgot password?") + B.primary"Enter the night" + (V[a=center] > Tx"New to the castle?"[t=supporting] + Lk"Sign up")) + (V[a=center] > Tx"By clicking continue, you agree to our Terms of service and Privacy policy"[t=supporting])
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Center } from "@astryxdesign/core/Center";
|
|
6
|
+
import { VStack } from "@astryxdesign/core/Layout";
|
|
7
|
+
import { AuthCard, AuthLoginFields, LoginBrand } from "astryx-dracula/shared/auth-chrome";
|
|
7
8
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
AUTH_ERROR_MESSAGE,
|
|
15
|
-
AUTH_EMAIL_PLACEHOLDER,
|
|
16
|
-
AUTH_PASSWORD_PLACEHOLDER,
|
|
17
|
-
AUTH_TERMS_PREFIX,
|
|
18
|
-
AUTH_TERMS_SERVICE,
|
|
19
|
-
AUTH_TERMS_PRIVACY,
|
|
20
|
-
} from 'astryx-dracula/shared/auth-copy';
|
|
21
|
-
import {VStack} from '@astryxdesign/core/Layout';
|
|
22
|
-
import {Center} from '@astryxdesign/core/Center';
|
|
23
|
-
import {Text, Heading} from '@astryxdesign/core/Text';
|
|
24
|
-
import {TextInput} from '@astryxdesign/core/TextInput';
|
|
25
|
-
import {Button} from '@astryxdesign/core/Button';
|
|
26
|
-
import {Card} from '@astryxdesign/core/Card';
|
|
27
|
-
import {Link} from '@astryxdesign/core/Link';
|
|
28
|
-
|
|
29
|
-
import {authPageStyle as pageStyle, authContentStyle as contentStyle, inputAutoComplete} from 'astryx-dracula/shared/auth-chrome-config';
|
|
30
|
-
import {LoginBrand} from 'astryx-dracula/shared/auth-chrome';
|
|
9
|
+
authContentStyle as contentStyle,
|
|
10
|
+
authPageStyle as pageStyle,
|
|
11
|
+
} from "astryx-dracula/shared/auth-chrome-config";
|
|
12
|
+
import { AUTH_ERROR_MESSAGE } from "astryx-dracula/shared/auth-copy";
|
|
13
|
+
import { demoLogin } from "astryx-dracula/shared/login-demo";
|
|
14
|
+
import { useState, useTransition } from "react";
|
|
31
15
|
|
|
32
16
|
export default function LoginPage() {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
isLabelHidden
|
|
76
|
-
value={email}
|
|
77
|
-
onChange={v => {
|
|
78
|
-
setEmail(v);
|
|
79
|
-
setError(null);
|
|
80
|
-
}}
|
|
81
|
-
placeholder={AUTH_EMAIL_PLACEHOLDER}
|
|
82
|
-
type="email"
|
|
83
|
-
{...inputAutoComplete('email')}
|
|
84
|
-
size="lg"
|
|
85
|
-
onEnter={handleSignIn}
|
|
86
|
-
status={error ? {type: 'error', message: error} : undefined}
|
|
87
|
-
/>
|
|
88
|
-
|
|
89
|
-
<VStack gap={1}>
|
|
90
|
-
<TextInput
|
|
91
|
-
label="Password"
|
|
92
|
-
isLabelHidden
|
|
93
|
-
value={password}
|
|
94
|
-
onChange={v => {
|
|
95
|
-
setPassword(v);
|
|
96
|
-
setError(null);
|
|
97
|
-
}}
|
|
98
|
-
placeholder={AUTH_PASSWORD_PLACEHOLDER}
|
|
99
|
-
type="password"
|
|
100
|
-
{...inputAutoComplete('current-password')}
|
|
101
|
-
size="lg"
|
|
102
|
-
onEnter={handleSignIn}
|
|
103
|
-
status={error ? {type: 'error', message: error} : undefined}
|
|
104
|
-
/>
|
|
105
|
-
{error && (
|
|
106
|
-
<VStack hAlign="end">
|
|
107
|
-
<Link
|
|
108
|
-
href="#/templates/login"
|
|
109
|
-
color="secondary"
|
|
110
|
-
isStandalone>
|
|
111
|
-
{AUTH_FORGOT_PASSWORD}
|
|
112
|
-
</Link>
|
|
113
|
-
</VStack>
|
|
114
|
-
)}
|
|
115
|
-
</VStack>
|
|
116
|
-
</VStack>
|
|
117
|
-
|
|
118
|
-
<Button
|
|
119
|
-
label={AUTH_PRIMARY_CTA}
|
|
120
|
-
variant="primary"
|
|
121
|
-
size="lg"
|
|
122
|
-
isLoading={isLoading}
|
|
123
|
-
onClick={handleSignIn}
|
|
124
|
-
/>
|
|
125
|
-
|
|
126
|
-
{/* Prose links. A link inside a sentence needs a persistent
|
|
127
|
-
underline — colour alone is not a cue (WCAG 1.4.1 / F73),
|
|
128
|
-
and the kit underlines on hover only. */}
|
|
129
|
-
<VStack hAlign="center">
|
|
130
|
-
<Text type="supporting" color="secondary">
|
|
131
|
-
{AUTH_SIGNUP_PROMPT}{' '}
|
|
132
|
-
<Link href="#/templates/login" type="supporting" hasUnderline>
|
|
133
|
-
{AUTH_SIGNUP_LINK}
|
|
134
|
-
</Link>
|
|
135
|
-
</Text>
|
|
136
|
-
</VStack>
|
|
137
|
-
</VStack>
|
|
138
|
-
</Card>
|
|
139
|
-
|
|
140
|
-
{/* Terms */}
|
|
141
|
-
<VStack hAlign="center" width="100%">
|
|
142
|
-
<Text type="supporting" color="secondary" justify="center">
|
|
143
|
-
{AUTH_TERMS_PREFIX}{' '}
|
|
144
|
-
<Link href="#/templates/login" type="supporting" hasUnderline>
|
|
145
|
-
{AUTH_TERMS_SERVICE}
|
|
146
|
-
</Link>{' '}
|
|
147
|
-
and{' '}
|
|
148
|
-
<Link href="#/templates/login" type="supporting" hasUnderline>
|
|
149
|
-
{AUTH_TERMS_PRIVACY}
|
|
150
|
-
</Link>
|
|
151
|
-
.
|
|
152
|
-
</Text>
|
|
153
|
-
</VStack>
|
|
154
|
-
</VStack>
|
|
155
|
-
</Center>
|
|
156
|
-
);
|
|
17
|
+
const [email, setEmail] = useState("");
|
|
18
|
+
const [password, setPassword] = useState("");
|
|
19
|
+
const [isLoading, startTransition] = useTransition();
|
|
20
|
+
const [error, setError] = useState<string | null>(null);
|
|
21
|
+
|
|
22
|
+
const handleSignIn = () => {
|
|
23
|
+
setError(null);
|
|
24
|
+
if (!email || !password) {
|
|
25
|
+
setError(AUTH_ERROR_MESSAGE);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
startTransition(async () => {
|
|
29
|
+
await demoLogin();
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<Center axis="both" style={pageStyle}>
|
|
35
|
+
<VStack gap={4} hAlign="center" style={contentStyle}>
|
|
36
|
+
<LoginBrand />
|
|
37
|
+
|
|
38
|
+
<AuthCard selfHash="#/templates/login">
|
|
39
|
+
<AuthLoginFields
|
|
40
|
+
email={email}
|
|
41
|
+
password={password}
|
|
42
|
+
error={error}
|
|
43
|
+
selfHash="#/templates/login"
|
|
44
|
+
isLoading={isLoading}
|
|
45
|
+
onEmailChange={(v) => {
|
|
46
|
+
setEmail(v);
|
|
47
|
+
setError(null);
|
|
48
|
+
}}
|
|
49
|
+
onPasswordChange={(v) => {
|
|
50
|
+
setPassword(v);
|
|
51
|
+
setError(null);
|
|
52
|
+
}}
|
|
53
|
+
onSubmit={handleSignIn}
|
|
54
|
+
/>
|
|
55
|
+
</AuthCard>
|
|
56
|
+
</VStack>
|
|
57
|
+
</Center>
|
|
58
|
+
);
|
|
157
59
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
type: "page",
|
|
3
|
+
name: "Messaging Shell",
|
|
4
|
+
description: "Team messaging shell with channels and thread panel",
|
|
5
|
+
category: "tooling",
|
|
6
6
|
};
|