astryx-dracula 0.1.3 → 0.2.0
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/BRAND.md +1 -1
- package/README.md +2 -0
- package/USAGE.md +13 -0
- package/astryx-dracula.js +4 -4
- package/astryx.integration.mjs +3 -0
- package/package.json +4 -2
- package/templates/ai-chat-landing.template.mjs +6 -0
- package/templates/ai-chat-landing.tsx +476 -0
- package/templates/ai-chat.template.mjs +6 -0
- package/templates/ai-chat.tsx +762 -0
- package/templates/blank.template.mjs +6 -0
- package/templates/blank.tsx +16 -0
- package/templates/centered-hero.template.mjs +6 -0
- package/templates/centered-hero.tsx +188 -0
- package/templates/classic-gallery.template.mjs +6 -0
- package/templates/classic-gallery.tsx +181 -0
- package/templates/contact-form.template.mjs +6 -0
- package/templates/contact-form.tsx +292 -0
- package/templates/dashboard-portfolio.template.mjs +6 -0
- package/templates/dashboard-portfolio.tsx +800 -0
- package/templates/dashboard.template.mjs +6 -0
- package/templates/dashboard.tsx +774 -0
- package/templates/detail-page.template.mjs +6 -0
- package/templates/detail-page.tsx +695 -0
- package/templates/documentation-design.template.mjs +6 -0
- package/templates/documentation-design.tsx +751 -0
- package/templates/documentation-technical.template.mjs +6 -0
- package/templates/documentation-technical.tsx +292 -0
- package/templates/documentation.template.mjs +6 -0
- package/templates/documentation.tsx +347 -0
- package/templates/editor.template.mjs +6 -0
- package/templates/editor.tsx +959 -0
- package/templates/file-explorer.template.mjs +6 -0
- package/templates/file-explorer.tsx +577 -0
- package/templates/form-two-column.template.mjs +6 -0
- package/templates/form-two-column.tsx +314 -0
- package/templates/gallery-hero.template.mjs +6 -0
- package/templates/gallery-hero.tsx +287 -0
- package/templates/ide.template.mjs +6 -0
- package/templates/ide.tsx +533 -0
- package/templates/incident-console.template.mjs +6 -0
- package/templates/incident-console.tsx +584 -0
- package/templates/kanban-board.template.mjs +6 -0
- package/templates/kanban-board.tsx +746 -0
- package/templates/library.template.mjs +6 -0
- package/templates/library.tsx +489 -0
- package/templates/login-card.template.mjs +6 -0
- package/templates/login-card.tsx +200 -0
- package/templates/login-split.template.mjs +6 -0
- package/templates/login-split.tsx +318 -0
- package/templates/login-sso.template.mjs +6 -0
- package/templates/login-sso.tsx +277 -0
- package/templates/login.template.mjs +6 -0
- package/templates/login.tsx +98 -0
- package/templates/messaging-shell.template.mjs +6 -0
- package/templates/messaging-shell.tsx +675 -0
- package/templates/mixed-gallery.template.mjs +6 -0
- package/templates/mixed-gallery.tsx +190 -0
- package/templates/payment-form.template.mjs +6 -0
- package/templates/payment-form.tsx +990 -0
- package/templates/product-detail.template.mjs +6 -0
- package/templates/product-detail.tsx +366 -0
- package/templates/product-gallery.template.mjs +6 -0
- package/templates/product-gallery.tsx +173 -0
- package/templates/settings-dialog.template.mjs +6 -0
- package/templates/settings-dialog.tsx +920 -0
- package/templates/settings-sidebar.template.mjs +6 -0
- package/templates/settings-sidebar.tsx +952 -0
- package/templates/settings.template.mjs +6 -0
- package/templates/settings.tsx +235 -0
- package/templates/shell-nav.template.mjs +6 -0
- package/templates/shell-nav.tsx +306 -0
- package/templates/shell-side-nav.template.mjs +6 -0
- package/templates/shell-side-nav.tsx +238 -0
- package/templates/shell-top-nav.template.mjs +6 -0
- package/templates/shell-top-nav.tsx +243 -0
- package/templates/side-gallery.template.mjs +6 -0
- package/templates/side-gallery.tsx +179 -0
- package/templates/table-grouped.template.mjs +6 -0
- package/templates/table-grouped.tsx +1174 -0
- package/templates/table-page-chart.template.mjs +6 -0
- package/templates/table-page-chart.tsx +693 -0
- package/templates/table-page-heatmap-status.template.mjs +6 -0
- package/templates/table-page-heatmap-status.tsx +547 -0
- package/templates/table-page-shoe-store-heatmap.template.mjs +6 -0
- package/templates/table-page-shoe-store-heatmap.tsx +1038 -0
- package/templates/table-page.template.mjs +6 -0
- package/templates/table-page.tsx +445 -0
- package/templates/table.template.mjs +6 -0
- package/templates/table.tsx +84 -0
- package/templates/theme-showcase.template.mjs +6 -0
- package/templates/theme-showcase.tsx +1282 -0
- package/theme.css +4 -4
- package/tokens.css +4 -4
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
import {useState, type CSSProperties} from 'react';
|
|
4
|
+
import {Moon} from 'lucide-react';
|
|
5
|
+
import {VStack} from '@astryxdesign/core/Layout';
|
|
6
|
+
import {Center} from '@astryxdesign/core/Center';
|
|
7
|
+
import {Text, Heading} from '@astryxdesign/core/Text';
|
|
8
|
+
import {TextInput} from '@astryxdesign/core/TextInput';
|
|
9
|
+
import {Button} from '@astryxdesign/core/Button';
|
|
10
|
+
import {Card} from '@astryxdesign/core/Card';
|
|
11
|
+
import {Icon} from '@astryxdesign/core/Icon';
|
|
12
|
+
import {Banner} from '@astryxdesign/core/Banner';
|
|
13
|
+
|
|
14
|
+
// Standalone auth page paints its own body background (no host shell).
|
|
15
|
+
const pageStyle: CSSProperties = {
|
|
16
|
+
minHeight: '100%',
|
|
17
|
+
backgroundColor: 'var(--color-background-body)',
|
|
18
|
+
padding: 'var(--spacing-6)',
|
|
19
|
+
};
|
|
20
|
+
// Cap the column at 400px but let it shrink to fit narrow screens (Stack
|
|
21
|
+
// has no maxWidth prop, so it's set here).
|
|
22
|
+
const contentStyle: CSSProperties = {
|
|
23
|
+
width: '100%',
|
|
24
|
+
maxWidth: 400,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default function LoginPage() {
|
|
28
|
+
const [email, setEmail] = useState('');
|
|
29
|
+
const [password, setPassword] = useState('');
|
|
30
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
31
|
+
const [error, setError] = useState('');
|
|
32
|
+
|
|
33
|
+
const handleSignIn = () => {
|
|
34
|
+
setError('');
|
|
35
|
+
if (!email || !password) {
|
|
36
|
+
setError('Whisper both your email and password to enter the night.');
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
setIsLoading(true);
|
|
40
|
+
setTimeout(() => setIsLoading(false), 2000);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<Center axis="both" style={pageStyle}>
|
|
45
|
+
<VStack gap={4} hAlign="center" style={contentStyle}>
|
|
46
|
+
{/* Logo */}
|
|
47
|
+
<VStack gap={2} hAlign="center">
|
|
48
|
+
<Icon icon={Moon} size="lg" color="accent" />
|
|
49
|
+
<Text type="body" weight="bold" size="lg">
|
|
50
|
+
Castle Dracula
|
|
51
|
+
</Text>
|
|
52
|
+
</VStack>
|
|
53
|
+
|
|
54
|
+
{/* Card */}
|
|
55
|
+
<Card padding={8} width="100%">
|
|
56
|
+
<VStack gap={4} hAlign="stretch">
|
|
57
|
+
<VStack gap={1} hAlign="center">
|
|
58
|
+
<Heading level={2} justify="center">
|
|
59
|
+
Welcome back to the night
|
|
60
|
+
</Heading>
|
|
61
|
+
<Text type="body" color="secondary">
|
|
62
|
+
Sign in to your crypt
|
|
63
|
+
</Text>
|
|
64
|
+
</VStack>
|
|
65
|
+
|
|
66
|
+
{error && <Banner status="error" title={error} container="card" />}
|
|
67
|
+
|
|
68
|
+
<TextInput
|
|
69
|
+
label="Email"
|
|
70
|
+
value={email}
|
|
71
|
+
onChange={setEmail}
|
|
72
|
+
placeholder="you@castle.dracula"
|
|
73
|
+
type="email"
|
|
74
|
+
size="lg"
|
|
75
|
+
/>
|
|
76
|
+
|
|
77
|
+
<TextInput
|
|
78
|
+
label="Password"
|
|
79
|
+
value={password}
|
|
80
|
+
onChange={setPassword}
|
|
81
|
+
placeholder="Whisper your password"
|
|
82
|
+
type="password"
|
|
83
|
+
size="lg"
|
|
84
|
+
/>
|
|
85
|
+
|
|
86
|
+
<Button
|
|
87
|
+
label="Enter the night"
|
|
88
|
+
variant="primary"
|
|
89
|
+
size="lg"
|
|
90
|
+
isLoading={isLoading}
|
|
91
|
+
onClick={handleSignIn}
|
|
92
|
+
/>
|
|
93
|
+
</VStack>
|
|
94
|
+
</Card>
|
|
95
|
+
</VStack>
|
|
96
|
+
</Center>
|
|
97
|
+
);
|
|
98
|
+
}
|