astryx-dracula 0.2.1 → 0.3.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 (83) hide show
  1. package/BRAND.md +30 -18
  2. package/README.md +17 -12
  3. package/USAGE.md +29 -10
  4. package/astryx-dracula.js +19 -13
  5. package/astryx-dracula.variants.d.ts +15 -0
  6. package/package.json +59 -17
  7. package/shared/auth-chrome-config.ts +18 -0
  8. package/shared/auth-chrome.tsx +25 -0
  9. package/shared/auth-copy.ts +22 -0
  10. package/shared/chaptered-doc-config.ts +92 -0
  11. package/shared/chaptered-doc.tsx +332 -0
  12. package/shared/chart-hues.ts +27 -0
  13. package/shared/chart-labels.tsx +44 -0
  14. package/shared/chart-legend.tsx +100 -0
  15. package/shared/chart-panel-style.ts +13 -0
  16. package/shared/data-bar.tsx +160 -0
  17. package/shared/gallery-image.ts +20 -0
  18. package/shared/login-demo.ts +7 -0
  19. package/shared/metric-delta.tsx +36 -0
  20. package/shared/order-desk.tsx +273 -0
  21. package/shared/revenue-chart.tsx +174 -0
  22. package/shared/scene-castle.tsx +322 -0
  23. package/shared/scene-frame.tsx +88 -0
  24. package/shared/scene-hues.ts +49 -0
  25. package/shared/scene-tile.tsx +128 -0
  26. package/shared/settings-data.ts +125 -0
  27. package/shared/settings-rows.tsx +179 -0
  28. package/shared/sparkline.tsx +94 -0
  29. package/shared/sso-icons.tsx +30 -0
  30. package/templates/ai-chat-landing.tsx +66 -33
  31. package/templates/ai-chat.tsx +36 -19
  32. package/templates/blank.tsx +4 -3
  33. package/templates/centered-hero.tsx +14 -125
  34. package/templates/classic-gallery.tsx +20 -66
  35. package/templates/contact-form.tsx +59 -39
  36. package/templates/dashboard-portfolio.tsx +143 -226
  37. package/templates/dashboard.tsx +122 -122
  38. package/templates/detail-page.tsx +95 -91
  39. package/templates/documentation-design.template.mjs +1 -1
  40. package/templates/documentation-design.tsx +83 -96
  41. package/templates/documentation-technical.template.mjs +1 -1
  42. package/templates/documentation-technical.tsx +29 -19
  43. package/templates/documentation.template.mjs +1 -1
  44. package/templates/documentation.tsx +52 -74
  45. package/templates/editor.tsx +112 -84
  46. package/templates/file-explorer.tsx +131 -84
  47. package/templates/form-two-column.tsx +61 -125
  48. package/templates/gallery-hero.tsx +15 -171
  49. package/templates/ide.tsx +22 -20
  50. package/templates/incident-console.tsx +104 -70
  51. package/templates/kanban-board.tsx +99 -42
  52. package/templates/library.template.mjs +2 -2
  53. package/templates/library.tsx +37 -42
  54. package/templates/login-card.tsx +58 -87
  55. package/templates/login-split.tsx +88 -126
  56. package/templates/login-sso.tsx +105 -64
  57. package/templates/login.tsx +107 -53
  58. package/templates/messaging-shell.tsx +171 -144
  59. package/templates/mixed-gallery.tsx +29 -130
  60. package/templates/payment-form.tsx +368 -290
  61. package/templates/product-detail.tsx +39 -58
  62. package/templates/product-gallery.tsx +30 -41
  63. package/templates/product-tour.template.mjs +6 -0
  64. package/templates/product-tour.tsx +916 -0
  65. package/templates/settings-dialog.tsx +135 -282
  66. package/templates/settings-sidebar.tsx +178 -268
  67. package/templates/settings.tsx +41 -14
  68. package/templates/shell-nav.tsx +31 -24
  69. package/templates/shell-side-nav.tsx +29 -20
  70. package/templates/shell-top-nav.tsx +80 -44
  71. package/templates/side-gallery.tsx +38 -94
  72. package/templates/table-grouped.tsx +62 -34
  73. package/templates/table-page-chart.tsx +23 -302
  74. package/templates/table-page-heatmap-status.tsx +156 -92
  75. package/templates/table-page-shoe-store-heatmap.tsx +18 -293
  76. package/templates/table-page.tsx +23 -7
  77. package/templates/table.tsx +23 -8
  78. package/templates/tech-report.template.mjs +6 -0
  79. package/templates/tech-report.tsx +1486 -0
  80. package/templates/theme-showcase.template.mjs +1 -1
  81. package/templates/theme-showcase.tsx +299 -237
  82. package/theme.css +76 -14
  83. package/tokens.css +425 -30
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
  // XLE (canonical structure, validated with `bunx astryx layout check`):
