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.
Files changed (121) hide show
  1. package/astryx.integration.mjs +1 -1
  2. package/icons.mjs +17 -17
  3. package/icons.tsx +61 -62
  4. package/package.json +120 -116
  5. package/shared/auth-chrome-config.ts +6 -6
  6. package/shared/auth-chrome.tsx +168 -19
  7. package/shared/auth-copy.ts +14 -14
  8. package/shared/chaptered-doc-config.ts +48 -51
  9. package/shared/chaptered-doc.tsx +270 -292
  10. package/shared/chart-hues.ts +10 -15
  11. package/shared/chart-labels.tsx +31 -30
  12. package/shared/chart-legend.tsx +55 -57
  13. package/shared/chart-panel-style.ts +3 -3
  14. package/shared/data-bar.tsx +97 -102
  15. package/shared/format-money.ts +3 -0
  16. package/shared/gallery-image.ts +6 -6
  17. package/shared/login-demo.ts +1 -1
  18. package/shared/metric-card.tsx +123 -0
  19. package/shared/metric-delta.tsx +28 -27
  20. package/shared/order-desk.tsx +205 -216
  21. package/shared/revenue-chart.tsx +145 -165
  22. package/shared/scene-castle.tsx +206 -291
  23. package/shared/scene-frame.tsx +33 -32
  24. package/shared/scene-hues.ts +17 -25
  25. package/shared/scene-tile.tsx +88 -100
  26. package/shared/settings-data.ts +132 -104
  27. package/shared/settings-rows.tsx +143 -163
  28. package/shared/sparkline.tsx +75 -88
  29. package/shared/sso-icons.tsx +10 -22
  30. package/shared/stars.tsx +19 -0
  31. package/templates/ai-chat-landing.template.mjs +4 -4
  32. package/templates/ai-chat-landing.tsx +468 -447
  33. package/templates/ai-chat.template.mjs +4 -4
  34. package/templates/ai-chat.tsx +561 -645
  35. package/templates/blank.template.mjs +4 -4
  36. package/templates/blank.tsx +14 -12
  37. package/templates/centered-hero.template.mjs +4 -4
  38. package/templates/centered-hero.tsx +52 -67
  39. package/templates/classic-gallery.template.mjs +4 -4
  40. package/templates/classic-gallery.tsx +92 -101
  41. package/templates/contact-form.template.mjs +4 -4
  42. package/templates/contact-form.tsx +243 -280
  43. package/templates/dashboard-portfolio.template.mjs +4 -4
  44. package/templates/dashboard-portfolio.tsx +723 -634
  45. package/templates/dashboard.template.mjs +4 -4
  46. package/templates/dashboard.tsx +592 -682
  47. package/templates/detail-page.template.mjs +4 -4
  48. package/templates/detail-page.tsx +537 -598
  49. package/templates/documentation-design.template.mjs +4 -4
  50. package/templates/documentation-design.tsx +242 -709
  51. package/templates/documentation-technical.template.mjs +4 -4
  52. package/templates/documentation-technical.tsx +233 -258
  53. package/templates/documentation.template.mjs +4 -4
  54. package/templates/documentation.tsx +263 -277
  55. package/templates/editor.template.mjs +4 -4
  56. package/templates/editor.tsx +847 -899
  57. package/templates/file-explorer.template.mjs +4 -4
  58. package/templates/file-explorer.tsx +562 -602
  59. package/templates/form-two-column.template.mjs +4 -4
  60. package/templates/form-two-column.tsx +187 -208
  61. package/templates/gallery-hero.template.mjs +4 -4
  62. package/templates/gallery-hero.tsx +89 -112
  63. package/templates/ide.template.mjs +4 -4
  64. package/templates/ide.tsx +405 -462
  65. package/templates/incident-console.template.mjs +4 -4
  66. package/templates/incident-console.tsx +559 -581
  67. package/templates/kanban-board.template.mjs +4 -4
  68. package/templates/kanban-board.tsx +660 -729
  69. package/templates/library.template.mjs +4 -4
  70. package/templates/library.tsx +405 -452
  71. package/templates/login-card.template.mjs +4 -4
  72. package/templates/login-card.tsx +59 -163
  73. package/templates/login-split.template.mjs +4 -4
  74. package/templates/login-split.tsx +196 -232
  75. package/templates/login-sso.template.mjs +4 -4
  76. package/templates/login-sso.tsx +253 -277
  77. package/templates/login.template.mjs +4 -4
  78. package/templates/login.tsx +51 -149
  79. package/templates/messaging-shell.template.mjs +4 -4
  80. package/templates/messaging-shell.tsx +596 -624
  81. package/templates/mixed-gallery.template.mjs +4 -4
  82. package/templates/mixed-gallery.tsx +56 -56
  83. package/templates/payment-form.template.mjs +4 -4
  84. package/templates/payment-form.tsx +877 -990
  85. package/templates/product-detail.template.mjs +4 -4
  86. package/templates/product-detail.tsx +251 -302
  87. package/templates/product-gallery.template.mjs +4 -4
  88. package/templates/product-gallery.tsx +122 -135
  89. package/templates/product-tour.template.mjs +4 -4
  90. package/templates/product-tour.tsx +737 -794
  91. package/templates/settings-dialog.template.mjs +4 -4
  92. package/templates/settings-dialog.tsx +694 -747
  93. package/templates/settings-sidebar.template.mjs +4 -4
  94. package/templates/settings-sidebar.tsx +768 -848
  95. package/templates/settings.template.mjs +4 -4
  96. package/templates/settings.tsx +306 -230
  97. package/templates/shell-nav.template.mjs +4 -4
  98. package/templates/shell-nav.tsx +217 -277
  99. package/templates/shell-side-nav.template.mjs +4 -4
  100. package/templates/shell-side-nav.tsx +130 -231
  101. package/templates/shell-top-nav.template.mjs +4 -4
  102. package/templates/shell-top-nav.tsx +192 -248
  103. package/templates/side-gallery.template.mjs +4 -4
  104. package/templates/side-gallery.tsx +87 -94
  105. package/templates/table-grouped.template.mjs +4 -4
  106. package/templates/table-grouped.tsx +999 -1201
  107. package/templates/table-page-chart.template.mjs +4 -4
  108. package/templates/table-page-chart.tsx +398 -397
  109. package/templates/table-page-heatmap-status.template.mjs +4 -4
  110. package/templates/table-page-heatmap-status.tsx +479 -527
  111. package/templates/table-page-shoe-store-heatmap.template.mjs +4 -4
  112. package/templates/table-page-shoe-store-heatmap.tsx +746 -746
  113. package/templates/table-page.template.mjs +4 -4
  114. package/templates/table-page.tsx +393 -431
  115. package/templates/table.template.mjs +4 -4
  116. package/templates/table.tsx +93 -99
  117. package/templates/tech-report.template.mjs +4 -4
  118. package/templates/tech-report.tsx +1320 -1324
  119. package/templates/theme-showcase.template.mjs +4 -4
  120. package/templates/theme-showcase.tsx +869 -1246
  121. package/tokens.css +340 -343
