astryx-dracula 0.5.0 → 0.6.2
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 +3 -3
- package/README.md +7 -4
- package/USAGE.md +49 -49
- package/astryx-dracula.d.ts +2 -2
- package/astryx-dracula.js +25 -9
- package/astryx-dracula.variants.d.ts +2 -2
- package/astryx.integration.mjs +1 -1
- package/icons.mjs +21 -17
- package/icons.tsx +69 -62
- package/package.json +125 -120
- package/shared/auth-chrome-config.ts +6 -6
- package/shared/auth-chrome.tsx +143 -144
- package/shared/auth-copy.ts +14 -14
- package/shared/chaptered-doc-config.ts +48 -51
- package/shared/chaptered-doc.tsx +267 -289
- package/shared/chart-hues.ts +25 -10
- package/shared/chart-labels.tsx +31 -30
- package/shared/chart-legend.tsx +55 -56
- package/shared/chart-panel-style.ts +3 -3
- package/shared/data-bar.tsx +97 -102
- package/shared/format-money.ts +1 -1
- package/shared/gallery-image.ts +6 -6
- package/shared/login-demo.ts +1 -1
- package/shared/metric-card.tsx +101 -105
- 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 -17
- package/shared/scene-tile.tsx +88 -92
- package/shared/settings-data.ts +119 -125
- package/shared/settings-rows.tsx +122 -159
- package/shared/sparkline.tsx +75 -88
- package/shared/sso-icons.tsx +10 -22
- package/shared/stars.tsx +16 -25
- package/templates/ai-chat-landing.template.mjs +5 -4
- package/templates/ai-chat-landing.tsx +473 -460
- package/templates/ai-chat.template.mjs +5 -4
- package/templates/ai-chat.tsx +543 -612
- package/templates/blank.template.mjs +5 -4
- package/templates/blank.tsx +18 -14
- package/templates/centered-hero.template.mjs +5 -4
- package/templates/centered-hero.tsx +55 -68
- package/templates/classic-gallery.template.mjs +5 -4
- package/templates/classic-gallery.tsx +97 -104
- package/templates/contact-form.template.mjs +5 -4
- package/templates/contact-form.tsx +247 -282
- package/templates/dashboard-portfolio.template.mjs +5 -4
- package/templates/dashboard-portfolio.tsx +717 -548
- package/templates/dashboard.template.mjs +5 -4
- package/templates/dashboard.tsx +596 -567
- package/templates/detail-page.template.mjs +5 -4
- package/templates/detail-page.tsx +546 -603
- package/templates/documentation-design.template.mjs +5 -4
- package/templates/documentation-design.tsx +231 -243
- package/templates/documentation-technical.template.mjs +5 -4
- package/templates/documentation-technical.tsx +236 -239
- package/templates/documentation.template.mjs +5 -4
- package/templates/documentation.tsx +267 -279
- package/templates/editor.template.mjs +5 -4
- package/templates/editor.tsx +844 -877
- package/templates/file-explorer.template.mjs +5 -4
- package/templates/file-explorer.tsx +566 -590
- package/templates/form-two-column.template.mjs +5 -4
- package/templates/form-two-column.tsx +195 -210
- package/templates/gallery-hero.template.mjs +5 -4
- package/templates/gallery-hero.tsx +93 -114
- package/templates/ide.template.mjs +5 -4
- package/templates/ide.tsx +407 -453
- package/templates/incident-console.template.mjs +5 -4
- package/templates/incident-console.tsx +593 -575
- package/templates/kanban-board.template.mjs +5 -4
- package/templates/kanban-board.tsx +665 -683
- package/templates/library.template.mjs +5 -4
- package/templates/library.tsx +409 -430
- package/templates/login-card.template.mjs +5 -4
- package/templates/login-card.tsx +63 -72
- package/templates/login-split.template.mjs +5 -4
- package/templates/login-split.tsx +192 -193
- package/templates/login-sso.template.mjs +5 -4
- package/templates/login-sso.tsx +257 -258
- package/templates/login.template.mjs +5 -4
- package/templates/login.tsx +53 -49
- package/templates/messaging-shell.template.mjs +5 -4
- package/templates/messaging-shell.tsx +556 -574
- package/templates/mixed-gallery.template.mjs +5 -4
- package/templates/mixed-gallery.tsx +60 -58
- package/templates/payment-form.template.mjs +5 -4
- package/templates/payment-form.tsx +882 -991
- package/templates/product-detail.template.mjs +5 -4
- package/templates/product-detail.tsx +261 -272
- package/templates/product-gallery.template.mjs +5 -4
- package/templates/product-gallery.tsx +126 -137
- package/templates/product-tour.template.mjs +5 -4
- package/templates/product-tour.tsx +741 -773
- package/templates/settings-dialog.template.mjs +5 -4
- package/templates/settings-dialog.tsx +688 -717
- package/templates/settings-sidebar.template.mjs +5 -4
- package/templates/settings-sidebar.tsx +762 -807
- package/templates/settings.template.mjs +5 -4
- package/templates/settings.tsx +289 -304
- package/templates/shell-nav.template.mjs +5 -4
- package/templates/shell-nav.tsx +212 -219
- package/templates/shell-side-nav.template.mjs +5 -4
- package/templates/shell-side-nav.tsx +135 -157
- package/templates/shell-top-nav.template.mjs +5 -4
- package/templates/shell-top-nav.tsx +182 -203
- package/templates/side-gallery.template.mjs +5 -4
- package/templates/side-gallery.tsx +85 -90
- package/templates/table-grouped.template.mjs +5 -4
- package/templates/table-grouped.tsx +1000 -1053
- package/templates/table-page-chart.template.mjs +5 -4
- package/templates/table-page-chart.tsx +400 -398
- package/templates/table-page-heatmap-status.template.mjs +5 -4
- package/templates/table-page-heatmap-status.tsx +483 -512
- package/templates/table-page-shoe-store-heatmap.template.mjs +5 -4
- package/templates/table-page-shoe-store-heatmap.tsx +748 -746
- package/templates/table-page.template.mjs +5 -4
- package/templates/table-page.tsx +396 -405
- package/templates/table.template.mjs +5 -4
- package/templates/table.tsx +92 -93
- package/templates/tech-report.template.mjs +5 -4
- package/templates/tech-report.tsx +1316 -1304
- package/templates/theme-showcase.template.mjs +5 -4
- package/templates/theme-showcase.tsx +871 -951
- package/theme.css +35 -77
- package/theme.css.d.ts +9 -0
- package/tokens.css +373 -380
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
type: "page",
|
|
3
|
+
name: "Simple Table",
|
|
4
|
+
description: "Static rows with status badges and actions",
|
|
5
|
+
keywords: ["table", "data", "rows", "listing", "records", "grid"],
|
|
6
|
+
category: "data",
|
|
6
7
|
};
|
package/templates/table.tsx
CHANGED
|
@@ -1,117 +1,116 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
// XLE (canonical structure
|
|
3
|
-
//
|
|
2
|
+
// XLE (canonical structure of the tree below; the CLI had no XLE validator
|
|
3
|
+
// after `astryx layout` was removed in 0.7.0, so this is a reading aid and a
|
|
4
|
+
// human drift check — update it with the file, never alone):
|
|
5
|
+
// L[h=auto] > (LH[divider] > H[a=center j=between] > Hd"Artifacts"[level=1] + B.primary"Add artifact") + (LC > T[hover w=auto] > (TR > THC"Name" + THC"Status" + THC"Updated" + THC"Actions") + (TR > TC"Blood Vial" + (TC > H[g=1 a=center] > SD.success + Tx"Active") + TC"2025-01-15" + (TC > B.secondary"Edit"))*3)
|
|
4
6
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
7
|
+
import { Button } from "@astryxdesign/core/Button";
|
|
8
|
+
import { HStack, Layout, LayoutContent, LayoutHeader } from "@astryxdesign/core/Layout";
|
|
9
|
+
import { StatusDot } from "@astryxdesign/core/StatusDot";
|
|
10
|
+
import type { TableColumn } from "@astryxdesign/core/Table";
|
|
11
|
+
import { pixel, Table } from "@astryxdesign/core/Table";
|
|
12
|
+
import { Heading, Text } from "@astryxdesign/core/Text";
|
|
11
13
|
|
|
12
14
|
type Relic = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
status: "active" | "inactive";
|
|
18
|
+
updatedAt: string;
|
|
17
19
|
};
|
|
18
20
|
|
|
19
|
-
const STATUS_LABEL: Record<Relic[
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
const STATUS_LABEL: Record<Relic["status"], string> = {
|
|
22
|
+
active: "Active",
|
|
23
|
+
inactive: "Inactive",
|
|
22
24
|
};
|
|
23
25
|
|
|
24
|
-
const STATUS_VARIANT: Record<Relic[
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
const STATUS_VARIANT: Record<Relic["status"], "success" | "neutral"> = {
|
|
27
|
+
active: "success",
|
|
28
|
+
inactive: "neutral",
|
|
27
29
|
};
|
|
28
30
|
|
|
29
31
|
const SAMPLE_DATA: Relic[] = [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
{ id: "1", name: "Blood Vial", status: "active", updatedAt: "2025-01-15" },
|
|
33
|
+
{ id: "2", name: "Garlic Charm", status: "inactive", updatedAt: "2025-01-14" },
|
|
34
|
+
{ id: "3", name: "Silver Stake", status: "active", updatedAt: "2025-01-13" },
|
|
33
35
|
];
|
|
34
36
|
|
|
35
37
|
const columns: TableColumn<Relic>[] = [
|
|
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
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
</Button>
|
|
80
|
-
),
|
|
81
|
-
},
|
|
38
|
+
{
|
|
39
|
+
key: "name",
|
|
40
|
+
header: "Name",
|
|
41
|
+
width: pixel(144),
|
|
42
|
+
renderCell: (item: Relic) => (
|
|
43
|
+
<Text type="body" weight="semibold">
|
|
44
|
+
{item.name}
|
|
45
|
+
</Text>
|
|
46
|
+
),
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
key: "status",
|
|
50
|
+
header: "Status",
|
|
51
|
+
width: pixel(112),
|
|
52
|
+
renderCell: (item: Relic) => (
|
|
53
|
+
<HStack gap={1} vAlign="center">
|
|
54
|
+
<StatusDot variant={STATUS_VARIANT[item.status]} label={STATUS_LABEL[item.status]} />
|
|
55
|
+
<Text type="body" color="secondary">
|
|
56
|
+
{STATUS_LABEL[item.status]}
|
|
57
|
+
</Text>
|
|
58
|
+
</HStack>
|
|
59
|
+
),
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
key: "updatedAt",
|
|
63
|
+
header: "Updated",
|
|
64
|
+
width: pixel(112),
|
|
65
|
+
renderCell: (item: Relic) => (
|
|
66
|
+
<Text type="body" color="secondary" hasTabularNumbers>
|
|
67
|
+
{item.updatedAt}
|
|
68
|
+
</Text>
|
|
69
|
+
),
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
key: "actions",
|
|
73
|
+
header: "Actions",
|
|
74
|
+
width: pixel(96),
|
|
75
|
+
renderCell: (item: Relic) => (
|
|
76
|
+
<Button label={`Edit ${item.name}`} variant="secondary" size="sm">
|
|
77
|
+
Edit
|
|
78
|
+
</Button>
|
|
79
|
+
),
|
|
80
|
+
},
|
|
82
81
|
];
|
|
83
82
|
|
|
84
83
|
export default function SimpleTable() {
|
|
85
|
-
|
|
84
|
+
const data = SAMPLE_DATA;
|
|
86
85
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
86
|
+
return (
|
|
87
|
+
<Layout
|
|
88
|
+
height="auto"
|
|
89
|
+
header={
|
|
90
|
+
<LayoutHeader hasDivider>
|
|
91
|
+
<HStack vAlign="center" hAlign="between">
|
|
92
|
+
<Heading level={1}>Artifacts</Heading>
|
|
93
|
+
<Button label="Add artifact" variant="primary" />
|
|
94
|
+
</HStack>
|
|
95
|
+
</LayoutHeader>
|
|
96
|
+
}
|
|
97
|
+
content={
|
|
98
|
+
<LayoutContent>
|
|
99
|
+
{/* Each column below declares the width its own content needs, so the table
|
|
101
100
|
takes that sum instead of splitting the viewport four ways and leaving a
|
|
102
101
|
quarter of the page empty after a ten-character name and 290px of empty
|
|
103
102
|
table to the right of an Edit button. `width: auto` is what lets the pixel
|
|
104
103
|
widths survive — under the default `width: 100%` the fixed table layout
|
|
105
104
|
hands the leftover space back to every column and the voids return. */}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
105
|
+
<Table<Relic>
|
|
106
|
+
data={data}
|
|
107
|
+
columns={columns}
|
|
108
|
+
idKey="id"
|
|
109
|
+
hasHover
|
|
110
|
+
style={{ width: "auto" }}
|
|
111
|
+
/>
|
|
112
|
+
</LayoutContent>
|
|
113
|
+
}
|
|
114
|
+
/>
|
|
115
|
+
);
|
|
117
116
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
type: "page",
|
|
3
|
+
name: "Technical Report",
|
|
4
|
+
description: "Chapter rail, paper walkthrough, and outline",
|
|
5
|
+
keywords: ["technical report", "whitepaper", "research", "spec", "findings", "paper"],
|
|
6
|
+
category: "docs",
|
|
6
7
|
};
|