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.
Files changed (94) hide show
  1. package/BRAND.md +1 -1
  2. package/README.md +2 -0
  3. package/USAGE.md +13 -0
  4. package/astryx-dracula.js +4 -4
  5. package/astryx.integration.mjs +3 -0
  6. package/package.json +4 -2
  7. package/templates/ai-chat-landing.template.mjs +6 -0
  8. package/templates/ai-chat-landing.tsx +476 -0
  9. package/templates/ai-chat.template.mjs +6 -0
  10. package/templates/ai-chat.tsx +762 -0
  11. package/templates/blank.template.mjs +6 -0
  12. package/templates/blank.tsx +16 -0
  13. package/templates/centered-hero.template.mjs +6 -0
  14. package/templates/centered-hero.tsx +188 -0
  15. package/templates/classic-gallery.template.mjs +6 -0
  16. package/templates/classic-gallery.tsx +181 -0
  17. package/templates/contact-form.template.mjs +6 -0
  18. package/templates/contact-form.tsx +292 -0
  19. package/templates/dashboard-portfolio.template.mjs +6 -0
  20. package/templates/dashboard-portfolio.tsx +800 -0
  21. package/templates/dashboard.template.mjs +6 -0
  22. package/templates/dashboard.tsx +774 -0
  23. package/templates/detail-page.template.mjs +6 -0
  24. package/templates/detail-page.tsx +695 -0
  25. package/templates/documentation-design.template.mjs +6 -0
  26. package/templates/documentation-design.tsx +751 -0
  27. package/templates/documentation-technical.template.mjs +6 -0
  28. package/templates/documentation-technical.tsx +292 -0
  29. package/templates/documentation.template.mjs +6 -0
  30. package/templates/documentation.tsx +347 -0
  31. package/templates/editor.template.mjs +6 -0
  32. package/templates/editor.tsx +959 -0
  33. package/templates/file-explorer.template.mjs +6 -0
  34. package/templates/file-explorer.tsx +577 -0
  35. package/templates/form-two-column.template.mjs +6 -0
  36. package/templates/form-two-column.tsx +314 -0
  37. package/templates/gallery-hero.template.mjs +6 -0
  38. package/templates/gallery-hero.tsx +287 -0
  39. package/templates/ide.template.mjs +6 -0
  40. package/templates/ide.tsx +533 -0
  41. package/templates/incident-console.template.mjs +6 -0
  42. package/templates/incident-console.tsx +584 -0
  43. package/templates/kanban-board.template.mjs +6 -0
  44. package/templates/kanban-board.tsx +746 -0
  45. package/templates/library.template.mjs +6 -0
  46. package/templates/library.tsx +489 -0
  47. package/templates/login-card.template.mjs +6 -0
  48. package/templates/login-card.tsx +200 -0
  49. package/templates/login-split.template.mjs +6 -0
  50. package/templates/login-split.tsx +318 -0
  51. package/templates/login-sso.template.mjs +6 -0
  52. package/templates/login-sso.tsx +277 -0
  53. package/templates/login.template.mjs +6 -0
  54. package/templates/login.tsx +98 -0
  55. package/templates/messaging-shell.template.mjs +6 -0
  56. package/templates/messaging-shell.tsx +675 -0
  57. package/templates/mixed-gallery.template.mjs +6 -0
  58. package/templates/mixed-gallery.tsx +190 -0
  59. package/templates/payment-form.template.mjs +6 -0
  60. package/templates/payment-form.tsx +990 -0
  61. package/templates/product-detail.template.mjs +6 -0
  62. package/templates/product-detail.tsx +366 -0
  63. package/templates/product-gallery.template.mjs +6 -0
  64. package/templates/product-gallery.tsx +173 -0
  65. package/templates/settings-dialog.template.mjs +6 -0
  66. package/templates/settings-dialog.tsx +920 -0
  67. package/templates/settings-sidebar.template.mjs +6 -0
  68. package/templates/settings-sidebar.tsx +952 -0
  69. package/templates/settings.template.mjs +6 -0
  70. package/templates/settings.tsx +235 -0
  71. package/templates/shell-nav.template.mjs +6 -0
  72. package/templates/shell-nav.tsx +306 -0
  73. package/templates/shell-side-nav.template.mjs +6 -0
  74. package/templates/shell-side-nav.tsx +238 -0
  75. package/templates/shell-top-nav.template.mjs +6 -0
  76. package/templates/shell-top-nav.tsx +243 -0
  77. package/templates/side-gallery.template.mjs +6 -0
  78. package/templates/side-gallery.tsx +179 -0
  79. package/templates/table-grouped.template.mjs +6 -0
  80. package/templates/table-grouped.tsx +1174 -0
  81. package/templates/table-page-chart.template.mjs +6 -0
  82. package/templates/table-page-chart.tsx +693 -0
  83. package/templates/table-page-heatmap-status.template.mjs +6 -0
  84. package/templates/table-page-heatmap-status.tsx +547 -0
  85. package/templates/table-page-shoe-store-heatmap.template.mjs +6 -0
  86. package/templates/table-page-shoe-store-heatmap.tsx +1038 -0
  87. package/templates/table-page.template.mjs +6 -0
  88. package/templates/table-page.tsx +445 -0
  89. package/templates/table.template.mjs +6 -0
  90. package/templates/table.tsx +84 -0
  91. package/templates/theme-showcase.template.mjs +6 -0
  92. package/templates/theme-showcase.tsx +1282 -0
  93. package/theme.css +4 -4
  94. 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
+ }
@@ -0,0 +1,6 @@
1
+ export default {
2
+ type: 'page',
3
+ name: 'Messaging Shell',
4
+ description: 'Team messaging shell with channels and thread panel',
5
+ category: 'tooling',
6
+ };