@@ -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 {useState, useTransition} from 'react';
6
- import {demoLogin} from 'astryx-dracula/shared/login-demo';
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
- AUTH_HEADING,
9
- AUTH_SUBTITLE,
10
- AUTH_PRIMARY_CTA,
11
- AUTH_SIGNUP_PROMPT,
12
- AUTH_SIGNUP_LINK,
13
- AUTH_FORGOT_PASSWORD,
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
- const [email, setEmail] = useState('');
34
- const [password, setPassword] = useState('');
35
- const [isLoading, startTransition] = useTransition();
36
- const [error, setError] = useState<string | null>(null);
37
-
38
- const handleSignIn = () => {
39
- setError(null);
40
- if (!email || !password) {
41
- setError(AUTH_ERROR_MESSAGE);
42
- return;
43
- }
44
- startTransition(async () => {
45
- await demoLogin();
46
- });
47
- };
48
-
49
- return (
50
- <Center axis="both" style={pageStyle}>
51
- <VStack gap={4} hAlign="center" style={contentStyle}>
52
- <LoginBrand />
53
-
54
- {/* Card */}
55
- <Card padding={4} width="100%">
56
- <VStack gap={4} hAlign="stretch">
57
- <VStack gap={1} hAlign="center">
58
- <Heading level={1} type="display-2" justify="center">
59
- {AUTH_HEADING}
60
- </Heading>
61
- <Text type="body" color="secondary">
62
- {AUTH_SUBTITLE}
63
- </Text>
64
- </VStack>
65
-
66
- {/* The field group, as its three siblings carry it
67
- (login-card.tsx:76, login-split.tsx:160, login-sso.tsx:192).
68
- Without it these two inputs sat 16px apart -- the outer
69
- VStack's gap={4} -- where all three twins render 8px, so the
70
- gap between the two fields was twice the gap between the
71
- fields and the sign-up link below. */}
72
- <VStack gap={2}>
73
- <TextInput
74
- label="Email"
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
- type: 'page',
3
- name: 'Messaging Shell',
4
- description: 'Team messaging shell with channels and thread panel',
5
- category: 'tooling',
2
+ type: "page",
3
+ name: "Messaging Shell",
4
+ description: "Team messaging shell with channels and thread panel",
5
+ category: "tooling",
6
6
  };