3
- // Ctr > V[a=center] > S.section[p=6] > V[g=6] > (V[g=2 a=center] > Hd"Let's brew after dark"[level=1] + Tx"Tell us a bit"[t=body]) + (G[c={min:200} g=4] > (C > V[g=3] > Ic + (V[g=1] > Tx"Title"[t=body] + Tx"Desc"[t=supporting]))*3) + (G[c={min:260} g=4] > TI"Full Name" + TI"Email") + (G[c={min:260} g=4] > TI"Company" + TI"Phone") + D + (V[g=5] > (V[g=2] > Tx"Goals"[t=label] + (H[g=2] > Tk"Goal"*3)) + SE"Timeline" + SE"Budget" + (RL"Source" > RLI*5) + TA"Notes" + CB"Decision maker") + (V[g=3] > B.primary"Submit" + (H[j=center g=1] > Tx[t=supporting] > Lk"Privacy Policy"))
3
+ // Ctr > V[a=center] > S.transparent[p=6] > V[g=6] > (V[g=2 a=center] > Hd"Let's brew after dark"[level=1] + Tx"Tell us a bit"[t=body]) + (V[g=4] > Hd"Why work with us"[level=2] + (G[c={min:200} g=4] > (C > V[g=3] > Ic + (V[g=1] > Hd"Title"[level=3] + Tx"Desc"[t=body]))*3)) + (V[g=4] > Hd"Your details"[level=2] + (G[c={min:260} g=4] > TI"Full name" + TI"Email") + (G[c={min:260} g=4] > TI"Company" + TI"Phone")) + D + (V[g=4] > Hd"Your project"[level=2] + (Fd"Goals"[req] > (H[g=2] > Tk"Goal"*10)) + SE"Timeline" + SE"Budget" + (RL"Source" > RLI*5) + TA"Notes" + CB"Decision maker") + (V[g=3] > B.primary"Send it into the night" + (H[j=center g=1] > Tx[t=supporting] > Lk"Privacy Policy"))
4
4
 
5
5
  import {useState} from 'react';
6
6
  import {VStack, HStack} from '@astryxdesign/core/Layout';
@@ -19,8 +19,8 @@ import {Token} from '@astryxdesign/core/Token';
19
19
  import {RadioList, RadioListItem} from '@astryxdesign/core/RadioList';
20
20
  import {TextArea} from '@astryxdesign/core/TextArea';
21
21
  import {Divider} from '@astryxdesign/core/Divider';
22
- import {Banner} from '@astryxdesign/core/Banner';
23
- import {Rocket, SlidersHorizontal, Hand} from 'lucide-react';
22
+ import {Field} from '@astryxdesign/core/Field';
23
+ import {Rocket, SlidersHorizontal, Hand, Check} from 'lucide-react';
24
24
 
