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
package/shared/settings-rows.tsx
CHANGED
|
@@ -3,35 +3,13 @@
|
|
|
3
3
|
// exports only components -- a .tsx exporting non-components breaks React Fast
|
|
4
4
|
// Refresh, and three templates read that data, so it was never private to here.
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
type DeviceRow,
|
|
14
|
-
type InfoRow,
|
|
15
|
-
type InfoTileData,
|
|
16
|
-
type SettingsNavItem,
|
|
17
|
-
} from 'astryx-dracula/shared/settings-data';
|
|
18
|
-
import {
|
|
19
|
-
Lock,
|
|
20
|
-
ShieldCheck,
|
|
21
|
-
Bell,
|
|
22
|
-
FileText,
|
|
23
|
-
CreditCard,
|
|
24
|
-
Globe,
|
|
25
|
-
Briefcase,
|
|
26
|
-
SquarePen,
|
|
27
|
-
Share2,
|
|
28
|
-
} from 'lucide-react';
|
|
29
|
-
import type {CSSProperties, ReactNode} from 'react';
|
|
30
|
-
import {VStack, HStack} from '@astryxdesign/core/Layout';
|
|
31
|
-
import {Text} from '@astryxdesign/core/Text';
|
|
32
|
-
import {Button} from '@astryxdesign/core/Button';
|
|
33
|
-
import {Link} from '@astryxdesign/core/Link';
|
|
34
|
-
import {Divider} from '@astryxdesign/core/Divider';
|
|
6
|
+
import { Button } from "@astryxdesign/core/Button";
|
|
7
|
+
import { Divider } from "@astryxdesign/core/Divider";
|
|
8
|
+
import { HStack, VStack } from "@astryxdesign/core/Layout";
|
|
9
|
+
import { Link } from "@astryxdesign/core/Link";
|
|
10
|
+
import { Text } from "@astryxdesign/core/Text";
|
|
11
|
+
import { actionNoWrap, type InfoRow } from "astryx-dracula/shared/settings-data";
|
|
12
|
+
import type { CSSProperties, ReactNode } from "react";
|
|
35
13
|
|
|
36
14
|
// ─── Row components ──────────────────────────────────────────────────────────
|
|
37
15
|
// The row renderers themselves, moved here from both templates. The two copies
|
|
@@ -75,151 +53,136 @@ import {Divider} from '@astryxdesign/core/Divider';
|
|
|
75
53
|
// read only when `actionKind` says the row navigates.
|
|
76
54
|
|
|
77
55
|
export function InfoRowItem({
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
56
|
+
label,
|
|
57
|
+
value,
|
|
58
|
+
action,
|
|
59
|
+
actionKind,
|
|
60
|
+
href,
|
|
61
|
+
variant = "secondary",
|
|
62
|
+
onAction,
|
|
63
|
+
style,
|
|
64
|
+
hasDivider = true,
|
|
87
65
|
}: InfoRow & {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
66
|
+
style?: CSSProperties;
|
|
67
|
+
/** Draw a Divider after the row. True only at a group boundary. */
|
|
68
|
+
hasDivider?: boolean;
|
|
91
69
|
}) {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
70
|
+
return (
|
|
71
|
+
<>
|
|
72
|
+
<HStack hAlign="between" vAlign="start" style={style}>
|
|
73
|
+
<VStack gap={1}>
|
|
74
|
+
<Text type="body" weight="semibold" display="block">
|
|
75
|
+
{label}
|
|
76
|
+
</Text>
|
|
77
|
+
<Text type="body" color="secondary" display="block">
|
|
78
|
+
{value}
|
|
79
|
+
</Text>
|
|
80
|
+
</VStack>
|
|
81
|
+
{action &&
|
|
82
|
+
(actionKind === "destination" && href ? (
|
|
83
|
+
<Link href={href} style={actionNoWrap}>
|
|
84
|
+
{action}
|
|
85
|
+
</Link>
|
|
86
|
+
) : (
|
|
87
|
+
<Button
|
|
88
|
+
label={action}
|
|
89
|
+
variant={variant}
|
|
90
|
+
size="sm"
|
|
91
|
+
style={actionNoWrap}
|
|
92
|
+
onClick={onAction}
|
|
93
|
+
/>
|
|
94
|
+
))}
|
|
95
|
+
</HStack>
|
|
96
|
+
{hasDivider && <Divider />}
|
|
97
|
+
</>
|
|
98
|
+
);
|
|
121
99
|
}
|
|
122
100
|
|
|
123
101
|
function ExpandableRowEditing({
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
102
|
+
label,
|
|
103
|
+
children,
|
|
104
|
+
onCancel,
|
|
105
|
+
onSave,
|
|
106
|
+
style,
|
|
129
107
|
}: {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
108
|
+
label: string;
|
|
109
|
+
children: ReactNode;
|
|
110
|
+
onCancel: () => void;
|
|
111
|
+
onSave: () => void;
|
|
112
|
+
style?: CSSProperties;
|
|
135
113
|
}) {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
114
|
+
return (
|
|
115
|
+
<VStack gap={4} style={style}>
|
|
116
|
+
<Text type="body" weight="semibold" display="block">
|
|
117
|
+
{label}
|
|
118
|
+
</Text>
|
|
119
|
+
{children}
|
|
120
|
+
<HStack gap={2}>
|
|
121
|
+
<Button label="Save" variant="primary" onClick={onSave} />
|
|
122
|
+
<Button label="Cancel" variant="ghost" onClick={onCancel} />
|
|
123
|
+
</HStack>
|
|
124
|
+
</VStack>
|
|
125
|
+
);
|
|
148
126
|
}
|
|
149
127
|
|
|
150
128
|
function ExpandableRowViewing({
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
129
|
+
label,
|
|
130
|
+
value,
|
|
131
|
+
onEdit,
|
|
132
|
+
style,
|
|
155
133
|
}: {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
134
|
+
label: string;
|
|
135
|
+
value: string;
|
|
136
|
+
onEdit: () => void;
|
|
137
|
+
style?: CSSProperties;
|
|
160
138
|
}) {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
size="sm"
|
|
175
|
-
style={actionNoWrap}
|
|
176
|
-
onClick={onEdit}
|
|
177
|
-
/>
|
|
178
|
-
</HStack>
|
|
179
|
-
);
|
|
139
|
+
return (
|
|
140
|
+
<HStack hAlign="between" vAlign="start" style={style}>
|
|
141
|
+
<VStack gap={1}>
|
|
142
|
+
<Text type="body" weight="semibold" display="block">
|
|
143
|
+
{label}
|
|
144
|
+
</Text>
|
|
145
|
+
<Text type="body" color="secondary" display="block">
|
|
146
|
+
{value}
|
|
147
|
+
</Text>
|
|
148
|
+
</VStack>
|
|
149
|
+
<Button label="Edit" variant="secondary" size="sm" style={actionNoWrap} onClick={onEdit} />
|
|
150
|
+
</HStack>
|
|
151
|
+
);
|
|
180
152
|
}
|
|
181
153
|
|
|
182
154
|
export function ExpandableRow({
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
155
|
+
label,
|
|
156
|
+
value,
|
|
157
|
+
children,
|
|
158
|
+
isExpanded,
|
|
159
|
+
onEdit,
|
|
160
|
+
onCancel,
|
|
161
|
+
onSave,
|
|
162
|
+
style,
|
|
163
|
+
hasDivider = true,
|
|
192
164
|
}: {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
165
|
+
label: string;
|
|
166
|
+
value: string;
|
|
167
|
+
children: ReactNode;
|
|
168
|
+
isExpanded: boolean;
|
|
169
|
+
onEdit: () => void;
|
|
170
|
+
onCancel: () => void;
|
|
171
|
+
onSave: () => void;
|
|
172
|
+
style?: CSSProperties;
|
|
173
|
+
/** Draw a Divider after the row. True only at a group boundary. */
|
|
174
|
+
hasDivider?: boolean;
|
|
203
175
|
}) {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
label={label}
|
|
217
|
-
value={value}
|
|
218
|
-
onEdit={onEdit}
|
|
219
|
-
style={style}
|
|
220
|
-
/>
|
|
221
|
-
)}
|
|
222
|
-
{hasDivider && <Divider />}
|
|
223
|
-
</>
|
|
224
|
-
);
|
|
176
|
+
return (
|
|
177
|
+
<>
|
|
178
|
+
{isExpanded ? (
|
|
179
|
+
<ExpandableRowEditing label={label} onCancel={onCancel} onSave={onSave} style={style}>
|
|
180
|
+
{children}
|
|
181
|
+
</ExpandableRowEditing>
|
|
182
|
+
) : (
|
|
183
|
+
<ExpandableRowViewing label={label} value={value} onEdit={onEdit} style={style} />
|
|
184
|
+
)}
|
|
185
|
+
{hasDivider && <Divider />}
|
|
186
|
+
</>
|
|
187
|
+
);
|
|
225
188
|
}
|
package/shared/sparkline.tsx
CHANGED
|
@@ -2,101 +2,88 @@
|
|
|
2
2
|
// geometry and the portfolio range-normalized step geometry behind one mode
|
|
3
3
|
// switch. Purple stays out of the chart so it keeps meaning "interactive".
|
|
4
4
|
|
|
5
|
-
import {CHART_HUES} from
|
|
5
|
+
import { CHART_HUES } from "astryx-dracula/shared/chart-hues";
|
|
6
6
|
|
|
7
7
|
export interface SparkPoint {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
id: string;
|
|
9
|
+
value: number;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
interface SparklineProps {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
data: SparkPoint[];
|
|
14
|
+
/** REQUIRED and unique per instance: 4+ sparklines sharing one name is an
|
|
15
|
+
* a11y defect (the portfolio bug this module fixes). */
|
|
16
|
+
label: string;
|
|
17
|
+
positive: boolean;
|
|
18
|
+
/** max: fixed geometry normalized against the series max (dashboard tiles).
|
|
19
|
+
* range: step geometry normalized against the series range (market rows).
|
|
20
|
+
* @default 'max' */
|
|
21
|
+
mode?: "max" | "range";
|
|
22
|
+
/** @default false */
|
|
23
|
+
isCompact?: boolean;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export function Sparkline({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
data,
|
|
28
|
+
label,
|
|
29
|
+
positive,
|
|
30
|
+
mode = "max",
|
|
31
|
+
isCompact = false,
|
|
32
32
|
}: SparklineProps) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
<rect
|
|
90
|
-
key={point.id}
|
|
91
|
-
x={day * 10}
|
|
92
|
-
y={36 - barHeight}
|
|
93
|
-
width={7}
|
|
94
|
-
height={barHeight}
|
|
95
|
-
rx={3.5}
|
|
96
|
-
fill={fill}
|
|
97
|
-
/>
|
|
98
|
-
);
|
|
99
|
-
})}
|
|
100
|
-
</svg>
|
|
101
|
-
);
|
|
33
|
+
// Role tokens, not --dracula-* primitives. Byte-identical values
|
|
34
|
+
// (--color-data-categorical-green IS #50FA7B), so this is a vocabulary
|
|
35
|
+
// change with no visual delta -- it just means the sparkline agrees with
|
|
36
|
+
// chart-hues.ts instead of being the one chart module that decided alone.
|
|
37
|
+
// Reported by a consumer whose test asserted their sparkline fill equalled
|
|
38
|
+
// their CHART_HUES.green and stopped agreeing across a version bump.
|
|
39
|
+
const fill = positive ? CHART_HUES.green : CHART_HUES.red;
|
|
40
|
+
if (mode === "range") {
|
|
41
|
+
const values = data.map((point) => point.value);
|
|
42
|
+
const max = Math.max(...values);
|
|
43
|
+
const min = Math.min(...values);
|
|
44
|
+
const range = Math.max(1, max - min);
|
|
45
|
+
const step = 300 / data.length;
|
|
46
|
+
const height = isCompact ? 24 : 40;
|
|
47
|
+
const baseline = isCompact ? 21 : 36;
|
|
48
|
+
const plot = isCompact ? 18 : 32;
|
|
49
|
+
const floor = isCompact ? 2 : 3;
|
|
50
|
+
const barWidth = Math.max(1.5, step - 1);
|
|
51
|
+
return (
|
|
52
|
+
<svg viewBox={`0 0 300 ${height}`} width="100%" height={height} role="img" aria-label={label}>
|
|
53
|
+
{data.map((point, slot) => {
|
|
54
|
+
const barHeight = Math.max(floor, ((point.value - min) / range) * plot);
|
|
55
|
+
return (
|
|
56
|
+
<rect
|
|
57
|
+
key={point.id}
|
|
58
|
+
x={slot * step}
|
|
59
|
+
y={baseline - barHeight}
|
|
60
|
+
width={barWidth}
|
|
61
|
+
height={barHeight}
|
|
62
|
+
rx={Math.min(2, barWidth / 2)}
|
|
63
|
+
fill={fill}
|
|
64
|
+
/>
|
|
65
|
+
);
|
|
66
|
+
})}
|
|
67
|
+
</svg>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
const max = Math.max(...data.map((point) => point.value));
|
|
71
|
+
return (
|
|
72
|
+
<svg viewBox="0 0 300 40" width="100%" height={40} role="img" aria-label={label}>
|
|
73
|
+
{data.map((point, day) => {
|
|
74
|
+
const barHeight = Math.max(3, (point.value / max) * 32);
|
|
75
|
+
return (
|
|
76
|
+
<rect
|
|
77
|
+
key={point.id}
|
|
78
|
+
x={day * 10}
|
|
79
|
+
y={36 - barHeight}
|
|
80
|
+
width={7}
|
|
81
|
+
height={barHeight}
|
|
82
|
+
rx={3.5}
|
|
83
|
+
fill={fill}
|
|
84
|
+
/>
|
|
85
|
+
);
|
|
86
|
+
})}
|
|
87
|
+
</svg>
|
|
88
|
+
);
|
|
102
89
|
}
|
package/shared/sso-icons.tsx
CHANGED
|
@@ -1,30 +1,18 @@
|
|
|
1
1
|
// Brand sign-in marks shared by login-card and login-split (byte-identical
|
|
2
2
|
// Apple/Google SVGs). Bespoke inline glyphs, no icon-library equivalent.
|
|
3
|
-
import type {SVGProps} from
|
|
3
|
+
import type { SVGProps } from "react";
|
|
4
4
|
|
|
5
5
|
export const AppleIcon = (props: SVGProps<SVGSVGElement>) => (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
width={16}
|
|
10
|
-
height={16}
|
|
11
|
-
aria-hidden="true"
|
|
12
|
-
{...props}>
|
|
13
|
-
<path d="M17.05 20.28c-.98.95-2.05.88-3.08.4-1.09-.5-2.08-.48-3.24 0-1.44.62-2.2.44-3.06-.4C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z" />
|
|
14
|
-
</svg>
|
|
6
|
+
<svg viewBox="0 0 24 24" fill="currentColor" width={16} height={16} aria-hidden="true" {...props}>
|
|
7
|
+
<path d="M17.05 20.28c-.98.95-2.05.88-3.08.4-1.09-.5-2.08-.48-3.24 0-1.44.62-2.2.44-3.06-.4C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z" />
|
|
8
|
+
</svg>
|
|
15
9
|
);
|
|
16
10
|
|
|
17
11
|
export const GoogleIcon = (props: SVGProps<SVGSVGElement>) => (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{...props}>
|
|
25
|
-
<path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 01-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z" />
|
|
26
|
-
<path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" />
|
|
27
|
-
<path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" />
|
|
28
|
-
<path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" />
|
|
29
|
-
</svg>
|
|
12
|
+
<svg viewBox="0 0 24 24" fill="currentColor" width={16} height={16} aria-hidden="true" {...props}>
|
|
13
|
+
<path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 01-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z" />
|
|
14
|
+
<path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" />
|
|
15
|
+
<path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" />
|
|
16
|
+
<path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" />
|
|
17
|
+
</svg>
|
|
30
18
|
);
|
package/shared/stars.tsx
CHANGED
|
@@ -1,28 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {Star} from
|
|
1
|
+
import { Icon } from "@astryxdesign/core/Icon";
|
|
2
|
+
import { HStack } from "@astryxdesign/core/Stack";
|
|
3
|
+
import { Text } from "@astryxdesign/core/Text";
|
|
4
|
+
import { Star } from "lucide-react";
|
|
5
5
|
|
|
6
|
-
export function StarRating({rating, count}: {rating: number; count: number}) {
|
|
7
|
-
|
|
8
|
-
const empty = 5 - filled;
|
|
6
|
+
export function StarRating({ rating, count }: { rating: number; count: number }) {
|
|
7
|
+
const filled = Math.round(rating);
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
{Array.from({length: empty}, (_, i) => (
|
|
21
|
-
<Icon key={`empty-${i}`} icon={Star} size="sm" color="secondary" />
|
|
22
|
-
))}
|
|
23
|
-
<Text type="body" color="secondary" hasTabularNumbers>
|
|
24
|
-
{rating} ({count})
|
|
25
|
-
</Text>
|
|
26
|
-
</HStack>
|
|
27
|
-
);
|
|
9
|
+
return (
|
|
10
|
+
<HStack gap={1} vAlign="center">
|
|
11
|
+
{[1, 2, 3, 4, 5].map((star) => (
|
|
12
|
+
<Icon key={star} icon={Star} size="sm" color={star <= filled ? "yellow" : "secondary"} />
|
|
13
|
+
))}
|
|
14
|
+
<Text type="body" color="secondary" hasTabularNumbers>
|
|
15
|
+
{rating} ({count})
|
|
16
|
+
</Text>
|
|
17
|
+
</HStack>
|
|
18
|
+
);
|
|
28
19
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
type: "page",
|
|
3
|
+
name: "AI Chat Landing",
|
|
4
|
+
description: "Composer, greeting, and category toggles",
|
|
5
|
+
keywords: ["ai chat", "assistant", "composer", "landing", "chat", "empty state"],
|
|
6
|
+
category: "marketing",
|
|
6
7
|
};
|