25
25
  const CAMPAIGN_GOALS = [
26
26
  'Brand Awareness',
@@ -105,36 +105,30 @@ export default function ContactForm() {
105
105
  return (
106
106
  <Center axis="horizontal">
107
107
  <VStack hAlign="center" width="100%">
108
- <Section
109
- maxWidth={800}
110
- width="100%"
111
- padding={6}
112
- paddingBlock={10}
113
- variant="section">
108
+ <Section maxWidth={800} width="100%" padding={6} variant="transparent">
114
109
  <VStack gap={6}>
115
110
  {/* Header */}
116
111
  <VStack gap={2} hAlign="center" style={{textAlign: 'center'}}>
117
- <Heading level={1} type="display-1">
112
+ <Heading level={1} type="display-2">
118
113
  Let&apos;s brew after dark
119
114
  </Heading>
120
115
  <Text type="body" color="secondary">
121
- Tell us a bit about what you&apos;re summoning — the coven
116
+ Tell us a bit about what you&apos;re summoning, and the coven
122
117
  would love to help it take flight.
123
118
  </Text>
124
119
  </VStack>
125
120
 
126
121
  {/* Why work with us */}
127
- <VStack gap={5}>
122
+ <VStack gap={4}>
123
+ <Heading level={2}>Why work with us</Heading>
128
124
  <Grid columns={{minWidth: 200}} gap={4}>
129
125
  {WHY_US.map(item => (
130
126
  <Card key={item.title}>
131
127
  <VStack gap={3}>
132
- <Icon icon={item.icon} size="lg" color="accent" />
128
+ <Icon icon={item.icon} size="lg" color="secondary" />
133
129
  <VStack gap={1}>
134
- <Text type="body" weight="bold">
135
- {item.title}
136
- </Text>
137
- <Text type="supporting" color="secondary">
130
+ <Heading level={3}>{item.title}</Heading>
131
+ <Text type="body" color="secondary">
138
132
  {item.description}
139
133
  </Text>
140
134
  </VStack>
@@ -145,11 +139,13 @@ export default function ContactForm() {
145
139
  </VStack>
146
140
 
147
141
  {/* Your details */}
148
- <VStack gap={5}>
142
+ <VStack gap={4}>
143
+ <Heading level={2}>Your details</Heading>
149
144
  <Grid columns={{minWidth: 260}} gap={4}>
150
145
  <TextInput
151
- label="Full Name"
152
- placeholder="Full Name"
146
+ label="Full name"
147
+ isRequired
148
+ placeholder="Full name"
153
149
  value={fullName}
154
150
  onChange={setFullName}
155
151
  status={
@@ -160,6 +156,7 @@ export default function ContactForm() {
160
156
  />
161
157
  <TextInput
162
158
  label="Email"
159
+ isRequired
163
160
  placeholder="you@company.com"
164
161
  value={email}
165
162
  onChange={setEmail}
@@ -173,6 +170,7 @@ export default function ContactForm() {
173
170
  <Grid columns={{minWidth: 260}} gap={4}>
174
171
  <TextInput
175
172
  label="Company"
173
+ isRequired
176
174
  placeholder="Company"
177
175
  value={company}
178
176
  onChange={setCompany}
@@ -184,6 +182,7 @@ export default function ContactForm() {
184
182
  />
185
183
  <TextInput
186
184
  label="Phone"
185
+ isRequired
187
186
  placeholder="Phone number"
188
187
  value={phone}
189
188
  onChange={setPhone}
@@ -199,26 +198,47 @@ export default function ContactForm() {
199
198
  <Divider />
200
199
 
201
200
  {/* Your project */}
202
- <VStack gap={5}>
203
- <VStack gap={2}>
204
- <Text type="label" color="secondary">
205
- What are you going for?
206
- </Text>
207
- <HStack gap={2} wrap="wrap">
208
- {CAMPAIGN_GOALS.map(goal => (
209
- <Token
210
- key={goal}
211
- label={goal}
212
- color={goals.includes(goal) ? 'yellow' : 'default'}
213
- onClick={() => toggleGoal(goal)}
214
- />
215
- ))}
201
+ <VStack gap={4}>
202
+ <Heading level={2}>Your project</Heading>
203
+ <Field
204
+ label="What are you going for?"
205
+ inputID="campaign-goals"
206
+ labelID="campaign-goals-label"
207
+ isGroupLabel
208
+ isRequired
209
+ status={
210
+ errors.goals
211
+ ? {type: 'error', message: errors.goals}
212
+ : undefined
213
+ }>
214
+ <HStack
215
+ gap={2}
216
+ wrap="wrap"
217
+ role="group"
218
+ aria-labelledby="campaign-goals-label">
219
+ {CAMPAIGN_GOALS.map(goal => {
220
+ const isSelected = goals.includes(goal);
221
+ return (
222
+ <Token
223
+ key={goal}
224
+ label={goal}
225
+ color={isSelected ? 'yellow' : 'default'}
226
+ icon={
227
+ isSelected ? (
228
+ <Icon icon={Check} size="xsm" color="inherit" />
229
+ ) : undefined
230
+ }
231
+ description={isSelected ? 'Selected' : undefined}
232
+ onClick={() => toggleGoal(goal)}
233
+ />
234
+ );
235
+ })}
216
236
  </HStack>
217
- {errors.goals && <Banner status="error" title={errors.goals} />}
218
- </VStack>
237
+ </Field>
219
238
 
220
239
  <Selector
221
240
  label="When are you thinking?"
241
+ isRequired
222
242
  placeholder="When are you thinking of launching?"
223
243
  options={LAUNCH_OPTIONS}
224
244
  value={timeline}
@@ -232,6 +252,7 @@ export default function ContactForm() {
232
252
 
233
253
  <Selector
234
254
  label="Ballpark budget?"
255
+ isRequired
235
256
  placeholder="What's your rough monthly budget?"
236
257
  options={BUDGET_OPTIONS}
237
258
  value={budget}
@@ -256,7 +277,7 @@ export default function ContactForm() {
256
277
 
257
278
  <TextArea
258
279
  label="Anything else?"
259
- placeholder="Tell us whatever else is on your mind..."
280
+ placeholder="Tell us whatever else is on your mind…"
260
281
  value={message}
261
282
  onChange={setMessage}
262
283
  />
@@ -271,9 +292,8 @@ export default function ContactForm() {
271
292
  {/* Submit */}
272
293
  <VStack gap={3}>
273
294
  <Button
274
- label="Submit"
295
+ label="Send it into the night"
275
296
  variant="primary"
276
- size="lg"
277
297
  onClick={() => setSubmitted(true)}
278
298
  />
279
299
  <HStack gap={1} hAlign="center">